跳转逻辑修改

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

View File

@ -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(() => {