问题修改
parent
b2dcd3627d
commit
1f179d9ded
|
@ -56,7 +56,7 @@ let api = {
|
|||
camera_getphonehls:'/camera/getphonehls',//获取摄像头得地址 Copy Copy Copy Copy
|
||||
|
||||
readFs_byid:'/readFs/byid',//查看用户施肥机名称信息
|
||||
getFiState:"/readControl/getFiState",//智能灌溉控制器读取.
|
||||
getFiState:"/getFI/getState",//智能灌溉控制器读取.
|
||||
irrigate1:"/readFi/irrigate1",//智能灌溉组
|
||||
irrigate2:"/readFi/irrigate2",//智能灌溉组
|
||||
irrigate3:"/readFi/irrigate3",//智能灌溉组
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
<!-- 通风窗 -->
|
||||
<view class="content" v-if="purviewList.indexOf('19')!=-1">
|
||||
<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="title-left">
|
||||
{{ item.name }}
|
||||
|
@ -2256,6 +2257,7 @@
|
|||
if(el.id=='19'){
|
||||
//通风窗
|
||||
this.airWindowList=this.toNewList(this.airWindowList,el.child)
|
||||
|
||||
}else if(el.id=='25'){
|
||||
//外遮阳
|
||||
this.externalsunshadeList=this.toNewList(this.externalsunshadeList,el.child)
|
||||
|
@ -2276,11 +2278,11 @@
|
|||
this.standardFanStatus.name=el1.nickName
|
||||
}else if(el1.childId=='21'){
|
||||
this.fanwetcurtainList.forEach((el2,index2)=>{
|
||||
el2.name=el.nickName+(index2+1)
|
||||
el2.name=el1.nickName+(index2+1)
|
||||
})
|
||||
}else if(el1.childId=='22'){
|
||||
this.outFlipWindowList.forEach((el2,index2)=>{
|
||||
el2.name=el.nickName+(index2+1)
|
||||
el2.name=el1.nickName+(index2+1)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
|
@ -58,18 +58,18 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<view class="btn-1" :class="left1Act[1] == 1 ? 'in' : 'out'">
|
||||
<image v-if="left1Act[1] == 1" src="../../static/in-sel.png"
|
||||
<view class="btn-1" :class="inputData['3012'] ? 'in' : 'out'">
|
||||
<image v-if="inputData['3012']" src="../../static/in-sel.png"
|
||||
mode=""></image>
|
||||
<image v-else src="../../static/in.png" mode=""></image>
|
||||
<text>进水泵</text>
|
||||
</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"
|
||||
mode=""></image>
|
||||
<image v-else src="../../static/out.png" mode=""></image>
|
||||
<text>配肥泵</text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
@ -99,7 +99,8 @@
|
|||
<view class="contentPop">
|
||||
<view class="contentPop_box">
|
||||
<view class="title">
|
||||
<!-- 灌溉组#{{indexs}} -->{{readFs_byid_name}}
|
||||
智能灌溉组#{{indexs}}
|
||||
<!-- {{readFs_byid_name}} -->
|
||||
</view>
|
||||
<view class="control_model">
|
||||
<view class="control">
|
||||
|
@ -117,79 +118,77 @@
|
|||
<view class="irrigate_time1">
|
||||
手动启动时间
|
||||
<view class="irrigate_input">
|
||||
<input v-model="inputData1[10 + (indexs - 1) + '01']"
|
||||
@blur="changeData10(10 + (indexs - 1) + '01', $event)" type="digit" placeholder="0"
|
||||
<input v-model="inputData1['1'+(10 + (indexs - 1)) + '01']"
|
||||
@blur="changeData10('1'+(10 + (indexs - 1)) + '01', $event)" type="digit" placeholder="0"
|
||||
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' /> -->
|
||||
</view>
|
||||
min
|
||||
</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">
|
||||
<input v-model="inputData1[10 + (indexs - 1) + '51']"
|
||||
@blur="change(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' /> -->
|
||||
<input v-model="inputData1['1'+(10 + (indexs - 1)) + '51']"
|
||||
@blur="change('1'+(10 + (indexs - 1)) + '51', $event)" type="number" placeholder="0" />
|
||||
|
||||
</view>
|
||||
次清水
|
||||
间隔灌溉
|
||||
<view class="irrigate_input">
|
||||
<input v-model="inputData1[10 + (indexs - 1) + '52']"
|
||||
@blur="change(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' /> -->
|
||||
<input v-model="inputData1['1'+(10 + (indexs - 1)) + '52']"
|
||||
@blur="change('1'+(10 + (indexs - 1)) + '52', $event)" type="number" placeholder="0" />
|
||||
|
||||
</view>
|
||||
次施肥
|
||||
</view>
|
||||
<view class="line_pop"></view>
|
||||
<view class="line_pop"></view> -->
|
||||
<view class="irrigate_time3">
|
||||
<view class="input-text">
|
||||
电磁阀控制通道
|
||||
</view>
|
||||
<view class="input-view">
|
||||
<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" />
|
||||
</view>
|
||||
<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" />
|
||||
</view>
|
||||
<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" />
|
||||
</view>
|
||||
<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" />
|
||||
</view>
|
||||
<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" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="input-view">
|
||||
<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" />
|
||||
</view>
|
||||
<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" />
|
||||
</view>
|
||||
<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" />
|
||||
</view>
|
||||
<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" />
|
||||
</view>
|
||||
<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" />
|
||||
</view>
|
||||
</view>
|
||||
|
@ -233,11 +232,11 @@
|
|||
title: '灌溉剩余时长',
|
||||
timer: '0min'
|
||||
},
|
||||
{
|
||||
image: '../../static/icon_2.png',
|
||||
title: '灌溉瞬时流量',
|
||||
timer: '0L/h'
|
||||
},
|
||||
// {
|
||||
// image: '../../static/icon_2.png',
|
||||
// title: '灌溉瞬时流量',
|
||||
// timer: '0L/h'
|
||||
// },
|
||||
{
|
||||
image: '../../static/icon_3.png',
|
||||
title: '本次灌溉量',
|
||||
|
@ -360,13 +359,12 @@
|
|||
const that = this
|
||||
var deviceId = this.deviceId
|
||||
var data = {
|
||||
"equipmentId": deviceId,
|
||||
"pattern": 0, //需要根据文档填写 //6目标ph-数值
|
||||
"regNum": 72
|
||||
"deviceId": deviceId,
|
||||
}
|
||||
this.$http({
|
||||
url: this.api.getFiState,
|
||||
data: data
|
||||
data: data,
|
||||
method:'GET'
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.hideLoading()
|
||||
|
@ -413,8 +411,8 @@
|
|||
},
|
||||
};
|
||||
this.$forceUpdate()
|
||||
this.changeBtn(10 + (this.indexs - 1) + "59", dataNum);
|
||||
// this.change(10 + (this.indexs - 1) + "59", dataNum);
|
||||
this.changeBtn('1'+(10 + (this.indexs - 1)) + "59", dataNum);
|
||||
// this.change((10 + (this.indexs - 1)) + "59", dataNum);
|
||||
},
|
||||
changeBtn(code, el) {
|
||||
|
||||
|
@ -443,7 +441,7 @@
|
|||
},
|
||||
get59(){
|
||||
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 openListNew = []
|
||||
openListNew = num1.split("")
|
||||
|
@ -457,14 +455,15 @@
|
|||
})
|
||||
const that = this
|
||||
var data = {
|
||||
equipmentId: this.deviceId,
|
||||
// pattern: 10 + (this.indexs - 1) + "00", //需要根据文档填写 //6目标ph-数值
|
||||
deviceId: this.deviceId,
|
||||
// pattern: (10 + (this.indexs - 1)) + "00", //需要根据文档填写 //6目标ph-数值
|
||||
// regNum: 75,
|
||||
};
|
||||
|
||||
this.$http({
|
||||
url: '/readFi/irrigate'+this.indexs,
|
||||
data: data
|
||||
data: data,
|
||||
method:'GET'
|
||||
}).then((res) => {
|
||||
// console.log(res, 11);
|
||||
if (res.code == 200) {
|
||||
|
@ -473,9 +472,9 @@
|
|||
this.inputData1 = res.data;
|
||||
this.getType00();
|
||||
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'])
|
||||
// console.log(this.inputData1[10 + (this.indexs - 1) + '01'], 111);
|
||||
// console.log(this.inputData1[(10 + (this.indexs - 1)) + '01'], 111);
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
|
@ -488,7 +487,7 @@
|
|||
return str.padStart(length, '0');
|
||||
},
|
||||
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);
|
||||
if (Number(number[0])) {
|
||||
this.topActive = 1
|
||||
|
@ -527,20 +526,20 @@
|
|||
value: parseInt(num, 2),
|
||||
},
|
||||
};
|
||||
this.change(10 + (this.indexs - 1) + "00", dataNum);
|
||||
this.change('1'+(10 + (this.indexs - 1)) + "00", dataNum);
|
||||
},
|
||||
getDataInfo2() {
|
||||
var inputData = this.inputData
|
||||
this.dataInfo2_list[0].timer = this.countData(inputData['36']) + 'min'
|
||||
this.dataInfo2_list[1].timer = this.countData(inputData['28']) + 'L/h'
|
||||
this.dataInfo2_list[2].timer = this.countData(inputData['37']) + 'L'
|
||||
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['3014']) + 'L'
|
||||
// this.dataInfo2_list[3].timer=this.countData(inputData['28'])
|
||||
this.dataInfo2_list[4].timer = this.countData(inputData['31'])
|
||||
this.dataInfo2_list[5].timer = this.countData(inputData['38'])
|
||||
this.dataInfo2_list[2].timer = this.countData(inputData['3011'])
|
||||
this.dataInfo2_list[3].timer = this.countData(inputData['3015'])
|
||||
},
|
||||
//什么方式启动的灌溉
|
||||
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 typeNumber = -1
|
||||
for (var i = 0; i < index; i++) {
|
||||
|
@ -567,8 +566,8 @@
|
|||
},
|
||||
//进水泵和出水泵状态
|
||||
getData30() {
|
||||
var number = this.padString(this.inputData['30'].toString(2), 2)
|
||||
this.left1Act = number
|
||||
// var number = this.padString(this.inputData['30'].toString(2), 2)
|
||||
// this.left1Act = number
|
||||
// if (this.inputData['30'].bit0 == 1) {
|
||||
// this.left1Act = 1
|
||||
// } else if (this.inputData['30'].bit1 == 1) {
|
||||
|
@ -626,7 +625,7 @@
|
|||
changeData(data) {
|
||||
const that = this
|
||||
this.$http({
|
||||
url: this.api.writeFs,
|
||||
url: this.api.writeFi_write,
|
||||
data: data
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
|
@ -755,11 +754,11 @@
|
|||
this.indexs = index
|
||||
this.getReg()
|
||||
|
||||
this.readFs_byid_list.forEach((el,j)=>{
|
||||
if(index == (j+1)){
|
||||
this.readFs_byid_name = this.readFs_byid_name_obj[el]
|
||||
}
|
||||
})
|
||||
// this.readFs_byid_list.forEach((el,j)=>{
|
||||
// if(index == (j+1)){
|
||||
// this.readFs_byid_name = this.readFs_byid_name_obj[el]
|
||||
// }
|
||||
// })
|
||||
},
|
||||
|
||||
closePop() {
|
||||
|
@ -958,7 +957,7 @@
|
|||
|
||||
.dataInfo2 {
|
||||
width: 690rpx;
|
||||
height: 480rpx;
|
||||
// height: 480rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(153, 153, 153, 0.1);
|
||||
border-radius: 20rpx;
|
||||
|
@ -973,7 +972,7 @@
|
|||
justify-content: space-evenly;
|
||||
|
||||
.item {
|
||||
width: 33%;
|
||||
width: 25%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
@ -1044,7 +1043,7 @@
|
|||
}
|
||||
|
||||
.out {
|
||||
width: 300rpx;
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
background: #EFFCF7;
|
||||
border: 2px solid rgba(58, 187, 144, 0.25);
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
toFertilizer(item) {
|
||||
//灌溉组1/20
|
||||
|
||||
if(item.deviceName==1||item.deviceName==20){
|
||||
if(item.deviceName==20){
|
||||
uni.navigateTo({
|
||||
url: '/pages/fertilizer_machine_new/fertilizer_machine_new?id=' + item.deviceId
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue