diff --git a/src/components/alarm/alarmInfoEnum.ts b/src/components/alarm/alarmInfoEnum.ts index 987f9a8..b8c3c6a 100644 --- a/src/components/alarm/alarmInfoEnum.ts +++ b/src/components/alarm/alarmInfoEnum.ts @@ -30,6 +30,7 @@ export enum showAlertTypeData { '列车完整性', '列车故障救援', 'ats卡滞', + '列车报点', I = 'I类信息', II = 'II类信息', III = 'III类信息', @@ -67,6 +68,7 @@ export enum showAlertTypeData { TRAIN_INTEGRITY_ALARM = '列车完整性', TRAIN_FAULT_HELP = '列车故障救援', INTERLOCKED_ATS_STUCK = 'ats卡滞', + TRAIN_RECORD = '列车报点', } export enum saveAlertTypeData { @@ -103,6 +105,7 @@ export enum saveAlertTypeData { 列车完整性 = 'TRAIN_INTEGRITY_ALARM', 列车故障救援 = 'TRAIN_FAULT_HELP', ats卡滞 = 'INTERLOCKED_ATS_STUCK', + 列车报点 = 'TRAIN_RECORD', } export const GuardConfigTypeData = { diff --git a/src/components/alarm/setAlarmText.vue b/src/components/alarm/setAlarmText.vue index c965411..3eadc64 100644 --- a/src/components/alarm/setAlarmText.vue +++ b/src/components/alarm/setAlarmText.vue @@ -40,7 +40,9 @@ import DraggableDialog from '../common/DraggableDialog.vue'; -import { onMounted, onUnmounted, ref, watch } from 'vue'; +import { computed, onMounted, onUnmounted, ref, watch } from 'vue'; import { JlGraphic } from 'jl-graphic'; import { Station } from 'src/graphics/station/Station'; import { useLineStore } from 'src/stores/line-store'; @@ -124,6 +130,8 @@ import { QForm, useQuasar } from 'quasar'; import { ApiError } from 'src/boot/axios'; import { mockLocalDemoTestSet } from 'src/api/AlertMock'; import { isArraysEqual, saveAlertTypeData } from './alarmInfoEnum'; +import { Section } from 'src/graphics/section/Section'; +import { Platform } from 'src/graphics/platform/Platform'; const lineStore = useLineStore(); const setAlartTextData = ref<{ @@ -152,6 +160,7 @@ const setAlartTextData = ref<{ }, ], }); +const needShowTrainGroup = ['列车信号故障', '列车报点']; const optionsAlertType = [ '蓝显', '道岔失表', @@ -160,7 +169,8 @@ const optionsAlertType = [ '列车信号故障', '应急触发', '道岔挤岔', - '列车完整性' + '列车完整性', + '列车报点', ]; const mapAlertType = new Map([ ['蓝显', ['station']], @@ -171,18 +181,30 @@ const mapAlertType = new Map([ ['应急触发', ['Platform']], ['道岔挤岔', ['Turnout']], ['列车完整性', ['LogicSection']], + ['列车报点', ['Section']], ]); enum DeviceType { station = 'DEVICE_TYPE_RTU', Turnout = 'DEVICE_TYPE_SWITCH', LogicSection = 'DEVICE_TYPE_TRACK', Platform = 'DEVICE_TYPE_PLATFORM', + Section = 'DEVICE_TYPE_SECTION', } -const optionsStatus = [ - { label: '正常', value: 'NORMAL' }, - { label: '设置', value: 'BEGIN' }, - { label: '报警', value: 'ALERT' }, -]; +const optionsStatus = computed(() => { + if (setAlartTextData.value.alertType !== '列车报点') { + return [ + { label: '正常', value: 'NORMAL' }, + { label: '设置', value: 'BEGIN' }, + { label: '报警', value: 'ALERT' }, + ]; + } else { + return [ + { label: '到站', value: 'NORMAL' }, + { label: '离站', value: 'BEGIN' }, + ]; + } +}); +let allplatformRefSection: number[] = []; let selectGraphic: JlGraphic[] = []; watch( @@ -212,16 +234,22 @@ watch( setAlartTextData.value.alertType == '蓝显' ) { select = true; - } - if ( + } else if ( + g.type == Section.Type && + setAlartTextData.value.alertType == '列车报点' && + allplatformRefSection.includes(g.id) + ) { + select = true; + } else if ( g.type !== Station.Type && + g.type !== Section.Type && mapAlertType.get(setAlartTextData.value.alertType)?.includes(g.type) ) { select = true; } return select; }) as JlGraphic[]; - if (setAlartTextData.value.alertType !== '列车信号故障') { + if (!needShowTrainGroup.includes(setAlartTextData.value.alertType)) { selectGraphic.push(...deviceFilter); } else if (deviceFilter.length) { selectGraphic = [deviceFilter[0]]; @@ -242,6 +270,12 @@ watch( ); onMounted(() => { + const platforms = lineStore + .getLineApp() + .queryStore.queryByType(Platform.Type); + platforms.forEach((platform) => + allplatformRefSection.push(platform.datas.refSectionId) + ); lineStore.getLineApp().emit('options-update', { mouseToolOptions: { boxSelect: true, diff --git a/src/protos/alertConst.ts b/src/protos/alertConst.ts index 0896c0e..f83f575 100644 --- a/src/protos/alertConst.ts +++ b/src/protos/alertConst.ts @@ -42,7 +42,8 @@ export namespace alert { TRAIN_LOST_LOCATION = 27, TRAIN_INTEGRITY_ALARM = 28, TRAIN_FAULT_HELP = 29, - INTERLOCKED_ATS_STUCK = 30 + INTERLOCKED_ATS_STUCK = 30, + TRAIN_RECORD = 31 } export enum TipTimeConfig { HOLIDAYS_MORN_PEAK = 0, diff --git a/xian-ncc-da-message b/xian-ncc-da-message index 6ae749d..7aef4b8 160000 --- a/xian-ncc-da-message +++ b/xian-ncc-da-message @@ -1 +1 @@ -Subproject commit 6ae749dad5f5aa90b78cea76e2d1d24451a25b46 +Subproject commit 7aef4b876fae6622d93a21c99fe293df7bf7d572