Forráskód Böngészése

fix(module): update

gemercheung 1 éve
szülő
commit
14b544a3ae
2 módosított fájl, 16 hozzáadás és 54 törlés
  1. 14 52
      src/view/map/map-board.vue
  2. 2 2
      src/view/map/map-right-poly.vue

+ 14 - 52
src/view/map/map-board.vue

@@ -6,21 +6,13 @@
           <el-button :icon="Back" circle type="default" @click="router.back()" />
         </div>
         <div class="nav_container">
-          <div
-            class="nav_item"
-            :class="{ active: isCurrentTab(0) }"
-            @click="handleTabs(0)"
-          >
+          <div class="nav_item" :class="{ active: isCurrentTab(0) }" @click="handleTabs(0)">
             <el-icon size="20">
               <LocationInformation />
             </el-icon>
             <span>坐标</span>
           </div>
-          <div
-            class="nav_item"
-            :class="{ active: isCurrentTab(1) }"
-            @click="handleTabs(1)"
-          >
+          <div class="nav_item" :class="{ active: isCurrentTab(1) }" @click="handleTabs(1)">
             <el-icon size="20">
               <Grid />
             </el-icon>
@@ -31,57 +23,26 @@
     </Teleport>
     <div id="map" class="map-container" ref="mapContainer" @click.stop>
       <div class="map-component">
-        <el-select
-          v-model="tileType"
-          placeholder="选择底图"
-          style="width: 120px"
-          class="tile-type-select"
-        >
-          <el-option
-            v-for="item in tileOptions"
-            :key="item"
-            :label="item"
-            :value="item"
-          />
+        <el-select v-model="tileType" placeholder="选择底图" style="width: 120px" class="tile-type-select">
+          <el-option v-for="item in tileOptions" :key="item" :label="item" :value="item" />
         </el-select>
       </div>
 
       <div class="board" ref="boardContainer"></div>
     </div>
     <div class="right-control">
-      <MapRight
-        v-if="isCurrentTab(0)"
-        @fly-point="flyScenePoint"
-        @fly-scene="flyScene"
-        @goto-point="gotoPointPage"
-      />
-      <MapRightPoly
-        @del="handlePolysDel"
-        @edit="handlePolysEdit"
-        :data="boardData"
-        v-if="isCurrentTab(1)"
-      >
+      <MapRight v-if="isCurrentTab(0)" @fly-point="flyScenePoint" @fly-scene="flyScene" @goto-point="gotoPointPage" />
+      <MapRightPoly @del="handlePolysDel" @edit="handlePolysEdit" :data="boardData" v-if="isCurrentTab(1)">
       </MapRightPoly>
     </div>
 
     <Teleport to="body" v-if="isMounted">
       <!-- <el-button class="temp_btn" @click="clearPolys">后端全清</el-button> -->
-      <div
-        class="draw-global-icon"
-        v-if="isCurrentTab(1) && !isEditDrawingMode"
-        @click="handleBoardDraw"
-      >
+      <div class="draw-global-icon" v-if="isCurrentTab(1) && !isEditDrawingMode" @click="handleBoardDraw">
         <el-icon size="30">
-          <svg
-            xmlns="http://www.w3.org/2000/svg"
-            width="1em"
-            height="1em"
-            viewBox="0 0 24 24"
-          >
-            <path
-              fill="currentColor"
-              d="M2 4.621a.5.5 0 0 1 .854-.353l6.01 6.01c.126.126.17.31.15.487a2 2 0 1 0 1.751-1.751a.586.586 0 0 1-.487-.15l-6.01-6.01A.5.5 0 0 1 4.62 2H11a9 9 0 0 1 8.468 12.054l2.24 2.239a1 1 0 0 1 0 1.414l-4 4a1 1 0 0 1-1.415 0l-2.239-2.239A9 9 0 0 1 2 11z"
-            />
+          <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
+            <path fill="currentColor"
+              d="M2 4.621a.5.5 0 0 1 .854-.353l6.01 6.01c.126.126.17.31.15.487a2 2 0 1 0 1.751-1.751a.586.586 0 0 1-.487-.15l-6.01-6.01A.5.5 0 0 1 4.62 2H11a9 9 0 0 1 8.468 12.054l2.24 2.239a1 1 0 0 1 0 1.414l-4 4a1 1 0 0 1-1.415 0l-2.239-2.239A9 9 0 0 1 2 11z" />
           </svg>
         </el-icon>
       </div>
@@ -195,6 +156,7 @@ watch(
           const point =
             bpoint.id &&
             scenePoints.value.find((point) => point.id.toString() === bpoint.id);
+            console.log('point', point)
           // point && gotoPointPage(point);
         });
 
@@ -350,7 +312,7 @@ const initPolyTabData = async () => {
         board.setData(boardData.value, String(relicsId.value));
       }
     }, 500);
-  } catch (error) {}
+  } catch (error) { }
 };
 
 const handlePolysDel = (id: string) => {
@@ -461,7 +423,7 @@ const handlePolysEdit = (item: PolyDataType) => {
   &.light {
     --color: #fff;
 
-    > div {
+    >div {
       text-shadow: 0 0 2px #000;
     }
   }
@@ -469,7 +431,7 @@ const handlePolysEdit = (item: PolyDataType) => {
   &.dark {
     --color: #000;
 
-    > div {
+    >div {
       text-shadow: 0 0 2px #fff;
     }
   }

+ 2 - 2
src/view/map/map-right-poly.vue

@@ -43,9 +43,9 @@ import { ref, watchEffect } from "vue";
 import type { PolyDataType, DrawingDataType } from "@/request/drawing.ts";
 import { Delete, Download, Edit } from "@element-plus/icons-vue";
 import SingleInput from "@/components/single-input.vue";
-import { scenePosTransform } from "./board";
+// import { scenePosTransform } from "./board";
 import { downloadPointsXLSL2 } from "@/util/pc4xlsl";
-import { scenePoints, scenes } from "@/store/scene";
+import { scenePoints } from "@/store/scene";
 
 import { relics } from "@/store/relics";
 import { ElMessageBox } from "element-plus";