新问题修改

pull/105/head
孙萌 2024-01-25 17:53:15 +08:00
parent c74ba3e9ef
commit b41ed86baa
7 changed files with 260 additions and 41 deletions

View File

@ -287,12 +287,8 @@ export default {
}
if (isParamInArray17) {
this.routerList.push({
name: "补光灯", list: [
{ name: '时段一', status: -1, router: 'LED', index: 1 },
{ name: '时段二', status: -1, router: 'LED', index: 2 },
{ name: '时段三', status: -1, router: 'LED', index: 3 },
{ name: '时段四', status: -1, router: 'LED', index: 4 },
], router: "LED",
name: "补光灯", list: [], router: "LED",
isRouter: true,
});
}

View File

@ -82,15 +82,14 @@ const routes = [
path: '/control',
name: 'control',
component: control,
redirect: '/skylight',
children: [{
path: '/skylight',
name: 'skylight',
component: () => import('../views/page/skylight.vue')
},{
path: '/fan',
name: 'fan',
component: () => import('../views/page/fan.vue')
},{
path: '/skylight',
name: 'skylight',
component: () => import('../views/page/skylight.vue')
},{
path: '/upload-con',
name: 'upload-con',

View File

@ -85,7 +85,7 @@
</div>
</div>
<div class="input-main-80">
<span>室外照大于</span>
<span>室外照大于</span>
<input @blur="blurChange10(21403, $event)" v-model="inputData[21403]" @input="changeCount10(21403, $event)"
type="text" placeholder="0">
<span>禁止启用补光灯 (KLux)</span>
@ -99,23 +99,23 @@
<span>秒顺序启动防止同时启动瞬间功率过大</span>
</div>
</div>
<div class="text-tips">时段{{indexs}}</div>
<div class="text-tips">时段1</div>
<div class="flex-view border-none padding-none shrink-none">
<div class="input-main-80">
<input @blur="blurChange(startList[indexs-1]-4, $event)" v-model="inputData[startList[indexs-1]-4]" @input="change(startList[indexs-1]-4, $event)"
<input @blur="blurChange(startList[0]-4, $event)" v-model="inputData[startList[0]-4]" @input="change(startList[0]-4, $event)"
type="text" placeholder="0">
<span>:</span>
<input @blur="blurChange(startList[indexs-1]-3, $event)" v-model="inputData[startList[indexs-1]-3]" @input="change(startList[indexs-1]-3, $event)"
<input @blur="blurChange(startList[0]-3, $event)" v-model="inputData[startList[0]-3]" @input="change(startList[0]-3, $event)"
type="text" placeholder="0">
<span>-</span>
<input @blur="blurChange(startList[indexs-1]-2, $event)" v-model="inputData[startList[indexs-1]-2]" @input="change(startList[indexs-1]-2, $event)"
<input @blur="blurChange(startList[0]-2, $event)" v-model="inputData[startList[0]-2]" @input="change(startList[0]-2, $event)"
type="text" placeholder="0">
<span>:</span>
<input @blur="blurChange(startList[indexs-1]-1, $event)" v-model="inputData[startList[indexs-1]-1]" @input="change(startList[indexs-1]-1, $event)"
<input @blur="blurChange(startList[0]-1, $event)" v-model="inputData[startList[0]-1]" @input="change(startList[0]-1, $event)"
type="text" placeholder="0">
</div>
</div>
<div class="flex-view border-none">
<div class="flex-view">
<div class="input-btn ">
<div class="btn btn-w80" @click="changeIndexOpen(0)" :class="actList1[0] == '1' ? 'blue' : 'off'">
1#
@ -143,6 +143,143 @@
</div>
</div>
</div>
<div class="text-tips">时段2</div>
<div class="flex-view border-none padding-none shrink-none">
<div class="input-main-80">
<input @blur="blurChange(startList[1]-4, $event)" v-model="inputData[startList[1]-4]" @input="change(startList[1]-4, $event)"
type="text" placeholder="0">
<span>:</span>
<input @blur="blurChange(startList[1]-3, $event)" v-model="inputData[startList[1]-3]" @input="change(startList[1]-3, $event)"
type="text" placeholder="0">
<span>-</span>
<input @blur="blurChange(startList[1]-2, $event)" v-model="inputData[startList[1]-2]" @input="change(startList[1]-2, $event)"
type="text" placeholder="0">
<span>:</span>
<input @blur="blurChange(startList[1]-1, $event)" v-model="inputData[startList[1]-1]" @input="change(startList[1]-1, $event)"
type="text" placeholder="0">
</div>
</div>
<div class="flex-view">
<div class="input-btn ">
<div class="btn btn-w80" @click="changeIndexOpen12(0)" :class="actList12[0] == '1' ? 'blue' : 'off'">
1#
</div>
<div class="btn btn-w80" @click="changeIndexOpen12(1)" :class="actList12[1] == '1' ? 'blue' : 'off'">
2#
</div>
<div class="btn btn-w80" @click="changeIndexOpen12(2)" :class="actList12[2] == '1' ? 'blue' : 'off'">
3#
</div>
<div class="btn btn-w80" @click="changeIndexOpen12(3)" :class="actList12[3] == '1' ? 'blue' : 'off'">
4#
</div>
<div class="btn btn-w80" @click="changeIndexOpen12(4)" :class="actList12[4] == '1' ? 'blue' : 'off'">
5#
</div>
<div class="btn btn-w80" @click="changeIndexOpen12(5)" :class="actList12[5] == '1' ? 'blue' : 'off'">
6#
</div>
<div class="btn btn-w80" @click="changeIndexOpen12(6)" :class="actList12[6] == '1' ? 'blue' : 'off'">
7#
</div>
<div class="btn btn-w80" @click="changeIndexOpen12(7)" :class="actList12[7] == '1' ? 'blue' : 'off'">
8#
</div>
</div>
</div>
<div class="text-tips">时段3</div>
<div class="flex-view border-none padding-none shrink-none">
<div class="input-main-80">
<input @blur="blurChange(startList[2]-4, $event)" v-model="inputData[startList[2]-4]" @input="change(startList[3]-4, $event)"
type="text" placeholder="0">
<span>:</span>
<input @blur="blurChange(startList[2]-3, $event)" v-model="inputData[startList[2]-3]" @input="change(startList[3]-3, $event)"
type="text" placeholder="0">
<span>-</span>
<input @blur="blurChange(startList[2]-2, $event)" v-model="inputData[startList[2]-2]" @input="change(startList[3]-2, $event)"
type="text" placeholder="0">
<span>:</span>
<input @blur="blurChange(startList[2]-1, $event)" v-model="inputData[startList[2]-1]" @input="change(startList[3]-1, $event)"
type="text" placeholder="0">
</div>
</div>
<div class="flex-view">
<div class="input-btn ">
<div class="btn btn-w80" @click="changeIndexOpen13(0)" :class="actList13[0] == '1' ? 'blue' : 'off'">
1#
</div>
<div class="btn btn-w80" @click="changeIndexOpen13(1)" :class="actList13[1] == '1' ? 'blue' : 'off'">
2#
</div>
<div class="btn btn-w80" @click="changeIndexOpen13(2)" :class="actList13[2] == '1' ? 'blue' : 'off'">
3#
</div>
<div class="btn btn-w80" @click="changeIndexOpen13(3)" :class="actList13[3] == '1' ? 'blue' : 'off'">
4#
</div>
<div class="btn btn-w80" @click="changeIndexOpen13(4)" :class="actList13[4] == '1' ? 'blue' : 'off'">
5#
</div>
<div class="btn btn-w80" @click="changeIndexOpen13(5)" :class="actList13[5] == '1' ? 'blue' : 'off'">
6#
</div>
<div class="btn btn-w80" @click="changeIndexOpen13(6)" :class="actList13[6] == '1' ? 'blue' : 'off'">
7#
</div>
<div class="btn btn-w80" @click="changeIndexOpen13(7)" :class="actList13[7] == '1' ? 'blue' : 'off'">
8#
</div>
</div>
</div>
<div class="text-tips">时段4</div>
<div class="flex-view border-none padding-none shrink-none">
<div class="input-main-80">
<input @blur="blurChange(startList[3]-4, $event)" v-model="inputData[startList[3]-4]" @input="change(startList[3]-4, $event)"
type="text" placeholder="0">
<span>:</span>
<input @blur="blurChange(startList[3]-3, $event)" v-model="inputData[startList[3]-3]" @input="change(startList[3]-3, $event)"
type="text" placeholder="0">
<span>-</span>
<input @blur="blurChange(startList[3]-2, $event)" v-model="inputData[startList[3]-2]" @input="change(startList[3]-2, $event)"
type="text" placeholder="0">
<span>:</span>
<input @blur="blurChange(startList[3]-1, $event)" v-model="inputData[startList[3]-1]" @input="change(startList[3]-1, $event)"
type="text" placeholder="0">
</div>
</div>
<div class="flex-view border-none">
<div class="input-btn ">
<div class="btn btn-w80" @click="changeIndexOpen14(0)" :class="actList14[0] == '1' ? 'blue' : 'off'">
1#
</div>
<div class="btn btn-w80" @click="changeIndexOpen14(1)" :class="actList14[1] == '1' ? 'blue' : 'off'">
2#
</div>
<div class="btn btn-w80" @click="changeIndexOpen14(2)" :class="actList14[2] == '1' ? 'blue' : 'off'">
3#
</div>
<div class="btn btn-w80" @click="changeIndexOpen14(3)" :class="actList14[3] == '1' ? 'blue' : 'off'">
4#
</div>
<div class="btn btn-w80" @click="changeIndexOpen14(4)" :class="actList14[4] == '1' ? 'blue' : 'off'">
5#
</div>
<div class="btn btn-w80" @click="changeIndexOpen14(5)" :class="actList14[5] == '1' ? 'blue' : 'off'">
6#
</div>
<div class="btn btn-w80" @click="changeIndexOpen14(6)" :class="actList14[6] == '1' ? 'blue' : 'off'">
7#
</div>
<div class="btn btn-w80" @click="changeIndexOpen(7)" :class="actList1[7] == '1' ? 'blue' : 'off'">
8#
</div>
</div>
</div>
</div>
</template>
<script>
@ -152,6 +289,9 @@ export default {
inputData: [],
indexs: 1,
actList1: [],
actList12: [],
actList13: [],
actList14: [],
actList2: [],
actList3: [],
startList:[21408,21413,21418,21423],
@ -262,8 +402,62 @@ export default {
value: parseInt(num, 2),
},
};
this.inputData[this.startList[this.indexs - 1]]=parseInt(num, 2)
this.changeBtn(this.startList[this.indexs - 1], dataNum);
this.inputData[this.startList[0]]=parseInt(num, 2)
this.changeBtn(this.startList[0], dataNum);
},
//
changeIndexOpen12(active) {
if (this.actList12[active] == '1') {
this.actList12[active] = '0'
} else {
this.actList12[active] = '1'
}
this.$forceUpdate();
var revList = this.actList12.slice().reverse()
var num = revList.join("");
var dataNum = {
target: {
value: parseInt(num, 2),
},
};
this.inputData[this.startList[1]]=parseInt(num, 2)
this.changeBtn(this.startList[1], dataNum);
},
//
changeIndexOpen13(active) {
if (this.actList13[active] == '1') {
this.actList13[active] = '0'
} else {
this.actList13[active] = '1'
}
this.$forceUpdate();
var revList = this.actList13.slice().reverse()
var num = revList.join("");
var dataNum = {
target: {
value: parseInt(num, 2),
},
};
this.inputData[this.startList[2]]=parseInt(num, 2)
this.changeBtn(this.startList[2], dataNum);
},
//
changeIndexOpen14(active) {
if (this.actList14[active] == '1') {
this.actList14[active] = '0'
} else {
this.actList14[active] = '1'
}
this.$forceUpdate();
var revList = this.actList14.slice().reverse()
var num = revList.join("");
var dataNum = {
target: {
value: parseInt(num, 2),
},
};
this.inputData[this.startList[3]]=parseInt(num, 2)
this.changeBtn(this.startList[3], dataNum);
},
//
changeIndexOpen1(active) {
@ -301,13 +495,40 @@ export default {
},
getActive1() {
this.actList1 = []
var num = this.inputData[this.startList[this.indexs - 1]]
var num = this.inputData[this.startList[0]]
var num1 = this.padString(num.toString(2), 8)
var openListNew = []
openListNew = num1.split("")
this.actList1 = openListNew.reverse();
},
getActive12() {
this.actList12 = []
var num = this.inputData[this.startList[1]]
var num1 = this.padString(num.toString(2), 8)
var openListNew = []
openListNew = num1.split("")
this.actList12 = openListNew.reverse();
},
getActive13() {
this.actList13 = []
var num = this.inputData[this.startList[2]]
var num1 = this.padString(num.toString(2), 8)
var openListNew = []
openListNew = num1.split("")
this.actList13 = openListNew.reverse();
},
getActive14() {
this.actList14 = []
var num = this.inputData[this.startList[3]]
var num1 = this.padString(num.toString(2), 8)
var openListNew = []
openListNew = num1.split("")
this.actList14 = openListNew.reverse();
},
getActive2() {
this.actList2 = []
var num = this.inputData[21401]
@ -345,6 +566,9 @@ export default {
if (res.data.code == 200) {
this.inputData = res.data.data;
this.getActive1()
this.getActive12()
this.getActive13()
this.getActive14()
this.getActive2()
this.getActive3()
this.inputData[21403] =this.countData10(this.inputData[21403]);

View File

@ -74,10 +74,10 @@
<span>室外光照大于</span>
<input @blur="blurChange10(startList[indexs-1]+7, $event)" v-model="inputData[startList[indexs-1]+7]" @input="changeCount10(startList[indexs-1]+7, $event)"
type="text" placeholder="0">
<span>展开外遮阳</span>
<span>(KLux)展开外遮阳</span>
<input @blur="blurChange(startList[indexs-1]+8, $event)" v-model="inputData[startList[indexs-1]+8]" @input="change(startList[indexs-1]+8, $event)"
type="text" placeholder="0">
<span>% (KLux)光照确认时间</span>
<span>% 光照确认时间</span>
<input @blur="blurChange(startList[indexs-1]+6, $event)" v-model="inputData[startList[indexs-1]+6]" @input="change(startList[indexs-1]+6, $event)"
type="text" placeholder="0">
<span>分钟</span>
@ -88,7 +88,7 @@
<span>室外光照大于</span>
<input @blur="blurChange10(startList[indexs-1]+9, $event)" v-model="inputData[startList[indexs-1]+9]" @input="changeCount10(startList[indexs-1]+9, $event)"
type="text" placeholder="0">
<span>外遮阳展开 100%(KLux)</span>
<span>(KLux)外遮阳展开 100%</span>
</div>
</div>

View File

@ -173,26 +173,26 @@
<div class="flex-view shrink-none border-none">
<div class="input-sel input-sel-w180">
<span>1#通风窗: 目标温度选择</span>
<el-dropdown @command="handleCommand1($event, 21757)">
<el-dropdown @command="handleCommand3($event, 21757)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21757]" 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">{{
<el-dropdown-item v-for="item, index in typeList3" :key="index" :command="item.value">{{
item.label }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
<div class="input-sel input-sel-w180">
<span>环境温度选择</span>
<el-dropdown @command="handleCommand3($event, 21756)">
<el-dropdown @command="handleCommand1($event, 21756)">
<div class="el-dropdown-link">
<input v-model="inputDataNew[21756]" 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 typeList3" :key="index" :command="item.value">{{
<el-dropdown-item v-for="item, index in typeList1" :key="index" :command="item.value">{{
item.label }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>

View File

@ -23,7 +23,7 @@
<span>目标CO2</span>
<input @blur="blurChange(20066, $event)" v-model="inputData[20066]" @input="change(20066, $event)"
type="text" placeholder="0">
<span>%</span>
<span>ppm</span>
</div>
</div>
<div class="flex-view border-none shrink-none padding-none">
@ -46,7 +46,7 @@
<span>目标CO2</span>
<input @blur="blurChange(20070, $event)" v-model="inputData[20070]" @input="change(20070, $event)"
type="text" placeholder="0">
<span>%</span>
<span>ppm</span>
</div>
</div>
<div class="flex-view border-none shrink-none padding-none">
@ -69,7 +69,7 @@
<span>目标CO2</span>
<input @blur="blurChange(20074, $event)" v-model="inputData[20074]" @input="change(20074, $event)"
type="text" placeholder="0">
<span>%</span>
<span>ppm</span>
</div>
</div>
<div class="flex-view border-none shrink-none padding-none">
@ -92,7 +92,7 @@
<span>目标CO2</span>
<input @blur="blurChange(20078, $event)" v-model="inputData[20078]" @input="change(20078, $event)"
type="text" placeholder="0">
<span>%</span>
<span>ppm</span>
</div>
</div>

View File

@ -26,7 +26,7 @@
<span>目标湿度</span>
<input @blur="blurChange10(20034, $event)" v-model="inputData[20034]" @input="changeCount10(20034, $event)"
type="text" placeholder="0">
<span></span>
<span>%</span>
</div>
</div>
<div class="flex-view border-none shrink-none padding-none">
@ -49,7 +49,7 @@
<span>目标湿度</span>
<input @blur="blurChange10(20038, $event)" v-model="inputData[20038]" @input="changeCount10(20038, $event)"
type="text" placeholder="0">
<span></span>
<span>%</span>
</div>
</div>
<div class="flex-view border-none shrink-none padding-none">
@ -72,7 +72,7 @@
<span>目标湿度</span>
<input @blur="blurChange10(20042, $event)" v-model="inputData[20042]" @input="changeCount10(20042, $event)"
type="text" placeholder="0">
<span></span>
<span>%</span>
</div>
</div>
<div class="flex-view shrink-none padding-none">
@ -95,7 +95,7 @@
<span>目标湿度</span>
<input @blur="blurChange10(20046, $event)" v-model="inputData[20046]" @input="changeCount10(20046, $event)"
type="text" placeholder="0">
<span></span>
<span>%</span>
</div>
</div>
@ -122,7 +122,7 @@
<span>目标湿度</span>
<input @blur="blurChange10(20050, $event)" v-model="inputData[20050]" @input="changeCount10(20050, $event)"
type="text" placeholder="0">
<span></span>
<span>%</span>
</div>
</div>
<div class="flex-view border-none shrink-none padding-none">
@ -145,7 +145,7 @@
<span>目标湿度</span>
<input @blur="blurChange10(20054, $event)" v-model="inputData[20054]" @input="changeCount10(20054, $event)"
type="text" placeholder="0">
<span></span>
<span>%</span>
</div>
</div>
<div class="flex-view border-none shrink-none padding-none">
@ -168,7 +168,7 @@
<span>目标湿度</span>
<input @blur="blurChange10(20058, $event)" v-model="inputData[20058]" @input="changeCount10(20058, $event)"
type="text" placeholder="0">
<span></span>
<span>%</span>
</div>
</div>
<div class="flex-view border-none shrink-none padding-none">
@ -191,7 +191,7 @@
<span>目标湿度</span>
<input @blur="blurChange10(20062, $event)" v-model="inputData[20062]" @input="changeCount10(20062, $event)"
type="text" placeholder="0">
<span></span>
<span>%</span>
</div>
</div>
</div>