|
@@ -28,13 +28,16 @@ export default defineComponent({
|
|
// 事件等级1,2的事件
|
|
// 事件等级1,2的事件
|
|
level: 1,
|
|
level: 1,
|
|
})
|
|
})
|
|
- if ((store.incidents.data ?? []).length > 0) {
|
|
|
|
- var item = store.incidents.data![0];
|
|
|
|
- markerStore.currentIncident = item;
|
|
|
|
- item.id && (await store.getIncidentItem(item.id));
|
|
|
|
- router.push(`/incidentDetail?id=${item.id}`);
|
|
|
|
|
|
|
|
- }
|
|
|
|
|
|
+ setInterval(async () => {
|
|
|
|
+ if ((store.incidents.data ?? []).length > 0) {
|
|
|
|
+ var item = store.incidents.data![0];
|
|
|
|
+ markerStore.currentIncident = item;
|
|
|
|
+ item.id && (await store.getIncidentItem(item.id));
|
|
|
|
+ router.push(`/incidentDetail?id=${item.id}`);
|
|
|
|
+ }
|
|
|
|
+ },1000)
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|