新增updatatime,离线-状态隐藏和修改72参数
parent
c36307ecd8
commit
9a9a2a10f2
|
@ -224,7 +224,7 @@
|
|||
indexs: 1,
|
||||
inputData1: [],
|
||||
|
||||
timer: null
|
||||
timer_: null
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
@ -234,13 +234,13 @@
|
|||
this.deviceId = option.id
|
||||
this.dataInit()
|
||||
let that = this
|
||||
this.timer = setInterval(function() {
|
||||
this.timer_ = setInterval(function() {
|
||||
that.dataInit();
|
||||
}, 5000);
|
||||
},
|
||||
onUnload() {
|
||||
let that = this
|
||||
clearTimeout(that.timer)
|
||||
clearTimeout(that.timer_)
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
// uni.showLoading({
|
||||
|
@ -271,7 +271,7 @@
|
|||
var data = {
|
||||
"equipmentId": deviceId,
|
||||
"pattern": 0, //需要根据文档填写 //6目标ph-数值
|
||||
"regNum": 71
|
||||
"regNum": 72
|
||||
}
|
||||
this.$http({
|
||||
url: this.api.readFs_state,
|
||||
|
@ -586,8 +586,8 @@
|
|||
},
|
||||
|
||||
closePop() {
|
||||
this.dataInit();
|
||||
this.getReg();
|
||||
// this.dataInit();
|
||||
// this.getReg();
|
||||
this.show = false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<text
|
||||
:class="item.deviceState == 1 ? 'state' : 'state_act'">{{ item.deviceState == 1 ? "在线" : "离线"}}</text>
|
||||
</view>
|
||||
<view class="right" @click="toFertilizer(item)">
|
||||
<view class="right" @click="toFertilizer(item)" v-if="item.deviceState == 1">
|
||||
<text>状态</text>
|
||||
<image src="../../static/right-arrow.png" mode=""></image>
|
||||
</view>
|
||||
|
|
|
@ -38,6 +38,10 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="updateTime">
|
||||
<span></span>
|
||||
<span>*更新数据时间 : {{ updateTime }}</span>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="testBase" v-for="(item1,index1) in waterAndFertilizerParamsList" :key="index1">
|
||||
|
@ -251,7 +255,8 @@
|
|||
{ label: '无线传感器信噪比(SNR)', value: 58, countType: 1,unit: 'dB' },
|
||||
],
|
||||
|
||||
timer:null
|
||||
timer:null,
|
||||
updateTime:''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
@ -327,12 +332,14 @@
|
|||
method: 'post',
|
||||
}).then(res => {
|
||||
// console.log(res, '主页查看施肥机实时数据');
|
||||
|
||||
if(res.code == 200){
|
||||
uni.hideLoading({
|
||||
title: '完成'
|
||||
});
|
||||
uni.stopPullDownRefresh();
|
||||
i.childList= res.data;
|
||||
this.updateTime = res.data[0].updateTime
|
||||
// console.log(this.waterAndFertilizerParamsList);
|
||||
}else{
|
||||
|
||||
|
@ -484,7 +491,7 @@
|
|||
padding: 10rpx 0rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-evenly;
|
||||
// justify-content: space-evenly;
|
||||
|
||||
.item {
|
||||
width: 50%;
|
||||
|
@ -517,6 +524,14 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.updateTime{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 20rpx;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.testBase {
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -413,7 +413,7 @@ var _default = {
|
|||
topActive: 0,
|
||||
indexs: 1,
|
||||
inputData1: [],
|
||||
timer: null
|
||||
timer_: null
|
||||
};
|
||||
},
|
||||
watch: {},
|
||||
|
@ -421,13 +421,13 @@ var _default = {
|
|||
this.deviceId = option.id;
|
||||
this.dataInit();
|
||||
var that = this;
|
||||
this.timer = setInterval(function () {
|
||||
this.timer_ = setInterval(function () {
|
||||
that.dataInit();
|
||||
}, 5000);
|
||||
},
|
||||
onUnload: function onUnload() {
|
||||
var that = this;
|
||||
clearTimeout(that.timer);
|
||||
clearTimeout(that.timer_);
|
||||
},
|
||||
onPullDownRefresh: function onPullDownRefresh() {
|
||||
// uni.showLoading({
|
||||
|
@ -460,7 +460,7 @@ var _default = {
|
|||
"equipmentId": deviceId,
|
||||
"pattern": 0,
|
||||
//需要根据文档填写 //6目标ph-数值
|
||||
"regNum": 71
|
||||
"regNum": 72
|
||||
};
|
||||
this.$http({
|
||||
url: this.api.readFs_state,
|
||||
|
@ -752,8 +752,8 @@ var _default = {
|
|||
this.indexs = index;
|
||||
this.getReg();
|
||||
}), (0, _defineProperty2.default)(_methods, "closePop", function closePop() {
|
||||
this.dataInit();
|
||||
this.getReg();
|
||||
// this.dataInit();
|
||||
// this.getReg();
|
||||
this.show = false;
|
||||
}), _methods)
|
||||
};
|
||||
|
|
|
@ -1 +1 @@
|
|||
<view class="preciseWaterAndFertilizer"><u-navbar vue-id="cdd718f8-1" background="{{background}}" is-back="{{true}}" back-icon-color="#FFFFFF" border-bottom="{{false}}" title="精准水肥" title-color="#FFFFFF" title-bold="{{true}}" title-size="32" bind:__l="__l"></u-navbar><view class="content"><block wx:for="{{deviceList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="item"><image src="../../static/icon_precise.png" mode></image><view class="center"><text>{{item.deviceTypeName}}</text><text class="{{[item.deviceState==1?'state':'state_act']}}">{{item.deviceState==1?"在线":"离线"}}</text></view><view data-event-opts="{{[['tap',[['toFertilizer',['$0'],[[['deviceList','',index]]]]]]]}}" class="right" bindtap="__e"><text>状态</text><image src="../../static/right-arrow.png" mode></image></view></view></block></view></view>
|
||||
<view class="preciseWaterAndFertilizer"><u-navbar vue-id="cdd718f8-1" background="{{background}}" is-back="{{true}}" back-icon-color="#FFFFFF" border-bottom="{{false}}" title="精准水肥" title-color="#FFFFFF" title-bold="{{true}}" title-size="32" bind:__l="__l"></u-navbar><view class="content"><block wx:for="{{deviceList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="item"><image src="../../static/icon_precise.png" mode></image><view class="center"><text>{{item.deviceTypeName}}</text><text class="{{[item.deviceState==1?'state':'state_act']}}">{{item.deviceState==1?"在线":"离线"}}</text></view><block wx:if="{{item.deviceState==1}}"><view data-event-opts="{{[['tap',[['toFertilizer',['$0'],[[['deviceList','',index]]]]]]]}}" class="right" bindtap="__e"><text>状态</text><image src="../../static/right-arrow.png" mode></image></view></block></view></block></view></view>
|
|
@ -270,6 +270,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
var _default = {
|
||||
data: function data() {
|
||||
return {
|
||||
|
@ -656,7 +660,8 @@ var _default = {
|
|||
countType: 1,
|
||||
unit: 'dB'
|
||||
}],
|
||||
timer: null
|
||||
timer: null,
|
||||
updateTime: ''
|
||||
};
|
||||
},
|
||||
onLoad: function onLoad() {
|
||||
|
@ -731,12 +736,14 @@ var _default = {
|
|||
method: 'post'
|
||||
}).then(function (res) {
|
||||
// console.log(res, '主页查看施肥机实时数据');
|
||||
|
||||
if (res.code == 200) {
|
||||
uni.hideLoading({
|
||||
title: '完成'
|
||||
});
|
||||
uni.stopPullDownRefresh();
|
||||
i.childList = res.data;
|
||||
_this.updateTime = res.data[0].updateTime;
|
||||
// console.log(this.waterAndFertilizerParamsList);
|
||||
} else {}
|
||||
}).catch(function (err) {
|
||||
|
|
|
@ -1 +1 @@
|
|||
<view class="timeEnvironment data-v-34c343d8"><u-navbar vue-id="63a4351c-1" background="{{background}}" is-back="{{true}}" back-icon-color="#FFFFFF" border-bottom="{{false}}" title="实时环境" title-color="#FFFFFF" title-bold="{{true}}" title-size="32" class="data-v-34c343d8" bind:__l="__l"></u-navbar><view class="navbar data-v-34c343d8"><image src="../../static/timeEnvironment_bg.png" mode class="data-v-34c343d8"></image></view><view class="content data-v-34c343d8"><view class="title data-v-34c343d8"><image src="../../static/logo_1.png" mode class="data-v-34c343d8"></image><view class="right data-v-34c343d8"><view class="data-v-34c343d8">温室智慧云</view><view class="data-v-34c343d8">Greenhouse wisdom Cloud</view></view></view><view class="subtitle data-v-34c343d8">欢迎使用温室智慧云数据统计</view><block wx:for="{{$root.l1}}" wx:for-item="item1" wx:for-index="index1" wx:key="index1"><view class="waterAndFertilizerParams data-v-34c343d8"><view class="nav data-v-34c343d8"><image src="../../static/PH.png" mode class="data-v-34c343d8"></image><text class="data-v-34c343d8">{{item1.$orig.deviceTypeName}}</text></view><view class="detail data-v-34c343d8"><block wx:for="{{item1.l0}}" wx:for-item="item2" wx:for-index="index2" wx:key="index2"><view data-event-opts="{{[['tap',[['toTarget_water_fertilizer_PH',['$0','$1'],[[['waterAndFertilizerParamsList','',index1],['childList','',index2,'equipmentId']],[['waterAndFertilizerParamsList','',index1],['childList','',index2,'environmentData']]]]]]]}}" class="item data-v-34c343d8" bindtap="__e"><image src="{{'../../static/icon/icon'+(index2+1<9?index2+1:1)+'.png'}}" mode class="data-v-34c343d8"></image><view class="info data-v-34c343d8"><view class="data-v-34c343d8">{{item2.m0+item2.$orig.environmentDataId}}</view><view class="data-v-34c343d8">{{item2.$orig.environmentData+item2.m1}}</view></view></view></block></view></view></block></view></view>
|
||||
<view class="timeEnvironment data-v-34c343d8"><u-navbar vue-id="63a4351c-1" background="{{background}}" is-back="{{true}}" back-icon-color="#FFFFFF" border-bottom="{{false}}" title="实时环境" title-color="#FFFFFF" title-bold="{{true}}" title-size="32" class="data-v-34c343d8" bind:__l="__l"></u-navbar><view class="navbar data-v-34c343d8"><image src="../../static/timeEnvironment_bg.png" mode class="data-v-34c343d8"></image></view><view class="content data-v-34c343d8"><view class="title data-v-34c343d8"><image src="../../static/logo_1.png" mode class="data-v-34c343d8"></image><view class="right data-v-34c343d8"><view class="data-v-34c343d8">温室智慧云</view><view class="data-v-34c343d8">Greenhouse wisdom Cloud</view></view></view><view class="subtitle data-v-34c343d8">欢迎使用温室智慧云数据统计</view><block wx:for="{{$root.l1}}" wx:for-item="item1" wx:for-index="index1" wx:key="index1"><view class="waterAndFertilizerParams data-v-34c343d8"><view class="nav data-v-34c343d8"><image src="../../static/PH.png" mode class="data-v-34c343d8"></image><text class="data-v-34c343d8">{{item1.$orig.deviceTypeName}}</text></view><view class="detail data-v-34c343d8"><block wx:for="{{item1.l0}}" wx:for-item="item2" wx:for-index="index2" wx:key="index2"><view data-event-opts="{{[['tap',[['toTarget_water_fertilizer_PH',['$0','$1'],[[['waterAndFertilizerParamsList','',index1],['childList','',index2,'equipmentId']],[['waterAndFertilizerParamsList','',index1],['childList','',index2,'environmentData']]]]]]]}}" class="item data-v-34c343d8" bindtap="__e"><image src="{{'../../static/icon/icon'+(index2+1<9?index2+1:1)+'.png'}}" mode class="data-v-34c343d8"></image><view class="info data-v-34c343d8"><view class="data-v-34c343d8">{{item2.m0+item2.$orig.environmentDataId}}</view><view class="data-v-34c343d8">{{item2.$orig.environmentData+item2.m1}}</view></view></view></block></view><view class="updateTime data-v-34c343d8"><label class="_span data-v-34c343d8"></label><label class="_span data-v-34c343d8">{{"*更新数据时间 : "+updateTime}}</label></view></view></block></view></view>
|
|
@ -114,7 +114,6 @@
|
|||
padding: 10rpx 0rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
.timeEnvironment .content .waterAndFertilizerParams .detail .item.data-v-34c343d8 {
|
||||
width: 50%;
|
||||
|
@ -141,6 +140,14 @@
|
|||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
.timeEnvironment .content .waterAndFertilizerParams .updateTime.data-v-34c343d8 {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 20rpx;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
.timeEnvironment .content .testBase.data-v-34c343d8 {
|
||||
width: 690rpx;
|
||||
height: auto;
|
||||
|
|
Loading…
Reference in New Issue