diff --git a/pages/fourmonitor/pest.vue b/pages/fourmonitor/pest.vue
index 207f89d..48b11d0 100644
--- a/pages/fourmonitor/pest.vue
+++ b/pages/fourmonitor/pest.vue
@@ -9,8 +9,8 @@
运行模式
-
@@ -20,15 +20,15 @@
-
+
- 降雨:{{itemProperty.rs ===null? "--": (itemProperty.rs === "0"?"无雨":"降雨") }}
+ 降雨:{{itemProperty&&itemProperty.rs?(itemProperty.rs === "0"?"无雨":"降雨"): "--" }}
- 光照度:{{itemProperty.il===null?"--":itemProperty.il}}Lux
+ 光照度:{{itemProperty&&itemProperty.il?itemProperty.il:"--"}}Lux
@@ -206,7 +206,7 @@
onLoad(option) {
if (option.item != null) {
this.item = JSON.parse(decodeURIComponent(option.item));
- if (this.item) {
+ if (this.item && this.item.deviceData) {
this.itemProperty = this.item.deviceData;
this.query.deviceCode = this.item.deviceCode;
let topic = "jsy/iot/push/outProduct/" + this.item.deviceCode;
diff --git a/pages/fourmonitor/spore.vue b/pages/fourmonitor/spore.vue
index 1a10d49..2e22f78 100644
--- a/pages/fourmonitor/spore.vue
+++ b/pages/fourmonitor/spore.vue
@@ -8,7 +8,7 @@
运行模式
-
@@ -19,23 +19,23 @@
-
+
- 设备门:{{itemProperty.ss===null?"--":(itemProperty.ss==='1'?"打开":"关闭") }}
+ 设备门:{{itemProperty && itemProperty.ss?(itemProperty.ss==='1'?"打开":"关闭") :"--"}}
- 海拔:{{itemProperty.att===null?"--":itemProperty.att}}m
+ 海拔:{{itemProperty &&itemProperty.att?itemProperty.att:"--"}}m
- 单次采样:{{itemProperty.pl===null?"--":itemProperty.pl}}
+ 单次采样:{{itemProperty && itemProperty.pl?itemProperty.pl:"--"}}
- 累计采样:{{itemProperty.pt===null?"--":itemProperty.pt}}
+ 累计采样:{{itemProperty && itemProperty.pt?itemProperty.pt:"--"}}
@@ -47,27 +47,27 @@
光源
-
采样口
-
吸气口
-
载波电机
-
排气口
-
@@ -77,7 +77,7 @@
-
+
@@ -123,7 +123,7 @@
孢子分析
-
+
@@ -179,7 +179,7 @@
onLoad(option) {
if (option.item != null) {
this.item = JSON.parse(decodeURIComponent(option.item));
- if (this.item) {
+ if (this.item && this.item.deviceData) {
this.itemProperty = this.item.deviceData;
this.query.deviceCode = this.item.deviceCode;
let topic = "jsy/iot/push/outProduct/" + this.item.deviceCode;
diff --git a/pages/fourmonitor/weatherstation.vue b/pages/fourmonitor/weatherstation.vue
index f682556..91f4341 100644
--- a/pages/fourmonitor/weatherstation.vue
+++ b/pages/fourmonitor/weatherstation.vue
@@ -1,60 +1,58 @@
-
-
查看历史
-
+
- 风力:{{itemProperty.wc===null?"--":itemProperty.wc}}级
+ 风力:{{itemProperty && itemProperty.wc?itemProperty.wc:"--"}}级
- 风速:{{itemProperty.ws===null?"--":itemProperty.ws}}m/s
+ 风速:{{itemProperty &&itemProperty.ws?itemProperty.ws:"--"}}m/s
- 风向:{{itemProperty.wd===null?"--":itemProperty.wd}}
+ 风向:{{itemProperty&&itemProperty.wd?itemProperty.wd:"--"}}
- 大气压力:{{itemProperty.p===null?"--":itemProperty.p}}hpa
+ 大气压力:{{itemProperty&&itemProperty.p?itemProperty.p:"--"}}hpa
- 温度:{{itemProperty.t===null?"--":itemProperty.t}}℃
+ 温度:{{itemProperty&&itemProperty.t?itemProperty.t:"--"}}℃
- 湿度:{{itemProperty.h===null?"--":itemProperty.h}}%
+ 湿度:{{itemProperty&&itemProperty.h?itemProperty.h:"--"}}%
- 当前雨量:{{itemProperty.rt===null?"--":itemProperty.rt}}mm
+ 当前雨量:{{itemProperty&&itemProperty.rt?itemProperty.rt:"--"}}mm
- 瞬时雨量:{{itemProperty.ri===null?"--":itemProperty.ri}}mm
+ 瞬时雨量:{{itemProperty&&itemProperty.ri?itemProperty.ri:"--"}}mm
- 累计雨量:{{itemProperty.r===null?"--":itemProperty.r}}mm
+ 累计雨量:{{itemProperty&&itemProperty.r?itemProperty.r:"--"}}mm
- 设备状态:{{itemProperty.s =="online"?"在线":"离线" }}
+ 设备状态:{{item&&item.status =="online"?"在线":"离线" }}
@@ -153,7 +151,7 @@
onLoad(option) {
if (option.item != null) {
this.item = JSON.parse(decodeURIComponent(option.item));
- if (this.item) {
+ if (this.item && this.item.deviceData) {
this.itemProperty = this.item.deviceData;
this.query.deviceCode = this.item.deviceCode;
let topic = "jsy/iot/push/outProduct/" + this.item.deviceCode;
@@ -239,7 +237,10 @@
margin: 10px 0;
color: #39ac4f;
font-weight: bold;
- text:nth-child(2) {min-width: 80px;display: inline-block;
+
+ text:nth-child(2) {
+ min-width: 80px;
+ display: inline-block;
color: #333;
font-weight: normal;
}