|
@@ -36,7 +36,7 @@ import { Manage } from "./openlayer";
|
|
|
import { ScenePoint, Scene, scenePoints, scenes } from "@/store/scene";
|
|
|
import { initRelics, initSelfRelics, relics } from "@/store/relics";
|
|
|
import { onMounted, ref, watchEffect, watch, onUnmounted } from "vue";
|
|
|
-import { createBoard } from "./board/";
|
|
|
+import { createBoard, scenePosTransform } from "./board/";
|
|
|
import { relicsPolyginsFetch } from "@/request";
|
|
|
import {
|
|
|
mapManageInit,
|
|
@@ -100,17 +100,32 @@ watch(
|
|
|
if (mapManage && !autoInitPos()) {
|
|
|
flyUserCenter(mapManage);
|
|
|
}
|
|
|
-
|
|
|
- relicsPolyginsFetch().then((data) => {
|
|
|
- board.setData(data, router.currentRoute.value.params.relicsId as string);
|
|
|
- window.board = board;
|
|
|
- board.polygon().bus.on("clickPoint", (bpoint) => {
|
|
|
- const point =
|
|
|
- bpoint.id &&
|
|
|
- scenePoints.value.find((point) => point.id.toString() === bpoint.id);
|
|
|
- point && gotoPointPage(point);
|
|
|
- });
|
|
|
+ const points = scenePosTransform(scenes.value);
|
|
|
+ board.setData(
|
|
|
+ {
|
|
|
+ points,
|
|
|
+ lines: [],
|
|
|
+ polygons: [],
|
|
|
+ },
|
|
|
+ router.currentRoute.value.params.relicsId as string
|
|
|
+ );
|
|
|
+ board.polygon().bus.on("clickPoint", (bpoint) => {
|
|
|
+ const point =
|
|
|
+ bpoint.id &&
|
|
|
+ scenePoints.value.find((point) => point.id.toString() === bpoint.id);
|
|
|
+ point && gotoPointPage(point);
|
|
|
});
|
|
|
+
|
|
|
+ // relicsPolyginsFetch().then((data) => {
|
|
|
+ // relics.value;
|
|
|
+ // board.setData(data, router.currentRoute.value.params.relicsId as string);
|
|
|
+ // board.polygon().bus.on("clickPoint", (bpoint) => {
|
|
|
+ // const point =
|
|
|
+ // bpoint.id &&
|
|
|
+ // scenePoints.value.find((point) => point.id.toString() === bpoint.id);
|
|
|
+ // point && gotoPointPage(point);
|
|
|
+ // });
|
|
|
+ // });
|
|
|
});
|
|
|
}
|
|
|
},
|