|
@@ -421,16 +421,15 @@ export default {
|
|
|
// 选中table回调
|
|
|
handleSelectionChange(list) {
|
|
|
let arr = [];
|
|
|
- // let newList = this.choiceEquipList.concat(list);
|
|
|
+ // this.choiceEquipList = this.choiceEquipList.concat(...list);
|
|
|
this.choiceEquipList = list;
|
|
|
- // newList = this._.uniqBy(newList, "id");
|
|
|
list.forEach((item) => {
|
|
|
if (arr.length) {
|
|
|
let index = -1;
|
|
|
arr.forEach((aItem) => {
|
|
|
if (aItem.id == item.classCode) {
|
|
|
index = 1;
|
|
|
- aItem.children.push(item);
|
|
|
+ aItem.children.push(_.cloneDeep(item));
|
|
|
aItem.number++;
|
|
|
}
|
|
|
});
|
|
@@ -438,7 +437,7 @@ export default {
|
|
|
let obj = {
|
|
|
id: item.classCode,
|
|
|
title: item.codeName,
|
|
|
- children: [item],
|
|
|
+ children: [_.cloneDeep(item)],
|
|
|
number: 1,
|
|
|
showChildren: true,
|
|
|
};
|
|
@@ -452,7 +451,7 @@ export default {
|
|
|
number: 1,
|
|
|
showChildren: true,
|
|
|
};
|
|
|
- obj.children.push(item);
|
|
|
+ obj.children.push(_.cloneDeep(item));
|
|
|
arr.push(obj);
|
|
|
}
|
|
|
});
|