Compare commits

..

No commits in common. "3224184649332734aeb24599ea5bf17386a3120d" and "09572f1b8a16d539f03d3292d1f9be6ab537602d" have entirely different histories.

45 changed files with 186 additions and 381 deletions

View File

@ -28,8 +28,7 @@
"path": "pages/preciseWaterAndFertilizer/preciseWaterAndFertilizer",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom",
"enablePullDownRefresh": true
"navigationStyle": "custom"
}
}, {

View File

@ -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() {
that.dataInit();
}, 5000);
// this.timer = setInterval(function() {
// that.dataInit();
// that.getReg();
// }, 3000);
},
onUnload() {
let that = this
clearTimeout(that.timer)
// clearTimeout(this.timer)
},
onPullDownRefresh() {
// uni.showLoading({

View File

@ -1,15 +1,14 @@
<template>
<view class="preciseWaterAndFertilizer">
<u-navbar :background="background" :is-back='true' back-icon-color='#FFFFFF' :border-bottom="false" title="精准水肥"
title-color='#FFFFFF' :title-bold='true' title-size='32'></u-navbar>
<u-navbar :background="background" :is-back='true' back-icon-color='#FFFFFF' :border-bottom="false"
title="精准水肥" title-color='#FFFFFF' :title-bold='true' title-size='32'></u-navbar>
<view class="content">
<view class="item" v-for="item,index in deviceList" :key="index">
<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>
<text>在线</text>
</view>
<view class="right" @click="toFertilizer(item)">
<text>状态</text>
@ -32,9 +31,7 @@
};
},
onLoad() {
uni.showLoading({
title: '加载中...'
})
const that= this
uni.getStorage({
key: 'token',
success: function(res) {
@ -46,31 +43,6 @@
})
}
})
const that = this
setInterval(function() {
uni.getStorage({
key: 'token',
success: function(res) {
uni.showLoading({
title: '加载中...'
})
that.getEquipmentInfo(uni.getStorageSync('userid'))
}
})
}, 120000);
},
onPullDownRefresh() {
uni.showLoading({
title: '加载中...'
})
const that = this
uni.getStorage({
key: 'token',
success: function(res) {
that.getEquipmentInfo(uni.getStorageSync('userid'))
}
})
},
methods:{
// 线线
@ -87,16 +59,9 @@
url: this.api.sel_eqbyid + userid,
method: 'GET'
}).then(res => {
// console.log(res, 'id');
console.log(res, '根据用户id查询对应的设备数据');
if (res.code == 200) {
uni.hideLoading()
uni.stopPullDownRefresh();
this.deviceList=res.data
}else {
this.$refs.uToast.show({
title: res.msg,
type: 'error',
})
}
})
},
@ -126,7 +91,6 @@
box-sizing: border-box;
padding: 0 20rpx 0 26rpx;
margin-bottom: 10rpx;
>image{
width: 60rpx;
height: 56rpx;
@ -145,8 +109,7 @@
color: #333333;
margin-right: 11rpx;
}
>.state {
>text:nth-child(2){
width: 66rpx;
height: 34rpx;
background: #EFFCF7;
@ -160,21 +123,6 @@
justify-content: center;
align-items: center;
}
>.state_act {
width: 66rpx;
height: 34rpx;
background: #F5F6FA;
border: 2px solid #E1E2E6;
border-radius: 17rpx;
font-size: 20rpx;
font-family: PingFang-SC-Bold;
font-weight: bold;
color: #999999;
display: flex;
justify-content: center;
align-items: center;
}
}
.right{

View File

@ -40,7 +40,7 @@
</view>
</view>
<!-- <view class="testBase" v-for="(item1,index1) in waterAndFertilizerParamsList" :key="index1">
<view class="testBase" v-for="(item1,index1) in waterAndFertilizerParamsList" :key="index1">
<view class="nav">
<image src="../../static/base.png" mode=""></image>
<text>{{ item1.deviceTypeName }}</text>
@ -54,9 +54,9 @@
</view>
</view>
</view>
</view> -->
</view>
<!-- <view class="testBase1" v-for="(item1,index1) in waterAndFertilizerParamsList" :key="index1">
<view class="testBase1" v-for="(item1,index1) in waterAndFertilizerParamsList" :key="index1">
<view class="nav">
<image src="../../static/testBase1.png" mode=""></image>
<text>{{ item1.deviceTypeName }}</text>
@ -67,7 +67,7 @@
<text>{{ getStatus(item2.equipmentNumber,item2.targetValue) + item2.environmentDataId }}</text>
<text>{{ item2.environmentData + getTypeList(item2.formula) }}</text>
</view>
</view> -->
</view>
</view>
</view>
</template>

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

View File

@ -21388,8 +21388,7 @@ var _default = {
"path": "pages/preciseWaterAndFertilizer/preciseWaterAndFertilizer",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom",
"enablePullDownRefresh": true
"navigationStyle": "custom"
}
}, {
"path": "pages/userCenter/userCenter",

View File

@ -412,22 +412,24 @@ var _default = {
left1Act: -1,
topActive: 0,
indexs: 1,
inputData1: [],
timer: null
inputData1: []
// timer: null
};
},
watch: {},
onLoad: function onLoad(option) {
this.deviceId = option.id;
this.dataInit();
var that = this;
this.timer = setInterval(function () {
that.dataInit();
}, 5000);
// this.timer = setInterval(function() {
// that.dataInit();
// that.getReg();
// }, 3000);
},
onUnload: function onUnload() {
var that = this;
clearTimeout(that.timer);
// clearTimeout(this.timer)
},
onPullDownRefresh: function onPullDownRefresh() {
// uni.showLoading({

View File

@ -185,7 +185,6 @@ exports.default = void 0;
//
//
//
//
var _default = {
data: function data() {
return {
@ -197,9 +196,7 @@ var _default = {
};
},
onLoad: function onLoad() {
uni.showLoading({
title: '加载中...'
});
var that = this;
uni.getStorage({
key: 'token',
success: function success(res) {
@ -211,30 +208,6 @@ var _default = {
});
}
});
var that = this;
setInterval(function () {
uni.getStorage({
key: 'token',
success: function success(res) {
uni.showLoading({
title: '加载中...'
});
that.getEquipmentInfo(uni.getStorageSync('userid'));
}
});
}, 120000);
},
onPullDownRefresh: function onPullDownRefresh() {
uni.showLoading({
title: '加载中...'
});
var that = this;
uni.getStorage({
key: 'token',
success: function success(res) {
that.getEquipmentInfo(uni.getStorageSync('userid'));
}
});
},
methods: {
// 离线或者在线
@ -251,16 +224,9 @@ var _default = {
url: this.api.sel_eqbyid + userid,
method: 'GET'
}).then(function (res) {
// console.log(res, '根据用户id查询对应的设备数据');
console.log(res, '根据用户id查询对应的设备数据');
if (res.code == 200) {
uni.hideLoading();
uni.stopPullDownRefresh();
_this.deviceList = res.data;
} else {
_this.$refs.uToast.show({
title: res.msg,
type: 'error'
});
}
});
}

View File

@ -1,7 +1,6 @@
{
"navigationBarTitleText": "",
"navigationStyle": "custom",
"enablePullDownRefresh": true,
"usingComponents": {
"u-navbar": "/node-modules/uview-ui/components/u-navbar/u-navbar"
}

View File

@ -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>在线</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 File

@ -63,7 +63,7 @@
color: #333333;
margin-right: 11rpx;
}
.preciseWaterAndFertilizer .content .item .center > .state {
.preciseWaterAndFertilizer .content .item .center > text:nth-child(2) {
width: 66rpx;
height: 34rpx;
background: #EFFCF7;
@ -77,20 +77,6 @@
justify-content: center;
align-items: center;
}
.preciseWaterAndFertilizer .content .item .center > .state_act {
width: 66rpx;
height: 34rpx;
background: #F5F6FA;
border: 2px solid #E1E2E6;
border-radius: 17rpx;
font-size: 20rpx;
font-family: PingFang-SC-Bold;
font-weight: bold;
color: #999999;
display: flex;
justify-content: center;
align-items: center;
}
.preciseWaterAndFertilizer .content .item .right {
width: 120rpx;
height: 54rpx;

View File

@ -145,11 +145,53 @@ var render = function () {
}
}
)
var l3 = _vm.__map(
_vm.waterAndFertilizerParamsList,
function (item1, index1) {
var $orig = _vm.__get_orig(item1)
var l2 = _vm.__map(item1.childList, function (item2, index2) {
var $orig = _vm.__get_orig(item2)
var m2 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m3 = _vm.getTypeList(item2.formula)
return {
$orig: $orig,
m2: m2,
m3: m3,
}
})
return {
$orig: $orig,
l2: l2,
}
}
)
var l5 = _vm.__map(
_vm.waterAndFertilizerParamsList,
function (item1, index1) {
var $orig = _vm.__get_orig(item1)
var l4 = _vm.__map(item1.childList, function (item2, index2) {
var $orig = _vm.__get_orig(item2)
var m4 = _vm.getStatus(item2.equipmentNumber, item2.targetValue)
var m5 = _vm.getTypeList(item2.formula)
return {
$orig: $orig,
m4: m4,
m5: m5,
}
})
return {
$orig: $orig,
l4: l4,
}
}
)
_vm.$mp.data = Object.assign(
{},
{
$root: {
l1: l1,
l3: l3,
l5: l5,
},
}
)

View File

@ -1,5 +1 @@
<<<<<<< HEAD
<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="https://cdn.lihe-control.com/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><block wx:for="{{$root.l3}}" wx:for-item="item1" wx:for-index="index1" wx:key="index1"><view class="testBase data-v-34c343d8"><view class="nav data-v-34c343d8"><image src="../../static/base.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.l2}}" 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@'+(item2.$orig.formula?item2.$orig.formula:1)+'.png'}}" mode class="data-v-34c343d8"></image><view class="info data-v-34c343d8"><view class="data-v-34c343d8">{{item2.m2+item2.$orig.environmentDataId}}</view><view class="data-v-34c343d8">{{item2.$orig.environmentData+item2.m3}}</view></view></view></block></view></view></block><block wx:for="{{$root.l5}}" wx:for-item="item1" wx:for-index="index1" wx:key="index1"><view class="testBase1 data-v-34c343d8"><view class="nav data-v-34c343d8"><image src="../../static/testBase1.png" mode class="data-v-34c343d8"></image><text class="data-v-34c343d8">{{item1.$orig.deviceTypeName}}</text><text class="data-v-34c343d8">温室#1</text></view><block wx:for="{{item1.l4}}" 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/'+(index2+1<5?index2+1:1)+'.png'}}" mode class="data-v-34c343d8"></image><text class="data-v-34c343d8">{{item2.m4+item2.$orig.environmentDataId}}</text><text class="data-v-34c343d8">{{item2.$orig.environmentData+item2.m5}}</text></view></block></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></block></view></view>
>>>>>>> wx-program