跳转逻辑修改

This commit is contained in:
joylink_zhaoerwei 2023-09-14 16:32:21 +08:00
parent 31682d9f28
commit be75846529

View File

@ -56,15 +56,11 @@ onMounted(() => {
lineApp.bindDom(dom);
onResize();
}
setTimeout(() => {
try {
if (lineApp) {
centerFaultDevice();
}
} catch (error) {
console.warn('未找到具体故障设备');
}
}, 1000);
lineApp.on('loadfinish', () => {
setTimeout(() => {
centerFaultDevice();
}, 1000);
});
});
function onResize() {
@ -76,9 +72,13 @@ function onResize() {
}
function centerFaultDevice() {
const deviceId = lineNetStore.alarmInfo[0].locator_device_id;
const faultDevice = lineApp.queryStore.queryById(deviceId);
lineApp.makeGraphicCenterShow(faultDevice);
try {
const deviceId = lineNetStore.alarmInfo[0].locator_device_id;
const faultDevice = lineApp.queryStore.queryById(deviceId);
lineApp.makeGraphicCenterShow(faultDevice);
} catch (error) {
console.warn('未找到具体故障设备');
}
}
onUnmounted(() => {