@ -126,12 +126,12 @@
< el -table -column label = "|" width = "5" > < / e l - t a b l e - c o l u m n >
< el -table -column label = "温度(实际/设定)" style = "cursor: pointer" >
< template slot -scope = " scope " >
< span v -if = " scope.row.funcCat = = 1 " @click ="clickConditions(scope.row)" style = "cursor: pointer"
< span @click ="clickConditions(scope.row)" style = "cursor: pointer"
: style = "{ color: scope.row.open == 1 ? 'white' : '#9d9d9d' }" > { { scope . row . temCur ? scope . row . temCur :
"--"
} } ℃ / { {
scope . row . temSetting ? scope . row . temSetting : "--"
} } ℃ < / span > < span v -else : style = "{ color: scope.row.open == 1 ? 'white' : '#9d9d9d' }" > -- < / span >
} } ℃ < / span >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "|" width = "5" > < / e l - t a b l e - c o l u m n >
@ -179,23 +179,37 @@
< div class = "flex-center-between" style = "padding: 0 1rem" >
< div class = "open-txt" >
{ { testObject1 . name } }
< span > { {
< span v-if ="testObject1.funcCat == 1" > { {
testObject1 . mode == 0
? "通风"
: testObject1 . mode == 1
? "制热"
: "制冷"
} } < / span >
< span v-if ="testObject1.funcCat == 3" > {{
testObject1 . mode == 0
? "内机制热"
: testObject1 . mode == 1
? "内机地暖同时制热"
: testObject1 . mode == 2
? "地暖制热"
: testObject1 . mode == 3
? "制冷"
: testObject1 . mode == 9
? "通风"
: ""
} } < / span >
< / div >
< div >
< img style = "width: 44px; height: 22px" v -if = " testObject1.open = = 1 "
src = "../../../public/img/monitoring/open.png" @ click = "closeCondition" / >
< img style = "width: 44px; height: 22px" v -if = " testObject1.open = = 2 "
< img style = "width: 44px; height: 22px" v -if = " testObject1.open = = 2 | | testObject1.open = = 0 "
src = "../../../public/img/monitoring/off.png" @ click = "openCondition" / >
< / div >
< / div >
< div class = "conditios-block" v-if ="testObject1.open == 1" >
< div class = "conditios-block-temper" v-if ="testObject1.mode == 0" style="justify-content: center" >
< div class = "conditios-block-temper" v -if = " testObject1.mode = = 0 | | testObject1.mode = = 9 "
style = "justify-content: center" >
< img src = "../../../public/img/monitoring/electricity/green-wind.png" alt = "" / >
< / div >
< div class = "conditios-block-temper" v-else >
@ -214,7 +228,7 @@
< div class = "conditios-block-temper1-right" >
< img src = "../../../public/img/monitoring/electricity/wind-line.png" alt = "" / >
当前风速 :
< span > { {
< span v-if ="testObject1.funcCat == 1" > { {
testObject1 . speed == 0
? "低速"
: testObject1 . speed == 1
@ -223,11 +237,21 @@
? "高速"
: "自动"
} } < / span >
< span v-if ="testObject1.funcCat == 3" > {{
testObject1 . speed == 1
? "低速"
: testObject1 . speed == 2
? "中速"
: testObject1 . speed == 3
? "高速"
: "自动"
} } < / span >
< / div >
< / div >
< / div >
< div class = "conditios-block" v-if ="testObject1.open == 2" >
< div class = "conditios-block-temper" v-if ="testObject1.mode == 0" style="justify-content: center" >
< div class = "conditios-block" v-if ="testObject1.open == 2 || testObject1.open == 0" >
< div class = "conditios-block-temper" v -if = " testObject1.mode = = 0 | | testObject1.mode = = 9 "
style = "justify-content: center" >
< img src = "../../../public/img/monitoring/electricity/gray-wind.png" alt = "" / >
< / div >
< div class = "conditios-block-temper" v-else >
@ -246,18 +270,32 @@
< div class = "conditios-block-temper1-right" >
< img src = "../../../public/img/monitoring/electricity/wind-line.png" alt = "" / >
当前风速 :
< span > { {
< span v-if ="testObject1.funcCat == 1" > { {
testObject1 . speed == 0
? "低速"
: testObject1 . windSpeed == 1
: testObject1 . speed == 1
? "中速"
: testObject1 . speed == 2
? "高速"
: "自动"
} } < / span >
< span v-if ="testObject1.funcCat == 3" > {{
testObject1 . speed == 1
? "低速"
: testObject1 . speed == 2
? "中速"
: testObject1 . windSpeed == 2
: testObject1 . speed == 3
? "高速"
: "自动"
} } < / span >
< / div >
< / div >
< / div >
<!-- 设备不在线 -- >
< div class = "conditios-block" style = "text-align:center;padding:4rem 0;" v-if ="testObject1.open == -1" >
< img src = "../../../public/img/monitoring/device_online.png" / >
< div style = "color:#7597cb;font-size:0.14rem;margin-top:0.1rem;" > 设备离线 < / div >
< / div >
< / div >
< / div >
< / template >
@ -279,6 +317,11 @@ import {
getLifList ,
getAirWarnList , / / 报 警 列 表
getCancelWarn , / / 关 闭 告 警
setLoraTemp , / / 设 置 l o r a 面 板 温 度
setLoraStatus , / / 设 置 l o r a 面 板 开 关 0 : 关 机 1 : 开 机
setLoraModel , / / 设 置 l o r a 面 板 模 式 0 : 内 机 制 热 1 : 内 机 地 暖 同 时 制 热 ( 默 认 ) 2 : : 地 暖 制 热 3 : 制 冷 模 式 9 : 通 风 模 式 |
setLoraSpeed , / / 设 置 l o r a 面 板 风 速 1 : 低 速 2 : 中 速 3 : 高 速 4 : 自 动
queryLoraAll , / / 读 取 l o r a 面 板 # # # 读 取 空 调 面 板 的
} from "@/api/garden/monitoring" ;
import clickCp from "./clickCp" ;
import backHome from "./backHome" ;
@ -386,7 +429,7 @@ export default {
bfHelper . customTag (
{ x : item . xmove , y : item . ymove , z : item . zmove } ,
null ,
this . getContent ( item )
item . funcCat == 1 ? this . getContent ( item ) : item . funcCat == 2 ? this . getOAContent ( item ) : this . getMb Content ( item )
) ;
} ) ;
} ,
@ -396,14 +439,14 @@ export default {
bfHelper . customTag (
this . position ,
null ,
this . getContent ( this . testObject1 )
this . testObject1 . funcCat == 1 ? this . getContent ( this . testObject1 ) : this . testObject1 . funcCat == 2 ? this . getOAContent ( this . testObject1 ) : this . getMb Content ( this . testObject1 )
) ;
} else if ( this . conditionNum == 2 ) {
this . allDatas . forEach ( ( item ) => {
bfHelper . customTag (
{ x : item . xmove , y : item . ymove , z : item . zmove } ,
null ,
this . getContent ( item )
item . funcCat == 1 ? this . getContent ( item ) : item . funcCat == 2 ? this . getOAContent ( item ) : this . getMb Content ( item )
) ;
} ) ;
}
@ -614,7 +657,7 @@ export default {
z : item . zmove ,
} ,
null ,
item . funcCat == 1 ? this . getContent ( item ) : this . getOAContent ( item )
item . funcCat == 1 ? this . getContent ( item ) : item . funcCat == 2 ? this . getOAContent ( item ) : this . getMb Content ( item )
) ;
} ) ;
} else {
@ -630,6 +673,12 @@ export default {
/ / 改 变 空 调 模 式
if ( this . testObject1 . open == 1 ) {
this . testObject1 . mode = mode ;
if ( this . testObject1 . funcCat == 3 ) {
/ / l o r a 面 板
setLoraModel ( this . testObject1 . code , this . testObject1 . mode ) . then ( res => {
} )
return ;
}
var arr = bfHelper . getAll ( ) ;
bfHelper . clearTags ( ) ;
if ( arr . length < 2 ) {
@ -654,7 +703,7 @@ export default {
z : item . zmove ,
} ,
null ,
this . getContent ( item )
item . funcCat == 1 ? this . getContent ( item ) : item . funcCat == 2 ? this . getOAContent ( item ) : this . getMb Content ( item )
) ;
} ) ;
}
@ -677,6 +726,18 @@ export default {
if ( this . testObject1 . temSetting <= 16 ) {
this . testObject1 . temSetting = 16 ;
}
if ( this . testObject1 . funcCat == 3 ) {
/ / l o r a 面 板
setLoraTemp ( this . testObject1 . code , this . testObject1 . temSetting ) . then ( res => {
if ( res . data . code == 200 ) {
this . $message . success ( '温度设置成功' ) ;
} else {
this . $message . error ( '温度设置失败' ) ;
this . testObject1 . temSetting ++ ;
}
} )
return ;
}
setConditionTemDown (
this . testObject1 . code ,
this . testObject1 . temSetting
@ -698,6 +759,18 @@ export default {
if ( this . testObject1 . temSetting >= 30 ) {
this . testObject1 . temSetting = 30 ;
}
if ( this . testObject1 . funcCat == 3 ) {
/ / l o r a 面 板
setLoraTemp ( this . testObject1 . code , this . testObject1 . temSetting ) . then ( res => {
if ( res . data . code == 200 ) {
this . $message . success ( '温度设置成功' ) ;
} else {
this . $message . error ( '温度设置失败' ) ;
this . testObject1 . temSetting -- ;
}
} )
return ;
}
setConditionTemUp (
this . testObject1 . code ,
this . testObject1 . temSetting
@ -716,6 +789,12 @@ export default {
if ( this . testObject1 . speed <= 0 ) {
this . testObject1 . speed = 0 ;
}
if ( this . testObject1 . funcCat == 3 ) {
/ / l o r a 面 板
setLoraSpeed ( this . testObject1 . code , this . testObject1 . speed ) . then ( res => {
} )
return ;
}
setConditionSpeedDown (
this . testObject1 . code ,
this . testObject1 . speed
@ -733,6 +812,12 @@ export default {
if ( this . testObject1 . speed >= 3 ) {
this . testObject1 . speed = 3 ;
}
if ( this . testObject1 . funcCat == 3 ) {
/ / l o r a 面 板
setLoraSpeed ( this . testObject1 . code , this . testObject1 . speed ) . then ( res => {
} )
return ;
}
setConditionSpeedUp ( this . testObject1 . code , this . testObject1 . speed ) . then (
( res ) => {
if ( res . data . code == 200 ) {
@ -746,6 +831,13 @@ export default {
if ( this . testObject1 . agentCtrl == 0 ) {
this . $message . error ( "暂无设备控制权限!" ) ;
} else {
if ( this . testObject1 . funcCat == 3 ) {
/ / l o r a 面 板
setLoraStatus ( this . testObject1 . code , 0 ) . then ( res => {
this . testObject1 . open = 2 ;
} )
return ;
}
getConditionClose ( this . testObject1 . code ) . then ( ( res ) => {
if ( res . data . code == 200 ) {
if ( res . data . data ) {
@ -761,7 +853,7 @@ export default {
z : this . testObject1 . zmove ,
} ,
null ,
this . getContent ( this . testObject1 )
this . testObject1 . funcCat == 1 ? this . getContent ( this . testObject1 ) : this . testObject1 . funcCat == 2 ? this . getOAContent ( this . testObject1 ) : this . getMb Content ( this . testObject1 )
) ;
} else {
this . allDatas . forEach ( ( item ) => {
@ -775,7 +867,7 @@ export default {
z : item . zmove ,
} ,
null ,
this . getContent ( item )
item . funcCat == 1 ? this . getContent ( item ) : item . funcCat == 2 ? this . getOAContent ( item ) : this . getMb Content ( item )
) ;
} ) ;
}
@ -790,6 +882,13 @@ export default {
if ( this . testObject1 . agentCtrl == 0 ) {
this . $message . error ( "暂无设备控制权限!" ) ;
} else {
if ( this . testObject1 . funcCat == 3 ) {
/ / l o r a 面 板
setLoraStatus ( this . testObject1 . code , 1 ) . then ( res => {
this . testObject1 . open = 1 ;
} )
return ;
}
getConditionOpen ( this . testObject1 . code ) . then ( ( res ) => {
if ( res . data . code == 200 ) {
if ( res . data . data ) {
@ -797,8 +896,7 @@ export default {
this . testObject1 . open = 1 ;
var arr = bfHelper . getAll ( ) ;
bfHelper . clearTags ( ) ;
if ( arr . length < 2 ) {
getOAContent
if ( arr . length < 2 ) { getOAContent
bfHelper . customTag (
{
x : this . testObject1 . xmove ,
@ -806,7 +904,7 @@ export default {
z : this . testObject1 . zmove ,
} ,
null ,
this . testObject1 . funcCat == 1 ? this . getContent ( this . testObject1 ) : this . getOAContent ( this . testObject1 )
this . testObject1 . funcCat == 1 ? this . getContent ( this . testObject1 ) : this . testObject1 . funcCat == 2 ? this . getOAContent ( this . testObject1 ) : this . getMb Content ( this . testObject1 )
) ;
} else {
this . allDatas . forEach ( ( item ) => {
@ -820,7 +918,7 @@ export default {
z : item . zmove ,
} ,
null ,
item . funcCat == 1 ? this . getContent ( item ) : this . getOAContent ( item )
item . funcCat == 1 ? this . getContent ( item ) : item . funcCat == 2 ? this . getOAContent ( item ) : this . getMb Content ( item )
) ;
} ) ;
}
@ -897,8 +995,9 @@ export default {
bfHelper . customTag (
this . position ,
null ,
row . funcCat == 1 ? this . getContent ( this . testObject1 ) : this . getOAContent ( this . testObject1 )
row . funcCat == 1 ? this . getContent ( this . testObject1 ) : row . funcCat == 2 ? this . getOAContent ( this . testObject1 ) : this . getMb Content ( this . testObject1 )
) ;
this . removeEvent ( ) ;
window . addEventListener ( "click" , this . addEvent ) ;
this . conditionNum = 1 ;
}
@ -931,10 +1030,30 @@ export default {
code = e . target . id . substring ( 7 ) ;
}
if ( code ) {
let funcCatObj = this . allDatas . find ( item => { return item . code == code } ) ;
if ( funcCatObj && funcCatObj . funcCat == 3 ) {
/ / l o r a 面 板
queryLoraAll ( code ) . then ( res => {
this . testObject1 = res . data . data ;
this . testObject1 . funcCat = 3 ;
if (
e . target . id == "condition-" + code ||
e . target . id == "temper-" + code ||
e . target . id == "tempea-" + code ||
e . target . id == "tempec-" + code ||
e . target . id == "tempac-" + code ||
e . target . id == "temped-" + code
) {
this . isControl = true ;
this . clickCode = code ;
}
} )
return ;
}
getConditionData ( code ) . then ( ( res ) => {
if ( res . data . code == 200 ) {
this . testObject1 = res . data . data ;
if ( this . testObject1 . getConditionData == 2 ) {
if ( this . testObject1 . getConditionData == 2 ) {
/ / 新 风 不 需 要 控 制
return ;
}
@ -1006,6 +1125,23 @@ export default {
return content ;
} ,
/ / 空 调 面 板
getMbContent ( testObject ) {
/ / c o n s o l e . l o g ( ' 空 调 面 板 ' , t e s t O b j e c t )
let bgImg1 = require ( "../../../public/img/monitoring/electricity/condition_mb.png" ) ;
let content = ` <div class="lift-block" style="position:relative;width:100px">
< div id = "temped-${testObject.code}" style = "background:#07a7ff url(${bgImg1}) 5px center no-repeat;width:100px;height:34px;color:white;font-size:18px;" id = " temped - $ { testObject.code
} " >
< div id = " condition - $ { testObject.code
} " style=" width : 60 px ; position : absolute ; height : 34 px ; line - height : 34 px ; left : 40 px ; top : 0 ; cursor : pointer " >
< span id = "temper-${testObject.code}" style = "font-size:18px;font-family:fantasy;" > $ { testObject . name } < / span >
< / div >
< / div >
< / div > ` ;
return content ;
} ,
/ / 空 调 主 机 定 位 标 签 样 式
getOAContent ( objData ) {
let content = ` <div class="leadTips" style="transform: translateY(-72px);">