|
@@ -232,14 +232,15 @@
|
|
|
const lists = [];
|
|
|
let arr = [];
|
|
|
arr = JSON.parse(JSON.stringify(this.arrList))
|
|
|
+ console.log(arr);
|
|
|
arr.map(item => {
|
|
|
- if (item.wzjc) {
|
|
|
- lists.push({id: item.location || item.assetnum, name: item.wzjc || item.sbjc, type: 'Zone'})
|
|
|
+ if (item.type=='Zone') {
|
|
|
+ lists.push({id: item.location, name: item.wzjc , type: 'Zone'})
|
|
|
}
|
|
|
- if (item.sbjc) {
|
|
|
+ if (item.type=='Image') {
|
|
|
lists.push({
|
|
|
- id: item.location || item.assetnum,
|
|
|
- name: item.wzjc || item.sbjc,
|
|
|
+ id: item.assetnum,
|
|
|
+ name: item.sbjc,
|
|
|
type: 'Image'
|
|
|
})
|
|
|
}
|
|
@@ -256,11 +257,11 @@
|
|
|
console.log(this.selectList);
|
|
|
arr = JSON.parse(JSON.stringify(this.selectList))
|
|
|
arr.map(item => {
|
|
|
- if (item.wzjc) {
|
|
|
- lists.push({id: item.location || item.assetnum, name: item.wzjc || item.sbjc, type: 'Zone'})
|
|
|
+ if (item.type=='Zone') {
|
|
|
+ lists.push({id: item.location , name: item.wzjc , type: 'Zone'})
|
|
|
}
|
|
|
- if (item.sbjc) {
|
|
|
- lists.push({id: item.location || item.assetnum, name: item.wzjc || item.sbjc, type: 'Image'})
|
|
|
+ if (item.type=='Image') {
|
|
|
+ lists.push({id: item.assetnum, name: item.sbjc, type: 'Image'})
|
|
|
}
|
|
|
|
|
|
})
|
|
@@ -587,6 +588,7 @@
|
|
|
item.children = item.data;
|
|
|
item.open = false;
|
|
|
item.checked = 'unchecked';
|
|
|
+ item.type='Image';
|
|
|
if (item.children) {
|
|
|
recursion(item.children);
|
|
|
}
|
|
@@ -634,6 +636,7 @@
|
|
|
newObj.map(item => {
|
|
|
item.label = item.name;
|
|
|
item.checked = 'unchecked';
|
|
|
+ item.type='Zone';
|
|
|
if (item.children) {
|
|
|
recursion(item.children);
|
|
|
}
|
|
@@ -663,6 +666,7 @@
|
|
|
this.selectedRowKeys.push(item.location || item.assetnum)
|
|
|
})
|
|
|
this.arrList = JSON.parse(JSON.stringify(this.attrCards));
|
|
|
+ console.log(this.arrList);
|
|
|
this.selectList = JSON.parse(JSON.stringify(this.attrCards));
|
|
|
} else {
|
|
|
this.selectedRowKeys = [];
|