| | |
| | | >删 除 |
| | | </el-button> |
| | | <el-button |
| | | style="display: none" |
| | | type="success" |
| | | size="small" |
| | | plain |
| | |
| | | props: ["fromDeptId"], |
| | | data() { |
| | | return { |
| | | deptIds: "", |
| | | excelBox: false, |
| | | excelForm: {}, |
| | | excelOption: { |
| | |
| | | res: "data", |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/car/import-examSubject", |
| | | action: "/api/car/import-car?deptId=" + this.deptIds, |
| | | }, |
| | | { |
| | | label: "模板下载", |
| | |
| | | return ids.join(","); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.deptIds = this.userInfo.dept_id; |
| | | }, |
| | | created() { |
| | | var that = this; |
| | | if ( |
| | |
| | | done(); |
| | | }, |
| | | handleTemplate() { |
| | | window.open(`/api/car/export-template`); |
| | | window.open(`/api/car/export-template-car`); |
| | | }, |
| | | sizeChange(val) { |
| | | this.page1.currentPage = 1; |
| | |
| | | // this.$message.success("页码" + val); |
| | | }, |
| | | rowSave(form, done, loading) { |
| | | // var that = this; |
| | | // var form = this.data[0]; |
| | | // delete form.id; |
| | | // for (var k = 0; k < 13; k++) { |
| | | // console.log |
| | | // form["deptId"] = form.tenantName; |
| | | // delete form.tenantName; |
| | | // console.log(form); |
| | | if (this.fromDeptId != undefined) { |
| | | form["deptId"] = this.fromDeptId; |
| | | } |
| | |
| | | form["deptId"] = this.useifid; |
| | | } |
| | | adddata(form).then( |
| | | (res) => { |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | |
| | | params["deptId"] = this.fromDeptId; |
| | | // this.closeDep("deptId"); |
| | | } else if (this.useifid != 266) { |
| | | console.log(123); |
| | | params["deptId"] = this.useifid; |
| | | // this.closeDep("deptId"); |
| | | // for (let k in this.option.column) { |
| | | // if (this.option.column[k].prop == "deptId") { |
| | | // this.option.column[4].search = false; |
| | | // this.option.column[k].hide = true; |
| | | // this.option.column[k].addDisplay = false; |
| | | // this.option.column[k].editDisplay = false; |
| | | // } |
| | | // } |
| | | } else { |
| | | this.openDep("deptId"); |
| | | } |
| | |
| | | if (this.userInfo.role_name == "公安管理员") { |
| | | params["jurisdiction"] = that.userInfo.jurisdiction; |
| | | } |
| | | //保安公司进入 |
| | | if (this.userInfo.role_name == "保安公司管理员") { |
| | | params["deptId"] = that.userInfo.dept_id; |
| | | //导入action 修改 |
| | | const importColumn = that.findObject( |
| | | that.excelOption.column, |
| | | "excelFile" |
| | | ); |
| | | importColumn.action = |
| | | "/api/car/import-car?deptId=" + that.userInfo.dept_id; |
| | | } |
| | | |
| | | getdata( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | // console.log(res); |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | data.records.forEach(item=>{ |
| | | if(item.numberType==-1){ |
| | | item.numberType=null; |
| | | } |
| | | if(item.carType==-1){ |
| | | item.carType=null; |
| | | } |
| | | }) |
| | | this.data = data.records; |
| | | console.log(this.data); |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | // this.Ourdata = data; |
| | | // this.getData(); |
| | | // this.onLoad(this.page); |
| | | // var dept_id = JSON.parse( |
| | | // window.localStorage.getItem("saber-userInfo") |
| | | // ).content.dept_id; |
| | | }, |
| | | }; |
| | | </script> |