|
@@ -54,6 +54,7 @@ import {
|
|
} from "./menus";
|
|
} from "./menus";
|
|
import { currentVector, drawRef, graphicState, uiType } from "@/hook/useGraphic";
|
|
import { currentVector, drawRef, graphicState, uiType } from "@/hook/useGraphic";
|
|
import geos, { GlobalComp } from "./geos/index";
|
|
import geos, { GlobalComp } from "./geos/index";
|
|
|
|
+import { dataService } from "@/graphic/Service/DataService";
|
|
|
|
|
|
const menusRaws = computed(() => {
|
|
const menusRaws = computed(() => {
|
|
const mode = Number(router.currentRoute.value.params.mode) as Mode;
|
|
const mode = Number(router.currentRoute.value.params.mode) as Mode;
|
|
@@ -85,10 +86,15 @@ watchEffect(() => {
|
|
const focusMenus = computed(() => focusMenuRaw[currentVector.value?.type]);
|
|
const focusMenus = computed(() => focusMenuRaw[currentVector.value?.type]);
|
|
const geoComponent = computed(() => {
|
|
const geoComponent = computed(() => {
|
|
if (currentVector.value) {
|
|
if (currentVector.value) {
|
|
- console.log(currentVector.value);
|
|
|
|
- return (
|
|
|
|
- geos[currentVector.value?.category] || geos[currentVector.value?.type] || GlobalComp
|
|
|
|
- );
|
|
|
|
|
|
+ let category = currentVector.value?.category;
|
|
|
|
+ if (!category) {
|
|
|
|
+ const geo = dataService.getGeo(
|
|
|
|
+ currentVector.value.type,
|
|
|
|
+ currentVector.value.vectorId
|
|
|
|
+ );
|
|
|
|
+ category = currentVector.value.category = geo?.category;
|
|
|
|
+ }
|
|
|
|
+ return geos[category] || geos[currentVector.value?.type] || GlobalComp;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
const isFull = computed(() => customMap.sysView === "full");
|
|
const isFull = computed(() => customMap.sysView === "full");
|