trsfromData(data,chidlren) {
const targetData = data;
function flat(dataObj) {
return reduce(dataObj, (result, item) => {
result.push(item);
if (item[chidlren]) {
result = result.concat(flat(item[chidlren]));
}
return result;
}, []);
}
return flat(targetData);
},
},
trsfromData(data,chidlren) {
let flat=(data)=>reduce(data,(result,v)=>{
result[v.paramCode]=v
if(v[chidlren]){
Object.assign(result,flat(v[chidlren]))
}
return result
},{})
return flat(this.items)
},