|
@ -113,6 +113,7 @@ export default { |
|
|
url: '', |
|
|
url: '', |
|
|
allDeviceIds: [], |
|
|
allDeviceIds: [], |
|
|
oaoMessage: [], |
|
|
oaoMessage: [], |
|
|
|
|
|
timer: '', |
|
|
topDisplayData: { |
|
|
topDisplayData: { |
|
|
DAK_DIV_TOP_001: { |
|
|
DAK_DIV_TOP_001: { |
|
|
show: false, |
|
|
show: false, |
|
@ -179,6 +180,14 @@ export default { |
|
|
_this.deviceState() |
|
|
_this.deviceState() |
|
|
} |
|
|
} |
|
|
window.addEventListener('message', this.handleMessageDevice) |
|
|
window.addEventListener('message', this.handleMessageDevice) |
|
|
|
|
|
// 定时请求第三方数据,更新页面数据 |
|
|
|
|
|
setInterval(async() => { |
|
|
|
|
|
await _this.getRealTimeData() |
|
|
|
|
|
_this.handleAQI() |
|
|
|
|
|
}, 4000) |
|
|
|
|
|
}, |
|
|
|
|
|
beforeDestroy() { |
|
|
|
|
|
clearInterval(this.timer) |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
// 加载完成状态传值 |
|
|
// 加载完成状态传值 |
|
@ -215,7 +224,9 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 设置温湿度 |
|
|
// 设置温湿度 |
|
|
handleAQI(deviceId, wendu, sidu) { |
|
|
handleAQI(deviceId, wendu, sidu) { |
|
|
window.frames['iframeMap'].setAlertValue(deviceId, wendu, sidu) |
|
|
|
|
|
|
|
|
this.oaoMessage.forEach(element => { |
|
|
|
|
|
window.frames['iframeMap'].setAlertValue(element.id, element.wendu, element.sidu) |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 设置温湿度报警状况 |
|
|
// 设置温湿度报警状况 |
|
|
handleAlarm(deviceId) { |
|
|
handleAlarm(deviceId) { |
|
@ -237,6 +248,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
getRealTimeData() { |
|
|
getRealTimeData() { |
|
|
thirdApi.getRealTimeData({ ids: this.allDeviceIds, url: this.url }).then((data) => { |
|
|
thirdApi.getRealTimeData({ ids: this.allDeviceIds, url: this.url }).then((data) => { |
|
|
|
|
|
this.oaoMessage.splice(0, this.oaoMessage.length) |
|
|
this.displayConfigData.forEach(element => { |
|
|
this.displayConfigData.forEach(element => { |
|
|
if (element.divPosition.includes('TOP') && element.deviceSpecParams[0]) { |
|
|
if (element.divPosition.includes('TOP') && element.deviceSpecParams[0]) { |
|
|
const result = data.find((item) => { |
|
|
const result = data.find((item) => { |
|
|