问题修改

wx-program
sunmeng 2024-08-21 11:20:07 +08:00
parent b2dcd3627d
commit 1f179d9ded
4 changed files with 70 additions and 69 deletions

View File

@ -56,7 +56,7 @@ let api = {
camera_getphonehls:'/camera/getphonehls',//获取摄像头得地址 Copy Copy Copy Copy camera_getphonehls:'/camera/getphonehls',//获取摄像头得地址 Copy Copy Copy Copy
readFs_byid:'/readFs/byid',//查看用户施肥机名称信息 readFs_byid:'/readFs/byid',//查看用户施肥机名称信息
getFiState:"/readControl/getFiState",//智能灌溉控制器读取. getFiState:"/getFI/getState",//智能灌溉控制器读取.
irrigate1:"/readFi/irrigate1",//智能灌溉组 irrigate1:"/readFi/irrigate1",//智能灌溉组
irrigate2:"/readFi/irrigate2",//智能灌溉组 irrigate2:"/readFi/irrigate2",//智能灌溉组
irrigate3:"/readFi/irrigate3",//智能灌溉组 irrigate3:"/readFi/irrigate3",//智能灌溉组

View File

@ -6,7 +6,8 @@
<!-- 通风窗 --> <!-- 通风窗 -->
<view class="content" v-if="purviewList.indexOf('19')!=-1"> <view class="content" v-if="purviewList.indexOf('19')!=-1">
<template v-for="(item,index) in airWindowList"> <template v-for="(item,index) in airWindowList">
<view class="lishui-item" v-show="item.airWindowState != 0" :key="index"> <!-- v-show="item.airWindowState != 0" -->
<view class="lishui-item" :key="index">
<view class="lishui-title"> <view class="lishui-title">
<view class="title-left"> <view class="title-left">
{{ item.name }} {{ item.name }}
@ -2256,6 +2257,7 @@
if(el.id=='19'){ if(el.id=='19'){
// //
this.airWindowList=this.toNewList(this.airWindowList,el.child) this.airWindowList=this.toNewList(this.airWindowList,el.child)
}else if(el.id=='25'){ }else if(el.id=='25'){
// //
this.externalsunshadeList=this.toNewList(this.externalsunshadeList,el.child) this.externalsunshadeList=this.toNewList(this.externalsunshadeList,el.child)
@ -2276,11 +2278,11 @@
this.standardFanStatus.name=el1.nickName this.standardFanStatus.name=el1.nickName
}else if(el1.childId=='21'){ }else if(el1.childId=='21'){
this.fanwetcurtainList.forEach((el2,index2)=>{ this.fanwetcurtainList.forEach((el2,index2)=>{
el2.name=el.nickName+(index2+1) el2.name=el1.nickName+(index2+1)
}) })
}else if(el1.childId=='22'){ }else if(el1.childId=='22'){
this.outFlipWindowList.forEach((el2,index2)=>{ this.outFlipWindowList.forEach((el2,index2)=>{
el2.name=el.nickName+(index2+1) el2.name=el1.nickName+(index2+1)
}) })
} }
}) })

View File

