| | |
| | | import { mapGetters } from "vuex"; |
| | | import { mapState } from "vuex"; |
| | | import Qs from "qs"; |
| | | import website from "@/config/website"; |
| | | import { getToken } from "@/util/auth"; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | this.questionBankSearch['endTime'] = releaseTimeRange[1]; |
| | | } |
| | | var data = { |
| | | type:1, |
| | | applyUnit:this.questionBankSearch.applyUnit, |
| | | deptName: this.questionBankSearch.deptName, |
| | | idCardNo: this.questionBankSearch.idCardNo, |
| | | realName: this.questionBankSearch.realName, |
| | |
| | | endTime: this.questionBankSearch.endTime, |
| | | }; |
| | | //导出 |
| | | // if ( |
| | | // this.userInfo.role_name == "保安公司管理员" || |
| | | // this.userInfo.role_name == "保安" |
| | | // ) { |
| | | // //如果是保安公司管理员 |
| | | // data["deptId"] = this.userInfo.dept_id; |
| | | // } |
| | | if (this.userInfo.role_name == "保安公司管理员") { |
| | | //如果是保安公司管理员 |
| | | data["deptId"] = this.userInfo.dept_id; |
| | | } |
| | | if (this.userInfo.role_name == "培训公司管理员") { |
| | | //如果是培训公司管理员 |
| | | data["trainUnitId"] = this.userInfo.dept_id; |
| | | data["createUser"] = this.userInfo.Id; |
| | | } |
| | | // data["examType"] = 2; |
| | | if (this.userInfo.role_name == "公安管理员") { |
| | | //如果是公安管理员 |
| | | data["jurisdiction"] = this.userInfo.jurisdiction; |
| | | } |
| | | //序列号url形式,用&拼接 |
| | | data = Qs.stringify(data); |
| | | window.open(`/api/accreditationRecords/export-security-paper?` + data); |
| | | window.open(`/api/accreditationRecords/export-security-paper?${this.website.tokenHeader}=${getToken()}&`+data); |
| | | }); |
| | | }, |
| | | }, |
| | |
| | | >删 除 |
| | | </el-button> |
| | | <el-button |
| | | style="display:none" |
| | | type="warning" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-download" |
| | | v-if="permission.accreditationRecords_export" |
| | | v-if="permission.accreditationRecords_paper_export" |
| | | @click="handleExport" |
| | | >保安员证信息导出 |
| | | >制证信息导出 |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | |
| | | import { mapGetters } from "vuex"; |
| | | import { mapState } from "vuex"; |
| | | import Qs from "qs"; |
| | | import website from "@/config/website"; |
| | | import { getToken } from "@/util/auth"; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | }, |
| | | //保安员证信息导出 |
| | | handleExport() { |
| | | this.$confirm("是否导出保安员证信息数据?", "提示", { |
| | | this.$confirm("是否导出证书制证信息数据?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | |
| | | this.questionBankSearch["endTime"] = releaseTimeRange[1]; |
| | | } |
| | | var data = { |
| | | type:2, |
| | | applyUnit:this.questionBankSearch.applyUnit, |
| | | auditStatus:this.questionBankSearch.auditStatus, |
| | | deptName: this.questionBankSearch.deptName, |
| | | idCardNo: this.questionBankSearch.idCardNo, |
| | | realName: this.questionBankSearch.realName, |
| | |
| | | startTime: this.questionBankSearch.startTime, |
| | | endTime: this.questionBankSearch.endTime, |
| | | }; |
| | | // data['Blade-Auth'] = getToken; |
| | | //导出 |
| | | // if ( |
| | | // this.userInfo.role_name == "保安公司管理员" || |
| | | // this.userInfo.role_name == "保安" |
| | | // ) { |
| | | // //如果是保安公司管理员 |
| | | // data["deptId"] = this.userInfo.dept_id; |
| | | // } |
| | | if (this.userInfo.role_name == "保安公司管理员") { |
| | | //如果是保安公司管理员 |
| | | data["deptId"] = this.userInfo.dept_id; |
| | | } |
| | | if (this.userInfo.role_name == "培训公司管理员") { |
| | | //如果是培训公司管理员 |
| | | data["trainUnitId"] = this.userInfo.dept_id; |
| | | data["createUser"] = this.userInfo.Id; |
| | | } |
| | | // data["examType"] = 2; |
| | | if (this.userInfo.role_name == "公安管理员") { |
| | | //如果是公安管理员 |
| | | data["jurisdiction"] = this.userInfo.jurisdiction; |
| | | } |
| | | //序列号url形式,用&拼接 |
| | | data = Qs.stringify(data); |
| | | window.open(`/api/accreditationRecords/export-security-paper?` + data); |
| | | window.open(`/api/accreditationRecords/export-security-book-paper?${this.website.tokenHeader}=${getToken()}&`+data); |
| | | }); |
| | | }, |
| | | }, |
| | |
| | | searchShow: true, |
| | | reserveSelection: true, |
| | | selectable: (row) => { |
| | | if (row.hold !== "1") { |
| | | if (row.hold !== "1" || row.securitynumber==null || row.securitynumber=='') { |
| | | return false; |
| | | } else { |
| | | return true; |
| | |
| | | treeData: [], |
| | | treeOption: { |
| | | nodeKey: "id", |
| | | defaultExpandAll:true, |
| | | defaultExpandedKeys: [], |
| | | // defaultExpandAll:true, |
| | | // lazy: false, |
| | | // treeLoad: "", //处理权限 在created中 |
| | | // function (node, resolve) { |
| | |
| | | label: "所属组织机构", |
| | | prop: "deptId", |
| | | type: "tree", |
| | | defaultExpandAll:true, |
| | | defaultExpandAll: true, |
| | | // dicUrl: "/api/blade-system/dept/lazy-tree", |
| | | props: { |
| | | label: "title", |
| | | value: "id", |
| | | }, |
| | | dicData:[], |
| | | dicData: [], |
| | | // hide: !website.tenantMode, |
| | | // addDisplay: website.tenantMode, |
| | | // editDisplay: website.tenantMode, |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | ], |
| | | }, |
| | | ], |
| | |
| | | var that = this; |
| | | //公安局进入 |
| | | if (this.userInfo.role_name == "公安管理员") { |
| | | var parentId = this.userInfo.dept_id; |
| | | var userId = this.userInfo.Id; |
| | | var parentId = this.userInfo.dept_id; |
| | | var userId = this.userInfo.Id; |
| | | getDeptLazyTree(parentId, userId).then((res) => { |
| | | that.treeData = res.data.data; |
| | | that.treeOption.defaultExpandedKeys = []; |
| | | res.data.data.forEach((item) => { |
| | | that.treeOption.defaultExpandedKeys.push(item.id); |
| | | }); |
| | | }); |
| | | } else { |
| | | // this.treeOption.treeLoad = function (node, resolve) { |
| | |
| | | getDeptLazyTree(0).then((res) => { |
| | | that.treeData = res.data.data; |
| | | }); |
| | | this.treeOption.defaultExpandAll = false; |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | } |
| | | } |
| | | column.dicData = b; |
| | | } else if(d == "公安管理员"){ |
| | | } else if (d == "公安管理员") { |
| | | for (var i in k) { |
| | | if (k[i].title == "公安管理员") { |
| | | b.push(k[i]); |
| | | } |
| | | } |
| | | column.dicData = b; |
| | | }else { |
| | | } else { |
| | | column.dicData = k; |
| | | } |
| | | }); |
| | | |
| | | //公安局进入 |
| | | if (this.userInfo.role_name == "公安管理员" || this.userInfo.role_name == "保安公司管理员") { |
| | | var parentId = this.userInfo.dept_id; |
| | | var userId = this.userInfo.Id; |
| | | getDeptLazyTree(parentId, userId).then((res) => { |
| | | const column = this.findObject(this.option.group, "deptId"); |
| | | column.dicData = res.data.data; |
| | | }); |
| | | } else { |
| | | getDeptLazyTree(0).then((res) => { |
| | | const column = this.findObject(this.option.group, "deptId"); |
| | | column.dicData = res.data.data; |
| | | }); |
| | | } |
| | | if ( |
| | | this.userInfo.role_name == "公安管理员" || |
| | | this.userInfo.role_name == "保安公司管理员" |
| | | ) { |
| | | var parentId = this.userInfo.dept_id; |
| | | var userId = this.userInfo.Id; |
| | | getDeptLazyTree(parentId, userId).then((res) => { |
| | | const column = this.findObject(this.option.group, "deptId"); |
| | | column.dicData = res.data.data; |
| | | }); |
| | | } else { |
| | | getDeptLazyTree(0).then((res) => { |
| | | const column = this.findObject(this.option.group, "deptId"); |
| | | column.dicData = res.data.data; |
| | | }); |
| | | } |
| | | // getDeptTree(tenantId).then((res) => { |
| | | // const column = this.findObject(this.option.group, "deptId"); |
| | | // column.dicData = res.data.data; |
| | |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | if(this.userInfo.role_name!="公安管理员"){ |
| | | if (this.userInfo.role_name != "公安管理员") { |
| | | const column = this.findObject(this.option.group, "code"); |
| | | column.display = false; |
| | | } |
| | | |
| | | |
| | | getUser(this.form.id).then((res) => { |
| | | this.form = res.data.data; |
| | | if (this.form.hasOwnProperty("deptId")) { |
| | |
| | | }); |
| | | } |
| | | if (["add"].includes(type)) { |
| | | if(this.userInfo.role_name!="公安管理员"){ |
| | | if (this.userInfo.role_name != "公安管理员") { |
| | | const column = this.findObject(this.option.group, "code"); |
| | | column.display = false; |
| | | } |