pull/22/head
孙萌 2023-11-07 17:32:13 +08:00
parent 4c06530f6a
commit afe6d43b3b
2 changed files with 67 additions and 70 deletions

View File

@ -4,8 +4,8 @@
<img src="../assets/image/set-icon.png" alt="">设定值参数 <img src="../assets/image/set-icon.png" alt="">设定值参数
</div> </div>
<div class="set-tips"> <div class="set-tips">
<div @click="toHome($store.state.equipmentIndex)"> <!-- <div @click="toHome($store.state.equipmentIndex)">
{{ $store.state.equipmentList[$store.state.equipmentIndex - 1].deviceTypeName }}状态显示</div> 日光温室特殊参数丽水项目</div> -->
</div> </div>
<el-collapse v-model="$store.state.activeNames"> <el-collapse v-model="$store.state.activeNames">
<template v-for="item, index in routerList"> <template v-for="item, index in routerList">
@ -39,7 +39,7 @@ export default {
return { return {
routerList: [ routerList: [
{ {
name: '天窗',router: 'skylight', list: [ name: '日光温室特殊参数(丽水项目)',router: 'skylight', list: [
{ name: '顶卷膜1', status: -1, router: 'skylight', index: 1 }, { name: '顶卷膜1', status: -1, router: 'skylight', index: 1 },
{ name: '顶卷膜2', status: -1, router: 'skylight', index: 2 }, { name: '顶卷膜2', status: -1, router: 'skylight', index: 2 },
{ name: '顶卷膜3', status: -1, router: 'skylight', index: 3 }, { name: '顶卷膜3', status: -1, router: 'skylight', index: 3 },
@ -153,7 +153,7 @@ export default {
cursor: pointer; cursor: pointer;
>div { >div {
width: 220px; width: 260px;
height: 40px; height: 40px;
// background: rgba(255, 255, 255, 0.1); // background: rgba(255, 255, 255, 0.1);
// border: 1px solid rgba(255, 255, 255, 0.3); // border: 1px solid rgba(255, 255, 255, 0.3);

View File

@ -29,8 +29,8 @@
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div> <div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="item, index in typeSelList" :key="index" <el-dropdown-item v-for="item, index in typeSelList" :key="index" :command="index">{{ item.name
:command="index">{{ item.name }}</el-dropdown-item> }}</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
@ -46,56 +46,40 @@
<div class="title"> <div class="title">
①室内温度 > ①室内温度 >
</div> </div>
<input <input @blur="blurChangeCount(21615 + ((indexs - 1) * 11), $event)" v-model="inputData[21615 + ((indexs - 1) * 11)]"
@blur="blurChangeCount(21615 + ((indexs - 1) * 11), $event)" @input="changeCountData(21615 + ((indexs - 1) * 11), $event)" class="input-140" type="text" placeholder="0.0">
v-model="inputData[21615 + ((indexs - 1) * 11)]"
@input="changeCountData(21615 + ((indexs - 1) * 11), $event)"
class="input-140" type="text" placeholder="0.0">
<span>打开</span> <span>打开</span>
<input <input @blur="blurChange(21616 + ((indexs - 1) * 11), $event)" v-model="inputData[21616 + ((indexs - 1) * 11)]"
@blur="blurChange(21616 + ((indexs - 1) * 11), $event)" @input="change(21616 + ((indexs - 1) * 11), $event)" class="input-140" type="text" placeholder="0">
v-model="inputData[21616 + ((indexs - 1) * 11)]"
@input="change(21616 + ((indexs - 1) * 11), $event)"
class="input-140" type="text" placeholder="0">
<span>%</span> <span>%</span>
</div> </div>
<div class="input-100-view"> <div class="input-100-view">
<div class="title"> <div class="title">
②室内温度 > ②室内温度 >
</div> </div>
<input <input @blur="blurChangeCount(21617 + ((indexs - 1) * 11), $event)" v-model="inputData[21617 + ((indexs - 1) * 11)]"
@blur="blurChangeCount(21617 + ((indexs - 1) * 11), $event)" @input="changeCountData(21617 + ((indexs - 1) * 11), $event)" class="input-140" type="text" placeholder="0.0">
v-model="inputData[21617 + ((indexs - 1) * 11)]"
@input="changeCountData(21617 + ((indexs - 1) * 11), $event)"
class="input-140" type="text" placeholder="0.0">
<span>打开</span> <span>打开</span>
<input <input @blur="blurChange(21618 + ((indexs - 1) * 11), $event)" v-model="inputData[21618 + ((indexs - 1) * 11)]"
@blur="blurChange(21618 + ((indexs - 1) * 11), $event)" v-model="inputData[21618 + ((indexs - 1) * 11)]" @input="change(21618 + ((indexs - 1) * 11), $event)" class="input-140" type="text" placeholder="0">
@input="change(21618 + ((indexs - 1) * 11), $event)"
class="input-140" type="text" placeholder="0">
<span>%</span> <span>%</span>
</div> </div>
<div class="input-100-view margin-none"> <div class="input-100-view margin-none">
<div class="title"> <div class="title">
③室内温度 > ③室内温度 >
</div> </div>
<input <input @blur="blurChangeCount(21619 + ((indexs - 1) * 11), $event)" v-model="inputData[21619 + ((indexs - 1) * 11)]"
@blur="blurChangeCount(21619 + ((indexs - 1) * 11), $event)" @input="changeCountData(21619 + ((indexs - 1) * 11), $event)" class="input-140" type="text" placeholder="0.0">
v-model="inputData[21619 + ((indexs - 1) * 11)]"
@input="changeCountData(21619 + ((indexs - 1) * 11), $event)"
class="input-140" type="text" placeholder="0.0">
<span>打开</span> <span>打开</span>
<input <input @blur="blurChange(21620 + ((indexs - 1) * 11), $event)" v-model="inputData[21620 + ((indexs - 1) * 11)]"
@blur="blurChange(21620 + ((indexs - 1) * 11), $event)" v-model="inputData[21620 + ((indexs - 1) * 11)]" @input="change(21620 + ((indexs - 1) * 11), $event)" class="input-140" type="text" placeholder="0">
@input="change(21620 + ((indexs - 1) * 11), $event)"
class="input-140" type="text" placeholder="0">
<span>%</span> <span>%</span>
</div> </div>
<div class="flex-view padding-none"> <div class="flex-view padding-none">
<div class="input-main"> <div class="input-main">
<div>全程运行时间</div> <div>全程运行时间</div>
<input @blur="blurChange(21621 + ((indexs - 1) * 11), $event)" v-model="inputData[21621 + ((indexs - 1) * 11)]" <input @blur="blurChange(21621 + ((indexs - 1) * 11), $event)" v-model="inputData[21621 + ((indexs - 1) * 11)]"
@input="change(21621 + ((indexs - 1) * 11), $event)" type="number" placeholder="0.0"> @input="change(21621 + ((indexs - 1) * 11), $event)" type="number" placeholder="0.0">
</div> </div>
</div> </div>
@ -103,7 +87,7 @@
<div class="input-main"> <div class="input-main">
<div>打开通道</div> <div>打开通道</div>
<input @blur="blurChange(21622 + ((indexs - 1) * 11), $event)" v-model="inputData[21622 + ((indexs - 1) * 11)]" <input @blur="blurChange(21622 + ((indexs - 1) * 11), $event)" v-model="inputData[21622 + ((indexs - 1) * 11)]"
@input="change(21622 + ((indexs - 1) * 11), $event)" type="number" placeholder="0.0"> @input="change(21622 + ((indexs - 1) * 11), $event)" type="number" placeholder="0.0">
</div> </div>
</div> </div>
@ -111,7 +95,7 @@
<div class="input-main"> <div class="input-main">
<div>关闭通道</div> <div>关闭通道</div>
<input @blur="blurChange(21623 + ((indexs - 1) * 11), $event)" v-model="inputData[21623 + ((indexs - 1) * 11)]" <input @blur="blurChange(21623 + ((indexs - 1) * 11), $event)" v-model="inputData[21623 + ((indexs - 1) * 11)]"
@input="change(21623 + ((indexs - 1) * 11), $event)" type="number" placeholder="0.0"> @input="change(21623 + ((indexs - 1) * 11), $event)" type="number" placeholder="0.0">
</div> </div>
</div> </div>
@ -166,8 +150,8 @@ export default {
}, },
methods: { methods: {
padString(str, length) { padString(str, length) {
return str.padStart(length, '0'); return str.padStart(length, '0');
}, },
changeOpen(index) { changeOpen(index) {
this.openIndex = index this.openIndex = index
var dataNum = { var dataNum = {
@ -188,36 +172,36 @@ export default {
}; };
this.changeBtn(21657 + (this.indexs - 1), dataNum); this.changeBtn(21657 + (this.indexs - 1), dataNum);
}, },
// //
blurChangeCount(code, el) { blurChangeCount(code, el) {
var store=this.$store.state var store = this.$store.state
var data = { var data = {
equipmentId: store.equipmentList[store.equipmentIndex-1].deviceId, equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
regAddress: code, regAddress: code,
num:( el.target.value*10)+400, num: (el.target.value * 10) + 400,
}; // }; //
if(this.timer){ if (this.timer) {
this.timer && clearInterval(this.timer); this.timer && clearInterval(this.timer);
this.changeData(data); this.changeData(data);
} }
},
changeCountData(code, el) {
var data = (el.target.value * 10) + 400
var sendData = {
target: {
value: data
}
}
this.change(code, sendData)
},
countData(data) {
if (data) {
return (data - 400) / 10
} else {
return 0
}
}, },
changeCountData(code,el){
var data=(el.target.value*10)+400
var sendData={
target:{
value:data
}
}
this.change(code,sendData)
},
countData(data){
if(data){
return (data-400)/10
}else{
return 0
}
},
dataInit() { dataInit() {
var store = this.$store.state var store = this.$store.state
var data = { var data = {
@ -227,7 +211,7 @@ export default {
this.api.getReadControlliShuiControl(data).then((res) => { this.api.getReadControlliShuiControl(data).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.inputData = res.data.data; this.inputData = res.data.data;
this.getNowData() this.getNowData()
} else { } else {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
@ -235,11 +219,24 @@ export default {
}); });
}, },
// //
getNowData(){ getNowData() {
this.openIndex= this.inputData[21613 + ((this.indexs - 1) * 11)] this.openIndex = this.inputData[21613 + ((this.indexs - 1) * 11)]
this.inputData[21615 + ((this.indexs - 1) * 11)]=this.countData(this.inputData[21615 + ((this.indexs - 1) * 11)]) this.inputData[21615 + ((this.indexs - 1) * 11)] = this.countData(this.inputData[21615 + ((this.indexs - 1) * 11)])
this.inputData[21617 + ((this.indexs - 1) * 11)]=this.countData(this.inputData[21617 + ((this.indexs - 1) * 11)]) this.inputData[21617 + ((this.indexs - 1) * 11)] = this.countData(this.inputData[21617 + ((this.indexs - 1) * 11)])
this.inputData[21619 + ((this.indexs - 1) * 11)]=this.countData(this.inputData[21619 + ((this.indexs - 1) * 11)]) this.inputData[21619 + ((this.indexs - 1) * 11)] = this.countData(this.inputData[21619 + ((this.indexs - 1) * 11)])
this.typeSelList.forEach((el, index) => {
if( el.value == this.inputData[21657 + (this.indexs - 1)]){
this.TypeSel = el.name
this.TypeSelIndex = el.value
}else{
this.TypeSel = ''
this.TypeSelIndex =0
}
})
}, },
// //
selectValue(e) { selectValue(e) {