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] =?UTF-8?q?=E7=94=B5=E6=A2=AFws=E5=BC=80=E5=90=AF=EF=BC=8C?= =?UTF-8?q?=E6=9A=96=E8=A1=A8=E5=9B=AD=E5=8C=BA=E7=8A=B6=E6=80=81=E8=AE=BE?= =?UTF-8?q?=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(); //告警列表 }