From 8222db1f4dea338b67ecee861f7b4b2567e8174f Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Mon, 06 Nov 2023 19:31:25 +0800
Subject: [PATCH] 添加成员字典未加载修复

---
 subPackage/house/member/index.vue |   32 ++++++++++++++++++--------------
 1 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/subPackage/house/member/index.vue b/subPackage/house/member/index.vue
index f69a9c2..07cbe2c 100644
--- a/subPackage/house/member/index.vue
+++ b/subPackage/house/member/index.vue
@@ -288,8 +288,9 @@
 		onLoad(option) {
 			const data = JSON.parse(option.data)
 			this.houseCode = data.houseCode
-			if(data.type == 2){
+			if(data.type == 1){
 				this.addOrUpdateTitle = "保存"
+				this.getAllBizDict()
 			}
 			if(data.type == 2){
 				this.addOrUpdateTitle = "修改"
@@ -297,9 +298,22 @@
 			}
 		},
 		onShow() {
-
 		},
 		methods: {
+			async getAllBizDict(){
+				// 获取角色关系字典
+				await this.getBizDict('roleRelation',this.dataList.relationshipList)
+				// 获取角色字典
+				await this.getBizDict('roleType',this.dataList.roleList)
+				// 获取民族字典
+				await this.getBizDict('nationType',this.dataList.ethnicityList)
+				// 获取学历字典
+				await this.getBizDict('educationType',this.dataList.educationList)
+				// 获取工作状态字典
+				await this.getBizDict('workStatusType',this.dataList.workStatusList)
+				// 获取婚姻状态字典
+				await this.getBizDict('marriageStatusType',this.dataList.maritalStatusList)
+			},
 			// 获取业务字典
 			async getBizDict(code,list){
 				const param = {
@@ -315,18 +329,8 @@
 			},
 			// 获取住户信息
 			async getHouseholdInfo(data){
-				// 获取角色关系字典
-				await this.getBizDict('roleRelation',this.dataList.relationshipList)
-				// 获取角色字典
-				await this.getBizDict('roleType',this.dataList.roleList)
-				// 获取民族字典
-				await this.getBizDict('nationType',this.dataList.ethnicityList)
-				// 获取学历字典
-				await this.getBizDict('educationType',this.dataList.educationList)
-				// 获取工作状态字典
-				await this.getBizDict('workStatusType',this.dataList.workStatusList)
-				// 获取婚姻状态字典
-				await this.getBizDict('marriageStatusType',this.dataList.maritalStatusList)
+				// 获取所有字典
+				await this.getAllBizDict()
 				this.form = data
 				this.roleTypeName = this.findObjValue(data.roleType, this.dataList.roleList)
 				this.relationshipName = this.findObjValue(data.relationship, this.dataList.relationshipList)

--
Gitblit v1.9.3