| | |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | ref="crud" |
| | | @row-update="rowUpdates" |
| | | @row-save="rowSave" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @current-change="currentChange" |
| | |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: "保安员姓名", |
| | | label: "保安姓名", |
| | | searchLabelWidth: 110, |
| | | prop: "real_name", |
| | | search: true, |
| | |
| | | }, |
| | | |
| | | { |
| | | label: "保安员编号", |
| | | label: "保安证编号", |
| | | prop: "securitynumber", |
| | | display: false |
| | | }, |
| | |
| | | display: false |
| | | }, |
| | | { |
| | | label: "联系电话", |
| | | label: "联系方式", |
| | | prop: "phone", |
| | | display: false |
| | | }, |
| | |
| | | // dicUrl:subofficeOptions, |
| | | dicData: [ |
| | | { |
| | | value: "0", |
| | | value: "1", |
| | | label: "是" |
| | | }, |
| | | { |
| | | value: "2", |
| | | label: "否" |
| | | }, |
| | | { |
| | | value: "3", |
| | | label: "吊销" |
| | | } |
| | | ], |
| | | search: true, |
| | |
| | | label: "是" |
| | | }, |
| | | { |
| | | value: "2", |
| | | value: "1", |
| | | label: "否" |
| | | } |
| | | ], |
| | |
| | | label: "是" |
| | | }, |
| | | { |
| | | value: "2", |
| | | value: "1", |
| | | label: "否" |
| | | } |
| | | ], |
| | |
| | | dicData: [ |
| | | { |
| | | value: "0", |
| | | label: "通过" |
| | | label: "正常" |
| | | }, |
| | | { |
| | | value: "2", |
| | | value: "1", |
| | | label: "异常" |
| | | } |
| | | ], |
| | |
| | | label: "是" |
| | | }, |
| | | { |
| | | value: "2", |
| | | value: "1", |
| | | label: "否" |
| | | } |
| | | ], |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | rowSave(row, done, loading) { |
| | | adddata(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, |
| | | error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | rowUpdates(row, index, done, loading) { |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, |
| | | error => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | |
| | | // params = { current: page.currentPage, size: page.pageSize }; |
| | | // } |
| | | let param = {}; |
| | | param["deptid"] = "1412222709480509442"; |
| | | param["deptid"] = params["deptid"] || ""; |
| | | param["name"] = params["real_name"] || ""; |
| | | param["hold"] = params["hold"] || ""; |
| | | param["photo"] = params["photo"] || ""; |
| | | param["examinationtype"] = params["examination_type"] || ""; |
| | | param["dispatch"] = params["dispatch"] || ""; |
| | | param["soil"] = params["soil"] || ""; |
| | | param["current"] = page.currentPage; |
| | | param["size"] = page.pageSize; |
| | | selectUIn(param).then(res => { |
| | |
| | | this.loading = false; |
| | | // this.selectionClear(); |
| | | }); |
| | | } |
| | | }, |
| | | // getTableData() { |
| | | // selectUIn(param).then(res => { |
| | | // if (res.data.code === 200) { |
| | |
| | | // } |
| | | // return etout; |
| | | // } |
| | | getLocationParams() { |
| | | let url = window.location.href; |
| | | let urlArr = url.split("?")[1].split("&"); |
| | | var object = new Object(); |
| | | for (var i = 0; i < urlArr.length; i++) { |
| | | let mm = urlArr[i].split("="); |
| | | object[decodeURIComponent(mm[0])] = decodeURIComponent(mm[1]); |
| | | } |
| | | let deptid = object["deptid"] || ""; |
| | | let obj = { deptid: deptid }; |
| | | this.onLoad(this.page, obj); |
| | | } |
| | | }, |
| | | mounted() { |
| | | // this.getTableData(); |
| | | this.getLocationParams(); |
| | | } |
| | | }; |
| | | </script> |