Jelajahi Sumber

Merge branch 'master' of http://192.168.0.115:3000/bill/traffic-laser

# Conflicts:
#	server/test/a0k4xu045_202305311600080410/attach/sceneStore
xushiting 2 tahun lalu
induk
melakukan
ab5e1bf637

File diff ditekan karena terlalu besar
+ 1 - 1
server/test/a0k4xu045_202305311600080410/attach/sceneStore


+ 49 - 3
src/components/base/components/icon/iconfont/demo_index.html

@@ -55,6 +55,18 @@
           <ul class="icon_lists dib-box">
           
             <li class="dib">
+              <span class="icon iconfont">&#xe749;</span>
+                <div class="name">arrows_s</div>
+                <div class="code-name">&amp;#xe749;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe74a;</span>
+                <div class="name">arrows_d</div>
+                <div class="code-name">&amp;#xe74a;</div>
+              </li>
+          
+            <li class="dib">
               <span class="icon iconfont">&#xe746;</span>
                 <div class="name">measure_f</div>
                 <div class="code-name">&amp;#xe746;</div>
@@ -378,9 +390,9 @@
 <pre><code class="language-css"
 >@font-face {
   font-family: 'iconfont';
-  src: url('iconfont.woff2?t=1685345794465') format('woff2'),
-       url('iconfont.woff?t=1685345794465') format('woff'),
-       url('iconfont.ttf?t=1685345794465') format('truetype');
+  src: url('iconfont.woff2?t=1686102789104') format('woff2'),
+       url('iconfont.woff?t=1686102789104') format('woff'),
+       url('iconfont.ttf?t=1686102789104') format('truetype');
 }
 </code></pre>
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -407,6 +419,24 @@
         <ul class="icon_lists dib-box">
           
           <li class="dib">
+            <span class="icon iconfont icon-arrows_s"></span>
+            <div class="name">
+              arrows_s
+            </div>
+            <div class="code-name">.icon-arrows_s
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-arrows_d"></span>
+            <div class="name">
+              arrows_d
+            </div>
+            <div class="code-name">.icon-arrows_d
+            </div>
+          </li>
+          
+          <li class="dib">
             <span class="icon iconfont icon-measure_f"></span>
             <div class="name">
               measure_f
@@ -894,6 +924,22 @@
           
             <li class="dib">
                 <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-arrows_s"></use>
+                </svg>
+                <div class="name">arrows_s</div>
+                <div class="code-name">#icon-arrows_s</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-arrows_d"></use>
+                </svg>
+                <div class="name">arrows_d</div>
+                <div class="code-name">#icon-arrows_d</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
                   <use xlink:href="#icon-measure_f"></use>
                 </svg>
                 <div class="name">measure_f</div>

+ 11 - 3
src/components/base/components/icon/iconfont/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
   font-family: "iconfont"; /* Project id 4084834 */
