| | |
| | | <template> |
| | | <basic-container class="desk1"> |
| | | <basic-container |
| | | :class="[ |
| | | 'desk1', |
| | | $store.state.control.windowWidth >= 1024 ? 'tooRowSearch' : '', |
| | | ]" |
| | | > |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="loading" |
| | |
| | | </template> |
| | | <template slot-scope="{ type, size, row }" slot="menu"> |
| | | <el-button |
| | | style="display:none" |
| | | style="display: none" |
| | | :size="size" |
| | | :type="type" |
| | | v-if="permission.notice_upload" |
| | |
| | | </el-button> --> |
| | | </template> |
| | | <template slot-scope="{ row }" slot="deptName"> |
| | | <el-tag>{{ row.deptName }}</el-tag> |
| | | <el-tag>{{ row.deptName }}</el-tag> |
| | | </template> |
| | | <template slot-scope="{ row }" slot="sex"> |
| | | <el-tag>{{ row.sex=="1"?"男":row.sex=="2"?"女":""}}</el-tag> |
| | | <el-tag>{{ |
| | | row.sex == "1" ? "男" : row.sex == "2" ? "女" : "" |
| | | }}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | |
| | | remove, |
| | | update, |
| | | add, |
| | | getAccreditationRecords |
| | | getAccreditationRecords, |
| | | } from "@/api/accreditationRecords/accreditationRecords"; |
| | | import { getDept } from "@/api/system/dept"; |
| | | import { mapGetters } from "vuex"; |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | check:false, |
| | | check: false, |
| | | form: {}, |
| | | query: {}, |
| | | questionBankSearch: {}, |
| | |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | ...this.$store.state.control.changePageSize, |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | |
| | | saveBtnText: "发布", |
| | | menuWidth: 150, |
| | | dialogClickModal: false, |
| | | ...this.$store.state.control.clearOtherBut, |
| | | column: [ |
| | | { |
| | | label: "申请时间", |
| | |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | search: true, |
| | | searchSpan:5, |
| | | searchSpan: 5, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | prop: "realName", |
| | | search: true, |
| | | searchSpan: 3, |
| | | width:100, |
| | | width: 100, |
| | | searchLabelWidth: 50, |
| | | // display: false, |
| | | }, |
| | | // { |
| | | // label: "所属保安公司", |
| | | // label: "企业名称", |
| | | // searchLabelWidth: "110", |
| | | // // prop: "deptName", |
| | | // prop: "deptId", |
| | |
| | | // minWidth: 260, |
| | | // }, |
| | | { |
| | | label: "所属保安公司", |
| | | searchLabelWidth: "110", |
| | | prop: "deptName", |
| | | // type: "tree", |
| | | // dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697", |
| | | // props: { |
| | | // label: "title", |
| | | // value: "id", |
| | | // }, |
| | | slot: true, |
| | | searchSpan: 5, |
| | | search: true, |
| | | overHidden: true, |
| | | minWidth: 200 |
| | | label: "企业名称", |
| | | searchLabelWidth: "110", |
| | | prop: "deptName", |
| | | // type: "tree", |
| | | // dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697", |
| | | // props: { |
| | | // label: "title", |
| | | // value: "id", |
| | | // }, |
| | | slot: true, |
| | | searchSpan: 5, |
| | | search: true, |
| | | overHidden: true, |
| | | minWidth: 200, |
| | | }, |
| | | { |
| | | label: "性别", |
| | |
| | | label: "有无照片", |
| | | prop: "isAvatar", |
| | | type: "select", |
| | | search:true, |
| | | search: true, |
| | | searchLabelWidth: 90, |
| | | minWidth: 105, |
| | | searchSpan: 3, |
| | |
| | | editDisplay: false, |
| | | hide: true, |
| | | display: false, |
| | | dicData:[ |
| | | dicData: [ |
| | | { |
| | | label:"全部", |
| | | value:3 |
| | | label: "全部", |
| | | value: 3, |
| | | }, |
| | | { |
| | | label:"有", |
| | | value:1 |
| | | label: "有", |
| | | value: 1, |
| | | }, |
| | | { |
| | | label:"无", |
| | | value:2 |
| | | } |
| | | ] |
| | | label: "无", |
| | | value: 2, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(null, false), |
| | | viewBtn: this.vaildData(this.permission.accreditationRecords_view, false), |
| | | delBtn: this.vaildData(this.permission.accreditationRecords_delete, false), |
| | | viewBtn: this.vaildData( |
| | | this.permission.accreditationRecords_view, |
| | | false |
| | | ), |
| | | delBtn: this.vaildData( |
| | | this.permission.accreditationRecords_delete, |
| | | false |
| | | ), |
| | | editBtn: this.vaildData(null, false), |
| | | }; |
| | | }, |
| | |
| | | mounted() { |
| | | this.getDeptInfo(this.userInfo.dept_id); |
| | | }, |
| | | created(){ |
| | | if (this.userInfo.role_name == "公安管理员") { |
| | | created() { |
| | | if (this.userInfo.role_name == "公安管理员") { |
| | | //判断是否为市局管理员 |
| | | if(this.userInfo.jurisdiction=="1372091709474910209"){ |
| | | this.check = true; |
| | | // this.vaildData(this.permission.accreditationRecords_paper_delete, false); |
| | | }else{ |
| | | if (this.userInfo.jurisdiction == "1372091709474910209") { |
| | | this.check = true; |
| | | // this.vaildData(this.permission.accreditationRecords_paper_delete, false); |
| | | } else { |
| | | this.check = false; |
| | | // this.vaildData(null, false); |
| | | } |
| | |
| | | window.localStorage.getItem("saber-userInfo") |
| | | ).content.dept_id; |
| | | |
| | | const { releaseTimeRange } = this.query; |
| | | params["type"] = 1; |
| | | if (this.userInfo.role_name == "保安公司管理员") { |
| | | //如果是保安公司管理员 |
| | | params["deptId"] = this.userInfo.dept_id; |
| | | } |
| | | if (this.userInfo.role_name == "培训公司管理员") { |
| | | //如果是培训公司管理员 |
| | | params["createUser"] = this.userInfo.Id; |
| | | } |
| | | if (this.userInfo.role_name == "公安管理员") { |
| | | //如果是公安管理员 |
| | | params["jurisdiction"] = this.userInfo.jurisdiction; |
| | | } |
| | | let values = { |
| | | const { releaseTimeRange } = this.query; |
| | | params["type"] = 1; |
| | | if (this.userInfo.role_name == "保安公司管理员") { |
| | | //如果是保安公司管理员 |
| | | params["deptId"] = this.userInfo.dept_id; |
| | | } |
| | | if (this.userInfo.role_name == "培训公司管理员") { |
| | | //如果是培训公司管理员 |
| | | params["createUser"] = this.userInfo.Id; |
| | | } |
| | | if (this.userInfo.role_name == "公安管理员") { |
| | | //如果是公安管理员 |
| | | params["jurisdiction"] = this.userInfo.jurisdiction; |
| | | } |
| | | let values = { |
| | | ...params, |
| | | }; |
| | | if (releaseTimeRange) { |
| | | values = { |
| | | ...params, |
| | | startTime: releaseTimeRange[0], |
| | | endTime: releaseTimeRange[1], |
| | | ...this.query, |
| | | }; |
| | | 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; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | values.releaseTimeRange = null; |
| | | } |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize, values).then((res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | //保安员证信息导出 |
| | | handleExport() { |
| | |
| | | //获取查询条件 |
| | | const { releaseTimeRange } = this.questionBankSearch; |
| | | if (releaseTimeRange) { |
| | | this.questionBankSearch['startTime'] = releaseTimeRange[0]; |
| | | this.questionBankSearch['endTime'] = releaseTimeRange[1]; |
| | | this.questionBankSearch["startTime"] = releaseTimeRange[0]; |
| | | this.questionBankSearch["endTime"] = releaseTimeRange[1]; |
| | | } |
| | | var data = { |
| | | type:1, |
| | | applyUnit:this.questionBankSearch.applyUnit, |
| | | type: 1, |
| | | applyUnit: this.questionBankSearch.applyUnit, |
| | | deptName: this.questionBankSearch.deptName, |
| | | idCardNo: this.questionBankSearch.idCardNo, |
| | | realName: this.questionBankSearch.realName, |
| | |
| | | } |
| | | //序列号url形式,用&拼接 |
| | | data = Qs.stringify(data); |
| | | window.open(`/api/accreditationRecords/export-security-paper?${this.website.tokenHeader}=${getToken()}&`+data); |
| | | window.open( |
| | | `/api/accreditationRecords/export-security-paper?${ |
| | | this.website.tokenHeader |
| | | }=${getToken()}&` + data |
| | | ); |
| | | }); |
| | | }, |
| | | }, |