dedsudiyu 3 months ago
parent
commit
571f670df8

+ 1 - 1
manifest.json

@@ -54,7 +54,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wxc9180acf05b65dee",
+        "appid" : "wx60e12abd2e79c618",
         "setting" : {
             "urlCheck" : false,
             "minified" : true

+ 2 - 2
pages/api/index.js

@@ -250,8 +250,8 @@ export const securityCheckDangerHazardOneCollect = (data) => {
 export const securityCheckDangerNotHazardOneCollect = (data) => {
 	return apiResquest({
     url: '/security/checkDanger/notHazardOneCollect',
-		method: 'GET',
-		data: data,
+		method: 'POST',
+		data: {...data}
 	})
 };
 //安全隐患-预警处置

+ 24 - 21
pages/views/dataBoard/hazardSources.vue

@@ -59,7 +59,8 @@
 			return {
 				opts: {
 					color: ["#FF8C00", "#0183FA", ],
-					padding: [2, 20, 0, 0],
+					// color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", "#ea7ccc"],
+					padding: [0, 30, 10, 10],
 					enableScroll: false,
 					legend: {
 						position: 'top',
@@ -75,7 +76,6 @@
 					yAxis: {
 						disabled: false,
 						disableGrid: true,
-
 						data: [{
 							type: 'categories',
 							fontColor: '#fff',
@@ -83,12 +83,15 @@
 					},
 					extra: {
 						bar: {
-							type: "stack",
-							width: 20,
+							type: "group",
+							width: 10,
 							meterBorde: 1,
 							meterFillColor: "#FFFFFF",
 							activeBgColor: "#000000",
 							activeBgOpacity: 0.08,
+							linearType: "none",
+							barBorderCircle: true,
+							seriesGap: 2,
 							categoryGap: 2
 						}
 					}
@@ -99,10 +102,10 @@
 					page: 1,
 					pageSize: 10,
 				},
-				hazardTotal:0,
-				newHazard:0,
-				hazardChemicals:0,
-				deviceNum:0,
+				hazardTotal: 0,
+				newHazard: 0,
+				hazardChemicals: 0,
+				deviceNum: 0,
 				column: [{
 						type: 'index',
 						label: '排行',
@@ -162,14 +165,14 @@
 					this.$set(self, 'hazardChemicals', data.data.hazardChemicals);
 					this.$set(self, 'deviceNum', data.data.deviceNum);
 					//列表
-					this.dataList=data.data.hazardTotalSortSubs;
+					this.dataList = data.data.hazardTotalSortSubs;
 					//图表
-					if(data.data.hazardTotalSortSubs[0]){
-						let name=[];
-						let list=[];
-						let list2=[];
-						data.data.hazardTotalSortSubs.forEach(function(item,index){
-							if(index<5){
+					if (data.data.hazardTotalSortSubs[0]) {
+						let name = [];
+						let list = [];
+						let list2 = [];
+						data.data.hazardTotalSortSubs.forEach(function(item, index) {
+							if (index < 5) {
 								name.push(item.deptSortName)
 								list.push(item.chemical)
 								list2.push(item.coolHotdevice)
@@ -191,10 +194,10 @@
 						};
 						this.chartData = JSON.parse(JSON.stringify(res));
 					}
-					
+
 				}
-			},	
-			
+			},
+
 		},
 	}
 </script>
@@ -229,7 +232,7 @@
 
 		.chart {
 			width: 690rpx;
-			height: 400rpx;
+			height: 560rpx;
 			background: #3E414F;
 			border-radius: 20rpx 20rpx 20rpx 20rpx;
 			padding: 34rpx 30rpx 26rpx;
@@ -237,7 +240,7 @@
 
 			.chart-b {
 				width: 630rpx;
-				height: 344rpx;
+				height: 500rpx;
 			}
 		}
 
@@ -384,4 +387,4 @@
 			}
 		}
 	}
-</style>
+</style>

+ 5 - 2
pages/views/dataBoard/securityHidden.vue

@@ -135,7 +135,6 @@
 						disableGrid: false,
 						min: 0,
 						axisLine: false,
-						max: 40
 					},
 					yAxis: {},
 					extra: {
@@ -442,9 +441,13 @@
 			//暂无法整改
 			async securityCheckDangerNotHazardOneCollect(planId) {
 				let self = this;
+				let obj = {
+					rectifyStatus:4,
+					planId:planId
+				};
 				const {
 					data
-				} = await securityCheckDangerNotHazardOneCollect({'type':'-1','planId':planId});
+				} = await securityCheckDangerNotHazardOneCollect(obj);
 				if (data.code == 200) {
 					//列表
 					this.dataListTow=data.data.head;

+ 129 - 75
pages/views/dataBoard/warningDispose.vue

@@ -34,8 +34,11 @@
 				<view class="line"></view>
 				<view class="statistics-b-li">
 					<view class="statistics-b-li-t-tow">
-						<text class="color-B">{{rate}}%</text>
-						<img src="@/pages/images/dataBoard/dataBoard-icon3.png">
+						<text
+							:class="rateType == 0?'color-C':(rateType == 1?'color-B':(rateType == 2?'color-A':''))">{{rate}}</text>
+						<img src="@/pages/images/dataBoard/dataBoard-icon2.png" style="margin-left:10rpx;" v-if="rateType == 2">
+						<img src="@/pages/images/dataBoard/dataBoard-icon3.png" style="margin-left:10rpx;transform: rotate(180deg);"
+							v-if="rateType == 1">
 					</view>
 					<view class="statistics-b-li-b">环比增长</view>
 				</view>
@@ -44,7 +47,8 @@
 		<view class="table">
 			<uni-card>
 				<view style="height: 400px">
-					<zb-table :columns="column" :stripe="false" :border="false" :data="dataList"></zb-table>
+					<zb-table :cell-style="handleStyle" :columns="column" :stripe="false" :border="false"
+						:data="dataList"></zb-table>
 				</view>
 			</uni-card>
 		</view>
@@ -114,6 +118,7 @@
 				todayTotal: 0,
 				yesterdayTotal: 0,
 				rate: 0,
+				rateType: 0,
 			}
 		},
 		created() {
@@ -126,6 +131,24 @@
 			this.getCurrentDate();
 		},
 		methods: {
+			handleStyle(val) {
+				if (val.column.name == 'rate') {
+					console.log('val======>', val.row);
+					if (val.row.rate.indexOf('-') != -1) {
+						return {
+							'color': '#2EA805',
+						}
+					} else if (val.row.rate.indexOf('+') != -1){
+						return {
+							'color': '#FF0000',
+						}
+					}else {
+						return {
+							'color': '#FFFFFF',
+						}
+					}
+				}
+			},
 			dateClick(index) {
 				this.dateIndex = index;
 				this.reportAppStatisticsWarningHandle();
@@ -157,18 +180,18 @@
 						dayOfWeek: weekdays[nextDate.getDay()],
 						dayOfWeekTow: weekdaysTow[nextDate.getDay()],
 					});
-					
+
 				}
-				
+
 				// 输出接下来一周的每天日期和星期
 				for (let i = 0; i < 7; i++) {
-						this.dateList.push({
-							num:nextDays[i].dayOfWeekTow,
-							letterNUm:nextDays[i].dayOfWeek,
-							format:nextDays[i].year + "-" + nextDays[i].month + "-" + nextDays[i].date
-						})
+					this.dateList.push({
+						num: nextDays[i].dayOfWeekTow,
+						letterNUm: nextDays[i].dayOfWeek,
+						format: nextDays[i].year + "-" + nextDays[i].month + "-" + nextDays[i].date
+					})
 				}
-				this.dateList=this.dateList.reverse();
+				this.dateList = this.dateList.reverse();
 				this.reportAppStatisticsWarningHandle();
 			},
 			//预警处置
@@ -184,6 +207,13 @@
 					this.dataList = data.data.warningScatterList;
 					this.$set(self, 'todayTotal', data.data.warning.todayTotal);
 					this.$set(self, 'yesterdayTotal', data.data.warning.yesterdayTotal);
+					if (data.data.warning.rate.indexOf('-') != -1) {
+						this.$set(self, 'rateType', 1);
+					} else if (data.data.warning.rate.indexOf('+') != -1) {
+						this.$set(self, 'rateType', 2);
+					} else {
+						this.$set(self, 'rateType', 0);
+					}
 					this.$set(self, 'rate', data.data.warning.rate);
 				}
 			},
@@ -307,89 +337,110 @@
 						}
 
 					}
