| | |
| | | * @Author: Morpheus |
| | | * @Date: 2021-07-05 16:31:54 |
| | | * @Last Modified by: liu |
| | | * @Last Modified time: 2021-08-31 11:26:49 |
| | | * @Last Modified time: 2021-09-10 16:47:56 |
| | | * menu-name 保安员注册查询 |
| | | */ |
| | | <template> |
| | |
| | | <template slot-scope="{row}" |
| | | slot="deptName"> |
| | | <el-tag>{{row.deptName}}</el-tag> |
| | | </template> |
| | | <template slot-scope="{row}" |
| | | slot="userTypeName"> |
| | | <el-tag>{{row.userTypeName}}</el-tag> |
| | | </template> --> |
| | | <template slot-scope="{ row }" slot="age"> |
| | | {{ row.age == -1 ? "" : row.age }} |
| | | </template> |
| | | <template slot-scope="{ row }" slot="sex"> |
| | | {{ |
| | | row.sex == -1 |
| | | ? "" |
| | | : row.sex == 1 |
| | | ? "男" |
| | | : row.sex == 2 |
| | | ? "女" |
| | | : "" |
| | | }} |
| | | </template> |
| | | <template slot-scope="{ row }" slot="deptId"> |
| | | <el-tag |
| | | class="rowClickSelf" |
| | |
| | | :size="size" |
| | | :type="type" |
| | | class="zhengJian-icon" |
| | | :disabled="row.hold != 1" |
| | | :title="row.hold != 1 ? '暂无证件或已吊销' : ''" |
| | | @click.stop="handleViewCredentials(row)" |
| | | >打印证件</el-button |
| | | > |
| | |
| | | :size="size" |
| | | :type="type" |
| | | class="zhengJian-icon" |
| | | :disabled="row.hold != 1" |
| | | :title="row.hold != 1 ? '暂无证件或已吊销' : ''" |
| | | @click.stop="handleCredentials(row)" |
| | | >证件吊销</el-button |
| | | > |
| | |
| | | lazy: true, |
| | | treeLoad: function (node, resolve) { |
| | | const parentId = node.level === 0 ? 0 : node.data.id; |
| | | getDeptLazyTree(parentId).then((res) => { |
| | | resolve( |
| | | res.data.data.map((item) => { |
| | | return { |
| | | ...item, |
| | | leaf: !item.hasChildren, |
| | | }; |
| | | }) |
| | | ); |
| | | }); |
| | | |
| | | |
| | | |
| | | if (parentId == 0) { |
| | | getDeptLazyTree(parentId).then((res) => { |
| | | |
| | | resolve( |
| | | |
| | | res.data.data.map((item) => { |
| | | |
| | | return { |
| | | ...item, |
| | | leaf: !item.hasChildren, |
| | | }; |
| | | |
| | | }) |
| | | |
| | | ); |
| | | |
| | | }); |
| | | } else if (parentId == '1372091709474910209') { |
| | | |
| | | getDeptLazyTree(parentId).then((res) => { |
| | | |
| | | resolve( |
| | | |
| | | res.data.data[0].children.map((item) => { |
| | | |
| | | return { |
| | | ...item, |
| | | leaf: !item.hasChildren, |
| | | }; |
| | | |
| | | }) |
| | | |
| | | ); |
| | | |
| | | }); |
| | | } else { |
| | | getDeptLazyTree(parentId).then((res) => { |
| | | res.data.data = []; |
| | | resolve( |
| | | |
| | | res.data.data.map((item) => { |
| | | |
| | | return { |
| | | ...item, |
| | | leaf: !item.hasChildren, |
| | | }; |
| | | |
| | | }) |
| | | |
| | | ); |
| | | |
| | | }); |
| | | } |
| | | |
| | | |
| | | }, |
| | | addBtn: false, |
| | | menu: false, |
| | |
| | | label: "性别", |
| | | prop: "sex", |
| | | width: 55, |
| | | slot: true, |
| | | type: "select", |
| | | dicData: [ |
| | | { |
| | |
| | | label: "年龄", |
| | | prop: "age", |
| | | width: 55, |
| | | slot: true, |
| | | display: false, |
| | | }, |
| | | { |
| | |
| | | searchSpan: 3, |
| | | width: 72, |
| | | display: false, |
| | | dicUrl: "/api/blade-system/dict-biz/dictionary?code=equipage", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey", |
| | | }, |
| | | dicData: [ |
| | | { |
| | | label: "是", |
| | | value: "1", |
| | | }, |
| | | { |
| | | label: "否", |
| | | value: "2", |
| | | }, |
| | | { |
| | | label: "已吊销", |
| | | value: "3", |
| | | }, |
| | | ], |
| | | // dicUrl: "/api/blade-system/dict-biz/dictionary?code=equipage", |
| | | // props: { |
| | | // label: "dictValue", |
| | | // value: "dictKey", |
| | | // }, |
| | | type: "select", |
| | | rules: [ |
| | | { |
| | |
| | | submitf(form, done) { |
| | | console.log(form); |
| | | // this.$message.success(JSON.stringify(form)); |
| | | addhonor(form).then((res) => { |
| | | console.log(res); |
| | | }); |
| | | addhonor(form).then( |
| | | (res) => { |
| | | // console.log(res); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | }); |
| | | }, |
| | | (error) => { |
| | | this.$message({ |
| | | type: "info", |
| | | message: "操作失败", |
| | | }); |
| | | } |
| | | ); |
| | | this.objf = {}; |
| | | this.dialogVisible = false; |
| | | done(); |
| | |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | var deptId; |
| | | // var deptId; |
| | | if (params.deptId) { |
| | | deptId = params.deptId; |
| | | this.query["deptId"] = params.deptId; |
| | | } |
| | | this.onLoad(this.page, params, deptId); |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | selectionChange(list) { |
| | |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}, deptId) { |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | params["jurisdiction"] = this.jurisdiction; |
| | | console.log(params, 1, this.query, 2); |
| | | getListSecurity( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query), |
| | | deptId |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | var d = data.records; |
| | | var date = new Date(); |
| | | var datayear = date.getFullYear(); |
| | | for (const key in d) { |
| | | var year = d[key].cardid.slice(6, 10); |
| | | d[key]["age"] = +datayear - +year; |
| | | // d[key].securitynumber = "赣洪202100009"; |
| | | } |
| | | // var d = data.records; |
| | | // var date = new Date(); |
| | | // var datayear = date.getFullYear(); |
| | | // for (const key in d) { |
| | | // var year = d[key].cardid.slice(6, 10); |
| | | // d[key]["age"] = +datayear - +year; |
| | | // // d[key].securitynumber = "赣洪202100009"; |
| | | // } |
| | | this.data = data.records; |
| | | console.log(this.data); |
| | | // console.log(this.data); |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | |
| | | // this.$Print("#certificatess"); |
| | | this.objVisiblecertificates = obj; |
| | | console.log(this.objVisiblecertificates); |
| | | getER(this.obj.securitynumber).then((res) => { |
| | | getER(this.objVisiblecertificates.securitynumber).then((res) => { |
| | | this.erweima = res.data; |
| | | // console.log(res.data); |
| | | }); |
| | | }, |
| | | // 证件吊销事件 |
| | | handleCredentials(row) { |
| | | if (row.hold == 1) { |
| | | console.log(row); |
| | | // return; |
| | | if (row.hold == 2) { |
| | | this.$message({ |
| | | type: "info", |
| | | message: "证件未拥有!", |
| | | }); |
| | | } else if (row.hold == 2) { |
| | | } else if (row.hold == 3) { |
| | | this.$message({ |
| | | type: "info", |
| | | message: "证件已吊销!", |
| | | }); |
| | | } else { |
| | | } else if (row.hold == 1) { |
| | | this.$confirm("是否吊销该人员的证件?", "提示", { |
| | | confirmButtonText: "是", |
| | | cancelButtonText: "否", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | updateHold(2, row.cardid).then((res) => { |
| | | updateHold(3, row.cardid).then((res) => { |
| | | console.log(res); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "删除成功!", |
| | | message: "吊销成功!", |
| | | }); |
| | | this.refreshChange(); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | this.$message({ |
| | | type: "info", |
| | | message: "已取消删除", |
| | | }); |
| | | // this.$message({ |
| | | // type: "info", |
| | | // message: "已取消删除", |
| | | // }); |
| | | }); |
| | | } |
| | | }, |