From a6eb5882460b737b01c6a993054aaf310ddd56ff Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Thu, 28 Sep 2023 15:10:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E7=9B=8A=E5=B2=97=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../publicWelfarePost/addForm.vue | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/views/modules/base/residentManagement/publicWelfarePost/addForm.vue b/src/views/modules/base/residentManagement/publicWelfarePost/addForm.vue index 45e85cd8f..cfc999ab8 100644 --- a/src/views/modules/base/residentManagement/publicWelfarePost/addForm.vue +++ b/src/views/modules/base/residentManagement/publicWelfarePost/addForm.vue @@ -105,7 +105,7 @@ + :A="item.value"> @@ -152,7 +152,7 @@
岗位类型: - {{ formData.postTypes }} + {{ formData.postTypeNames || '--' }}
@@ -193,7 +193,7 @@
兴趣特长: - {{ formData.hobbyCodes || "--" }} + {{ formData.hobbyNames || "--" }}
@@ -235,11 +235,11 @@
管理范围: - {{ formData.manageScopes || "--" }} + {{ formData.manageScopesName || "--" }}
+ :options="orgOptions" :props="orgOptionProps" :show-all-levels="false" @change="handleChangeManageScopes" clearable>
@@ -334,6 +334,7 @@ export default { SPECIAL_SKILL: [], idCard_type: [] }, + selArr:[], }; }, @@ -356,10 +357,11 @@ export default { await this.getDetail(this.scopeId); }, async getDetail(categorizedResiId) { - const url = `/actual/base/publicWelfarePost/detail/${categorizedResiId}`; + const url = `/actual/base/resiCategorized/publicWelfarePost/detail/${categorizedResiId}`; const { data, code, msg } = await requestGet(url); if (code === 0) { this.formData = { ...data }; + this.formData.manageScopes = data.manageScopes[0].scopeId await this.setAgencyIdFromLastLayerId(data.agencyId) console.log(this.agencyIdTemp); } else { @@ -375,7 +377,7 @@ export default { this.formType === "edit" ? "/actual/base/resiCategorized/publicWelfarePost/update" : "/actual/base/resiCategorized/publicWelfarePost/create"; - + this.formData.manageScopes = this.selArr const { data, code, msg } = await requestPost(url, this.formData); if (code === 0) { this.$message.success(this.formType == 'add' ? "添加成功" : '修改成功'); @@ -386,6 +388,11 @@ export default { } }); }, + handleChangeManageScopes(val){ + let obj = this.$refs["myCascader"].getCheckedNodes()[0].data + console.log(obj); + this.selArr = [{scopeType:obj.level,scopeId:obj.agencyId}] + }, async getDicts() { try { const requests = [