@ -58,18 +58,18 @@
</view> </view>
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="btn-1" :class="left1Act[1] == 1 ? 'in' : 'out'"> <view class="btn-1" :class="inputData['3012'] ? 'in' : 'out'">
<image v-if="left1Act[1] == 1" src="../../static/in-sel.png" <image v-if="inputData['3012']" src="../../static/in-sel.png"
mode=""></image> mode=""></image>
<image v-else src="../../static/in.png" mode=""></image> <image v-else src="../../static/in.png" mode=""></image>
<text>进水泵</text> <text>进水泵</text>
</view> </view>
<view class="btn-2" :class="left1Act[0] == 1 ? 'in' : 'out'"> <!-- <view class="btn-2" :class="left1Act[0] == 1 ? 'in' : 'out'">
<image v-if="left1Act[0] == 1" src="../../static/out-sel.png" <image v-if="left1Act[0] == 1" src="../../static/out-sel.png"
mode=""></image> mode=""></image>
<image v-else src="../../static/out.png" mode=""></image> <image v-else src="../../static/out.png" mode=""></image>
<text>配肥泵</text> <text>配肥泵</text>
</view> </view> -->
</view> </view>
</view> </view>
@ -99,7 +99,8 @@
<view class="contentPop"> <view class="contentPop">
<view class="contentPop_box"> <view class="contentPop_box">
<view class="title"> <view class="title">
<!-- 灌溉组#{{indexs}} -->{{readFs_byid_name}} 智能灌溉组#{{indexs}}
<!-- {{readFs_byid_name}} -->
</view> </view>
<view class="control_model"> <view class="control_model">
<view class="control"> <view class="control">
@ -117,79 +118,77 @@
<view class="irrigate_time1"> <view class="irrigate_time1">
手动启动时间 手动启动时间
<view class="irrigate_input"> <view class="irrigate_input">
<input v-model="inputData1[10 + (indexs - 1) + '01']" <input v-model="inputData1['1'+(10 + (indexs - 1)) + '01']"
@blur="changeData10(10 + (indexs - 1) + '01', $event)" type="digit" placeholder="0" @blur="changeData10('1'+(10 + (indexs - 1)) + '01', $event)" type="digit" placeholder="0"
step="0.1" /> step="0.1" />
<!-- <u-input v-model="inputData[10 + (indexs - 1) + '01']" type="text" :border="false" input-align='center' <!-- <u-input v-model="inputData[(10 + (indexs - 1)) + '01']" type="text" :border="false" input-align='center'
height='66' :clearable='false' /> --> height='66' :clearable='false' /> -->
</view> </view>
min min
</view> </view>
<view class="line_pop"></view> <view class="line_pop"></view>
<view class="irrigate_time1" style="padding-left: 0;"> <!-- <view class="irrigate_time1" style="padding-left: 0;">
灌溉 灌溉
<view class="irrigate_input"> <view class="irrigate_input">
<input v-model="inputData1[10 + (indexs - 1) + '51']" <input v-model="inputData1['1'+(10 + (indexs - 1)) + '51']"
@blur="change(10 + (indexs - 1) + '51', $event)" type="number" placeholder="0" /> @blur="change('1'+(10 + (indexs - 1)) + '51', $event)" type="number" placeholder="0" />
<!-- <u-input v-model="inputData[10 + (indexs - 1) + '51']" type="text" :border="false" input-align='center'
height='66' :clearable='false' /> -->
</view> </view>
次清水 次清水
间隔灌溉 间隔灌溉
<view class="irrigate_input"> <view class="irrigate_input">
<input v-model="inputData1[10 + (indexs - 1) + '52']" <input v-model="inputData1['1'+(10 + (indexs - 1)) + '52']"
@blur="change(10 + (indexs - 1) + '52', $event)" type="number" placeholder="0" /> @blur="change('1'+(10 + (indexs - 1)) + '52', $event)" type="number" placeholder="0" />
<!-- <u-input v-model="inputData[10 + (indexs - 1) + '52']" type="text" input-align='center' height='66'
:clearable='false' /> -->
</view> </view>
次施肥 次施肥
</view> </view>
<view class="line_pop"></view> <view class="line_pop"></view> -->
<view class="irrigate_time3"> <view class="irrigate_time3">
<view class="input-text"> <view class="input-text">
电磁阀控制通道 电磁阀控制通道
</view> </view>
<view class="input-view"> <view class="input-view">
<view class="irrigate_input"> <view class="irrigate_input">
<input v-model="inputData1[10 + (indexs - 1) + '54']" @blur="change(10 + (indexs - 1) + '54', $event)" <input v-model="inputData1['1'+(10 + (indexs - 1)) + '54']" @blur="change('1'+(10 + (indexs - 1)) + '54', $event)"
type="number" placeholder="0" /> type="number" placeholder="0" />
</view> </view>
<view class="irrigate_input"> <view class="irrigate_input">
<input v-model="inputData1[10 + (indexs - 1) + '55']" @blur="change(10 + (indexs - 1) + '55', $event)" <input v-model="inputData1['1'+(10 + (indexs - 1)) + '55']" @blur="change('1'+(10 + (indexs - 1)) + '55', $event)"
type="number" placeholder="0" /> type="number" placeholder="0" />
</view> </view>
<view class="irrigate_input"> <view class="irrigate_input">
<input v-model="inputData1[10 + (indexs - 1) + '56']" @blur="change(10 + (indexs - 1) + '56', $event)" <input v-model="inputData1['1'+(10 + (indexs - 1)) + '56']" @blur="change('1'+(10 + (indexs - 1)) + '56', $event)"
type="number" placeholder="0" /> type="number" placeholder="0" />
</view> </view>
<view class="irrigate_input"> <view class="irrigate_input">
<input v-model="inputData1[10 + (indexs - 1) + '57']" @blur="change(10 + (indexs - 1) + '57', $event)" <input v-model="inputData1['1'+(10 + (indexs - 1)) + '57']" @blur="change('1'+(10 + (indexs - 1)) + '57', $event)"
type="number" placeholder="0" /> type="number" placeholder="0" />
</view> </view>
<view class="irrigate_input"> <view class="irrigate_input">
<input v-model="inputData1[10 + (indexs - 1) + '60']" @blur="change(10 + (indexs - 1) + '60', $event)" <input v-model="inputData1['1'+(10 + (indexs - 1)) + '60']" @blur="change('1'+(10 + (indexs - 1)) + '60', $event)"
type="number" placeholder="0" /> type="number" placeholder="0" />
</view> </view>
</view> </view>
<view class="input-view"> <view class="input-view">
<view class="irrigate_input"> <view class="irrigate_input">
<input v-model="inputData1[10 + (indexs - 1) + '61']" @blur="change(10 + (indexs - 1) + '61', $event)" <input v-model="inputData1['1'+(10 + (indexs - 1)) + '61']" @blur="change('1'+(10 + (indexs - 1)) + '61', $event)"
type="number" placeholder="0" /> type="number" placeholder="0" />
</view> </view>
<view class="irrigate_input"> <view class="irrigate_input">
<input v-model="inputData1[10 + (indexs - 1) + '62']" @blur="change(10 + (indexs - 1) + '62', $event)" <input v-model="inputData1['1'+(10 + (indexs - 1)) + '62']" @blur="change('1'+(10 + (indexs - 1)) + '62', $event)"
type="number" placeholder="0" /> type="number" placeholder="0" />
</view> </view>
<view class="irrigate_input"> <view class="irrigate_input">
<input v-model="inputData1[10 + (indexs - 1) + '63']" @blur="change(10 + (indexs - 1) + '63', $event)" <input v-model="inputData1['1'+(10 + (indexs - 1)) + '63']" @blur="change('1'+(10 + (indexs - 1)) + '63', $event)"
type="number" placeholder="0" /> type="number" placeholder="0" />
</view> </view>
<view class="irrigate_input"> <view class="irrigate_input">
<input v-model="inputData1[10 + (indexs - 1) + '64']" @blur="change(10 + (indexs - 1) + '64', $event)" <input v-model="inputData1['1'+(10 + (indexs - 1)) + '64']" @blur="change('1'+(10 + (indexs - 1)) + '64', $event)"
type="number" placeholder="0" /> type="number" placeholder="0" />
</view> </view>
<view class="irrigate_input"> <view class="irrigate_input">
<input v-model="inputData1[10 + (indexs - 1) + '65']" @blur="change(10 + (indexs - 1) + '65', $event)" <input v-model="inputData1['1'+(10 + (indexs - 1)) + '65']" @blur="change('1'+(10 + (indexs - 1)) + '65', $event)"
type="number" placeholder="0" /> type="number" placeholder="0" />
</view> </view>
</view> </view>
@ -233,11 +232,11 @@
title: '灌溉剩余时长', title: '灌溉剩余时长',
timer: '0min' timer: '0min'
}, },
{ // {
image: '../../static/icon_2.png', // image: '../../static/icon_2.png',
title: '灌溉瞬时流量', // title: '',
timer: '0L/h' // timer: '0L/h'
}, // },
{ {
image: '../../static/icon_3.png', image: '../../static/icon_3.png',
title: '本次灌溉量', title: '本次灌溉量',
@ -360,13 +359,12 @@
const that = this const that = this
var deviceId = this.deviceId var deviceId = this.deviceId
var data = { var data = {
"equipmentId": deviceId, "deviceId": deviceId,
"pattern": 0, // //6ph-
"regNum": 72
} }
this.$http({ this.$http({
url: this.api.getFiState, url: this.api.getFiState,
data: data data: data,
method:'GET'
}).then(res => { }).then(res => {
if (res.code == 200) { if (res.code == 200) {
uni.hideLoading() uni.hideLoading()
@ -413,8 +411,8 @@
}, },
}; };
this.$forceUpdate() this.$forceUpdate()
this.changeBtn(10 + (this.indexs - 1) + "59", dataNum); this.changeBtn('1'+(10 + (this.indexs - 1)) + "59", dataNum);
// this.change(10 + (this.indexs - 1) + "59", dataNum); // this.change((10 + (this.indexs - 1)) + "59", dataNum);
}, },
changeBtn(code, el) { changeBtn(code, el) {
@ -443,7 +441,7 @@
}, },
get59(){ get59(){
this.actList1 = [] this.actList1 = []
var num = this.inputData1[10 + (this.indexs - 1) + "59"] var num = this.inputData1['1'+(10 + (this.indexs - 1)) + "59"]
var num1 = this.padString(num.toString(2), 4) var num1 = this.padString(num.toString(2), 4)
var openListNew = [] var openListNew = []
openListNew = num1.split("") openListNew = num1.split("")
@ -457,14 +455,15 @@
}) })
const that = this const that = this
var data = { var data = {
equipmentId: this.deviceId, deviceId: this.deviceId,
// pattern: 10 + (this.indexs - 1) + "00", // //6ph- // pattern: (10 + (this.indexs - 1)) + "00", // //6ph-
// regNum: 75, // regNum: 75,
}; };
this.$http({ this.$http({
url: '/readFi/irrigate'+this.indexs, url: '/readFi/irrigate'+this.indexs,
data: data data: data,
method:'GET'
}).then((res) => { }).then((res) => {
// console.log(res, 11); // console.log(res, 11);
if (res.code == 200) { if (res.code == 200) {
@ -473,9 +472,9 @@
this.inputData1 = res.data; this.inputData1 = res.data;
this.getType00(); this.getType00();
this.get59() this.get59()
this.inputData1[10 + (this.indexs - 1) + '01'] = this.countData10(this.inputData1[10 + ( this.inputData1['1'+(10 + (this.indexs - 1)) + '01'] = this.countData10(this.inputData1['1'+10 + (
this.indexs - 1) + '01']) this.indexs - 1) + '01'])
// console.log(this.inputData1[10 + (this.indexs - 1) + '01'], 111); // console.log(this.inputData1[(10 + (this.indexs - 1)) + '01'], 111);
} else { } else {
that.$refs.uToast.show({ that.$refs.uToast.show({
title: res.msg, title: res.msg,
@ -488,7 +487,7 @@
return str.padStart(length, '0'); return str.padStart(length, '0');
}, },
getType00() { getType00() {
var number = this.padString(this.inputData1[10 + (this.indexs - 1) + "00"].toString(2), 3) var number = this.padString(this.inputData1['1'+(10 + (this.indexs - 1)) + "00"].toString(2), 3)
// console.log(number); // console.log(number);
if (Number(number[0])) { if (Number(number[0])) {
this.topActive = 1 this.topActive = 1
@ -527,20 +526,20 @@
value: parseInt(num, 2), value: parseInt(num, 2),
}, },
}; };
this.change(10 + (this.indexs - 1) + "00", dataNum); this.change('1'+(10 + (this.indexs - 1)) + "00", dataNum);
}, },
getDataInfo2() { getDataInfo2() {
var inputData = this.inputData var inputData = this.inputData
this.dataInfo2_list[0].timer = this.countData(inputData['36']) + 'min' this.dataInfo2_list[0].timer = this.countData(inputData['3013']) + 'min'
this.dataInfo2_list[1].timer = this.countData(inputData['28']) + 'L/h' // this.dataInfo2_list[1].timer = this.countData(inputData['28']) + 'L/h'
this.dataInfo2_list[2].timer = this.countData(inputData['37']) + 'L' this.dataInfo2_list[1].timer = this.countData(inputData['3014']) + 'L'
// this.dataInfo2_list[3].timer=this.countData(inputData['28']) // this.dataInfo2_list[3].timer=this.countData(inputData['28'])
this.dataInfo2_list[4].timer = this.countData(inputData['31']) this.dataInfo2_list[2].timer = this.countData(inputData['3011'])
this.dataInfo2_list[5].timer = this.countData(inputData['38']) this.dataInfo2_list[3].timer = this.countData(inputData['3015'])
}, },
// //
getData29() { getData29() {
var number = this.padString(this.inputData['29'].toString(2), 14) var number = this.padString(this.inputData['3011'].toString(2), 14)
var index = 6 var index = 6
var typeNumber = -1 var typeNumber = -1
for (var i = 0; i < index; i++) { for (var i = 0; i < index; i++) {
@ -567,8 +566,8 @@
}, },
// //
getData30() { getData30() {
var number = this.padString(this.inputData['30'].toString(2), 2) // var number = this.padString(this.inputData['30'].toString(2), 2)
this.left1Act = number // this.left1Act = number
// if (this.inputData['30'].bit0 == 1) { // if (this.inputData['30'].bit0 == 1) {
// this.left1Act = 1 // this.left1Act = 1
// } else if (this.inputData['30'].bit1 == 1) { // } else if (this.inputData['30'].bit1 == 1) {
@ -626,7 +625,7 @@
changeData(data) { changeData(data) {
const that = this const that = this
this.$http({ this.$http({
url: this.api.writeFs, url: this.api.writeFi_write,
data: data data: data
}).then((res) => { }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
@ -755,11 +754,11 @@
this.indexs = index this.indexs = index
this.getReg() this.getReg()
this.readFs_byid_list.forEach((el,j)=>{ // this.readFs_byid_list.forEach((el,j)=>{
if(index == (j+1)){ // if(index == (j+1)){
this.readFs_byid_name = this.readFs_byid_name_obj[el] // this.readFs_byid_name = this.readFs_byid_name_obj[el]
} // }
}) // })
}, },
closePop() { closePop() {
@ -958,7 +957,7 @@
.dataInfo2 { .dataInfo2 {
width: 690rpx; width: 690rpx;
height: 480rpx; // height: 480rpx;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(153, 153, 153, 0.1); box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(153, 153, 153, 0.1);
border-radius: 20rpx; border-radius: 20rpx;
@ -973,7 +972,7 @@
justify-content: space-evenly; justify-content: space-evenly;
.item { .item {
width: 33%; width: 25%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
@ -1044,7 +1043,7 @@
} }
.out { .out {
width: 300rpx; width: 100%;
height: 80rpx; height: 80rpx;
background: #EFFCF7; background: #EFFCF7;
border: 2px solid rgba(58, 187, 144, 0.25); border: 2px solid rgba(58, 187, 144, 0.25);

View File

@ -80,7 +80,7 @@
toFertilizer(item) { toFertilizer(item) {
//1/20 //1/20
if(item.deviceName==1||item.deviceName==20){ if(item.deviceName==20){
uni.navigateTo({ uni.navigateTo({
url: '/pages/fertilizer_machine_new/fertilizer_machine_new?id=' + item.deviceId url: '/pages/fertilizer_machine_new/fertilizer_machine_new?id=' + item.deviceId
}) })