diff --git a/src/views/modules/base/organization/organization.vue b/src/views/modules/base/organization/organization.vue index 60d7dfbcb..b4e2b6c03 100644 --- a/src/views/modules/base/organization/organization.vue +++ b/src/views/modules/base/organization/organization.vue @@ -100,6 +100,8 @@ label="联系人"> + @@ -323,6 +325,8 @@ width="850" :before-close="handleClose" destroy-on-close> @@ -349,6 +353,10 @@ + + + + { + if (result === true) { + const url = "/gov/org/grid/addgrid"; + + let params = { + agencyId: this.GridForm.agencyId, + gridName: this.GridForm.gridName, + contacts: this.GridForm.contacts, + mobile: this.GridForm.mobile, + code: this.GridForm.code, + sort: this.GridForm.sort, + manageDistrict: this.GridForm.manageDistrict, + gridType: this.GridForm.gridType, + latitude: this.lat, + longitude: this.lng, + }; + + const { data, code, msg } = await requestPost(url, params); + + if (code === 0) { + this.$message.success("添加成功"); + this.dialogVisibleGrid = false; + this.GridForm = []; + this.getAgencyList(); + this.getDepartmentList(); + this.getGridList(); + this.getAgencyStaffListData(); + } else { + this.$message.error(msg); + } + } + }) }, async submitPeo () { diff --git a/src/views/modules/base/virtualResi.vue b/src/views/modules/base/virtualResi.vue index a0b45b201..58e9418dd 100644 --- a/src/views/modules/base/virtualResi.vue +++ b/src/views/modules/base/virtualResi.vue @@ -240,7 +240,7 @@ @@ -380,8 +380,7 @@ export default { dialogEditVisible: false, dialogVisible: false, formType: 'add', - // 显示人员详情 - dialogVisible2: false, + lookResiId: "", uploadUlr: @@ -441,6 +440,11 @@ export default { category: this.$route.query.category, searchForm: {}, + + showCheckPassword:false, + checkPasswordFrom: { + password: "", + }, }; }, @@ -864,19 +868,82 @@ export default { console.log(tab, event); }, - // 查看 async handleLook(row) { - this.lookResiId = row.resiId; - this.dialogVisible2 = true; - }, - + this.lookResiId = row.resiId; + let { + agencyId, + gridId, + gridName, + gender, + homeId, + homeName, + name, + resiId, + } = row; + this.$store.dispatch("saveData", { + agencyId, + gridId, + gridName, + gender, + homeId, + homeName, + name, + resiId, + }); + this.$router.push({ name: "jumin-huaxiang" }); + this.$store.state.contentTabs = this.$store.state.contentTabs.map( + (item) => { + if (item.name === "jumin-huaxiang") { + return { ...item, title: name }; + } + return item; + } + ); + }, // 编辑 - async handleEdit(row) { - this.editUserId = row.resiId; - this.formName = "编辑居民"; - this.formType = 'edit' - this.dialogVisible = true; - await this.residentBaseInfo(); + async handelCLickShowCheckPassword(row) { + const url = `/actual/base/residentCategoryUpdateInfo/isUpdater/${row.resiId}`; + const { data, code, msg } = await requestPost(url); + if(code==0){ + if(data==true){ + this.editUserId = row.resiId; + this.saveCheckPassword() + } + else{ + this.editUserId = row.resiId; + this.showCheckPassword = true; + } + } + else{ + this.$message.error(msg); + } + }, + handelClickCheckPassword() { + this.$refs.checkPasswordFrom.validate((vali) => { + if (vali) { + this.saveCheckPassword(this.checkPasswordFrom.password); + } else { + return false; + } + }); + }, + async saveCheckPassword(password){ + const url = `/actual/base/residentBaseInfo/getResiUserInfo/${this.editUserId}`; + let parm = { + password, + }; + const { data, code, msg } = await requestPost(url, parm); + if (code === 0) { + this.showCheckPassword = false; + this.$router.push({ + name: "edit-resi", + query: { id: this.editUserId }, + params: { idNum: data.idNum, mobile: data.mobile, name: data.name, nationality: data.nationality }, + }); + this.checkPasswordFrom.password = ""; + } else { + this.$message.error(msg); + } }, // 获取详情 residentBaseInfo() {