|
|
|
|
@ -22,7 +22,7 @@ |
|
|
|
|
<div class="state flex-center-center"> |
|
|
|
|
<div class="zc flex-center" style="font-family: fantasy"> |
|
|
|
|
<span style="margin-left: 72px">{{ |
|
|
|
|
normalTotal |
|
|
|
|
normalTotal |
|
|
|
|
}}</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="lx flex-center" style="font-family: fantasy"> |
|
|
|
|
@ -84,7 +84,7 @@ |
|
|
|
|
<span class=""></span> |
|
|
|
|
<span class="time" |
|
|
|
|
:style="{ color: item.status == 90000 ? '' : item.status == 90001 ? '#a5bbe5' : '#ff0000' }">{{ |
|
|
|
|
item.warnDate.substring(5, 16) |
|
|
|
|
item.warnDate.substring(5, 16) |
|
|
|
|
}}</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
@ -127,10 +127,11 @@ |
|
|
|
|
<el-table-column label="温度(实际/设定)" style="cursor: pointer"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span @click="clickConditions(scope.row)" style="cursor: pointer" |
|
|
|
|
:style="{ color: scope.row.open == 1 ? 'white' : '#9d9d9d' }">{{ scope.row.temCur ? scope.row.temCur : |
|
|
|
|
:style="{ color: scope.row.open == 1 ? 'white' : '#9d9d9d' }">{{ |
|
|
|
|
scope.row.temCur ? scope.row.temCur : |
|
|
|
|
"--" |
|
|
|
|
}}℃/{{ |
|
|
|
|
scope.row.temSetting ? scope.row.temSetting : "--" |
|
|
|
|
scope.row.temSetting ? scope.row.temSetting : "--" |
|
|
|
|
}}℃</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
@ -139,10 +140,10 @@ |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span @click="clickConditions(scope.row)" style="cursor: pointer" |
|
|
|
|
:style="{ color: scope.row.open == 1 ? 'white' : '#9d9d9d' }">{{ |
|
|
|
|
Number(scope.row.build) + |
|
|
|
|
"号楼" + |
|
|
|
|
Number(scope.row.floored) + |
|
|
|
|
"层" |
|
|
|
|
Number(scope.row.build) + |
|
|
|
|
"号楼" + |
|
|
|
|
Number(scope.row.floored) + |
|
|
|
|
"层" |
|
|
|
|
}}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
@ -179,12 +180,25 @@ |
|
|
|
|
<div class="flex-center-between" style="padding: 0 1rem"> |
|
|
|
|
<div class="open-txt"> |
|
|
|
|
{{ testObject1.name }} |
|
|
|
|
<span>{{ |
|
|
|
|
testObject1.mode == 0 |
|
|
|
|
? "通风" |
|
|
|
|
: testObject1.mode == 1 |
|
|
|
|
? "制热" |
|
|
|
|
: "制冷" |
|
|
|
|
<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> |
|
|
|
|
@ -195,13 +209,13 @@ |
|
|
|
|
</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> |
|
|
|
|
<img src="../../../public/img/monitoring/electricity/jian.png" alt="" @click="descreaseTemper" /> |
|
|
|
|
<span><span style="font-size: 40px; font-family: fantasy">{{ |
|
|
|
|
testObject1.temSetting |
|
|
|
|
testObject1.temSetting |
|
|
|
|
}}</span>℃</span> |
|
|
|
|
<img src="../../../public/img/monitoring/electricity/jia.png" alt="" @click="plusTemper" /> |
|
|
|
|
</div> |
|
|
|
|
@ -214,26 +228,36 @@ |
|
|
|
|
<div class="conditios-block-temper1-right"> |
|
|
|
|
<img src="../../../public/img/monitoring/electricity/wind-line.png" alt="" /> |
|
|
|
|
当前风速: |
|
|
|
|
<span>{{ |
|
|
|
|
testObject1.speed == 0 |
|
|
|
|
? "低速" |
|
|
|
|
: testObject1.speed == 1 |
|
|
|
|
? "中速" |
|
|
|
|
: testObject1.speed == 2 |
|
|
|
|
? "高速" |
|
|
|
|
: "自动" |
|
|
|
|
<span v-if="testObject1.funcCat == 1">{{ |
|
|
|
|
testObject1.speed == 0 |
|
|
|
|
? "低速" |
|
|
|
|
: testObject1.speed == 1 |
|
|
|
|
? "中速" |
|
|
|
|
: testObject1.speed == 2 |
|
|
|
|
? "高速" |
|
|
|
|
: "自动" |
|
|
|
|
}}</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-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> |
|
|
|
|
<img src="../../../public/img/monitoring/electricity/gray-jian.png" alt="" @click="descreaseTemper" /> |
|
|
|
|
<span style="color: #7da0d1"><span style="font-size: 40px; font-family: fantasy">{{ |
|
|
|
|
testObject1.temSetting |
|
|
|
|
testObject1.temSetting |
|
|
|
|
}}</span>℃</span> |
|
|
|
|
<img src="../../../public/img/monitoring/electricity/gray-jia.png" alt="" @click="plusTemper" /> |
|
|
|
|
</div> |
|
|
|
|
@ -246,14 +270,23 @@ |
|
|
|
|
<div class="conditios-block-temper1-right"> |
|
|
|
|
<img src="../../../public/img/monitoring/electricity/wind-line.png" alt="" /> |
|
|
|
|
当前风速: |
|
|
|
|
<span>{{ |
|
|
|
|
testObject1.speed == 0 |
|
|
|
|
? "低速" |
|
|
|
|
: testObject1.windSpeed == 1 |
|
|
|
|
? "中速" |
|
|
|
|
: testObject1.windSpeed == 2 |
|
|
|
|
? "高速" |
|
|
|
|
: "自动" |
|
|
|
|
<span v-if="testObject1.funcCat == 1">{{ |
|
|
|
|
testObject1.speed == 0 |
|
|
|
|
? "低速" |
|
|
|
|
: testObject1.speed == 1 |
|
|
|
|
? "中速" |
|
|
|
|
: testObject1.speed == 2 |
|
|
|
|
? "高速" |
|
|
|
|
: "自动" |
|
|
|
|
}}</span> |
|
|
|
|
<span v-if="testObject1.funcCat == 3">{{ |
|
|
|
|
testObject1.speed == 1 |
|
|
|
|
? "低速" |
|
|
|
|
: testObject1.speed == 2 |
|
|
|
|
? "中速" |
|
|
|
|
: testObject1.speed == 3 |
|
|
|
|
? "高速" |
|
|
|
|
: "自动" |
|
|
|
|
}}</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
@ -279,6 +312,11 @@ import { |
|
|
|
|
getLifList, |
|
|
|
|
getAirWarnList,//报警列表 |
|
|
|
|
getCancelWarn,//关闭告警 |
|
|
|
|
setLoraTemp,//设置lora面板温度 |
|
|
|
|
setLoraStatus,//设置lora面板开关0:关机 1:开机 |
|
|
|
|
setLoraModel,//设置lora面板模式0:内机制热 1:内机地暖同时制热(默认) 2::地暖制热 3:制冷模式 9:通风模式| |
|
|
|
|
setLoraSpeed,//设置lora面板风速1:低速 2:中速 3:高速 4:自动 |
|
|
|
|
queryLoraAll,//读取lora面板### 读取空调面板的 |
|
|
|
|
} from "@/api/garden/monitoring"; |
|
|
|
|
import clickCp from "./clickCp"; |
|
|
|
|
import backHome from "./backHome"; |
|
|
|
|
@ -614,7 +652,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.getMbContent(item) |
|
|
|
|
); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
@ -630,6 +668,12 @@ export default { |
|
|
|
|
//改变空调模式 |
|
|
|
|
if (this.testObject1.open == 1) { |
|
|
|
|
this.testObject1.mode = mode; |
|
|
|
|
if (this.testObject1.funcCat == 3) { |
|
|
|
|
//lora面板 |
|
|
|
|
setLoraModel(this.testObject1.code, this.testObject1.mode).then(res => { |
|
|
|
|
}) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
var arr = bfHelper.getAll(); |
|
|
|
|
bfHelper.clearTags(); |
|
|
|
|
if (arr.length < 2) { |
|
|
|
|
@ -677,6 +721,18 @@ export default { |
|
|
|
|
if (this.testObject1.temSetting <= 16) { |
|
|
|
|
this.testObject1.temSetting = 16; |
|
|
|
|
} |
|
|
|
|
if (this.testObject1.funcCat == 3) { |
|
|
|
|
//lora面板 |
|
|
|
|
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 +754,18 @@ export default { |
|
|
|
|
if (this.testObject1.temSetting >= 30) { |
|
|
|
|
this.testObject1.temSetting = 30; |
|
|
|
|
} |
|
|
|
|
if (this.testObject1.funcCat == 3) { |
|
|
|
|
//lora面板 |
|
|
|
|
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 +784,12 @@ export default { |
|
|
|
|
if (this.testObject1.speed <= 0) { |
|
|
|
|
this.testObject1.speed = 0; |
|
|
|
|
} |
|
|
|
|
if (this.testObject1.funcCat == 3) { |
|
|
|
|
//lora面板 |
|
|
|
|
setLoraSpeed(this.testObject1.code, this.testObject1.speed).then(res => { |
|
|
|
|
}) |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
setConditionSpeedDown( |
|
|
|
|
this.testObject1.code, |
|
|
|
|
this.testObject1.speed |
|
|
|
|
@ -733,6 +807,12 @@ export default { |
|
|
|
|
if (this.testObject1.speed >= 3) { |
|
|
|
|
this.testObject1.speed = 3; |
|
|
|
|
} |
|
|
|
|
if (this.testObject1.funcCat == 3) { |
|
|
|
|
//lora面板 |
|
|
|
|
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 +826,13 @@ export default { |
|
|
|
|
if (this.testObject1.agentCtrl == 0) { |
|
|
|
|
this.$message.error("暂无设备控制权限!"); |
|
|
|
|
} else { |
|
|
|
|
if (this.testObject1.funcCat == 3) { |
|
|
|
|
//lora面板 |
|
|
|
|
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) { |
|
|
|
|
@ -790,6 +877,13 @@ export default { |
|
|
|
|
if (this.testObject1.agentCtrl == 0) { |
|
|
|
|
this.$message.error("暂无设备控制权限!"); |
|
|
|
|
} else { |
|
|
|
|
if (this.testObject1.funcCat == 3) { |
|
|
|
|
//lora面板 |
|
|
|
|
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,7 +891,7 @@ export default { |
|
|
|
|
this.testObject1.open = 1; |
|
|
|
|
var arr = bfHelper.getAll(); |
|
|
|
|
bfHelper.clearTags(); |
|
|
|
|
if (arr.length < 2) {getOAContent |
|
|
|
|
if (arr.length < 2) { |
|
|
|
|
bfHelper.customTag( |
|
|
|
|
{ |
|
|
|
|
x: this.testObject1.xmove, |
|
|
|
|
@ -805,7 +899,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 == 1 ? this.getOAContent(this.testObject1) : this.getMbContent(this.testObject1) |
|
|
|
|
); |
|
|
|
|
} else { |
|
|
|
|
this.allDatas.forEach((item) => { |
|
|
|
|
@ -819,7 +913,7 @@ export default { |
|
|
|
|
z: item.zmove, |
|
|
|
|
}, |
|
|
|
|
null, |
|
|
|
|
item.funcCat == 1 ? this.getContent(item) : this.getOAContent(item) |
|
|
|
|
item.funcCat == 1 ? this.getContent(item) : item.funcCat == 1 ? this.getOAContent(item) : this.getMbContent(item) |
|
|
|
|
); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
@ -896,8 +990,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.getMbContent(this.testObject1) |
|
|
|
|
); |
|
|
|
|
this.removeEvent(); |
|
|
|
|
window.addEventListener("click", this.addEvent); |
|
|
|
|
this.conditionNum = 1; |
|
|
|
|
} |
|
|
|
|
@ -911,6 +1006,10 @@ export default { |
|
|
|
|
// }, |
|
|
|
|
addEvent(e) { |
|
|
|
|
let code = null; |
|
|
|
|
let funcCat = null; |
|
|
|
|
if (e.target.id.indexOf("funcCat") != -1) { |
|
|
|
|
funcCat = e.target.id.substring(7); |
|
|
|
|
} |
|
|
|
|
if (e.target.id.indexOf("condition") != -1) { |
|
|
|
|
code = e.target.id.substring(10); |
|
|
|
|
} |
|
|
|
|
@ -930,10 +1029,24 @@ export default { |
|
|
|
|
code = e.target.id.substring(7); |
|
|
|
|
} |
|
|
|
|
if (code) { |
|
|
|
|
if (funcCat == 3) { |
|
|
|
|
//lora面板 |
|
|
|
|
queryLoraAll(code).then(res => { |
|
|
|
|
this.testObject1 = res.data.data; |
|
|
|
|
if ( |
|
|
|
|
e.target.id == "condition-" + code || |
|
|
|
|
e.target.id == "funcCat-" + 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.funcCat == 2 || this.testObject1.open != -1) { |
|
|
|
|
//新风不需要控制 |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
@ -1005,6 +1118,26 @@ export default { |
|
|
|
|
|
|
|
|
|
return content; |
|
|
|
|
}, |
|
|
|
|
//空调面板 |
|
|
|
|
getMbContent(testObject) { |
|
|
|
|
// console.log('空调面板',testObject) |
|
|
|
|
testObject.xmove = '181933.38275619797'; |
|
|
|
|
testObject.ymove = '83300.38516883833'; |
|
|
|
|
testObject.zmove = '0.5150140523837763'; |
|
|
|
|
let bgImg1 = require("../../../public/img/monitoring/electricity/condition_mb.png"); |
|
|
|
|
let content = `<div id="funcCat-${testObject.funcCat}" class="lift-block" style="position:relative;width:100px"> |
|
|
|
|
<div 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:60px;position:absolute;height:34px;line-height: 34px;left:40px;top:0;cursor: pointer"> |
|
|
|
|
<span 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);"> |
|
|
|
|
|