Browse Source

未查明原因

feature-xiaowang
是小王呀\24601 11 months ago
parent
commit
1c227d069e
  1. 22
      src/views/modules/portrayal/jumin/index.vue

22
src/views/modules/portrayal/jumin/index.vue

@ -1235,6 +1235,8 @@ export default {
.then(async (res) => { .then(async (res) => {
if (res.data.code === 0) { if (res.data.code === 0) {
this.resiDetailObj = res.data.data || {}; this.resiDetailObj = res.data.data || {};
console.log( this.resiDetailObj," this.resiDetailObj");
const nameMap = { const nameMap = {
reside: "居住信息", reside: "居住信息",
ext: "拓展信息", ext: "拓展信息",
@ -1259,9 +1261,14 @@ export default {
if (this.resiDetailObj.baseInfoDto.categoryInfo[key] === 1 && this.incidence[key]) { if (this.resiDetailObj.baseInfoDto.categoryInfo[key] === 1 && this.incidence[key]) {
keysWithValueOne.push(this.incidence[key].formId); keysWithValueOne.push(this.incidence[key].formId);
} }
} }
console.log(keysWithValueOne,"matchedObject");
const keysWithValueOneName= keysWithValueOne.map(str => { const keysWithValueOneName= keysWithValueOne.map(str => {
console.log(str,"str");
const matchedObject = this.originalExpandList.find(obj => obj.id === str); const matchedObject = this.originalExpandList.find(obj => obj.id === str);
console.log(matchedObject,"matchedObject");
return matchedObject ? matchedObject.title : null; return matchedObject ? matchedObject.title : null;
}); });
this.menuList = Object.entries( this.menuList = Object.entries(
@ -1275,9 +1282,11 @@ export default {
totalQty: value.totalQty, totalQty: value.totalQty,
})) }))
.reverse(); .reverse();
console.log(this.menuList,"this.menuList");
console.log(keysWithValueOneName,"this.keysWithValueOFDDGDGFGDDFneName");
for(let i in keysWithValueOneName){ for(let i in keysWithValueOneName){
for(let k in this.originalExpandList){ for(let k in this.originalExpandList){
console.log(this.originalExpandList,"this.originalExpandList");
if(keysWithValueOneName[i] === this.originalExpandList[k].title){ if(keysWithValueOneName[i] === this.originalExpandList[k].title){
for(let c in this.menuList){ 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 === '居住信息' ){ 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", id: "updateRecord",
} }
); );
console.log( this.menuList,"DSKLHVJLKJVLSKDJSDVDSVDS");
const orderIds = ["base", "reside", "ext"]; const orderIds = ["base", "reside", "ext"];
// //
let sortedData = []; let sortedData = [];
@ -1314,7 +1323,8 @@ export default {
sortedData.push(item); sortedData.push(item);
} }
}); });
console.log(sortedData); console.log(sortedData,"DSKLHVJLKJVLSKDJ");
console.log( this.menuList,"DSKLHVJLKJVLSKSDSFDFSDFDJ");
// data sortedData // data sortedData
this.menuList.forEach(item => { this.menuList.forEach(item => {
if (!orderIds.includes(item.id)) { if (!orderIds.includes(item.id)) {
@ -1322,9 +1332,13 @@ export default {
} }
}); });
this.menuList = sortedData; this.menuList = sortedData;
console.log( this.originalExpandList," this.originalExpandList");
this.expandList = this.originalExpandList.filter((itemA) => { this.expandList = this.originalExpandList.filter((itemA) => {
return keysWithValueOne.some((itemB) => itemB === itemA.id); return keysWithValueOne.some((itemB) => itemB === itemA.id);
}); });
console.log(this.expandList,"this.expandList1");
await Promise.all( await Promise.all(
this.expandList.map(async (item) => { this.expandList.map(async (item) => {
await Promise.all( await Promise.all(

Loading…
Cancel
Save