update #2

Merged
clibing merged 1 commits from pc-master into master 2023-10-06 14:10:03 +00:00
13 changed files with 372 additions and 11195 deletions

11081
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,28 @@
<router-view />
</div>
</template>
<script>
export default {
data(){
return {
}
},
mounted(){
let inputList = document.querySelectorAll('input');
for (let index = 0; index < inputList.length; index++) {
inputList[index].onfocus = this.selectValue();//input
}
},
methods:{
//
selectValue(e) {
e.currentTarget.select();
}
},
}
</script>
<style lang="scss">
* {

View File

@ -1362,7 +1362,6 @@
display: flex;
align-items: center;
justify-content: space-around;
flex-wrap: wrap;
}
.realTime .page-content .flex-list > div {
@ -1405,18 +1404,19 @@
}
.realTime .page-content .realTime-bottom .left {
width: 660px;
width: 43%;
height: 100%;
background: rgba(0, 132, 255, 0.15);
border: 2px solid rgba(0, 186, 255, 0.35);
display: flex;
align-items: center;
justify-content: center;
padding: 10px;
}
.realTime .page-content .realTime-bottom .left > div {
width: 620px;
height: 400px;
width: 100%;
height: 100%;
}
.realTime .page-content .realTime-bottom .left > div .video-js {
@ -1425,7 +1425,7 @@
}
.realTime .page-content .realTime-bottom .right {
width: calc(100% - 660px);
width: calc(100% - 43%);
min-width: 230px;
height: 100%;
}

View File

