误报后不显示决策信息;点误报后取消勾选

This commit is contained in:
joylink_zhaoerwei 2023-11-01 10:59:36 +08:00
parent 3bdb6304a1
commit 3a387e8cb3
3 changed files with 25 additions and 14 deletions

View File

@ -59,7 +59,10 @@
</q-form>
</q-card>
</div>
<div class="decision-message" v-else>
<div
class="decision-message"
v-if="!showConfirmMmessage && showDecisionmessage"
>
<q-card class="box-card">
<div class="head">行车方面</div>
<q-separator />
@ -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);
});
}

View File

@ -636,6 +636,9 @@ abstract class GraphicSceneBase
this.on('graphicselectedchange', () => {
this.debounceEmitFunc(this);
});
// 发布选项更新事件
this.emit('options-update', this._options);
}
abstract get app(): GraphicApp;

View File

@ -352,16 +352,20 @@ const selected = ref<Item[]>([]);
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();
},
},
});
}