成绩查看权限配置,培训公司管理员查看当前培训公司的考试成绩,报名列表同
| | |
| | | size="mini" |
| | | icon="el-icon-collection" |
| | | class="start-kaoshi" |
| | | v-if="permission.trainExam_trainPapers" |
| | | @click="startExam(row)" |
| | | >报名清册 |
| | | </el-button> |
| | |
| | | type="text" |
| | | size="mini" |
| | | icon="el-icon-folder-checked" |
| | | v-if="permission.trainExam_check" |
| | | @click="handleAudit(row)" |
| | | >审核 |
| | | </el-button> |
| | | <el-button |
| | | type="text" |
| | | size="mini" |
| | | icon="el-icon-folder-checked" |
| | | v-if="permission.trainExam_index_examScoreViews" |
| | | @click="examScoreViews(row)" |
| | | >成绩查看 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | |
| | | updateAudit, |
| | | } from "@/api/examapi/examination"; |
| | | import { auditColumn } from "./data"; |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | data() { |
| | | var validatePass = (rule, value, callback) => { |
| | |
| | | questionBankSelectionList: [], |
| | | }; |
| | | }, |
| | | created() {}, |
| | | mounted() {}, |
| | | computed: { |
| | | ids() { |
| | |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | ...mapGetters(["userInfo", "permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(null, false), |
| | | viewBtn: this.vaildData(null, false), |
| | | delBtn: this.vaildData(null, false), |
| | | editBtn: this.vaildData(null, false), |
| | | }; |
| | | }, |
| | | }, |
| | | watch: {}, |
| | |
| | | }); |
| | | } |
| | | }, |
| | | examScoreViews(row){ |
| | | //模拟考试 |
| | | if (row.examType == 2) { |
| | | this.$router.push({ |
| | | path: `/trainExam/singleperformance`, |
| | | query: row, |
| | | }); |
| | | } |
| | | }, |
| | | // 新增 |
| | | questionBankRowSave(row, done, loading) { |
| | | row.startTime = row.startTime + ":00"; |
| | |
| | | var roleAlias = res.data.data.roleAlias; |
| | | if ( |
| | | roleAlias == "保安公司管理员" || |
| | | roleAlias == "保安" || |
| | | roleAlias == "未持证保安" |
| | | roleAlias == "保安" |
| | | ) { |
| | | //如果是保安公司管理员 |
| | | params["deptId"] = that.userInfo.dept_id; |
| | | } |
| | | if ( |
| | | roleAlias == "培训公司管理员" |
| | | ) { |
| | | //如果是培训公司管理员 |
| | | params["trainUnitId"] = that.userInfo.dept_id; |
| | | } |
| | | that.questionBankLoading = false; |
| | | params["examType"] = 2; |
| | | getList( |
| | |
| | | {{ row.learnGrade == -1 ? "" : row.allGrade }} |
| | | </template> |
| | | <template slot-scope="{ row }" slot="qualified"> |
| | | {{ row.learnGrade == -1 ? "" : row.qualified == 0?"合格":row.qualified==1?"不合格":'' }} |
| | | {{ row.qualified == -1 ? "" : row.qualified==0?"合格":row.qualified==1?"不合格":row.qualified==3?"缺考,成绩无效":'' }} |
| | | </template> |
| | | |
| | | <template slot-scope="{ row }" slot="menu"> |
| | |
| | | label: "考试名称", |
| | | prop: "examName", |
| | | search: true, |
| | | searchSpan: 4, |
| | | searchSpan: 5, |
| | | slot: true, |
| | | viewDisplay:false, |
| | | // 表单新增时是否禁止 |
| | |
| | | type: "select", |
| | | slot: true, |
| | | search: true, |
| | | searchSpan: 4, |
| | | searchSpan: 3, |
| | | dicData: [ |
| | | { |
| | | label: "发布成绩", |
| | |
| | | type: "select", |
| | | slot: true, |
| | | search: true, |
| | | searchSpan: 4, |
| | | searchSpan: 3, |
| | | dicData: [ |
| | | { |
| | | label: "合格", |
| | |
| | | questionBankSelectionList: [], |
| | | }; |
| | | }, |
| | | created() {}, |
| | | created() { |
| | | // console.log(this.$route.query,111); |
| | | this.questionBankSearch['examName'] = this.$route.query.examName; |
| | | }, |
| | | mounted() {}, |
| | | computed:{ |
| | | ...mapGetters(["userInfo", "permission"]), |
| | |
| | | var that = this; |
| | | //获取当前登录人员的角色信息 |
| | | var roleIds = this.userInfo.role_id.split(","); |
| | | params = this.questionBankSearch; |
| | | roleIds.forEach((roleId) => { |
| | | getRoleDetail(roleId).then((res) => { |
| | | var roleAlias = res.data.data.roleAlias; |
| | | if ( |
| | | roleAlias == "保安公司管理员" || |
| | | roleAlias == "保安" || |
| | | roleAlias == "未持证保安" |
| | | roleAlias == "保安" |
| | | ) { |
| | | //如果是保安公司管理员 |
| | | params["deptId"] = that.userInfo.dept_id; |
| | | } |
| | | if ( |
| | | roleAlias == "培训公司管理员" |
| | | ) { |
| | | //如果是培训公司管理员 |
| | | params["trainUnitId"] = that.userInfo.dept_id; |
| | | } |
| | | that.questionBankLoading = false; |
| | | params["examType"] = 2; |
| | | getList( |
| | |
| | | addExam, |
| | | } from "@/api/trainingRegistration/trainingRegistration"; |
| | | import { mapGetters } from "vuex"; |
| | | import { getRoleDetail } from "@/api/system/role"; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | params = this.search; |
| | | this.loading = true; |
| | | getdata( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | // console.log(res); |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | console.log(this.data); |
| | | this.loading = false; |
| | | }); |
| | | //判断角色,如果是保安公司管理员或保安,只能查看当前公司的考试成绩 |
| | | var that = this; |
| | | //获取当前登录人员的角色信息 |
| | | var roleIds = this.userInfo.role_id.split(","); |
| | | params = this.search; |
| | | roleIds.forEach((roleId) => { |
| | | getRoleDetail(roleId).then((res) => { |
| | | var roleAlias = res.data.data.roleAlias; |
| | | if ( |
| | | roleAlias == "保安公司管理员" || |
| | | roleAlias == "保安" |
| | | ) { |
| | | //如果是保安公司管理员 |
| | | params["deptId"] = that.userInfo.dept_id; |
| | | } |
| | | if ( |
| | | roleAlias == "培训公司管理员" |
| | | ) { |
| | | //如果是培训公司管理员 |
| | | params["trainingUnitId"] = that.userInfo.dept_id; |
| | | } |
| | | getdata( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | // console.log(res); |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | console.log(this.data); |
| | | this.loading = false; |
| | | }); |
| | | }) |
| | | }) |
| | | }, |
| | | handleImport() { |
| | | this.excelBox = true; |