Merge branch 'pc-master' of https://git.lihe-control.com/xiaomeng/wszhyWx into pc-master
commit
3b38393e3b
|
@ -217,6 +217,25 @@ export default {
|
|||
// 查看用户额外权限
|
||||
user_getjurisdiction(userId,data){
|
||||
return sendGetRequest(`/user/getjurisdiction?userId=${userId}`, data)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
//实时数据页面状态值(查看全部设备)
|
||||
getStatePermissionStatus(data){
|
||||
return sendGetRequest(`/getcontrol/getStatePermissionStatus`, data)
|
||||
},
|
||||
//获取当前权限能看到的设备
|
||||
getPermissionStatus(data){
|
||||
return sendGetRequest(`/getcontrol/getPermissionStatus`, data)
|
||||
},
|
||||
//根据id删除status设备
|
||||
delPermissionStatus(id1,id2){
|
||||
return sendPostRequest(`/getcontrol/delPermissionStatus?deviceId=${id1}&permissionid=${id2}`, '')
|
||||
},
|
||||
//根据id添加status设备
|
||||
addPermissionStatus(id1,id2){
|
||||
return sendPostRequest(`/getcontrol/addStatepermission?deviceId=${id1}&Permissionid=${id2}`, '')
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
|
|
@ -225,6 +225,11 @@
|
|||
color: #00FFBA;
|
||||
}
|
||||
|
||||
.table-title .title-text {
|
||||
font-size: 16px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.index {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
@ -1011,7 +1016,7 @@
|
|||
max-height: 50px;
|
||||
}
|
||||
|
||||
.upload .upload-content > div > .no-sel {
|
||||
.upload .upload-content > div .no-sel {
|
||||
margin-right: 10px;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
|
@ -1694,7 +1699,7 @@
|
|||
}
|
||||
|
||||
.realTime .page-content .status-view .status-view-top {
|
||||
padding: 0 10px 0 20px;
|
||||
padding: 0 10px 0 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
@ -1707,6 +1712,7 @@
|
|||
font-family: Microsoft YaHei;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.realTime .page-content .status-view .status-view-top .status-view-top-right {
|
||||
|
@ -1852,6 +1858,15 @@
|
|||
flex-direction: column;
|
||||
}
|
||||
|
||||
.realTime .page-content .status-view .status-view-content .status-noTrue.status-add {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.realTime .page-content .status-view .status-view-content .status-noTrue.status-add > img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.realTime .page-content .status-view .status-view-content .status-noTrue > img {
|
||||
width: 40px;
|
||||
height: 35px;
|
||||
|
@ -1942,6 +1957,7 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
padding-right: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.wufang .no-sel {
|
||||
|
@ -2158,6 +2174,32 @@
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
.skylight .flex-sel {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-right: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.skylight .no-sel {
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
box-shadow: 0 0 15px rgba(53, 187, 247, 0.5) inset;
|
||||
border: 1px solid rgba(0, 204, 255, 0.7);
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
margin-right: 9px;
|
||||
}
|
||||
|
||||
.skylight .sel {
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
margin-right: 9px;
|
||||
background: url(../image/radio.png) no-repeat center;
|
||||
background-size: 100% 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.skylight .input-sel {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
@ -2166,12 +2208,8 @@
|
|||
border: none;
|
||||
}
|
||||
|
||||
.skylight .input-main {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.skylight .input-main > input {
|
||||
width: 260px;
|
||||
.skylight .border-bottom {
|
||||
border-bottom: 1px solid rgba(2, 148, 226, 0.5);
|
||||
}
|
||||
|
||||
.fan .bold-title {
|
||||
|
@ -2943,3 +2981,48 @@
|
|||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
|
||||
.model-title {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
padding: 15px 0;
|
||||
}
|
||||
|
||||
.model-sel {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
min-height: 200px;
|
||||
max-height: 700px;
|
||||
overflow: auto;
|
||||
padding: 0 30px;
|
||||
}
|
||||
|
||||
.model-sel > div {
|
||||
width: 33%;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.model-sel .no-sel {
|
||||
margin-right: 10px;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
box-shadow: 0 0 15px rgba(53, 187, 247, 0.5) inset;
|
||||
border: 1px solid rgba(0, 204, 255, 0.7);
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.model-sel .sel {
|
||||
margin-right: 10px;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
background: url(../image/radio.png) no-repeat center;
|
||||
background-size: 100% 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -245,6 +245,10 @@
|
|||
font-weight: 400;
|
||||
color: #00FFBA;
|
||||
}
|
||||
.title-text{
|
||||
font-size: 16px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.index {
|
||||
|
@ -1057,7 +1061,7 @@ margin-top: 20px;
|
|||
white-space: nowrap;
|
||||
max-height: 50px;
|
||||
|
||||
>.no-sel {
|
||||
.no-sel {
|
||||
margin-right: 10px;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
|
@ -1791,7 +1795,7 @@ margin-top: 20px;
|
|||
margin: 7.5px;
|
||||
|
||||
.status-view-top {
|
||||
padding: 0 10px 0 20px;
|
||||
padding: 0 10px 0 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
@ -1803,6 +1807,7 @@ margin-top: 20px;
|
|||
font-family: Microsoft YaHei;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.status-view-top-right {
|
||||
|
@ -1951,7 +1956,13 @@ margin-top: 20px;
|
|||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
|
||||
&.status-add{
|
||||
cursor: pointer;
|
||||
>img{
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
>img {
|
||||
width: 40px;
|
||||
height: 35px;
|
||||
|
@ -2055,6 +2066,7 @@ margin-top: 20px;
|
|||
display: flex;
|
||||
align-items: center;
|
||||
padding-right: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.no-sel {
|
||||
width: 35px;
|
||||
|
@ -2288,6 +2300,30 @@ margin-top: 20px;
|
|||
}
|
||||
|
||||
.skylight {
|
||||
.flex-sel{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-right: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.no-sel {
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
box-shadow: 0 0 15px rgba(53, 187, 247, 0.50) inset;
|
||||
border: 1px solid rgba(0, 204, 255, 0.70);
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
margin-right: 9px;
|
||||
}
|
||||
|
||||
.sel {
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
margin-right: 9px;
|
||||
background: url(../image/radio.png) no-repeat center;
|
||||
background-size: 100% 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
.input-sel {
|
||||
margin-right: 20px;
|
||||
|
||||
|
@ -2299,12 +2335,13 @@ margin-top: 20px;
|
|||
.flex-view {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.border-bottom{
|
||||
border-bottom: 1px solid rgba(2, 148, 226, 0.5);
|
||||
}
|
||||
.input-main {
|
||||
margin-right: 20px;
|
||||
|
||||
>input {
|
||||
width: 260px;
|
||||
// width: 260px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3072,3 +3109,46 @@ color: #FFFFFF;
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.model-title{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
padding: 15px 0;
|
||||
}
|
||||
.model-sel{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
min-height:200px ;
|
||||
max-height: 700px;
|
||||
overflow: auto;
|
||||
padding: 0 30px;
|
||||
>div{
|
||||
width: 33%;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.no-sel {
|
||||
margin-right: 10px;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
box-shadow: 0 0 15px rgba(53, 187, 247, 0.50) inset;
|
||||
border: 1px solid rgba(0, 204, 255, 0.70);
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.sel {
|
||||
margin-right: 10px;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
background: url(../image/radio.png) no-repeat center;
|
||||
background-size: 100% 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
|
@ -316,7 +316,6 @@ export function realTimeLine(id, data) {
|
|||
});
|
||||
}
|
||||
export function statusCharts(id, data) {
|
||||
console.log(id,11);
|
||||
var chartDom = document.getElementById(id);
|
||||
var myChart = echarts.init(chartDom);
|
||||
var option;
|
||||
|
|
|
@ -44,7 +44,7 @@ export default new Vuex.Store({
|
|||
{ label: '果实直径', value: 23, countType: 0,unit:'mm' },
|
||||
{ label: '茎秆直径', value: 24, countType: 0,unit:'mm' },
|
||||
{ label: '流速', value: 25, countType: 2,unit:'m/s' },
|
||||
{ label: '瞬时流量', value: 26, countType: 2,unit:'m3' },
|
||||
{ label: '瞬时流量', value: 26, countType: 2,unit:'m³/H' },
|
||||
{ label: '当日流量', value: 27, countType: 2,unit:'T' },
|
||||
{ label: '累计流量', value: 28, countType: 0,unit:'T' },
|
||||
{ label: '无线气象站电池电压', value: 29, countType: 2,unit:'V' },
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<div class="formula realTime">
|
||||
<div class="page-content new-data" :class="deviceName == 10||deviceName == 30 ? 'control-page' : ''">
|
||||
<div class="page-content new-data" :class="deviceName == 10 || deviceName == 30 ? 'control-page' : ''">
|
||||
|
||||
<div class="control-view" v-if="deviceName == 10||deviceName == 30">
|
||||
<div class="control-view" v-if="deviceName == 10 || deviceName == 30">
|
||||
<div class="title">气象站:</div>
|
||||
<vue-seamless class="control-list" :data="controlList" :class-option="defaultOption1">
|
||||
<div class="list-view" v-for="item, index in controlList " :key="index">
|
||||
|
@ -51,7 +51,7 @@
|
|||
|
||||
</div>
|
||||
<div class="flex-list realTime-bottom">
|
||||
<div class="left-view" v-if="deviceName!=30">
|
||||
<div class="left-view" v-if="deviceName != 30">
|
||||
<div ref="monitor" class="monitor" id="monitor">
|
||||
<!-- <video ref="videoPlayer" class="video-js" id="video-js"></video> -->
|
||||
<div ref="videoPlayer" class="video-js" id="video-js"></div>
|
||||
|
@ -66,102 +66,18 @@
|
|||
设备运行状态
|
||||
</div>
|
||||
<div class="flex-view border-none">
|
||||
<div class="status-view">
|
||||
<div class="status-view-top">
|
||||
<div class="status-view-top-left">{{ fanStatus.name }}</div>
|
||||
<!-- <el-popover placement="top" width="140">
|
||||
<div class="set-status-blue">进入修改设定值</div>
|
||||
<el-popover placement="top" width="160">
|
||||
<p class="del-text"><i style="color:red" class="el-popconfirm__icon el-icon-info"></i>确认删除?
|
||||
</p>
|
||||
<div style="text-align: right; margin: 0">
|
||||
<el-button class="el-button el-button--text el-button--mini color-blue">取消</el-button>
|
||||
<el-button class="el-button el-button--text el-button--mini color-blue">确定</el-button>
|
||||
</div>
|
||||
<div class="set-status-red" slot="reference">删除</div>
|
||||
</el-popover>
|
||||
<el-popover placement="right" width="100">
|
||||
<input v-model="item.index" type="text" class="status-save">
|
||||
<el-button class="el-button el-button--text el-button--mini color-blue">保存</el-button>
|
||||
<div class="set-status-blue" slot="reference">排序</div>
|
||||
</el-popover>
|
||||
<img class="status-view-top-right" slot="reference" src="../../assets/img/more.png" alt="">
|
||||
</el-popover> -->
|
||||
<img class="status-view-top-right" slot="reference" src="../../assets/img/more.png" alt="">
|
||||
</div>
|
||||
<div class="status-view-content">
|
||||
<div v-if="fanStatus.open != 0" class="status-true">
|
||||
<div class="status-true-sel">
|
||||
<div class="sel">
|
||||
<img v-if="fanStatus.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="fanStatus.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-fan">
|
||||
<div class="btn" :class="fanStatus.status[0] == 1 ? 'blue' : 'off'">
|
||||
<img class="fan-img" v-if="fanStatus.status[0] == 1" src="../../assets/img/fan-on.png"
|
||||
alt="">
|
||||
<img v-else src="../../assets/img/fan-off.png" alt="">
|
||||
<span>1#风机</span>
|
||||
</div>
|
||||
<div class="btn" :class="fanStatus.status[1] == 1 ? 'blue' : 'off'">
|
||||
<img class="fan-img" v-if="fanStatus.status[1] == 1" src="../../assets/img/fan-on.png"
|
||||
alt="">
|
||||
<img v-else src="../../assets/img/fan-off.png" alt=""> <span>2#风机</span>
|
||||
</div>
|
||||
<div class="btn" :class="fanStatus.status[2] == 1 ? 'blue' : 'off'">
|
||||
<img class="fan-img" v-if="fanStatus.status[2] == 1" src="../../assets/img/fan-on.png"
|
||||
alt="">
|
||||
<img v-else src="../../assets/img/fan-off.png" alt=""> <span>3#风机</span>
|
||||
</div>
|
||||
<div class="btn" :class="fanStatus.status[3] == 1 ? 'blue' : 'off'">
|
||||
<img class="fan-img" v-if="fanStatus.status[3] == 1" src="../../assets/img/fan-on.png"
|
||||
alt="">
|
||||
<img v-else src="../../assets/img/fan-off.png" alt=""> <span>4#风机</span>
|
||||
</div>
|
||||
<div class="btn" :class="fanStatus.status[4] == 1 ? 'blue' : 'off'">
|
||||
<img class="fan-img" v-if="fanStatus.status[4] == 1" src="../../assets/img/fan-on.png"
|
||||
alt="">
|
||||
<img v-else src="../../assets/img/fan-off.png" alt=""> <span>5#风机</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="status-noTrue">
|
||||
<img src="../../assets/img/status-no.png" alt="">
|
||||
<div>当前设备无效</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="status-view" v-for="item, index in statusList" :key="index">
|
||||
<div class="status-view-top">
|
||||
<div class="status-view-top-left">{{ item.name }}</div>
|
||||
<!-- <el-popover placement="top" width="140">
|
||||
<div class="set-status-blue">进入修改设定值</div>
|
||||
<el-popover placement="top" width="160">
|
||||
<p class="del-text"><i style="color:red" class="el-popconfirm__icon el-icon-info"></i>确认删除?
|
||||
</p>
|
||||
<div style="text-align: right; margin: 0">
|
||||
<el-button class="el-button el-button--text el-button--mini color-blue">取消</el-button>
|
||||
<el-button class="el-button el-button--text el-button--mini color-blue">确定</el-button>
|
||||
</div>
|
||||
<div class="set-status-red" slot="reference">删除</div>
|
||||
</el-popover>
|
||||
<el-popover placement="right" width="100">
|
||||
<input v-model="item.index" type="text" class="status-save">
|
||||
<el-button class="el-button el-button--text el-button--mini color-blue">保存</el-button>
|
||||
<div class="set-status-blue" slot="reference">排序</div>
|
||||
</el-popover>
|
||||
<el-popover placement="top" width="140" v-model="item.deltrue">
|
||||
<div class="set-status-red" @click="delStatus(item, index)">删除</div>
|
||||
|
||||
<img class="status-view-top-right" slot="reference" src="../../assets/img/more.png" alt="">
|
||||
</el-popover> -->
|
||||
<img class="status-view-top-right" slot="reference" src="../../assets/img/more.png" alt="">
|
||||
</el-popover>
|
||||
<!-- <img class="status-view-top-right" slot="reference" src="../../assets/img/more.png" alt=""> -->
|
||||
</div>
|
||||
<div class="status-view-content">
|
||||
<!-- 风机 -->
|
||||
<div class="status-view-content" v-if="item.type == 1">
|
||||
<div v-if="item.open != 0" class="status-true">
|
||||
<div class="status-true-sel">
|
||||
<div class="sel">
|
||||
|
@ -175,13 +91,67 @@
|
|||
手机控制
|
||||
</div>
|
||||
</div>
|
||||
<div class="status-true-charts">
|
||||
<div class="status-fan">
|
||||
<div class="btn" :class="item.status[0] == 1 ? 'blue' : 'off'">
|
||||
<img class="fan-img" v-if="item.status[0] == 1" src="../../assets/img/fan-on.png"
|
||||
alt="">
|
||||
<img v-else src="../../assets/img/fan-off.png" alt="">
|
||||
<span>1#风机</span>
|
||||
</div>
|
||||
<div class="btn" :class="item.status[1] == 1 ? 'blue' : 'off'">
|
||||
<img class="fan-img" v-if="item.status[1] == 1" src="../../assets/img/fan-on.png"
|
||||
alt="">
|
||||
<img v-else src="../../assets/img/fan-off.png" alt=""> <span>2#风机</span>
|
||||
</div>
|
||||
<div class="btn" :class="item.status[2] == 1 ? 'blue' : 'off'">
|
||||
<img class="fan-img" v-if="item.status[2] == 1" src="../../assets/img/fan-on.png"
|
||||
alt="">
|
||||
<img v-else src="../../assets/img/fan-off.png" alt=""> <span>3#风机</span>
|
||||
</div>
|
||||
<div class="btn" :class="item.status[3] == 1 ? 'blue' : 'off'">
|
||||
<img class="fan-img" v-if="item.status[3] == 1" src="../../assets/img/fan-on.png"
|
||||
alt="">
|
||||
<img v-else src="../../assets/img/fan-off.png" alt=""> <span>4#风机</span>
|
||||
</div>
|
||||
<div class="btn" :class="item.status[4] == 1 ? 'blue' : 'off'">
|
||||
<img class="fan-img" v-if="item.status[4] == 1" src="../../assets/img/fan-on.png"
|
||||
alt="">
|
||||
<img v-else src="../../assets/img/fan-off.png" alt=""> <span>5#风机</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-if="item.type != 1">
|
||||
<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">
|
||||
<img src="../../assets/img/status-true-charts-icon.png" alt="">
|
||||
<div :id="'statusCharts' + index"></div>
|
||||
</div>
|
||||
<div class="status-true-charts" style="background: unset;height: 50px;" v-else>
|
||||
|
||||
</div>
|
||||
<div class="status-true-text">
|
||||
<div class="status-true-text-left">{{ getNumberStatus(item.index) }}</div>
|
||||
<div class="status-true-text-right">{{ item.progress }}%</div>
|
||||
<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.progress }}%</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="status-noTrue">
|
||||
|
@ -190,8 +160,32 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="status-view">
|
||||
<div class="status-view-top">
|
||||
<div class="status-view-top-left">添加设备</div>
|
||||
</div>
|
||||
<div class="status-view-content">
|
||||
<div class="status-noTrue status-add" @click="addModel = true">
|
||||
<img src="../../assets/img/status-add.png" alt="">
|
||||
<div>点击添加设备</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog title="请选择要显示的设备" :append-to-body="true" :visible.sync="addModel" width="70%">
|
||||
<div class="model-title">请选择要显示的设备</div>
|
||||
<div class="model-sel scroll">
|
||||
<div v-for="item, index in selDevicestatus" :key="index">
|
||||
<div @click="selClick(item)" :class="item.select ? 'sel' : 'no-sel'"></div>
|
||||
{{ item.statePermissions }}
|
||||
</div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="addModel = false">确 认</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -234,9 +228,6 @@ export default {
|
|||
return {
|
||||
statusList: [],
|
||||
|
||||
fanStatus: {
|
||||
name: '风机', open: 0, status: []
|
||||
},
|
||||
time: null,//右上角时间
|
||||
list: [],
|
||||
inputData: [],
|
||||
|
@ -248,6 +239,11 @@ export default {
|
|||
controlList: [],
|
||||
statusInterval: null,//status状态的Interval
|
||||
statusTime: 2,//status状态的秒数
|
||||
|
||||
allDevicestatus: [],//所有权限
|
||||
nowDevicestatus: [],//当前设备权限
|
||||
selDevicestatus: [],//重叠上面数组 判断选择弹窗是否打勾
|
||||
addModel: false,//添加弹窗
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -319,18 +315,49 @@ export default {
|
|||
width: divW, // 播放容器宽高 也可以直接设置成数字 如 1920 单位是px
|
||||
height: divH, // 播放容器宽高 也可以直接设置成数字 如 1080 单位是px
|
||||
})
|
||||
console.log(this.player);
|
||||
},
|
||||
getNumberStatus(index) {
|
||||
if (index == 0) {
|
||||
return '静止状态'
|
||||
} else if (index == 1) {
|
||||
return '正向打开中'
|
||||
} else if (index == 2) {
|
||||
return '反向关闭中'
|
||||
} else {
|
||||
return ''
|
||||
getNumberStatus(item) {
|
||||
var index = item.index
|
||||
if (item.type == 2 || item.type == 5 || item.type == 6) {
|
||||
//顶卷膜
|
||||
if (index == 0) {
|
||||
return '静止状态'
|
||||
} else if (index == 1) {
|
||||
return '正向打开中'
|
||||
} else if (index == 2) {
|
||||
return '反向关闭中'
|
||||
} 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 ''
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
createVideo() {
|
||||
|
||||
|
@ -568,6 +595,7 @@ export default {
|
|||
})
|
||||
|
||||
this.getStatus()
|
||||
this.getStatePermissionStatus()
|
||||
clearInterval(this.statusInterval) && this.statusInterval
|
||||
this.statusInterval = setInterval(() => {
|
||||
if (this.deviceName == 10) {
|
||||
|
@ -615,7 +643,7 @@ export default {
|
|||
var num = el.environmentData + el1.unit
|
||||
this.list.push({
|
||||
...el,
|
||||
name:el.environmentDataId,
|
||||
name: el.environmentDataId,
|
||||
num: num,
|
||||
img: require(`../../assets/image/real-time-${el.formula}.png`)
|
||||
})
|
||||
|
@ -642,6 +670,90 @@ export default {
|
|||
}
|
||||
|
||||
},
|
||||
//获取全部status数据
|
||||
getStatePermissionStatus() {
|
||||
this.api.getStatePermissionStatus().then(res => {
|
||||
if (res.data.code == 200) {
|
||||
this.allDevicestatus = res.data.data
|
||||
this.getPermissionStatus()
|
||||
}
|
||||
})
|
||||
},
|
||||
//获取当前设备的权限
|
||||
getPermissionStatus() {
|
||||
var store = this.$store.state
|
||||
var TargetValue = {
|
||||
deviceId: store.equipmentList[this.indexs - 1].deviceId
|
||||
}
|
||||
this.api.getPermissionStatus(TargetValue).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
this.nowDevicestatus = res.data.data
|
||||
var list1 = this.allDevicestatus
|
||||
var list2 = this.nowDevicestatus
|
||||
var resultArray = []
|
||||
// 遍历 list1
|
||||
for (const item1 of list1) {
|
||||
// 查找在 list2 中是否有相同 id 的对象
|
||||
const matchingItem = list2.find(item2 => item2.id === item1.id);
|
||||
|
||||
// 如果找到匹配的对象,则在 list1 对应的对象中添加 select 属性
|
||||
if (matchingItem) {
|
||||
item1.select = true;
|
||||
} else {
|
||||
// 如果没找到匹配的对象,则添加 select 属性并设置为 false
|
||||
item1.select = false;
|
||||
}
|
||||
|
||||
// 将处理后的对象添加到结果数组中
|
||||
resultArray.push(item1);
|
||||
}
|
||||
this.selDevicestatus = resultArray
|
||||
}
|
||||
})
|
||||
},
|
||||
selClick(item) {
|
||||
var store = this.$store.state
|
||||
var deviceId = store.equipmentList[this.indexs - 1].deviceId
|
||||
var statusId = item.id
|
||||
if (item.select) {
|
||||
item.select = false
|
||||
this.$forceUpdate();
|
||||
this.api.delPermissionStatus(deviceId, statusId).then((res => {
|
||||
if (res.data.code == 200) {
|
||||
this.$message({
|
||||
message: '修改成功',
|
||||
type: "success",
|
||||
});
|
||||
this.getPermissionStatus()
|
||||
}
|
||||
}))
|
||||
} else {
|
||||
item.select = true
|
||||
this.$forceUpdate();
|
||||
this.api.addPermissionStatus(deviceId, statusId).then((res => {
|
||||
if (res.data.code == 200) {
|
||||
this.$message({
|
||||
message: '修改成功',
|
||||
type: "success",
|
||||
});
|
||||
this.getPermissionStatus()
|
||||
}
|
||||
}))
|
||||
}
|
||||
},
|
||||
//删除设备
|
||||
delStatus(item, index) {
|
||||
this.statusList[index].deltrue = false
|
||||
var store = this.$store.state
|
||||
var deviceId = store.equipmentList[this.indexs - 1].deviceId
|
||||
var statusId = item.id
|
||||
this.api.delPermissionStatus(deviceId, statusId).then((res => {
|
||||
if (res.data.code == 200) {
|
||||
this.getPermissionStatus()
|
||||
}
|
||||
}))
|
||||
},
|
||||
//获取当前权限能看到的
|
||||
getStatus() {
|
||||
var store = this.$store.state
|
||||
var TargetValue = {
|
||||
|
@ -649,24 +761,57 @@ export default {
|
|||
}
|
||||
this.api.getControlGetState(TargetValue).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
this.fanStatus.open = res.data.data['1023']
|
||||
this.fanStatus.status = []
|
||||
var num = res.data.data['1024']
|
||||
var num1 = this.padString(num.toString(2), 5)
|
||||
var openListNew = []
|
||||
openListNew = num1.split("")
|
||||
this.fanStatus.status = openListNew.reverse()
|
||||
this.statusList = []
|
||||
for (var i = 0; i < 4; i++) {
|
||||
var statusData = { name: `顶卷膜${i + 1}`, open: res.data.data[(1025 + (i * 3))], progress: res.data.data[(1027 + (i * 3))], index: res.data.data[(1026 + (i * 3))] }
|
||||
this.statusList.push(statusData)
|
||||
|
||||
|
||||
}
|
||||
const statusList = []
|
||||
this.nowDevicestatus.forEach((el, index) => {
|
||||
if (el.id == 1) {
|
||||
//风机
|
||||
var fandata = {}
|
||||
fandata.open = res.data.data['1023']
|
||||
fandata.id = el.id
|
||||
fandata.type = 1
|
||||
fandata.name = el.name
|
||||
fandata.status = []
|
||||
var num = res.data.data['1024']
|
||||
var num1 = this.padString(num.toString(2), 5)
|
||||
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))] }
|
||||
statusList.push(statusData)
|
||||
} 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'] }
|
||||
statusList.push(statusData)
|
||||
} 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'] }
|
||||
statusList.push(statusData)
|
||||
} 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'] }
|
||||
statusList.push(statusData)
|
||||
} 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'] }
|
||||
statusList.push(statusData)
|
||||
} 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'] }
|
||||
statusList.push(statusData)
|
||||
} 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'] }
|
||||
statusList.push(statusData)
|
||||
}
|
||||
})
|
||||
this.statusList = statusList
|
||||
this.$forceUpdate();
|
||||
setTimeout(() => {
|
||||
this.statusList.forEach((el, index) => {
|
||||
if (el.open != 0) {
|
||||
if (el.open != 0 && (el.type == 6 || el.type == 5 || el.type == 2)) {
|
||||
statusCharts(`statusCharts${index}`, el.progress)
|
||||
}
|
||||
})
|
||||
|
@ -674,9 +819,7 @@ export default {
|
|||
|
||||
} else {
|
||||
this.statusList = []
|
||||
this.fanStatus = {
|
||||
name: '风机', open: 0, status: []
|
||||
}
|
||||
|
||||
this.$forceUpdate();
|
||||
// this.$message.error(res.data.msg);
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="table-title">
|
||||
<img src="../../assets/image/skylight.png" alt=""> 顶卷膜{{ indexs }}
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="flex-view border-bottom">
|
||||
<div class="input-btn">
|
||||
<div class="btn" @click="changeOpen(1)" :class="openIndex == 1 ? 'blue' : 'green'">
|
||||
<img src="../../assets/image/irrigateSet2.png" alt="" />自动运行
|
||||
|
@ -20,6 +20,43 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
<div class="flex-view border-bottom">
|
||||
<div class="flex-sel border-right" @click="changeOpenTrue(0)">
|
||||
<div v-if="openTrue[0] == 0" class="no-sel"></div>
|
||||
<div v-else class="sel"></div>
|
||||
大风保护有效
|
||||
</div>
|
||||
<div class="flex-sel border-right" @click="changeOpenTrue(1)">
|
||||
<div v-if="openTrue[1] == 0" class="no-sel"></div>
|
||||
<div v-else class="sel"></div>
|
||||
下雨保护
|
||||
</div>
|
||||
<div class="flex-sel" @click="changeOpenTrue(2)">
|
||||
<div v-if="openTrue[2] == 0" class="no-sel"></div>
|
||||
<div v-else class="sel"></div>
|
||||
有雨量桶检测
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view border-bottom">
|
||||
<div class="input-main border-right">
|
||||
<span>风速大于多少</span>
|
||||
<input @blur="blurChange10('21662', $event)" v-model="inputData['21662']" @input="changeCount10('21662', $event)"
|
||||
type="text" value="60" placeholder="60" />
|
||||
<span>m/s,禁止开窗</span>
|
||||
</div>
|
||||
<div class="input-main border-right">
|
||||
<span>大风保护时间</span>
|
||||
<input @blur="blurChange('21663', $event)" v-model="inputData['21663']" @input="change('21663', $event)"
|
||||
type="text" value="60" placeholder="60" />
|
||||
<span>分</span>
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>下雨检测时间</span>
|
||||
<input @blur="blurChange('21664', $event)" v-model="inputData['21664']" @input="change('21664', $event)"
|
||||
type="text" value="60" placeholder="60" />
|
||||
<span>分</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="input-sel">
|
||||
<div class="title">温度选择</div>
|
||||
|
@ -80,23 +117,19 @@
|
|||
<div>全程运行时间</div>
|
||||
<input @blur="blurChange(21621 + ((indexs - 1) * 11), $event)" v-model="inputData[21621 + ((indexs - 1) * 11)]"
|
||||
@input="change(21621 + ((indexs - 1) * 11), $event)" type="number" placeholder="0.0">
|
||||
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view padding-none">
|
||||
<div class="input-main">
|
||||
<div>打开通道</div>
|
||||
<input @blur="blurChange(21622 + ((indexs - 1) * 11), $event)" v-model="inputData[21622 + ((indexs - 1) * 11)]"
|
||||
@input="change(21622 + ((indexs - 1) * 11), $event)" type="number" placeholder="0.0">
|
||||
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view padding-none">
|
||||
<div class="input-main">
|
||||
<div>关闭通道</div>
|
||||
<input @blur="blurChange(21623 + ((indexs - 1) * 11), $event)" v-model="inputData[21623 + ((indexs - 1) * 11)]"
|
||||
@input="change(21623 + ((indexs - 1) * 11), $event)" type="number" placeholder="0.0">
|
||||
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -124,6 +157,8 @@ export default {
|
|||
{ name: '8#空气温度', value: 10, },],
|
||||
//有效性设置
|
||||
openIndex: 0,
|
||||
|
||||
openTrue: [],
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -134,7 +169,7 @@ export default {
|
|||
that.getNowData();
|
||||
}, 0);
|
||||
},
|
||||
'$route.query.change'(newVal, oldVal){
|
||||
'$route.query.change'(newVal, oldVal) {
|
||||
this.dataInit();
|
||||
},
|
||||
},
|
||||
|
@ -164,6 +199,33 @@ export default {
|
|||
};
|
||||
this.changeBtn(21613 + ((this.indexs - 1) * 11), dataNum);
|
||||
},
|
||||
//反转数组 不影响原数组
|
||||
myReverse(arr) {
|
||||
return [...arr].reverse()
|
||||
},
|
||||
changeOpenTrue(index) {
|
||||
if (this.openTrue[index] == 0) {
|
||||
this.openTrue[index] = 1
|
||||
} else {
|
||||
this.openTrue[index] = 0
|
||||
}
|
||||
this.$forceUpdate();
|
||||
var num = this.myReverse(this.openTrue).join("")
|
||||
|
||||
var dataNum = {
|
||||
target: {
|
||||
value: parseInt(num, 2),
|
||||
},
|
||||
};
|
||||
this.changeBtn('21661', dataNum);
|
||||
},
|
||||
get21661() {
|
||||
var num1 = this.inputData['21661']?this.inputData['21661']:0
|
||||
var num11 = this.padString(num1.toString(2), 3)
|
||||
var openList1New
|
||||
openList1New = num11.split("")
|
||||
this.openTrue = openList1New.reverse()
|
||||
},
|
||||
//类型选择
|
||||
handleCommand(index) {
|
||||
this.TypeSel = this.typeSelList[index].name
|
||||
|
@ -229,14 +291,14 @@ export default {
|
|||
return 0
|
||||
}
|
||||
},
|
||||
// 计算展示值 计算公式 x/10
|
||||
countData10(data) {
|
||||
if (data) {
|
||||
return data / 10
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
// 计算展示值 计算公式 x/10
|
||||
countData10(data) {
|
||||
if (data) {
|
||||
return data / 10
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
dataInit() {
|
||||
var store = this.$store.state
|
||||
var data = {
|
||||
|
@ -247,6 +309,7 @@ export default {
|
|||
if (res.data.code == 200) {
|
||||
this.inputData = res.data.data;
|
||||
this.getNowData()
|
||||
this.get21661()
|
||||
this.inputData[21614] = this.countData10(this.inputData[21614])
|
||||
this.inputData[21615] = this.countData(this.inputData[21615])
|
||||
this.inputData[21617] = this.countData(this.inputData[21617])
|
||||
|
|
|
@ -120,7 +120,6 @@ export default {
|
|||
this.actList2.push(this.actList2New.length-index-1)
|
||||
}
|
||||
})
|
||||
console.log(this.actList2);
|
||||
},
|
||||
dataInit() {
|
||||
this.actList1New = []
|
||||
|
|
|
@ -50,13 +50,13 @@
|
|||
<span>秒</span>
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<div>展开的输出通道</div>
|
||||
<div>打开的通道</div>
|
||||
<input @blur="blurChange('21546', $event)" v-model="inputData['21546']" @input="change('21546', $event)"
|
||||
type="text" value="60" placeholder="60" />
|
||||
<span></span>
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<div>关闭的输出通道</div>
|
||||
<div>关闭的通道</div>
|
||||
<input @blur="blurChange('21547', $event)" v-model="inputData['21547']" @input="change('21547', $event)"
|
||||
type="text" value="60" placeholder="60" />
|
||||
<span></span>
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
<div class="waterPump wufang">
|
||||
<div class="table-title">
|
||||
<img src="../../assets/img/rollByRoll.png" alt=""> 卷被
|
||||
|
||||
<div class="title-text">日出:{{ sunrise }}</div>
|
||||
<div class="title-text">日落:{{ sunset }}</div>
|
||||
</div>
|
||||
<div class="title-tips">卷被有效性设置</div>
|
||||
<div class="flex-view">
|
||||
|
@ -24,56 +27,48 @@
|
|||
|
||||
<div class="flex-view">
|
||||
<div class="flex-sel padding-none" v-if="openTrue.length" @click="changeOpenTrue(0)">
|
||||
<div v-if="openTrue[0]==0" class="no-sel margin-none"></div>
|
||||
<div v-if="openTrue[0] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>①室外光照大于</span>
|
||||
<input @blur="blurChange10('21550', $event)"
|
||||
v-model="inputData['21550']"
|
||||
@input="changeCount10('21550', $event)"
|
||||
type="text" value="60" placeholder="60" />
|
||||
<input @blur="blurChange10('21550', $event)" v-model="inputData['21550']"
|
||||
@input="changeCount10('21550', $event)" type="text" value="60" placeholder="60" />
|
||||
<span>klx,收拢卷被</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="flex-sel padding-none" v-if="openTrue.length" @click="changeOpenTrue(1)">
|
||||
<div v-if="openTrue[1]==0" class="no-sel margin-none"></div>
|
||||
<div v-if="openTrue[1] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>②日出</span>
|
||||
<input @blur="blurChange('21551', $event)"
|
||||
v-model="inputData['21551']"
|
||||
@input="change('21551', $event)"
|
||||
<input @blur="blurChange('21551', $event)" v-model="inputData['21551']" @input="change('21551', $event)"
|
||||
type="text" value="60" placeholder="60" />
|
||||
<span>分钟,收拢卷被</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="flex-sel padding-none" v-if="openTrue.length" @click="changeOpenTrue(2)">
|
||||
<div v-if="openTrue[2]==0" class="no-sel margin-none"></div>
|
||||
<div v-if="openTrue[2] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>③室内1#平均温度低于</span>
|
||||
<input @blur="blurChangeCount('21552', $event)"
|
||||
v-model="inputData['21552']"
|
||||
@input="changeCountData('21552', $event)"
|
||||
type="text" value="60" placeholder="60" />
|
||||
<input @blur="blurChangeCount('21552', $event)" v-model="inputData['21552']"
|
||||
@input="changeCountData('21552', $event)" type="text" value="60" placeholder="60" />
|
||||
<span>℃时,展开卷被</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="flex-sel padding-none" v-if="openTrue.length" @click="changeOpenTrue(3)">
|
||||
<div v-if="openTrue[3]==0" class="no-sel margin-none"></div>
|
||||
<div v-if="openTrue[3] == 0" class="no-sel margin-none"></div>
|
||||
<div v-else class="sel margin-none"></div>
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>④日落前</span>
|
||||
<input @blur="blurChange('21553', $event)"
|
||||
v-model="inputData['21553']"
|
||||
@input="change('21553', $event)"
|
||||
<input @blur="blurChange('21553', $event)" v-model="inputData['21553']" @input="change('21553', $event)"
|
||||
type="text" value="60" placeholder="60" />
|
||||
<span>分钟,展开卷被</span>
|
||||
</div>
|
||||
|
@ -81,25 +76,19 @@
|
|||
<div class="flex-view border-none">
|
||||
<div class="input-main">
|
||||
<div>卷被的行程时间</div>
|
||||
<input @blur="blurChange('21554', $event)"
|
||||
v-model="inputData['21554']"
|
||||
@input="change('21554', $event)"
|
||||
<input @blur="blurChange('21554', $event)" v-model="inputData['21554']" @input="change('21554', $event)"
|
||||
type="text" value="60" placeholder="60" />
|
||||
<span>秒</span>
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<div>卷被开窗的行程时间</div>
|
||||
<input @blur="blurChange('21555', $event)"
|
||||
v-model="inputData['21555']"
|
||||
@input="change('21555', $event)"
|
||||
<input @blur="blurChange('21555', $event)" v-model="inputData['21555']" @input="change('21555', $event)"
|
||||
type="text" value="60" placeholder="60" />
|
||||
<span>秒</span>
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<div>展开的输出通道</div>
|
||||
<input @blur="blurChange('21556', $event)"
|
||||
v-model="inputData['21556']"
|
||||
@input="change('21556', $event)"
|
||||
<input @blur="blurChange('21556', $event)" v-model="inputData['21556']" @input="change('21556', $event)"
|
||||
type="text" value="60" placeholder="60" />
|
||||
<span></span>
|
||||
</div>
|
||||
|
@ -119,6 +108,8 @@ export default {
|
|||
openIndex: 1,
|
||||
inputData: {},
|
||||
openTrue: [],
|
||||
sunrise: '00:00',
|
||||
sunset: '00:00'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -130,21 +121,21 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
//反转数组 不影响原数组
|
||||
myReverse(arr) {
|
||||
//反转数组 不影响原数组
|
||||
myReverse(arr) {
|
||||
return [...arr].reverse()
|
||||
},
|
||||
padString(str, length) {
|
||||
return str.padStart(length, '0');
|
||||
},
|
||||
changeOpenTrue(index) {
|
||||
if( this.openTrue[index]==0){
|
||||
this.openTrue[index]=1
|
||||
}else{
|
||||
this.openTrue[index]=0
|
||||
}
|
||||
this.$forceUpdate();
|
||||
var num=this.myReverse(this.openTrue).join("")
|
||||
if (this.openTrue[index] == 0) {
|
||||
this.openTrue[index] = 1
|
||||
} else {
|
||||
this.openTrue[index] = 0
|
||||
}
|
||||
this.$forceUpdate();
|
||||
var num = this.myReverse(this.openTrue).join("")
|
||||
|
||||
var dataNum = {
|
||||
target: {
|
||||
|
@ -227,12 +218,39 @@ export default {
|
|||
return 0
|
||||
}
|
||||
},
|
||||
get21549(){
|
||||
get21549() {
|
||||
var num1 = this.inputData['21549']
|
||||
var num11 = this.padString(num1.toString(2), 4)
|
||||
var openList1New
|
||||
openList1New = num11.split("")
|
||||
this.openTrue= openList1New.reverse()
|
||||
this.openTrue = openList1New.reverse()
|
||||
},
|
||||
getStatus(data) {
|
||||
this.api.getControlGetState(data).then(res => {
|
||||
if (res.data.code == 200) {
|
||||
this.sunrise = this.insertColonEveryTwoDigits(this.convertToTimeMinutes(res.data.data['1021']))
|
||||
this.sunset = this.insertColonEveryTwoDigits(this.convertToTimeMinutes(res.data.data['1022']))
|
||||
}
|
||||
})
|
||||
},
|
||||
//16进制转为时间 16位无符号高字节是时,低字节是分
|
||||
convertToTimeMinutes(hexValue) {
|
||||
// 将十进制数转换为16进制字符串
|
||||
let hexString = hexValue.toString(16);
|
||||
|
||||
// 补零,确保结果是4位16进制数
|
||||
while (hexString.length < 4) {
|
||||
hexString = '0' + hexString;
|
||||
}
|
||||
|
||||
return hexString;
|
||||
|
||||
},
|
||||
insertColonEveryTwoDigits(inputString) {
|
||||
// 使用正则表达式将字符串每两位切割
|
||||
const chunks = inputString.match(/.{1,2}/g);
|
||||
return chunks.join(':')
|
||||
// 使用join方法将切割后的数组元素用冒号连接起来
|
||||
},
|
||||
dataInit() {
|
||||
var store = this.$store.state
|
||||
|
@ -242,17 +260,18 @@ export default {
|
|||
};
|
||||
this.api.readControl_fiveControl(data).then(res => {
|
||||
console.log(res, 111);
|
||||
if(res.data.code==200){
|
||||
if (res.data.code == 200) {
|
||||
this.inputData = res.data.data
|
||||
this.openIndex = this.inputData['21548']
|
||||
this.openIndex = this.inputData['21548']
|
||||
this.get21549()
|
||||
this.inputData['21552'] = this.countData(this.inputData['21552'])
|
||||
this.inputData['21550'] = this.countData10(this.inputData['21550'])
|
||||
this.inputData['21552'] = this.countData(this.inputData['21552'])
|
||||
this.inputData['21550'] = this.countData10(this.inputData['21550'])
|
||||
}
|
||||
|
||||
|
||||
|
||||
})
|
||||
this.getStatus(data)
|
||||
},
|
||||
//全选文本
|
||||
selectValue(e) {
|
||||
|
|
|
@ -48,14 +48,29 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="flex-sel border-right" @click="changeOpenTrue()">
|
||||
<div v-if="!openTrue" class="no-sel"></div>
|
||||
<div class="flex-sel border-right" @click="changeOpenTrue(0)">
|
||||
<div v-if="openTrue[0] == 0" class="no-sel"></div>
|
||||
<div v-else class="sel"></div>
|
||||
计算的最大开度
|
||||
</div>
|
||||
<div class="flex-sel border-right" @click="changeOpenTrue(1)">
|
||||
<div v-if="openTrue[1] == 0" class="no-sel"></div>
|
||||
<div v-else class="sel"></div>
|
||||
大风保护有效
|
||||
</div>
|
||||
<div class="flex-sel border-right" @click="changeOpenTrue(2)">
|
||||
<div v-if="openTrue[2] == 0" class="no-sel"></div>
|
||||
<div v-else class="sel"></div>
|
||||
下雨保护
|
||||
</div>
|
||||
<div class="flex-sel border-right" @click="changeOpenTrue(3)">
|
||||
<div v-if="openTrue[3] == 0" class="no-sel"></div>
|
||||
<div v-else class="sel"></div>
|
||||
有雨量桶检测
|
||||
</div>
|
||||
<div class="input-main border-right">
|
||||
<span>最大开度</span>
|
||||
<span>{{ inputData['21535'] }}</span>
|
||||
<span>{{ statusNum }}</span>
|
||||
<span>%</span>
|
||||
</div>
|
||||
<div class="input-main">
|
||||
|
@ -64,7 +79,7 @@
|
|||
type="text" value="60" placeholder="60" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view border-none">
|
||||
<div class="flex-view">
|
||||
<div class="input-main">
|
||||
<div>上风口的行程时间</div>
|
||||
<input @blur="blurChange('21538', $event)" v-model="inputData['21538']" @input="change('21538', $event)"
|
||||
|
@ -72,18 +87,40 @@
|
|||
<span>秒</span>
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<div>展开的输出通道</div>
|
||||
<div>打开的通道</div>
|
||||
<input @blur="blurChange('21539', $event)" v-model="inputData['21539']" @input="change('21539', $event)"
|
||||
type="text" value="60" placeholder="60" />
|
||||
<span></span>
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<div>收拢的输出通道</div>
|
||||
<div>关闭的通道</div>
|
||||
<input @blur="blurChange('21540', $event)" v-model="inputData['21540']" @input="change('21540', $event)"
|
||||
type="text" value="60" placeholder="60" />
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view border-none">
|
||||
<div class="input-main border-right">
|
||||
<span>上风口风速大于多少</span>
|
||||
<input @blur="blurChange10('21562', $event)"
|
||||
v-model="inputData['21562']"
|
||||
@input="changeCount10('21562', $event)"
|
||||
type="text" value="60" placeholder="60" />
|
||||
<span>m/s,禁止开窗</span>
|
||||
</div>
|
||||
<div class="input-main border-right">
|
||||
<span>大风保护时间</span>
|
||||
<input @blur="blurChange('21563', $event)" v-model="inputData['21563']" @input="change('21563', $event)"
|
||||
type="text" value="60" placeholder="60" />
|
||||
<span>分</span>
|
||||
</div>
|
||||
<div class="input-main">
|
||||
<span>下雨检测时间</span>
|
||||
<input @blur="blurChange('21564', $event)" v-model="inputData['21564']" @input="change('21564', $event)"
|
||||
type="text" value="60" placeholder="60" />
|
||||
<span>分</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -92,9 +129,14 @@ export default {
|
|||
return {
|
||||
openIndex: 1,
|
||||
inputData: {},
|
||||
openTrue: false,
|
||||
openTrue: [],
|
||||
statusNum:0,
|
||||
statusInterval:null,
|
||||
}
|
||||
},
|
||||
beforeDestroy(){
|
||||
clearInterval(this.statusInterval)&&this.statusInterval
|
||||
},
|
||||
mounted() {
|
||||
this.dataInit();
|
||||
//input获取焦点后全选
|
||||
|
@ -104,15 +146,33 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
changeOpenTrue() {
|
||||
this.openTrue = !this.openTrue
|
||||
//反转数组 不影响原数组
|
||||
myReverse(arr) {
|
||||
return [...arr].reverse()
|
||||
},
|
||||
changeOpenTrue(index) {
|
||||
if (this.openTrue[index] == 0) {
|
||||
this.openTrue[index] = 1
|
||||
} else {
|
||||
this.openTrue[index] = 0
|
||||
}
|
||||
this.$forceUpdate();
|
||||
var num = this.myReverse(this.openTrue).join("")
|
||||
|
||||
var dataNum = {
|
||||
target: {
|
||||
value: this.openTrue ? 1 : 0,
|
||||
value: parseInt(num, 2),
|
||||
},
|
||||
};
|
||||
this.changeBtn('21531', dataNum);
|
||||
},
|
||||
get21531() {
|
||||
var num1 = this.inputData['21531']
|
||||
var num11 = this.padString(num1.toString(2), 4)
|
||||
var openList1New
|
||||
openList1New = num11.split("")
|
||||
this.openTrue = openList1New.reverse()
|
||||
},
|
||||
padString(str, length) {
|
||||
return str.padStart(length, '0');
|
||||
},
|
||||
|
@ -197,12 +257,24 @@ export default {
|
|||
if(res.data.code==200){
|
||||
this.inputData = res.data.data
|
||||
this.openIndex = this.inputData['21530']
|
||||
this.openTrue = this.inputData['21531']==0?false:true
|
||||
this.get21531()
|
||||
this.inputData['21532'] = this.countData(this.inputData['21532'])
|
||||
this.inputData['21533'] = this.countData10(this.inputData['21533'])
|
||||
}
|
||||
|
||||
})
|
||||
this.getStatus(data)
|
||||
clearInterval(this.statusInterval)&&this.statusInterval
|
||||
this.statusInterval=setInterval(() => {
|
||||
this.getStatus(data)
|
||||
}, 3000);
|
||||
},
|
||||
getStatus(data){
|
||||
this.api.getControlGetState(data).then(res=>{
|
||||
if(res.data.code==200){
|
||||
this.statusNum=res.data.data['1015']
|
||||
}
|
||||
})
|
||||
},
|
||||
//全选文本
|
||||
selectValue(e) {
|
||||
|
|
|
@ -41,10 +41,10 @@
|
|||
</div>
|
||||
<div class="flex-view border-none">
|
||||
<div class="input-main">
|
||||
<span>室内1#平均温度夜间时段低于</span>
|
||||
<span>室内1#平均温度夜间时段高于</span>
|
||||
<input @blur="blurChangeCount('21524', $event)" v-model="inputData['21524']"
|
||||
@input="changeCountData('21524', $event)" type="text" value="60" placeholder="60" />
|
||||
<span>℃启动</span>
|
||||
<span>停止</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-view border-none">
|
||||
|
|
Loading…
Reference in New Issue