浏览代码

修正问题

bill 2 年之前
父节点
当前提交
472846f1e9

文件差异内容过多而无法显示
+ 140 - 140
src/graphic/CanvasStyle/ImageLabels/SVGIcons.js


+ 6 - 4
src/graphic/Renderer/Draw.js

@@ -1096,9 +1096,11 @@ export default class Draw {
     this.context.translate(points[0].x, points[0].y);
     this.context.rotate(angle);
     this.context.scale(width / svgWidth, height / svgHidth);
-    const [style, label] = help.setVectorStyle(this.context, vector);
+    const [style, label] = help.getVectorStyle(vector);
     this.context.lineWidth = style.lineWidth / (width / svgWidth);
-    SVGIcons[vector.type].draw(this.context, style.fillStyle, style.strokeStyle);
+    this.context.fillStyle = 'rgba(0,0,0,0)'
+    this.context.strokeStyle = 'rgba(0,0,0,0)'
+    SVGIcons[vector.type].draw(this.context, style.fillStyle || 'rgba(0,0,0,0)', style.strokeStyle || 'rgba(0,0,0,0)');
     this.context.restore();
 
     if (label) {
@@ -1200,9 +1202,9 @@ export default class Draw {
     });
     ctx.restore();
 
-    if (import.meta.env.DEV) {
+    // if (import.meta.env.DEV) {
       vector.points.forEach(this.drawPoint.bind(this));
-    }
+    // }
   }
 
   drawLine(vector) {

+ 1 - 1
src/store/sync.ts

@@ -205,7 +205,7 @@ export const api =
       };
 
 export const back = () => {
-  router.back()
+  api.closePage()
 };
 
 const loadStore = async () => {

+ 2 - 2
src/views/graphic/geos/del.vue

@@ -15,8 +15,8 @@ import VectorCategory from "@/graphic/enum/VectorCategory";
 const props = defineProps<{geo: FocusVector}>()
 const hideTypes = [
   VectorType.CrossPoint,
-  VectorType.RoadPoint,
-  VectorType.CurveRoadPoint,
+  // VectorType.RoadPoint,
+  // VectorType.CurveRoadPoint,
   VectorCategory.Point.NormalPoint
 ]
 console.log(props)

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

@@ -1,7 +1,7 @@
 <template>
   <div v-if="data" class="graphic-header">
     <div class="title">
-      <ui-icon class="head-icon" type="return" @click="back"/>
+      <ui-icon class="head-icon" type="return" @click="router.back"/>
       <p>{{ isRoad ? '现场绘图' : '事故照片' }}</p>
     </div>
     <div class="actions">

+ 5 - 1
src/views/scene/TrackMeasure.vue

@@ -4,7 +4,7 @@
         class="item fun-ctrl"
         :size="80"
         :class="{disabled: !tempMeasures.length}"
-        @click="onConfirm(tempMeasures[0] as any)"
+        @click="callback"
     >
       <ui-icon type="affirm" class="icon" />
     </ButtonPane>
@@ -22,6 +22,10 @@ import {tempMeasures} from "@/store/measure";
 
 const props = defineProps<{ onConfirm: (data: SuccessMeasureAtom) => void }>()
 const active = ref(true)
+const callback = () => {4
+  props.onConfirm(tempMeasures.value[0] as any)
+  tempMeasures.value = []
+}
 watchEffect(() => {
   if (active.value) {
     tempMeasures.value = []