| | |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const batchAccreditation = (row) => { |
| | | return request({ |
| | | url: '/api/accreditationRecords/batchAccreditation', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | |
| | | @click="handleExport" |
| | | >保安员证信息导出 |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | size="small" |
| | | plain |
| | | v-if="permission.accreditationRecords_status" |
| | | icon="el-icon-collection-tag" |
| | | @click="handleBatch" |
| | | >已制证 |
| | | </el-button> |
| | | <!-- v-if="permission.notice_delete" --> |
| | | </template> |
| | | <template slot-scope="{ row }" slot="category"> |
| | |
| | | update, |
| | | add, |
| | | getAccreditationRecords, |
| | | batchAccreditation |
| | | } from "@/api/accreditationRecords/accreditationRecords"; |
| | | import { getDept } from "@/api/system/dept"; |
| | | import { mapGetters } from "vuex"; |
| | |
| | | filterBtn: true, |
| | | calcHeight: 30, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | tip: true, |
| | | reserveSelection: true, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | |
| | | label: "企业名称", |
| | | searchLabelWidth: "110", |
| | | prop: "deptName", |
| | | // type: "tree", |
| | | // dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697", |
| | | // props: { |
| | | // label: "title", |
| | | // value: "id", |
| | | // }, |
| | | slot: true, |
| | | searchLabelWidth: 80, |
| | | searchSpan: 5, |
| | | search: true, |
| | | overHidden: true, |
| | | minWidth: 200, |
| | | minWidth: 160, |
| | | }, |
| | | { |
| | | label: "性别", |
| | |
| | | search: true, |
| | | searchLabelWidth: 90, |
| | | searchSpan: 5, |
| | | width:140, |
| | | }, |
| | | { |
| | | label: "年龄", |
| | | prop: "age", |
| | | width:60, |
| | | }, |
| | | { |
| | | label: "照片", |
| | | prop: "avatar", |
| | | type: "upload", |
| | | listType: "picture-img", |
| | | width:60 |
| | | }, |
| | | { |
| | | label: "保安证编号", |
| | | prop: "securityNumber", |
| | | search: true, |
| | | searchLabelWidth: 90, |
| | | minWidth: 105, |
| | | width: 110, |
| | | searchSpan: 5, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | |
| | | prop: "applyName", |
| | | // search: true, |
| | | searchLabelWidth: 90, |
| | | width: 80, |
| | | minWidth: 80, |
| | | // searchSpan: 4, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | |
| | | prop: "applyUnit", |
| | | search: true, |
| | | searchLabelWidth: 120, |
| | | minWidth: 105, |
| | | minWidth: 120, |
| | | searchSpan: 5, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | |
| | | prop: "createTime", |
| | | // search: true, |
| | | searchLabelWidth: 90, |
| | | minWidth: 105, |
| | | width: 140, |
| | | // searchSpan: 4, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | |
| | | { |
| | | label: "无", |
| | | value: 2, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "是否制证", |
| | | prop: "status", |
| | | type: "select", |
| | | slot: true, |
| | | search: true, |
| | | editDisplay: false, |
| | | addDisplay: false, |
| | | searchSpan: 4, |
| | | width: 80, |
| | | dicData: [ |
| | | { |
| | | label: "全部", |
| | | value: 3, |
| | | }, |
| | | { |
| | | label: "已制证", |
| | | value: 2, |
| | | }, |
| | | { |
| | | label: "未制证", |
| | | value: 1, |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | this.getDeptInfo(this.userInfo.dept_id); |
| | | }, |
| | | created() { |
| | | if (this.userInfo.role_name == "上岗证办理管理员") { |
| | | this.questionBankSearch["status"] = 1; |
| | | } |
| | | if (this.userInfo.role_name == "公安管理员") { |
| | | //判断是否为市局管理员 |
| | | if (this.userInfo.jurisdiction == "1372091709474910209") { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | //证书批量修改为已制证 |
| | | handleBatch() { |
| | | if (this.choiceList.length === 0) { |
| | | this.$message.warning("请勾选至少一位持证保安员"); |
| | | return; |
| | | } |
| | | this.$confirm( |
| | | "共选择人数" + this.choiceList.length + "人,确定已制证?", |
| | | { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | } |
| | | ) |
| | | .then(() => { |
| | | let cho = this.choiceList; |
| | | let str = ""; |
| | | for (let k in cho) { |
| | | str += cho[k].id; |
| | | if (k != cho.length - 1) { |
| | | str += ","; |
| | | } |
| | | } |
| | | const data = { |
| | | ids: str, |
| | | createUser: this.userInfo.user_id, |
| | | type: 1, |
| | | }; |
| | | return batchAccreditation(data); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page, this.questionBankSearch); |
| | | this.$refs.crud.toggleSelection(); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }); |
| | | }, |
| | | //获取当前用户部门信息 |
| | | getDeptInfo(deptId) { |
| | | var that = this; |
| | |
| | | done(); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | // this.selectionList = list; |
| | | this.choiceList = []; |
| | | for (let k in list) { |
| | | this.choiceList.push({ |
| | | id: list[k].id, |
| | | }); |
| | | } |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | |
| | | return remove(this.ids); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.onLoad(this.page, this.questionBankSearch); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | this.onLoad(this.page, this.questionBankSearch); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | params = this.questionBankSearch; |
| | |
| | | startTime: this.questionBankSearch.startTime, |
| | | endTime: this.questionBankSearch.endTime, |
| | | isAvatar: this.questionBankSearch.isAvatar, |
| | | status: this.questionBankSearch.status, |
| | | }; |
| | | //导出 |
| | | if (this.userInfo.role_name == "保安公司管理员") { |