@ -32,10 +32,12 @@
}
}
.el-dropdown-menu {
max-height: 300px;
@extend .scroll;
}
.border-none {
border: none !important;
}
@ -498,12 +500,15 @@
flex-wrap: wrap;
display: flex;
align-items: center;
&.table-input {
justify-content: center;
>span {
color: #FF9191;
}
}
span {
padding: 0 10px;
}
@ -676,6 +681,7 @@
background: #00BB88;
}
&.noSel {
opacity: 0.5;
}
@ -697,6 +703,7 @@
font-weight: 400;
color: #FFFFFF;
white-space: nowrap;
>div {
justify-content: center
}
@ -722,6 +729,7 @@
height: 14px;
margin-right: 10px;
}
&.noSel {
opacity: 0.5;
}
@ -774,6 +782,7 @@
color: #FFFFFF;
cursor: pointer;
white-space: nowrap;
>img {
margin-right: 10px;
width: 14px;
@ -1170,6 +1179,7 @@
justify-content: center;
}
.input-main-80 {
width: auto;
}
@ -1426,7 +1436,7 @@
display: flex;
align-items: center;
justify-content: space-around;
flex-wrap: wrap;
// flex-wrap: wrap;
>div {
flex-shrink: 0;
@ -1460,31 +1470,38 @@
}
}
.realTime-bottom {
height: 440px;
margin-top: 30px;
>div {
flex-shrink: 0;
}
.left {
width: 660px;
width:43%;
height: 100%;
background: rgba(0, 132, 255, 0.15);
border: 2px solid rgba(0, 186, 255, 0.35);
display: flex;
align-items: center;
justify-content: center;
padding: 10px;
>div {
width: 620px;
height: 400px;
width:100%;
height: 100%;
.video-js {
width: 100%;
height: 100%;
}
}
}
.right {
width: calc(100% - 660px);
width: calc(100% - 43%);
min-width: 230px;
height: 100%;
}

View File

@ -5,7 +5,7 @@ Vue.use(Vuex)
export default new Vuex.Store({
state: {
lateSend: 10,//写入停止后 *100毫秒进行发送 例如10*100就是1000毫秒(1s)
lateSend: 100,//写入停止后 *100毫秒进行发送 例如10*100就是1000毫秒(1s)
equipmentList: [],//当前账户施肥设备
equipmentIndex: 1,//当前在第几个设备
equipmentName: null,//当前设备 小设备的各个名字

View File

@ -15,37 +15,38 @@
<div>
比例系数(P)
</div>
<input v-model="inputData['0']" @input="change('0', $event)" type="number" placeholder="0.0">
<input @blur="blurChange('0', $event)"
v-model="inputData['0']" @input="change('0', $event)" type="number" placeholder="0.0">
</div>
<div class="PID-input">
<div>
积分系数(I)
</div>
<input v-model="inputData['1']" @input="change('1', $event)" type="number" placeholder="0.0">
<input @blur="blurChange('1', $event)" v-model="inputData['1']" @input="change('1', $event)" type="number" placeholder="0.0">
</div>
<div class="PID-input">
<div>
微分系数(D)
</div>
<input v-model="inputData['2']" @input="change('2', $event)" type="number" placeholder="0.0">
<input @blur="blurChange('2', $event)" v-model="inputData['2']" @input="change('2', $event)" type="number" placeholder="0.0">
</div>
<div class="PID-input">
<div>
积分限制
</div>
<input v-model="inputData['3']" @input="change('3', $event)" type="number" placeholder="0.0">
<input @blur="blurChange('3', $event)" v-model="inputData['3']" @input="change('3', $event)" type="number" placeholder="0.0">
</div>
<div class="PID-input">
<div>
PWM周期
</div>
<input v-model="inputData['4']" @input="change('4', $event)" type="number" placeholder="0.0">
<input @blur="blurChange('4', $event)" v-model="inputData['4']" @input="change('4', $event)" type="number" placeholder="0.0">
</div>
<div class="PID-input">
<div>
计算周期
</div>
<input v-model="inputData['11']" @input="change('11', $event)" type="number" placeholder="0.0">
<input @blur="blurChange('11', $event)" v-model="inputData['11']" @input="change('11', $event)" type="number" placeholder="0.0">
</div>
</div>
</div>
@ -58,37 +59,37 @@
<div>
比例系数(P)
</div>
<input v-model="inputData['5']" @input="change('5', $event)" type="number" placeholder="0.0">
<input @blur="blurChange('5', $event)" v-model="inputData['5']" @input="change('5', $event)" type="number" placeholder="0.0">
</div>
<div class="PID-input">
<div>
积分系数(I)
</div>
<input v-model="inputData['6']" @input="change('6', $event)" type="number" placeholder="0.0">
<input @blur="blurChange('6', $event)" v-model="inputData['6']" @input="change('6', $event)" type="number" placeholder="0.0">
</div>
<div class="PID-input">
<div>
微分系数(D)
</div>
<input v-model="inputData['7']" @input="change('7', $event)" type="number" placeholder="0.0">
<input @blur="blurChange('7', $event)" v-model="inputData['7']" @input="change('7', $event)" type="number" placeholder="0.0">
</div>
<div class="PID-input">
<div>
积分限制
</div>
<input v-model="inputData['8']" @input="change('8', $event)" type="number" placeholder="0.0">
<input @blur="blurChange('8', $event)" v-model="inputData['8']" @input="change('8', $event)" type="number" placeholder="0.0">
</div>
<div class="PID-input">
<div>
PWM周期
</div>
<input v-model="inputData['9']" @input="change('9', $event)" type="number" placeholder="0.0">
<input @blur="blurChange('9', $event)" v-model="inputData['9']" @input="change('9', $event)" type="number" placeholder="0.0">
</div>
<div class="PID-input">
<div>
计算周期
</div>
<input v-model="inputData['12']" @input="change('12', $event)" type="number" placeholder="0.0">
<input @blur="blurChange('12', $event)" v-model="inputData['12']" @input="change('12', $event)" type="number" placeholder="0.0">
</div>
</div>
</div>
@ -98,25 +99,25 @@
<div>
吸酸指定通道
</div>
<input v-model="inputData['10']" @input="change('10', $event)" type="number" placeholder="0.0">
<input @blur="blurChange('10', $event)" v-model="inputData['10']" @input="change('10', $event)" type="number" placeholder="0.0">
</div>
<div class="PID-input-full">
<div>
供水泵提前启动时间(s)
</div>
<input v-model="inputData['13']" @input="change('13', $event)" type="number" placeholder="0.0">
<input @blur="blurChange('13', $event)" v-model="inputData['13']" @input="change('13', $event)" type="number" placeholder="0.0">
</div>
<div class="PID-input-full">
<div>
出水流量脉冲(P/L)
</div>
<input v-model="inputData['14']" @input="change('14', $event)" type="number" placeholder="0.0">
<input @blur="blurChange('14', $event)" v-model="inputData['14']" @input="change('14', $event)" type="number" placeholder="0.0">
</div>
<div class="PID-input-full">
<div>
旁通灌溉阀
</div>
<input v-model="inputData['15']" @input="change('15', $event)" type="number" placeholder="0.0">
<input @blur="blurChange('15', $event)" v-model="inputData['15']" @input="change('15', $event)" type="number" placeholder="0.0">
</div>
</div>
</div>
@ -135,7 +136,14 @@ export default {
inputData: []
}
},
mounted() { this.dataInit() },
mounted() {
this.dataInit()
//input
let inputList = document.querySelectorAll('input');
for (let index = 0; index < inputList.length; index++) {
inputList[index].onfocus = this.selectValue;//input
}
},
methods: {
dataInit() {
var store = this.$store.state
@ -151,6 +159,24 @@ export default {
this.$message.error(res.data.msg);
}
});
},
//
selectValue(e) {
e.currentTarget.select();
},
//
blurChange(code, el) {
var store=this.$store.state
var data = {
equipmentId: store.equipmentList[store.equipmentIndex-1].deviceId,
regAddress: code,
num: el.target.value,
}; //
if(this.timer){
this.timer && clearInterval(this.timer);
this.changeData(data);
}
},
change(code, el) {
var store = this.$store.state
@ -188,6 +214,7 @@ export default {
} else {
this.$message.error("请求出错");
}
this.timer=null
});
},
},

