|
@@ -30,7 +30,7 @@
|
|
|
<span class="type">室内温度:</span>
|
|
|
<span class="data">{{SNWD ? Number(SNWD).toFixed(1) + "℃" : "--"}}</span>
|
|
|
</el-col>
|
|
|
- <el-col class="title">
|
|
|
+ <el-col class="title" >
|
|
|
<span class="type">室内湿度:</span>
|
|
|
<span class="data">{{SNSD ? Number(SNSD).toFixed(1) + "%" : "--"}}</span>
|
|
|
</el-col>
|
|
@@ -42,7 +42,11 @@
|
|
|
<span class="type">PM2.5:</span>
|
|
|
<span class="data">{{PM2 ? Number(PM2).toFixed(1) + "μg/m³" : "--"}}</span>
|
|
|
</el-col>
|
|
|
- <el-col class="title">
|
|
|
+ <el-col class="title" v-if="deviceSpecial">
|
|
|
+ <span class="type">VOC:</span>
|
|
|
+ <span class="data">{{ VOC == 1 ? "优" : VOC == 2 ? "良" : VOC == 3 ? "差" : "--"}}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col class="title" v-if="deviceSpecial">
|
|
|
<span class="type">运行状态:</span>
|
|
|
<el-switch
|
|
|
@change="control('YXZT',YXZT)"
|
|
@@ -51,7 +55,16 @@
|
|
|
inactive-color="#ccc">
|
|
|
</el-switch>
|
|
|
</el-col>
|
|
|
- <el-col class="title">
|
|
|
+ <el-col class="title" v-if="qtSpecialStatus">
|
|
|
+ <span class="type">运行状态:</span>
|
|
|
+ <el-switch
|
|
|
+ @change="control('22_AHU_B1_01_SBYCQD',YXZTSpecial)"
|
|
|
+ v-model="YXZTSpecial"
|
|
|
+ active-color="#1C52D8"
|
|
|
+ inactive-color="#ccc">
|
|
|
+ </el-switch>
|
|
|
+ </el-col>
|
|
|
+ <el-col class="title" v-if="deviceSpecial">
|
|
|
<span class="type">运行模式:</span>
|
|
|
<el-select
|
|
|
v-model="YXMS"
|
|
@@ -68,7 +81,7 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-col>
|
|
|
- <el-col class="title">
|
|
|
+ <el-col class="title" v-if="deviceSpecial">
|
|
|
<span class="type">风量挡位:</span>
|
|
|
<el-select
|
|
|
v-model="FLDW"
|
|
@@ -96,12 +109,16 @@ export default {
|
|
|
props:['resInfo'],
|
|
|
data() {
|
|
|
return {
|
|
|
+ deviceSpecial:true,//特殊设备(泰山厅)
|
|
|
+ qtSpecialStatus:false,//特殊设备(泰山厅启停状态)
|
|
|
+ YXZTSpecial:0,
|
|
|
state:false,
|
|
|
dev:null,//设备id
|
|
|
attributePrefix:null,//属性前缀
|
|
|
YXZT:null,//运行状态
|
|
|
YXMS:null,//运行模式
|
|
|
CO2:null,//
|
|
|
+ VOC:null,//
|
|
|
FLDW:null,//风量挡位
|
|
|
PM2:null,//pm2.5
|
|
|
SNSD:null,//室内湿度
|
|
@@ -163,36 +180,57 @@ export default {
|
|
|
ba(id){
|
|
|
ba({"deviceId":id}).then(res =>{
|
|
|
this.state = true
|
|
|
+ if(id == "ahub101"){
|
|
|
+ this.deviceSpecial = false
|
|
|
+ this.qtSpecialStatus = true
|
|
|
+ }
|
|
|
if(res.data){
|
|
|
this.Message.sn = res.data.remark
|
|
|
let data = JSON.parse(res.data.alarmContent)
|
|
|
+ console.log(data)
|
|
|
this.attributePrefix = `${data[0].m.split("_")[0]}_${data[0].m.split("_")[1]}_`
|
|
|
for(let i =0; i<data.length; i++){
|
|
|
- let attribute = data[i].m.split("_")[2]
|
|
|
- if(attribute == "YXZT"){
|
|
|
- this.YXZT = data[i].v == 0 ? false : true
|
|
|
- }
|
|
|
- if(attribute == "YXMS"){
|
|
|
- this.YXMS = data[i].v
|
|
|
- }
|
|
|
- if(attribute == "FLDW"){
|
|
|
- this.FLDW = data[i].v
|
|
|
- }
|
|
|
- if(attribute == "SNWD"){
|
|
|
- this.SNWD = data[i].v
|
|
|
- }
|
|
|
- if(attribute == "SNSD"){
|
|
|
- this.SNSD = data[i].v
|
|
|
- }
|
|
|
- if(attribute == "PM2"){
|
|
|
- this.PM2 = data[i].v
|
|
|
- }
|
|
|
- if(attribute == "CO2"){
|
|
|
- this.CO2 = data[i].v
|
|
|
- }
|
|
|
- if(attribute == "VOC"){
|
|
|
- this.VOC = data[i].v
|
|
|
+ if(id == "ahub101"){
|
|
|
+ if(data[i].m.indexOf("SNWD")>-1){
|
|
|
+ this.SNWD = data[i].v
|
|
|
+ }
|
|
|
+ if(data[i].m.indexOf("SNPM2_5")>-1){
|
|
|
+ this.PM2 = data[i].v
|
|
|
+ }
|
|
|
+ if(data[i].m.indexOf("SNCO2")>-1){
|
|
|
+ this.CO2 = data[i].v
|
|
|
+ }
|
|
|
+ if(data[i].m.indexOf("SNSB")>-1){
|
|
|
+ this.SNSD = data[i].v
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ let attribute = data[i].m.split("_")[2]
|
|
|
+ if(attribute == "YXZT"){
|
|
|
+ this.YXZT = data[i].v == 0 ? false : true
|
|
|
+ }
|
|
|
+ if(attribute == "YXMS"){
|
|
|
+ this.YXMS = data[i].v
|
|
|
+ }
|
|
|
+ if(attribute == "FLDW"){
|
|
|
+ this.FLDW = data[i].v
|
|
|
+ }
|
|
|
+ if(attribute == "SNWD"){
|
|
|
+ this.SNWD = data[i].v
|
|
|
+ }
|
|
|
+ if(attribute == "SNSD"){
|
|
|
+ this.SNSD = data[i].v
|
|
|
+ }
|
|
|
+ if(attribute == "PM2"){
|
|
|
+ this.PM2 = data[i].v
|
|
|
+ }
|
|
|
+ if(attribute == "CO2"){
|
|
|
+ this.CO2 = data[i].v
|
|
|
+ }
|
|
|
+ if(attribute == "VOC"){
|
|
|
+ this.VOC = data[i].v
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -215,6 +253,23 @@ export default {
|
|
|
});
|
|
|
})
|
|
|
},
|
|
|
+ control2(m,v){//控制
|
|
|
+ let arr = {
|
|
|
+ "type":"cmd/set",
|
|
|
+ "data":{
|
|
|
+ "dev":this.dev,
|
|
|
+ "m":m,
|
|
|
+ "v":v == true ? 1 : v == false ? 0 : v
|
|
|
+ },
|
|
|
+
|
|
|
+ }
|
|
|
+ revise({"message":JSON.stringify(arr),"sn":this.Message.sn}).then(res =>{
|
|
|
+ Message({
|
|
|
+ message:"信息已提交,请在2分钟后查看信息变更情况",
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
noPermitInput(e){
|
|
|
var evt = window.event || e ;
|
|
|
if(isIE()){
|