pc-master #120

Merged
xiaomeng merged 2 commits from pc-master into portal 2024-03-04 01:17:18 +00:00
6 changed files with 40 additions and 19 deletions

View File

@ -438,6 +438,7 @@
.index .header .header-right > img { .index .header .header-right > img {
width: 40px; width: 40px;
height: 40px; height: 40px;
flex-shrink: 0;
} }
.index .header .header-right .user-data { .index .header .header-right .user-data {
@ -445,7 +446,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
padding: 0 20px 0 10px; padding: 0 5px 0 10px;
margin-right: 20px; margin-right: 20px;
border-right: 1px solid rgba(255, 255, 255, 0.2); border-right: 1px solid rgba(255, 255, 255, 0.2);
} }
@ -470,6 +471,7 @@
background: url(../image/login-out.png) no-repeat center; background: url(../image/login-out.png) no-repeat center;
background-size: 100% 100%; background-size: 100% 100%;
cursor: pointer; cursor: pointer;
flex-shrink: 0;
} }
.index .header .header-right .login-out:hover { .index .header .header-right .login-out:hover {

File diff suppressed because one or more lines are too long

View File

@ -466,6 +466,7 @@
>img { >img {
width: 40px; width: 40px;
height: 40px; height: 40px;
flex-shrink: 0;
} }
.user-data { .user-data {
@ -473,7 +474,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
padding: 0 20px 0 10px; padding: 0 5px 0 10px;
margin-right: 20px; margin-right: 20px;
border-right: 1px solid rgba(255, 255, 255, 0.2); border-right: 1px solid rgba(255, 255, 255, 0.2);
@ -498,7 +499,7 @@
background: url(../image/login-out.png) no-repeat center; background: url(../image/login-out.png) no-repeat center;
background-size: 100% 100%; background-size: 100% 100%;
cursor: pointer; cursor: pointer;
flex-shrink: 0;
&:hover { &:hover {
background: url(../image/login-out-hover.png) no-repeat center; background: url(../image/login-out-hover.png) no-repeat center;
background-size: 100% 100%; background-size: 100% 100%;

View File

@ -773,6 +773,12 @@ export default {
}; };
}, },
watch: { watch: {
'$store.state.equipmentIndex': function(newValue, oldValue) {
const that = this;
setTimeout(() => {
that.dataInit();
}, 0);
},
$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;

View File

@ -259,6 +259,7 @@
v-if="item.type == 6 || item.type == 5 || item.type == 2 || item.type == 15 || item.type == 14 || item.type == 13 || item.type == 12"> 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> {{ item.progress }}%</div>
</div> </div>
<div class="status-fan status-btn" v-else> <div class="status-fan status-btn" v-else>
<div class="btn" :class="item.index == 1 ? 'blue' : 'off'"> <div class="btn" :class="item.index == 1 ? 'blue' : 'off'">
<img class="light-img" :src="getIcon(item)" alt=""> <img class="light-img" :src="getIcon(item)" alt="">
@ -266,6 +267,11 @@
<span>{{ item.index == 1 ? '开启' : '关闭' }}</span> <span>{{ item.index == 1 ? '开启' : '关闭' }}</span>
</div> </div>
</div> </div>
<div class="status-true-text" v-if=" item.type == 15 ">
<div class="status-true-text-left">计算结果</div>
<div class="status-true-text-right">
{{ item.count }}</div>
</div>
</div> </div>
<div v-else class="status-noTrue"> <div v-else class="status-noTrue">
<img src="../../assets/img/status-no.png" alt=""> <img src="../../assets/img/status-no.png" alt="">
@ -1330,63 +1336,63 @@ export default {
statusList.push(fandata) statusList.push(fandata)
} else if (el.id == 2 || el.id == 3 || el.id == 4 || el.id == 5) { } 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))] } 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))],count:0 }
statusList.push(statusData) statusList.push(statusData)
} else if (el.id == 6) { } else if (el.id == 6) {
// //
var statusData = { name: el.name, type: 3, id: el.id, open: res.data.data['1000'], progress: 0, index: res.data.data['1001'] } var statusData = { name: el.name, type: 3, id: el.id, open: res.data.data['1000'], progress: 0, index: res.data.data['1001'],count:0 }
statusList.push(statusData) statusList.push(statusData)
} else if (el.id == 7) { } else if (el.id == 7) {
// //
var statusData = { name: el.name, type: 4, id: el.id, open: res.data.data['1002'], progress: 0, index: res.data.data['1003'] } var statusData = { name: el.name, type: 4, id: el.id, open: res.data.data['1002'], progress: 0, index: res.data.data['1003'],count:0 }
statusList.push(statusData) statusList.push(statusData)
} else if (el.id == 8) { } else if (el.id == 8) {
// //
var statusData = { name: el.name, type: 5, id: el.id, open: res.data.data['1004'], progress: res.data.data['1006'], index: res.data.data['1005'] } var statusData = { name: el.name, type: 5, id: el.id, open: res.data.data['1004'], progress: res.data.data['1006'], index: res.data.data['1005'],count:0 }
statusList.push(statusData) statusList.push(statusData)
} else if (el.id == 9) { } else if (el.id == 9) {
// //
var statusData = { name: el.name, type: 5, id: el.id, open: res.data.data['1007'], progress: res.data.data['1009'], index: res.data.data['1008'] } var statusData = { name: el.name, type: 5, id: el.id, open: res.data.data['1007'], progress: res.data.data['1009'], index: res.data.data['1008'],count:0 }
statusList.push(statusData) statusList.push(statusData)
} else if (el.id == 10) { } else if (el.id == 10) {
// //
var statusData = { name: el.name, type: 6, id: el.id, open: res.data.data['1010'], progress: res.data.data['1012'], index: res.data.data['1011'] } var statusData = { name: el.name, type: 6, id: el.id, open: res.data.data['1010'], progress: res.data.data['1012'], index: res.data.data['1011'],count:0 }
statusList.push(statusData) statusList.push(statusData)
} else if (el.id == 11) { } else if (el.id == 11) {
// //
var statusData = { name: el.name, type: 7, id: el.id, open: res.data.data['1013'], progress: 0, index: res.data.data['1014'] } var statusData = { name: el.name, type: 7, id: el.id, open: res.data.data['1013'], progress: 0, index: res.data.data['1014'],count:0 }
statusList.push(statusData) statusList.push(statusData)
} else if (el.id == 13 || el.id == 14) { } 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))] } 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))],count:0 }
statusList.push(statusData) statusList.push(statusData)
} else if (el.id == 15 || el.id == 16) { } 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))] } 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))],count:0 }
statusList.push(statusData) statusList.push(statusData)
} else if (el.id == 18 || el.id == 19) { } 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))] } 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))],count:0 }
statusList.push(statusData) statusList.push(statusData)
} else if (el.id == 20 || el.id == 21) { } 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))] } 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))],count:0 }
statusList.push(statusData) statusList.push(statusData)
} else if (el.id == 22 || el.id == 23) { } 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))] } 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))],count:0 }
statusList.push(statusData) statusList.push(statusData)
} else if (el.id == 24 || el.id == 25) { } 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))] } 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))],count:0 }
statusList.push(statusData) statusList.push(statusData)
} else if (el.id == 26 || el.id == 27 || el.id == 28 || el.id == 29) { } 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) * 3))], progress: res.data.data[(1104 + ((el.id - 26) * 3))], index: res.data.data[(1103 + ((el.id - 26) * 3))] } var statusData = { name: el.name, type: 15, id: el.id, open: res.data.data[(1102 + ((el.id - 26) * 3))], progress: res.data.data[(1104 + ((el.id - 26) * 3))], index: res.data.data[(1103 + ((el.id - 26) * 3))],count:res.data.data[1115+(el.id - 26)] }
statusList.push(statusData) statusList.push(statusData)
} else if (el.id == 30 || el.id == 31) { } else if (el.id == 30 || el.id == 31) {
// //
var statusData = { name: el.name, type: 16, id: el.id, open: res.data.data[(1182 + ((el.id - 30) * 3))], progress: res.data.data[(1184 + ((el.id - 30) * 3))], index: res.data.data[(1183 + ((el.id - 30) * 3))] } var statusData = { name: el.name, type: 16, id: el.id, open: res.data.data[(1182 + ((el.id - 30) * 3))], progress: res.data.data[(1184 + ((el.id - 30) * 3))], index: res.data.data[(1183 + ((el.id - 30) * 3))],count:0 }
statusList.push(statusData) statusList.push(statusData)
} }

