This commit is contained in:
home孙 2025-09-13 14:23:14 +08:00
parent 90cf56a0ad
commit 3b29e9e338
3 changed files with 797 additions and 585 deletions

View File

@ -242,7 +242,7 @@ module.exports = {
irrigationGroupConfig: '灌溉组配置',
intrinsicParams: '固有参数',
internalPIDConfig: '厂家内部PID配置',
mixing: '搅拌程序',
mixing: '搅拌配置',
systemParamsConfig: '系统参数配置',
sensorChannelConfig: '传感器通道配置',
dataUpload: '数据上传',

View File

@ -270,7 +270,7 @@ export default {
}, {
name: this.$t('status.fertilizerTypes.h'),
}, {
name: this.$t('status.fertilizerTypes.acidFertilizer'),
name: this.$t('status.fertilizerTypes.acid'),
},
]
return data

View File

@ -1,77 +1,144 @@
<template>
<div class="irrigateSet">
<div class="table-title">
<img src="../../assets/img/intrinsicParameter.png" alt="">{{ pageName }}
<img src="../../assets/img/intrinsicParameter.png" alt="" />{{ pageName }}
</div>
<div class="flex-view">
<div class="input-btn">
<span>控制模式选择</span>
<div class="btn" @click="change00(2)" :class="topActive[2] == 1 ? 'blue' : 'green'">
<img src="../../assets/image/irrigateSet1.png" alt="" />{{$t('text.stop')}}
<div
class="btn"
@click="change00(2)"
:class="topActive[2] == 1 ? 'blue' : 'green'"
>
<img src="../../assets/image/irrigateSet1.png" alt="" />{{
$t("text.stop")
}}
</div>
<div class="btn" @click="change00(1)" :class="topActive[1] == 1 ? 'blue' : 'green'">
<img src="../../assets/image/irrigateSet3.png" alt="" />{{$t('text.manual')}}
<div
class="btn"
@click="change00(1)"
:class="topActive[1] == 1 ? 'blue' : 'green'"
>
<img src="../../assets/image/irrigateSet3.png" alt="" />{{
$t("text.manual")
}}
</div>
<div class="btn" @click="change00(0)" :class="topActive[0] == 1 ? 'blue' : 'green'">
<img src="../../assets/image/irrigateSet2.png" alt="" />{{$t('text.auto')}}
<div
class="btn"
@click="change00(0)"
:class="topActive[0] == 1 ? 'blue' : 'green'"
>
<img src="../../assets/image/irrigateSet2.png" alt="" />{{
$t("text.auto")
}}
</div>
</div>
</div>
<div class="flex-view border-none padding-none">
<div class="input-main-60">
<span>手动启动时间</span>
<input @blur="blurChange10('601', $event)" v-model="inputData['601']"
@input="changeData10('601', $event)" type="text" value="60" placeholder="60" />
<input
@blur="blurChange10('601', $event)"
v-model="inputData['601']"
@input="changeData10('601', $event)"
type="text"
value="60"
placeholder="60"
/>
<span></span>
</div>
</div>
<div class="text-tips">手动启动肥泵选择:</div>
<div class="text-tips">自动启动搅拌电机选择:</div>
<div class="flex-view">
<div class="input-btn">
<div class="btn btn-w70" @click="changeIndexOpen1(0)" :class="actList1[0] == '1' ? 'blue' : 'off'">
A
<div
class="btn btn-w70"
@click="changeIndexOpen1(0)"
:class="actList1[0] == '1' ? 'blue' : 'off'"
>
A肥
</div>
<div class="btn btn-w70" @click="changeIndexOpen1(1)" :class="actList1[1] == '1' ? 'blue' : 'off'">
B
<div
class="btn btn-w70"
@click="changeIndexOpen1(1)"
:class="actList1[1] == '1' ? 'blue' : 'off'"
>
B肥
</div>
<div class="btn btn-w70" @click="changeIndexOpen1(2)" :class="actList1[2] == '1' ? 'blue' : 'off'">
C
<div
class="btn btn-w70"
@click="changeIndexOpen1(2)"
:class="actList1[2] == '1' ? 'blue' : 'off'"
>
C肥
</div>
<div class="btn btn-w70" @click="changeIndexOpen1(3)" :class="actList1[3] == '1' ? 'blue' : 'off'">
D
<div
class="btn btn-w70"
@click="changeIndexOpen1(3)"
:class="actList1[3] == '1' ? 'blue' : 'off'"
>
D肥
</div>
<div class="btn btn-w70" @click="changeIndexOpen1(4)" :class="actList1[4] == '1' ? 'blue' : 'off'">
E
<div
class="btn btn-w70"
@click="changeIndexOpen1(4)"
:class="actList1[4] == '1' ? 'blue' : 'off'"
>
E肥
</div>
<div class="btn btn-w70" @click="changeIndexOpen1(5)" :class="actList1[5] == '1' ? 'blue' : 'off'">
F
<div
class="btn btn-w70"
@click="changeIndexOpen1(5)"
:class="actList1[5] == '1' ? 'blue' : 'off'"
>
F肥
</div>
<div class="btn btn-w70" @click="changeIndexOpen1(6)" :class="actList1[6] == '1' ? 'blue' : 'off'">
G
<div
class="btn btn-w70"
@click="changeIndexOpen1(6)"
:class="actList1[6] == '1' ? 'blue' : 'off'"
>
G肥
</div>
<div class="btn btn-w70" @click="changeIndexOpen1(7)" :class="actList1[7] == '1' ? 'blue' : 'off'">
H
<div
class="btn btn-w70"
@click="changeIndexOpen1(7)"
:class="actList1[7] == '1' ? 'blue' : 'off'"
>
H肥
</div>
<div class="btn btn-w70" @click="changeIndexOpen1(8)" :class="actList1[8] == '1' ? 'blue' : 'off'">
<div
class="btn btn-w70"
@click="changeIndexOpen1(8)"
:class="actList1[8] == '1' ? 'blue' : 'off'"
>
</div>
</div>
</div>
<div class="flex-view padding-none shrink-none">
<div class="input-sel input-sel-w180">
<span>运行模式选择:</span>
<el-dropdown @command="handleCommand1($event, 603)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[603]" type="text" class="input-input" placeholder="无" />
<input
v-model="inputDataNew[603]"
type="text"
class="input-input"
placeholder="无"
/>
<div class="arrow">
<img src="../../assets/image/arrow.png" alt="" />
</div>
</div>
<el-dropdown-menu class="input-menu-180" slot="dropdown">
<el-dropdown-item v-for="(item, index) in typeList1" :key="index" :command="item.value">{{
item.label }}</el-dropdown-item>
<el-dropdown-item
v-for="(item, index) in typeList1"
:key="index"
:command="item.value"
>{{ item.label }}</el-dropdown-item
>
</el-dropdown-menu>
</el-dropdown>
</div>
@ -80,212 +147,361 @@
<!-- -->
<block v-show="inputData['603'] == 1">
<template>
<div class="title-tips-bold">
时间点模式
</div>
<div class="title-tips-bold">时间点模式</div>
<div class="flex-view border-none padding-none shrink-none">
<div class="input-main-60">
<span>每次启动时长</span>
<input @blur="blurChange10('604', $event)" v-model="inputData['604']"
@input="changeData10('604', $event)" type="text" value="60" placeholder="60" />
<input
@blur="blurChange10('604', $event)"
v-model="inputData['604']"
@input="changeData10('604', $event)"
type="text"
value="60"
placeholder="60"
/>
<span></span>
</div>
</div>
<div class="flex-view border-none padding-none shrink-none">
<div class="number circle">1</div>
<div class="input-main-60">
<input @blur="blurChange('605', $event)" v-model="inputData['605']"
@input="change('605', $event)" type="number" placeholder="0" />
<input
@blur="blurChange('605', $event)"
v-model="inputData['605']"
@input="change('605', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input @blur="blurChange('606', $event)" v-model="inputData['606']"
@input="change('606', $event)" type="number" placeholder="0" />
<input
@blur="blurChange('606', $event)"
v-model="inputData['606']"
@input="change('606', $event)"
type="number"
placeholder="0"
/>
</div>
</div>
<div class="flex-view border-none padding-none shrink-none">
<div class="number circle">2</div>
<div class="input-main-60">
<input @blur="blurChange('607', $event)" v-model="inputData['607']"
@input="change('607', $event)" type="number" placeholder="0" />
<input
@blur="blurChange('607', $event)"
v-model="inputData['607']"
@input="change('607', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input @blur="blurChange('608', $event)" v-model="inputData['608']"
@input="change('608', $event)" type="number" placeholder="0" />
<input
@blur="blurChange('608', $event)"
v-model="inputData['608']"
@input="change('608', $event)"
type="number"
placeholder="0"
/>
</div>
</div>
<div class="flex-view border-none padding-none shrink-none">
<div class="number circle">3</div>
<div class="input-main-60">
<input @blur="blurChange('609', $event)" v-model="inputData['609']"
@input="change('609', $event)" type="number" placeholder="0" />
<input
@blur="blurChange('609', $event)"
v-model="inputData['609']"
@input="change('609', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input @blur="blurChange('610', $event)" v-model="inputData['610']"
@input="change('610', $event)" type="number" placeholder="0" />
<input
@blur="blurChange('610', $event)"
v-model="inputData['610']"
@input="change('610', $event)"
type="number"
placeholder="0"
/>
</div>
</div>
<div class="flex-view border-none padding-none shrink-none">
<div class="number circle">4</div>
<div class="input-main-60">
<input @blur="blurChange('611', $event)" v-model="inputData['611']"
@input="change('611', $event)" type="number" placeholder="0" />
<input
@blur="blurChange('611', $event)"
v-model="inputData['611']"
@input="change('611', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input @blur="blurChange('612', $event)" v-model="inputData['612']"
@input="change('612', $event)" type="number" placeholder="0" />
<input
@blur="blurChange('612', $event)"
v-model="inputData['612']"
@input="change('612', $event)"
type="number"
placeholder="0"
/>
</div>
</div>
<div class="flex-view padding-none shrink-none">
<div class="number circle">5</div>
<div class="input-main-60">
<input @blur="blurChange('613', $event)" v-model="inputData['613']"
@input="change('613', $event)" type="number" placeholder="0" />
<input
@blur="blurChange('613', $event)"
v-model="inputData['613']"
@input="change('613', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input @blur="blurChange('614', $event)" v-model="inputData['614']"
@input="change('614', $event)" type="number" placeholder="0" />
<input
@blur="blurChange('614', $event)"
v-model="inputData['614']"
@input="change('614', $event)"
type="number"
placeholder="0"
/>
</div>
</div>
</template>
</block>
<!-- 时间段模式 -->
<!-- -->
<block v-show="inputData['603'] == 2">
<template>
<div class="title-tips-bold">
时间段模式
</div>
<div class="title-tips-bold">时间段模式</div>
<div class="flex-view border-none padding-none shrink-none">
<div class="input-main-60">
<span>每次启动时长</span>
<input @blur="blurChange10('615', $event)" v-model="inputData['615']"
@input="changeData10('615', $event)" type="text" value="60" placeholder="60" />
<input
@blur="blurChange10('615', $event)"
v-model="inputData['615']"
@input="changeData10('615', $event)"
type="text"
value="60"
placeholder="60"
/>
<span></span>
</div>
</div>
<div class="flex-view border-none padding-none shrink-none">
<div class="number circle">1</div>
<div class="input-main-60">
<input @blur="blurChange('617', $event)" v-model="inputData['617']"
@input="change('617', $event)" type="number" placeholder="0" />
<input
@blur="blurChange('617', $event)"
v-model="inputData['617']"
@input="change('617', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input @blur="blurChange('618', $event)" v-model="inputData['618']"
@input="change('618', $event)" type="number" placeholder="0" />
<input
@blur="blurChange('618', $event)"
v-model="inputData['618']"
@input="change('618', $event)"
type="number"
placeholder="0"
/>
<span>-</span>
<input @blur="blurChange('619', $event)" v-model="inputData['619']"
@input="change('619', $event)" type="number" placeholder="0" />
<input
@blur="blurChange('619', $event)"
v-model="inputData['619']"
@input="change('619', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input @blur="blurChange('620', $event)" v-model="inputData['620']"
@input="change('620', $event)" type="number" placeholder="0" />
<span style="font-size: 16px">{{$t('irrigateSetSoil.intervalStart.timesInRange')}}</span>
<input @blur="blurChange('616', $event)" v-model="inputData['616']"
@input="change('616', $event)" type="number" placeholder="0" />
<input
@blur="blurChange('620', $event)"
v-model="inputData['620']"
@input="change('620', $event)"
type="number"
placeholder="0"
/>
<span style="font-size: 16px">{{
$t("irrigateSetSoil.intervalStart.timesInRange")
}}</span>
<input
@blur="blurChange('616', $event)"
v-model="inputData['616']"
@input="change('616', $event)"
type="number"
placeholder="0"
/>
</div>
</div>
<div class="flex-view shrink-none">
<div class="number circle">2</div>
<div class="input-main-60">
<input @blur="blurChange('622', $event)" v-model="inputData['622']"
@input="change('622', $event)" type="number" placeholder="0" />
<input
@blur="blurChange('622', $event)"
v-model="inputData['622']"
@input="change('622', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input @blur="blurChange('623', $event)" v-model="inputData['623']"
@input="change('623', $event)" type="number" placeholder="0" />
<input
@blur="blurChange('623', $event)"
v-model="inputData['623']"
@input="change('623', $event)"
type="number"
placeholder="0"
/>
<span>-</span>
<input @blur="blurChange('624', $event)" v-model="inputData['624']"
@input="change('624', $event)" type="number" placeholder="0" />
<input
@blur="blurChange('624', $event)"
v-model="inputData['624']"
@input="change('624', $event)"
type="number"
placeholder="0"
/>
<span>:</span>
<input @blur="blurChange('625', $event)" v-model="inputData['625']"
@input="change('625', $event)" type="number" placeholder="0" />
<span style="font-size: 16px">{{$t('irrigateSetSoil.intervalStart.timesInRange')}}</span>
<input @blur="blurChange('621', $event)" v-model="inputData['621']"
@input="change('621', $event)" type="number" placeholder="0" />
<input
@blur="blurChange('625', $event)"
v-model="inputData['625']"
@input="change('625', $event)"
type="number"
placeholder="0"
/>
<span style="font-size: 16px">{{
$t("irrigateSetSoil.intervalStart.timesInRange")
}}</span>
<input
@blur="blurChange('621', $event)"
v-model="inputData['621']"
@input="change('621', $event)"
type="number"
placeholder="0"
/>
</div>
</div>
</template>
</block>
<!-- 联动模式 -->
<!-- -->
<block v-show="inputData['603'] == 3">
<template>
<div class="title-tips-bold">
联动模式
</div>
<div class="title-tips-bold">联动模式</div>
<div class="flex-view shrink-none">
<div class="input-main-60">
<span>施肥机启动时提前</span>
<input @blur="blurChange('626', $event)" v-model="inputData['626']"
@input="change('626', $event)" type="text" value="60" placeholder="60" />
<input
@blur="blurChange('626', $event)"
v-model="inputData['626']"
@input="change('626', $event)"
type="text"
value="60"
placeholder="60"
/>
<span>联动施肥配方搅拌</span>
</div>
</div>
</template>
</block>
<div class="flex-view padding-none border-none shrink-none">
<div class="input-main-60">
<span>A肥通道选择</span>
<input @blur="blurChange('627', $event)" v-model="inputData['627']"
@input="change('627', $event)" type="text" value="60" placeholder="60" />
<input
@blur="blurChange('627', $event)"
v-model="inputData['627']"
@input="change('627', $event)"
type="text"
value="60"
placeholder="60"
/>
</div>
</div>
<div class="flex-view padding-none border-none shrink-none">
<span></span>
<div class="input-main-60">
<span>B肥通道选择</span>
<input @blur="blurChange('628', $event)" v-model="inputData['628']"
@input="change('628', $event)" type="text" value="60" placeholder="60" />
<input
@blur="blurChange('628', $event)"
v-model="inputData['628']"
@input="change('628', $event)"
type="text"
value="60"
placeholder="60"
/>
</div>
</div>
<div class="flex-view padding-none border-none shrink-none">
<span></span>
<div class="input-main-60">
<span>C肥通道选择</span>
<input @blur="blurChange('629', $event)" v-model="inputData['629']"
@input="change('629', $event)" type="text" value="60" placeholder="60" />
</div>
</div>
<div class="flex-view padding-none border-none shrink-none">
<div class="input-main-60">
<span>D肥通道选择</span>
<input @blur="blurChange('630', $event)" v-model="inputData['630']"
@input="change('630', $event)" type="text" value="60" placeholder="60" />
</div>
</div>
<div class="flex-view padding-none border-none shrink-none">
<div class="input-main-60">
<span>E肥通道选择</span>
<input @blur="blurChange('631', $event)" v-model="inputData['631']"
@input="change('631', $event)" type="text" value="60" placeholder="60" />
</div>
</div>
<div class="flex-view padding-none border-none shrink-none">
<div class="input-main-60">
<span>F肥通道选择</span>
<input @blur="blurChange('632', $event)" v-model="inputData['632']"
@input="change('632', $event)" type="text" value="60" placeholder="60" />
</div>
</div>
<div class="flex-view padding-none border-none shrink-none">
<div class="input-main-60">
<span>G肥通道选择</span>
<input @blur="blurChange('633', $event)" v-model="inputData['633']"
@input="change('633', $event)" type="text" value="60" placeholder="60" />
</div>
</div>
<div class="flex-view padding-none border-none shrink-none">
<div class="input-main-60">
<span>H肥通道选择</span>
<input @blur="blurChange('634', $event)" v-model="inputData['634']"
@input="change('634', $event)" type="text" value="60" placeholder="60" />
</div>
</div>
<div class="flex-view padding-none border-none shrink-none">
<div class="input-main-60">
<span>酸肥通道选择</span>
<input @blur="blurChange('635', $event)" v-model="inputData['635']"
@input="change('635', $event)" type="text" value="60" placeholder="60" />
<input
@blur="blurChange('629', $event)"
v-model="inputData['629']"
@input="change('629', $event)"
type="text"
value="60"
placeholder="60"
/>
</div>
</div>
<div class="flex-view padding-none border-none shrink-none">
<div class="input-main-60">
<span>D肥通道选择</span>
<input
@blur="blurChange('630', $event)"
v-model="inputData['630']"
@input="change('630', $event)"
type="text"
value="60"
placeholder="60"
/>
</div>
<span></span>
<div class="input-main-60">
<span>F肥通道选择</span>
<input
@blur="blurChange('632', $event)"
v-model="inputData['632']"
@input="change('632', $event)"
type="text"
value="60"
placeholder="60"
/>
</div>
<span></span>
<div class="input-main-60">
<span>G肥通道选择</span>
<input
@blur="blurChange('633', $event)"
v-model="inputData['633']"
@input="change('633', $event)"
type="text"
value="60"
placeholder="60"
/>
</div>
</div>
<div class="flex-view padding-none border-none shrink-none">
<div class="input-main-60">
<span>H肥通道选择</span>
<input
@blur="blurChange('634', $event)"
v-model="inputData['634']"
@input="change('634', $event)"
type="text"
value="60"
placeholder="60"
/>
</div>
<span></span>
<div class="input-main-60">
<span>酸通道选择</span>
<input
@blur="blurChange('635', $event)"
v-model="inputData['635']"
@input="change('635', $event)"
type="text"
value="60"
placeholder="60"
/>
</div>
</div>
</div>
</template>
<script>
@ -297,26 +513,26 @@ export default {
inputDataNew: [],
actList1: [],
loading: null,
pageName: '搅拌程序',
pageName: "搅拌配置",
typeList1: [
{ label:'时间点模式', value:1 },
{ label:'时间段模式', value:2 },
{ label:'联动模式', value:3 },
{ label: "时间点模式", value: 1 },
{ label: "时间段模式", value: 2 },
{ label: "联动模式", value: 3 },
],
}
};
},
watch: {
$route(newVal, oldVal) {
const that = this;
this.indexs = this.$route.query.id ? this.$route.query.id : 1;
if (this.$route.query.name) {
this.pageName = this.$route.query.name
this.pageName = this.$route.query.name;
}
setTimeout(() => {
that.getActive1();
}, 0);
},
'$store.state.equipmentIndex'(newVal, oldVal) {
"$store.state.equipmentIndex"(newVal, oldVal) {
this.dataInit();
},
},
@ -328,18 +544,18 @@ export default {
that.dataInit();
}, 0);
//input
let inputList = document.querySelectorAll('input');
let inputList = document.querySelectorAll("input");
for (let index = 0; index < inputList.length; index++) {
inputList[index].onfocus = this.selectValue; //input
}
if (this.$route.query.name) {
this.pageName = this.$route.query.name
this.pageName = this.$route.query.name;
}
},
methods: {
// x/10
blurChange10(code, el) {
var store = this.$store.state
var store = this.$store.state;
var data = {
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
regAddress: code,
@ -352,41 +568,40 @@ export default {
// this.timer && clearInterval(this.timer);
// this.changeData(data);
// }
},
// x/10
changeCount10(code, el) {
var data = el.target.value * 10
var data = el.target.value * 10;
var sendData = {
target: {
value: data
}
}
this.change(code, sendData)
value: data,
},
};
this.change(code, sendData);
},
// x/10
countData10(data) {
if (data) {
return data / 10
return data / 10;
} else {
return 0
return 0;
}
},
// (x - 400) / 10
countData(data) {
if (data) {
return (data - 400) / 10
return (data - 400) / 10;
} else {
return 0
return 0;
}
},
//
blurChangeCount(code, el) {
var store = this.$store.state
var store = this.$store.state;
var data = {
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
regAddress: code,
num: (el.target.value * 10) + 400,
num: el.target.value * 10 + 400,
}; //
if (store.nowInput != el.target.value) {
this.changeData(data);
@ -397,13 +612,13 @@ export default {
// }
},
changeCountData(code, el) {
var data = (el.target.value * 10) + 400
var data = el.target.value * 10 + 400;
var sendData = {
target: {
value: data
}
}
this.change(code, sendData)
value: data,
},
};
this.change(code, sendData);
},
getData1(data) {
var name = "";
@ -429,13 +644,13 @@ export default {
this.changeBtn(code, dataNum);
},
changeIndexOpen1(active) {
if (this.actList1[active] == '1') {
this.actList1[active] = '0'
if (this.actList1[active] == "1") {
this.actList1[active] = "0";
} else {
this.actList1[active] = '1'
this.actList1[active] = "1";
}
this.$forceUpdate();
var revList = this.actList1.slice().reverse()
var revList = this.actList1.slice().reverse();
var num = revList.join("");
var dataNum = {
target: {
@ -445,12 +660,12 @@ export default {
this.changeBtn(602, dataNum);
},
getActive1() {
this.actList1 = []
var num = this.inputData['602']
this.actList1 = [];
var num = this.inputData["602"];
var num1 = this.padString(num.toString(2), 8)
var openListNew = []
openListNew = num1.split("")
var num1 = this.padString(num.toString(2), 8);
var openListNew = [];
openListNew = num1.split("");
this.actList1 = openListNew.reverse();
},
@ -465,24 +680,24 @@ export default {
this.changeBtn(21400, dataNum);
},
change00(index) {
var list = ['0','0','0'];
list[index]='1'
this.topActive=list
var list = ["0", "0", "0"];
list[index] = "1";
this.topActive = list;
this.$forceUpdate();
var revList = list.slice().reverse()
var revList = list.slice().reverse();
var num = revList.join("");
var dataNum = {
target: {
value: parseInt(num, 2),
},
};
this.changeBtn('600', dataNum);
this.changeBtn("600", dataNum);
},
getType00() {
var number = this.padString(this.inputData['600'].toString(2), 3)
var number = this.padString(this.inputData["600"].toString(2), 3);
console.log(number);
var openListNew = []
openListNew = number.split("")
var openListNew = [];
openListNew = number.split("");
this.topActive = openListNew.reverse();
// if (Number(number[0])) {
// this.topActive = 1
@ -497,25 +712,25 @@ export default {
dataInit() {
this.loading = this.$loading({
lock: true,
text: this.$t('message.loading'),
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
text: this.$t("message.loading"),
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
var store = this.$store.state
var store = this.$store.state;
var data = {
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
pattern: 600, // //6ph-
regNum: 36,
};
this.api.postReg(data).then(res => {
this.loading.close()
this.api.postReg(data).then((res) => {
this.loading.close();
if (res.data.code == 200) {
this.inputData = res.data.data;
this.inputDataNew = JSON.parse(JSON.stringify(res.data.data));
this.getType00();
this.getActive1()
this.getActive1();
this.inputDataNew[603] = this.getData1(this.inputData[603]);
@ -523,25 +738,25 @@ export default {
this.inputData[604] = this.countData10(this.inputData[604]);
this.inputData[615] = this.countData10(this.inputData[615]);
}
})
});
},
//
padString(str, length) {
return str.padStart(length, '0');
return str.padStart(length, "0");
},
//
myReverse(arr) {
return [...arr].reverse()
return [...arr].reverse();
},
//
selectValue(e) {
var store = this.$store.state
store.nowInput = e.target.value
var store = this.$store.state;
store.nowInput = e.target.value;
e.currentTarget.select();
},
//
blurChange(code, el) {
var store = this.$store.state
var store = this.$store.state;
var data = {
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
regAddress: code,
@ -555,11 +770,10 @@ export default {
// this.timer && clearInterval(this.timer);
// this.changeData(data);
// }
},
//
changeBtn(code, el) {
var store = this.$store.state
var store = this.$store.state;
var data = {
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
regAddress: code,
@ -584,7 +798,7 @@ export default {
}, 100);
},
change(code, el) {
var store = this.$store.state
var store = this.$store.state;
var data = {
equipmentId: store.equipmentList[store.equipmentIndex - 1].deviceId,
regAddress: code,
@ -599,7 +813,6 @@ export default {
// let j = this.$store.state.lateSend;
// //
// this.timer && clearInterval(this.timer);
// this.timer = setInterval(() => {
// ++i;
// if (i == j) {
@ -609,24 +822,23 @@ export default {
// }, 100);
},
changeData(data) {
var store = this.$store.state
var store = this.$store.state;
this.api.postWriteFs(data).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.msg,
type: "success",
});
store.nowInput = ''
store.nowInput = "";
// this.dataInit();
} else {
this.inputData[data.regAddress] = store.nowInput
this.inputData[data.regAddress] = store.nowInput;
this.$message.error(res.data.msg);
}
this.timer = null
this.timer = null;
});
},
},
}
};
</script>
<style lang="scss"></style>