Browse Source

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

# Conflicts:
#	src/graphic/Renderer/Draw.js
xushiting 2 years ago
parent
commit
8d9d0c286a

+ 1 - 0
src/components/base/assets/scss/editor/_menu.scss

@@ -30,6 +30,7 @@
 
         &.bottom {
             margin-top: auto;
+            margin-bottom: calc(var(--boundMargin) - 8px);
         }
     }
 }

+ 16 - 3
src/components/group-button/index.vue

@@ -78,10 +78,20 @@ const menuStyle = computed(() => {
   transition: color .3s ease;
   color: #fff;
   border-radius: 4px;
+  align-items: center;
+  justify-content: center;
 
   &.border {
-  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
-}
+    position: relative;
+    &:after {
+      content: "";
+      position: absolute;
+      border-bottom: 1px solid rgba(255, 255, 255, 0.2);
+      left: 10px;
+      right: 10px;
+      bottom: 0;
+    }
+  }
 
   &.active {
     color: var(--colors-primary-base);
@@ -96,10 +106,13 @@ const menuStyle = computed(() => {
     align-items: center;
     justify-content: center;
     font-size: 20px;
-    flex: 1;
+
   }
 
   p {
+    flex: 1;
+    flex: none;
+    margin-top: 4px;
     line-height: 17px;
     font-size: 14px;
     white-space:nowrap;

File diff suppressed because it is too large
+ 545 - 546
src/graphic/CanvasStyle/ImageLabels/SVGIcons.js


+ 1 - 1
src/graphic/CanvasStyle/select.js

@@ -105,7 +105,7 @@ const TestPoint = {
 };
 
 const SVG = {
-  fillStyle: "rgba(0,0,0,0)",
+  fillStyle: "#3290FF",
   strokeStyle: "#3290FF",
   lineWidth: 2 * coordinate.ratio,
 };

+ 3 - 2
src/graphic/Controls/MoveMagnifier.js

@@ -7,10 +7,11 @@ export default class MoveMagnifier {
   moveFullMagnifier(position, magnifierId, index) {
     let magnifier = dataService.getMagnifier(magnifierId);
     //移动放大镜清除图片信息
-    magnifier.setPhotoUrl(null)
-    magnifier.setPhotoImg(null)
+
     if (index == 0) {
       magnifier.setPosition(position);
+      magnifier.setPhotoUrl(null)
+      magnifier.setPhotoImg(null)
     } else {
       const popPosition = coordinate.getScreenXY(position);
       magnifier.popPosition = {

+ 8 - 2
src/graphic/Controls/UIControl.js

@@ -535,7 +535,7 @@ export default class UIControl {
     this.layer.renderer.autoRedraw();
   }
 
-  menu_clear() {
+  menu_clear(isBack) {
     dataService.clear();
     Settings.selectLocationMode = null;
     Settings.baseLineId = null;
@@ -543,7 +543,13 @@ export default class UIControl {
     elementService.hideAll();
     this.layer.exit();
     this.layer.initLocation();
-    this.layer.history.save();
+    if(!isBack){
+      this.layer.history.save();
+    }else{
+      historyService.clearHistoryRecord()
+      this.layer.uiControl.graphicStateUI.canRevoke = false;
+      this.layer.uiControl.graphicStateUI.canRecovery = false;
+    }
     this.layer.renderer.autoRedraw();
   }
 

+ 0 - 1
src/graphic/History/History.js

@@ -48,7 +48,6 @@ export default class History {
       pre: 0,
       next: 0,
     };
-
     const currentRecordIndex = historyService.getCurrentRecordIndex();
     const records = historyService.getHistoryRecords();
 

+ 9 - 0
src/graphic/ListenLayer.js

@@ -13,6 +13,7 @@ import { edgeService } from "./Service/EdgeService";
 import VectorCategory from "./enum/VectorCategory";
 import LayerEvents from "./enum/LayerEvents";
 import Style from "./CanvasStyle";
+import Settings from "./Settings";
 export default class ListenLayer {
   constructor(canvas, newsletter, graphicState) {
     this.modifyPoint = null;
@@ -226,9 +227,11 @@ export default class ListenLayer {
         continue;
       }
       const point = dataService.getPoint(pointId);
+  
       if (point.getCategory() == VectorCategory.Point.TestBasePoint) {
         continue;
       }
+   
       const distance = this.getDistance(position, point);
       if (distance < Constant.minAdsorbPix) {
         if (pointInfo.pointId == null) {
@@ -263,6 +266,10 @@ export default class ListenLayer {
       const linkedPoint = dataService.getPoint(pointInfo.pointId);
       pointInfo.x = linkedPoint.x;
       pointInfo.y = linkedPoint.y;
+      //判断当时基准点则要高亮
+      if(linkedPoint.getCategory() ==VectorCategory.Point.BasePoint ){
+        Settings.selectBasePointId = linkedPoint.vectorId
+      }
     } else {
       if (seqInfo.hasOwnProperty("linkedPointIdX")) {
         pointInfo.linkedPointIdX = seqInfo.linkedPointIdX;
@@ -279,6 +286,8 @@ export default class ListenLayer {
         pointInfo.y = position.y;
       }
     }
+
+
     return pointInfo;
   }
 

+ 7 - 4
src/graphic/Load.js

@@ -14,6 +14,7 @@ import { magnifierService } from "./Service/MagnifierService.js";
 import { textService } from "./Service/TextService.js";
 import { svgService } from "./Service/SVGService.js";
 import { mathUtil } from "./Util/MathUtil.js";
+import { historyService } from "./Service/HistoryService.js";
 
 export default class Load {
   constructor(layer) {
@@ -82,7 +83,7 @@ export default class Load {
           point.setLinkedBasePointId(dataLocal.points[key].linkedBasePointId);
           point.setLinkedTestPointId(dataLocal.points[key].linkedTestPointId);
         }
-    
+
         // let points = dataService.vectorData.points;
         let points = dataLocal.points;
         Settings.basePointIds =[]
@@ -107,7 +108,7 @@ export default class Load {
           svg.setPoints(dataLocal.svgs[key].points);
         }
       }
-   
+
       if (dataLocal.lines) {
         for (let key in dataLocal.lines) {
           let line = lineService.createByPointId(
@@ -139,7 +140,7 @@ export default class Load {
         }
       }
       if(dataLocal.roadPoints){
-        
+
         for (let key in dataLocal.roadPoints) {
           let roadPoint = roadPointService.create(
             dataLocal.roadPoints[key],
@@ -280,6 +281,7 @@ export default class Load {
       this.layer.updateForLocation();
     }
     this.layer.history.init();
+
     this.layer.renderer.autoRedraw();
   }
 
@@ -301,7 +303,8 @@ export default class Load {
 
   // 退出页面清除缓存及其他操作
   clear() {
-    this.layer.uiControl.menu_clear();
+    console.error("clear")
+    this.layer.uiControl.menu_clear(true);
     console.warn("clear");
   }
 }

+ 7 - 3
src/graphic/Renderer/Draw.js

@@ -661,9 +661,14 @@ export default class Draw {
     if (vector.display && vector.midDivide) {
       midCovesArray = help.transformCoves([
         vector.midDivide.leftMidDivideCurves,
-        vector.midDivide.rightMidDivideCurves,
+        // vector.midDivide.rightMidDivideCurves,
       ]);
+<<<<<<< HEAD
       ctx.lineWidth *= Settings.lineWidth;
+=======
+      ctx.setLineDash([8 * coordinate.ratio, 8 * coordinate.ratio])
+      ctx.lineWidth *= Settings.lineWidth
+>>>>>>> 5ae8d1ce2015e939e02a33e021a2519d33b04481
       for (let coves of midCovesArray) {
         help.drawCoves(ctx, coves);
       }
@@ -1090,14 +1095,13 @@ export default class Draw {
     const dires = [points[0], { ...points[0], x: 10000 }, points[1]];
     let angle = mathUtil.Angle(...dires) * (Math.PI / 180);
     angle = mathUtil.isClockwise(dires) ? angle : -angle;
-    //console.log(angle)
     this.context.save();
     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);
     this.context.lineWidth = style.lineWidth / (width / svgWidth);
-    SVGIcons[vector.type].draw(this.context);
+    SVGIcons[vector.type].draw(this.context, style.fillStyle, style.strokeStyle);
     this.context.restore();
 
     if (label) {

+ 1 - 0
src/graphic/Service/HistoryService.js

@@ -49,6 +49,7 @@ export class HistoryService {
     }
 
     setHistoryState(pre, next) {
+       
         this.history.state.pre = pre
         this.history.state.next = next
     }

+ 4 - 0
src/hook/custom/preset.ts

@@ -2,6 +2,7 @@ import { Mode, PointInfo, Pos } from "@/sdk/types";
 import { stackFactory, Stack, fastStacksValue, os } from "@/utils/vue";
 import { Ref, ref } from "vue";
 import {FixPoint} from "@/store/fixPoint";
+import {BasePoint} from "@/store/basePoint";
 
 export enum DisabledCom {
   Search = "search",
@@ -79,6 +80,7 @@ export enum CustomCom {
   MagnifierMode = "magnifier",
   CustomMouseMenu = "cMoseMenu",
   ActiveFixPoint = "activeFixPoint",
+  ActiveBasePoint = "activeBasePoint",
   ResidenMouseMenu = "rMouseMenu",
   CarryView = "carryView",
   SysView = "sysView",
@@ -126,12 +128,14 @@ export const boxWidthStack = stackFactory(
 export const autoSysViewLeftStack = stackFactory(ref<string>("70px"));
 export const controlFullStack = stackFactory(ref<boolean>(false));
 export const activeFixPointStack = stackFactory(ref<FixPoint>());
+export const activeBasePointStack = stackFactory(ref<BasePoint>());
 
 export const customMapStack = {
   [CustomCom.LaserMode]: laserModeStack,
   [CustomCom.FullView]: fullViewStack,
   [CustomCom.SpiltView]: spiltViewModeStack,
   [CustomCom.ActiveFixPoint]: activeFixPointStack,
+  [CustomCom.ActiveBasePoint]: activeBasePointStack,
   [CustomCom.MagnifierMode]: magnifierModeStack,
   [CustomCom.ResidenMouseMenu]: residenMouseMenuStack,
   [CustomCom.CustomMouseMenu]: customMouseMenuStack,

+ 1 - 1
src/store/sync.ts

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

+ 4 - 0
src/views/accidents/index.vue

@@ -67,6 +67,7 @@ import Header from "@/components/photos/header.vue";
 import {useConfirm} from "@/hook";
 import Undata from "@/components/photos/undata.vue";
 import {api} from "@/store/sync";
+import {photos} from "@/store/photos";
 
 const sortPhotos = computed(() => {
   const photos = [...accidentPhotos.value]
@@ -160,6 +161,9 @@ const delSelects = async () => {
       delPhotoRaw(selects.value[0])
       selects.value.shift()
     }
+    if (!sortPhotos.value.length) {
+      selectMode.value = false
+    }
   }
 }
 const gotoDraw = () => {

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

@@ -7,7 +7,7 @@
       </template>
     </template>
   </GeoTeleport>
-  <GeoTeleport :menus="typeMenus" v-if="typeMenus" class="type-geo" />
+  <GeoTeleport :menus="typeMenus" v-if="typeMenus" class="type-geo" :active="typeMenus.find(menu => menu.key === type)" />
 </template>
 
 <script setup lang="ts">
@@ -25,10 +25,9 @@ const props = defineProps<{geo: FocusVector}>()
 const vector = computed(() => dataService.getLine(props.geo.vectorId))
 const color = ref("#000000")
 const type = ref(props.geo.category || "SingleArrowLine")
-console.log(type.value)
 useChange(() => {
   color.value = vector.value.color
-  color.value = vector.value.category
+  type.value = vector.value.category
 })
 
 
@@ -57,13 +56,13 @@ const menus = ref([
       typeMenus.value = !typeMenus.value
         ? [
           {
-            key: 'color',
+            key: 'SingleArrowLine',
             icon: 'arrows_s',
             text: "单向",
             onClick: () => type.value = "SingleArrowLine"
           },
           {
-            key: 'color',
+            key: 'DoubleArrowLine',
             icon: 'arrows_d',
             text: "双向",
             onClick: () => type.value = "DoubleArrowLine"

+ 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

+ 8 - 3
src/views/graphic/geos/magnifier.vue

@@ -9,7 +9,7 @@ import UiInput from "@/components/base/components/input/index.vue";
 import UiIcon from "@/components/base/components/icon/index.vue";
 import {uploadImage} from '@/store/sync'
 import {drawRef, FocusVector, uiType, UIType} from '@/hook/useGraphic'
-import {computed, ref, UnwrapRef, watch} from "vue";
+import {computed, reactive, ref, UnwrapRef, watch} from "vue";
 import {dataService} from "@/graphic/Service/DataService";
 import {api} from "@/store/sync";
 import GeoActions from "@/graphic/enum/GeoActions";
@@ -17,7 +17,8 @@ import GeoActions from "@/graphic/enum/GeoActions";
 const props = defineProps<{geo: FocusVector}>()
 const vector = computed(() => dataService.getMagnifier(props.geo.vectorId))
 const typeMenus = ref<UnwrapRef<typeof menus>>()
-const menus = [
+console.log(vector.value)
+const menus = reactive([
   {
     key: 'file',
     text: "拍照",
@@ -49,6 +50,7 @@ const menus = [
     key: 'reset',
     icon: "recover",
     text: "恢复默认",
+    disabled: !vector.value.photoUrl,
     onClick: () => syncVector(null)
   },
   {
@@ -59,7 +61,7 @@ const menus = [
       drawRef.value.uiControl.handleGeo(GeoActions.DeleteAction)
     }
   }
-]
+])
 const syncVector = (url: string) => {
   vector.value.setSrc(url)
   vector.value.setImageData()
@@ -67,6 +69,9 @@ const syncVector = (url: string) => {
       drawRef.value.renderer.autoRedraw()
       drawRef.value.history.save()
     })
+
+
+  menus[1].disabled = !vector.value.photoUrl
 }
 
 </script>

+ 19 - 14
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",
@@ -79,7 +84,7 @@ const lineWidthMenu = [
   },
 ]
 
-const appendMenus = props.geo.category === VectorCategory.Line.NormalLine
+const appendMenus = (props.geo.category === VectorCategory.Line.NormalLine || props.geo.type === VectorType.CurveLine)
   ? [
     {
       key: VectorEvents.AddCrossPoint,
@@ -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;

+ 3 - 0
src/views/photos/index.vue

@@ -162,6 +162,9 @@ const delSelects = async () => {
       delPhotoRaw(selects.value[0])
       selects.value.shift()
     }
+    if (!sortPhotos.value.length) {
+      selectMode.value = false
+    }
   }
 }
 

+ 4 - 0
src/views/roads/index.vue

@@ -67,6 +67,7 @@ import ButtonPane from "@/components/button-pane/index.vue";
 import UiIcon from "@/components/base/components/icon/index.vue";
 import {useConfirm} from "@/hook";
 import {api} from "@/store/sync";
+import {photos} from "@/store/photos";
 
 
 const sortPhotos = computed(() => [...roadPhotos.value].reverse())
@@ -134,6 +135,9 @@ const delSelects = async () => {
       delPhotoRaw(selects.value[0])
       selects.value.shift()
     }
+    if (!sortPhotos.value.length) {
+      selectMode.value = false
+    }
   }
 }
 

+ 8 - 8
src/views/scene/covers/basePoints.vue

@@ -4,15 +4,15 @@
     :key="point.id"
     :pos="point.pos"
     @change-pos="pos => point.pos = pos"
-    :active="active === point"
-    @blur="() => active = active === point ? null : active"
-    @focus="() => active = point"
+    :active="customMap.activeBasePoint === point"
+    @blur="() => customMap.activeBasePoint = customMap.activeBasePoint === point ? null : customMap.activeBasePoint"
+    @focus="() => customMap.activeBasePoint = point"
   />
 
 <!--  <ActionsPanel :menus="activeActionMenus" v-if="active" />-->
   <div ref="menu" @touchstart.stop class="action-menus">
     <ActionMenus
-        v-if="active"
+        v-if="customMap.activeBasePoint"
         :menus="activeActionMenus"
         dire="row"
     />
@@ -28,7 +28,6 @@ import ActionsPanel from "@/views/scene/covers/actions.vue";
 import {customMap} from "@/hook";
 import ActionMenus from "@/components/group-button/index.vue";
 
-const active = ref<BasePoint>()
 const activeActionMenus = [
   {
     key: "delete",
@@ -36,11 +35,12 @@ const activeActionMenus = [
     text: "删除",
     color: "#FF4D4F",
     iconColor: "#fff",
-    action() {
-      const index = basePoints.value.indexOf(active.value)
+    onClick() {
+      const index = basePoints.value.indexOf(customMap.activeBasePoint)
+      console.log(index)
       if (~index) {
         basePoints.value.splice(index, 1)
-        active.value = null
+        customMap.activeBasePoint = null
       }
     }
   }

+ 1 - 1
src/views/scene/covers/fixPoints.vue

@@ -73,7 +73,7 @@ const activeActionMenus = [
     color: "#161A1A",
     iconColor: "#2F8FFF",
     onClick() {
-      edit.value = customMap.activeFixPoint
+      edit.value = edit.value === customMap.activeFixPoint ? null : customMap.activeFixPoint
     }
   },
   {

+ 27 - 3
src/views/scene/covers/measures.vue

@@ -8,7 +8,13 @@
       @focus="() => active = measure"
   />
 
-  <ActionsPanel :menus="activeActionMenus" v-if="active" />
+  <div ref="menu" @touchstart.stop class="action-menus">
+    <ActionMenus
+        v-if="active"
+        :menus="activeActionMenus"
+        dire="row"
+    />
+  </div>
 </template>
 
 <script setup lang="ts">
@@ -17,6 +23,8 @@ import { baseLines } from '@/store/baseLine'
 import Measure from './measure.vue'
 import {ref} from "vue";
 import ActionsPanel from "@/views/scene/covers/actions.vue";
+import {customMap} from "@/hook";
+import ActionMenus from "@/components/group-button/index.vue";
 
 const active = ref<MeasureAtom>()
 const getStore = (item: MeasureAtom) =>
@@ -29,9 +37,10 @@ const activeActionMenus = [
   {
     key: "delete",
     icon: "del",
+    text: "删除",
     color: "#FF4D4F",
     iconColor: "#fff",
-    action() {
+    onClick() {
       console.log('aa')
       const store = getStore(active.value)
       if (store) {
@@ -45,4 +54,19 @@ const activeActionMenus = [
 const changePoints = (measure, points) => {
   measure.points = points.map(point => ({...point}))
 }
-</script>
+</script>
+
+<style scoped>
+
+.action-menus {
+  position: absolute;
+  bottom: var(--boundMargin);
+  left: 50%;
+  transform: translateX(-50%);
+  display: flex;
+  z-index: 2;
+  .menus {
+    position: static;
+  }
+}
+</style>

+ 21 - 6
src/views/scene/menus/actions.ts

@@ -4,7 +4,7 @@ import {list, MeasureAtom, MeasureType} from "@/store/measure";
 import {baseLines} from '@/store/baseLine'
 import {basePoints} from "@/store/basePoint";
 import {Ref, watch} from "vue";
-import {activeFixPointStack, customMap} from "@/hook";
+import {activeBasePointStack, activeFixPointStack, customMap} from "@/hook";
 import {getCoverPos} from '../linkage/cover'
 import {Pos3D} from "@/sdk";
 import {fixPoints} from "@/store/fixPoint";
@@ -45,13 +45,21 @@ const trackMeasureMenuAction = (
   color = "#3290ff"
 ) => {
   let hide
+  let startTipEd = false
+  let endTipEd = false
   const startTip = () => {
     hide && hide()
-    hide = Message.success({ msg: `请选择一个位置单击,确定${name}的起点` })
+    if (!startTipEd) {
+      hide = Message.success({msg: `请选择一个位置单击,确定${name}的起点`})
+      startTipEd = true
+    }
   }
   const firstTip = () => {
     hide && hide()
-    hide = Message.success({ msg: `再选择一个位置单击,确定${name}的终点` })
+    if (!endTipEd) {
+      endTipEd = true
+      hide = Message.success({msg: `再选择一个位置单击,确定${name}的终点`})
+    }
   }
   startTip()
   // customMap.magnifier = true
@@ -84,11 +92,18 @@ const menuActions = {
     let hide = Message.success({ msg: "请单击选择基准点位置" })
     const onDestroy = trackPosMenuAction(
       () => {
-        hide()
-        hide = null
+        hide && hide()
         onComplete()
       },
-      pos => basePoints.value.push({ id: getId(), pos })
+      pos => {
+        const len = basePoints.value.push({ id: getId(), pos })
+        activeBasePointStack.current.value.value = basePoints.value[len - 1]
+        if (hide) {
+          hide()
+          hide = null
+        }
+      },
+      true
     )
     return () => {
       onDestroy()

+ 6 - 4
src/views/scene/menus/menus.ts

@@ -6,6 +6,7 @@ import {Mode} from "@/sdk";
 import {baseLines} from "@/store/baseLine";
 import {fixPoints} from "@/store/fixPoint";
 import {basePoints} from "@/store/basePoint";
+import {list} from "@/store/measure";
 
 export type MenuRaw = {
   key: string,
@@ -40,7 +41,7 @@ export const menus: MenuRaw[] = [
     icon: "clear",
     text: "清除",
     key: menuEnum.CLEAR,
-    disabled: () => (baseLines.value.length + fixPoints.value.length + basePoints.value.length) === 0,
+    disabled: () => (baseLines.value.length + fixPoints.value.length + list.value.length + basePoints.value.length) === 0,
     border: true
   },
   {
@@ -50,20 +51,20 @@ export const menus: MenuRaw[] = [
     children: [
       {
         icon: "line_h",
-        // continued: true,
+        continued: true,
         text: "水平",
         defaultSelect: true,
         key: menuEnum.MEASURE_ROW
       },
       {
         icon: "line_v",
-        // continued: true,
+        continued: true,
         text: "垂直",
         key: menuEnum.MEASURE_COLUMN
       },
       {
         icon: "line_f",
-        // continued: true,
+        continued: true,
         text: "自由",
         key: menuEnum.MEASURE_FREE
       }
@@ -114,6 +115,7 @@ export const menus: MenuRaw[] = [
       {
         defaultSelect: true,
         icon: "point",
+        continued: true,
         text: "基准点",
         key: menuEnum.BASE_POINT
       },

+ 2 - 1
src/views/scene/menus/pane.vue

@@ -114,8 +114,9 @@ onMounted(() => {
   &:after {
     position: absolute;
     content: "";
-    width: 100%;
     height: 1px;
+    left: 10px;
+    right: 10px;
     bottom: -15px;
     background-color: rgba(255, 255, 255, .2);