Explorar o código

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

xzw %!s(int64=2) %!d(string=hai) anos
pai
achega
32438b3a40

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
server/test/SS-t-P1d6CwREny2/attach/sceneStore


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

@@ -55,6 +55,24 @@
           <ul class="icon_lists dib-box">
           
             <li class="dib">
+              <span class="icon iconfont">&#xe746;</span>
+                <div class="name">measure_f</div>
+                <div class="code-name">&amp;#xe746;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe747;</span>
+                <div class="name">measure_r</div>
+                <div class="code-name">&amp;#xe747;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe748;</span>
+                <div class="name">measure_c</div>
+                <div class="code-name">&amp;#xe748;</div>
+              </li>
+          
+            <li class="dib">
               <span class="icon iconfont">&#xe740;</span>
                 <div class="name">control_a</div>
                 <div class="code-name">&amp;#xe740;</div>
@@ -360,9 +378,9 @@
 <pre><code class="language-css"
 >@font-face {
   font-family: 'iconfont';
-  src: url('iconfont.woff2?t=1685323395791') format('woff2'),
-       url('iconfont.woff?t=1685323395791') format('woff'),
-       url('iconfont.ttf?t=1685323395791') format('truetype');
+  src: url('iconfont.woff2?t=1685345794465') format('woff2'),
+       url('iconfont.woff?t=1685345794465') format('woff'),
+       url('iconfont.ttf?t=1685345794465') format('truetype');
 }
 </code></pre>
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -389,6 +407,33 @@
         <ul class="icon_lists dib-box">
           
           <li class="dib">
+            <span class="icon iconfont icon-measure_f"></span>
+            <div class="name">
+              measure_f
+            </div>
+            <div class="code-name">.icon-measure_f
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-measure_r"></span>
+            <div class="name">
+              measure_r
+            </div>
+            <div class="code-name">.icon-measure_r
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-measure_c"></span>
+            <div class="name">
+              measure_c
+            </div>
+            <div class="code-name">.icon-measure_c
+            </div>
+          </li>
+          
+          <li class="dib">
             <span class="icon iconfont icon-control_a"></span>
             <div class="name">
               control_a
@@ -849,6 +894,30 @@
           
             <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>
+                <div class="code-name">#icon-measure_f</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-measure_r"></use>
+                </svg>
+                <div class="name">measure_r</div>
+                <div class="code-name">#icon-measure_r</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-measure_c"></use>
+                </svg>
+                <div class="name">measure_c</div>
+                <div class="code-name">#icon-measure_c</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
                   <use xlink:href="#icon-control_a"></use>
                 </svg>
                 <div class="name">control_a</div>

