控温宽度计算修改

pull/30/head
孙萌 2023-11-14 08:49:22 +08:00
parent c3f0d872e0
commit e9b0ccc21f
1 changed files with 39 additions and 3 deletions

View File

@ -37,8 +37,8 @@
</div>
<div class="input-main">
<div>控温宽度</div>
<input @blur="blurChange(21614 + ((indexs - 1) * 11), $event)" v-model="inputData[21614 + ((indexs - 1) * 11)]"
@input="change(21614 + ((indexs - 1) * 11), $event)" type="number" placeholder="0.0">
<input @blur="blurChange10(21614 + ((indexs - 1) * 11), $event)" v-model="inputData[21614 + ((indexs - 1) * 11)]"
@input="changeCount10(21614 + ((indexs - 1) * 11), $event)" type="number" placeholder="0.0">
<span></span>
</div>
</div>
@ -172,6 +172,30 @@ export default {
};
this.changeBtn(21657 + (this.indexs - 1), dataNum);
},
// x/10
blurChange10(code, el) {
var store = this.$store.state
var data = {
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
regAddress: code,
num: el.target.value * 10,
}; //
if (this.timer) {
this.timer && clearInterval(this.timer);
this.changeData(data);
}
},
// x/10
changeCount10(code, el) {
var data = el.target.value * 10
var sendData = {
target: {
value: data
}
}
this.change(code, sendData)
},
//
blurChangeCount(code, el) {
var store = this.$store.state
@ -202,6 +226,14 @@ export default {
return 0
}
},
// x/10
countData10(data) {
if (data) {
return data / 10
} else {
return 0
}
},
dataInit() {
var store = this.$store.state
var data = {
@ -212,18 +244,22 @@ export default {
if (res.data.code == 200) {
this.inputData = res.data.data;
this.getNowData()
this.inputData[21614] = this.countData10(this.inputData[21614])
this.inputData[21615] = this.countData(this.inputData[21615])
this.inputData[21617] = this.countData(this.inputData[21617])
this.inputData[21619] = this.countData(this.inputData[21619])
this.inputData[21625] = this.countData10(this.inputData[21625])
this.inputData[21626] = this.countData(this.inputData[21626])
this.inputData[21628] = this.countData(this.inputData[21628])
this.inputData[21630] = this.countData(this.inputData[21630])
this.inputData[21636] = this.countData10(this.inputData[21636])
this.inputData[21637] = this.countData(this.inputData[21637])
this.inputData[21639] = this.countData(this.inputData[21639])
this.inputData[21641] = this.countData(this.inputData[21641])
this.inputData[21647] = this.countData10(this.inputData[21647])
this.inputData[21648] = this.countData(this.inputData[21648])
this.inputData[21650] = this.countData(this.inputData[21650])
this.inputData[21652] = this.countData(this.inputData[21652])
@ -243,7 +279,7 @@ export default {
this.TypeSel = el.name
this.TypeSelIndex = el.value
}
if(this.inputData[21657 + (this.indexs - 1)]==0){
if (this.inputData[21657 + (this.indexs - 1)] == 0) {
this.TypeSel = ''
this.TypeSelIndex = 0
}