فهرست منبع

修改道路交互

bill 2 سال پیش
والد
کامیت
ce62cc29c7
4فایلهای تغییر یافته به همراه112 افزوده شده و 103 حذف شده
  1. 39 0
      src/graphic/enum/RoadStructure.js
  2. 37 0
      src/graphic/enum/RoadTemplate.js
  3. 0 69
      src/graphic/enum/UIEvents.js
  4. 36 34
      src/views/graphic/menus.ts

+ 39 - 0
src/graphic/enum/RoadStructure.js

@@ -0,0 +1,39 @@
+const RoadStructure = {
+  // ----------道路结构-----------
+  // 支路
+  BranchRoad: "BranchRoad",
+  // 窄路
+  NarrowRoad: "NarrowRoad",
+  // 路肩
+  ShoulderRoad: "ShoulderRoad",
+  // 斑马线
+  ZebraCrossing: "ZebraCrossing",
+  // 桥
+  Bridge: "Bridge",
+  // 隧道
+  Tunnel: "Tunnel",
+  // 人行道
+  Sidewalk: "Sidewalk",
+  // 施工路段
+  ConstructionSection: "ConstructionSection",
+  // 下坡
+  Downhill: "Downhill",
+  // 上坡
+  Uphill: "Uphill",
+  // 路边水沟
+  RoadsideGutter: "RoadsideGutter",
+  // 道路与铁
+  RoadsAndRails: "RoadsAndRails",
+  // 消火栓井
+  FireHydrantWell: "FireHydrantWell",
+  // 雨水口
+  Gullies: "Gullies",
+  // 路面凹坑
+  RoadPotholes: "RoadPotholes",
+  // 路面凸出
+  ProtrudingRoad: "ProtrudingRoad",
+  // 路面积水
+  WaterOnTheRoad: "WaterOnTheRoad",
+}
+
+export default RoadStructure

+ 37 - 0
src/graphic/enum/RoadTemplate.js

@@ -0,0 +1,37 @@
+const RoadTemplate = {
+  // ----------道路模板-----------
+  // s型弯路
+  SBend: "SBend",
+  // 丁字路口
+  TJunction: "TJunction",
+  // 五岔路口
+  FiveForks: "FiveForks",
+  // 出口匝道
+  ExitRamp: "ExitRamp",
+  // 十字路口
+  Crossroads: "Crossroads",
+  // 国道(路肩)
+  NationalHighwayShoulder: "NationalHighwayShoulder",
+  // 室内路段
+  IndoorSection: "IndoorSection",
+  // 弯道
+  Bend: "Bend",
+  // 急转弯道
+  SharpCurve: "SharpCurve",
+  // 六岔路口
+  SixForkIntersection: "SixForkIntersection",
+  // 宽变窄路段
+  WideNarrowRoad: "WideNarrowRoad",
+  // 直角弯道
+  Corner: "Corner",
+  // 进口砸到
+  ImportSmashedRoad: "ImportSmashedRoad",
+  // 高速收费站
+  HighSpeedTollBooth: "HighSpeedTollBooth",
+  // 高速港湾
+  HighSpeedHarbor: "HighSpeedHarbor",
+  // 高速路段
+  HighwaySection: "HighwaySection",
+}
+
+export default RoadTemplate

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

