Просмотр исходного кода

载玻片为空+测报灯状态展示+杀虫灯折线缩放

yf_zd 5 лет назад
Родитель
Сommit
c34b121527

+ 3 - 2
bigdata2/src/components/DateSearch/index.vue

@@ -69,8 +69,9 @@ export default {
 					new Date(this.timeRange[1]).getTime() / 1000
 				)
 			} else {
-				this.queryInfo.begin = ''
-				this.queryInfo.end = ''
+				this.btnSelected = 2
+				this.queryInfo.begin = parseInt((Date.now() - 24 * 3600000 * 30) / 1000)
+				this.queryInfo.end = parseInt(Date.now() / 1000)
             }
             this.$emit('dateChange',this.queryInfo)
 		}

+ 1 - 1
bigdata2/src/components/Home.vue

@@ -22,7 +22,7 @@ export default {
     data() {
       return {
         loginInfo: {
-          password:'yf6543210',
+          password:'hyl123456',
           username:'admin',
           brand1:'remember'
         },

+ 7 - 1
bigdata2/src/pages/cure/scd/scdDetail.vue

@@ -3,7 +3,7 @@
 		<el-breadcrumb separator-class="el-icon-arrow-right">
 			<el-breadcrumb-item>防治系统</el-breadcrumb-item>
 			<el-breadcrumb-item :to="{ path: '/index/scd' }">杀虫灯</el-breadcrumb-item>
-			<el-breadcrumb-item>害虫统计</el-breadcrumb-item>
+			<el-breadcrumb-item>数据详情</el-breadcrumb-item>
 		</el-breadcrumb>
 		<div class="equipInfo">
 			<div class="equipMsg">
@@ -184,6 +184,9 @@ export default {
 							])
 						}
 						this.options = {
+							chart: {
+								zoomType: 'x'
+							},
 							title: {
 								text: '环境温湿度',
 								align: 'left'
@@ -263,6 +266,9 @@ export default {
 						}
 
 						this.options2 = {
+							chart: {
+								zoomType: 'x'
+							},
 							title: {
 								text: '击虫次数',
 								align: 'left'

+ 10 - 2
bigdata2/src/pages/forecasting/bzy/Bzy.vue

@@ -554,8 +554,16 @@ export default {
 			}).then((res) => {
 				if (res.status == 200) {
 					let data = res.data
-					var glass = data.glass.split('#')
-					var liquid = data.liquid.split('#')
+					if(glass){
+						var glass = data.glass.split('#')
+					}else{
+						var glass = ''
+					}
+					if(liquid){
+						var liquid = data.liquid.split('#')
+					}else{
+						var liquid = ''
+					}
 					let glass_slide_time = new Date(glass[glass.length-1]).getTime()
 					let cultivate_time = new Date(liquid[liquid.length-1]).getTime()
 					this.time.time01 = glass_slide_time ? glass_slide_time : ''

+ 1 - 2
bigdata2/src/pages/forecasting/cbd/DataDetails.vue

@@ -701,10 +701,9 @@ export default {
 }
 .equipStatus {
 	display: flex;
-	justify-content: center;
 	margin: 10px 0;
 	.equipIcon {
-		margin-right: 14%;
+		margin: 0 10%;
 	}
 	.equipParams {
 		min-width: 80px;

+ 7 - 2
bigdata2/src/pages/forecasting/cbd/PestsStats.vue

@@ -270,6 +270,7 @@ export default {
 								this.currWorm = worm
 								this.currKind = kind
 								this.chartLineInit(atData,ahData,worm[0],this.allPest[kind[0]])
+								this.chartsShow = true;
 								this.viewSwitch2 = this.allPest[kind[0]]
 								var drawPieChartData = [];
 								// 饼状图
@@ -287,6 +288,7 @@ export default {
 									}
 									if (ss == worm.length - 1) {
 										this.chartPieInit(drawPieChartData)
+										this.chartsShowA = true;
 									}
 								}
 							}
@@ -294,6 +296,8 @@ export default {
 					} else {
 						this.chartLineInit([],[],[],'')
 						this.chartPieInit([])
+						this.chartsShow = false;
+						this.chartsShowA = false;
 					}
 				}
 			}
@@ -302,6 +306,8 @@ export default {
 			if (data.dat1.length == 0) {
 				this.chartLineInit([],[],[],'')
 				this.chartPieInit([])
+				this.chartsShow = false;
+				this.chartsShowA = false;
 			}
 		},
 		// 返回时间戳
@@ -563,10 +569,9 @@ export default {
 }
 .equipStatus {
 	display: flex;
-	justify-content: center;
 	margin: 10px 0;
 	.equipIcon {
-		margin-right: 14%;
+		margin: 0 10%;
 	}
 	.equipParams {
 		min-width: 80px;