|
|
|
|
@ -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) |
|
|
|
|
|