Merge pull request '1' (#84) from pc-master into portal

Reviewed-on: #84
portal
xiaomeng 2024-01-02 09:09:40 +00:00
commit 0da07dbfc7
9 changed files with 348 additions and 16 deletions

View File

@ -3250,6 +3250,7 @@
width: 33%;
white-space: nowrap;
flex-shrink: 0;
margin-bottom: 10px;
display: flex;
align-items: center;
}

File diff suppressed because one or more lines are too long

View File

@ -3438,6 +3438,7 @@
width: 33%;
white-space: nowrap;
flex-shrink: 0;
margin-bottom: 10px;
display: flex;
align-items: center;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

@ -331,9 +331,12 @@ export default {
], router: "internalInsulation",
});
}
});
setTimeout(() => {
this.$router.push({ path: `/${this.routerList[0].router}` });
}, 0);
});
},
//
toHome(index) {

View File

@ -62,7 +62,7 @@ export default {
headerList: [
{ name: '实时数据', router: 'realTime', routerList: ['realTime'], img: require('../assets/image/header-img1.png') },
// { name: '', router: 'status', index: 1, routerList: ['formula', 'irrigateSet', 'PIDSet', 'systemSet', 'upload', 'sensorSet'], img: require('../assets/image/header-img0.png') },
{ name: '设定值参数', router: 'status', index: 1, routerList: ['status', 'skylight', 'fan', 'upload-con', 'sensorSet-con', 'waterPump', 'geothermalFan', 'uptake', 'downtake', 'rollByRoll', 'snowRemoval',"targetTemperature", "targetHumidity", "targetCo2", "sunroofControl", "outsizeSunshade", "insizeSunshade", "wetFan", "LED", 'electromagneticControl', "coercionMist", "circulationCan", "internalInsulation", "forceOutput", "intrinsicParameter", "parameterSet",], img: require('../assets/image/header-img0.png') },
{ name: '设定值参数', router: 'status', index: 1, routerList: ['status', 'skylight', 'fan', 'upload-con', 'sensorSet-con', 'synthesis-con','waterPump', 'geothermalFan', 'uptake', 'downtake', 'rollByRoll', 'snowRemoval',"targetTemperature", "targetHumidity", "targetCo2", "sunroofControl", "outsizeSunshade", "insizeSunshade", "wetFan", "LED", 'electromagneticControl', "coercionMist", "circulationCan", "internalInsulation", "forceOutput", "intrinsicParameter", "parameterSet",], img: require('../assets/image/header-img0.png') },
{ name: '设备菜单', router: '', routerList: [], img: require('../assets/image/header-img1.png') },
{ name: '视频监控', router: '', routerList: [], img: require('../assets/image/header-img2.png') },
// history history
@ -79,7 +79,7 @@ export default {
activeNames: [3],
leftList: [
{ name: '首页', img: require('../assets/image/index-icon.png'), list: [], router: 'realTime', isRouter: true, },
{ name: '温室', routerList: ['realTime', 'skylight', 'control', 'fan', 'upload-con', 'sensorSet-con', 'synthesis-con', 'waterPump', 'geothermalFan', 'uptake', 'downtake', 'rollByRoll', 'snowRemoval', "targetTemperature", "targetHumidity", "targetCo2", "sunroofControl", "outsizeSunshade", "insizeSunshade", "wetFan", "LED", 'electromagneticControl', "coercionMist", "circulationCan", "internalInsulation", "forceOutput", "intrinsicParameter", "parameterSet",], img: require('../assets/image/left-img0.png'), list: [] },
{ name: '温室', routerList: ['realTime', 'skylight', 'control', 'fan', 'upload-con', 'sensorSet-con', 'synthesis-con', 'waterPump', 'geothermalFan', 'uptake', 'downtake', 'rollByRoll', 'snowRemoval', "targetTemperature", "targetHumidity", "targetCo2", "sunroofControl", "outsizeSunshade", "insizeSunshade", "wetFan", "LED", 'electromagneticControl', "coercionMist", "circulationCan", "internalInsulation", "forceOutput", "intrinsicParameter", "parameterSet"], img: require('../assets/image/left-img0.png'), list: [] },
// { name: '', img: require('../assets/image/left-img1.png'), list: [] },
{ name: '施肥机', routerList: ['formula', 'irrigateSet', 'PIDSet', 'systemSet', 'upload', 'sensorSet', 'realTime', 'history', 'dataAnalysis'], img: require('../assets/image/left-img2.png'), list: [] },],
routerNow: 'realTime',
@ -309,7 +309,10 @@ export default {
this.$message('当前设备为离线状态');
} else if (item.router == 'formula' && this.$route.query.index != item.index) {
if (item.router == 'formula') {
if (this.routerNow == 'realTime') {
this.$store.state.equipmentIndex = item.index
this.$router.push({ path: `/realTime?index=${item.index ? item.index : 1}&name=${item.deviceName}` })
} else if (item.router == 'formula') {
this.$store.state.equipmentIndex = item.index
this.routerIndex = item.index
@ -318,9 +321,6 @@ export default {
} else if (item.deviceName == 1 && this.routerNow != 'irrigateSet') {
this.$router.push({ path: `/irrigateSet?change=${item.index}` })
}
} else if (this.routerNow == 'realTime') {
this.$store.state.equipmentIndex = item.index
this.$router.push({ path: `/realTime?index=${item.index ? item.index : 1}&name=${item.deviceName}` })
} else if (this.routerNow == 'formula') {
this.$store.state.equipmentIndex = item.index
this.$router.push({ path: `/formula?index=${item.index ? item.index : 1}` })

View File

@ -125,8 +125,8 @@
<div>当前设备无效</div>
</div>
</div>
<!-- 顶卷膜及其他 -->
<div class="status-view-content" v-if="item.type != 1">
<!-- 补光灯 -->
<div class="status-view-content" v-else-if="item.type == 8">
<div v-if="item.open != 0" class="status-true">
<div class="status-true-sel">
<div class="sel">
@ -140,7 +140,78 @@
手机控制
</div>
</div>
<div class="status-true-charts" v-if="item.type == 6 || item.type == 5 || item.type == 2">
<div class="status-fan">
<div class="btn" :class="item.status[0] == 1 ? 'blue' : 'off'">
<img class="light-img" v-if="item.status[0] == 1" src="../../assets/img/light-on.png"
alt="">
<img v-else src="../../assets/img/light-off.png" alt="">
<span>1#补光灯</span>
</div>
<div class="btn" :class="item.status[1] == 1 ? 'blue' : 'off'">
<img class="light-img" v-if="item.status[1] == 1" src="../../assets/img/light-on.png"
alt="">
<img v-else src="../../assets/img/light-off.png" alt="">
<span>2#补光灯</span>
</div>
<div class="btn" :class="item.status[2] == 1 ? 'blue' : 'off'">
<img class="light-img" v-if="item.status[2] == 1" src="../../assets/img/light-on.png"
alt="">
<img v-else src="../../assets/img/light-off.png" alt="">
<span>3#补光灯</span>
</div>
<div class="btn" :class="item.status[3] == 1 ? 'blue' : 'off'">
<img class="light-img" v-if="item.status[3] == 1" src="../../assets/img/light-on.png"
alt="">
<img v-else src="../../assets/img/light-off.png" alt="">
<span>4#补光灯</span>
</div>
<div class="btn" :class="item.status[4] == 1 ? 'blue' : 'off'">
<img class="light-img" v-if="item.status[4] == 1" src="../../assets/img/light-on.png"
alt="">
<img v-else src="../../assets/img/light-off.png" alt="">
<span>5#补光灯</span>
</div>
<div class="btn" :class="item.status[5] == 1 ? 'blue' : 'off'">
<img class="light-img" v-if="item.status[5] == 1" src="../../assets/img/light-on.png"
alt="">
<img v-else src="../../assets/img/light-off.png" alt="">
<span>6#补光灯</span>
</div>
<div class="btn" :class="item.status[6] == 1 ? 'blue' : 'off'">
<img class="light-img" v-if="item.status[6] == 1" src="../../assets/img/light-on.png"
alt="">
<img v-else src="../../assets/img/light-off.png" alt="">
<span>7#补光灯</span>
</div>
<div class="btn" :class="item.status[7] == 1 ? 'blue' : 'off'">
<img class="light-img" v-if="item.status[7] == 1" src="../../assets/img/light-on.png"
alt="">
<img v-else src="../../assets/img/light-off.png" alt="">
<span>8#补光灯</span>
</div>
</div>
</div>
<div v-else class="status-noTrue">
<img src="../../assets/img/status-no.png" alt="">
<div>当前设备无效</div>
</div>
</div>
<!-- 顶卷膜及其他 -->
<div class="status-view-content" v-else>
<div v-if="item.open != 0" class="status-true">
<div class="status-true-sel">
<div class="sel">
<img v-if="item.open == 1" src="../../assets/img/status-true-sel.png" alt="">
<img v-else src="../../assets/img/status-true-nosel.png" alt="">
自动控制
</div>
<div class="sel-phone">
<img v-if="item.open != 1" src="../../assets/img/status-true-sel.png" alt="">
<img v-else src="../../assets/img/status-true-nosel.png" alt="">
手机控制
</div>
</div>
<div class="status-true-charts" v-if="item.type == 6 || item.type == 5 || item.type == 2|| item.type == 15|| item.type == 14|| item.type == 13|| item.type == 12">
<img src="../../assets/img/status-true-charts-icon.png" alt="">
<div :id="'statusCharts' + index"></div>
</div>
@ -150,7 +221,7 @@
<div class="status-true-text">
<div class="status-true-text-left">{{ getNumberStatus(item) }}</div>
<div class="status-true-text-right"
v-if="item.type == 6 || item.type == 5 || item.type == 2">{{
v-if="item.type == 6 || item.type == 5 || item.type == 2|| item.type == 15|| item.type == 14|| item.type == 13|| item.type == 12">{{
item.progress }}%</div>
</div>
</div>
@ -556,7 +627,8 @@ export default {
},
getNumberStatus(item) {
var index = item.index
if (item.type == 2 || item.type == 5 || item.type == 6) {
if (item.type == 2 || item.type == 5 || item.type == 6|| item.type == 12
|| item.type == 13|| item.type == 14|| item.type == 15) {
//
if (index == 0) {
return '静止状态'
@ -594,6 +666,42 @@ export default {
} else {
return ''
}
} else if (item.type == 9) {
//
if (index == 0) {
return '高压微雾关闭'
} else if (index == 1) {
return '高压微雾打开'
} else {
return ''
}
}else if (item.type == 10) {
//
if (index == 0) {
return '环流风扇关闭'
} else if (index == 1) {
return '环流风扇打开'
} else {
return ''
}
}else if (item.type == 11) {
//
if (index == 0) {
return '湿帘泵关闭'
} else if (index == 1) {
return '湿帘泵打开'
} else {
return ''
}
}else{
//
if (index == 0) {
return '关闭'
} else if (index == 1) {
return '打开'
} else {
return ''
}
}
},
@ -977,6 +1085,11 @@ export default {
type: "success",
});
this.getPermissionStatus()
}else{
this.$message({
message: res.data.msg,
type: "warning",
});
}
}))
} else {
@ -1029,6 +1142,34 @@ export default {
openListNew = num1.split("")
fandata.status = openListNew.reverse()
statusList.push(fandata)
}else if (el.id == 17) {
//
var fandata = {}
fandata.open = res.data.data['1078']
fandata.id = el.id
fandata.type = 1
fandata.name = el.name
fandata.status = []
var num = res.data.data['1079']
var num1 = this.padString(num.toString(2), 5)
var openListNew = []
openListNew = num1.split("")
fandata.status = openListNew.reverse()
statusList.push(fandata)
}else if (el.id == 12) {
//
var fandata = {}
fandata.open = res.data.data['1068']
fandata.id = el.id
fandata.type = 8
fandata.name = el.name
fandata.status = []
var num = res.data.data['1069']
var num1 = this.padString(num.toString(2), 8)
var openListNew = []
openListNew = num1.split("")
fandata.status = openListNew.reverse()
statusList.push(fandata)
} else if (el.id == 2 || el.id == 3 || el.id == 4 || el.id == 5) {
//
var statusData = { name: el.name, type: 2, id: el.id, open: res.data.data[(1025 + ((el.id - 2) * 3))], progress: res.data.data[(1027 + ((el.id - 2) * 3))], index: res.data.data[(1026 + ((el.id - 2) * 3))] }
@ -1057,13 +1198,42 @@ export default {
//
var statusData = { name: el.name, type: 7, id: el.id, open: res.data.data['1013'], progress: 0, index: res.data.data['1014'] }
statusList.push(statusData)
}else if (el.id == 13||el.id == 14) {
//
var statusData = { name: el.name, type:9, id: el.id, open: res.data.data[(1070 + ((el.id - 13)*2))], progress: 0, index: res.data.data[(1071 + ((el.id - 13)*2))] }
statusList.push(statusData)
}else if (el.id == 15||el.id == 16) {
//
var statusData = { name: el.name, type:10, id: el.id, open: res.data.data[(1074 + ((el.id - 15)*2))], progress: 0, index: res.data.data[(1075 + ((el.id - 15)*2))] }
statusList.push(statusData)
}else if (el.id == 18||el.id == 19) {
//湿
var statusData = { name: el.name, type:11, id: el.id, open: res.data.data[(1080 + ((el.id - 18)*2))], progress: 0, index: res.data.data[(1081 + ((el.id - 18)*2))] }
statusList.push(statusData)
}else if (el.id == 20||el.id == 21) {
//湿
var statusData = { name: el.name, type:12, id: el.id, open: res.data.data[(1084 + ((el.id - 20)*2))], progress: res.data.data[(1086 + ((el.id - 20)*2))], index: res.data.data[(1085 + ((el.id - 20)*2))] }
statusList.push(statusData)
}else if (el.id == 22||el.id == 23) {
//
var statusData = { name: el.name, type:13, id: el.id, open: res.data.data[(1090 + ((el.id - 22)*2))], progress: res.data.data[(1092 + ((el.id - 22)*2))], index: res.data.data[(1091 + ((el.id - 22)*2))] }
statusList.push(statusData)
}else if (el.id == 24||el.id == 25) {
//
var statusData = { name: el.name, type:14, id: el.id, open: res.data.data[(1096 + ((el.id - 24)*2))], progress: res.data.data[(1098 + ((el.id - 24)*2))], index: res.data.data[(1097 + ((el.id - 24)*2))] }
statusList.push(statusData)
}else if (el.id == 26||el.id == 27||el.id == 28||el.id == 29) {
//
var statusData = { name: el.name, type:15, id: el.id, open: res.data.data[(1102 + ((el.id - 26)*2))], progress: res.data.data[(1104 + ((el.id - 26)*2))], index: res.data.data[(1103 + ((el.id - 26)*2))] }
statusList.push(statusData)
}
})
this.statusList = statusList
this.$forceUpdate();
setTimeout(() => {
this.statusList.forEach((el, index) => {
if (el.open != 0 && (el.type == 6 || el.type == 5 || el.type == 2)) {
if (el.open != 0 && (el.type == 6 || el.type == 5 || el.type == 2|| el.type == 15|| el.type == 14|| el.type == 13|| el.type == 12)) {
statusCharts(`statusCharts${index}`, el.progress)
}
})

View File

@ -247,7 +247,7 @@
</div>
</div>
</div>
<div class="flex-view border-none shrink-none">
<div class="flex-view shrink-none">
<div class="input-main-80">
<span>降温需求到达2</span>
<input @blur="blurChange(21972, $event)" v-model="inputData[21972]" @input="change(21972, $event)"
@ -255,6 +255,101 @@
<span>级时湿帘泵2启动</span>
</div>
</div>
<div class="flex-view border-none shrink-none">
<div class="input-main">
<span>湿帘外翻窗1模式:</span>
</div>
<div class="input-btn ">
<div class="btn" @click="changeOpen(1,21974)" :class="inputData[21974] == 1 ? 'blue' : 'green'">
<img src="../../assets/image/irrigateSet2.png" alt="" />自动运行
</div>
<div class="btn" @click="changeOpen(2,21974)" :class="inputData[21974] == 2 ? 'blue' : 'green'">
<img src="../../assets/image/irrigateSet3.png" alt="" />手动打开
</div>
<div class="btn" @click="changeOpen(3,21974)" :class="inputData[21974] == 3 ? 'blue' : 'green'">
<img src="../../assets/image/irrigateSet1.png" alt="" />手动关闭
</div>
<div class="btn" @click="changeOpen(4,21974)" :class="inputData[21974] == 3 ? 'blue' : 'green'">
<img src="../../assets/image/irrigateSet1.png" alt="" />停止
</div>
</div>
</div>
<div class="flex-view border-none shrink-none padding-none">
<div class="input-btn">
<div class="btn btn-w80" @click="changeIndexOpen3(0)" :class="actList4[0] == '1' ? 'blue' : 'off'">
{{actList4[0] == '1' ? '有效' : '无效'}}
</div>
</div>
<div class="input-main-80">
<span>室温大于</span>
<input @blur="blurChangeCount(21976, $event)" v-model="inputData[21976]" @input="changeCountData(21976, $event)"
type="text" placeholder="0">
<span>开启湿帘外翻窗降温滞回带</span>
<input @blur="blurChange10(21977, $event)" v-model="inputData[21977]" @input="changeCount10(21977, $event)"
type="text" placeholder="0">
</div>
</div>
<div class="flex-view shrink-none padding-none">
<div class="input-btn">
<div class="btn btn-w80" @click="changeIndexOpen3(1)" :class="actList4[1] == '1' ? 'blue' : 'off'">
{{actList4[1] == '1' ? '有效' : '无效'}}
</div>
</div>
<div class="input-main-80">
<span>风机结束时</span>
<input @blur="blurChange(21978, $event)" v-model="inputData[21978]" @input="change(21978, $event)"
type="text" placeholder="0">
<span>分钟之后关闭湿帘窗</span>
</div>
</div>
<div class="flex-view border-none shrink-none">
<div class="input-main">
<span>湿帘外翻窗2模式:</span>
</div>
<div class="input-btn ">
<div class="btn" @click="changeOpen(1,21979)" :class="inputData[21979] == 1 ? 'blue' : 'green'">
<img src="../../assets/image/irrigateSet2.png" alt="" />自动运行
</div>
<div class="btn" @click="changeOpen(2,21979)" :class="inputData[21979] == 2 ? 'blue' : 'green'">
<img src="../../assets/image/irrigateSet3.png" alt="" />手动打开
</div>
<div class="btn" @click="changeOpen(3,21979)" :class="inputData[21979] == 3 ? 'blue' : 'green'">
<img src="../../assets/image/irrigateSet1.png" alt="" />手动关闭
</div>
<div class="btn" @click="changeOpen(4,21979)" :class="inputData[21979] == 4 ? 'blue' : 'green'">
<img src="../../assets/image/irrigateSet1.png" alt="" />停止
</div>
</div>
</div>
<div class="flex-view border-none shrink-none padding-none">
<div class="input-btn">
<div class="btn btn-w80" @click="changeIndexOpen4(0)" :class="actList5[0] == '1' ? 'blue' : 'off'">
{{actList5[0] == '1' ? '有效' : '无效'}}
</div>
</div>
<div class="input-main-80">
<span>室温大于</span>
<input @blur="blurChangeCount(21981, $event)" v-model="inputData[21981]" @input="changeCountData(21981, $event)"
type="text" placeholder="0">
<span>开启湿帘外翻窗降温滞回带</span>
<input @blur="blurChange10(21982, $event)" v-model="inputData[21982]" @input="changeCount10(21982, $event)"
type="text" placeholder="0">
</div>
</div>
<div class="flex-view border-none shrink-none padding-none">
<div class="input-btn">
<div class="btn btn-w80" @click="changeIndexOpen4(1)" :class="actList5[1] == '1' ? 'blue' : 'off'">
{{actList5[1] == '1' ? '有效' : '无效'}}
</div>
</div>
<div class="input-main-80">
<span>风机结束时</span>
<input @blur="blurChange(21983, $event)" v-model="inputData[21983]" @input="change(21983, $event)"
type="text" placeholder="0">
<span>分钟之后关闭湿帘窗</span>
</div>
</div>
</div>
</template>
<script>
@ -265,6 +360,8 @@ export default {
actList1: [],
actList2: [],
actList3: [],
actList4: [],
actList5: [],
}
},
mounted() {
@ -391,6 +488,40 @@ export default {
},
};
this.changeBtn(21963, dataNum);
},
//
changeIndexOpen3(active) {
if (this.actList4[active] == '1') {
this.actList4[active] = '0'
} else {
this.actList4[active] = '1'
}
this.$forceUpdate();
var revList = this.actList4.slice().reverse()
var num = revList.join("");
var dataNum = {
target: {
value: parseInt(num, 2),
},
};
this.changeBtn(21975, dataNum);
},
//
changeIndexOpen4(active) {
if (this.actList5[active] == '1') {
this.actList5[active] = '0'
} else {
this.actList5[active] = '1'
}
this.$forceUpdate();
var revList = this.actList5.slice().reverse()
var num = revList.join("");
var dataNum = {
target: {
value: parseInt(num, 2),
},
};
this.changeBtn(21980, dataNum);
},
getActive1() {
this.actList1 = []
@ -419,6 +550,24 @@ export default {
openListNew = num1.split("")
this.actList3 = openListNew.reverse();
},
getActive4() {
this.actList4 = []
var num = this.inputData[21975]
var num1 = this.padString(num.toString(2), 2)
var openListNew = []
openListNew = num1.split("")
this.actList4 = openListNew.reverse();
},
getActive5() {
this.actList5 = []
var num = this.inputData[21980]
var num1 = this.padString(num.toString(2), 2)
var openListNew = []
openListNew = num1.split("")
this.actList5 = openListNew.reverse();
},
//
changeOpen(index,code) {
this.inputData[code] = index;
@ -447,11 +596,19 @@ export default {
this.inputData[21969]=this.countData(this.inputData[21969])
this.inputData[21976]=this.countData(this.inputData[21976])
this.inputData[21977]=this.countData10(this.inputData[21977])
this.inputData[21981]=this.countData(this.inputData[21981])
this.inputData[21982]=this.countData10(this.inputData[21982])
this.inputData[21976]=this.countData(this.inputData[21976])
this.inputData[21977]=this.countData10(this.inputData[21977])
this.inputData[21981]=this.countData(this.inputData[21981])
this.inputData[21982]=this.countData10(this.inputData[21982])
this.getActive1()
this.getActive2()
this.getActive3()
this.getActive4()
this.getActive5()
}
})
},