| | |
| | | icon="el-icon-collection" |
| | | class="start-kaoshi" |
| | | :disabled="row.qualified==1" |
| | | v-if="permission.singleperformance_print" |
| | | @click="securityPrint(row)" |
| | | >保安证打印 |
| | | </el-button> |
| | |
| | | |
| | | <script> |
| | | import { getList, update } from "@/api/examapi/performance"; |
| | | import { mapGetters } from "vuex"; |
| | | import { getRoleDetail } from "@/api/system/role"; |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | overHidden:true, |
| | | // overHidden:true, |
| | | width:230, |
| | | }, |
| | | { |
| | | label: "用户名", |
| | |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | width:160, |
| | | }, |
| | | { |
| | | label: "所属公司", |
| | |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | width:250, |
| | | }, |
| | | { |
| | | label: "考试开始时间", |
| | |
| | | questionBankSelectionList: [], |
| | | }; |
| | | }, |
| | | computed:{ |
| | | ...mapGetters(["userInfo", "permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission.user_add, false), |
| | | 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), |
| | | }; |
| | | }, |
| | | }, |
| | | created() {}, |
| | | mounted() {}, |
| | | methods: { |
| | |
| | | }); |
| | | }, |
| | | questionBankOnLoad(page, params = {}) { |
| | | this.questionBankLoading = false; |
| | | params["examType"] = 1; |
| | | getList( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | const data = res.data.data; |
| | | this.questionBankPage.total = data.total; |
| | | this.questionBankData = data.records; |
| | | this.questionBankLoading = false; |
| | | this.questionBankSelectionClear(); |
| | | //判断角色,如果是保安公司管理员或保安,只能查看当前公司的考试成绩 |
| | | var that = this; |
| | | //获取当前登录人员的角色信息 |
| | | 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; |
| | | } |
| | | 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(); |
| | | }); |
| | | }) |
| | | }); |
| | | |
| | | }, |
| | | questionBankSelectionClear() { |
| | | this.questionBankSelectionList = []; |