Browse Source

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

jinx 2 years ago
parent
commit
9fff1ee588

File diff suppressed because it is too large
+ 1 - 1
server/test/a0k4xu045_202305311600080410/attach/sceneStore


+ 4 - 1
src/graphic/Controls/MoveCircle.js

@@ -12,7 +12,10 @@ export default class MoveCircle {
     let circle = dataService.getCircle(circleId);
     let circle = dataService.getCircle(circleId);
     circle.center.x += dx;
     circle.center.x += dx;
     circle.center.y += dy;
     circle.center.y += dy;
-    circle.createPoints();
+    for (let i = 0; i < circle.points.length; ++i) {
+      circle.points[i].x += dx;
+      circle.points[i].y += dy;
+    }
   }
   }
 
 
   movePoint(position, circleId, pointIndex) {
   movePoint(position, circleId, pointIndex) {

+ 35 - 19
src/graphic/ListenLayer.js

@@ -361,18 +361,34 @@ export default class ListenLayer {
           return circleInfo;
           return circleInfo;
         }
         }
       }
       }
-      distance = this.getDistance(position, circle.center);
-      if (distance < circle.radius) {
-        if (circleInfo.circleId == null || distance < circleInfo.distance) {
-          circleInfo = {
-            circleId: circleId,
-            type: VectorType.Circle,
-            distance: distance,
-            x: circle.center.x,
-            y: circle.center.y,
-            index: -1,
-          };
-        }
+
+      // distance = this.getDistance(position, circle.center);
+      // if (distance < circle.radius) {
+      //   if (circleInfo.circleId == null || distance < circleInfo.distance) {
+      //     circleInfo = {
+      //       circleId: circleId,
+      //       type: VectorType.Circle,
+      //       distance: distance,
+      //       x: circle.center.x,
+      //       y: circle.center.y,
+      //       index: -1,
+      //     };
+      //   }
+      // }
+      const flag = mathUtil.isPointInElliptic(
+        position,
+        circle.center,
+        circle.radiusX,
+        circle.radiusY
+      );
+      if (flag) {
+        circleInfo = {
+          circleId: circleId,
+          type: VectorType.Circle,
+          x: circle.center.x,
+          y: circle.center.y,
+          index: -1,
+        };
       }
       }
     }
     }
 
 
@@ -1215,14 +1231,14 @@ export default class ListenLayer {
       );
       );
     } else if (this.modifyPoint.magnifierId) {
     } else if (this.modifyPoint.magnifierId) {
       // if (this.modifyPoint.index == 0) {
       // if (this.modifyPoint.index == 0) {
-        //点击隐藏的放大镜不显示
-        stateService.setSelectItem(
-          this.modifyPoint.magnifierId,
-          VectorType.Magnifier,
-          this.modifyPoint.index
-        );
+      //点击隐藏的放大镜不显示
+      stateService.setSelectItem(
+        this.modifyPoint.magnifierId,
+        VectorType.Magnifier,
+        this.modifyPoint.index
+      );
       // } else {
       // } else {
-        stateService.setSelectState(this.modifyPoint.index);
+      stateService.setSelectState(this.modifyPoint.index);
       // }
       // }
     } else if (this.modifyPoint.linkedEdgeId) {
     } else if (this.modifyPoint.linkedEdgeId) {
       stateService.setSelectItem(
       stateService.setSelectItem(

+ 2 - 1
src/graphic/Renderer/Draw.js

@@ -719,7 +719,7 @@ export default class Draw {
     ctx.restore();
     ctx.restore();
 
 
     if (import.meta.env.DEV) {
     if (import.meta.env.DEV) {
-      vector.points.forEach(this.drawPoint.bind(this));
+      // vector.points.forEach(this.drawPoint.bind(this));
     }
     }
   }
   }
 
 
@@ -881,6 +881,7 @@ export default class Draw {
   }
   }
 
 
   drawCircle(element) {
   drawCircle(element) {
+    console.log(element)
     this.drawElliptic(element, element.radiusX, element.radiusY)
     this.drawElliptic(element, element.radiusX, element.radiusY)
 
 
     const [_, label] = help.getVectorStyle(element);
     const [_, label] = help.getVectorStyle(element);

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

@@ -40,7 +40,7 @@
           </Photos>
           </Photos>
         </div>
         </div>
       </template>
       </template>
-      <undata undata-msg="无照片。请点击右上角按钮标注照片。" />
+      <undata v-else undata-msg="无照片。请点击右上角按钮标注照片。" />
     </div>
     </div>
 
 
     <ActionMenus class="select-menus" :menus="selectMenus" dire="row" v-if="selects.length" />
     <ActionMenus class="select-menus" :menus="selectMenus" dire="row" v-if="selects.length" />

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

@@ -1,13 +1,24 @@
 <template>
 <template>
-  <GeoTeleport :menus="menus" class="geo-teleport-use" v-if="geo.type !== VectorType.CurveRoadPoint" />
+  <GeoTeleport
+      :menus="menus"
+      class="geo-teleport-use"
+      v-if="!hideTypes.includes(geo.type) && !hideTypes.includes(geo.category)"
+  />
 </template>
 </template>
 
 
 <script setup lang="ts">
 <script setup lang="ts">
 import GeoTeleport from "@/views/graphic/geos/geo-teleport.vue";
 import GeoTeleport from "@/views/graphic/geos/geo-teleport.vue";
 import {drawRef, FocusVector, VectorType} from '@/hook/useGraphic'
 import {drawRef, FocusVector, VectorType} from '@/hook/useGraphic'
 import GeoActions from "@/graphic/enum/GeoActions"
 import GeoActions from "@/graphic/enum/GeoActions"
+import VectorCategory from "@/graphic/enum/VectorCategory";
 
 
 const props = defineProps<{geo: FocusVector}>()
 const props = defineProps<{geo: FocusVector}>()
+const hideTypes = [
+  VectorType.RoadPoint,
+  VectorType.CurveRoadPoint,
+  VectorCategory.Point.NormalPoint
+]
+console.log(props)
 const menus = [
 const menus = [
   {
   {
     key: 'del',
     key: 'del',