|
@@ -10,7 +10,9 @@
|
|
|
:key="menu.name"
|
|
|
class="nav_item"
|
|
|
:class="{
|
|
|
- active: menu.router.includes(router.currentRoute.value.name.toString()),
|
|
|
+ active: menu.router.includes(
|
|
|
+ router.currentRoute.value.name.toString()
|
|
|
+ ),
|
|
|
}"
|
|
|
@click="router.replace({ name: menu.router[Number(queryMode)] })"
|
|
|
>
|
|
@@ -83,7 +85,12 @@ import { router } from "@/router";
|
|
|
import { Back } from "@element-plus/icons-vue";
|
|
|
import vectorIcon from "@/assets/vector.svg";
|
|
|
import locationIcon from "@/assets/location.svg";
|
|
|
-import { COORD_NAME, POYS_NAME, QUERY_COORD_NAME, QUERY_POYS_NAME } from "@/router";
|
|
|
+import {
|
|
|
+ COORD_NAME,
|
|
|
+ POYS_NAME,
|
|
|
+ QUERY_COORD_NAME,
|
|
|
+ QUERY_POYS_NAME,
|
|
|
+} from "@/router";
|
|
|
import {
|
|
|
mapManage,
|
|
|
board,
|
|
@@ -93,7 +100,7 @@ import {
|
|
|
tileType,
|
|
|
} from "./install";
|
|
|
import { computed, ref, watch } from "vue";
|
|
|
-import { initRelics, relics } from "@/store/relics";
|
|
|
+import { initSelfRelics, relics } from "@/store/relics";
|
|
|
import { queryMode } from "./install";
|
|
|
import { PoPoint } from "drawing-board";
|
|
|
import { boardData, scenePoints } from "@/store/scene";
|
|
@@ -111,17 +118,25 @@ const menus = [
|
|
|
router: [POYS_NAME, QUERY_POYS_NAME],
|
|
|
},
|
|
|
];
|
|
|
-const setMapContainer = (dom: HTMLDivElement) => setTimeout(() => mapManage.mount(dom));
|
|
|
+const setMapContainer = (dom: HTMLDivElement) =>
|
|
|
+ setTimeout(() => mapManage.mount(dom));
|
|
|
const setBoardContainer = (dom: HTMLDivElement) =>
|
|
|
setTimeout(() => board.setProps({ dom }));
|
|
|
|
|
|
const loaded = ref(false);
|
|
|
+
|
|
|
+const isCoordPage = computed(() => {
|
|
|
+ const name = router.currentRoute.value.name;
|
|
|
+ return name && [COORD_NAME, QUERY_COORD_NAME].includes(name.toString());
|
|
|
+});
|
|
|
+
|
|
|
watch(
|
|
|
() => router.currentRoute.value.params?.relicsId,
|
|
|
(rid) => {
|
|
|
if (!rid) return;
|
|
|
loaded.value = false;
|
|
|
- initRelics(Number(rid)).finally(() => {
|
|
|
+ const isEditmode = [COORD_NAME].includes(router.currentRoute.value.name.toString())
|
|
|
+ initSelfRelics(Number(rid), isEditmode).finally(() => {
|
|
|
if (!relics.value) {
|
|
|
return router.replace({ name: "relics" });
|
|
|
}
|
|
@@ -133,11 +148,6 @@ watch(
|
|
|
},
|
|
|
{ immediate: true }
|
|
|
);
|
|
|
-
|
|
|
-const isCoordPage = computed(() => {
|
|
|
- const name = router.currentRoute.value.name;
|
|
|
- return name && [COORD_NAME, QUERY_COORD_NAME].includes(name.toString());
|
|
|
-});
|
|
|
const showPoints = ref(true);
|
|
|
|
|
|
watch(
|