|
@@ -1,12 +1,4 @@
|
|
|
-import {
|
|
|
- computed,
|
|
|
- nextTick,
|
|
|
- reactive,
|
|
|
- Ref,
|
|
|
- ref,
|
|
|
- watch,
|
|
|
- watchEffect,
|
|
|
-} from "vue";
|
|
|
+import { computed, nextTick, reactive, Ref, ref, watch, watchEffect } from "vue";
|
|
|
import { structureDraw } from "@/graphic";
|
|
|
import VectorType from "@/graphic/enum/VectorType";
|
|
|
import UIType from "@/graphic/enum/UIEvents";
|
|
@@ -14,7 +6,9 @@ import type { RoadPhoto } from "@/store/roadPhotos";
|
|
|
import type { AccidentPhoto } from "@/store/accidentPhotos";
|
|
|
import { api } from "@/store/sync";
|
|
|
import { genUseLoading } from "./useLoading.js";
|
|
|
+import mitt from "mitt";
|
|
|
|
|
|
+export const bus = mitt();
|
|
|
export type UITypeT = typeof UIType;
|
|
|
export type VectorTypeT = typeof VectorType;
|
|
|
export type FocusVector = {
|
|
@@ -58,10 +52,11 @@ export const loadData = genUseLoading(
|
|
|
if (data) {
|
|
|
oldId && drawRef.value.load.clear();
|
|
|
console.log("load", data);
|
|
|
- drawRef.value.load.load(data.data, {
|
|
|
+ await drawRef.value.load.load(data.data, {
|
|
|
...data.sceneData,
|
|
|
backImage: data.photoUrl,
|
|
|
});
|
|
|
+ bus.emit("graphicLoader");
|
|
|
} else {
|
|
|
drawRef.value.load.clear();
|
|
|
}
|