pull/22/head
parent
4c06530f6a
commit
afe6d43b3b
|
@ -4,8 +4,8 @@
|
|||
<img src="../assets/image/set-icon.png" alt="">设定值参数
|
||||
</div>
|
||||
<div class="set-tips">
|
||||
<div @click="toHome($store.state.equipmentIndex)">
|
||||
{{ $store.state.equipmentList[$store.state.equipmentIndex - 1].deviceTypeName }}状态显示</div>
|
||||
<!-- <div @click="toHome($store.state.equipmentIndex)">
|
||||
日光温室特殊参数(丽水项目)</div> -->
|
||||
</div>
|
||||
<el-collapse v-model="$store.state.activeNames">
|
||||
<template v-for="item, index in routerList">
|
||||
|
@ -39,7 +39,7 @@ export default {
|
|||
return {
|
||||
routerList: [
|
||||
{
|
||||
name: '天窗',router: 'skylight', list: [
|
||||
name: '日光温室特殊参数(丽水项目)',router: 'skylight', list: [
|
||||
{ name: '顶卷膜1', status: -1, router: 'skylight', index: 1 },
|
||||
{ name: '顶卷膜2', status: -1, router: 'skylight', index: 2 },
|
||||
{ name: '顶卷膜3', status: -1, router: 'skylight', index: 3 },
|
||||
|
@ -153,7 +153,7 @@ export default {
|
|||
cursor: pointer;
|
||||
|
||||
>div {
|
||||
width: 220px;
|
||||
width: 260px;
|
||||
height: 40px;
|
||||
// background: rgba(255, 255, 255, 0.1);
|
||||
// border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item v-for="item, index in typeSelList" :key="index"
|
||||
:command="index">{{ item.name }}</el-dropdown-item>
|
||||
<el-dropdown-item v-for="item, index in typeSelList" :key="index" :command="index">{{ item.name
|
||||
}}</el-dropdown-item>
|
||||
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
|
@ -46,56 +46,40 @@
|
|||
<div class="title">
|
||||
①室内温度 >
|
||||
</div>
|
||||
<input
|
||||
@blur="blurChangeCount(21615 + ((indexs - 1) * 11), $event)"
|
||||
v-model="inputData[21615 + ((indexs - 1) * 11)]"
|
||||
@input="changeCountData(21615 + ((indexs - 1) * 11), $event)"
|
||||
class="input-140" type="text" placeholder="0.0">
|
||||
<input @blur="blurChangeCount(21615 + ((indexs - 1) * 11), $event)" v-model="inputData[21615 + ((indexs - 1) * 11)]"
|
||||
@input="changeCountData(21615 + ((indexs - 1) * 11), $event)" class="input-140" type="text" placeholder="0.0">
|
||||
<span>℃,打开</span>
|
||||
<input
|
||||
@blur="blurChange(21616 + ((indexs - 1) * 11), $event)"
|
||||
v-model="inputData[21616 + ((indexs - 1) * 11)]"
|
||||
@input="change(21616 + ((indexs - 1) * 11), $event)"
|
||||
class="input-140" type="text" placeholder="0">
|
||||
<input @blur="blurChange(21616 + ((indexs - 1) * 11), $event)" v-model="inputData[21616 + ((indexs - 1) * 11)]"
|
||||
@input="change(21616 + ((indexs - 1) * 11), $event)" class="input-140" type="text" placeholder="0">
|
||||
<span>%</span>
|
||||
</div>
|
||||
<div class="input-100-view">
|
||||
<div class="title">
|
||||
②室内温度 >
|
||||
</div>
|
||||
<input
|
||||
@blur="blurChangeCount(21617 + ((indexs - 1) * 11), $event)"
|
||||
v-model="inputData[21617 + ((indexs - 1) * 11)]"
|
||||
@input="changeCountData(21617 + ((indexs - 1) * 11), $event)"
|
||||
class="input-140" type="text" placeholder="0.0">
|
||||
<input @blur="blurChangeCount(21617 + ((indexs - 1) * 11), $event)" v-model="inputData[21617 + ((indexs - 1) * 11)]"
|
||||
@input="changeCountData(21617 + ((indexs - 1) * 11), $event)" class="input-140" type="text" placeholder="0.0">
|
||||
<span>℃,打开</span>
|
||||
<input
|
||||
@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 @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">
|
||||
<span>%</span>
|
||||
</div>
|
||||
<div class="input-100-view margin-none">
|
||||
<div class="title">
|
||||
③室内温度 >
|
||||
</div>
|
||||
<input
|
||||
@blur="blurChangeCount(21619 + ((indexs - 1) * 11), $event)"
|
||||
v-model="inputData[21619 + ((indexs - 1) * 11)]"
|
||||
@input="changeCountData(21619 + ((indexs - 1) * 11), $event)"
|
||||
class="input-140" type="text" placeholder="0.0">
|
||||
<input @blur="blurChangeCount(21619 + ((indexs - 1) * 11), $event)" v-model="inputData[21619 + ((indexs - 1) * 11)]"
|
||||
@input="changeCountData(21619 + ((indexs - 1) * 11), $event)" class="input-140" type="text" placeholder="0.0">
|
||||
<span>℃,打开</span>
|
||||
<input
|
||||
@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 @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">
|
||||
<span>%</span>
|
||||
</div>
|
||||
<div class="flex-view padding-none">
|
||||
<div class="input-main">
|
||||
<div>全程运行时间</div>
|
||||
<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>
|
||||
|
@ -103,7 +87,7 @@
|
|||
<div class="input-main">
|
||||
<div>打开通道</div>
|
||||
<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>
|
||||
|
@ -111,7 +95,7 @@
|
|||
<div class="input-main">
|
||||
<div>关闭通道</div>
|
||||
<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>
|
||||
|
@ -166,8 +150,8 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
padString(str, length) {
|
||||
return str.padStart(length, '0');
|
||||
},
|
||||
return str.padStart(length, '0');
|
||||
},
|
||||
changeOpen(index) {
|
||||
this.openIndex = index
|
||||
var dataNum = {
|
||||
|
@ -188,36 +172,36 @@ export default {
|
|||
};
|
||||
this.changeBtn(21657 + (this.indexs - 1), dataNum);
|
||||
},
|
||||
//失去焦点
|
||||
blurChangeCount(code, el) {
|
||||
var store=this.$store.state
|
||||
//失去焦点
|
||||
blurChangeCount(code, el) {
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
equipmentId: store.equipmentList[store.equipmentIndex-1].deviceId,
|
||||
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
|
||||
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.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() {
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
|
@ -227,7 +211,7 @@ export default {
|
|||
this.api.getReadControlliShuiControl(data).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
this.inputData = res.data.data;
|
||||
this.getNowData()
|
||||
this.getNowData()
|
||||
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
|
@ -235,11 +219,24 @@ export default {
|
|||
});
|
||||
},
|
||||
//获取当前页面的参数
|
||||
getNowData(){
|
||||
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[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)])
|
||||
getNowData() {
|
||||
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[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.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) {
|
||||
|
|
Loading…
Reference in New Issue