View File

@ -21,12 +21,14 @@
</div>
<div class="input-main">
<span>目标PH值</span>
<input v-model="inputData[store.formulaNum[indexs - 1]]"
<input @blur="blurChange(store.formulaNum[indexs - 1], $event)"
v-model="inputData[store.formulaNum[indexs - 1]]"
@input="changeCount(store.formulaNum[indexs - 1], $event)" type="number" placeholder="0.0">
</div>
<div class="input-main">
<span>目标EC值</span>
<input v-model="inputData[store.formulaNum[indexs - 1] + 1]"
<input @blur="blurChange(store.formulaNum[indexs - 1] + 1, $event)"
v-model="inputData[store.formulaNum[indexs - 1] + 1]"
@input="changeCount(store.formulaNum[indexs - 1] + 1, $event)" type="number" placeholder="0.0">
</div>
</div>
@ -41,7 +43,8 @@
<el-table-column label="清水与肥料的比例">
<template slot-scope="scope">
<div class="input-main-80">
<input v-model="inputData[store.formulaNum[indexs - 1] + 5 + scope.$index]"
<input @blur="blurChange(store.formulaNum[indexs - 1] + 5 + scope.$index, $event)"
v-model="inputData[store.formulaNum[indexs - 1] + 5 + scope.$index]"
@input="change(store.formulaNum[indexs - 1] + 5 + scope.$index, $event)" type="number"
style="height: 34px;margin: 0 auto;" placeholder="0.0">
</div>
@ -50,7 +53,8 @@
<el-table-column label="固定吸肥强度">
<template slot-scope="scope">
<div class="input-main-80">
<input v-model="inputData[store.formulaNum[indexs - 1] + 15 + scope.$index]"
<input @blur="blurChange(store.formulaNum[indexs - 1] + 15 + scope.$index, $event)"
v-model="inputData[store.formulaNum[indexs - 1] + 15 + scope.$index]"
@input="change(store.formulaNum[indexs - 1] + 15 + scope.$index, $event)" type="number"
style="height: 34px;margin: 0 auto;" placeholder="0.0">
</div>
@ -61,7 +65,8 @@
<div class="type0" v-if="scope.row.type == 0">
<div class="input-main-80 table-input">
<span> {{ scope.row.data3 }}</span>
<input v-model="inputData[store.formulaNum[indexs - 1] + 24]"
<input @blur="blurChange(store.formulaNum[indexs - 1] + 24 + scope.$index, $event)"
v-model="inputData[store.formulaNum[indexs - 1] + 24]"
@input="changeCount(store.formulaNum[indexs - 1] + 24, $event)" type="number" style="height: 34px;"
placeholder="0.0">
</div>
@ -69,7 +74,8 @@
<div class="type0" v-if="scope.row.type == 1">
<div class="input-main-80 table-input">
<span> {{ scope.row.data3 }}</span>
<input v-model="inputData[store.formulaNum[indexs - 1] + 25]"
<input @blur="blurChange(store.formulaNum[indexs - 1] + 25 + scope.$index, $event)"
v-model="inputData[store.formulaNum[indexs - 1] + 25]"
@input="changeCount(store.formulaNum[indexs - 1] + 25, $event)" type="number" style="height: 34px;"
placeholder="0.0">
</div>
@ -77,7 +83,8 @@
<div class="type1" v-if="scope.row.type == 2">
<div class="input-main-80">
<span> 肥料通道最大值</span>
<input v-model="inputData[store.formulaNum[indexs - 1] + 4]"
<input @blur="blurChange(store.formulaNum[indexs - 1] + 4 + scope.$index, $event)"
v-model="inputData[store.formulaNum[indexs - 1] + 4]"
@input="change(store.formulaNum[indexs - 1] + 4, $event)" type="number" style="height: 34px;"
placeholder="0.0">
</div>
@ -205,6 +212,11 @@ export default {
setTimeout(() => {
that.dataInit();
}, 0);
//input
let inputList = document.querySelectorAll('input');
for (let index = 0; index < inputList.length; index++) {
inputList[index].onfocus = this.selectValue;//input
}
},
methods: {
openType(index){
@ -310,6 +322,24 @@ export default {
},
}
this.change(store.formulaNum[this.indexs - 1] + 2, dataSel);
},
//
selectValue(e) {
e.currentTarget.select();
},
//
blurChange(code, el) {
var store=this.$store.state
var data = {
equipmentId: store.equipmentList[store.equipmentIndex-1].deviceId,
regAddress: code,
num: el.target.value,
}; //
if(this.timer){
this.timer && clearInterval(this.timer);
this.changeData(data);
}
},
change(code, el) {
var store = this.$store.state
@ -347,6 +377,7 @@ export default {
} else {
this.$message.error("请求出错");
}
this.timer=null
});
},
tableRowClassName({ row, rowIndex }) {

View File

@ -26,7 +26,7 @@
</div>
<div class="input-main">
<span>手动启动时间</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '01', $event)"
v-model="inputData[10 + (indexs - 1) + '01']"
@input="changeData10(10 + (indexs - 1) + '01', $event)"
type="text"
@ -38,21 +38,21 @@
<div class="flex-view">
<div class="input-main-80">
<span>自动运行起始日期</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '02', $event)"
v-model="inputData[10 + (indexs - 1) + '02']"
@input="change(10 + (indexs - 1) + '02', $event)"
type="number"
placeholder="0"
/>
<span></span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '03', $event)"
v-model="inputData[10 + (indexs - 1) + '03']"
@input="change(10 + (indexs - 1) + '03', $event)"
type="number"
placeholder="0"
/>
<span></span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '04', $event)"
v-model="inputData[10 + (indexs - 1) + '04']"
@input="change(10 + (indexs - 1) + '04', $event)"
type="number"
@ -62,7 +62,7 @@
</div>
<div class="input-main-80">
<span>间隔灌溉天数</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '05', $event)"
v-model="inputData[10 + (indexs - 1) + '05']"
@input="change(10 + (indexs - 1) + '05', $event)"
type="number"
@ -73,14 +73,14 @@
<div class="flex-view">
<div class="input-main-80">
<span>灌溉</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '51', $event)"
v-model="inputData[10 + (indexs - 1) + '51']"
@input="change(10 + (indexs - 1) + '51', $event)"
type="number"
placeholder="0"
/>
<span>次清水间隔灌溉</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '52', $event)"
v-model="inputData[10 + (indexs - 1) + '52']"
@input="change(10 + (indexs - 1) + '52', $event)"
type="number"
@ -92,7 +92,7 @@
<div class="flex-view">
<div class="input-main-80">
<span>施肥时采用</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '53', $event)"
v-model="inputData[10 + (indexs - 1) + '58']"
@input="change(10 + (indexs - 1) + '58', $event)"
type="number"
@ -104,31 +104,31 @@
<div class="flex-view">
<div class="input-main-80">
<span>电磁阀控制通道</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '54', $event)"
v-model="inputData[10 + (indexs - 1) + '54']"
@input="change(10 + (indexs - 1) + '54', $event)"
type="text"
placeholder="0"
/>
<input
<input @blur="blurChange(10 + (indexs - 1) + '55', $event)"
v-model="inputData[10 + (indexs - 1) + '55']"
@input="change(10 + (indexs - 1) + '55', $event)"
type="text"
placeholder="0"
/>
<input
<input @blur="blurChange(10 + (indexs - 1) + '56', $event)"
v-model="inputData[10 + (indexs - 1) + '56']"
@input="change(10 + (indexs - 1) + '56', $event)"
type="text"
placeholder="0"
/>
<input
<input @blur="blurChange(10 + (indexs - 1) + '57', $event)"
v-model="inputData[10 + (indexs - 1) + '57']"
@input="change(10 + (indexs - 1) + '57', $event)"
type="text"
placeholder="0"
/>
<input
<input @blur="blurChange(10 + (indexs - 1) + '60', $event)"
v-model="inputData[10 + (indexs - 1) + '60']"
@input="change(10 + (indexs - 1) + '60', $event)"
type="text"
@ -253,7 +253,7 @@
</div>
<div class="input-main-80">
<span>每次灌溉时长</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '06', $event)"
v-model="inputData[10 + (indexs - 1) + '06']"
@input="changeData10(10 + (indexs - 1) + '06', $event)"
type="number"
@ -268,14 +268,14 @@
<div>
<div class="number">1</div>
<div class="input-main-80">
<input
<input @blur="blurChange(10 + (indexs - 1) + '07', $event)"
v-model="inputData[10 + (indexs - 1) + '07']"
@input="change(10 + (indexs - 1) + '07', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '08', $event)"
v-model="inputData[10 + (indexs - 1) + '08']"
@input="change(10 + (indexs - 1) + '08', $event)"
type="number"
@ -286,14 +286,14 @@
<div>
<div class="number">2</div>
<div class="input-main-80">
<input
<input @blur="blurChange(10 + (indexs - 1) + '09', $event)"
v-model="inputData[10 + (indexs - 1) + '09']"
@input="change(10 + (indexs - 1) + '09', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '10', $event)"
v-model="inputData[10 + (indexs - 1) + '10']"
@input="change(10 + (indexs - 1) + '10', $event)"
type="number"
@ -304,14 +304,14 @@
<div>
<div class="number">3</div>
<div class="input-main-80">
<input
<input @blur="blurChange(10 + (indexs - 1) + '11', $event)"
v-model="inputData[10 + (indexs - 1) + '11']"
@input="change(10 + (indexs - 1) + '11', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '12', $event)"
v-model="inputData[10 + (indexs - 1) + '12']"
@input="change(10 + (indexs - 1) + '12', $event)"
type="number"
@ -322,14 +322,14 @@
<div>
<div class="number">4</div>
<div class="input-main-80">
<input
<input @blur="blurChange(10 + (indexs - 1) + '13', $event)"
v-model="inputData[10 + (indexs - 1) + '13']"
@input="change(10 + (indexs - 1) + '13', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '14', $event)"
v-model="inputData[10 + (indexs - 1) + '14']"
@input="change(10 + (indexs - 1) + '14', $event)"
type="number"
@ -340,14 +340,14 @@
<div>
<div class="number">5</div>
<div class="input-main-80">
<input
<input @blur="blurChange(10 + (indexs - 1) + '15', $event)"
v-model="inputData[10 + (indexs - 1) + '15']"
@input="change(10 + (indexs - 1) + '15', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '16', $event)"
v-model="inputData[10 + (indexs - 1) + '16']"
@input="change(10 + (indexs - 1) + '16', $event)"
type="number"
@ -379,7 +379,7 @@
</div>
<div class="input-main-80">
<span>每次灌溉时长</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '17', $event)"
v-model="inputData[10 + (indexs - 1) + '17']"
@input="changeData10(10 + (indexs - 1) + '17', $event)"
type="number"
@ -394,35 +394,35 @@
<div>
<div class="number">1</div>
<div class="input-main-80">
<input
<input @blur="blurChange(10 + (indexs - 1) + '19', $event)"
v-model="inputData[10 + (indexs - 1) + '19']"
@input="change(10 + (indexs - 1) + '19', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '20', $event)"
v-model="inputData[10 + (indexs - 1) + '20']"
@input="change(10 + (indexs - 1) + '20', $event)"
type="number"
placeholder="0"
/>
<span>-</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '21', $event)"
v-model="inputData[10 + (indexs - 1) + '21']"
@input="change(10 + (indexs - 1) + '21', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '22', $event)"
v-model="inputData[10 + (indexs - 1) + '22']"
@input="change(10 + (indexs - 1) + '22', $event)"
type="number"
placeholder="0"
/>
<span style="font-size: 16px">时间段里启动次数</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '18', $event)"
v-model="inputData[10 + (indexs - 1) + '18']"
@input="change(10 + (indexs - 1) + '18', $event)"
type="number"
@ -433,35 +433,35 @@
<div>
<div class="number">2</div>
<div class="input-main-80">
<input
<input @blur="blurChange(10 + (indexs - 1) + '24', $event)"
v-model="inputData[10 + (indexs - 1) + '24']"
@input="change(10 + (indexs - 1) + '24', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '25', $event)"
v-model="inputData[10 + (indexs - 1) + '25']"
@input="change(10 + (indexs - 1) + '25', $event)"
type="number"
placeholder="0"
/>
<span>-</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '26', $event)"
v-model="inputData[10 + (indexs - 1) + '26']"
@input="change(10 + (indexs - 1) + '26', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '27', $event)"
v-model="inputData[10 + (indexs - 1) + '27']"
@input="change(10 + (indexs - 1) + '27', $event)"
type="number"
placeholder="0"
/>
<span style="font-size: 16px">时间段里启动次数</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '23', $event)"
v-model="inputData[10 + (indexs - 1) + '23']"
@input="change(10 + (indexs - 1) + '23', $event)"
type="number"
@ -472,35 +472,35 @@
<div>
<div class="number">3</div>
<div class="input-main-80">
<input
<input @blur="blurChange(10 + (indexs - 1) + '29', $event)"
v-model="inputData[10 + (indexs - 1) + '29']"
@input="change(10 + (indexs - 1) + '29', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '30', $event)"
v-model="inputData[10 + (indexs - 1) + '30']"
@input="change(10 + (indexs - 1) + '30', $event)"
type="number"
placeholder="0"
/>
<span>-</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '31', $event)"
v-model="inputData[10 + (indexs - 1) + '31']"
@input="change(10 + (indexs - 1) + '31', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '32', $event)"
v-model="inputData[10 + (indexs - 1) + '32']"
@input="change(10 + (indexs - 1) + '32', $event)"
type="number"
placeholder="0"
/>
<span style="font-size: 16px">时间段里启动次数</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '28', $event)"
v-model="inputData[10 + (indexs - 1) + '28']"
@input="change(10 + (indexs - 1) + '28', $event)"
type="number"
@ -532,28 +532,28 @@
</div>
<div class="input-main-80">
<span>有效检测时间段</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '45', $event)"
v-model="inputData[10 + (indexs - 1) + '45']"
@input="change(10 + (indexs - 1) + '45', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '46', $event)"
v-model="inputData[10 + (indexs - 1) + '46']"
@input="change(10 + (indexs - 1) + '46', $event)"
type="number"
placeholder="0"
/>
<span>-</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '47', $event)"
v-model="inputData[10 + (indexs - 1) + '47']"
@input="change(10 + (indexs - 1) + '47', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '48', $event)"
v-model="inputData[10 + (indexs - 1) + '48']"
@input="change(10 + (indexs - 1) + '48', $event)"
type="number"
@ -565,7 +565,7 @@
<div class="model1-content model3-content">
<div class="input-main-80">
<span class="text">启动时灌湛时长</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '40', $event)"
v-model="inputData[10 + (indexs - 1) + '40']"
@input="changeData10(10 + (indexs - 1) + '40', $event)"
type="number"
@ -575,7 +575,7 @@
</div>
<div class="input-main-80">
<span class="text">光积累启动值</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '41', $event)"
v-model="inputData[10 + (indexs - 1) + '41']"
@input="change(10 + (indexs - 1) + '41', $event)"
type="number"
@ -584,7 +584,7 @@
</div>
<div class="input-main-80">
<span class="text">最小光照值</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '42', $event)"
v-model="inputData[10 + (indexs - 1) + '42']"
@input="change(10 + (indexs - 1) + '42', $event)"
type="number"
@ -594,7 +594,7 @@
</div>
<div class="input-main-80">
<span class="text" style="padding-left: 20px">最短灌溉间隔</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '43', $event)"
v-model="inputData[10 + (indexs - 1) + '43']"
@input="changeData10(10 + (indexs - 1) + '43', $event)"
type="number"
@ -603,7 +603,7 @@
</div>
<div class="input-main-80">
<span class="text">最长灌溉间隔</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '44', $event)"
v-model="inputData[10 + (indexs - 1) + '44']"
@input="changeData10(10 + (indexs - 1) + '44', $event)"
type="number"
@ -634,28 +634,28 @@
</div>
<div class="input-main-80">
<span>有效检测时间段</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '33', $event)"
v-model="inputData[10 + (indexs - 1) + '33']"
@input="change(10 + (indexs - 1) + '33', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '34', $event)"
v-model="inputData[10 + (indexs - 1) + '34']"
@input="change(10 + (indexs - 1) + '34', $event)"
type="number"
placeholder="0"
/>
<span>-</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '35', $event)"
v-model="inputData[10 + (indexs - 1) + '35']"
@input="change(10 + (indexs - 1) + '35', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '36', $event)"
v-model="inputData[10 + (indexs - 1) + '36']"
@input="change(10 + (indexs - 1) + '36', $event)"
type="number"
@ -667,7 +667,7 @@
<div class="model1-content model3-content">
<div class="input-main-80">
<span class="text">最低土壤湿度</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '37', $event)"
v-model="inputData[10 + (indexs - 1) + '37']"
@input="change(10 + (indexs - 1) + '37', $event)"
type="number"
@ -677,7 +677,7 @@
</div>
<div class="input-main-80">
<span class="text">最高土壤湿度</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '38', $event)"
v-model="inputData[10 + (indexs - 1) + '38']"
@input="change(10 + (indexs - 1) + '38', $event)"
type="number"
@ -687,7 +687,7 @@
</div>
<div class="input-main-80">
<span class="text">灌溉时长上限</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '39', $event)"
v-model="inputData[10 + (indexs - 1) + '39']"
@input="changeData10(10 + (indexs - 1) + '39', $event)"
type="number"
@ -721,7 +721,7 @@
<div class="number">1</div>
<div class="input-main-80">
<span>外部输入通道</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '49', $event)"
v-model="inputData[10 + (indexs - 1) + '49']"
@input="change(10 + (indexs - 1) + '49', $event)"
type="number"
@ -733,7 +733,7 @@
<div class="number">2</div>
<div class="input-main-80">
<span>外部输入通道</span>
<input
<input @blur="blurChange(10 + (indexs - 1) + '50', $event)"
v-model="inputData[10 + (indexs - 1) + '50']"
@input="change(10 + (indexs - 1) + '50', $event)"
type="number"
@ -790,6 +790,11 @@ export default {
setTimeout(() => {
that.dataInit();
}, 0);
//input
let inputList = document.querySelectorAll('input');
for (let index = 0; index < inputList.length; index++) {
inputList[index].onfocus = this.selectValue;//input
}
},
methods: {
countData10(data){
@ -970,6 +975,24 @@ export default {
}
});
},
//
selectValue(e) {
e.currentTarget.select();
},
//
blurChange(code, el) {
var store=this.$store.state
var data = {
equipmentId: store.equipmentList[store.equipmentIndex-1].deviceId,
regAddress: code,
num: el.target.value,
}; //
if(this.timer){
this.timer && clearInterval(this.timer);
this.changeData(data);
}
},
//
change(code, el) {
var store=this.$store.state
@ -1007,6 +1030,7 @@ export default {
} else {
this.$message.error("请求出错");
}
this.timer=null
});
},
handleClose1(done) {

View File

@ -20,7 +20,7 @@
</div>
</div> -->
</div>
<div class="flex-list">
<div class="flex-list scroll">
<div class="" v-for="item, index in list " :key="index">
<img :src="item.img" alt="">
<div class="text">{{ item.name }}</div>
@ -85,6 +85,7 @@ export default {
if (this.player) {
this.player.dispose();
}
that.timer&&clearInterval(that.timer)
},
methods: {
createVideo() {

View File

@ -54,13 +54,13 @@
<div>
<div class="input-main">
<div>标定低点AD值</div>
<input v-model="inputData[numberList[active] + 1]"
<input @blur="blurChange(numberList[active] + 1, $event)" v-model="inputData[numberList[active] + 1]"
@input="change(numberList[active] + 1, $event)"
type="number" placeholder="0.0">
</div>
<div class="input-main">
<div>标定低点数据</div>
<input v-model="inputData[numberList[active] + 2]"
<input @blur="blurChange(numberList[active] + 2, $event)" v-model="inputData[numberList[active] + 2]"
@input="change(numberList[active] + 2, $event)"
type="number" placeholder="0.0">
</div>
@ -68,13 +68,13 @@
<div>
<div class="input-main">
<div>标定高点AD值</div>
<input v-model="inputData[numberList[active] + 3]"
<input @blur="blurChange(numberList[active] + 3, $event)" v-model="inputData[numberList[active] + 3]"
@input="change(numberList[active] + 3, $event)"
type="number" placeholder="0.0">
</div>
<div class="input-main">
<div>标定高点数据</div>
<input v-model="inputData[numberList[active] + 4]"
<input @blur="blurChange(numberList[active] + 4, $event)" v-model="inputData[numberList[active] + 4]"
@input="change(numberList[active] + 4 , $event)"
type="number" placeholder="0.0">
</div>
@ -109,7 +109,14 @@ export default {
this.getSensorType()
},
},
mounted() { this.dataInit() },
mounted() {
this.dataInit()
//input
let inputList = document.querySelectorAll('input');
for (let index = 0; index < inputList.length; index++) {
inputList[index].onfocus = this.selectValue;//input
}
},
methods: {
//
handleCommand(command){
@ -188,6 +195,24 @@ export default {
this.$message.error(res.data.msg);
}
});
},
//
selectValue(e) {
e.currentTarget.select();
},
//
blurChange(code, el) {
var store=this.$store.state
var data = {
equipmentId: store.equipmentList[store.equipmentIndex-1].deviceId,
regAddress: code,
num: el.target.value,
}; //
if(this.timer){
this.timer && clearInterval(this.timer);
this.changeData(data);
}
},
change(code, el) {
var store = this.$store.state
@ -225,6 +250,7 @@ export default {
} else {
this.$message.error("请求出错");
}
this.timer=null
});
},
},

