From 313139d62d59386297d489846a4353faf5ee0d60 Mon Sep 17 00:00:00 2001 From: HAHA Date: Wed, 13 Apr 2022 10:40:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BB=84=E7=BB=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/organization/organization.vue | 37 +++++++++++++++++-- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/src/views/modules/base/organization/organization.vue b/src/views/modules/base/organization/organization.vue index da401f23..18f1f3a9 100644 --- a/src/views/modules/base/organization/organization.vue +++ b/src/views/modules/base/organization/organization.vue @@ -459,7 +459,7 @@ :visible.sync="transferPeo" width="30%" :before-close="handleClose"> - + @@ -507,7 +507,7 @@ v-for="item in zonings" :key="item.areaCode" :label="item.areaName" - :value="item.areaCode"> + :value="item"> @@ -1600,7 +1600,9 @@ export default { }, handelZoing(val){ - console.log(val) + this.agencyForm.level = val.level + this.agencyForm.areaName = val.areaName + this.agencyForm.areaCode = val.areaCode }, addAgency(row){ @@ -1608,8 +1610,35 @@ export default { this.getUser() }, // 新增组织确定按钮 - submitaddNewAgency(){ + async submitaddNewAgency(){ + const url = '/gov/org/agency/addagency-v2' + + let params = { + parentAgencyId:this.userForm.parentAgencyId, + agencyName:this.agencyForm.agencyName, + level:this.agencyForm.level, + areaCodeSwitch:'closed', + areaCode:this.agencyForm.areaCode, + areaName:this.agencyForm.areaName, + contacts:this.agencyForm.contacts, + mobile:this.agencyForm.mobile, + code:this.agencyForm.code, + latitude:this.latitude, + longitude:this.longitude + } + const { data, code, msg } = await requestPost(url,params) + + if(code === 0){ + this.$message.success("添加成功") + this.createAgencyDialogFlag = false + this.getAgencyList() + this.getDepartmentList() + this.getGridList() + this.agencyPeo() + }else { + this.$message.error(msg) + } }, /** 地图初始化 */