From f85389e02c7fbf9cb93eb3af36b8050781d16492 Mon Sep 17 00:00:00 2001
From: dai <851733175@qq.com>
Date: Tue, 16 Nov 2021 17:20:47 +0800
Subject: [PATCH] ss
---
.../visual/basicinfo/cpts/people-more.vue | 58 +++++++++++++------
1 file changed, 41 insertions(+), 17 deletions(-)
diff --git a/src/views/modules/visual/basicinfo/cpts/people-more.vue b/src/views/modules/visual/basicinfo/cpts/people-more.vue
index 9122396f..dda9d374 100644
--- a/src/views/modules/visual/basicinfo/cpts/people-more.vue
+++ b/src/views/modules/visual/basicinfo/cpts/people-more.vue
@@ -54,11 +54,15 @@
-
+
{{ item.label }}
-
@@ -83,14 +91,14 @@
{{
- info[field.columnName] == null
+ !allInfo[group.tableName] || allInfo[group.tableName][0][field.columnName] == null
? "--"
- : getOptionLabel(field.options, info[field.columnName])
+ : getOptionLabel(field.options, allInfo[group.tableName][0][field.columnName])
}}
{{
- info[field.columnName] == null ? "--" : info[field.columnName]
+ !allInfo[group.tableName] || allInfo[group.tableName][0][field.columnName] == null ? "--" : allInfo[group.tableName][0][field.columnName]
}}
@@ -127,6 +135,7 @@ export default {
groupIndex: 0,
startGroupIndex: 0,
info: {},
+ allInfo: {},
xiaoquList: [],
louList: [],
@@ -235,7 +244,7 @@ export default {
},
async getApiData() {
- this.getField();
+ await this.getField();
await this.getInfo();
this.getXiaoquList();
this.getLouList();
@@ -288,16 +297,6 @@ export default {
}
});
});
-
- this.groupList.forEach((subList, index) => {
- subList.itemList.forEach(async (item, subIndex) => {
- if (item.optionSourceType == "remote" && item.optionSourceValue) {
- this.groupList[index].itemList.options = await this.getOptions(
- item.optionSourceValue
- );
- }
- });
- });
} else {
this.$message.error(msg);
}
@@ -314,6 +313,31 @@ export default {
if (code === 0) {
this.info = data.ic_resi_user[0];
+ this.allInfo = data;
+
+ this.fieldList.forEach((subList, index) => {
+ subList.forEach((item, subIndex) => {
+ if (
+ item.itemType == "radio" &&
+ item.childGroup &&
+ this.allInfo[item.tableName] &&
+ this.allInfo[item.tableName][0][item.columnName] == "1"
+ ) {
+ this.groupList = [...this.groupList, item.childGroup];
+ }
+ });
+ });
+ console.log('1111111111111111111111111',this.groupList);
+
+ this.groupList.forEach((subList, index) => {
+ subList.itemList.forEach(async (item, subIndex) => {
+ if (item.optionSourceType == "remote" && item.optionSourceValue) {
+ this.groupList[index].itemList.options = await this.getOptions(
+ item.optionSourceValue
+ );
+ }
+ });
+ });
} else {
this.$message.error(msg);
}