diff --git a/src/views/modules/portrayal/jumin/index.vue b/src/views/modules/portrayal/jumin/index.vue index 3c882700c..e546452a5 100644 --- a/src/views/modules/portrayal/jumin/index.vue +++ b/src/views/modules/portrayal/jumin/index.vue @@ -1235,6 +1235,8 @@ export default { .then(async (res) => { if (res.data.code === 0) { this.resiDetailObj = res.data.data || {}; + console.log( this.resiDetailObj," this.resiDetailObj"); + const nameMap = { reside: "居住信息", ext: "拓展信息", @@ -1259,9 +1261,14 @@ export default { if (this.resiDetailObj.baseInfoDto.categoryInfo[key] === 1 && this.incidence[key]) { keysWithValueOne.push(this.incidence[key].formId); } - } + } + console.log(keysWithValueOne,"matchedObject"); const keysWithValueOneName= keysWithValueOne.map(str => { + console.log(str,"str"); + const matchedObject = this.originalExpandList.find(obj => obj.id === str); + console.log(matchedObject,"matchedObject"); + return matchedObject ? matchedObject.title : null; }); this.menuList = Object.entries( @@ -1275,9 +1282,11 @@ export default { totalQty: value.totalQty, })) .reverse(); - + console.log(this.menuList,"this.menuList"); + console.log(keysWithValueOneName,"this.keysWithValueOFDDGDGFGDDFneName"); for(let i in keysWithValueOneName){ for(let k in this.originalExpandList){ + console.log(this.originalExpandList,"this.originalExpandList"); if(keysWithValueOneName[i] === this.originalExpandList[k].title){ for(let c in this.menuList){ if(this.menuList[c].name === keysWithValueOneName[i] || this.menuList[c].name === '基本信息' || this.menuList[c].name === '拓展信息' || this.menuList[c].name === '居住信息' ){ @@ -1303,7 +1312,7 @@ export default { id: "updateRecord", } ); - + console.log( this.menuList,"DSKLHVJLKJVLSKDJSDVDSVDS"); const orderIds = ["base", "reside", "ext"]; // 新建一个数组存放按顺序排列的项 let sortedData = []; @@ -1314,7 +1323,8 @@ export default { sortedData.push(item); } }); - console.log(sortedData); + console.log(sortedData,"DSKLHVJLKJVLSKDJ"); + console.log( this.menuList,"DSKLHVJLKJVLSKSDSFDFSDFDJ"); // 将 data 中剩余的项放入 sortedData this.menuList.forEach(item => { if (!orderIds.includes(item.id)) { @@ -1322,9 +1332,13 @@ export default { } }); this.menuList = sortedData; + console.log( this.originalExpandList," this.originalExpandList"); + this.expandList = this.originalExpandList.filter((itemA) => { return keysWithValueOne.some((itemB) => itemB === itemA.id); }); + console.log(this.expandList,"this.expandList1"); + await Promise.all( this.expandList.map(async (item) => { await Promise.all(