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

Reviewed-on: #104
portal
xiaomeng 2024-01-25 03:08:05 +00:00
commit 600825f6ca
9 changed files with 130 additions and 73 deletions

View File

@ -1934,6 +1934,16 @@
flex-wrap: wrap;
}
.realTime .page-content .status-view .status-view-content .status-true .status-fan.status-btn > div {
width: 150px;
height: 40px;
}
.realTime .page-content .status-view .status-view-content .status-true .status-fan.status-btn > div > img {
width: 20px;
height: 20px;
}
.realTime .page-content .status-view .status-view-content .status-true .status-fan > div {
min-width: unset;
flex-shrink: 0;

File diff suppressed because one or more lines are too long

View File

@ -2026,7 +2026,15 @@
align-items: center;
justify-content: center;
flex-wrap: wrap;
&.status-btn{
>div{
width: 150px;
height: 40px;
>img{
width: 20px;height: 20px;
}
}
}
>div {
min-width: unset;
flex-shrink: 0;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -92,8 +92,8 @@
<div class="table-title">
<img src="../../assets/image/status.png" alt="" />
设备运行状态
<div class="title-text">日出:{{ sunrise }}</div>
<div class="title-text">日落:{{ sunset }}</div>
<div class="title-text" v-if="sunrise">:{{ sunrise }}</div>
<div class="title-text" v-if="sunset">:{{ sunset }}</div>
</div>
<div class="flex-view border-none">
<div class="status-view" v-for="item, index in statusList" :key="index">
@ -249,12 +249,20 @@
<div class="status-true-charts" style="background: unset;height: 50px;" v-else>
</div>
<div class="status-true-text">
<div class="status-true-text" v-if="item.type == 2 || item.type == 5 || item.type == 6 || item.type == 12
|| item.type == 13 || item.type == 14 || item.type == 15|| item.type == 16">
<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 || item.type == 15 || item.type == 14 || item.type == 13 || item.type == 12">
{{
item.progress }}%</div>
{{ item.progress }}%</div>
</div>
<div class="status-fan status-btn" v-else>
<div class="btn" :class="item.index == 1 ? 'blue' : 'off'">
<img class="light-img" :src="getIcon(item)"
alt="">
<!-- <img v-else src="../../assets/img/fan-off.png" alt=""> -->
<span>{{item.index==1?'开启':'关闭'}}</span>
</div>
</div>
</div>
<div v-else class="status-noTrue">
@ -659,10 +667,72 @@ export default {
height: divH, // 1080 px
})
},
getIcon(item){
var index = item.index
if (item.type == 3) {
//
if (index == 0) {
return require('../../assets/img/fan-off.png')
} else if (index == 1) {
return require('../../assets/img/status-icon3.png')
} else {
return ''
}
} else if (item.type == 10) {
//
if (index == 0) {
return require('../../assets/img/fan-off.png')
} else if (index == 1) {
return require('../../assets/img/status-icon1.png')
} else {
return ''
}
}else if (item.type == 4) {
//
if (index == 0) {
return require('../../assets/img/fan-off.png')
} else if (index == 1) {
return require('../../assets/img/status-icon1.png')
} else {
return ''
}
}else if (item.type == 9) {
//
if (index == 0) {
return require('../../assets/img/fan-off.png')
} else if (index == 1) {
return require('../../assets/img/status-icon.png')
} else {
return ''
}
}
else if (item.type == 11) {
//湿
if (index == 0) {
return require('../../assets/img/fan-off.png')
} else if (index == 1) {
return require('../../assets/img/status-icon5.png')
} else {
return ''
}
}
else if (item.type == 7) {
//
if (index == 0) {
return require('../../assets/img/fan-off.png')
} else if (index == 1) {
return require('../../assets/img/status-icon2.png')
} else {
return ''
}
}
},
getNumberStatus(item) {
var index = item.index
if (item.type == 2 || item.type == 5 || item.type == 6 || item.type == 12
|| item.type == 13 || item.type == 14 || item.type == 15) {
|| item.type == 13 || item.type == 14 || item.type == 15|| item.type == 16) {
//
if (index == 0) {
return '静止状态'
@ -673,70 +743,26 @@ export default {
} else {
return ''
}
} else if (item.type == 3) {
//
if (index == 0) {
return '加温水泵关闭'
} else if (index == 1) {
return '加温水泵打开'
} else {
return ''
}
} else if (item.type == 4) {
//
if (index == 0) {
return '地热风机关闭'
} else if (index == 1) {
return '地热风机打开'
} else {
return ''
}
} else if (item.type == 7) {
//
if (index == 0) {
return '除雪关闭'
} else if (index == 1) {
return '除雪打开'
} 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 ''
}
}
// else if (item.type == 7) {
// //
// if (index == 0) {
// return ''
// } else if (index == 1) {
// return ''
// } else {
// return ''
// }
// } else {
// //
// if (index == 0) {
// return ''
// } else if (index == 1) {
// return ''
// } else {
// return ''
// }
// }
},
createVideo() {
@ -1198,12 +1224,21 @@ export default {
}
this.api.getControlGetState(TargetValue).then(res => {
if (res.data.code == 200) {
if(res.data.data["1119"]){
this.sunrise = this.insertColonEveryTwoDigits(
this.convertToTimeMinutes(res.data.data["1119"])
);
}else{
this.sunrise =''
}
if(res.data.data["1120"]){
this.sunset = this.insertColonEveryTwoDigits(
this.convertToTimeMinutes(res.data.data["1120"])
);
}else{
this.sunset =''
}
const statusList = []
this.nowDevicestatus.forEach((el, index) => {
if (el.id == 1) {
@ -1304,6 +1339,10 @@ export default {
//
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))] }
statusList.push(statusData)
} 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))] }
statusList.push(statusData)
}
})