wx-program
sunmeng 2024-08-22 10:17:29 +08:00
parent 7ee82f2cc7
commit 8f5c8dfe22
1 changed files with 137 additions and 7 deletions

View File

@ -81,8 +81,8 @@
<view :class="right2Index.indexOf(index + 4) != -1?'item_act':'item'" v-for="(item,index) in rightList2.slice(4, 8)" :key="index">{{item}}</view>
</view>
</view>
<!-- <view class="set">
<view class="item" >
<view class="set">
<view class="item" @click="openSoilshow">
<view class="left">
土壤传感器
</view>
@ -91,7 +91,7 @@
<image src="../../static/downArrow.png" mode=""></image>
</view>
</view>
</view> -->
</view>
<view class="set">
<view class="item" v-for="(item,index) in 16" :key="index" @click="showPop(index+1)">
<view class="left">
@ -222,7 +222,91 @@
<image src="../../static/closed.png" mode="" @click="closePop"></image>
</view>
</u-popup>
<u-popup v-model="Soilshow" mode="center" :mask-close-able='false' width="640rpx"
:closeable='false'>
<view class="contentPop soil-pop" style="padding-bottom: 70rpx;">
<view class="contentPop_box" >
<view class="title">
土壤温湿度传感器数据
</view>
<view class="soil-flex" v-if="inputData[3102]!=0">
<view class="left">
<template v-for="item,index in 40">
<view class="irrigate_input" v-if="index<(inputData[3102]?inputData[3102]:0)" :key="index">
<view class="number">{{index+1}}#温度</view> <input :value="inputData[3103+index]?(inputData[3103+index]-400)/10:0" disabled type="number" placeholder="0" />
</view>
</template>
</view>
<view class="right">
<template v-for="item,index in 40">
<view class="irrigate_input" v-if="index<(inputData[3102]?inputData[3102]:0)" :key="index">
<view class="number">{{index+1}}#湿度</view> <input :value="inputData[3062+index]?inputData[3062+index]/10:0" disabled type="number" placeholder="0" />%RH
</view>
</template>
</view>
</view>
<view class="" v-else>
无土壤传感器数据
</view>
<!-- <view class="irrigate_time3">
<view class="input-text">
电磁阀控制通道
</view>
<view class="input-view">
<view class="irrigate_input">
<input v-model="inputData1['1'+(10 + (indexs - 1)) + '52']" @blur="change('1'+(10 + (indexs - 1)) + '52', $event)"
type="number" placeholder="0" />
</view>
<view class="irrigate_input">
<input v-model="inputData1['1'+(10 + (indexs - 1)) + '53']" @blur="change('1'+(10 + (indexs - 1)) + '53', $event)"
type="number" placeholder="0" />
</view>
<view class="irrigate_input">
<input v-model="inputData1['1'+(10 + (indexs - 1)) + '54']" @blur="change('1'+(10 + (indexs - 1)) + '54', $event)"
type="number" placeholder="0" />
</view>
<view class="irrigate_input">
<input v-model="inputData1['1'+(10 + (indexs - 1)) + '55']" @blur="change('1'+(10 + (indexs - 1)) + '55', $event)"
type="number" placeholder="0" />
</view>
<view class="irrigate_input">
<input v-model="inputData1['1'+(10 + (indexs - 1)) + '56']" @blur="change('1'+(10 + (indexs - 1)) + '56', $event)"
type="number" placeholder="0" />
</view>
</view>
<view class="input-view">
<view class="irrigate_input">
<input v-model="inputData1['1'+(10 + (indexs - 1)) + '57']" @blur="change('1'+(10 + (indexs - 1)) + '57', $event)"
type="number" placeholder="0" />
</view>
<view class="irrigate_input">
<input v-model="inputData1['1'+(10 + (indexs - 1)) + '58']" @blur="change('1'+(10 + (indexs - 1)) + '58', $event)"
type="number" placeholder="0" />
</view>
<view class="irrigate_input">
<input v-model="inputData1['1'+(10 + (indexs - 1)) + '59']" @blur="change('1'+(10 + (indexs - 1)) + '59', $event)"
type="number" placeholder="0" />
</view>
<view class="irrigate_input">
<input v-model="inputData1['1'+(10 + (indexs - 1)) + '60']" @blur="change('1'+(10 + (indexs - 1)) + '60', $event)"
type="number" placeholder="0" />
</view>
<view class="irrigate_input">
<input v-model="inputData1['1'+(10 + (indexs - 1)) + '61']" @blur="change('1'+(10 + (indexs - 1)) + '61', $event)"
type="number" placeholder="0" />
</view>
</view>
</view>
-->
</view>
<image src="../../static/closed.png" mode="" @click="Soilshow=false"></image>
</view>
</u-popup>
</view>
<u-toast ref="uToast" />
</view>
</template>
@ -317,7 +401,8 @@
'solenoidSixteen'
],
readFs_byid_name:'',
actList1:["0","0","0","0"]
actList1:["0","0","0","0"],
Soilshow:false
};
},
watch: {
@ -348,7 +433,9 @@
this.dataInit();
},
methods: {
openSoilshow(){
this.Soilshow=true
},
toWebView(id) {
// console.log(id);
uni.navigateTo({
@ -1240,7 +1327,17 @@
// min-height: calc(100% - 70rpx);
height:calc(100% - 70rpx);
position: relative;
&.soil-pop{
height: 100%;
>image {
width: 50rpx;
height: 50rpx;
position: absolute;
bottom:0rpx;
left: 50%;
transform: translate(-50%);
}
}
.contentPop_box {
width: 100%;
height: 100%;
@ -1262,7 +1359,40 @@
text-align: center;
line-height: 91rpx;
}
.soil-flex{
max-height: 700rpx;
overflow: auto;
width: 100%;
display: flex;
justify-content: space-between;
.left,.right{
width: 50%;
flex-shrink: 0;
>view{
width: 100%;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 10rpx;
.number{
width: 110rpx;text-align: right;
}
input{
width: 90rpx;
height: 66rpx;
background: #F5F6FA;
border: 2px solid #E1E2E6;
border-radius: 10rpx;
margin: 0 15rpx;
text-align: center;
}
}
}
}
.line_pop{
width: 580rpx;
height: 1rpx;