Commit ee3fd650 authored by 以墨为白's avatar 以墨为白 🎧

解析excel

parent 7e70ee05
......@@ -1301,14 +1301,15 @@ export default {
}
});
let obj = [];
let objNew = [];//用于全部行
obj_tab.forEach((item,index)=>{
if(index<=3){
if(index<=3){//选择当前4行
let arr = Object.values(item);
obj.push(arr);
}
objNew.push(Object.values(item));
});
let idsArr = [];
this.parameterArr = [];
obj.forEach(item1=>{
let arr = this.psxz_tree_data[0].children.filter(item=>item.label==item1[0]);
if(arr.length>0 ){
......@@ -1320,13 +1321,18 @@ export default {
let arrChildren = arr[0].children.filter(item=>item.label==item1[1]);
if( arrChildren.length>0){
idsArr.push(arrChildren[0].id);
this.parameterArr.push({name:arr[0].label,value:arrChildren[0].label})
}
}
}else{
//当前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.$refs.treePsxz.setCheckedKeys(idsArr);
let str = '';
......@@ -1346,6 +1352,7 @@ export default {
dangerouslyUseHTMLString: true,
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