From 3a387e8cb3fddf53635402cabf00282751a6e5d4 Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Wed, 1 Nov 2023 10:59:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=AF=E6=8A=A5=E5=90=8E=E4=B8=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=86=B3=E7=AD=96=E4=BF=A1=E6=81=AF=EF=BC=9B=E7=82=B9?= =?UTF-8?q?=E8=AF=AF=E6=8A=A5=E5=90=8E=E5=8F=96=E6=B6=88=E5=8B=BE=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/alarm/alarmInfoDialog.vue | 17 +++++++++-------- src/jl-graphic/app/JlGraphicApp.ts | 3 +++ src/pages/AlarmInfoList.vue | 19 +++++++++++++------ 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/src/components/alarm/alarmInfoDialog.vue b/src/components/alarm/alarmInfoDialog.vue index 3421c72..6f49c44 100644 --- a/src/components/alarm/alarmInfoDialog.vue +++ b/src/components/alarm/alarmInfoDialog.vue @@ -59,7 +59,10 @@ -
+
行车方面
@@ -94,7 +97,7 @@ import { queryAlarmInfoById } from 'src/api/DecisionInfo'; const props = defineProps<{ alarmMeaasge?: AlarmInfo; - onHandle?: (id: string, close?: boolean) => void; + onHandle: (id?: string, close?: boolean) => void; }>(); let bgColor = ref(''); @@ -126,6 +129,7 @@ const drivingInfo = ref(''); const submissionInfo = ref(''); let messageUse: AlarmInfo; const showDialog = ref(true); +const showDecisionmessage = ref(true); onMounted(() => { if (props.alarmMeaasge == undefined) { @@ -137,6 +141,7 @@ onMounted(() => { searchById(); } else if (messageUse.alarmStatus == 0) { showConfirmMmessage.value = false; + showDecisionmessage.value = false; } } updata(); @@ -159,9 +164,7 @@ function submitChooseType() { showFaultType.value = true; searchByTipType().then(() => { lineNetStore.alarmInfoListTable?.requestServerInteraction(); - if (props.alarmMeaasge == undefined && props.onHandle) { - props.onHandle(messageUse.id); - } + props.onHandle(messageUse.id); }); } }); @@ -171,9 +174,7 @@ function falsePositives() { showDialog.value = false; recordFailAlarmInfoById([+messageUse.id]).then(() => { lineNetStore.alarmInfoListTable?.requestServerInteraction(); - if (props.alarmMeaasge == undefined && props.onHandle) { - props.onHandle(messageUse.id, true); - } + props.onHandle(messageUse.id, true); }); } diff --git a/src/jl-graphic/app/JlGraphicApp.ts b/src/jl-graphic/app/JlGraphicApp.ts index 3510b75..ea1dfc7 100644 --- a/src/jl-graphic/app/JlGraphicApp.ts +++ b/src/jl-graphic/app/JlGraphicApp.ts @@ -636,6 +636,9 @@ abstract class GraphicSceneBase this.on('graphicselectedchange', () => { this.debounceEmitFunc(this); }); + + // 发布选项更新事件 + this.emit('options-update', this._options); } abstract get app(): GraphicApp; diff --git a/src/pages/AlarmInfoList.vue b/src/pages/AlarmInfoList.vue index 85e5343..5a0842a 100644 --- a/src/pages/AlarmInfoList.vue +++ b/src/pages/AlarmInfoList.vue @@ -352,16 +352,20 @@ const selected = ref([]); watch( selected, () => { - for (let i = 0; i < selected.value.length; i++) { - if (selected.value[i].alarmStatus !== undefined) { - selected.value.splice(i, 1); - i--; - } - } + updateSelect(); }, { deep: true } ); +function updateSelect() { + for (let i = 0; i < selected.value.length; i++) { + if (selected.value[i].alarmStatus !== undefined) { + selected.value.splice(i, 1); + i--; + } + } +} + function batchHandle() { lineNetStore.closeAllAlarmInfoDialog = true; const params = selected.value.map((item) => item.id); @@ -489,6 +493,9 @@ function openAlarmDialog(row: any) { component: alarmInfoDialog, componentProps: { alarmMeaasge: row, + onHandle: () => { + updateSelect(); + }, }, }); }