|
@@ -483,24 +483,30 @@
|
|
|
selectedRows.map(item => {
|
|
|
item.type = this.typeEdit;
|
|
|
})
|
|
|
+
|
|
|
+ console.log(selectedRows);
|
|
|
this.arrList = [...this.arrList, ...selectedRows]
|
|
|
+ console.log(this.arrList);
|
|
|
const obj = {}
|
|
|
- if (this.typeEdit == 'Zone') {
|
|
|
+ // console.log(this.typeEdit);
|
|
|
+ // if (this.typeEdit == 'Zone') {
|
|
|
this.arrList = this.arrList.reduce(function (item, next) {
|
|
|
- obj[next.location] ? ' ' : obj[next.location] = true && item.push(next)
|
|
|
+ obj[next.location||next.assetnum] ? ' ' : obj[next.location||next.assetnum] = true && item.push(next)
|
|
|
|
|
|
return item;
|
|
|
|
|
|
}, [])
|
|
|
- } else {
|
|
|
- this.arrList = this.arrList.reduce(function (item, next) {
|
|
|
- obj[next.assetnum] ? ' ' : obj[next.assetnum] = true && item.push(next)
|
|
|
-
|
|
|
- return item;
|
|
|
-
|
|
|
- }, [])
|
|
|
- }
|
|
|
-
|
|
|
+ // console.log(this.arrList);
|
|
|
+ // } else {
|
|
|
+ // this.arrList = this.arrList.reduce(function (item, next) {
|
|
|
+ // obj[next.assetnum] ? ' ' : obj[next.assetnum] = true && item.push(next)
|
|
|
+ //
|
|
|
+ // return item;
|
|
|
+ //
|
|
|
+ // }, [])
|
|
|
+ // console.log(this.arrList);
|
|
|
+ // }
|
|
|
+ console.log(this.arrList);
|
|
|
},
|
|
|
//右侧删除
|
|
|
deleteItem(item, index) {
|