跳转逻辑修改
This commit is contained in:
parent
31682d9f28
commit
be75846529
@ -56,16 +56,12 @@ onMounted(() => {
|
||||
lineApp.bindDom(dom);
|
||||
onResize();
|
||||
}
|
||||
lineApp.on('loadfinish', () => {
|
||||
setTimeout(() => {
|
||||
try {
|
||||
if (lineApp) {
|
||||
centerFaultDevice();
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn('未找到具体故障设备');
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
});
|
||||
|
||||
function onResize() {
|
||||
const dom = document.getElementById('line-app-container');
|
||||
@ -76,9 +72,13 @@ function onResize() {
|
||||
}
|
||||
|
||||
function centerFaultDevice() {
|
||||
try {
|
||||
const deviceId = lineNetStore.alarmInfo[0].locator_device_id;
|
||||
const faultDevice = lineApp.queryStore.queryById(deviceId);
|
||||
lineApp.makeGraphicCenterShow(faultDevice);
|
||||
} catch (error) {
|
||||
console.warn('未找到具体故障设备');
|
||||
}
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user