View File

@ -271,6 +271,9 @@
<span>湿帘外翻窗1模式:</span> <span>湿帘外翻窗1模式:</span>
</div> </div>
<div class="input-btn "> <div class="input-btn ">
<div class="btn" @click="changeOpen(0,21974)" :class="inputData[21974] == 0 ? 'blue' : 'green'">
无效
</div>
<div class="btn" @click="changeOpen(1,21974)" :class="inputData[21974] == 1 ? 'blue' : 'green'"> <div class="btn" @click="changeOpen(1,21974)" :class="inputData[21974] == 1 ? 'blue' : 'green'">
<img src="../../assets/image/irrigateSet2.png" alt="" />自动运行 <img src="../../assets/image/irrigateSet2.png" alt="" />自动运行
</div> </div>
@ -318,6 +321,9 @@
<span>湿帘外翻窗2模式:</span> <span>湿帘外翻窗2模式:</span>
</div> </div>
<div class="input-btn "> <div class="input-btn ">
<div class="btn" @click="changeOpen(0,21979)" :class="inputData[21979] == 0 ? 'blue' : 'green'">
无效
</div>
<div class="btn" @click="changeOpen(1,21979)" :class="inputData[21979] == 1 ? 'blue' : 'green'"> <div class="btn" @click="changeOpen(1,21979)" :class="inputData[21979] == 1 ? 'blue' : 'green'">
<img src="../../assets/image/irrigateSet2.png" alt="" />自动运行 <img src="../../assets/image/irrigateSet2.png" alt="" />自动运行
</div> </div>