dedsudiyu 3 months ago
parent
commit
6f58a72269

+ 3 - 3
pages/views/dataBoard/hazardSources.vue

@@ -118,17 +118,17 @@
 						align: 'center',
 					},
 					{
-						name: 'totalNumber',
+						name: 'total',
 						label: '总数',
 						align: 'center',
 					},
 					{
-						name: 'newTotal',
+						name: 'chemical',
 						label: '危化品数',
 						align: 'center',
 					},
 					{
-						name: 'todayAdded',
+						name: 'coolHotdevice',
 						label: '冷热设备数',
 						align: 'center',
 					},

+ 30 - 22
pages/views/dataBoard/hazardousChemicals.vue

@@ -87,10 +87,10 @@
 					}
 				},
 				chartData: {},
-				totalNumber:0,
-				totalAmount:0,
-				newTotal:0,
-				todayAdded:0,
+				totalNumber: 0,
+				totalAmount: 0,
+				newTotal: 0,
+				todayAdded: 0,
 				// 查询参数
 				queryParams: {
 					page: 1,
@@ -116,12 +116,12 @@
 						align: 'center',
 					},
 					{
-						name: 'newTotal',
+						name: 'totalAmount',
 						label: '总量',
 						align: 'center',
 					},
 					{
-						name: 'todayAdded',
+						name: 'newData',
 						label: '今日新增',
 						align: 'center',
 					},
@@ -154,31 +154,39 @@
 					this.$set(self, 'newTotal', data.data.newTotal);
 					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({
-								"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 = {
 							series: [{
-								data:list
+								data: list
 							}]
 						};
 						this.chartData = JSON.parse(JSON.stringify(res));
+						this.dataList = newList;
 					}
-					
+
 				}
-			},	
-			
+			},
+
 		},
 	}
 </script>
@@ -223,7 +231,7 @@
 			.chart-t {
 				width: 650rpx;
 				height: 452rpx;
-				margin-bottom:20rpx;
+				margin-bottom: 20rpx;
 			}
 
 			.chart-b {
@@ -392,4 +400,4 @@
 			overflow: hidden;
 		}
 	}
-</style>
+</style>

+ 10 - 6
pages/views/dataBoard/labPage.vue

@@ -200,18 +200,22 @@
 					let list3 = []; //检查次数
 					let list4 = []; //超期设备数
 					date = data.data.dateList
-					// data.data.experimentList.forEach(function(item) {
-					// 	list.push(item.num)
-					// })
+					// 实验人数
+					data.data.experimentList.forEach(function(item) {
+						list.push(item.num)
+					})
+					// 值班
 					data.data.dutyList.forEach(function(item) {
 						list2.push(item.num)
 					})
+					// 检查
 					data.data.checkList.forEach(function(item) {
 						list3.push(item.num)
 					})
-					data.data.deviceList.forEach(function(item) {
-						list4.push(item.num)
-					})
+					// 超期设备
+					// data.data.deviceList.forEach(function(item) {
+					// 	list4.push(item.num)
+					// })
 					let res = {
 						categories: date,
 						series: [{