|
@@ -687,27 +687,28 @@
|
|
that.$set(that.resourcesList[index], 'icon', icon);
|
|
that.$set(that.resourcesList[index], 'icon', icon);
|
|
|
|
|
|
})
|
|
})
|
|
-
|
|
|
|
- //数据自动落点开始
|
|
|
|
- let maxCount = 100; //落点数超过这个数的资源不落点
|
|
|
|
- let list = res.data;
|
|
|
|
- let counts = [];
|
|
|
|
- let points = [];
|
|
|
|
- let types = [];
|
|
|
|
- for (let i = 0; i < list.length; i++) { //获取符合要求的类型及数量
|
|
|
|
- if (list[i].num <= maxCount) {
|
|
|
|
- counts.push(list[i].num);
|
|
|
|
- points.push({
|
|
|
|
- "type": list[i].type,
|
|
|
|
- "count": list[i].num
|
|
|
|
- });
|
|
|
|
- types.push(list[i].type);
|
|
|
|
|
|
+ if(that.resourcesList!=null&&that.resourcesList.length>0){
|
|
|
|
+ //数据自动落点开始
|
|
|
|
+ let maxCount = 100; //落点数超过这个数的资源不落点
|
|
|
|
+ let list = res.data;
|
|
|
|
+ let counts = [];
|
|
|
|
+ let points = [];
|
|
|
|
+ let types = [];
|
|
|
|
+ for (let i = 0; i < list.length; i++) { //获取符合要求的类型及数量
|
|
|
|
+ if (list[i].num <= maxCount) {
|
|
|
|
+ counts.push(list[i].num);
|
|
|
|
+ points.push({
|
|
|
|
+ "type": list[i].type,
|
|
|
|
+ "count": list[i].num
|
|
|
|
+ });
|
|
|
|
+ types.push(list[i].type);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+ for (let i = 0; i < types.length; i++) {
|
|
|
|
+ that.indentleftSetMarkers(types[i], '所有');
|
|
|
|
+ }
|
|
|
|
+ //数据自动落点结束
|
|
}
|
|
}
|
|
- for (let i = 0; i < types.length; i++) {
|
|
|
|
- that.indentleftSetMarkers(types[i], '所有');
|
|
|
|
- }
|
|
|
|
- //数据自动落点结束
|
|
|
|
})
|
|
})
|
|
},
|
|
},
|
|
indentleftSetMarkers(resourceTable, name) {
|
|
indentleftSetMarkers(resourceTable, name) {
|