合并代码

dev
xuechunyuan 3 years ago
commit 7c2b24b6b5
  1. BIN
      public/img/monitoring/device_online.png
  2. BIN
      public/img/monitoring/electricity/condition_mb.png
  3. 55
      src/api/garden/monitoring.js
  4. 234
      src/components/monitoring/conditioner.vue
  5. 4
      src/components/monitoring/door.vue
  6. 231
      src/components/monitoring/lift.vue
  7. 2
      src/components/monitoring/warm.vue
  8. 12
      src/util/bfHelper.js
  9. 26
      src/views/sourceAnaly/components/buildWarm.vue
  10. 5
      src/views/sourceAnaly/components/conditionAnaly.vue
  11. 3
      vue.config.js

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -446,6 +446,61 @@ export const setConditionSpeedDown = (code, value) => {
},
});
};
//lora面板
//设置温度
export const setLoraTemp = (equipCode, tempVal) => {
return request({
url: "/api/blade-desk/lora/air-conditioner/change-temp",
method: "get",
params: {
equipCode,
tempVal,
},
});
};
//设置开关状态
export const setLoraStatus = (equipCode, statusVal) => {
return request({
url: "/api/blade-desk/lora/air-conditioner/change-status",
method: "get",
params: {
equipCode,
statusVal,
},
});
};
//设置模式
export const setLoraModel = (equipCode, value) => {
return request({
url: "/api/blade-desk/lora/air-conditioner/change-model",
method: "get",
params: {
equipCode,
modeVal,
},
});
};
//设置风速
export const setLoraSpeed = (equipCode, speedVal) => {
return request({
url: "/api/blade-desk/lora/air-conditioner/change-speed",
method: "get",
params: {
equipCode,
speedVal,
},
});
};
//设置风速
export const queryLoraAll = (equipCode) => {
return request({
url: "/api/blade-desk/lora/air-conditioner/read-all",
method: "get",
params: {
equipCode,
},
});
};
// 获取楼平均温度
export const getFloorTemp = (area) => {

@ -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>
@ -126,12 +126,12 @@
<el-table-column label="|" width="5"></el-table-column>
<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>
</el-table-column>
<el-table-column label="|" width="5"></el-table-column>
@ -139,10 +139,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,29 +179,43 @@
<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>
<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>
<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" 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>
<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,18 +270,32 @@
<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>
</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,//lora
setLoraStatus,//lora0 1
setLoraModel,//lora0: 1:() 2:: 3: 9:|
setLoraSpeed,//lora1 2 3 4
queryLoraAll,//lora###
} 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.getMbContent(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.getMbContent(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.getMbContent(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.getMbContent(item)
);
});
} else {
@ -630,6 +673,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) {
@ -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.getMbContent(item)
);
});
}
@ -677,6 +726,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 +759,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 +789,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 +812,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 +831,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) {
@ -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.getMbContent(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.getMbContent(item)
);
});
}
@ -790,6 +882,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,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.getMbContent(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.getMbContent(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.getMbContent(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) {
//lora
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) {
// console.log('',testObject)
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:60px;position:absolute;height:34px;line-height: 34px;left:40px;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);">

@ -1041,7 +1041,7 @@ export default {
<span style="padding-left: 36px;line-height: 32px;font-size: 15px;color: white;">${item.name
}</span>
</div>
<div id="door-block0" style="background-color:rgb(53,72,108);width:150px;position:absolute;
<div id="door-block0" style="background-color:rgb(53,72,108);width:160px;position:absolute;
left:90px;top:15px;padding:10px">
<div style="display:flex;justify-content: space-between;">
<span style="font-size:12px;color:silver">设备状态</span>
@ -1066,7 +1066,7 @@ export default {
<span style="font-size:13px;color:white">${item.location}</span>
</div>
<div style="width:100%;height:1px;background:silver;margin:10px 0"></div>
<div id="pass-user" style="max-height:125px;overflow-y:auto">
<div id="pass-user" style="max-height:125px;padding-right:5px;overflow-y:auto">
</div>
</div>

@ -173,7 +173,7 @@ export default {
pos: 0,
height: 5350,
offsetZ: 250,
// path: "ws://192.168.1.3/blade-datamqtt/ws",
// path: "ws://192.168.1.106/blade-datamqtt/ws",
path: "ws://10.90.100.204/blade-datamqtt/ws",
socket: "",
arr: [], //
@ -432,7 +432,7 @@ export default {
name = '塔楼北电梯';
this.arr[i].height = this.height * (this.arr[i].floor * 1 - 1);
}
this.arr[i].floor = this.arr[i].floor ? this.arr[i].floor : '-1'
this.arr[i].floor = this.arr[i].floor ? this.arr[i].floor : '1'
bfHelper.setExternalComponentZ(name, this.height * (this.arr[i].floor * 1 -
1));
}
@ -479,7 +479,7 @@ export default {
this.arr.reverse()
for (let i = 0; i < this.arr.length; i++) {
this.arr[i].height = this.height * (this.arr[i].floor * 1 - 1);
this.arr[i].floor = this.arr[i].floor ? this.arr[i].floor : '-1'
this.arr[i].floor = this.arr[i].floor ? this.arr[i].floor : '1'
bfHelper.setExternalComponentZ(this.arr[i].modelId, this.height * (this.arr[i].floor * 1 - 1));
}
// console.log(this.arr)
@ -530,199 +530,13 @@ export default {
if (typeof (WebSocket) === "undefined") {
alert("您的浏览器不支持socket");
} else {
// this.socket = new WebSocket(this.path);
// // socket
// this.socket.onopen = this.open;
// // socket
// this.socket.onerror = this.error;
// // socket
// this.socket.onmessage = this.getMessage;
//
// let test = setInterval(() => {
// let floor = "01";
// let msg = {
// data: JSON.stringify({
// "id": 91,
// "code": "10700000004",
// "floor": floor,
// "direction": "",
// "status": "90000",
// "statusMsg": "",
// "createTime": "2022-06-18 12:00:00",
// "name": "6",
// "modelId": "(6)",
// "location": "6",
// "factory": "",
// "tendingTime": "",
// "tendingUser": "",
// "tendingPhone": "",
// "alarmStatus": "",
// "alarmType": "",
// "alarmTime": "",
// "alarmContext": "",
// "height": ""
// })
// };
// let msg2 = {
// data: JSON.stringify({
// "id": 88,
// "code": "10700000001",
// "floor": floor,
// "direction": "",
// "status": "90000",
// "statusMsg": "",
// "createTime": "2022-06-18 12:00:00",
// "name": "1",
// "modelId": "(1)",
// "location": "1",
// "factory": "",
// "tendingTime": "",
// "tendingUser": "",
// "tendingPhone": "",
// "alarmStatus": "",
// "alarmType": "",
// "alarmTime": "",
// "alarmContext": "",
// "height": ""
// })
// };
// this.getMessage(msg);
// this.getMessage(msg2);
// setTimeout(() => {
// let floor = "02";
// let msg = {
// data: JSON.stringify({
// "id": 91,
// "code": "10700000004",
// "floor": floor,
// "direction": "",
// "status": "90000",
// "statusMsg": "",
// "createTime": "2022-06-18 12:00:00",
// "name": "6",
// "modelId": "(6)",
// "location": "6",
// "factory": "",
// "tendingTime": "",
// "tendingUser": "",
// "tendingPhone": "",
// "alarmStatus": "",
// "alarmType": "",
// "alarmTime": "",
// "alarmContext": "",
// "height": ""
// })
// };
// let msg2 = {
// data: JSON.stringify({
// "id": 88,
// "code": "10700000001",
// "floor": floor,
// "direction": "",
// "status": "90000",
// "statusMsg": "",
// "createTime": "2022-06-18 12:00:00",
// "name": "1",
// "modelId": "(1)",
// "location": "1",
// "factory": "",
// "tendingTime": "",
// "tendingUser": "",
// "tendingPhone": "",
// "alarmStatus": "",
// "alarmType": "",
// "alarmTime": "",
// "alarmContext": "",
// "height": ""
// })
// };
// this.getMessage(msg);
// this.getMessage(msg2);
// setTimeout(() => {
// let floor = "03";
// let msg = {
// data: JSON.stringify({
// "id": 91,
// "code": "10700000004",
// "floor": floor,
// "direction": "",
// "status": "90000",
// "statusMsg": "",
// "createTime": "2022-06-18 12:00:00",
// "name": "6",
// "modelId": "(6)",
// "location": "6",
// "factory": "",
// "tendingTime": "",
// "tendingUser": "",
// "tendingPhone": "",
// "alarmStatus": "",
// "alarmType": "",
// "alarmTime": "",
// "alarmContext": "",
// "height": ""
// })
// };
// this.getMessage(msg);
// setTimeout(() => {
// let floor = "02";
// let msg = {
// data: JSON.stringify({
// "id": 91,
// "code": "10700000004",
// "floor": floor,
// "direction": "",
// "status": "90000",
// "statusMsg": "",
// "createTime": "2022-06-18 12:00:00",
// "name": "6",
// "modelId": "(6)",
// "location": "6",
// "factory": "",
// "tendingTime": "",
// "tendingUser": "",
// "tendingPhone": "",
// "alarmStatus": "",
// "alarmType": "",
// "alarmTime": "",
// "alarmContext": "",
// "height": ""
// })
// };
// let msg2 = {
// data: JSON.stringify({
// "id": 88,
// "code": "10700000001",
// "floor": floor,
// "direction": "",
// "status": "90000",
// "statusMsg": "",
// "createTime": "2022-06-18 12:00:00",
// "name": "1",
// "modelId": "(1)",
// "location": "1",
// "factory": "",
// "tendingTime": "",
// "tendingUser": "",
// "tendingPhone": "",
// "alarmStatus": "",
// "alarmType": "",
// "alarmTime": "",
// "alarmContext": "",
// "height": ""
// })
// };
// this.getMessage(msg);
// this.getMessage(msg2);
// }, 300)
// }, 300)
// }, 300)
// }, 5000);
// setTimeout(() => {
// clearInterval(test);
// }, 1000 * 20);
this.socket = new WebSocket(this.path);
// socket
this.socket.onopen = this.open;
// socket
this.socket.onerror = this.error;
// socket
this.socket.onmessage = this.getMessage;
}
},
windowClick(e) {
@ -753,26 +567,29 @@ export default {
},
getMessage(msg) {
let obj = JSON.parse(msg.data)
obj.createTime = dateFormat(new Date(obj.createTime), 'yyyy-MM-dd hh:mm');
obj.tendingTime = dateFormat(new Date(obj.tendingTime), 'yyyy-MM-dd hh:mm');
// obj.createTime = dateFormat(new Date(obj.createTime), 'yyyy-MM-dd hh:mm');
// obj.tendingTime = dateFormat(new Date(obj.tendingTime), 'yyyy-MM-dd hh:mm');
// if(obj.status != 90000){
let idx = this.arr.findIndex(item => { return item.id == obj.id });
if (idx > -1) {
this.arr[idx].modelId = obj.modelId;
this.arr[idx].status = obj.status;
this.arr[idx].createTime = obj.createTime;
this.arr[idx].tendingTime = obj.tendingTime;
this.arr[idx].factory = obj.factory;
// this.arr[idx].modelId = obj.modelId;
// this.arr[idx].status = obj.status;
// this.arr[idx].createTime = obj.createTime;
// this.arr[idx].tendingTime = obj.tendingTime;
// this.arr[idx].factory = obj.factory;
// this.arr[idx].floor = obj.floor;
this.arr[idx].statusMsg = obj.statusMsg;
// this.arr[idx].statusMsg = obj.statusMsg;
this.arr[idx].direction = obj.direction;
let _obj = JSON.parse(JSON.stringify(this.arr[idx]));
_obj.floor = obj.floor;
this.setLiftColor(this.arr)
if (this.bimModel == 1) {
let content = this.getContent(idx, obj);
let content = this.getContent(idx, _obj);
let objectId = bfHelper.getExternalComponentId(obj.modelId);
console.log(obj.modelId, obj.floor, this.height * ((obj.floor * 1) - (this.arr[idx].floor * 1)))
// console.log(obj.modelId, obj.floor, this.height * ((obj.floor * 1) - (this.arr[idx].floor * 1)))
if (this.arr[idx].floor != obj.floor) {
bfHelper.setExternalComponentZ(obj.modelId, this.height * ((obj.floor * 1) - (this.arr[idx].floor * 1)));
}
@ -784,7 +601,7 @@ export default {
this.arr[idx].floor = obj.floor;
}, 150);
} else {
let content = this.getContent(idx, obj);
let content = this.getContent(idx, _obj);
if (this.arr[idx].floor != obj.floor) {
bfHelper.setExternalComponentZ(obj.modelId, this.height * ((obj.floor * 1) - (this.arr[idx].floor * 1)));

@ -632,7 +632,7 @@ export default {
this.getHistoryWarm(); //
this.getCurWarm(); //
this.getMode(); //
// this.getWarmLists(); //
this.getWarmLists(); //
// this.getWarmGK(); //
this.getHeatWarnList(); //
}

@ -2862,12 +2862,12 @@ const loadModel = (i) => {
// BimfaceLoaderConfig.APIHost = "http://10.90.100.203:8080";
BimfaceLoaderConfig.dataEnvType = BimfaceEnvOption.Local;
BimfaceLoaderConfig.sdkPath = "static/jssdk@3.6.191/jssdk";
// BimfaceLoaderConfig.path = i == 1 ? 'http://47.103.199.45:8000/face/ywq/viewToken.json' :
// 'http://47.103.199.45:8000/face/tt/viewToken.json';
BimfaceLoaderConfig.path =
i == 1
? "http://10.90.100.203:8080/ywq/viewToken.json"
: "http://10.90.100.203:8080/tt/viewToken.json";
BimfaceLoaderConfig.path = i == 1 ? 'http://47.103.199.45:8000/face/ywq/viewToken.json' :
'http://47.103.199.45:8000/face/tt/viewToken.json';
// BimfaceLoaderConfig.path =
// i == 1
// ? "http://10.90.100.203:8080/ywq/viewToken.json"
// : "http://10.90.100.203:8080/tt/viewToken.json";
BimfaceSDKLoader.load(BimfaceLoaderConfig, onSDKLoadSucceeded);
};

@ -199,13 +199,13 @@ export default {
).then((res) => {
let leidaData = [];
let lineData = [];
const data = res.data.data;
const data = res.data.data.dataList;
for (let i = 0; i < data.length; i++) {
leidaData.push(data[i].consume);
lineData.push(data[i].consumeMonList);
}
this.getWarmLeida(leidaData);
this.getWarmLine(lineData);
this.getWarmLine(lineData,res.data.data.dateList);
});
},
getGaugeData() {
@ -322,19 +322,25 @@ export default {
});
},
getWarmLeida(value) {
value.map(item => {
item = item.toString().split('.')[1] != undefined && item.toString().split('.')[1].length > 1 ? item.toFixed(2) : item
})
let max = Math.max(...value);
const data = [
{
value: value,
name: "楼宇耗热",
},
];
max = max === 0 ? 100 : max;
console.log('max', max);
const title = [
{ name: "#1", max: 2000 },
{ name: "#2", max: 2000 },
{ name: "#3", max: 2000 },
{ name: "#4", max: 2000 },
{ name: "#5", max: 2000 },
{ name: "#6", max: 2000 },
{ name: "#1", max: max },
{ name: "#2", max: max },
{ name: "#3", max: max },
{ name: "#4", max: max },
{ name: "#5", max: max },
{ name: "#6", max: max },
];
this.$refs.radar.getLeidaChart(
"耗热",
@ -344,7 +350,7 @@ export default {
title
);
},
getWarmLine(value) {
getWarmLine(value,category) {
const data = [];
for (let i = 0; i < this.build.length; i++) {
data.push({
@ -361,7 +367,7 @@ export default {
},
});
}
this.$refs.line.getLineCharts("耗热量(MJ)", data);
this.$refs.line.getLineCharts("耗热量(MJ)", data, category);
},
getFloorTemper(id, value) {
let myChart = this.$echarts.init(document.getElementById(id));

@ -63,7 +63,7 @@
@change="searchBuild"
>
</el-date-picker>
<div class="change-tab">
<div class="change-tab" style="display:none;">
<!-- <div
@click="selectDate(1)"
:style="{ backgroundColor: choseDate == 1 ? 'rgb(8,166,255)' : '' }"
@ -552,7 +552,8 @@ export default {
let baseDate = this.chooseDateValue
? this.chooseDateValue
: dateFormat(now, "yyyy-MM-dd");
let minDate = now.setDate(new Date(baseDate).getDate() - 10);
let baseDate2 = new Date(baseDate);
let minDate = baseDate2.setDate(new Date(baseDate).getDate() - 10);
let _min = dateFormat(new Date(minDate), "yyyy-MM-dd");
console.log("mindate", baseDate, _min);
// hoursArr = this.getDayList(); //this.getLastDayList(now, 23);

@ -39,7 +39,8 @@ module.exports = {
// target: 'http://192.168.0.105:80',
// target: "http://192.168.43.35",
// target: 'http://192.168.1.106',
target: "http://10.90.100.204",
target: "http://192.168.1.3",
// target: "http://10.90.100.204",
// target: "http://rsvz4t.natappfree.cc",
//远程演示服务地址,可用于直接启动项目
//target: 'https://saber.bladex.vip/api',

Loading…
Cancel
Save