|
|
|
@ -74,11 +74,12 @@ |
|
|
|
|
<!-- 老师 --> |
|
|
|
|
<el-switch v-if="scope.row.founder" v-model="scope.row.hintOpen" |
|
|
|
|
:active-text="scope.row.hintOpen ? '关闭' : '启用'" :active-value="0" :inactive-value="1" |
|
|
|
|
style="margin: 0 10px 0 10px" @change="switchOffTips(scope.row, scope.row.hintOpen)"></el-switch> |
|
|
|
|
style="margin: 0 10px 0 10px" :disabled="scope.row.type === 3" |
|
|
|
|
@change="switchOffTips(scope.row, scope.row.hintOpen)"></el-switch> |
|
|
|
|
<!-- 系统 --> |
|
|
|
|
<el-switch v-else v-model="scope.row.hintOpenBySchool" |
|
|
|
|
:active-text="scope.row.hintOpenBySchool ? '关闭' : '启用'" :active-value="0" :inactive-value="1" |
|
|
|
|
style="margin: 0 10px 0 10px" |
|
|
|
|
style="margin: 0 10px 0 10px" :disabled="scope.row.type === 3" |
|
|
|
|
@change="switchOffTips(scope.row, scope.row.hintOpenBySchool)"></el-switch> |
|
|
|
|
</template> |
|
|
|
|
</template> |
|
|
|
@ -88,14 +89,15 @@ |
|
|
|
|
<el-button type="text" @click="edit(scope.row, 1)">查看</el-button> |
|
|
|
|
<el-button |
|
|
|
|
v-if="scope.row.founder && (roleName.includes('超级') || roleName === scope.row.roleName || (roleName === '管理员' && !scope.row.roleName.includes('超级')))" |
|
|
|
|
type="text" @click="edit(scope.row)">编辑</el-button> |
|
|
|
|
type="text" :disabled="scope.row.type === 3" @click="edit(scope.row)">编辑</el-button> |
|
|
|
|
<el-button |
|
|
|
|
v-if="scope.row.founder && (roleName.includes('超级') || roleName === scope.row.roleName || (roleName === '管理员' && !scope.row.roleName.includes('超级')))" |
|
|
|
|
type="text" @click="handleDelete(scope.row.projectId)">删除</el-button> |
|
|
|
|
<el-button v-auth type="text" @click="copyData(scope.row.projectId)">复制</el-button> |
|
|
|
|
type="text" :disabled="scope.row.type === 3" @click="handleDelete(scope.row.projectId)">删除</el-button> |
|
|
|
|
<el-button v-auth type="text" :disabled="scope.row.type === 3" |
|
|
|
|
@click="copyData(scope.row.projectId)">复制</el-button> |
|
|
|
|
<el-switch v-auth="'禁用'" v-if="scope.row.state" v-model="scope.row.ccupationlabOpen" |
|
|
|
|
:active-text="scope.row.ccupationlabOpen ? '关闭' : '启用'" :active-value="0" :inactive-value="1" |
|
|
|
|
style="margin: 0 10px 0 10px" @change="switchOff(scope.row)"></el-switch> |
|
|
|
|
:disabled="scope.row.type === 3" style="margin: 0 10px 0 10px" @change="switchOff(scope.row)"></el-switch> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
@ -120,16 +122,28 @@ |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-drawer title="" :visible.sync="examVisible" size="100%" :close-on-click-modal="false" :withHeader="false" |
|
|
|
|
custom-class="exam-dia" @closed="examClose"> |
|
|
|
|
<div> |
|
|
|
|
<button type="button" class="el-drawer__close-btn" @click="examVisible = false"> |
|
|
|
|
<i class="el-dialog__close el-icon el-icon-close"></i> |
|
|
|
|
</button> |
|
|
|
|
</div> |
|
|
|
|
<iframe :src="examUrl" frameborder="0" width="100%"></iframe> |
|
|
|
|
</el-drawer> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { mapState } from "vuex"; |
|
|
|
|
import Setting from "@/setting"; |
|
|
|
|
import util from "@/libs/util"; |
|
|
|
|
import qs from 'qs' |
|
|
|
|
export default { |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
token: util.local.get(Setting.tokenKey), |
|
|
|
|
fromAss: Boolean(this.$route.query.show), // 从考核新增里点自定义项目过来的 |
|
|
|
|
lc: [11, 12, 19], |
|
|
|
|
cid: [this.$route.query.mallId ? +this.$route.query.mallId : '', this.$route.query.cid ? +this.$route.query.cid : ''], |
|
|
|
@ -218,6 +232,9 @@ export default { |
|
|
|
|
projectManage: {} |
|
|
|
|
}, // 复制之后,提交到后台的数据 |
|
|
|
|
listDataAll: [], |
|
|
|
|
|
|
|
|
|
examVisible: false, |
|
|
|
|
examUrl: '', |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
@ -313,8 +330,23 @@ export default { |
|
|
|
|
this.$router.push(`/project/add?founder=${this.form.founder}${this.fromAss ? '&ass=1' : ''}`); |
|
|
|
|
}, |
|
|
|
|
edit (row, show) { // 编辑 |
|
|
|
|
this.setCache() |
|
|
|
|
this.$router.push(`/project/add?projectId=${row.projectId}&founder=${this.form.founder}${show ? `&show=1` : ''}${this.fromAss ? '&ass=1' : ''}`); |
|
|
|
|
if (row.type === 3) { |
|
|
|
|
// 理论 |
|
|
|
|
let url = `${location.origin}/examination/` |
|
|
|
|
if (Setting.isDev) url = `http://192.168.31.125:8098/` |
|
|
|
|
url += `#/testPaper/detail?token=${this.token}&v=${Date.now()}&paperId=${row.paperId}` |
|
|
|
|
localStorage.setItem('exam_token', this.token) |
|
|
|
|
this.examUrl = url |
|
|
|
|
this.examVisible = true |
|
|
|
|
} else { |
|
|
|
|
// 实训 |
|
|
|
|
this.setCache() |
|
|
|
|
this.$router.push(`/project/add?projectId=${row.projectId}&founder=${this.form.founder}${show ? `&show=1` : ''}${this.fromAss ? '&ass=1' : ''}`) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 理论弹框关闭回调 |
|
|
|
|
examClose () { |
|
|
|
|
this.examUrl = '' |
|
|
|
|
}, |
|
|
|
|
handleSelectionChange (val) { // 处理多选 |
|
|
|
|
this.multipleSelection = val; |
|
|
|
@ -447,4 +479,16 @@ export default { |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped></style> |
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
/deep/.exam-dia { |
|
|
|
|
.el-drawer__close-btn { |
|
|
|
|
position: absolute; |
|
|
|
|
top: 20px; |
|
|
|
|
right: 20px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
iframe { |
|
|
|
|
height: 100%; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |