|
@@ -3,26 +3,18 @@
|
|
|
<Teleport to=".header" v-if="isMounted">
|
|
|
<div class="custom_bar">
|
|
|
<div class="back_container">
|
|
|
- <el-button :icon="Back" circle type="default" @click="router.back()" />
|
|
|
+ <el-button :icon="Back" circle type="primary" @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 />
|
|
|
+ <locationIcon />
|
|
|
</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 />
|
|
|
+ <vectorIcon />
|
|
|
</el-icon>
|
|
|
<span>矢量图</span>
|
|
|
</div>
|
|
@@ -31,58 +23,24 @@
|
|
|
</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"
|
|
|
- >
|
|
|
- <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>
|
|
|
+ <div class="draw-global-icon" v-if="isCurrentTab(1) && !isEditDrawingMode" @click="handleBoardDraw">
|
|
|
+ <el-icon size="36">
|
|
|
+ <picpenIcon />
|
|
|
</el-icon>
|
|
|
</div>
|
|
|
</Teleport>
|
|
@@ -99,6 +57,9 @@ import { onMounted, ref, watchEffect, watch, onUnmounted, computed } from "vue";
|
|
|
import { createBoard, scenePosTransform } from "./board";
|
|
|
import MapRightPoly from "./map-right-poly.vue";
|
|
|
import { Back } from "@element-plus/icons-vue";
|
|
|
+import vectorIcon from '@/assets/vector.svg';
|
|
|
+import picpenIcon from '@/assets/pic_pen.svg';
|
|
|
+import locationIcon from '@/assets/location.svg';
|
|
|
import {
|
|
|
addOrUpdateDrawingFetch,
|
|
|
getDrawingDetailFetch,
|
|
@@ -107,7 +68,7 @@ import {
|
|
|
PolyDataType,
|
|
|
} from "@/request/drawing.ts";
|
|
|
// import { relicsPolyginsFetch } from "@/request";
|
|
|
-import { Grid, LocationInformation } from "@element-plus/icons-vue";
|
|
|
+// import { Grid, LocationInformation } from "@element-plus/icons-vue";
|
|
|
|
|
|
import {
|
|
|
mapManageInit,
|
|
@@ -350,7 +311,7 @@ const initPolyTabData = async () => {
|
|
|
board.setData(boardData.value, String(relicsId.value));
|
|
|
}
|
|
|
}, 500);
|
|
|
- } catch (error) {}
|
|
|
+ } catch (error) { }
|
|
|
};
|
|
|
|
|
|
const handlePolysDel = (id: string) => {
|
|
@@ -461,7 +422,7 @@ const handlePolysEdit = (item: PolyDataType) => {
|
|
|
&.light {
|
|
|
--color: #fff;
|
|
|
|
|
|
- > div {
|
|
|
+ >div {
|
|
|
text-shadow: 0 0 2px #000;
|
|
|
}
|
|
|
}
|
|
@@ -469,7 +430,7 @@ const handlePolysEdit = (item: PolyDataType) => {
|
|
|
&.dark {
|
|
|
--color: #000;
|
|
|
|
|
|
- > div {
|
|
|
+ >div {
|
|
|
text-shadow: 0 0 2px #fff;
|
|
|
}
|
|
|
}
|
|
@@ -523,10 +484,15 @@ const handlePolysEdit = (item: PolyDataType) => {
|
|
|
}
|
|
|
|
|
|
&.active {
|
|
|
+ .icon {
|
|
|
+ color: #409eff;
|
|
|
+ }
|
|
|
+
|
|
|
color: #409eff;
|
|
|
background-color: #ecf5ff;
|
|
|
position: relative;
|
|
|
|
|
|
+
|
|
|
&::before {
|
|
|
content: "";
|
|
|
height: 100%;
|