|
@@ -156,6 +156,7 @@
|
|
//列表
|
|
//列表
|
|
let newList = [];
|
|
let newList = [];
|
|
//图表
|
|
//图表
|
|
|
|
+ let res = {}
|
|
if (data.data.chemicalStockSubs[0]) {
|
|
if (data.data.chemicalStockSubs[0]) {
|
|
let list = [];
|
|
let list = [];
|
|
data.data.chemicalStockSubs.forEach(function(item, index) {
|
|
data.data.chemicalStockSubs.forEach(function(item, index) {
|
|
@@ -175,13 +176,28 @@
|
|
newData:item.newTotal+'/'+item.todayAdded+'kg',
|
|
newData:item.newTotal+'/'+item.todayAdded+'kg',
|
|
})
|
|
})
|
|
})
|
|
})
|
|
- let res = {
|
|
|
|
|
|
+ res = {
|
|
series: [{
|
|
series: [{
|
|
data: list
|
|
data: list
|
|
}]
|
|
}]
|
|
};
|
|
};
|
|
this.chartData = JSON.parse(JSON.stringify(res));
|
|
this.chartData = JSON.parse(JSON.stringify(res));
|
|
this.dataList = newList;
|
|
this.dataList = newList;
|
|
|
|
+ }else{
|
|
|
|
+ res = {
|
|
|
|
+ series: [{
|
|
|
|
+ data: [
|
|
|
|
+ {
|
|
|
|
+ "name": '暂无数据',
|
|
|
|
+ "value": 0,
|
|
|
|
+ "labelText": "总量" + 0 + 'kg',
|
|
|
|
+ "textColor": "#fff",
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ }]
|
|
|
|
+ };
|
|
|
|
+ this.chartData = JSON.parse(JSON.stringify(res));
|
|
|
|
+ this.dataList = [];
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|