浏览代码

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

xushiting 2 年之前
父节点
当前提交
96fda3f82e

文件差异内容过多而无法显示
+ 1 - 1
server/test/a0k4xu045_202305311600080410/attach/sceneStore


+ 17 - 3
src/graphic/Controls/UIControl.js

@@ -5,6 +5,7 @@ import RoadTemplate from '../enum/RoadTemplate.js';
 import RoadStructure from '../enum/RoadStructure.js';
 import RoadStructure from '../enum/RoadStructure.js';
 import VectorType from '../enum/VectorType.js';
 import VectorType from '../enum/VectorType.js';
 import VectorStyle from '../enum/VectorStyle.js';
 import VectorStyle from '../enum/VectorStyle.js';
+import VectorWeight from '../enum/VectorWeight.js';
 import GeoActions from '../enum/GeoActions.js';
 import GeoActions from '../enum/GeoActions.js';
 import VectorEvents from '../enum/VectorEvents.js';
 import VectorEvents from '../enum/VectorEvents.js';
 import SVGType from '../enum/SVGType.js';
 import SVGType from '../enum/SVGType.js';
@@ -122,6 +123,7 @@ export default class UIControl {
   updateVectorForSelectUI(selectUI) {
   updateVectorForSelectUI(selectUI) {
     console.log('selectUI', selectUI);
     console.log('selectUI', selectUI);
     const focusItem = stateService.getFocusItem();
     const focusItem = stateService.getFocusItem();
+
     // if (selectUI == VectorStyle.Bold || selectUI == VectorStyle.Thinning) {
     // if (selectUI == VectorStyle.Bold || selectUI == VectorStyle.Thinning) {
     //   if (focusItem.type == VectorType.Line) {
     //   if (focusItem.type == VectorType.Line) {
     //     let Line = dataService.getLine(focusItem.vectorId);
     //     let Line = dataService.getLine(focusItem.vectorId);
@@ -140,16 +142,27 @@ export default class UIControl {
     // }
     // }
     // else
     // else
     if (uiService.isBelongRoadEdgeStyle(selectUI)) {
     if (uiService.isBelongRoadEdgeStyle(selectUI)) {
+      let key = null;
+      if (VectorStyle[selectUI]) {
+        key = 'setStyle';
+      } else if (VectorWeight[selectUI]) {
+        key = 'setWeight';
+      }
+      console.log(key);
+
       if (focusItem.type == VectorType.Line) {
       if (focusItem.type == VectorType.Line) {
         let Line = dataService.getLine(focusItem.vectorId);
         let Line = dataService.getLine(focusItem.vectorId);
-        Line.setStyle(selectUI);
+        // Line.setStyle(selectUI);
+        Line[key](selectUI);
       } else {
       } else {
         let roadEdge = dataService.getRoadEdge(focusItem.vectorId);
         let roadEdge = dataService.getRoadEdge(focusItem.vectorId);
         if (roadEdge) {
         if (roadEdge) {
-          roadEdge.setStyle(selectUI);
+          // roadEdge.setStyle(selectUI);
+          roadEdge[key](selectUI);
         } else {
         } else {
           roadEdge = dataService.getCurveRoadEdge(focusItem.vectorId);
           roadEdge = dataService.getCurveRoadEdge(focusItem.vectorId);
-          roadEdge.setStyle(selectUI);
+          // roadEdge.setStyle(selectUI);
+          roadEdge[key](selectUI);
         }
         }
       }
       }
 
 
@@ -529,6 +542,7 @@ export default class UIControl {
     uiService.setSingleLaneWidth(setting.singleRoadWidth / coordinate.res);
     uiService.setSingleLaneWidth(setting.singleRoadWidth / coordinate.res);
     // uiService.setLineWidth(setting.lineWidth / 1000 / coordinate.res);
     // uiService.setLineWidth(setting.lineWidth / 1000 / coordinate.res);
     uiService.setLineWidth(setting.lineWidth);
     uiService.setLineWidth(setting.lineWidth);
+    this.layer.renderer.autoRedraw();
   }
   }
 
 
   // 获取默认设置
   // 获取默认设置

+ 7 - 0
src/graphic/Geometry/Geometry.js

@@ -107,6 +107,13 @@ export default class Geometry {
   setStyle(style) {
   setStyle(style) {
     this.style = style;
     this.style = style;
   }
   }
+  getStyle() {
+    return this.weight;
+  }
+
+  setWeight(weight) {
+    this.weight = weight;
+  }
 
 
   getType() {
   getType() {
     return this.type;
     return this.type;

+ 3 - 0
src/graphic/Load.js

@@ -88,6 +88,9 @@ export default class Load {
           if (dataLocal.lines[key].value) {
           if (dataLocal.lines[key].value) {
             line.setValue(dataLocal.lines[key].value);
             line.setValue(dataLocal.lines[key].value);
           }
           }
+          if (dataLocal.lines[key].locationMode) {
+            line.setLocationMode(dataLocal.lines[key].locationMode);
+          }
           line.setDisplay(dataLocal.lines[key].display);
           line.setDisplay(dataLocal.lines[key].display);
           if (line.getCategory() == VectorCategory.Line.BaseLine) {
           if (line.getCategory() == VectorCategory.Line.BaseLine) {
             Settings.baseLineId = key;
             Settings.baseLineId = key;

+ 3 - 2
src/graphic/Service/UIService.js

@@ -7,6 +7,7 @@ import UIEvents from "../enum/UIEvents.js";
 import VectorCategory from "../enum/VectorCategory.js";
 import VectorCategory from "../enum/VectorCategory.js";
 import Constant from "../Constant.js";
 import Constant from "../Constant.js";
 import VectorStyle from "../enum/VectorStyle.js";
 import VectorStyle from "../enum/VectorStyle.js";
+import VectorWeight from "../enum/VectorWeight.js";
 import RoadTemplate from "../enum/RoadTemplate.js";
 import RoadTemplate from "../enum/RoadTemplate.js";
 import RoadStructure from "../enum/RoadStructure.js";
 import RoadStructure from "../enum/RoadStructure.js";
 
 
@@ -122,9 +123,9 @@ export default class UIService {
       return true;
       return true;
     } else if (ui == VectorStyle.Greenbelt) {
     } else if (ui == VectorStyle.Greenbelt) {
       return true;
       return true;
-    } else if (ui == VectorStyle.Bold) {
+    } else if (ui == VectorWeight.Bold) {
       return true;
       return true;
-    } else if (ui == VectorStyle.Thinning) {
+    } else if (ui == VectorWeight.Thinning) {
       return true;
       return true;
     } else {
     } else {
       return false;
       return false;

+ 3 - 3
src/graphic/enum/VectorStyle.js

@@ -15,8 +15,8 @@ const VectorStyle = {
   // 绿化带
   // 绿化带
   Greenbelt: "Greenbelt",
   Greenbelt: "Greenbelt",
   // 加粗
   // 加粗
-  Bold: "Bold",
-  // 变细
-  Thinning: "Thinning",
+  // Bold: "Bold",
+  // // 变细
+  // Thinning: "Thinning",
 };
 };
 export default VectorStyle;
 export default VectorStyle;

+ 8 - 0
src/graphic/enum/VectorWeight.js

@@ -0,0 +1,8 @@
+import UIEvents from './UIEvents';
+const VectorWight = {
+  // 加粗
+  Bold: 'Bold',
+  // 变细
+  Thinning: 'Thinning',
+};
+export default VectorWight;

+ 3 - 2
src/views/graphic/geos/normalLine.vue

@@ -12,6 +12,7 @@ import GeoActions from "@/graphic/enum/GeoActions"
 import {UITypeExtend} from "@/views/graphic/menus";
 import {UITypeExtend} from "@/views/graphic/menus";
 import VectorEvents from "@/graphic/enum/VectorEvents";
 import VectorEvents from "@/graphic/enum/VectorEvents";
 import VectorStyle from "@/graphic/enum/VectorStyle";
 import VectorStyle from "@/graphic/enum/VectorStyle";
+import VectorWeight from "@/graphic/enum/VectorWeight";
 import VectorCategory from "@/graphic/enum/VectorCategory";
 import VectorCategory from "@/graphic/enum/VectorCategory";
 
 
 
 
@@ -58,8 +59,8 @@ const lineTypeMenu = [
   {key: VectorStyle.Greenbelt, icon: "treelawn", text: "绿化带 ", onClick: clickHandlerFactory(VectorStyle.Greenbelt)},
   {key: VectorStyle.Greenbelt, icon: "treelawn", text: "绿化带 ", onClick: clickHandlerFactory(VectorStyle.Greenbelt)},
 ]
 ]
 const lineWidthMenu = [
 const lineWidthMenu = [
-  {key: VectorStyle.Bold, icon: 'l_thick', text: "粗", onClick: clickHandlerFactory(VectorStyle.Bold)},
-  {key: VectorStyle.Thinning, icon: 'l_thin', text: "细", onClick: clickHandlerFactory(VectorStyle.Thinning)},
+  {key: VectorWeight.Bold, icon: 'l_thick', text: "粗", onClick: clickHandlerFactory(VectorWeight.Bold)},
+  {key: VectorWeight.Thinning, icon: 'l_thin', text: "细", onClick: clickHandlerFactory(VectorWeight.Thinning)},
 ]
 ]
 
 
 const appendMenus = props.geo.category === VectorCategory.Line.NormalLine
 const appendMenus = props.geo.category === VectorCategory.Line.NormalLine

+ 5 - 4
src/views/graphic/geos/roadEdge.vue

@@ -12,6 +12,7 @@ import GeoActions from "@/graphic/enum/GeoActions"
 import {UITypeExtend} from "@/views/graphic/menus";
 import {UITypeExtend} from "@/views/graphic/menus";
 import VectorEvents from "@/graphic/enum/VectorEvents";
 import VectorEvents from "@/graphic/enum/VectorEvents";
 import VectorStyle from "@/graphic/enum/VectorStyle";
 import VectorStyle from "@/graphic/enum/VectorStyle";
+import VectorWeight from "@/graphic/enum/VectorWeight";
 
 
 
 
 const props = defineProps<{ geo: FocusVector }>()
 const props = defineProps<{ geo: FocusVector }>()
@@ -58,20 +59,20 @@ const lineTypeMenu = [
 ]
 ]
 const lineWidthMenu = [
 const lineWidthMenu = [
   {
   {
-    key: VectorStyle.Bold,
+    key: VectorWeight.Bold,
     icon: 'l_thick',
     icon: 'l_thick',
     text: "宽度",
     text: "宽度",
     onClick: () => {
     onClick: () => {
-      clickHandlerFactory(VectorStyle.Bold)()
+      clickHandlerFactory(VectorWeight.Bold)()
       menus.value[1] = lineWidthMenu[1]
       menus.value[1] = lineWidthMenu[1]
     }
     }
   },
   },
   {
   {
-    key: VectorStyle.Thinning,
+    key: VectorWeight.Thinning,
     icon: 'l_thin',
     icon: 'l_thin',
     text: "宽度",
     text: "宽度",
     onClick: () => {
     onClick: () => {
-      clickHandlerFactory(VectorStyle.Thinning)()
+      clickHandlerFactory(VectorWeight.Thinning)()
       menus.value[1] = lineWidthMenu[0]
       menus.value[1] = lineWidthMenu[0]
     }
     }
   },
   },