|
@@ -87,10 +87,10 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
chartData: {},
|
|
chartData: {},
|
|
- totalNumber:0,
|
|
|
|
- totalAmount:0,
|
|
|
|
- newTotal:0,
|
|
|
|
- todayAdded:0,
|
|
|
|
|
|
+ totalNumber: 0,
|
|
|
|
+ totalAmount: 0,
|
|
|
|
+ newTotal: 0,
|
|
|
|
+ todayAdded: 0,
|
|
// 查询参数
|
|
// 查询参数
|
|
queryParams: {
|
|
queryParams: {
|
|
page: 1,
|
|
page: 1,
|
|
@@ -116,12 +116,12 @@
|
|
align: 'center',
|
|
align: 'center',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- name: 'newTotal',
|
|
|
|
|
|
+ name: 'totalAmount',
|
|
label: '总量',
|
|
label: '总量',
|
|
align: 'center',
|
|
align: 'center',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- name: 'todayAdded',
|
|
|
|
|
|
+ name: 'newData',
|
|
label: '今日新增',
|
|
label: '今日新增',
|
|
align: 'center',
|
|
align: 'center',
|
|
},
|
|
},
|
|
@@ -154,31 +154,39 @@
|
|
this.$set(self, 'newTotal', data.data.newTotal);
|
|
this.$set(self, 'newTotal', data.data.newTotal);
|
|
this.$set(self, 'todayAdded', data.data.todayAdded);
|
|
this.$set(self, 'todayAdded', data.data.todayAdded);
|
|
//列表
|
|
//列表
|
|
- this.dataList=data.data.chemicalStockSubs;
|
|
|
|
|
|
+ let newList = [];
|
|
//图表
|
|
//图表
|
|
- if(data.data.chemicalStockSubs[0]){
|
|
|
|
- let list=[];
|
|
|
|
- data.data.chemicalStockSubs.forEach(function(item,index){
|
|
|
|
- if(index<5){
|
|
|
|
|
|
+ if (data.data.chemicalStockSubs[0]) {
|
|
|
|
+ let list = [];
|
|
|
|
+ data.data.chemicalStockSubs.forEach(function(item, index) {
|
|
|
|
+ if (index < 5) {
|
|
list.push({
|
|
list.push({
|
|
- "name": item.deptSortName,
|
|
|
|
- "value": item.totalNumber,
|
|
|
|
- "labelText": "总量"+item.totalNumber+'kg',
|
|
|
|
- "textColor": "#fff",
|
|
|
|
- })
|
|
|
|
|
|
+ "name": item.deptSortName,
|
|
|
|
+ "value": item.totalNumber,
|
|
|
|
+ "labelText": "总量" + item.totalNumber + 'kg',
|
|
|
|
+ "textColor": "#fff",
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
+ newList.push({
|
|
|
|
+ deptSortName:item.deptSortName,
|
|
|
|
+ totalNumber:item.totalNumber,
|
|
|
|
+ totalAmount:item.totalAmount+'kg',
|
|
|
|
+ newTotal:item.newTotal,
|
|
|
|
+ newData:item.newTotal+'/'+item.todayAdded+'kg',
|
|
|
|
+ })
|
|
})
|
|
})
|
|
let res = {
|
|
let res = {
|
|
series: [{
|
|
series: [{
|
|
- data:list
|
|
|
|
|
|
+ data: list
|
|
}]
|
|
}]
|
|
};
|
|
};
|
|
this.chartData = JSON.parse(JSON.stringify(res));
|
|
this.chartData = JSON.parse(JSON.stringify(res));
|
|
|
|
+ this.dataList = newList;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
- },
|
|
|
|
-
|
|
|
|
|
|
+ },
|
|
|
|
+
|
|
},
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
@@ -223,7 +231,7 @@
|
|
.chart-t {
|
|
.chart-t {
|
|
width: 650rpx;
|
|
width: 650rpx;
|
|
height: 452rpx;
|
|
height: 452rpx;
|
|
- margin-bottom:20rpx;
|
|
|
|
|
|
+ margin-bottom: 20rpx;
|
|
}
|
|
}
|
|
|
|
|
|
.chart-b {
|
|
.chart-b {
|
|
@@ -392,4 +400,4 @@
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-</style>
|
|
|
|
|
|
+</style>
|