Browse Source

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

jinx 2 years ago
parent
commit
3de0364174

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

@@ -1056,7 +1056,6 @@ export default class Draw {
     this.context.scale(width / svgWidth, height / svgHidth);
     const [style, label] = help.setVectorStyle(this.context, vector);
     this.context.lineWidth = style.lineWidth / (width / svgWidth);
-    console.log(style, vector.type)
     SVGIcons[vector.type].draw(this.context, style.fillStyle, style.strokeStyle);
     this.context.restore();
 

+ 1 - 0
src/views/graphic/geos/index.ts

@@ -23,6 +23,7 @@ export default {
   [VectorType.DoubleArrowLine]: Arrow,
   // [VectorCategory.Line.MeasureLine]: Arrow,
   [VectorCategory.Line.NormalLine]: NormalLine,
+  [VectorType.CurveLine]: NormalLine,
   [VectorType.Text]: Text,
   [VectorType.Circle]: Circle,
   [VectorType.Magnifier]: magnifier

+ 18 - 13
src/views/graphic/geos/normalLine.vue

@@ -1,9 +1,9 @@
 <template>
-  <GeoTeleport :menus="menus" class="geo-teleport-use" :active="active"/>
-  <GeoTeleport :menus="childMenus" v-if="childMenus" class="type-geo"/>
+  <GeoTeleport :active="active" :menus="menus" class="geo-teleport-use"/>
+  <GeoTeleport v-if="childMenus" :menus="childMenus" class="type-geo"/>
 </template>
 
-<script setup lang="ts">
+<script lang="ts" setup>
 import GeoTeleport from "@/views/graphic/geos/geo-teleport.vue";
 import {drawRef, FocusVector, VectorType} from '@/hook/useGraphic'
 import {computed, ref, toRaw, UnwrapRef} from "vue";
@@ -49,7 +49,12 @@ const lineTypeMenu = [
     text: "双虚线",
     onClick: clickHandlerFactory(VectorStyle.DoubleDashedLine)
   },
-  {key: VectorStyle.BrokenLine, icon: "line_broken", text: "折线", onClick: clickHandlerFactory(VectorStyle.BrokenLine)},
+  {
+    key: VectorStyle.BrokenLine,
+    icon: "line_broken",
+    text: "折线",
+    onClick: clickHandlerFactory(VectorStyle.BrokenLine)
+  },
   {
     key: VectorStyle.PointDrawLine,
     icon: "line_dot",
@@ -87,24 +92,24 @@ const appendMenus = props.geo.category === VectorCategory.Line.NormalLine
       text: "加控制点",
       onClick: clickHandlerFactory(VectorEvents.AddCrossPoint)
     },
-    {
-      key: VectorEvents.MinusCrossPoint,
-      icon: "control_d",
-      text: "减控制点",
-      onClick: clickHandlerFactory(VectorEvents.MinusCrossPoint)
-    },
+    // {
+    //   key: VectorEvents.MinusCrossPoint,
+    //   icon: "control_d",
+    //   text: "减控制点",
+    //   onClick: clickHandlerFactory(VectorEvents.MinusCrossPoint)
+    // },
   ]
   : []
 const childMenus = ref<UnwrapRef<typeof menus>>()
 const menus = ref([
-  {
+    ...(props.geo.type !== VectorType.CurveLine ? [{
     key: UITypeExtend.lineType,
     text: "单实线",
     icon: "line",
     onClick() {
       childMenus.value = toRaw(childMenus.value) === lineTypeMenu ? null : lineTypeMenu
     }
-  },
+  }] : []),
   vector.value?.weight === VectorWeight.Bold ? lineWidthMenu[0] : lineWidthMenu[1],
   ...appendMenus,
   {
@@ -132,7 +137,7 @@ const active = computed(() =>
 
 </script>
 
-<style scoped lang="scss">
+<style lang="scss" scoped>
 .color {
   width: 18px;
   height: 18px;