-					.chart-b-li:nth-child(1){
-						top:20rpx;
-						left:30rpx;
+
+					.chart-b-li:nth-child(1) {
+						top: 20rpx;
+						left: 30rpx;
 					}
-					.chart-b-li:nth-child(2){
-						top:20rpx;
-						left:260rpx;
+
+					.chart-b-li:nth-child(2) {
+						top: 20rpx;
+						left: 260rpx;
 					}
-					.chart-b-li:nth-child(3){
-						top:20rpx;
-						left:490rpx;
+
+					.chart-b-li:nth-child(3) {
+						top: 20rpx;
+						left: 490rpx;
 					}
-					.chart-b-li:nth-child(4){
-						top:80rpx;
-						left:30rpx;
+
+					.chart-b-li:nth-child(4) {
+						top: 80rpx;
+						left: 30rpx;
 					}
-					.chart-b-li:nth-child(5){
-						top:80rpx;
-						left:260rpx;
+
+					.chart-b-li:nth-child(5) {
+						top: 80rpx;
+						left: 260rpx;
 					}
-					.chart-b-li:nth-child(6){
-						top:80rpx;
-						left:490rpx;
+
+					.chart-b-li:nth-child(6) {
+						top: 80rpx;
+						left: 490rpx;
 					}
-					.chart-b-li:nth-child(7){
-						top:140rpx;
-						left:30rpx;
+
+					.chart-b-li:nth-child(7) {
+						top: 140rpx;
+						left: 30rpx;
 					}
-					.chart-b-li:nth-child(8){
-						top:140rpx;
-						left:260rpx;
+
+					.chart-b-li:nth-child(8) {
+						top: 140rpx;
+						left: 260rpx;
 					}
-					.chart-b-li:nth-child(9){
-						top:140rpx;
-						left:490rpx;
+
+					.chart-b-li:nth-child(9) {
+						top: 140rpx;
+						left: 490rpx;
 					}
-					.chart-b-li:nth-child(10){
-						top:200rpx;
-						left:30rpx;
+
+					.chart-b-li:nth-child(10) {
+						top: 200rpx;
+						left: 30rpx;
 					}
-					.chart-b-li:nth-child(11){
-						top:200rpx;
-						left:260rpx;
+
+					.chart-b-li:nth-child(11) {
+						top: 200rpx;
+						left: 260rpx;
 					}
-					.chart-b-li:nth-child(12){
-						top:200rpx;
-						left:490rpx;
+
+					.chart-b-li:nth-child(12) {
+						top: 200rpx;
+						left: 490rpx;
 					}
-					.chart-b-li:nth-child(13){
-						top:260rpx;
-						left:30rpx;
+
+					.chart-b-li:nth-child(13) {
+						top: 260rpx;
+						left: 30rpx;
 					}
-					.chart-b-li:nth-child(14){
-						top:260rpx;
-						left:260rpx;
+
+					.chart-b-li:nth-child(14) {
+						top: 260rpx;
+						left: 260rpx;
 					}
-					.chart-b-li:nth-child(15){
-						top:260rpx;
-						left:490rpx;
+
+					.chart-b-li:nth-child(15) {
+						top: 260rpx;
+						left: 490rpx;
 					}
-					.chart-b-li:nth-child(16){
-						top:320rpx;
-						left:30rpx;
+
+					.chart-b-li:nth-child(16) {
+						top: 320rpx;
+						left: 30rpx;
 					}
-					.chart-b-li:nth-child(17){
-						top:320rpx;
-						left:260rpx;
+
+					.chart-b-li:nth-child(17) {
+						top: 320rpx;
+						left: 260rpx;
 					}
-					.chart-b-li:nth-child(18){
-						top:320rpx;
-						left:490rpx;
+
+					.chart-b-li:nth-child(18) {
+						top: 320rpx;
+						left: 490rpx;
 					}
-					.chart-b-li:nth-child(19){
-						top:380rpx;
-						left:30rpx;
+
+					.chart-b-li:nth-child(19) {
+						top: 380rpx;
+						left: 30rpx;
 					}
-					.chart-b-li:nth-child(20){
-						top:380rpx;
-						left:260rpx;
+
+					.chart-b-li:nth-child(20) {
+						top: 380rpx;
+						left: 260rpx;
 					}
-					.chart-b-li:nth-child(21){
-						top:380rpx;
-						left:490rpx;
+
+					.chart-b-li:nth-child(21) {
+						top: 380rpx;
+						left: 490rpx;
 					}
 				}
 			}
@@ -445,6 +496,9 @@
 					.color-B {
 						color: #2EA805;
 					}
+					.color-C {
+						color: #FFFFFF;
+					}
 
 
 					.statistics-b-li-b {
@@ -472,4 +526,4 @@
 			margin-left: 30rpx;
 		}
 	}
-</style>
+</style>