修改农情
This commit is contained in:
parent
6811d8f899
commit
6d6eba39bb
@ -9,8 +9,8 @@
|
||||
<view>运行模式</view>
|
||||
</view>
|
||||
<view style="margin-left: 10px;">
|
||||
<u-button :text="`${itemProperty.m == '1'? '自动':'手动'}`"
|
||||
:type="`${itemProperty.m == '1'? 'success':'warning'}`"
|
||||
<u-button :text="`${itemProperty?(itemProperty.m == '1'? '自动':'手动'):'--' }`"
|
||||
:type="`${itemProperty&&itemProperty.m == '1'? 'success':'warning'}`"
|
||||
@click="controlHeadSwitch(item,itemProperty.m,'m')"></u-button>
|
||||
</view>
|
||||
</view>
|
||||
@ -20,15 +20,15 @@
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="cards-content">
|
||||
<view class="txt-list" @click="taskdetails">
|
||||
<view class="txt-list" >
|
||||
<view class="list2">
|
||||
<view>
|
||||
<image src="/static/images/head/worm_rain.png"></image>
|
||||
<text>降雨:</text>{{itemProperty.rs ===null? "--": (itemProperty.rs === "0"?"无雨":"降雨") }}
|
||||
<text>降雨:</text>{{itemProperty&&itemProperty.rs?(itemProperty.rs === "0"?"无雨":"降雨"): "--" }}
|
||||
</view>
|
||||
<view>
|
||||
<image src="/static/images/head/worm_illu.png"></image>
|
||||
<text>光照度:</text>{{itemProperty.il===null?"--":itemProperty.il}}Lux
|
||||
<text>光照度:</text>{{itemProperty&&itemProperty.il?itemProperty.il:"--"}}Lux
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -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;
|
||||
|
@ -8,7 +8,7 @@
|
||||
<view>运行模式</view>
|
||||
</view>
|
||||
<view style="margin-left: 10px;">
|
||||
<u-button :text="`${itemProperty.m == '1'? '自动':'手动'}`"
|
||||
<u-button :text="`${itemProperty?(itemProperty.m == '1'? '自动':'手动'):'--' }`"
|
||||
:type="`${itemProperty.m == '1'? 'success':'warning'}`"
|
||||
@click="controlHeadSwitch(item,itemProperty.m,'m')"></u-button>
|
||||
</view>
|
||||
@ -19,23 +19,23 @@
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="cards-content">
|
||||
<view class="txt-list" @click="taskdetails">
|
||||
<view class="txt-list" >
|
||||
<view class="list2">
|
||||
<view>
|
||||
<text class="iconfont icon-men icon"></text>
|
||||
<text>设备门:</text>{{itemProperty.ss===null?"--":(itemProperty.ss==='1'?"打开":"关闭") }}
|
||||
<text>设备门:</text>{{itemProperty && itemProperty.ss?(itemProperty.ss==='1'?"打开":"关闭") :"--"}}
|
||||
</view>
|
||||
<view>
|
||||
<text class="iconfont icon-haiba icon"></text>
|
||||
<text>海拔:</text>{{itemProperty.att===null?"--":itemProperty.att}}m
|
||||
<text>海拔:</text>{{itemProperty &&itemProperty.att?itemProperty.att:"--"}}m
|
||||
</view>
|
||||
<view>
|
||||
<text class="iconfont icon-caiyangdengji icon"></text>
|
||||
<text>单次采样:</text>{{itemProperty.pl===null?"--":itemProperty.pl}}
|
||||
<text>单次采样:</text>{{itemProperty && itemProperty.pl?itemProperty.pl:"--"}}
|
||||
</view>
|
||||
<view>
|
||||
<text class="iconfont icon-qiancaiyang icon"></text>
|
||||
<text>累计采样:</text>{{itemProperty.pt===null?"--":itemProperty.pt}}
|
||||
<text>累计采样:</text>{{itemProperty && itemProperty.pt?itemProperty.pt:"--"}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -47,27 +47,27 @@
|
||||
<view class="grid">
|
||||
<view>
|
||||
<text class="text">光源</text>
|
||||
<u-button type="success" :text="`${itemProperty.ias == '1'? '打开':'关闭'}`" :class="[itemProperty.ias === '1' ? 'bg-green':'bg-red']"
|
||||
<u-button type="success" :text="`${itemProperty && itemProperty.ias == '1'? '打开':'关闭'}`" :class="[itemProperty &&itemProperty.ias === '1' ? 'bg-green':'bg-red']"
|
||||
@click="controlHeadSwitch(item,itemProperty.ias,'ias')" />
|
||||
</view>
|
||||
<view>
|
||||
<text class="text">采样口</text>
|
||||
<u-button type="success" :text="`${itemProperty.sls == '1'? '打开':'关闭'}`" :class="[itemProperty.sls === '1' ? 'bg-green':'bg-red']"
|
||||
<u-button type="success" :text="`${itemProperty && itemProperty.sls == '1'? '打开':'关闭'}`" :class="[itemProperty && itemProperty.sls === '1' ? 'bg-green':'bg-red']"
|
||||
@click="controlHeadSwitch(item,itemProperty.sls,'sls')" />
|
||||
</view>
|
||||
<view>
|
||||
<text class="text">吸气口</text>
|
||||
<u-button type="success" :text="`${itemProperty.ais == '1'? '打开':'关闭'}`" :class="[itemProperty.ais === '1' ? 'bg-green':'bg-red']"
|
||||
<u-button type="success" :text="`${itemProperty && itemProperty.ais == '1'? '打开':'关闭'}`" :class="[itemProperty && itemProperty.ais === '1' ? 'bg-green':'bg-red']"
|
||||
@click="controlHeadSwitch(item,itemProperty.ais,'ais')" />
|
||||
</view>
|
||||
<view>
|
||||
<text class="text">载波电机</text>
|
||||
<u-button type="success" :text="`${itemProperty.zbs == '1'? '运行':'停止'}`" :class="[itemProperty.zbs === '1' ? 'bg-green':'bg-red']"
|
||||
<u-button type="success" :text="`${itemProperty && itemProperty.zbs == '1'? '运行':'停止'}`" :class="[itemProperty && itemProperty.zbs === '1' ? 'bg-green':'bg-red']"
|
||||
@click="controlHeadSwitch(item,itemProperty.zbs,'zbs')" />
|
||||
</view>
|
||||
<view>
|
||||
<text class="text">排气口</text>
|
||||
<u-button type="success" :text="`${itemProperty.bwa == '1'? '打开':'关闭'}`" :class="[itemProperty.bwa === '1' ? 'bg-green':'bg-red']"
|
||||
<u-button type="success" :text="`${itemProperty && itemProperty.bwa == '1'? '打开':'关闭'}`" :class="[itemProperty && itemProperty.bwa === '1' ? 'bg-green':'bg-red']"
|
||||
@click="controlHeadSwitch(item,itemProperty.bwa,'bwa')"/>
|
||||
</view>
|
||||
<view>
|
||||
@ -77,7 +77,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="rowheadstyle" vv-if="itemProperty.aat!=null">
|
||||
<view class="rowheadstyle" vv-if="itemProperty && itemProperty.aat!=null">
|
||||
<u-button text="分析" size="large" type="primary" @click="analysis(item,itemProperty.aat)"></u-button>
|
||||
</view>
|
||||
|
||||
@ -123,7 +123,7 @@
|
||||
<text>孢子分析</text>
|
||||
<u-icon name="close" size="20" class="close-btn" @click="closeLogAnalysis"></u-icon>
|
||||
</view>
|
||||
<view class="dialog-body" v-if="itemProperty.aat!=null">
|
||||
<view class="dialog-body" v-if="itemProperty && itemProperty.aat!=null">
|
||||
<uni-row class="rowstyle">
|
||||
<uni-col :span="24">
|
||||
<uni-row class="col1"><uni-col :span="24">
|
||||
@ -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;
|
||||
|
@ -1,60 +1,58 @@
|
||||
<template>
|
||||
<custom-nav-bar :left="true" title="气象站"></custom-nav-bar>
|
||||
|
||||
<view class="header-section">
|
||||
|
||||
</view>
|
||||
<view class="content-section">
|
||||
<view class="card">
|
||||
<view class="cards-title">
|
||||
|
||||
<view class="title-r">
|
||||
<view class="iconfont icon-lishijilu icon" @click="openH(item)"></view>查看历史
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="cards-content">
|
||||
<view class="txt-list" @click="taskdetails">
|
||||
<view class="txt-list">
|
||||
<view class="list2">
|
||||
<view>
|
||||
<text class="iconfont icon-fengli icon"></text>
|
||||
<text>风力:</text>{{itemProperty.wc===null?"--":itemProperty.wc}}级
|
||||
<text>风力:</text>{{itemProperty && itemProperty.wc?itemProperty.wc:"--"}}级
|
||||
</view>
|
||||
<view>
|
||||
<text class="iconfont icon-fengsu icon"></text>
|
||||
<text>风速:</text>{{itemProperty.ws===null?"--":itemProperty.ws}}m/s
|
||||
<text>风速:</text>{{itemProperty &&itemProperty.ws?itemProperty.ws:"--"}}m/s
|
||||
</view>
|
||||
<view>
|
||||
<text class="iconfont icon-fengxiang icon"></text>
|
||||
<text>风向:</text>{{itemProperty.wd===null?"--":itemProperty.wd}}
|
||||
<text>风向:</text>{{itemProperty&&itemProperty.wd?itemProperty.wd:"--"}}
|
||||
</view>
|
||||
<view>
|
||||
<text class="iconfont icon-daqiyali icon"></text>
|
||||
<text>大气压力:</text>{{itemProperty.p===null?"--":itemProperty.p}}hpa
|
||||
<text>大气压力:</text>{{itemProperty&&itemProperty.p?itemProperty.p:"--"}}hpa
|
||||
</view>
|
||||
<view>
|
||||
<text class="iconfont icon-wd icon"></text>
|
||||
<text>温度:</text>{{itemProperty.t===null?"--":itemProperty.t}}℃
|
||||
<text>温度:</text>{{itemProperty&&itemProperty.t?itemProperty.t:"--"}}℃
|
||||
</view>
|
||||
<view>
|
||||
<text class="iconfont icon-shidu icon"></text>
|
||||
<text>湿度:</text>{{itemProperty.h===null?"--":itemProperty.h}}%
|
||||
<text>湿度:</text>{{itemProperty&&itemProperty.h?itemProperty.h:"--"}}%
|
||||
</view>
|
||||
<view>
|
||||
<text class="iconfont icon-dqyl icon"></text>
|
||||
<text>当前雨量:</text>{{itemProperty.rt===null?"--":itemProperty.rt}}mm
|
||||
<text>当前雨量:</text>{{itemProperty&&itemProperty.rt?itemProperty.rt:"--"}}mm
|
||||
</view>
|
||||
<view>
|
||||
<text class="iconfont icon-jyl icon"></text>
|
||||
<text>瞬时雨量:</text>{{itemProperty.ri===null?"--":itemProperty.ri}}mm
|
||||
<text>瞬时雨量:</text>{{itemProperty&&itemProperty.ri?itemProperty.ri:"--"}}mm
|
||||
</view>
|
||||
<view>
|
||||
<text class="iconfont icon-ljyl icon"></text>
|
||||
<text>累计雨量:</text>{{itemProperty.r===null?"--":itemProperty.r}}mm
|
||||
<text>累计雨量:</text>{{itemProperty&&itemProperty.r?itemProperty.r:"--"}}mm
|
||||
</view>
|
||||
<view>
|
||||
<text class="iconfont icon-sb icon"></text>
|
||||
<text>设备状态:</text>{{itemProperty.s =="online"?"在线":"离线" }}
|
||||
<text>设备状态:</text>{{item&&item.status =="online"?"在线":"离线" }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user