|
@@ -167,12 +167,13 @@ import { SceneStatus } from "@/store/scene";
|
|
|
import StateGpsIcon from "@/assets/state_gps.svg";
|
|
|
import PanoramaIcon from "@/assets/panorama.svg";
|
|
|
import FrameIcon from "@/assets/frame.svg";
|
|
|
-import { DrawingDataType } from "@/request/drawing";
|
|
|
+import { DrawingDataType, getDrawingDetailFetch } from "@/request/drawing";
|
|
|
import { alert } from "@/helper/message";
|
|
|
-import { getWholeLineLinesByPointId } from "drawing-board";
|
|
|
+import { Polygons, getWholeLineLinesByPointId } from "drawing-board";
|
|
|
|
|
|
const props = defineProps<{
|
|
|
data: DrawingDataType | null;
|
|
|
+ boardPolygons: Polygons;
|
|
|
}>();
|
|
|
|
|
|
const emit = defineEmits<{
|
|
@@ -215,6 +216,13 @@ const getSelectPoints = () =>
|
|
|
.filter((option: any) => option.type === "point")
|
|
|
.map((option: any) => option.raw) as ScenePoint[];
|
|
|
|
|
|
+watchEffect(() => {
|
|
|
+ if (treeRef.value) {
|
|
|
+ props.boardPolygons.status.selectPoiIds = getSelectPoints().map((point) =>
|
|
|
+ point.id.toString()
|
|
|
+ );
|
|
|
+ }
|
|
|
+});
|
|
|
const addHandler = async () => {
|
|
|
const sceneCodes = scenes.value.map((scene) => scene.sceneCode);
|
|
|
await selectScenes({
|
|
@@ -243,17 +251,20 @@ const delRelicsScenes = (scenes: Pick<Scene, "sceneId" | "sceneCode">[]) =>
|
|
|
);
|
|
|
|
|
|
const delSceneHandler = async (scenes: Scene[]) => {
|
|
|
+ const res = await getDrawingDetailFetch(String(relicsId.value));
|
|
|
for (const scene of scenes) {
|
|
|
const que = scene.scenePos.some((pos) => {
|
|
|
const id = pos.id.toString();
|
|
|
- return getWholeLineLinesByPointId(props.data as any, id).length !== 0;
|
|
|
+ console.log(getWholeLineLinesByPointId(res.data as any, id), id);
|
|
|
+ return getWholeLineLinesByPointId(res.data as any, id).length !== 0;
|
|
|
});
|
|
|
if (que) {
|
|
|
await alert("已存在矢量图数据,不可删除。");
|
|
|
+ return;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- console.log(props.data);
|
|
|
+ console.log(res.data);
|
|
|
return;
|
|
|
await delRelicsScenes(scenes);
|
|
|
await refreshScenes();
|