| | |
| | | <template> |
| | | <basic-container |
| | | :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']" |
| | | :class="[ |
| | | $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize', |
| | | $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : '' |
| | | ]" |
| | | > |
| | | <avue-crud |
| | | class="tablesss" |
| | | v-if="visibles" |
| | | :option="option" |
| | | :table-loading="loading" |
| | |
| | | update, |
| | | remove, |
| | | cancelTrain, |
| | | addExam, |
| | | addExam |
| | | } from "@/api/trainingRegistration/trainingRegistration"; |
| | | import { mapGetters } from "vuex"; |
| | | import { getRoleDetail } from "@/api/system/role"; |
| | |
| | | dialogExamFormVisible: false, |
| | | search: {}, |
| | | examApply: { |
| | | number: 0, |
| | | number: 0 |
| | | }, |
| | | optionExamApply: { |
| | | height: "auto", |
| | |
| | | span: 24, |
| | | value: 0, |
| | | disabled: true, |
| | | labelWidth: 110, |
| | | labelWidth: 110 |
| | | }, |
| | | // { |
| | | // label: "序号开始", |
| | |
| | | { |
| | | required: true, |
| | | message: "请选择考试时间", |
| | | trigger: "blur", |
| | | }, |
| | | trigger: "blur" |
| | | } |
| | | ], |
| | | span: 12, |
| | | labelWidth: 110, |
| | | labelWidth: 110 |
| | | }, |
| | | { |
| | | label: "考试开始截止时间", |
| | |
| | | { |
| | | required: true, |
| | | message: "请选择考试时间", |
| | | trigger: "blur", |
| | | }, |
| | | trigger: "blur" |
| | | } |
| | | ], |
| | | span: 12, |
| | | labelWidth: 140, |
| | | }, |
| | | ], |
| | | labelWidth: 140 |
| | | } |
| | | ] |
| | | }, |
| | | excelForm: {}, |
| | | excelOption: { |
| | |
| | | loadText: "模板上传中,请稍等", |
| | | span: 24, |
| | | propsHttp: { |
| | | res: "data", |
| | | res: "data" |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/trainingRegistration/import-trainingRegistration", |
| | | action: "/api/trainingRegistration/import-trainingRegistration" |
| | | }, |
| | | { |
| | | label: "模板下载", |
| | | prop: "excelTemplate", |
| | | formslot: true, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | span: 24 |
| | | } |
| | | ] |
| | | }, |
| | | selectionList: [], |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | ...this.$store.state.control.changePageSize, |
| | | ...this.$store.state.control.changePageSize |
| | | }, |
| | | query: {}, |
| | | data: [], |
| | |
| | | delBtn: false, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | ...this.$store.state.control.clearOtherBut, |
| | | }, |
| | | ...this.$store.state.control.clearOtherBut |
| | | } |
| | | }; |
| | | }, |
| | | computed: { |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach((ele) => { |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | |
| | | addBtn: this.vaildData(this.permission.notice_add, false), |
| | | viewBtn: this.vaildData(this.permission.notice_view, false), |
| | | delBtn: this.vaildData(this.permission.notice_delete, false), |
| | | editBtn: this.vaildData(this.permission.notice_edit, false), |
| | | editBtn: this.vaildData(this.permission.notice_edit, false) |
| | | }; |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | this.search["cancel"] = 1; |
| | | this.search["auditStatus"] = 4; |
| | | this.search["isExam"] = 1; |
| | | }, |
| | | watch: { |
| | | windowHeight() { |
| | | // console.log(this.windowHeight, "windowHeight"); |
| | | this.option.height = this.windowHeight - 320; |
| | | this.visibles = false; |
| | | this.$nextTick(() => { |
| | | this.visibles = true; |
| | | this.refreshChange(); |
| | | }); |
| | | }, |
| | | }, |
| | | |
| | | mounted() { |
| | | // if (window.name == "baoming") { |
| | | // let old = JSON.parse(window.localStorage.getItem("baoming")); |
| | |
| | | // window.name = "baoming"; |
| | | // console.log("不刷新"); |
| | | // } |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | }, |
| | | methods: { |
| | | //报名信息导出 |
| | |
| | | this.$confirm("是否导出报名信息数据?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | type: "warning" |
| | | }).then(() => { |
| | | //获取查询条件 |
| | | // const { releaseTimeRange } = this.questionBankSearch; |
| | |
| | | auditStatus: this.search.auditStatus, |
| | | deptName: this.search.deptName, |
| | | isExam: this.search.isExam, |
| | | realName: this.search.realName, |
| | | realName: this.search.realName |
| | | }; |
| | | if ( |
| | | this.userInfo.role_name == "保安公司管理员" || |
| | |
| | | obj["name"] = "准考证信息"; |
| | | this.$router.push({ |
| | | path: `/applyexam/papers`, |
| | | query: obj, |
| | | query: obj |
| | | }); |
| | | }, |
| | | sizeChange(val) { |
| | |
| | | rowSave(form, done, loading) { |
| | | var that = this; |
| | | adddata(form).then( |
| | | (res) => { |
| | | res => { |
| | | this.onLoad(this.page); |
| | | if (res.data.data == 201) { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "已报名,不能重复报名", |
| | | message: "已报名,不能重复报名" |
| | | }); |
| | | } else if (res.data.data == 201) { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "报名失败", |
| | | message: "报名失败" |
| | | }); |
| | | } else { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "报名成功", |
| | | message: "报名成功" |
| | | }); |
| | | } |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | |
| | | this.$confirm("确认报名?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | type: "warning" |
| | | }).then(() => { |
| | | row.cancel = 3; |
| | | update(row).then( |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "确认报名成功!", |
| | | message: "确认报名成功!" |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | |
| | | this.$confirm("确定取消报名?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | type: "warning" |
| | | }).then(() => { |
| | | row.cancel = 2; |
| | | cancelTrain(row).then( |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "取消报名成功!", |
| | | message: "取消报名成功!" |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | for (let k in list) { |
| | | this.choiceName.push({ |
| | | label: list[k].realName, |
| | | value: list[k].id, |
| | | value: list[k].id |
| | | }); |
| | | } |
| | | |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crudrec.toggleSelection(); |
| | | }); |
| | |
| | | //获取当前登录人员的角色信息 |
| | | var roleIds = this.userInfo.role_id.split(","); |
| | | params = this.search; |
| | | roleIds.forEach((roleId) => { |
| | | getRoleDetail(roleId).then((res) => { |
| | | roleIds.forEach(roleId => { |
| | | getRoleDetail(roleId).then(res => { |
| | | var roleAlias = res.data.data.roleAlias; |
| | | if ( |
| | | roleAlias == "保安公司管理员" || |
| | |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | ).then(res => { |
| | | // console.log(res); |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | // console.log(this.data); |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | this.loading = false; |
| | | }); |
| | | }); |
| | |
| | | if (this.choiceName.length == 0) { |
| | | this.$message({ |
| | | message: "未选择保安员", |
| | | type: "warning", |
| | | type: "warning" |
| | | }); |
| | | return; |
| | | } |
| | |
| | | that.dialogExamFormVisible = false; |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功", |
| | | message: "操作成功" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | |
| | | //关闭窗口清除数据 |
| | | closeDialog() { |
| | | this.$refs.formExamApply.resetFields(); |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| | | <style></style> |