This commit is contained in:
sunmeng 2025-01-08 15:22:36 +08:00
parent b047eae23c
commit aa400289b2
2 changed files with 220 additions and 97 deletions

View File

@ -85,12 +85,62 @@
</div> </div>
</div> </div>
<div class="input-main-80"> <div class="input-main-80">
<span>室外光照大于</span> <span>光照大于</span>
<input @blur="blurChange10(21403, $event)" v-model="inputData[21403]" @input="changeCount10(21403, $event)" <input @blur="blurChange10(21403, $event)" v-model="inputData[21403]"
type="text" placeholder="0"> @input="changeCount10(21403, $event)" type="text" placeholder="0">
<span>(KLux)禁止启用补光灯 </span> <span>(KLux)禁止启用补光灯 </span>
</div> </div>
</div> </div>
<div class="flex-view padding-none border-none shrink-none">
<div class="input-btn">
<div class="btn btn-w80" @click="changeIndexOpen2(4)" :class="actList3[4] == '1' ? 'blue' : 'off'">
{{ actList3[4] == '1' ? '有效' : '无效' }}
</div>
</div>
<div class="input-main-80">
<span>光照低限条件启用</span>
</div>
</div>
<div class="flex-view padding-none shrink-none border-none">
<div class="input-main-80">
<span></span> <span></span> <span></span> <span></span> <span></span>
<span>光照小于</span>
<input @blur="blurChange10(21425, $event)" v-model="inputData[21425]"
@input="changeCount10(21425, $event)" type="text" placeholder="0">
<span>开启补光灯</span>
</div>
<div class="input-main-80">
<span>光照大于</span>
<input @blur="blurChange10(21426, $event)" v-model="inputData[21426]"
@input="changeCount10(21426, $event)" type="text" placeholder="0">
<span>停止补光灯</span>
</div>
</div>
<div class="flex-view padding-none shrink-none">
<div class="input-sel input-sel-w180">
<span></span> <span></span> <span></span> <span></span> <span></span>
<span>光照来源选择</span>
<el-dropdown @command="handleCommand1($event, 21427)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21427]" 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-menu>
</el-dropdown>
</div>
<div class="input-main-80">
<span></span>
<span>光照确定时间</span>
<input @blur="blurChange(21428, $event)" v-model="inputData[21428]" @input="change(21428, $event)"
type="text" placeholder="0">
<span>分钟</span>
</div>
</div>
<div class="flex-view padding-none shrink-none"> <div class="flex-view padding-none shrink-none">
<div class="input-main-80"> <div class="input-main-80">
<span>多组补光灯启动时间隔</span> <span>多组补光灯启动时间隔</span>
@ -99,20 +149,30 @@
<span>秒顺序启动防止同时启动瞬间功率过大</span> <span>秒顺序启动防止同时启动瞬间功率过大</span>
</div> </div>
</div> </div>
<div class="text-tips">时段1</div> <div class="text-tips flex-view padding-none shrink-none border-none">时段1
<div class="input-main-80">
<span></span>
<span>光照低限条件</span>
<div class="input-btn">
<div class="btn btn-w80" @click="changeIndexOpen2(5)" :class="actList3[5] == '1' ? 'blue' : 'off'">
{{ actList3[5] == '1' ? '启用' : '停止' }}
</div>
</div>
</div>
</div>
<div class="flex-view border-none padding-none shrink-none"> <div class="flex-view border-none padding-none shrink-none">
<div class="input-main-80"> <div class="input-main-80">
<input @blur="blurChange(startList[0]-4, $event)" v-model="inputData[startList[0]-4]" @input="change(startList[0]-4, $event)" <input @blur="blurChange(startList[0] - 4, $event)" v-model="inputData[startList[0] - 4]"
type="text" placeholder="0"> @input="change(startList[0] - 4, $event)" type="text" placeholder="0">
<span>:</span> <span>:</span>
<input @blur="blurChange(startList[0]-3, $event)" v-model="inputData[startList[0]-3]" @input="change(startList[0]-3, $event)" <input @blur="blurChange(startList[0] - 3, $event)" v-model="inputData[startList[0] - 3]"
type="text" placeholder="0"> @input="change(startList[0] - 3, $event)" type="text" placeholder="0">
<span>-</span> <span>-</span>
<input @blur="blurChange(startList[0]-2, $event)" v-model="inputData[startList[0]-2]" @input="change(startList[0]-2, $event)" <input @blur="blurChange(startList[0] - 2, $event)" v-model="inputData[startList[0] - 2]"
type="text" placeholder="0"> @input="change(startList[0] - 2, $event)" type="text" placeholder="0">
<span>:</span> <span>:</span>
<input @blur="blurChange(startList[0]-1, $event)" v-model="inputData[startList[0]-1]" @input="change(startList[0]-1, $event)" <input @blur="blurChange(startList[0] - 1, $event)" v-model="inputData[startList[0] - 1]"
type="text" placeholder="0"> @input="change(startList[0] - 1, $event)" type="text" placeholder="0">
</div> </div>
</div> </div>
<div class="flex-view"> <div class="flex-view">
@ -144,20 +204,30 @@
</div> </div>
</div> </div>
<div class="text-tips">时段2</div> <div class="text-tips flex-view padding-none shrink-none border-none">时段2
<div class="input-main-80">
<span></span>
<span>光照低限条件</span>
<div class="input-btn">
<div class="btn btn-w80" @click="changeIndexOpen2(6)" :class="actList3[6] == '1' ? 'blue' : 'off'">
{{ actList3[6] == '1' ? '启用' : '停止' }}
</div>
</div>
</div>
</div>
<div class="flex-view border-none padding-none shrink-none"> <div class="flex-view border-none padding-none shrink-none">
<div class="input-main-80"> <div class="input-main-80">
<input @blur="blurChange(startList[1]-4, $event)" v-model="inputData[startList[1]-4]" @input="change(startList[1]-4, $event)" <input @blur="blurChange(startList[1] - 4, $event)" v-model="inputData[startList[1] - 4]"
type="text" placeholder="0"> @input="change(startList[1] - 4, $event)" type="text" placeholder="0">
<span>:</span> <span>:</span>
<input @blur="blurChange(startList[1]-3, $event)" v-model="inputData[startList[1]-3]" @input="change(startList[1]-3, $event)" <input @blur="blurChange(startList[1] - 3, $event)" v-model="inputData[startList[1] - 3]"
type="text" placeholder="0"> @input="change(startList[1] - 3, $event)" type="text" placeholder="0">
<span>-</span> <span>-</span>
<input @blur="blurChange(startList[1]-2, $event)" v-model="inputData[startList[1]-2]" @input="change(startList[1]-2, $event)" <input @blur="blurChange(startList[1] - 2, $event)" v-model="inputData[startList[1] - 2]"
type="text" placeholder="0"> @input="change(startList[1] - 2, $event)" type="text" placeholder="0">
<span>:</span> <span>:</span>
<input @blur="blurChange(startList[1]-1, $event)" v-model="inputData[startList[1]-1]" @input="change(startList[1]-1, $event)" <input @blur="blurChange(startList[1] - 1, $event)" v-model="inputData[startList[1] - 1]"
type="text" placeholder="0"> @input="change(startList[1] - 1, $event)" type="text" placeholder="0">
</div> </div>
</div> </div>
<div class="flex-view"> <div class="flex-view">
@ -190,20 +260,31 @@
</div> </div>
<div class="text-tips">时段3</div> <div class="text-tips flex-view padding-none shrink-none border-none">时段3
<div class="input-main-80">
<span></span>
<span>光照低限条件</span>
<div class="input-btn">
<div class="btn btn-w80" @click="changeIndexOpen2(7)" :class="actList3[7] == '1' ? 'blue' : 'off'">
{{ actList3[7] == '1' ? '启用' : '停止' }}
</div>
</div>
</div>
</div>
<div class="flex-view border-none padding-none shrink-none"> <div class="flex-view border-none padding-none shrink-none">
<div class="input-main-80"> <div class="input-main-80">
<input @blur="blurChange(startList[2]-4, $event)" v-model="inputData[startList[2]-4]" @input="change(startList[3]-4, $event)" <input @blur="blurChange(startList[2] - 4, $event)" v-model="inputData[startList[2] - 4]"
type="text" placeholder="0"> @input="change(startList[3] - 4, $event)" type="text" placeholder="0">
<span>:</span> <span>:</span>
<input @blur="blurChange(startList[2]-3, $event)" v-model="inputData[startList[2]-3]" @input="change(startList[3]-3, $event)" <input @blur="blurChange(startList[2] - 3, $event)" v-model="inputData[startList[2] - 3]"
type="text" placeholder="0"> @input="change(startList[3] - 3, $event)" type="text" placeholder="0">
<span>-</span> <span>-</span>
<input @blur="blurChange(startList[2]-2, $event)" v-model="inputData[startList[2]-2]" @input="change(startList[3]-2, $event)" <input @blur="blurChange(startList[2] - 2, $event)" v-model="inputData[startList[2] - 2]"
type="text" placeholder="0"> @input="change(startList[3] - 2, $event)" type="text" placeholder="0">
<span>:</span> <span>:</span>
<input @blur="blurChange(startList[2]-1, $event)" v-model="inputData[startList[2]-1]" @input="change(startList[3]-1, $event)" <input @blur="blurChange(startList[2] - 1, $event)" v-model="inputData[startList[2] - 1]"
type="text" placeholder="0"> @input="change(startList[3] - 1, $event)" type="text" placeholder="0">
</div> </div>
</div> </div>
<div class="flex-view"> <div class="flex-view">
@ -236,20 +317,30 @@
</div> </div>
<div class="text-tips">时段4</div> <div class="text-tips flex-view padding-none shrink-none border-none">时段4
<div class="input-main-80">
<span></span>
<span>光照低限条件</span>
<div class="input-btn">
<div class="btn btn-w80" @click="changeIndexOpen2(8)" :class="actList3[8] == '1' ? 'blue' : 'off'">
{{ actList3[8] == '1' ? '启用' : '停止' }}
</div>
</div>
</div>
</div>
<div class="flex-view border-none padding-none shrink-none"> <div class="flex-view border-none padding-none shrink-none">
<div class="input-main-80"> <div class="input-main-80">
<input @blur="blurChange(startList[3]-4, $event)" v-model="inputData[startList[3]-4]" @input="change(startList[3]-4, $event)" <input @blur="blurChange(startList[3] - 4, $event)" v-model="inputData[startList[3] - 4]"
type="text" placeholder="0"> @input="change(startList[3] - 4, $event)" type="text" placeholder="0">
<span>:</span> <span>:</span>
<input @blur="blurChange(startList[3]-3, $event)" v-model="inputData[startList[3]-3]" @input="change(startList[3]-3, $event)" <input @blur="blurChange(startList[3] - 3, $event)" v-model="inputData[startList[3] - 3]"
type="text" placeholder="0"> @input="change(startList[3] - 3, $event)" type="text" placeholder="0">
<span>-</span> <span>-</span>
<input @blur="blurChange(startList[3]-2, $event)" v-model="inputData[startList[3]-2]" @input="change(startList[3]-2, $event)" <input @blur="blurChange(startList[3] - 2, $event)" v-model="inputData[startList[3] - 2]"
type="text" placeholder="0"> @input="change(startList[3] - 2, $event)" type="text" placeholder="0">
<span>:</span> <span>:</span>
<input @blur="blurChange(startList[3]-1, $event)" v-model="inputData[startList[3]-1]" @input="change(startList[3]-1, $event)" <input @blur="blurChange(startList[3] - 1, $event)" v-model="inputData[startList[3] - 1]"
type="text" placeholder="0"> @input="change(startList[3] - 1, $event)" type="text" placeholder="0">
</div> </div>
</div> </div>
<div class="flex-view border-none"> <div class="flex-view border-none">
@ -287,6 +378,7 @@ export default {
data() { data() {
return { return {
inputData: [], inputData: [],
inputDataNew: [],
indexs: 1, indexs: 1,
actList1: [], actList1: [],
actList12: [], actList12: [],
@ -296,7 +388,11 @@ export default {
actList3: [], actList3: [],
startList: [21408, 21413, 21418, 21423], startList: [21408, 21413, 21418, 21423],
loading: null, loading: null,
pageName:'补光灯' pageName: '补光灯',
typeList1: [
{ label: "室外光照", value: 0 },
{ label: "室内光照", value: 1 },
],
} }
}, },
watch: { watch: {
@ -399,6 +495,29 @@ export default {
} }
this.change(code, sendData) this.change(code, sendData)
}, },
getData1(data) {
var name = "";
this.typeList1.forEach((el, index) => {
if (el.value == data) {
name = el.label;
}
});
return name;
},
handleCommand1(command, code) {
this.typeList1.forEach((el, index) => {
if (el.value == command) {
this.inputDataNew[code] = el.label;
}
});
this.inputData[code] = command;
var dataNum = {
target: {
value: command,
},
};
this.changeBtn(code, dataNum);
},
// //
changeIndexOpen(active) { changeIndexOpen(active) {
if (this.actList1[active] == '1') { if (this.actList1[active] == '1') {
@ -554,7 +673,7 @@ export default {
this.actList3 = [] this.actList3 = []
var num = this.inputData[21402] var num = this.inputData[21402]
var num1 = this.padString(num.toString(2), 4) var num1 = this.padString(num.toString(2), 9)
var openListNew = [] var openListNew = []
openListNew = num1.split("") openListNew = num1.split("")
this.actList3 = openListNew.reverse(); this.actList3 = openListNew.reverse();
@ -584,6 +703,7 @@ export default {
this.loading.close() this.loading.close()
if (res.data.code == 200) { if (res.data.code == 200) {
this.inputData = res.data.data; this.inputData = res.data.data;
this.inputDataNew = JSON.parse(JSON.stringify(res.data.data));
this.getActive1() this.getActive1()
this.getActive12() this.getActive12()
this.getActive13() this.getActive13()
@ -591,6 +711,9 @@ export default {
this.getActive2() this.getActive2()
this.getActive3() this.getActive3()
this.inputData[21403] = this.countData10(this.inputData[21403]); this.inputData[21403] = this.countData10(this.inputData[21403]);
this.inputData[21425] = this.countData10(this.inputData[21425]);
this.inputData[21426] = this.countData10(this.inputData[21426]);
this.inputDataNew[21427] = this.getData1(this.inputData[21427]);
} }
}) })
}, },
@ -698,4 +821,3 @@ export default {
} }
</script> </script>
<style lang="scss"></style> <style lang="scss"></style>

View File

@ -42,6 +42,7 @@ module.exports = {
proxy: { proxy: {
"/api": { "/api": {
target: 'https://api.lihe-control.com', //地址 target: 'https://api.lihe-control.com', //地址
// target: 'http://jiaxingtest.a1.luyouxia.net:21114', //地址
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
"^/api": "", "^/api": "",