跳转逻辑修改
This commit is contained in:
parent
31682d9f28
commit
be75846529
@ -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(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user