Sfoglia il codice sorgente

气象站设备状态

zhangsijie 1 anno fa
parent
commit
0c16d46d31
1 ha cambiato i file con 13 aggiunte e 12 eliminazioni
  1. 13 12
      pages/prevention/equipmentdetails.vue

+ 13 - 12
pages/prevention/equipmentdetails.vue

@@ -88,7 +88,7 @@
 				this.olddatas = [{
 						icon: '/image/cb/icon02.png',
 						txt: '设备开关',
-						value: Number(this.olddata.ds) == 1 ? '开机' : "关机",
+						value: this.olddata.ds,
 					},
 					{
 						icon: '/image/cb/icon05.png',
@@ -123,11 +123,11 @@
 					}, {
 						icon: '/image/prevention/101.png',
 						txt: '雨控状态',
-						value: Number(this.olddata.rps) == 1 ? "雨控" : '正常'
+						value: this.olddata.rps
 					}, {
 						icon: '/image/prevention/102.png',
 						txt: '温控状态',
-						value: Number(this.olddata.tps) == 1 ? "温控" : '正常'
+						value: this.olddata.tps
 					},
 					{
 						icon: '/image/prevention/105.png',
@@ -137,7 +137,7 @@
 					{
 						icon: '/image/prevention/106.png',
 						txt: '电池电压',
-						value: Number(this.olddata.bv)
+						value: this.olddata.bv
 					}
 				]
 			},
@@ -157,14 +157,15 @@
 				this.dataloadingtf = false
 				if (res.data.length != 0) {
 					this.olddata = res.data[0].d_h_t
-					this.newdatesTF = true
-					if (Number(this.olddata.ws) == 0) {
-						this.work = "待机"
-					} else if (Number(this.olddata.ws) == 1) {
-						this.work = "工作"
-					} else {
-						this.work = "充电"
-					}
+					this.newdatesTF = true;
+					this.work = this.olddata.ws;
+					// if (Number(this.olddata.ws) == 0) {
+					// 	this.work = "待机"
+					// } else if (Number(this.olddata.ws) == 1) {
+					// 	this.work = "工作"
+					// } else {
+					// 	this.work = "充电"
+					// }
 				} else {
 					this.newdatesTF = false
 				}