From ae6b30927404841e25221aa716108308fe6ebbb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=BE=A4?= Date: Tue, 17 Jan 2023 18:16:41 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E7=94=B5=E6=A2=AFws=E5=BC=80=E5=90=AF?= =?UTF-8?q?=EF=BC=8C=E6=9A=96=E8=A1=A8=E5=9B=AD=E5=8C=BA=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=88=97=E8=A1=A8=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/monitoring/lift.vue | 34 +++++++++++++++--------------- src/components/monitoring/warm.vue | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/components/monitoring/lift.vue b/src/components/monitoring/lift.vue index 2608ef4..a6b55ae 100644 --- a/src/components/monitoring/lift.vue +++ b/src/components/monitoring/lift.vue @@ -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,13 +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; + 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(() => { @@ -753,18 +753,18 @@ 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; this.setLiftColor(this.arr) diff --git a/src/components/monitoring/warm.vue b/src/components/monitoring/warm.vue index 7d219a0..2f8b672 100644 --- a/src/components/monitoring/warm.vue +++ b/src/components/monitoring/warm.vue @@ -632,7 +632,7 @@ export default { this.getHistoryWarm(); //历史用热统计 this.getCurWarm(); //本月用热 this.getMode(); //模式 - // this.getWarmLists(); //获取热量表列表 + this.getWarmLists(); //获取热量表列表 // this.getWarmGK(); //获取热量表概况 this.getHeatWarnList(); //告警列表 } From eb7cccfa8f356206305bf6ef6e9c2658abea4d0e Mon Sep 17 00:00:00 2001 From: xuechunyuan <17853500702@163.com> Date: Wed, 18 Jan 2023 14:17:23 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E7=94=B5=E6=A2=AF=E5=8D=87=E9=99=8D?= =?UTF-8?q?=E7=8A=B6=E6=80=81bug=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/monitoring/lift.vue | 197 +---------------------------- 1 file changed, 7 insertions(+), 190 deletions(-) diff --git a/src/components/monitoring/lift.vue b/src/components/monitoring/lift.vue index a6b55ae..340dd3f 100644 --- a/src/components/monitoring/lift.vue +++ b/src/components/monitoring/lift.vue @@ -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: [], //电梯信息 @@ -537,192 +537,6 @@ export default { 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); } }, windowClick(e) { @@ -767,12 +581,15 @@ export default { // 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))); From 3571cd93a896e270934c7105d0e0045979444cef Mon Sep 17 00:00:00 2001 From: xuechunyuan <17853500702@163.com> Date: Wed, 1 Feb 2023 16:59:05 +0800 Subject: [PATCH 3/8] =?UTF-8?q?lora=E9=9D=A2=E6=9D=BF=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../monitoring/electricity/condition_mb.png | Bin 0 -> 1223 bytes src/api/garden/monitoring.js | 55 +++++ src/components/monitoring/conditioner.vue | 213 ++++++++++++++---- vue.config.js | 1 + 4 files changed, 229 insertions(+), 40 deletions(-) create mode 100644 public/img/monitoring/electricity/condition_mb.png diff --git a/public/img/monitoring/electricity/condition_mb.png b/public/img/monitoring/electricity/condition_mb.png new file mode 100644 index 0000000000000000000000000000000000000000..bdacf41bf593123b529dfda7fa794f4751589e28 GIT binary patch literal 1223 zcmaJ>TWB0r7@n$4N=S+%h&QC;R7-3#JD1&=oik*u=}gj{wws2{#w=|ga^{?~$(YQg zGZS|Hn)pkSeb)nc&< z4lZ!xN=YmQ2AOh-b0Ha>8?K5 zJYC>cNL5QCtl@`*RWd4%q@2R$K}J%uIRN@tS(G$E)C4KZORAm|by;Sc4@bR)xTcrQ zp{6f-DsWSA9O!~juh%p6Y{m~K1qlEkh_WEdJk{W%h8M$x_oB@$3nqzB=mfFjdu(bE z+Wu@@;3(6T5Zs_tS~cuN%|y|Z2?-1YDI*H5o5r=Q9mQqxKaDlDqe>$nLYYMVY=~$* zYMWbNn!6i2N);&^eQ)T{qQDu`N3$;RV#_RW^d^HHtP_ApR+2Fm=4E1DroDo`Y)g|)mWh8`j<-wyTN#O}Bu zRyRTdV?V6;{!FV2MyCAOkEZ;9HH@_CfbAW3JnYw_2huXFL~WALd6eLx(0AG8JnPOH z92AT&%qoc2L`CH>%n@Fz;Ve&JO-8CB4hiTzgu5?|ChecPc8kp+AB|w}rc(J { }, }); }; +//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) => { diff --git a/src/components/monitoring/conditioner.vue b/src/components/monitoring/conditioner.vue index 12d473d..4842ef0 100644 --- a/src/components/monitoring/conditioner.vue +++ b/src/components/monitoring/conditioner.vue @@ -22,7 +22,7 @@
{{ - normalTotal + normalTotal }}
@@ -84,7 +84,7 @@ {{ - item.warnDate.substring(5, 16) + item.warnDate.substring(5, 16) }}
@@ -127,10 +127,11 @@ @@ -139,10 +140,10 @@ @@ -179,12 +180,25 @@
{{ testObject1.name }} - {{ - testObject1.mode == 0 - ? "通风" - : testObject1.mode == 1 - ? "制热" - : "制冷" + {{ + testObject1.mode == 0 + ? "通风" + : testObject1.mode == 1 + ? "制热" + : "制冷" + }} + {{ + testObject1.mode == 0 + ? "内机制热" + : testObject1.mode == 1 + ? "内机地暖同时制热" + : testObject1.mode == 2 + ? "地暖制热" + : testObject1.mode == 3 + ? "制冷" + : testObject1.mode == 9 + ? "通风" + : "内机地暖同时制热" }}
@@ -195,13 +209,13 @@
-
+
{{ - testObject1.temSetting + testObject1.temSetting }}
@@ -214,26 +228,36 @@
当前风速: - {{ - testObject1.speed == 0 - ? "低速" - : testObject1.speed == 1 - ? "中速" - : testObject1.speed == 2 - ? "高速" - : "自动" + {{ + testObject1.speed == 0 + ? "低速" + : testObject1.speed == 1 + ? "中速" + : testObject1.speed == 2 + ? "高速" + : "自动" + }} + {{ + testObject1.speed == 1 + ? "低速" + : testObject1.speed == 2 + ? "中速" + : testObject1.speed == 3 + ? "高速" + : "自动" }}
-
+
{{ - testObject1.temSetting + testObject1.temSetting }}
@@ -246,14 +270,23 @@
当前风速: - {{ - testObject1.speed == 0 - ? "低速" - : testObject1.windSpeed == 1 - ? "中速" - : testObject1.windSpeed == 2 - ? "高速" - : "自动" + {{ + testObject1.speed == 0 + ? "低速" + : testObject1.speed == 1 + ? "中速" + : testObject1.speed == 2 + ? "高速" + : "自动" + }} + {{ + testObject1.speed == 1 + ? "低速" + : testObject1.speed == 2 + ? "中速" + : testObject1.speed == 3 + ? "高速" + : "自动" }}
@@ -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 = `
+
+
+ ${testObject.name} +
+
+ +
`; + + return content; + }, //空调主机定位标签样式 getOAContent(objData) { let content = `
diff --git a/vue.config.js b/vue.config.js index e9d6e53..6ab8ff6 100644 --- a/vue.config.js +++ b/vue.config.js @@ -32,6 +32,7 @@ module.exports = { // target: 'http://192.168.0.105:80', // target: "http://192.168.43.35", // target: 'http://192.168.1.106', + // target: "http://192.168.1.3", target: "http://10.90.100.204", // target: "http://rsvz4t.natappfree.cc", //远程演示服务地址,可用于直接启动项目 From d20ee0008b3d2f11f80d58eb5756614d086668a2 Mon Sep 17 00:00:00 2001 From: xuechunyuan <17853500702@163.com> Date: Wed, 1 Feb 2023 17:39:19 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E7=A9=BA=E8=B0=83=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/monitoring/conditioner.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/monitoring/conditioner.vue b/src/components/monitoring/conditioner.vue index 4842ef0..c11e9b9 100644 --- a/src/components/monitoring/conditioner.vue +++ b/src/components/monitoring/conditioner.vue @@ -204,7 +204,7 @@
-
@@ -249,7 +249,7 @@
-
+
@@ -1121,9 +1121,9 @@ export default { //空调面板 getMbContent(testObject) { // console.log('空调面板',testObject) - testObject.xmove = '181933.38275619797'; - testObject.ymove = '83300.38516883833'; - testObject.zmove = '0.5150140523837763'; + testObject.xmove = '86462.91989146004'; + testObject.ymove = '-18215.882156436604'; + testObject.zmove = '0.14878788590431213'; let bgImg1 = require("../../../public/img/monitoring/electricity/condition_mb.png"); let content = `
@@ -209,7 +209,8 @@
-
+
@@ -291,6 +292,11 @@
+ +
+ +
设备离线
+
@@ -424,7 +430,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) ); }); }, @@ -434,14 +440,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) ); }); } @@ -698,7 +704,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) ); }); } @@ -726,7 +732,7 @@ export default { setLoraTemp(this.testObject1.code, this.testObject1.temSetting).then(res => { if (res.data.code == 200) { this.$message.success('温度设置成功'); - }else{ + } else { this.$message.error('温度设置失败'); this.testObject1.temSetting++; } @@ -759,7 +765,7 @@ export default { setLoraTemp(this.testObject1.code, this.testObject1.temSetting).then(res => { if (res.data.code == 200) { this.$message.success('温度设置成功'); - }else{ + } else { this.$message.error('温度设置失败'); this.testObject1.temSetting--; } @@ -848,7 +854,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) => { @@ -862,7 +868,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) ); }); } @@ -899,7 +905,7 @@ export default { z: this.testObject1.zmove, }, null, - this.testObject1.funcCat == 1 ? this.getContent(this.testObject1) : this.testObject1.funcCat == 1 ? this.getOAContent(this.testObject1) : this.getMbContent(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) => { @@ -913,7 +919,7 @@ export default { z: item.zmove, }, null, - item.funcCat == 1 ? this.getContent(item) : item.funcCat == 1 ? this.getOAContent(item) : this.getMbContent(item) + item.funcCat == 1 ? this.getContent(item) : item.funcCat == 2 ? this.getOAContent(item) : this.getMbContent(item) ); }); } @@ -1006,10 +1012,6 @@ 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); } @@ -1029,13 +1031,19 @@ export default { code = e.target.id.substring(7); } if (code) { - if (funcCat == 3) { + 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 == "funcCat-" + 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; @@ -1121,16 +1129,13 @@ export default { //空调面板 getMbContent(testObject) { // console.log('空调面板',testObject) - testObject.xmove = '86462.91989146004'; - testObject.ymove = '-18215.882156436604'; - testObject.zmove = '0.14878788590431213'; let bgImg1 = require("../../../public/img/monitoring/electricity/condition_mb.png"); - let content = `
-
+
- ${testObject.name} + ${testObject.name}
diff --git a/src/page/index/top/index.vue b/src/page/index/top/index.vue index 88ed3b4..6e4bf4b 100644 --- a/src/page/index/top/index.vue +++ b/src/page/index/top/index.vue @@ -53,8 +53,8 @@ -->
-
张华(建设指挥部)
-
2022-01-17
+
{{userInfo.user_name}}
+
{{currentDate}}
@@ -87,6 +87,9 @@ fullscreenToggel, listenfullscreen } from "@/util/util"; + import { + dateFormat + } from "@/util/date"; import topLock from "./top-lock"; import topMenu from "./top-menu"; import topSearch from "./top-search"; @@ -109,7 +112,9 @@ }, name: "top", data() { - return {}; + return { + currentDate: dateFormat(new Date(),'yyyy-MM-dd') + }; }, filters: {}, created() {}, @@ -182,4 +187,4 @@ .top-bar__item { font-size: 26px; } - + From 20faea3fcb01c69e35265826e288c697cb4503df Mon Sep 17 00:00:00 2001 From: xuechunyuan <17853500702@163.com> Date: Fri, 3 Feb 2023 15:33:12 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E9=97=A8=E7=A6=81=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E6=97=A5=E6=9C=9F=E8=BF=87=E9=95=BF=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/monitoring/door.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/monitoring/door.vue b/src/components/monitoring/door.vue index d2d9858..0b047bb 100644 --- a/src/components/monitoring/door.vue +++ b/src/components/monitoring/door.vue @@ -1041,7 +1041,7 @@ export default { ${item.name }
-
设备状态: @@ -1066,7 +1066,7 @@ export default { ${item.location}
-
+
From 81dfe824409f1b418b039e9d93c4da948e860065 Mon Sep 17 00:00:00 2001 From: xuechunyuan <17853500702@163.com> Date: Thu, 16 Feb 2023 17:41:50 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E8=83=BD=E8=80=97=E5=88=86=E6=9E=90-?= =?UTF-8?q?=E9=95=82=E7=A9=BA=E6=97=B6=E9=95=BF=E6=97=A5=E6=9C=9F=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E4=BF=AE=E6=AD=A3=EF=BC=8C=E8=80=97=E7=83=AD=E6=8A=98?= =?UTF-8?q?=E7=BA=BF=E5=9B=BE=E6=97=A5=E6=9C=9F=E6=94=B9=E4=B8=BA=E4=BB=8E?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=8F=96=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/util/bfHelper.js | 12 ++++++------ src/views/sourceAnaly/components/buildWarm.vue | 8 ++++---- src/views/sourceAnaly/components/conditionAnaly.vue | 5 +++-- vue.config.js | 4 ++-- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/util/bfHelper.js b/src/util/bfHelper.js index 2bb076a..8a6dec0 100644 --- a/src/util/bfHelper.js +++ b/src/util/bfHelper.js @@ -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); }; diff --git a/src/views/sourceAnaly/components/buildWarm.vue b/src/views/sourceAnaly/components/buildWarm.vue index 71ee7ac..ddfa425 100644 --- a/src/views/sourceAnaly/components/buildWarm.vue +++ b/src/views/sourceAnaly/components/buildWarm.vue @@ -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() { @@ -344,7 +344,7 @@ export default { title ); }, - getWarmLine(value) { + getWarmLine(value,category) { const data = []; for (let i = 0; i < this.build.length; i++) { data.push({ @@ -361,7 +361,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)); diff --git a/src/views/sourceAnaly/components/conditionAnaly.vue b/src/views/sourceAnaly/components/conditionAnaly.vue index b2fc700..2ac4237 100644 --- a/src/views/sourceAnaly/components/conditionAnaly.vue +++ b/src/views/sourceAnaly/components/conditionAnaly.vue @@ -63,7 +63,7 @@ @change="searchBuild" > -
+