Commit 324c7b51 authored by 高飞's avatar 高飞
parents 8d1f37eb ee3fd650
...@@ -1362,32 +1362,38 @@ export default { ...@@ -1362,32 +1362,38 @@ export default {
} }
}); });
let obj = []; let obj = [];
obj_tab.forEach((item, index) => { let objNew = [];//用于全部行
if (index <= 3) { obj_tab.forEach((item,index)=>{
if(index<=3){//选择当前4行
let arr = Object.values(item); let arr = Object.values(item);
obj.push(arr); obj.push(arr);
} }
objNew.push(Object.values(item));
}); });
let idsArr = []; let idsArr = [];
this.parameterArr = []; obj.forEach(item1=>{
obj.forEach(item1 => { let arr = this.psxz_tree_data[0].children.filter(item=>item.label==item1[0]);
let arr = this.psxz_tree_data[0].children.filter(item => item.label == item1[0]); if(arr.length>0 ){
if (arr.length > 0) { if(item1[1]!='' && item1[1]!=undefined){
if (item1[1] != '' && item1[1] != undefined) { item1[1] = item1[1]+'';
item1[1] = item1[1] + '';
// let arrItem = item1[1].split(','); // let arrItem = item1[1].split(',');
// arrItem.forEach(i=>{ // arrItem.forEach(i=>{
// }) // })
let arrChildren = arr[0].children.filter(item => item.label == item1[1]); let arrChildren = arr[0].children.filter(item => item.label == item1[1]);
if (arrChildren.length > 0) { if (arrChildren.length > 0) {
idsArr.push(arrChildren[0].id); idsArr.push(arrChildren[0].id);
this.parameterArr.push({ name: arr[0].label, value: arrChildren[0].label })
} }
} }
} else { } else {
//当前4大类没找到其中对应的某一个如:没找到“产品类别代码”等 //当前4大类没找到其中对应的某一个如:没找到“产品类别代码”等
} }
}) })
this.parameterArr = [];
this.parameterArr.push({name:Object.keys(obj_tab[0])[0],value:Object.keys(obj_tab[0])[1]})
objNew.map(item1=>{
this.parameterArr.push({name:item1[0],value:item1[1]});
});
console.log(this.parameterArr)
this.clientDetails_check_typePsxz = idsArr; this.clientDetails_check_typePsxz = idsArr;
this.$refs.treePsxz.setCheckedKeys(idsArr); this.$refs.treePsxz.setCheckedKeys(idsArr);
let str = ''; let str = '';
...@@ -1407,6 +1413,7 @@ export default { ...@@ -1407,6 +1413,7 @@ export default {
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
message: mesg message: mesg
}); });
debugger;
} }
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment