| | |
| | | /* |
| | | * @Author: Morpheus |
| | | * @Date: 2021-07-05 16:31:54 |
| | | * @Last Modified by: Morpheus |
| | | * @Last Modified time: 2021-07-18 21:02:10 |
| | | * @Last Modified by: liu |
| | | * @Last Modified time: 2021-11-23 14:18:07 |
| | | * menu-name 成绩查看 |
| | | */ |
| | | <template> |
| | | <el-row class="morpheus-box-score"> |
| | | <el-col :span="24"> |
| | | <el-card> |
| | | <div class="exam-card-body"> |
| | | <div |
| | | :class="[ |
| | | 'exam-card-body', |
| | | $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '', |
| | | ]" |
| | | > |
| | | <avue-crud |
| | | v-model="obj" |
| | | class="company-box" |
| | |
| | | {{ row.learnGrade == -1 ? "" : row.allGrade }} |
| | | </template> |
| | | <template slot-scope="{ row }" slot="qualified"> |
| | | {{ row.learnGrade == -1 ? "" : row.qualified == 0?"合格":row.qualified==1?"不合格":'' }} |
| | | {{ |
| | | row.learnGrade == -1 |
| | | ? "" |
| | | : row.qualified == 0 |
| | | ? "合格" |
| | | : row.qualified == 1 |
| | | ? "不合格" |
| | | : "" |
| | | }} |
| | | </template> |
| | | |
| | | <template slot-scope="{ row }" slot="menu"> |
| | |
| | | size="mini" |
| | | icon="el-icon-collection" |
| | | class="start-kaoshi" |
| | | :disabled="row.qualified==1" |
| | | :disabled="row.qualified == 1" |
| | | v-if="permission.singleperformance_print" |
| | | @click="securityPrint(row)" |
| | | >保安证打印 |
| | |
| | | menu: true, |
| | | menuWidth: 136, |
| | | labelWidth: 120, |
| | | ...this.$store.state.control.clearOtherBut, |
| | | column: [ |
| | | { |
| | | label: "考试名称", |
| | |
| | | search: true, |
| | | searchSpan: 4, |
| | | slot: true, |
| | | viewDisplay:false, |
| | | viewDisplay: false, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | |
| | | }, |
| | | ], |
| | | // overHidden:true, |
| | | width:230, |
| | | width: 230, |
| | | }, |
| | | { |
| | | label: "用户名", |
| | |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | width:160, |
| | | width: 160, |
| | | }, |
| | | { |
| | | label: "所属公司", |
| | |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | width:250, |
| | | width: 250, |
| | | }, |
| | | { |
| | | label: "考试开始时间", |
| | |
| | | ], |
| | | }, |
| | | { |
| | | label: "总成绩", |
| | | prop: "allGrade", |
| | | slot: true, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: true, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: true, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入考试名称", |
| | | trigger: "blur" |
| | | }] |
| | | label: "总成绩", |
| | | prop: "allGrade", |
| | | slot: true, |
| | | // 表单新增时是否禁止 |
| | | addDisabled: false, |
| | | // 表单新增时是否可见 |
| | | addDisplay: true, |
| | | // 表单新增时是否为查看模式 |
| | | addDetail: false, |
| | | // 表单编辑时是否禁止 |
| | | editDisabled: true, |
| | | // 表单编辑时是否可见 |
| | | editDisplay: true, |
| | | // 表单编辑时是否为查看模式 |
| | | editDetail: false, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入考试名称", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "是否合格", |
| | |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 16, |
| | | ...this.$store.state.control.changePageSize, |
| | | }, |
| | | questionBankQuery: {}, |
| | | questionBankSelectionList: [], |
| | | }; |
| | | }, |
| | | computed:{ |
| | | computed: { |
| | | ...mapGetters(["userInfo", "permission"]), |
| | | permissionList() { |
| | | return { |
| | |
| | | viewBtn: this.vaildData(null, false), |
| | | delBtn: this.vaildData(null, false), |
| | | editBtn: this.vaildData(this.permission.user_edit, false), |
| | | excelBtn: this.vaildData(this.permission.singleperformance_export, false), |
| | | excelBtn: this.vaildData( |
| | | this.permission.singleperformance_export, |
| | | false |
| | | ), |
| | | }; |
| | | }, |
| | | }, |
| | |
| | | var roleIds = this.userInfo.role_id.split(","); |
| | | roleIds.forEach((roleId) => { |
| | | getRoleDetail(roleId).then((res) => { |
| | | var roleAlias = res.data.data.roleAlias; |
| | | if ( |
| | | roleAlias == "保安公司管理员" || |
| | | roleAlias == "保安" || |
| | | roleAlias == "未持证保安" |
| | | ) { |
| | | //如果是保安公司管理员 |
| | | params["deptId"] = that.userInfo.dept_id; |
| | | } |
| | | var roleAlias = res.data.data.roleAlias; |
| | | if ( |
| | | roleAlias == "保安公司管理员" || |
| | | roleAlias == "保安" || |
| | | roleAlias == "未持证保安" |
| | | ) { |
| | | //如果是保安公司管理员 |
| | | params["deptId"] = that.userInfo.dept_id; |
| | | } |
| | | that.questionBankLoading = false; |
| | | params["examType"] = 1; |
| | | getList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | const data = res.data.data; |
| | | that.questionBankPage.total = data.total; |
| | | that.questionBankData = data.records; |
| | | that.questionBankLoading = false; |
| | | params["examType"] = 1; |
| | | getList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | const data = res.data.data; |
| | | that.questionBankPage.total = data.total; |
| | | that.questionBankData = data.records; |
| | | that.questionBankLoading = false; |
| | | that.questionBankSelectionClear(); |
| | | }); |
| | | }) |
| | | that.questionBankSelectionClear(); |
| | | }); |
| | | }); |
| | | }); |
| | | |
| | | }, |
| | | questionBankSelectionClear() { |
| | | this.questionBankSelectionList = []; |