-  src: url('iconfont.woff2?t=1685345794465') format('woff2'),
-       url('iconfont.woff?t=1685345794465') format('woff'),
-       url('iconfont.ttf?t=1685345794465') format('truetype');
+  src: url('iconfont.woff2?t=1686102789104') format('woff2'),
+       url('iconfont.woff?t=1686102789104') format('woff'),
+       url('iconfont.ttf?t=1686102789104') format('truetype');
 }
 
 .iconfont {
@@ -13,6 +13,14 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-arrows_s:before {
+  content: "\e749";
+}
+
+.icon-arrows_d:before {
+  content: "\e74a";
+}
+
 .icon-measure_f:before {
   content: "\e746";
 }

File diff ditekan karena terlalu besar
+ 1 - 1
src/components/base/components/icon/iconfont/iconfont.js


+ 14 - 0
src/components/base/components/icon/iconfont/iconfont.json

@@ -6,6 +6,20 @@
   "description": "交通事故现场勘验系统",
   "glyphs": [
     {
+      "icon_id": "35850865",
+      "name": "arrows_s",
+      "font_class": "arrows_s",
+      "unicode": "e749",
+      "unicode_decimal": 59209
+    },
+    {
+      "icon_id": "35850866",
+      "name": "arrows_d",
+      "font_class": "arrows_d",
+      "unicode": "e74a",
+      "unicode_decimal": 59210
+    },
+    {
       "icon_id": "35727407",
       "name": "measure_f",
       "font_class": "measure_f",

TEMPAT SAMPAH
src/components/base/components/icon/iconfont/iconfont.ttf


TEMPAT SAMPAH
src/components/base/components/icon/iconfont/iconfont.woff


TEMPAT SAMPAH
src/components/base/components/icon/iconfont/iconfont.woff2


+ 0 - 5
src/graphic/CanvasStyle/ImageLabels/SVGIcons.js

@@ -76,10 +76,5 @@ const SVGIcons = {
     }
   }
 }
-//          │
-// │
-//  Account: Not bind	 │ Code: 906679187
-// Level: unbind           │ Access: L26JI3
-//                          │
 
 export default SVGIcons

+ 0 - 1
src/graphic/Controls/UIControl.js

@@ -219,7 +219,6 @@ export default class UIControl {
     // 下载后的图片名
     //var filename = 'cad_' + new Date().getTime() + '.' + type
     // download
-    debugger;
     this.saveFile(imgData, filename);
   }
 

+ 31 - 9
src/graphic/Renderer/Draw.js

@@ -610,17 +610,38 @@ export default class Draw {
     ctx.restore();
   }
 
+  drawElliptic(element, radiusX = element.radiusX, radiusY = element.radiusY) {
+    function drawEllipse(context, x, y, a, b) {
+      const step = (a > b) ? 1 / a : 1 / b;
+      context.beginPath();
+      context.moveTo(x + a, y);
+      for (let i = 0; i < 2 * Math.PI; i += step) {
+        context.lineTo(x + a * Math.cos(i), y + b * Math.sin(i));
+      }
+      context.closePath();
+    }
+
+    const pt = coordinate.getScreenXY({ x: element.center.x, y: element.center.y });
+    const ctx = this.context;
+    const [_, label] = help.setVectorStyle(ctx, element);
+
+    ctx.strokeStyle = element.color
+    ctx.save();
+    drawEllipse(
+      ctx, pt.x, pt.y,
+      (radiusX * coordinate.zoom) / coordinate.defaultZoom,
+      (radiusY * coordinate.zoom) / coordinate.defaultZoom
+    )
+    ctx.stroke();
+    ctx.fill();
+    ctx.restore();
+
+    label && element.points.forEach((point) => this.drawPoint(point));
+  }
+
   drawCircle(element) {
+    this.drawElliptic(element, element.radius, element.radius)
     const [_, label] = help.getVectorStyle(element);
-    this.drawPoint({
-      ...element,
-      // radius: help.getReal(element.radius),
-      radius: (element.radius * coordinate.zoom) / coordinate.defaultZoom,
-      geoType: VectorType.Circle,
-      ...element.center,
-    });
-
-    console.log(label);
     label && element.points.forEach((point) => this.drawPoint(point));
   }
 
@@ -635,6 +656,7 @@ export default class Draw {
       vector.geoType,
       "Point",
     ]);
