Compare commits

..

No commits in common. "258988e4ec867dd7e130f6828f2b6fc7ea6dd0ae" and "adad14e6184626845b9d25c96c694bee007429db" have entirely different histories.

6 changed files with 108 additions and 182 deletions

3
package-lock.json generated
View File

@ -5694,7 +5694,6 @@
"version": "7.2.3", "version": "7.2.3",
"resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz", "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"deprecated": "Glob versions prior to v9 are no longer supported",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"fs.realpath": "^1.0.0", "fs.realpath": "^1.0.0",
@ -6193,7 +6192,6 @@
"version": "1.0.6", "version": "1.0.6",
"resolved": "https://registry.npmmirror.com/inflight/-/inflight-1.0.6.tgz", "resolved": "https://registry.npmmirror.com/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
"deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"once": "^1.3.0", "once": "^1.3.0",
@ -9003,7 +9001,6 @@
"version": "3.0.2", "version": "3.0.2",
"resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-3.0.2.tgz", "resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"deprecated": "Rimraf versions prior to v4 are no longer supported",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"glob": "^7.1.3" "glob": "^7.1.3"

View File

@ -912,7 +912,7 @@ textarea {
} }
.formula .page-content { .formula .page-content {
width: calc(100% - 250px); width: calc(100% - 300px);
height: 100%; height: 100%;
background: rgba(0, 92, 178, 0.15); background: rgba(0, 92, 178, 0.15);
border: 2px solid rgba(0, 186, 255, 0.2); border: 2px solid rgba(0, 186, 255, 0.2);

View File

@ -955,7 +955,7 @@ textarea{
justify-content: space-between; justify-content: space-between;
.page-content { .page-content {
width: calc(100% - 250px); width: calc(100% - 300px);
height: 100%; height: 100%;
background: rgba(0, 92, 178, 0.15); background: rgba(0, 92, 178, 0.15);
border: 2px solid rgba(0, 186, 255, 0.20); border: 2px solid rgba(0, 186, 255, 0.20);

View File

@ -157,7 +157,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.set-params { .set-params {
width: 230px; width: 280px;
height: 100%; height: 100%;
background: rgba(0, 92, 178, 0.15); background: rgba(0, 92, 178, 0.15);
border: 2px solid rgba(0, 186, 255, 0.20); border: 2px solid rgba(0, 186, 255, 0.20);

View File

@ -491,7 +491,7 @@ if (el.child.length) {
<style lang="scss" scoped> <style lang="scss" scoped>
.set-params { .set-params {
width: 230px; width: 280px;
height: 100%; height: 100%;
background: rgba(0, 92, 178, 0.15); background: rgba(0, 92, 178, 0.15);
border: 2px solid rgba(0, 186, 255, 0.2); border: 2px solid rgba(0, 186, 255, 0.2);

View File

@ -8,16 +8,16 @@
<div class="flex-view"> <div class="flex-view">
<div class="input-btn"> <div class="input-btn">
<span>控制模式选择</span> <span>控制模式选择</span>
<div class="btn" @click="change00(3)" :class="inputData['1' + (10 + (indexs - 1)) + '00'] == 3 ? 'blue' : 'green' <div class="btn" @click="change00(3)"
"> :class="inputData['1' + (10 + (indexs - 1)) + '00'] == 3 ? 'blue' : 'green'">
<img src="../../assets/image/irrigateSet1.png" alt="" />停止 <img src="../../assets/image/irrigateSet1.png" alt="" />停止
</div> </div>
<div class="btn" @click="change00(2)" :class="inputData['1' + (10 + (indexs - 1)) + '00'] == 2 ? 'blue' : 'green' <div class="btn" @click="change00(2)"
"> :class="inputData['1' + (10 + (indexs - 1)) + '00'] == 2 ? 'blue' : 'green'">
<img src="../../assets/image/irrigateSet3.png" alt="" />手动启动 <img src="../../assets/image/irrigateSet3.png" alt="" />手动启动
</div> </div>
<div class="btn" @click="change00(1)" :class="inputData['1' + (10 + (indexs - 1)) + '00'] == 1 ? 'blue' : 'green' <div class="btn" @click="change00(1)"
"> :class="inputData['1' + (10 + (indexs - 1)) + '00'] == 1 ? 'blue' : 'green'">
<img src="../../assets/image/irrigateSet2.png" alt="" />自动 <img src="../../assets/image/irrigateSet2.png" alt="" />自动
</div> </div>
</div> </div>
@ -50,31 +50,6 @@
v-model="inputData['1' + (10 + (indexs - 1)) + '05']" v-model="inputData['1' + (10 + (indexs - 1)) + '05']"
@input="change('1' + (10 + (indexs - 1)) + '05', $event)" type="number" placeholder="0" /> @input="change('1' + (10 + (indexs - 1)) + '05', $event)" type="number" placeholder="0" />
</div> </div>
</div>
<div class="flex-view">
<div class="flex-view border-none padding-none">
<div class="input-main input-main-w120">
<span>下雨禁止灌溉功能</span>
</div>
<div class="input-btn">
<div class="btn btn-w80" @click="change71()"
:class="inputData['1' + (10 + (indexs - 1)) + '71'] == '1' ? 'blue' : 'green'">
{{ inputData['1' + (10 + (indexs - 1)) + '71'] == '1' ? '开启' : '关闭' }}
</div>
</div>
<div class="input-main input-main-w120">
<span>(自动模式下生效)</span>
</div>
</div>
<div class="input-main-80">
<span>雨量达到</span>
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '72', $event)"
v-model="inputData['1' + (10 + (indexs - 1)) + '72']"
@input="change('1' + (10 + (indexs - 1)) + '72', $event)" type="number" placeholder="0" />
<span>mm,本灌溉组停止灌溉</span>
</div>
</div> </div>
<!-- <div class="flex-view"> <!-- <div class="flex-view">
<div class="input-main-80"> <div class="input-main-80">
@ -132,12 +107,14 @@
<input @blur="blurChange('1' + (10 + (indexs - 1)) + '61', $event)" <input @blur="blurChange('1' + (10 + (indexs - 1)) + '61', $event)"
v-model="inputData['1' + (10 + (indexs - 1)) + '61']" v-model="inputData['1' + (10 + (indexs - 1)) + '61']"
@input="change('1' + (10 + (indexs - 1)) + '61', $event)" type="text" placeholder="0" /> @input="change('1' + (10 + (indexs - 1)) + '61', $event)" type="text" placeholder="0" />
</div> </div>
<!-- <div class="btn green"> <!-- <div class="btn green">
<img src="../../assets/image/rotate.png" alt="" />轮模式启用 <img src="../../assets/image/rotate.png" alt="" />轮模式启用
</div> --> </div> -->
</div> </div>
<div class="flex-view"> <div class="flex-view">
<!-- <div @click="(open1 = !open1), change59()" class="open-btn" :class="open1 ? 'active' : ''"> <!-- <div @click="(open1 = !open1), change59()" class="open-btn" :class="open1 ? 'active' : ''">
<img v-if="!open1" src="../../assets/image/irrigateSet-icon1.png" alt="" /> <img v-if="!open1" src="../../assets/image/irrigateSet-icon1.png" alt="" />
<img v-else src="../../assets/image/irrigateSet-icon1-act.png" alt="" /> <img v-else src="../../assets/image/irrigateSet-icon1-act.png" alt="" />
@ -496,7 +473,7 @@
<el-dialog :modal-append-to-body="false" :show-close="false" :close-on-click-modal="true" :visible.sync="model4" <el-dialog :modal-append-to-body="false" :show-close="false" :close-on-click-modal="true" :visible.sync="model4"
width="700px" :before-close="handleClose4"> width="700px" :before-close="handleClose4">
<div class="page-title title-302">{{ indexs }}#灌溉组控制参数配置</div> <div class="page-title title-302">{{ indexs }}#灌溉组控制参数配置</div>
<div style="display: flex; align-items: center"> <div style="display: flex;align-items: center;">
<div class="btn blue"> <div class="btn blue">
<img src="../../assets/image/model4-icon.png" alt="" />外控模式 <img src="../../assets/image/model4-icon.png" alt="" />外控模式
</div> </div>
@ -528,13 +505,9 @@
<div class="model1-top model4-top"> <div class="model1-top model4-top">
<div class="model-left"> <div class="model-left">
<div class="btn btn-w80" @click=" <div class="btn btn-w80" @click="blurChange('1' + (10 + (indexs - 1)) + '71', { target: { value: 1 } }), model4Sel = 1"
blurChange('1' + (10 + (indexs - 1)) + '71', { :class="model4Sel == 1 ? 'blue' : 'off'">
target: { value: 1 }, {{ model4Sel == 1 ? '有效' : '无效' }}
}),
(model4Sel = 1)
" :class="model4Sel == 1 ? 'blue' : 'off'">
{{ model4Sel == 1 ? "有效" : "无效" }}
</div> </div>
<span>外部数字量控制方式:</span> <span>外部数字量控制方式:</span>
</div> </div>
@ -562,13 +535,10 @@
</div> </div>
<div class="model1-top model4-top"> <div class="model1-top model4-top">
<div class="model-left"> <div class="model-left">
<div class="btn btn-w80" @click=" <div class="btn btn-w80 "
blurChange('1' + (10 + (indexs - 1)) + '71', { @click="blurChange('1' + (10 + (indexs - 1)) + '71', { target: { value: 2 } }), model4Sel = 2"
target: { value: 2 }, :class="model4Sel == 2 ? 'blue' : 'off'">
}), {{ model4Sel == 2 ? '有效' : '无效' }}
(model4Sel = 2)
" :class="model4Sel == 2 ? 'blue' : 'off'">
{{ model4Sel == 2 ? "有效" : "无效" }}
</div> </div>
<span>液位传感器控制方式:</span> <span>液位传感器控制方式:</span>
</div> </div>
@ -590,6 +560,7 @@
@input="change('1' + (10 + (indexs - 1)) + '69', $event)" type="number" placeholder="0" /> @input="change('1' + (10 + (indexs - 1)) + '69', $event)" type="number" placeholder="0" />
<span>cm</span> <span>cm</span>
</div> </div>
</div> </div>
<div> <div>
<div class="input-main-80"> <div class="input-main-80">
@ -612,6 +583,7 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
topActive: 1, topActive: 1,
@ -630,17 +602,17 @@ export default {
data53: "", data53: "",
inputData: {}, inputData: {},
loading: null, loading: null,
pageName: "", pageName:'',
}; };
}, },
watch: { watch: {
"$store.state.equipmentIndex": function (newValue, oldValue) { '$store.state.equipmentIndex': function (newValue, oldValue) {
const that = this; const that = this;
this.loading = this.$loading({ this.loading = this.$loading({
lock: true, lock: true,
text: "加载中", text: '加载中',
spinner: "el-icon-loading", spinner: 'el-icon-loading',
background: "rgba(0, 0, 0, 0.7)", background: 'rgba(0, 0, 0, 0.7)'
}); });
setTimeout(() => { setTimeout(() => {
that.dataInit(); that.dataInit();
@ -649,14 +621,12 @@ export default {
$route(newVal, oldVal) { $route(newVal, oldVal) {
const that = this; const that = this;
this.indexs = this.$route.query.id ? this.$route.query.id : 1; this.indexs = this.$route.query.id ? this.$route.query.id : 1;
this.pageName = this.$route.query.name this.pageName=this.$route.query.name?this.$route.query.name:(this.indexs+'#智能灌溉组')
? this.$route.query.name
: this.indexs + "#智能灌溉组";
this.loading = this.$loading({ this.loading = this.$loading({
lock: true, lock: true,
text: "加载中", text: '加载中',
spinner: "el-icon-loading", spinner: 'el-icon-loading',
background: "rgba(0, 0, 0, 0.7)", background: 'rgba(0, 0, 0, 0.7)'
}); });
setTimeout(() => { setTimeout(() => {
that.dataInit(); that.dataInit();
@ -668,40 +638,38 @@ export default {
this.indexs = this.$route.query.id ? this.$route.query.id : 1; this.indexs = this.$route.query.id ? this.$route.query.id : 1;
console.log(this.$route); console.log(this.$route);
this.pageName = this.$route.query.name this.pageName=this.$route.query.name?this.$route.query.name:(this.indexs+'#智能灌溉组')
? this.$route.query.name
: this.indexs + "#智能灌溉组";
this.loading = this.$loading({ this.loading = this.$loading({
lock: true, lock: true,
text: "加载中", text: '加载中',
spinner: "el-icon-loading", spinner: 'el-icon-loading',
background: "rgba(0, 0, 0, 0.7)", background: 'rgba(0, 0, 0, 0.7)'
}); });
setTimeout(() => { setTimeout(() => {
that.dataInit(); that.dataInit();
}, 0); }, 0);
//input //input
let inputList = document.querySelectorAll("input"); let inputList = document.querySelectorAll('input');
for (let index = 0; index < inputList.length; index++) { for (let index = 0; index < inputList.length; index++) {
inputList[index].onfocus = this.selectValue; //input inputList[index].onfocus = this.selectValue;//input
} }
}, },
methods: { methods: {
countData10(data) { countData10(data) {
if (data) { if (data) {
return data / 10; return data / 10
} else { } else {
return 0; return 0
} }
}, },
changeData10(code, el) { changeData10(code, el) {
var data = el.target.value * 10; var data = el.target.value * 10
var sendData = { var sendData = {
target: { target: {
value: data, value: data
}, }
}; }
this.change(code, sendData); this.change(code, sendData)
}, },
handleCommand(command) { handleCommand(command) {
if (command == "1") { if (command == "1") {
@ -715,14 +683,15 @@ export default {
} else if (command == "5") { } else if (command == "5") {
this.model4 = true; this.model4 = true;
} }
this.inputData["1" + (10 + (this.indexs - 1)) + "51"] = command; this.inputData['1' + (10 + (this.indexs - 1)) + "51"] = command;
this.get53data(command); this.get53data(command)
var data53 = { var data53 = {
target: { target: {
value: this.inputData["1" + (10 + (this.indexs - 1)) + "51"], value: this.inputData['1' + (10 + (this.indexs - 1)) + "51"],
}, },
}; }
this.changeBtn("1" + (10 + (this.indexs - 1)) + "51", data53); this.changeBtn('1' + (10 + (this.indexs - 1)) + "51", data53);
}, },
get53data(index) { get53data(index) {
var data = index; var data = index;
@ -741,7 +710,7 @@ export default {
this.data53 = text53; this.data53 = text53;
}, },
change00(index) { change00(index) {
this.topActive = index; this.topActive = index
// var list = ["0", "0", "0"]; // var list = ["0", "0", "0"];
// if (index == 1) { // if (index == 1) {
// list[0] = "1"; // list[0] = "1";
@ -758,52 +727,32 @@ export default {
// } else { // } else {
// list[2] = "0"; // list[2] = "0";
// } // }
this.inputData["1" + (10 + (this.indexs - 1)) + "00"] = index; this.inputData['1' + (10 + (this.indexs - 1)) + '00'] = index
// var num = list.join(""); // var num = list.join("");
var dataNum = { var dataNum = {
target: { target: {
value: index, value: index,
}, },
}; };
this.changeBtn("1" + (10 + (this.indexs - 1)) + "00", dataNum); this.changeBtn('1' + (10 + (this.indexs - 1)) + "00", dataNum);
}, },
padString(str, length) { padString(str, length) {
return str.padStart(length, "0"); return str.padStart(length, '0');
}, },
getType00() { getType00() {
var number = this.padString( var number = this.padString(this.inputData['1' + (10 + (this.indexs - 1)) + "00"].toString(2), 3)
this.inputData["1" + (10 + (this.indexs - 1)) + "00"].toString(2),
3
);
if (Number(number[0])) { if (Number(number[0])) {
this.topActive = 1; this.topActive = 1
} else if (Number(number[1])) { } else if (Number(number[1])) {
this.topActive = 2; this.topActive = 2
} else if (Number(number[2])) { } else if (Number(number[2])) {
this.topActive = 3; this.topActive = 3
} else { } else {
this.topActive = 0; this.topActive = 0
} }
console.log(this.topActive, 11); console.log(this.topActive, 11);
}, },
change71() {
var num = 0;
if (this.inputData["1" + (10 + (this.indexs - 1)) + "71"] == 1) {
this.inputData["1" + (10 + (this.indexs - 1)) + "71"] = 0;
num = 0;
} else {
this.inputData["1" + (10 + (this.indexs - 1)) + "71"] = 1;
num = 1;
}
var dataNum = {
target: {
value: num,
},
};
this.changeBtn("1" + (10 + (this.indexs - 1)) + "71", dataNum);
},
change59() { change59() {
// var list = ["0", "0", "0", "0"]; // var list = ["0", "0", "0", "0"];
// if (this.open1) { // if (this.open1) {
@ -826,13 +775,13 @@ export default {
// } else { // } else {
// list[0] = "0"; // list[0] = "0";
// } // }
var num = 0; var num = 0
if (this.inputData["1" + (10 + (this.indexs - 1)) + "62"] == 1) { if (this.inputData['1' + (10 + (this.indexs - 1)) + '62'] == 1) {
this.inputData["1" + (10 + (this.indexs - 1)) + "62"] = 0; this.inputData['1' + (10 + (this.indexs - 1)) + '62'] = 0
num = 0; num = 0
} else { } else {
this.inputData["1" + (10 + (this.indexs - 1)) + "62"] = 1; this.inputData['1' + (10 + (this.indexs - 1)) + '62'] = 1
num = 1; num = 1
} }
var dataNum = { var dataNum = {
@ -840,13 +789,10 @@ export default {
value: num, value: num,
}, },
}; };
this.changeBtn("1" + (10 + (this.indexs - 1)) + "62", dataNum); this.changeBtn('1' + (10 + (this.indexs - 1)) + "62", dataNum);
}, },
getType() { getType() {
var number = this.padString( var number = this.padString(this.inputData['1' + (10 + (this.indexs - 1)) + "59"].toString(2), 4)
this.inputData["1" + (10 + (this.indexs - 1)) + "59"].toString(2),
4
);
console.log(number); console.log(number);
if (Number(number[3])) { if (Number(number[3])) {
this.open1 = true; this.open1 = true;
@ -872,66 +818,44 @@ export default {
} }
}, },
dataInit() { dataInit() {
var indexs = this.indexs; var indexs = this.indexs
var store = this.$store.state; var store = this.$store.state
var data = { var data = {
deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId, deviceId: store.equipmentList[store.equipmentIndex - 1].deviceId,
}; };
// this.api.readFi_irrigate() // this.api.readFi_irrigate()
this.api this.api.readFi_irrigate(`/readFi/irrigate${indexs}`, data).then((res) => {
.readFi_irrigate(`/readFi/irrigate${indexs}`, data) this.loading.close()
.then((res) => { if (res.data.code == 200) {
this.loading.close(); this.inputData = res.data.data;
if (res.data.code == 200) { // this.getType();
this.inputData = res.data.data; // this.getType00();
// this.getType(); this.get53data(this.inputData['1' + (10 + (this.indexs - 1)) + "51"]);
// this.getType00(); this.inputData['1' + (10 + (indexs - 1)) + '01'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '01'])
this.get53data( this.inputData['1' + (10 + (indexs - 1)) + '06'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '06'])
this.inputData["1" + (10 + (this.indexs - 1)) + "51"] this.inputData['1' + (10 + (indexs - 1)) + '17'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '17'])
); this.inputData['1' + (10 + (indexs - 1)) + '39'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '39'])
this.inputData["1" + (10 + (indexs - 1)) + "01"] = this.countData10( this.inputData['1' + (10 + (indexs - 1)) + '40'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '40'])
this.inputData["1" + (10 + (indexs - 1)) + "01"] this.inputData['1' + (10 + (indexs - 1)) + '43'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '43'])
); this.inputData['1' + (10 + (indexs - 1)) + '44'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '44'])
this.inputData["1" + (10 + (indexs - 1)) + "06"] = this.countData10( this.inputData['1' + (10 + (indexs - 1)) + '37'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '37'])
this.inputData["1" + (10 + (indexs - 1)) + "06"] this.inputData['1' + (10 + (indexs - 1)) + '38'] = this.countData10(this.inputData['1' + (10 + (indexs - 1)) + '38'])
);
this.inputData["1" + (10 + (indexs - 1)) + "17"] = this.countData10(
this.inputData["1" + (10 + (indexs - 1)) + "17"]
);
this.inputData["1" + (10 + (indexs - 1)) + "39"] = this.countData10(
this.inputData["1" + (10 + (indexs - 1)) + "39"]
);
this.inputData["1" + (10 + (indexs - 1)) + "40"] = this.countData10(
this.inputData["1" + (10 + (indexs - 1)) + "40"]
);
this.inputData["1" + (10 + (indexs - 1)) + "43"] = this.countData10(
this.inputData["1" + (10 + (indexs - 1)) + "43"]
);
this.inputData["1" + (10 + (indexs - 1)) + "44"] = this.countData10(
this.inputData["1" + (10 + (indexs - 1)) + "44"]
);
this.inputData["1" + (10 + (indexs - 1)) + "37"] = this.countData10(
this.inputData["1" + (10 + (indexs - 1)) + "37"]
);
this.inputData["1" + (10 + (indexs - 1)) + "38"] = this.countData10(
this.inputData["1" + (10 + (indexs - 1)) + "38"]
);
this.model4Sel = this.inputData["1" + (10 + (indexs - 1)) + "71"]; this.model4Sel = this.inputData['1' + (10 + (indexs - 1)) + '71']
} else { } else {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}); });
}, },
// //
selectValue(e) { selectValue(e) {
var store = this.$store.state; var store = this.$store.state
store.nowInput = e.target.value; store.nowInput = e.target.value
e.currentTarget.select(); e.currentTarget.select();
}, },
// //
blurChange10(code, el) { blurChange10(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,
@ -944,10 +868,11 @@ export default {
// this.timer && clearInterval(this.timer); // this.timer && clearInterval(this.timer);
// this.changeData(data); // this.changeData(data);
// } // }
}, },
// //
blurChange(code, el) { blurChange(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,
@ -960,9 +885,10 @@ export default {
// this.timer && clearInterval(this.timer); // this.timer && clearInterval(this.timer);
// this.changeData(data); // this.changeData(data);
// } // }
}, },
changeBtn(code, el) { changeBtn(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,
@ -986,10 +912,12 @@ export default {
} }
}, 100); }, 100);
}, },
changeModel4() { }, changeModel4() {
},
// //
change(code, el) { change(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,
@ -1004,6 +932,7 @@ export default {
// let j = this.$store.state.lateSend; // let j = this.$store.state.lateSend;
// // // //
// this.timer && clearInterval(this.timer); // this.timer && clearInterval(this.timer);
// this.timer = setInterval(() => { // this.timer = setInterval(() => {
// ++i; // ++i;
// if (i == j) { // if (i == j) {
@ -1013,20 +942,20 @@ export default {
// }, 100); // }, 100);
}, },
changeData(data) { changeData(data) {
var store = this.$store.state; var store = this.$store.state
this.api.postwriteFi_write(data).then((res) => { this.api.postwriteFi_write(data).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.$message({ this.$message({
message: res.data.msg, message: res.data.msg,
type: "success", type: "success",
}); });
store.nowInput = ""; store.nowInput = ''
// this.dataInit(); // this.dataInit();
} else { } else {
this.inputData[data.regAddress] = store.nowInput; this.inputData[data.regAddress] = store.nowInput
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
this.timer = null; this.timer = null
}); });
}, },
handleClose1(done) { handleClose1(done) {