View File

@ -278,6 +278,10 @@ export default {
}
}
},
//
beforeDestroy(){
that.pageTimer&&clearInterval(that.pageTimer)
},
mounted() {
const that = this;
if (localStorage.getItem('token')) {
@ -285,7 +289,7 @@ export default {
setTimeout(() => {
that.getEqbyid();
that.pageTimer&&clearInterval(that.pageTimer)
setInterval(() => {
that.pageTimer= setInterval(() => {
that.getEqbyid();
}, 5000);
}, 0);

View File

@ -8,39 +8,39 @@
<div class="flex-view">
<div class="input-main">
<span>信号质量</span>
<input v-model="inputData['65']" @input="change('65', $event)" type="number" placeholder="0">
<input @blur="blurChange('65', $event)" v-model="inputData['65']" @input="change('65', $event)" type="number" placeholder="0">
</div>
<div class="input-main">
<span>SIM</span>
<input v-model="inputData['66']" @input="change('66', $event)" type="number" placeholder="0">
<input @blur="blurChange('66', $event)" v-model="inputData['66']" @input="change('66', $event)" type="number" placeholder="0">
</div>
<div class="input-main">
<span>4G</span>
<input v-model="inputData['67']" @input="change('67', $event)" type="number" placeholder="0">
<input @blur="blurChange('67', $event)" v-model="inputData['67']" @input="change('67', $event)" type="number" placeholder="0">
</div>
<br>
<div class="input-main-80" style="width: 100%;">
<span>IP</span>
<input v-model="inputData['68']" @input="change('68', $event)" type="number" placeholder="0">
<input v-model="inputData['69']" @input="change('69', $event)" type="number" placeholder="0">
<input v-model="inputData['70']" @input="change('70', $event)" type="number" placeholder="0">
<input v-model="inputData['71']" @input="change('71', $event)" type="number" placeholder="0">
<input @blur="blurChange('68', $event)" v-model="inputData['68']" @input="change('68', $event)" type="number" placeholder="0">
<input @blur="blurChange('69', $event)" v-model="inputData['69']" @input="change('69', $event)" type="number" placeholder="0">
<input @blur="blurChange('70', $event)" v-model="inputData['70']" @input="change('70', $event)" type="number" placeholder="0">
<input @blur="blurChange('71', $event)" v-model="inputData['71']" @input="change('71', $event)" type="number" placeholder="0">
</div>
</div>
<div class="flex-view" style="border: none;">
<div class="input-main-80">
<span>ICCID</span>
<input v-model="inputData['55']" @input="change16to10('55', $event)" type="text" placeholder="0">
<input v-model="inputData['56']" @input="change16to10('56', $event)" type="text" placeholder="0">
<input v-model="inputData['57']" @input="change16to10('57', $event)" type="text" placeholder="0">
<input v-model="inputData['58']" @input="change16to10('58', $event)" type="text" placeholder="0">
<input v-model="inputData['59']" @input="change16to10('59', $event)" type="text" placeholder="0">
<input v-model="inputData['60']" @input="change16to10('60', $event)" type="text" placeholder="0">
<input v-model="inputData['61']" @input="change16to10('61', $event)" type="text" placeholder="0">
<input v-model="inputData['62']" @input="change16to10('62', $event)" type="text" placeholder="0">
<input v-model="inputData['63']" @input="change16to10('63', $event)" type="text" placeholder="0">
<input v-model="inputData['64']" @input="change16to10('64', $event)" type="text" placeholder="0">
<input @blur="blurChange('55', $event)" v-model="inputData['55']" @input="change16to10('55', $event)" type="text" placeholder="0">
<input @blur="blurChange('56', $event)" v-model="inputData['56']" @input="change16to10('56', $event)" type="text" placeholder="0">
<input @blur="blurChange('57', $event)" v-model="inputData['57']" @input="change16to10('57', $event)" type="text" placeholder="0">
<input @blur="blurChange('58', $event)" v-model="inputData['58']" @input="change16to10('58', $event)" type="text" placeholder="0">
<input @blur="blurChange('59', $event)" v-model="inputData['59']" @input="change16to10('59', $event)" type="text" placeholder="0">
<input @blur="blurChange('60', $event)" v-model="inputData['60']" @input="change16to10('60', $event)" type="text" placeholder="0">
<input @blur="blurChange('61', $event)" v-model="inputData['61']" @input="change16to10('61', $event)" type="text" placeholder="0">
<input @blur="blurChange('62', $event)" v-model="inputData['62']" @input="change16to10('62', $event)" type="text" placeholder="0">
<input @blur="blurChange('63', $event)" v-model="inputData['63']" @input="change16to10('63', $event)" type="text" placeholder="0">
<input @blur="blurChange('64', $event)" v-model="inputData['64']" @input="change16to10('64', $event)" type="text" placeholder="0">
</div>
<div class="system-tips">说明:4G: =0无网络:=2.2G网络了=4.4G网络SII: -0.SII卡正常;-1无SII卡:-2.SI[卡异常(网络注册失败)信号质堡: CSQ
<11,: 11<CSQ<10,: CSQ>18,信号稳定最大是31.</div>
@ -59,7 +59,14 @@ export default {
inputData: []
}
},
mounted() { this.dataInit() },
mounted() {
this.dataInit()
//input
let inputList = document.querySelectorAll('input');
for (let index = 0; index < inputList.length; index++) {
inputList[index].onfocus = this.selectValue;//input
}
},
methods: {
change16to10(code,el){
var num=parseInt(el.target.value,16)
@ -105,6 +112,24 @@ export default {
this.$message.error(res.data.msg);
}
});
},
//
selectValue(e) {
e.currentTarget.select();
},
//
blurChange(code, el) {
var store=this.$store.state
var data = {
equipmentId: store.equipmentList[store.equipmentIndex-1].deviceId,
regAddress: code,
num: el.target.value,
}; //
if(this.timer){
this.timer && clearInterval(this.timer);
this.changeData(data);
}
},
change(code, el) {
var store = this.$store.state
@ -142,6 +167,7 @@ export default {
} else {
this.$message.error("请求出错");
}
this.timer=null
});
},
},

View File

@ -88,6 +88,11 @@ export default {
},
mounted() {
this.dataInit()
//input
let inputList = document.querySelectorAll('input');
for (let index = 0; index < inputList.length; index++) {
inputList[index].onfocus = this.selectValue;//input
}
},
methods: {
padString(str, length) {
@ -141,6 +146,24 @@ export default {
this.$message.error(res.data.msg);
}
});
},
//
selectValue(e) {
e.currentTarget.select();
},
//
blurChange(code, el) {
var store=this.$store.state
var data = {
equipmentId: store.equipmentList[store.equipmentIndex-1].deviceId,
regAddress: code,
num: el.target.value,
}; //
if(this.timer){
this.timer && clearInterval(this.timer);
this.changeData(data);
}
},
change(code, el) {
var store = this.$store.state
@ -178,6 +201,7 @@ export default {
} else {
this.$message.error("请求出错");
}
this.timer=null
});
},
selList1(index) {