@@ -54,75 +54,6 @@ const UIEvents = {
   // 双向三车道直路
   TwoEdgeThreeLanRoad: "TwoEdgeThreeLanRoad",
 
-  // ----------道路结构-----------
-  // 支路
-  BranchRoad: "BranchRoad",
-  // 窄路
-  NarrowRoad: "NarrowRoad",
-  // 路肩
-  ShoulderRoad: "ShoulderRoad",
-  // 斑马线
-  ZebraCrossing: "ZebraCrossing",
-  // 桥
-  Bridge: "Bridge",
-  // 隧道
-  Tunnel: "Tunnel",
-  // 人行道
-  Sidewalk: "Sidewalk",
-  // 施工路段
-  ConstructionSection: "ConstructionSection",
-  // 下坡
-  Downhill: "Downhill",
-  // 上坡
-  Uphill: "Uphill",
-  // 路边水沟
-  RoadsideGutter: "RoadsideGutter",
-  // 道路与铁
-  RoadsAndRails: "RoadsAndRails",
-  // 消火栓井
-  FireHydrantWell: "FireHydrantWell",
-  // 雨水口
-  Gullies: "Gullies",
-  // 路面凹坑
-  RoadPotholes: "RoadPotholes",
-  // 路面凸出
-  ProtrudingRoad: "ProtrudingRoad",
-  // 路面积水
-  WaterOnTheRoad: "WaterOnTheRoad",
-
-  // ----------道路模板-----------
-  // s型弯路
-  SBend: "SBend",
-  // 丁字路口
-  TJunction: "TJunction",
-  // 五岔路口
-  FiveForks: "FiveForks",
-  // 出口匝道
-  ExitRamp: "ExitRamp",
-  // 十字路口
-  Crossroads: "Crossroads",
-  // 国道(路肩)
-  NationalHighwayShoulder: "NationalHighwayShoulder",
-  // 室内路段
-  IndoorSection: "IndoorSection",
-  // 弯道
-  Bend: "Bend",
-  // 急转弯道
-  SharpCurve: "SharpCurve",
-  // 六岔路口
-  SixForkIntersection: "SixForkIntersection",
-  // 宽变窄路段
-  WideNarrowRoad: "WideNarrowRoad",
-  // 直角弯道
-  Corner: "Corner",
-  // 进口砸到
-  ImportSmashedRoad: "ImportSmashedRoad",
-  // 高速收费站
-  HighSpeedTollBooth: "HighSpeedTollBooth",
-  // 高速港湾
-  HighSpeedHarbor: "HighSpeedHarbor",
-  // 高速路段
-  HighwaySection: "HighwaySection",
 
   // ------------控制方法----------
   // 回退

+ 36 - 34
src/views/graphic/menus.ts

@@ -1,10 +1,12 @@
-import {uiType, UIType, VectorType, graphicState} from "@/hook/useGraphic";
+import {uiType, UIType, graphicState} from "@/hook/useGraphic";
 import {
   findMenuByAttr,
   generateByMenus as generateByMenusRaw,
   generateMixMenus as generateMixMenusRaw
 } from '@/utils/menus'
 import Message from "@/components/base/components/message/message.vue";
+import RoadStructure from '@/graphic/enum/RoadStructure'
+import RoadTemplate from '@/graphic/enum/RoadTemplate'
 import {computed} from "vue";
 
 export enum Mode {
@@ -39,42 +41,42 @@ export type MenusRaw = Array<MenuRaw>
 
 
 export const structureMenusRaw = [
-  { key: UIType.BranchRoad, text: "支路" },
-  { key: UIType.NarrowRoad, text: "窄路" },
-  { key: UIType.ShoulderRoad, text: "路肩" },
-  { key: UIType.ZebraCrossing, text: "斑马线" },
-  { key: UIType.Bridge, text: "桥" },
-  { key: UIType.Tunnel, text: "隧道" },
-  { key: UIType.Sidewalk, text: "人行道" },
-  { key: UIType.ConstructionSection, text: "施工路段" },
-  { key: UIType.Downhill, text: "下坡" },
-  { key: UIType.Uphill, text: "上坡" },
-  { key: UIType.RoadsideGutter, text: "路边水沟" },
-  { key: UIType.RoadsAndRails, text: "道路与铁..." },
-  { key: UIType.FireHydrantWell, text: "消火栓井" },
-  { key: UIType.Gullies, text: "雨水口" },
-  { key: UIType.RoadPotholes, text: "路面凹坑" },
-  { key: UIType.ProtrudingRoad, text: "路面凸出..." },
-  { key: UIType.WaterOnTheRoad, text: "路面积水" },
+  { key: RoadStructure.BranchRoad, text: "支路" },
+  { key: RoadStructure.NarrowRoad, text: "窄路" },
+  { key: RoadStructure.ShoulderRoad, text: "路肩" },
+  { key: RoadStructure.ZebraCrossing, text: "斑马线" },
+  { key: RoadStructure.Bridge, text: "桥" },
+  { key: RoadStructure.Tunnel, text: "隧道" },
+  { key: RoadStructure.Sidewalk, text: "人行道" },
+  { key: RoadStructure.ConstructionSection, text: "施工路段" },
+  { key: RoadStructure.Downhill, text: "下坡" },
+  { key: RoadStructure.Uphill, text: "上坡" },
+  { key: RoadStructure.RoadsideGutter, text: "路边水沟" },
+  { key: RoadStructure.RoadsAndRails, text: "道路与铁..." },
+  { key: RoadStructure.FireHydrantWell, text: "消火栓井" },
+  { key: RoadStructure.Gullies, text: "雨水口" },
+  { key: RoadStructure.RoadPotholes, text: "路面凹坑" },
+  { key: RoadStructure.ProtrudingRoad, text: "路面凸出..." },
+  { key: RoadStructure.WaterOnTheRoad, text: "路面积水" },
 ]
 
 export const templateMenusRaw = [
-  { key: UIType.SBend, text: "s型弯路" },
-  { key: UIType.TJunction, text: "丁字路口" },
-  { key: UIType.FiveForks, text: "五岔路口" },
-  { key: UIType.ExitRamp, text: "出口匝道" },
-  { key: UIType.Crossroads, text: "十字路口" },
-  { key: UIType.NationalHighwayShoulder, text: "国道(路肩)" },
-  { key: UIType.IndoorSection, text: "室内路段" },
-  { key: UIType.Bend, text: "弯道" },
-  { key: UIType.SharpCurve, text: "急转弯道" },
-  { key: UIType.SixForkIntersection, text: "六岔路口" },
-  { key: UIType.WideNarrowRoad, text: "宽变窄路段" },
-  { key: UIType.Corner, text: "直角弯道" },
-  { key: UIType.ImportSmashedRoad, text: "进口砸到" },
-  { key: UIType.HighSpeedTollBooth, text: "高速收费站" },
-  { key: UIType.HighSpeedHarbor, text: "高速港湾" },
-  { key: UIType.HighwaySection, text: "高速路段" }
+  { key: RoadTemplate.SBend, text: "s型弯路" },
+  { key: RoadTemplate.TJunction, text: "丁字路口" },
+  { key: RoadTemplate.FiveForks, text: "五岔路口" },
+  { key: RoadTemplate.ExitRamp, text: "出口匝道" },
+  { key: RoadTemplate.Crossroads, text: "十字路口" },
+  { key: RoadTemplate.NationalHighwayShoulder, text: "国道(路肩)" },
+  { key: RoadTemplate.IndoorSection, text: "室内路段" },
+  { key: RoadTemplate.Bend, text: "弯道" },
+  { key: RoadTemplate.SharpCurve, text: "急转弯道" },
+  { key: RoadTemplate.SixForkIntersection, text: "六岔路口" },
+  { key: RoadTemplate.WideNarrowRoad, text: "宽变窄路段" },
+  { key: RoadTemplate.Corner, text: "直角弯道" },
+  { key: RoadTemplate.ImportSmashedRoad, text: "进口砸到" },
+  { key: RoadTemplate.HighSpeedTollBooth, text: "高速收费站" },
+  { key: RoadTemplate.HighSpeedHarbor, text: "高速港湾" },
+  { key: RoadTemplate.HighwaySection, text: "高速路段" }
 ]
 
 export const measureMenusRaw = [