+ 15 - 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=1685323395791') format('woff2'),
-       url('iconfont.woff?t=1685323395791') format('woff'),
-       url('iconfont.ttf?t=1685323395791') format('truetype');
+  src: url('iconfont.woff2?t=1685345794465') format('woff2'),
+       url('iconfont.woff?t=1685345794465') format('woff'),
+       url('iconfont.ttf?t=1685345794465') format('truetype');
 }
 
 .iconfont {
@@ -13,6 +13,18 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-measure_f:before {
+  content: "\e746";
+}
+
+.icon-measure_r:before {
+  content: "\e747";
+}
+
+.icon-measure_c:before {
+  content: "\e748";
+}
+
 .icon-control_a:before {
   content: "\e740";
 }

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
src/components/base/components/icon/iconfont/iconfont.js


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

@@ -6,6 +6,27 @@
   "description": "交通事故现场勘验系统",
   "glyphs": [
     {
+      "icon_id": "35727407",
+      "name": "measure_f",
+      "font_class": "measure_f",
+      "unicode": "e746",
+      "unicode_decimal": 59206
+    },
+    {
+      "icon_id": "35727411",
+      "name": "measure_r",
+      "font_class": "measure_r",
+      "unicode": "e747",
+      "unicode_decimal": 59207
+    },
+    {
+      "icon_id": "35727413",
+      "name": "measure_c",
+      "font_class": "measure_c",
+      "unicode": "e748",
+      "unicode_decimal": 59208
+    },
+    {
       "icon_id": "35710135",
       "name": "control_a",
       "font_class": "control_a",

BIN=BIN
src/components/base/components/icon/iconfont/iconfont.ttf


BIN=BIN
src/components/base/components/icon/iconfont/iconfont.woff


BIN=BIN
src/components/base/components/icon/iconfont/iconfont.woff2


+ 3 - 3
src/dbo/main.ts

@@ -3,9 +3,9 @@ import {params} from "@/hook";
 
 const instance = axios.create()
 const baseURL =
-  (import.meta.env.VITE_API_BASE_URL
-    ? `/${import.meta.env.VITE_API_BASE_URL}`
-    : "") + `/${params.m}`;
+  import.meta.env.VITE_API_BASE_URL
+    ? `/${import.meta.env.VITE_API_BASE_URL}/${params.m}`
+    : "";
 
 instance.defaults.baseURL = baseURL
 

+ 9 - 0
src/graphic/CanvasStyle/ImageLabels/keche_plane.svg

@@ -0,0 +1,9 @@
+<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M6.5 23.5C6.5 21.2909 8.29086 19.5 10.5 19.5H58.5C60.7091 19.5 62.5 21.2909 62.5 23.5V40.5C62.5 42.7091 60.7091 44.5 58.5 44.5H10.5C8.29086 44.5 6.5 42.7091 6.5 40.5L6.5 23.5Z" stroke="black"/>
+<path d="M1.5 23.5C1.5 21.2909 3.29086 19.5 5.5 19.5L58.5007 19.5C60.7099 19.5 62.5007 21.2909 62.5007 23.5V40.5C62.5007 42.7091 60.7099 44.5 58.5007 44.5H5.5C3.29086 44.5 1.5 42.7091 1.5 40.5V23.5Z" stroke="black"/>
+<path d="M1.5 32.5H6.5" stroke="black"/>
+<path d="M12.5 22.5H20.5" stroke="black" stroke-linecap="round"/>
+<path d="M12.5 41.5H20.5" stroke="black" stroke-linecap="round"/>
+<path d="M49.5 22.5H55.5" stroke="black" stroke-linecap="round"/>
+<path d="M49.5 41.5H55.5" stroke="black" stroke-linecap="round"/>
+</svg>

+ 31 - 0
src/graphic/Controls/AddLine.js

@@ -72,6 +72,37 @@ export default class AddLine {
       }
     }
   }
+
+  buildCurveLine(position) {
+    if (
+      this.newLine == null &&
+      !mathUtil.equalPoint(this.startInfo.position, position)
+    ) {
+      this.newLine = lineService.createCurveLine(
+        this.startInfo.position,
+        position
+      );
+    }
+  }
+
+  updateCurveLine(position) {
+    if (
+      this.newLine != null &&
+      !mathUtil.equalPoint(this.startInfo.position, position)
+    ) {
+      let curvePoint = dataService.getCurvePoint(this.newLine.endId);
+      curvePoint.setPosition(position);
+    }
+  }
+
+  finishCurveLine(position) {
+    if (this.newLine != null) {
+      if (mathUtil.equalPoint(this.startInfo.position, position)) {
+        dataService.deleteCurveLine(this.newLine.vectorId);
+      }
+    }
+  }
+
   clearVectorData() {
     this.newLine = null;
     this.startInfo = {};

+ 2 - 2
src/graphic/Geometry/CurveLine.js

@@ -4,11 +4,11 @@ import Geometry from "./Geometry";
 import Constant from "../Constant.js";
 
 export default class CurveLine extends Geometry {
-  constructor(points, vectorId) {
+  constructor(startId, endId, vectorId) {
     super();
     this.startId = startId;
     this.endId = endId;
-    this.points = points;
+    this.points = null;
     this.geoType = VectorType.CurveLine;
     this.setId(vectorId);
   }

+ 34 - 1
src/graphic/Layer.js

@@ -139,7 +139,7 @@ export default class Layer {
         addLine.setNewLinePoint(position);
         break;
       case LayerEvents.AddCurveLine:
-        stateService.setEventName(LayerEvents.AddCurveLine);
+        stateService.setEventName(LayerEvents.AddingCurveLine);
         addLine.setNewLinePoint(position);
         break;
       case LayerEvents.AddPoint:
@@ -406,6 +406,32 @@ export default class Layer {
           addLine.updateLine(position);
         }
         break;
+      case LayerEvents.AddingCurveLine:
+        needAutoRedraw = true;
+        let exceptCurveLineId = null;
+        let exceptCurvePointId = null;
+        if (addLine.newLine != null) {
+          exceptCurveLineId = addLine.newLine.vectorId;
+          exceptCurvePointId = addLine.newLine.endId;
+        }
+        listenLayer.start(position, {
+          exceptCurveLineId: exceptCurveLineId,
+          exceptCurvePointId: exceptCurvePointId,
+        });
+        if (listenLayer.modifyPoint) {
+          position = {
+            x: listenLayer.modifyPoint.x,
+            y: listenLayer.modifyPoint.y,
+          };
+        }
+        elementService.execute(addLine.startInfo.position, position);
+        elementService.setPoint(position);
+        if (addLine.newLine == null) {
+          addLine.buildCurveLine(position);
+        } else {
+          addLine.updateCurveLine(position);
+        }
+        break;
       case LayerEvents.AddingCircle:
         needAutoRedraw = true;
         let exceptCircleId = null;
@@ -790,6 +816,13 @@ export default class Layer {
         this.history.save();
         elementService.hideAll();
         break;
+      case LayerEvents.AddingCurveLine:
+        needAutoRedraw = true;
+        addLine.finishCurveLine(position);
+        addLine.clearVectorData();
+        this.history.save();
+        elementService.hideAll();
+        break;
       case LayerEvents.AddingCircle:
         needAutoRedraw = true;
         addCircle.finish(position);

+ 130 - 2
src/graphic/ListenLayer.js

@@ -23,6 +23,8 @@ export default class ListenLayer {
    * @param exceptVectorIds:{
           exceptPointId,
           exceptLineId,
+          exceptCurvePointId,
+          exceptCurveLineId,
           exceptRoadPointId,
           exceptRoadIds,
           exceptCurveRoadPointId,
@@ -63,8 +65,14 @@ export default class ListenLayer {
       position,
       exceptVectorIds.exceptLineId
     );
-    selectInfo.curveLineInfo = {};
-    selectInfo.curvePointInfo = {};
+    selectInfo.curvePointInfo = this.isSelectCurvePoint(
+      position,
+      exceptVectorIds.exceptCurvePointId
+    );
+    selectInfo.curveLineInfo = this.isSelectCurveLine(
+      position,
+      exceptVectorIds.exceptCurveLineId
+    );
     selectInfo.circleInfo = this.isSelectCircle(
       position,
       exceptVectorIds.exceptCircleId
@@ -87,6 +95,126 @@ export default class ListenLayer {
     return flag;
   }
 
+  isSelectCurvePoint(position, exceptCurvePointId) {
+    let curvePointInfo = {
+      curvePointId: null,
+      type: null,
+      distance: null,
+    };
+
+    let seqInfo = {};
+    const curvePoints = dataService.getCurvePoints();
+    for (const curvePointId in curvePoints) {
+      if (curvePointId == exceptCurvePointId) {
+        continue;
+      }
+      const curvePoint = dataService.getCurvePoint(curvePointId);
+      const distance = mathUtil.getDistance(position, curvePoint);
+      if (distance < Constant.minAdsorbPix) {
+        if (curvePointInfo.curvePointId == null) {
+          curvePointInfo = {
+            curvePointId: curvePointId,
+            type: VectorType.CurvePoint,
+            distance: distance,
+          };
+        } else {
+          if (distance < curvePointInfo.distance) {
+            curvePointInfo = {
+              curvePointId: curvePointId,
+              type: VectorType.CurvePoint,
+              distance: distance,
+            };
+          }
+        }
+      } else {
+        if (Math.abs(position.x - curvePoint.x) < Constant.minAdsorbPix) {
+          seqInfo.linkedCurvePointIdX = curvePointId;
+          seqInfo.x = curvePoint.x;
+        }
+        if (Math.abs(position.y - curvePoint.y) < Constant.minAdsorbPix) {
+          seqInfo.linkedPointIdY = curvePointId;
+          seqInfo.y = curvePoint.y;
+        }
+      }
+    }
+
+    if (curvePointInfo.curvePointId) {
+      curvePointInfo.linkedCurvePointId = curvePointInfo.curvePointId;
+      const linkedCurvePoint = dataService.getCurvePoint(
+        curvePointInfo.curvePointId
+      );
+      curvePointInfo.x = linkedCurvePoint.x;
+      curvePointInfo.y = linkedCurvePoint.y;
+    } else {
+      if (seqInfo.hasOwnProperty("linkedCurvePointIdX")) {
+        curvePointInfo.linkedCurvePointIdX = seqInfo.linkedCurvePointIdX;
+        curvePointInfo.x = seqInfo.x;
+      }
+      if (seqInfo.hasOwnProperty("linkedCurvePointIdY")) {
+        curvePointInfo.linkedCurvePointIdY = seqInfo.linkedCurvePointIdY;
+        curvePointInfo.y = seqInfo.y;
+      }
+      if (
+        curvePointInfo.hasOwnProperty("y") &&
+        !curvePointInfo.hasOwnProperty("x")
+      ) {
+        curvePointInfo.x = position.x;
+      }
+      if (
+        curvePointInfo.hasOwnProperty("x") &&
+        !curvePointInfo.hasOwnProperty("y")
+      ) {
+        curvePointInfo.y = position.y;
+      }
+    }
+    return curvePointInfo;
+  }
+
+  isSelectCurveLine(position, exceptCurveLineIds) {
+    let curveLineInfo = {
+      curveLineId: null,
+      type: null,
+      distance: null,
+    };
+    const curveLines = dataService.getCurveLines();
+    for (const curveLineId in curveLines) {
+      if (
+        exceptCurveLineIds &&
+        exceptCurveLineIds.hasOwnProperty(curveLineId)
+      ) {
+        continue;
+      }
+      const curveLine = dataService.getCurveLine(curveLineId);
+      let startPoint = dataService.getCurvePoint(curveLine.startId);
+      let endPoint = dataService.getCurvePoint(curveLine.endId);
+      const comLine = mathUtil.createLine1(startPoint, endPoint);
+      const join = mathUtil.getJoinLinePoint(position, comLine);
+      const distance = mathUtil.getDistance(position, join);
+      if (!mathUtil.isContainForSegment(join, startPoint, endPoint)) {
+        continue;
+      }
+      if (distance < Constant.minAdsorbPix / 2) {
+        curveLineInfo = {
+          curveLineId: curveLineId,
+          type: VectorType.CurveLine,
+          distance: distance,
+        };
+      }
+    }
+
+    if (curveLineInfo.curveLineId) {
+      const linkedLine = dataService.getLine(lineInfo.curveLineId);
+      let startPoint = dataService.getCurvePoint(linkedLine.startId);
+      let endPoint = dataService.getCurvePoint(linkedLine.endId);
+      const linkedComLine = mathUtil.createLine1(startPoint, endPoint);
+      const linkedPosition = mathUtil.getJoinLinePoint(position, linkedComLine);
+      curveLineInfo.x = linkedPosition.x;
+      curveLineInfo.y = linkedPosition.y;
+      return curveLineInfo;
+    }
+    return curveLineInfo;
+  }
+
   isSelectPoint(position, exceptPointId) {
     let pointInfo = {
       pointId: null,

+ 3 - 0
src/graphic/Renderer/Render.js

@@ -42,6 +42,9 @@ export default class Render {
       case VectorType.Line:
         draw.drawLine(vector); //需要修改,有几种情况:测量,校准,基准
         break;
+      case VectorType.CurveLine:
+        //draw.drawCurveLine(vector);
+        break;
       case VectorType.Text:
         draw.drawText(vector, styleType, flag);
         break;

+ 7 - 0
src/graphic/Service/DataService.js

@@ -75,6 +75,8 @@ export class DataService {
     this.vectorData.curvelines = {};
     //线段(完全或者直线)上的端点
     this.vectorData.points = {};
+    this.vectorData.curvePoints = {};
+
     this.vectorData.circles = {};
     //基准点
     this.vectorData.basePointIds = [];
@@ -235,6 +237,10 @@ export class DataService {
     }
   }
 
+  deleteCurveLine(curveLineId) {
+    delete this.vectorData.curvelines[curveLineId];
+  }
+
   /**
    * 对弯路的操作
    */
@@ -561,6 +567,7 @@ export class DataService {
     this.vectorData.curvelines = {};
     //线段(完全或者直线)上的端点
     this.vectorData.points = {};
+    this.vectorData.curvePoints = {};
     this.vectorData.circles = {};
     //基准点
     this.vectorData.basePointIds = [];

+ 36 - 0
src/graphic/Service/LineService.js

@@ -1,6 +1,9 @@
 import Point from "../Geometry/Point.js";
 import Line from "../Geometry/Line.js";
+import CurvePoint from "../Geometry/CurvePoint.js";
+import CurveLine from "../Geometry/CurveLine.js";
 import { dataService } from "./DataService.js";
+import { curvePointService } from "./CurvePointService.js";
 import VectorCategory from "../enum/VectorCategory.js";
 import { mathUtil } from "../Util/MathUtil.js";
 import { uiService } from "./UIService.js";
@@ -85,6 +88,39 @@ export default class LineService {
     }
     return null;
   }
+
+  /******************************************************************************曲线**************************************************************************************/
+  createCurveLine(startPosition, endPosition, vectorId) {
+    if (
+      !startPosition ||
+      !endPosition ||
+      mathUtil.equalPoint(startPosition, endPosition)
+    ) {
+      return null;
+    }
+    let startPoint = curvePointService.create(startPosition);
+    let endPoint = curvePointService.create(endPosition);
+    let curveLine = new CurveLine(
+      startPoint.vectorId,
+      endPoint.vectorId,
+      vectorId
+    );
+
+    startPoint.setPointParent(curveLine.vectorId, "start");
+    endPoint.setPointParent(curveLine.vectorId, "end");
+    let midPoint = curvePointService.create({
+      x: (startPoint.x + endPoint.x) / 2,
+      y: (startPoint.y + endPoint.y) / 2,
+    });
+
+    curveLine.points = [];
+    curveLine.points.push(startPoint);
+    curveLine.points.push(midPoint);
+    curveLine.points.push(endPoint);
+
+    dataService.addCurveLine(curveLine);
+    return curveLine;
+  }
 }
 
 const lineService = new LineService();

+ 6 - 1
src/graphic/enum/UIEvents.js

@@ -1,5 +1,10 @@
 const UIEvents = {
-  // 画线
+  // 图例
+  // 客车平面
+  BusPlane: "BusPlane",
+
+
+  // 画直线线
   Line: "line",
   // 画曲线
   CurveLine: "Curveline",

+ 2 - 2
src/main.ts

@@ -1,9 +1,9 @@
 import VConsole from 'vconsole';
-// if (import.meta.env.DEV) {
+if (import.meta.env.DEV) {
   if (!os.isPc) {
     new VConsole();
   }
-// }
+}
 
 import "@/assets/theme.editor.scss";
 import "@/assets/public.scss";

+ 3 - 0
src/router/index.ts

@@ -15,6 +15,9 @@ export const router = createRouter({
 })
 
 router.beforeEach((next, from) => {
+  if (next?.meta?.title) {
+    document.title = next?.meta?.title
+  }
   if (!isEdit.value || from.name === next.name) {
     return true
   }

+ 25 - 7
src/store/sync.ts

@@ -40,8 +40,9 @@ export const api =
           return true;
         },
         async getFile(url) {
-          console.log(baseURL + url)
-          return baseURL + url.trim();
+          // console.error(url, baseURL)
+          //
+          // return url.includes(baseURL) ? url : (baseURL + url.trim());
 
           if (url.includes(baseURL)) {
             url = url.substring(baseURL.length);
@@ -80,7 +81,7 @@ export const api =
             global.android.getSceneStore(params.m + "/store.json", "getSceneStoreCallback");
           });
         },
-        getFile(fileUrl: string) {
+        async getFile(fileUrl: string) {
           fileUrl = fileUrl.trim();
           if (fileUrl.includes(params.m)) {
             fileUrl = fileUrl.substring(fileUrl.indexOf(params.m) + params.m.length)
@@ -89,8 +90,12 @@ export const api =
           fileUrl = (params.realPath || params.m) + fileUrl
           console.error("处理后url:" + fileUrl)
 
-          if (import.meta.env.DEV) {
-            return new Promise<string>((resolve) => {
+          const paths = fileUrl.split("/")
+          const notBase64 = paths[paths.length - 1].includes(".png") ||
+            paths[paths.length - 1].includes(".jpg")
+
+          if (import.meta.env.DEV || !notBase64) {
+            return await new Promise<string>((resolve) => {
               const apiName = `getImageCallback${count++}`
               global[apiName] = (base64) => {
                 console.error("请求url:" + fileUrl, "返回:" + base64.substring(0, 60))
@@ -100,8 +105,8 @@ export const api =
               global.android.getImage(fileUrl, apiName);
             });
           } else {
-            console.log("请求文件" + fileUrl)
-            return Promise.resolve(fileUrl);
+            console.log("图片文件直接文件系统读取", fileUrl)
+            return fileUrl
           }
         },
         uploadImage(file: File) {
@@ -200,6 +205,19 @@ const syncSceneStore = () => {
   );
 };
 
+if (global.android) {
+  document.documentElement.addEventListener('focusin', ev => {
+    console.log("获得焦点")
+    console.log(ev.target)
+    global.android.inputMethodManager(true);
+  })
+  document.documentElement.addEventListener('focusout', ev => {
+    console.log("失去焦点")
+    console.log(ev.target)
+    global.android.inputMethodManager(false);
+  })
+}
+
 loadStore().catch((e) => {
   console.error(e);
   alert("场景数据加载失败");

+ 1 - 1
src/views/graphic/index.vue

@@ -18,8 +18,8 @@
       />
     </GraphicAction>
     <VectorMenus :menus="focusMenus" v-if="focusMenus" />
-    <Confirm v-if="graphicState.continuedMode" />
     <Component :is="geoComponent as any" v-else-if="geoComponent" :geo="currentVector"/>
+    <Confirm v-if="graphicState.continuedMode" />
   </MainPanel>
 </template>
 

+ 31 - 2
src/views/graphic/menus.ts

@@ -17,6 +17,8 @@ export const UITypeExtend = {
   template: "template",
   measure: "measure",
   road: "__road",
+  image: "__image",
+  line: "__line",
   photo: "photo",
   setup: "setup",
   lineType: "lineType",
@@ -83,10 +85,11 @@ export const measureMenusRaw = [
     disabled: computed(() => graphicState.value.existsBaseLine)
   },
   { key: UIType.BasePoint, text: "基准点", icon: "point", },
-  { key: UIType.NormalLocationMode, text: "自由测量" },
+  { key: UIType.NormalLocationMode, text: "自由测量", icon: "measure_f" },
   {
     key: UIType.AngleLocationMode,
     text: "直角定位法",
+    icon: "measure_r",
     onClick(data) {
       if (graphicState.value.canAllLocationMode) {
         uiType.change(data.key)
@@ -98,6 +101,7 @@ export const measureMenusRaw = [
   {
     key: UIType.AllLocationMode,
     text: "综合定位法",
+    icon: "measure_c",
     onClick(data) {
       if (graphicState.value.canAllLocationMode) {
         uiType.change(data.key)
@@ -126,6 +130,24 @@ export const mainMenusRaw: MenusRaw = [
 ];
 
 if (import.meta.env.DEV) {
+  mainMenusRaw[0] = {
+    key: UITypeExtend.line,
+    text: "画线",
+    icon: "line_d",
+    children: [
+      {
+        key: UIType.Line,
+        text: "直线",
+        icon: "line_d",
+      },
+      {
+        key: UIType.CurveLine,
+        text: "曲线",
+        icon: "line_d",
+      }
+    ]
+  }
+
   mainMenusRaw.unshift(
     { key: UIType.CurveRoad, text: "弯路", icon: "road", }
   )
@@ -143,7 +165,14 @@ if (import.meta.env.DEV) {
       { key: UITypeExtend.structure, text: "道路结构", extend: structureMenusRaw },
       { key: UITypeExtend.template, text: "道路模板", extend: templateMenusRaw },
     ]
-  },)
+  }, {
+    key: UITypeExtend.image,
+    text: "图例",
+    icon: "road",
+    children: [
+      { key: UIType.BusPlane, text: "客车平面图" }
+    ]
+  })
 }
 
 export const photoMenusRaw: MenusRaw = [

+ 3 - 1
src/views/scene/container.vue

@@ -19,6 +19,7 @@ const sceneLayoutRef = ref<HTMLCanvasElement>();
 
 onMounted(async () => {
   console.log(currentApp.basePath);
+  console.log("加载场景数据")
   await useLoading(
     setupLaser({
       sceneSelector: sceneLayoutRef.value,
@@ -27,11 +28,12 @@ onMounted(async () => {
       isDebug: useParams().test,
       getFileUrl: api.getFile,
       webSite: "",
-      axios,
+      axios: null,
       basePath: currentApp.basePath,
     })
   );
 
+  console.log("场景数据加载完成")
   emit('loaded')