From c6814bdf371d4546481188dc07b6d72db38987f4 Mon Sep 17 00:00:00 2001 From: fan Date: Fri, 22 Sep 2023 09:58:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E8=BD=B4=E6=B7=BB=E5=8A=A0=E9=9B=86?= =?UTF-8?q?=E4=B8=AD=E7=AB=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../properties/AxleCountingProperty.vue | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/components/draw-app/properties/AxleCountingProperty.vue b/src/components/draw-app/properties/AxleCountingProperty.vue index d614e73..8a8d9d6 100644 --- a/src/components/draw-app/properties/AxleCountingProperty.vue +++ b/src/components/draw-app/properties/AxleCountingProperty.vue @@ -104,6 +104,21 @@ + + + @@ -116,7 +131,9 @@ import { Turnout } from 'src/graphics/turnout/Turnout'; import { GraphicIdGenerator } from 'src/jl-graphic'; import { useDrawStore } from 'src/stores/draw-store'; import { computed } from 'vue'; +import { useQuasar } from 'quasar'; +const $q = useQuasar(); const drawStore = useDrawStore(); const { data: axleCountingModel, onUpdate } = useFormData( new AxleCountingData(), @@ -170,7 +187,22 @@ const turnoutRelations = computed(() => { ); return Array.from(new Set(ref)); }); +function removeStation(index: number) { + axleCountingModel.centralizedStations.splice(index, 1); +} +function addStation() { + $q.dialog({ + message: '添加设备的集中站', + prompt: { + model: '', + type: 'text', // optional + }, + cancel: true, + }).onOk((data: string) => { + axleCountingModel.centralizedStations.push(data); + }); +} function oneClickAxleCounting() { const select = drawStore.selectedGraphic as AxleCounting; const axleCountings = select.queryStore.queryByType(