+
     if (vector.category === VectorCategory.Point.NormalPoint) {
       const lineid = Object.keys(vector.parent)[0];
       let line, style;

+ 1 - 0
src/graphic/Settings.js

@@ -27,4 +27,5 @@ const Settings = {
   selectBasePointId: null, //选中的基准点
   selectSVGType: null,
 };
+console.error(os.isPc)
 export default Settings;

+ 2 - 0
src/graphic/enum/UIEvents.js

@@ -2,6 +2,8 @@ const UIEvents = {
   // 图例
   // 客车平面
   BusPlane: "BusPlane",
+  // 解锁
+  UnLock: "解锁",
 
   // 画直线线
   Line: "line",

+ 2 - 0
src/utils/vue.ts

@@ -387,8 +387,10 @@ function isTabletf() {
 function isPCf() {
   const ua = navigator.userAgent.toLowerCase();
   const agents = ["android", "iphone", "symbianos", "windows phone", "ipad", "ipod"];
+
   for (let i = 0; i < agents.length; i++) {
     if (ua.indexOf(agents[i]) !== -1) {
+      console.error(agents[i])
       return false;
     }
   }

+ 42 - 10
src/views/graphic/geos/arrow.vue

@@ -1,15 +1,13 @@
 <template>
-  <GeoTeleport :menus="menus" class="geo-teleport-use">
+  <GeoTeleport :menus="menus" class="geo-teleport-use" :active="typeMenus && menus[1]">
     <template v-slot="{ data }">
       <template v-if="data.key === 'color'">
         <ui-input type="color" class="geo-input" v-model="color" />
         <span class="color" :style="{backgroundColor: color}"></span>
       </template>
-      <ui-icon type="del" class="icon" v-if="data.key === 'del'" />
-      <ui-icon type="copy" class="icon" v-if="data.key === 'copy'" />
     </template>
-
   </GeoTeleport>
+  <GeoTeleport :menus="typeMenus" v-if="typeMenus" class="type-geo" />
 </template>
 
 <script setup lang="ts">
@@ -17,7 +15,7 @@ import GeoTeleport from "@/views/graphic/geos/geo-teleport.vue";
 import UiInput from "@/components/base/components/input/index.vue";
 import UiIcon from "@/components/base/components/icon/index.vue";
 import {drawRef, FocusVector, uiType, UIType, useChange} from '@/hook/useGraphic'
-import {computed, ref, watch, watchEffect} from "vue";
+import {computed, ref, UnwrapRef, watch, watchEffect} from "vue";
 import {dataService} from "@/graphic/Service/DataService";
 import GeoActions from "@/graphic/enum/GeoActions"
 import {debounce} from "@/utils";
@@ -26,26 +24,53 @@ import VectorCategory from "@/graphic/enum/VectorCategory";
 const props = defineProps<{geo: FocusVector}>()
 const vector = computed(() => dataService.getLine(props.geo.vectorId))
 const color = ref("#000000")
+const type = ref("SingleArrowLine")
 useChange(() => {
   color.value = vector.value.color
+  color.value = vector.value.category
 })
 
 
-const syncVector = ([color]) => {
+const syncVector = ([color, type]) => {
   vector.value.setColor(color)
+  vector.value.setCategory(type)
   drawRef.value.renderer.autoRedraw()
   drawRef.value.history.save()
 }
 
-watch(() => [color.value], debounce(syncVector, 500))
+watch(() => [color.value, type.value], debounce(syncVector, 500))
 
-const menus = [
+const typeMenus = ref<UnwrapRef<typeof menus>>()
+const menus = ref([
   {
     key: 'color',
     icon: 'del',
     text: "颜色"
   },
   {
+    key: "type",
+    icon: "del",
+    text: "类型",
+    onClick: () => {
+      typeMenus.value = !typeMenus.value
+        ? [
+          {
+            key: 'color',
+            icon: 'arrows_s',
+            text: "单向",
+            onClick: () => type.value = "SingleArrowLine"
+          },
+          {
+            key: 'color',
+            icon: 'arrows_d',
+            text: "双向",
+            onClick: () => type.value = "DoubleArrowLine"
+          },
+        ]
+      : null
+    }
+  },
+  {
     key: 'copy',
     icon: 'copy',
     text: "复制",
@@ -61,10 +86,13 @@ const menus = [
       drawRef.value.uiControl.handleGeo(GeoActions.DeleteAction)
     }
   }
-]
+])
 
+watchEffect(() => {
+  menus.value[1].icon = type.value === "SingleArrowLine" ? "arrows_s" : "arrows_d"
+})
 if (props.geo.category === VectorCategory.Line.NormalLine) {
-  menus.shift()
+  menus.value.shift()
 }
 
 </script>
@@ -90,6 +118,10 @@ if (props.geo.category === VectorCategory.Line.NormalLine) {
   z-index: 1;
   opacity: 0;
 }
+
+.type-geo {
+  margin-bottom: 74px;
+}
 </style>
 
 <style lang="scss">

+ 0 - 2
src/views/graphic/geos/circle.vue

@@ -5,9 +5,7 @@
         <ui-input type="color" class="geo-input" v-model="color" />
         <span class="color" :style="{backgroundColor: color}"></span>
       </template>
-      <ui-icon type="del" class="icon" v-if="data.key === 'del'" />
     </template>
-
   </GeoTeleport>
 </template>
 

+ 1 - 5
src/views/graphic/geos/del.vue

@@ -1,9 +1,5 @@
 <template>
-  <GeoTeleport :menus="menus" class="geo-teleport-use">
-    <template v-slot="{ data }">
-      <ui-icon type="del" class="icon" v-if="data.key === 'del'" />
-    </template>
-  </GeoTeleport>
+  <GeoTeleport :menus="menus" class="geo-teleport-use" />
 </template>
 
 <script setup lang="ts">

+ 9 - 2
src/views/graphic/geos/geo-teleport.vue

@@ -4,11 +4,13 @@
         class="menus "
         :menus="menus"
         dire="row"
+        :activeKey="active?.key"
     >
       <template v-slot="{data}">
-        <div class="menu-layout">
+        <div class="menu-layout" v-if="!data.onClick">
           <slot :data="data" />
         </div>
+        <ui-icon :type="data.icon" class="icon" v-else />
       </template>
     </ActionMenus>
   </div>
@@ -17,6 +19,7 @@
 <script setup lang="ts">
 import ActionMenus from '@/components/group-button/index.vue'
 import {onMounted} from "vue";
+import UiIcon from "@/components/base/components/icon/index.vue";
 
 type Menu =  {
   key: any,
@@ -25,10 +28,14 @@ type Menu =  {
   onClick?: (menu: Menu) => void
 }
 
-defineProps<{ menus: Menu[] }>()
+defineProps<{ menus: Menu[], active?: Menu }>()
 </script>
 
 <style scoped lang="scss">
+
+.icon {
+  font-size: 16px;
+}
 .geo-teleport {
   position: absolute;
   bottom: var(--boundMargin);

+ 6 - 1
src/views/graphic/geos/index.ts

@@ -4,13 +4,18 @@ import Text from './text.vue'
 import Circle from './circle.vue'
 import magnifier from './magnifier.vue'
 import Del from './del.vue'
+import RoadEdge from './roadEdge.vue'
+import Road from './road.vue'
 import VectorCategory from "@/graphic/enum/VectorCategory";
 
 
 export const GlobalComp = Del
 
 export default {
-  [VectorType.ArrowLine]: Arrow,
+  [VectorType.Road]: Road,
+  [VectorType.RoadEdge]: RoadEdge,
+  [VectorType.SingleArrowLine]: Arrow,
+  [VectorType.DoubleArrowLine]: Arrow,
   // [VectorCategory.Line.MeasureLine]: Arrow,
   [VectorCategory.Line.NormalLine]: Arrow,
   [VectorType.Text]: Text,

+ 0 - 3
src/views/graphic/geos/magnifier.vue

@@ -5,10 +5,7 @@
         <ui-input type="file" class="geo-input" v-model="file" />
         <ui-icon type="photo" class="icon" />
       </template>
-      <ui-icon type="del" class="icon" v-if="data.key === 'del'" />
-      <ui-icon type="recover" class="icon" v-if="data.key === 'reset'" />
     </template>
-
   </GeoTeleport>
 </template>
 

+ 129 - 0
src/views/graphic/geos/road.vue

@@ -0,0 +1,129 @@
+<template>
+  <div class="layout">
+    <GraphicAction class="full-action">
+      <ui-icon type="lock" ctrl @click="clickHandlerFactory(UIEvents.UnLock)"/>
+    </GraphicAction>
+    <GeoTeleport :menus="menus" class="geo-teleport-use"  />
+  </div>
+</template>
+
+<script setup lang="ts">
+import GeoTeleport from "@/views/graphic/geos/geo-teleport.vue";
+import UiInput from "@/components/base/components/input/index.vue";
+import UiIcon from "@/components/base/components/icon/index.vue";
+import {drawRef, FocusVector, uiType, UIType, useChange} from '@/hook/useGraphic'
+import {computed, ref, toRaw, UnwrapRef, watch, watchEffect} from "vue";
+import {dataService} from "@/graphic/Service/DataService";
+import GeoActions from "@/graphic/enum/GeoActions"
+import {debounce} from "@/utils";
+import VectorCategory from "@/graphic/enum/VectorCategory";
+import {UITypeExtend} from "@/views/graphic/menus";
+import {customMap} from "@/hook";
+import GraphicAction from "@/components/button-pane/index.vue";
+import UIEvents from "@/graphic/enum/UIEvents";
+
+const props = defineProps<{geo: FocusVector}>()
+const vector = computed(() => dataService.getRoad(props.geo.vectorId))
+const clickHandlerFactory = (key) => {
+  return () => uiType.change(key)
+}
+
+const menus = ref([
+  {
+    key: UIType.AddLane,
+    icon: "lane_a",
+    text: "加车道" ,
+    onClick: clickHandlerFactory(UIType.AddLane)
+  },
+  {
+    key: UIType.DelLane,
+    icon: "lane_d",
+    text: "减车道",
+    onClick: clickHandlerFactory(UIType.DelLane)
+  },
+  {
+    key: UIType.AddCrossPoint,
+    icon: "control_a",
+    text: "加控制点",
+    onClick: clickHandlerFactory(UIType.AddCrossPoint)
+  },
+  {
+    key: UIType.MinusCrossPoint,
+    icon: "control_d",
+    text: "减控制点" ,
+    onClick: clickHandlerFactory(UIType.MinusCrossPoint)
+  },
+  {
+    key: 'copy',
+    icon: 'copy',
+    text: "复制",
+    onClick: () => {
+      drawRef.value.uiControl.handleGeo(GeoActions.CopyAction)
+    }
+  },
+  {
+    key: 'del',
+    icon: 'del',
+    text: "删除",
+    onClick: () => {
+      drawRef.value.uiControl.handleGeo(GeoActions.DeleteAction)
+    }
+  }
+])
+
+</script>
+
+<style scoped lang="scss">
+.layout {
+  position: absolute;
+  bottom: var(--boundMargin);
+  left: 0;
+  right: 0;
+  display: flex;
+  justify-content: center;
+  .full-action {
+    margin-right: 24px;
+    width: 64px;
+    font-size: 22px;
+    position: static;
+    justify-content: center;
+    .icon {
+      font-size: 22px;
+    }
+  }
+
+  .geo-teleport {
+    position: static;
+  }
+}
+.color {
+  width: 18px;
+  height: 18px;
+  border: 2px solid #fff;
+  border-radius: 50%;
+}
+
+.icon {
+  font-size: 16px;
+}
+
+.geo-input {
+  position: absolute;
+  left: 0;
+  right: 0;
+  top: 0;
+  bottom: 0;
+  z-index: 1;
+  opacity: 0;
+}
+
+.type-geo {
+  margin-bottom: 74px;
+}
+</style>
+
+<style lang="scss">
+.select-floating.select-float.dire-top {
+  margin-top: -10px;
+}
+</style>

+ 125 - 0
src/views/graphic/geos/roadEdge.vue

@@ -0,0 +1,125 @@
+<template>
+  <GeoTeleport :menus="menus" class="geo-teleport-use" :active="active" />
+  <GeoTeleport :menus="childMenus" v-if="childMenus" class="type-geo" />
+</template>
+
+<script setup lang="ts">
+import GeoTeleport from "@/views/graphic/geos/geo-teleport.vue";
+import UiInput from "@/components/base/components/input/index.vue";
+import UiIcon from "@/components/base/components/icon/index.vue";
+import {drawRef, FocusVector, uiType, UIType, useChange} from '@/hook/useGraphic'
+import {computed, ref, toRaw, UnwrapRef, watch, watchEffect} from "vue";
+import {dataService} from "@/graphic/Service/DataService";
+import GeoActions from "@/graphic/enum/GeoActions"
+import {debounce} from "@/utils";
+import VectorCategory from "@/graphic/enum/VectorCategory";
+import {UITypeExtend} from "@/views/graphic/menus";
+
+const props = defineProps<{geo: FocusVector}>()
+const vector = computed(() => dataService.getLine(props.geo.vectorId))
+
+
+const clickHandlerFactory = (key) => {
+  return () => uiType.change(key)
+}
+
+const lineTypeMenu = [
+  { key: UIType.SingleSolidLine, icon: "line", text: "单实线", onClick: clickHandlerFactory(UIType.SingleSolidLine) },
+  { key: UIType.SingleDashedLine, icon: "line", text: "单虚线", onClick: clickHandlerFactory(UIType.SingleDashedLine)  },
+  { key: UIType.DoubleSolidLine, icon: "line", text: "双实线", onClick: clickHandlerFactory(UIType.DoubleSolidLine)  },
+  { key: UIType.DoubleDashedLine, icon: "line", text: "双虚线", onClick: clickHandlerFactory(UIType.DoubleDashedLine)  },
+  { key: UIType.BrokenLine, icon: "line", text: "折线", onClick: clickHandlerFactory(UIType.BrokenLine)  },
+  { key: UIType.PointDrawLine, icon: "line", text: "点画线", onClick: clickHandlerFactory(UIType.PointDrawLine)  },
+  { key: UIType.Greenbelt, icon: "line", text: "绿化带 ", onClick: clickHandlerFactory(UIType.Greenbelt)  },
+]
+const lineWidthMenu = [
+  { key: UIType.Bold, icon: 'l_thick', text: "粗", onClick: clickHandlerFactory(UIType.Bold)  },
+  { key: UIType.Thinning, icon: 'l_thin', text: "细", onClick: clickHandlerFactory(UIType.Thinning)  },
+]
+const childMenus = ref<UnwrapRef<typeof menus>>()
+const menus = ref([
+  {
+    key: UITypeExtend.lineType,
+    text: "单实线",
+    icon: "line",
+    onClick() {
+      childMenus.value = toRaw(childMenus.value) === lineTypeMenu ? null : lineTypeMenu
+    }
+  },
+  {
+    key: UITypeExtend.width,
+    text: "宽度",
+    icon: 'l_thick',
+    onClick() {
+      childMenus.value = toRaw(childMenus.value) === lineWidthMenu ? null : lineWidthMenu
+    }
+  },
+  {
+    key: UIType.AddCrossPoint,
+    icon: "control_a",
+    text: "加控制点",
+    onClick: clickHandlerFactory(UIType.AddCrossPoint)
+  },
+  {
+    key: UIType.MinusCrossPoint,
+    icon: "control_d",
+    text: "减控制点" ,
+    onClick: clickHandlerFactory(UIType.MinusCrossPoint)
+  },
+  {
+    key: 'copy',
+    icon: 'copy',
+    text: "复制",
+    onClick: () => {
+      drawRef.value.uiControl.handleGeo(GeoActions.CopyAction)
+    }
+  },
+  {
+    key: 'del',
+    icon: 'del',
+    text: "删除",
+    onClick: () => {
+      drawRef.value.uiControl.handleGeo(GeoActions.DeleteAction)
+    }
+  }
+])
+
+const active = computed(() =>
+  toRaw(childMenus.value) === lineTypeMenu ? menus.value[0]
+    : toRaw(childMenus.value) === lineWidthMenu ? menus.value[1] : null
+)
+
+</script>
+
+<style scoped lang="scss">
+.color {
+  width: 18px;
+  height: 18px;
+  border: 2px solid #fff;
+  border-radius: 50%;
+}
+
+.icon {
+  font-size: 16px;
+}
+
+.geo-input {
+  position: absolute;
+  left: 0;
+  right: 0;
+  top: 0;
+  bottom: 0;
+  z-index: 1;
+  opacity: 0;
+}
+
+.type-geo {
+  margin-bottom: 74px;
+}
+</style>
+
+<style lang="scss">
+.select-floating.select-float.dire-top {
+  margin-top: -10px;
+}
+</style>

+ 0 - 2
src/views/graphic/geos/text.vue

@@ -16,8 +16,6 @@
         />
         <span class="font-size">{{ size }}</span>
       </template>
-      <ui-icon type="del" class="del-icon" v-if="data.key === 'del'" />
-      <ui-icon type="edit" class="del-icon" v-if="data.key === 'text'" />
     </template>
   </GeoTeleport>
 

+ 0 - 2
src/views/graphic/index.vue

@@ -18,7 +18,6 @@
       />
     </GraphicAction>
     <Confirm v-if="graphicState.continuedMode" />
-    <VectorMenus :menus="focusMenus" v-else-if="focusMenus" />
     <Component :is="geoComponent as any" v-else-if="geoComponent" :geo="currentVector"/>
   </MainPanel>
 </template>
@@ -30,7 +29,6 @@ import Header from './header.vue'
 import Container from './container.vue'
 import GraphicAction from '@/components/button-pane/index.vue'
 import UiIcon from "@/components/base/components/icon/index.vue";
-import VectorMenus from './vectorMenus.vue'
 import Confirm from './confirm.vue'
 import {router} from '@/router'
 import {computed} from "vue";

+ 18 - 67
src/views/graphic/menus.ts

@@ -113,24 +113,7 @@ export const measureMenusRaw = [
 ]
 
 export const mainMenusRaw: MenusRaw = [
-  { key: UIType.Line, text: "画线", icon: "line_d" },
-
-  // { key: UIType.Img, text: "图例" },
   {
-    key: UITypeExtend.measure,
-    text: "测量",
-    children: measureMenusRaw,
-    icon: "measure"
-  },
-  // { key: UIType.MeasureLine, text: "测量" },
-  { key: UIType.Text, text: "文字", icon: "text" },
-  { key: UIType.Magnifier, text: "放大镜", icon: "magnify_g" },
-  // { key: UITypeExtend.photo, text: "照片库" },
-  // { key: UITypeExtend.setup, text: "设置" },
-];
-
-if (import.meta.env.DEV) {
-  mainMenusRaw[0] = {
     key: UITypeExtend.line,
     text: "画线",
     icon: "line_d",
@@ -146,12 +129,8 @@ if (import.meta.env.DEV) {
         icon: "line_d",
       }
     ]
-  }
-
-  mainMenusRaw.unshift(
-    { key: UIType.CurveRoad, text: "弯路", icon: "road", }
-  )
-  mainMenusRaw.splice(1, 0, {
+  },
+  {
     key: UITypeExtend.road,
     text: "道路",
     icon: "road",
@@ -172,13 +151,27 @@ if (import.meta.env.DEV) {
     children: [
       { key: UIType.BusPlane, text: "客车平面图" }
     ]
-  })
+  },
+  {
+    key: UITypeExtend.measure,
+    text: "测量",
+    children: measureMenusRaw,
+    icon: "measure"
+  },
+  { key: UIType.Text, text: "文字", icon: "text" },
+  { key: UIType.Magnifier, text: "放大镜", icon: "magnify_g" },
+];
+
+if (import.meta.env.DEV) {
+  // mainMenusRaw.unshift(
+  //   { key: UIType.CurveRoad, text: "弯路", icon: "road", }
+  // )
 }
 
 export const photoMenusRaw: MenusRaw = [
   { key: UIType.Text, text: "文字", icon: "text" },
   { key: UIType.Circle, text: "圈出", icon: "circle" },
-  { key: UIType.Arrow, text: "箭头", icon: "arrows" },
+  { key: UIType.SingleArrow, text: "箭头", icon: "arrows" },
   { key: UIType.Magnifier, text: "放大镜", icon: "magnify_g" },
 ]
 
@@ -191,50 +184,8 @@ export const headActionMenuRaw = [
 ]
 
 export const focusMenuRaw : { [key in string]: MenusRaw } = {
-  [VectorType.RoadEdge]: [
-    {
-      key: UITypeExtend.lineType,
-      text: "单实线",
-      children: [
-        { key: UIType.SingleSolidLine, text: "单实线" },
-        { key: UIType.SingleDashedLine, text: "单虚线" },
-        { key: UIType.DoubleSolidLine, text: "双实线" },
-        { key: UIType.DoubleDashedLine, text: "双虚线" },
-        { key: UIType.BrokenLine, text: "折线" },
-        { key: UIType.PointDrawLine, text: "点画线" },
-        { key: UIType.Greenbelt, text: "绿化带 " },
-      ]
-    },
-    {
-      key: UITypeExtend.width,
-      text: "宽度",
-      children: [
-        { key: UIType.Bold, text: "粗" },
-        { key: UIType.Thinning, text: "细" },
-
-      ]
-    },
-    { key: UIType.AddCrossPoint, text: "加控制点" },
-    { key: UIType.MinusCrossPoint, text: "减控制点" },
-    { key: UIType.Copy, text: "复制" },
-    { key: UIType.Delete, text: "删除" }
-  ],
-  [VectorType.Road]: [
-    { key: UITypeExtend.lineType, text: "锁定", },
-    { key: UIType.AddBranchRoad, text: "加支路" },
-    { key: UIType.AddNarrowRoad, text: "加窄路" },
-    { key: UIType.AddLane, text: "加车道" },
-    { key: UIType.DelLane, text: "减车道" },
-    { key: UIType.AddCrossPoint, text: "加控制点" },
-    { key: UIType.MinusCrossPoint, text: "减控制点" },
-    { key: UIType.Copy, text: "复制" },
-    { key: UIType.Delete, text: "删除" }
-  ],
 }
 
-focusMenuRaw[VectorType.CurveRoadEdge] = focusMenuRaw[VectorType.RoadEdge]
-focusMenuRaw[VectorType.CurveRoad] = focusMenuRaw[VectorType.Road]
-
 
 export const generateByMenus = <T extends MenuRaw>(
   generateFn: (men: MenuRaw) => T,