| | |
| | | }) |
| | | } |
| | | |
| | | export const getAccreditationRecords = (id) => { |
| | | return request({ |
| | | url: '/api/accreditationRecords/details', |
| | | method: 'get', |
| | | params: { |
| | | id, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | export const remove = (ids) => { |
| | | return request({ |
| | | url: '/api/accreditationRecords/remove', |
| | |
| | | @row-del="rowDel" |
| | | v-model="form" |
| | | :permission="permissionList" |
| | | :search.sync="questionBankSearch" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | :before-open="beforeOpen" |
| | |
| | | plain |
| | | @click="handleDelete" |
| | | >删 除 |
| | | </el-button> |
| | | <el-button |
| | | type="warning" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-download" |
| | | v-if="permission.trainExam_performance_export" |
| | | @click="handleExport" |
| | | >保安员证信息导出 |
| | | </el-button> |
| | | <!-- v-if="permission.notice_delete" --> |
| | | </template> |
| | |
| | | remove, |
| | | update, |
| | | add, |
| | | getAccreditationRecords |
| | | } from "@/api/accreditationRecords/accreditationRecords"; |
| | | import { getDept } from "@/api/system/dept"; |
| | | import { mapGetters } from "vuex"; |
| | | import { mapState } from "vuex"; |
| | | |
| | | import Qs from "qs"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | query: {}, |
| | | questionBankSearch: {}, |
| | | loading: true, |
| | | deptCategory: "", |
| | | deptId: "", |
| | |
| | | index: true, |
| | | stripe: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | // selection: true, |
| | | excelBtn: false, |
| | | addBtnText: "发布", |
| | | addTitle: "发布", |
| | |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "通知时间", |
| | | prop: "releaseTimeRange", |
| | | type: "datetime", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | searchRange: true, |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | search: true, |
| | | searchSpan:6, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入通知时间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "姓名", |
| | | prop: "realName", |
| | | search: true, |
| | | searchSpan: 3, |
| | | width:100, |
| | | searchLabelWidth: 50, |
| | | display: false, |
| | | // display: false, |
| | | }, |
| | | // { |
| | | // label: "所属保安公司", |
| | |
| | | // }, |
| | | slot: true, |
| | | searchSpan: 5, |
| | | display: false, |
| | | search: true, |
| | | minWidth: 200 |
| | | }, |
| | |
| | | search: true, |
| | | searchLabelWidth: 90, |
| | | searchSpan: 5, |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "年龄", |
| | | prop: "age", |
| | | display: false, |
| | | }, |
| | | { |
| | | label: "保安证编号", |
| | |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getNotice(this.form.id).then((res) => { |
| | | getAccreditationRecords(this.form.id).then((res) => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | |
| | | ? (that.deptCategory = true) |
| | | : (that.deptCategory = false); |
| | | |
| | | // const { releaseTimeRange } = this.query; |
| | | const { releaseTimeRange } = this.query; |
| | | params["jurisdiction"] = this.jurisdiction; |
| | | params["type"] = 1; |
| | | let values = { |
| | | ...params, |
| | | }; |
| | | // if (releaseTimeRange) { |
| | | // values = { |
| | | // ...params, |
| | | // startTime: releaseTimeRange[0], |
| | | // endTime: releaseTimeRange[1], |
| | | // ...this.query, |
| | | // }; |
| | | // values.releaseTimeRange = null; |
| | | // } |
| | | if (releaseTimeRange) { |
| | | values = { |
| | | ...params, |
| | | startTime: releaseTimeRange[0], |
| | | endTime: releaseTimeRange[1], |
| | | ...this.query, |
| | | }; |
| | | values.releaseTimeRange = null; |
| | | } |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize, values).then((res) => { |
| | | const data = res.data.data; |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | //保安员证信息导出 |
| | | handleExport() { |
| | | this.$confirm("是否导出保安员证信息数据?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }).then(() => { |
| | | //获取查询条件 |
| | | console.log(this.questionBankSearch, 456); |
| | | const { releaseTimeRange } = this.questionBankSearch; |
| | | if (releaseTimeRange) { |
| | | this.questionBankSearch['startTime'] = releaseTimeRange[0]; |
| | | this.questionBankSearch['endTime'] = releaseTimeRange[1]; |
| | | } |
| | | var data = { |
| | | deptName: this.questionBankSearch.deptName, |
| | | idCardNo: this.questionBankSearch.idCardNo, |
| | | realName: this.questionBankSearch.realName, |
| | | securityNumber: this.questionBankSearch.securityNumber, |
| | | startTime: this.questionBankSearch.securityName, |
| | | endTime: this.questionBankSearch.examName, |
| | | }; |
| | | //导出 |
| | | if ( |
| | | this.userInfo.role_name == "保安公司管理员" || |
| | | this.userInfo.role_name == "保安" |
| | | ) { |
| | | //如果是保安公司管理员 |
| | | data["deptId"] = this.userInfo.dept_id; |
| | | } |
| | | if (this.userInfo.role_name == "培训公司管理员") { |
| | | //如果是培训公司管理员 |
| | | data["trainUnitId"] = this.userInfo.dept_id; |
| | | } |
| | | data["examType"] = 2; |
| | | //序列号url形式,用&拼接 |
| | | data = Qs.stringify(data); |
| | | window.open(`/api/accreditationRecords/export-security-paper?` + data); |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | { |
| | | label: "联系地址", |
| | | prop: "address", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "请输入联系地址", |
| | | trigger: "click", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "户口所在地", |
| | |
| | | type: "warning", |
| | | }).then(() => { |
| | | //获取查询条件 |
| | | console.log(this.questionBankSearch, 456); |
| | | // console.log(this.questionBankSearch, 456); |
| | | var data = { |
| | | account: this.questionBankSearch.account, |
| | | companyName: this.questionBankSearch.companyName, |