| | |
| | | |
| | | export const addExam = (params) => { |
| | | return request({ |
| | | url: '/api/trainingRegistration/batchExam', |
| | | url: '/api/trainingRegistration/batchTrainExam', |
| | | method: 'post', |
| | | data: params |
| | | }) |
| | |
| | | </div> --> |
| | | <baoanz :data="obj0" v-if="hold == 1"></baoanz> |
| | | <div v-else style="width: 100%; text-align: center; padding-top: 20px"> |
| | | 无保安证 |
| | | 无上岗证 |
| | | </div> |
| | | </span> |
| | | <span v-else-if="typeTABS.prop === 'tab5'"> |
| | | <securityCertificate :data="obj0" v-if="hold == 1"></securityCertificate> |
| | | <div v-else style="width: 100%; text-align: center; padding-top: 20px"> |
| | | 无保安证书 |
| | | 无保安员证 |
| | | </div> |
| | | </span> |
| | | </div> |
| | |
| | | }, |
| | | { |
| | | // icon: "el-icon-info", |
| | | label: "保安员证", |
| | | label: "上岗证", |
| | | prop: "tab4", |
| | | }, |
| | | { |
| | | // icon: "el-icon-info", |
| | | label: "上岗证", |
| | | label: "保安员证", |
| | | prop: "tab5", |
| | | }, |
| | | ], |
| | |
| | | :size="size" |
| | | :type="type" |
| | | v-if="permission.trainingRegistration_cancel" |
| | | :disabled="row.cancel==2" |
| | | :disabled="row.cancel == 2" |
| | | >取消报名</el-button |
| | | > |
| | | <el-button |
| | |
| | | size="small" |
| | | icon="el-icon-receiving" |
| | | v-if="permission.trainingRegistration_print" |
| | | :disabled="row.candidateNo == '' || row.cancel==2" |
| | | :disabled="row.candidateNo == '' || row.cancel == 2" |
| | | @click="handlePrint(row)" |
| | | >准考证打印 |
| | | </el-button> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | choiceName: [], |
| | | |
| | | loading: true, |
| | | excelBox: false, |
| | | dialogExamFormVisible: false, |
| | | search:{}, |
| | | search: {}, |
| | | examApply: { |
| | | number: 0, |
| | | }, |
| | | optionExamApply: { |
| | | height: "auto", |
| | | filterBtn: true, |
| | |
| | | menuWidth: 380, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "所选保安人数", |
| | | prop: "number", |
| | | span: 24, |
| | | value: 0, |
| | | disabled: true, |
| | | labelWidth: 110, |
| | | }, |
| | | // { |
| | | // label: "考试人数", |
| | | // prop: "number", |
| | | // type: 'number', |
| | | // label: "序号开始", |
| | | // prop: "serialStart", |
| | | // span: 12, |
| | | // precision:0, |
| | | // step:50, |
| | | // mock:{ |
| | | // type:'number', |
| | | // max:1000, |
| | | // min:0, |
| | | // precision:0 |
| | | // value: 1, |
| | | // mock: { |
| | | // type: "number", |
| | | // max: 1000, |
| | | // min: 1, |
| | | // precision: 0, |
| | | // }, |
| | | // minRows: 1, |
| | | // maxRows: 1000, |
| | | // type: "number", |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请输入考试人数", |
| | | // message: "请输入序号", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // minRows: 0, |
| | | // maxRows: 1000, |
| | | // value:50, |
| | | // }, |
| | | { |
| | | label: "序号开始", |
| | | prop: "serialStart", |
| | | span: 12, |
| | | value:1, |
| | | mock:{ |
| | | type:'number', |
| | | max:1000, |
| | | min:1, |
| | | precision:0 |
| | | }, |
| | | minRows: 1, |
| | | maxRows: 1000, |
| | | type:"number", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入序号", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "序号结束", |
| | | prop: "serialEnd", |
| | | span: 12, |
| | | value:50, |
| | | mock:{ |
| | | type:'number', |
| | | max:1000, |
| | | min:1, |
| | | precision:0 |
| | | }, |
| | | minRows: 1, |
| | | maxRows: 1000, |
| | | type:"number", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入序号", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | // { |
| | | // label: "序号结束", |
| | | // prop: "serialEnd", |
| | | // span: 12, |
| | | // value: 50, |
| | | // mock: { |
| | | // type: "number", |
| | | // max: 1000, |
| | | // min: 1, |
| | | // precision: 0, |
| | | // }, |
| | | // minRows: 1, |
| | | // maxRows: 1000, |
| | | // type: "number", |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "请输入序号", |
| | | // trigger: "blur", |
| | | // }, |
| | | // ], |
| | | // }, |
| | | { |
| | | label: "考试开始时间", |
| | | prop: "startTime", |
| | |
| | | }, |
| | | ], |
| | | span: 12, |
| | | labelWidth:110 |
| | | labelWidth: 110, |
| | | }, |
| | | { |
| | | label: "考试开始截止时间", |
| | |
| | | }, |
| | | ], |
| | | span: 12, |
| | | labelWidth:140 |
| | | labelWidth: 140, |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | data: [], |
| | | option: { |
| | | // card: true, |
| | | tip: false, |
| | | // tip: false, |
| | | // searchSize: "mini", |
| | | searchMenuSpan: 6, |
| | | height: 583, |
| | | index: true, |
| | | height: 563, |
| | | index: false, |
| | | selectable: (row, index) => { |
| | | console.log(row, index); |
| | | if (row.auditStatus == 4 && row.cancel == 1) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | labelWidth: "120", |
| | | menuWidth: 200, |
| | | align: "center", |
| | | selection: false, |
| | | reserveSelection: true, |
| | | selection: true, |
| | | column: column, |
| | | delBtn: false, |
| | | editBtn: false, |
| | |
| | | editBtn: this.vaildData(this.permission.notice_edit, false), |
| | | }; |
| | | }, |
| | | |
| | | }, |
| | | created(){ |
| | | this.search['cancel'] = 1; |
| | | this.search['auditStatus'] = 4; |
| | | created() { |
| | | this.search["cancel"] = 1; |
| | | this.search["auditStatus"] = 4; |
| | | }, |
| | | mounted() { |
| | | // if (window.name == "baoming") { |
| | | // let old = JSON.parse(window.localStorage.getItem("baoming")); |
| | | // this.choiceName = old; |
| | | // console.log(old); |
| | | // console.log("刷新"); |
| | | // } else { |
| | | // window.name = "baoming"; |
| | | // console.log("不刷新"); |
| | | // } |
| | | }, |
| | | methods: { |
| | | //准考证查看 |
| | |
| | | }, |
| | | sizeChange(val) { |
| | | this.page.pageSize = val; |
| | | this.getData(); |
| | | // this.getData(); |
| | | }, |
| | | currentChange(val) { |
| | | this.page.currentPage = val; |
| | | this.getData(); |
| | | // this.getData(); |
| | | }, |
| | | rowSave(form, done, loading) { |
| | | var that = this; |
| | |
| | | }); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | // this.selectionList = list; |
| | | this.choiceName = []; |
| | | // console.log(window.name); |
| | | for (let k in list) { |
| | | this.choiceName.push({ |
| | | label: list[k].realName, |
| | | value: list[k].id, |
| | | }); |
| | | } |
| | | |
| | | // window.localStorage.setItem("baoming", JSON.stringify(this.choiceName)); |
| | | // console.log(this.choiceName); |
| | | }, |
| | | handleDelete() { |
| | | if (this.selectionList.length === 0) { |
| | |
| | | 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; |
| | | } |
| | | params['isExam'] = 1; |
| | | 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 roleAlias = res.data.data.roleAlias; |
| | | if (roleAlias == "保安公司管理员" || roleAlias == "保安") { |
| | | //如果是保安公司管理员 |
| | | params["deptId"] = that.userInfo.dept_id; |
| | | } |
| | | if (roleAlias == "培训公司管理员") { |
| | | //如果是培训公司管理员 |
| | | params["trainingUnitId"] = that.userInfo.dept_id; |
| | | } |
| | | params["isExam"] = 1; |
| | | 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; |
| | |
| | | |
| | | //生成考试弹窗 |
| | | handleBatchExam() { |
| | | this.dialogExamFormVisible = true; |
| | | if (this.selectionList.length === 0) { |
| | | this.ids = ""; |
| | | if (this.choiceName.length == 0) { |
| | | this.$message({ |
| | | message: "未选择保安员", |
| | | type: "warning", |
| | | }); |
| | | return; |
| | | } |
| | | this.dialogExamFormVisible = true; |
| | | this.examApply.number = this.choiceName.length; |
| | | |
| | | // if (this.selectionList.length === 0) { |
| | | // this.ids = ""; |
| | | // } |
| | | }, |
| | | //生成考试 |
| | | submitExamApply(row, done, loading) { |
| | |
| | | // return; |
| | | // } |
| | | |
| | | var s = new Date(row.startTime); |
| | | var e = new Date(row.endTime); |
| | | if(s>e){ |
| | | this.$message({ |
| | | type: "error", |
| | | message: "考试开始截止时间不能早于考试考试开始时间!", |
| | | }); |
| | | done(); |
| | | return; |
| | | } |
| | | // var s = new Date(row.startTime); |
| | | // var e = new Date(row.endTime); |
| | | // if (s > e) { |
| | | // this.$message({ |
| | | // type: "error", |
| | | // message: "考试开始截止时间不能早于考试考试开始时间!", |
| | | // }); |
| | | // done(); |
| | | // return; |
| | | // } |
| | | |
| | | if (that.userInfo.role_name == "培训公司管理员") { |
| | | //如果是培训公司管理员 |
| | | row["trainingUnitId"] = that.userInfo.dept_id; |
| | | } |
| | | // if (that.userInfo.role_name == "培训公司管理员") { |
| | | // //如果是培训公司管理员 |
| | | // row["trainingUnitId"] = that.userInfo.dept_id; |
| | | // } |
| | | |
| | | row['number'] = (row.serialEnd-row.serialStart)+1; |
| | | //创建人 |
| | | row['creator'] = this.userInfo.Id; |
| | | // row["number"] = row.serialEnd - row.serialStart + 1; |
| | | // //创建人 |
| | | // row["creator"] = this.userInfo.Id; |
| | | let cho = this.choiceName; |
| | | let str = ""; |
| | | for (let k in cho) { |
| | | str += cho[k].value; |
| | | if (k != cho.length - 1) { |
| | | str += ","; |
| | | } |
| | | } |
| | | row["ids"] = str; |
| | | //提交申请 |
| | | addExam(Object.assign(row, this.search)).then( |
| | | let overData = Object.assign(row); |
| | | console.log(overData, "overData"); |
| | | // done(); |
| | | // return; |
| | | addExam(overData).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | that.$refs.formExamApply.resetFields(); |
| | |
| | | type: "success", |
| | | message: "操作成功", |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | done(); |
| | | }, |
| | | (error) => { |