决策信息枚举增加

This commit is contained in:
joylink_zhaoerwei 2023-07-26 15:07:25 +08:00
parent 5afc6b59c2
commit 3c856dc22b

View File

@ -91,7 +91,7 @@
<q-select <q-select
outlined outlined
label="地点定义类型" label="地点定义类型"
v-model="creatForm.locationType" v-model="locationType"
:options="optionsLocationType" :options="optionsLocationType"
/> />
<q-input <q-input
@ -174,7 +174,11 @@ const columnDefs: QTableColumn[] = [
{ {
name: 'locationType', name: 'locationType',
label: '地点定义类型', label: '地点定义类型',
field: 'locationType', field: (row) => {
if (row.locationType) {
return (showAlertTypeData as never)[row.locationType + ''];
}
},
align: 'center', align: 'center',
}, },
{ {
@ -262,7 +266,15 @@ const optionsAlertType = [
'整侧站台门无法关闭', '整侧站台门无法关闭',
]; ];
const optionsTimeType = ['CLOCK_7_9', 'CLOCK_7_9_AND_19_21', '无']; const optionsTimeType = ['CLOCK_7_9', 'CLOCK_7_9_AND_19_21', '无'];
const optionsLocationType = ['QX', 'YHZ_LSQ', '无']; const locationType = ref('');
const optionsLocationType = [
'全线',
'鱼化寨联锁区',
'胡家庙联锁区',
'北池头联锁区',
'保税区联锁区',
'无',
];
enum showAlertTypeData { enum showAlertTypeData {
TRAIN_DELAY_2 = '列车延误2分钟', TRAIN_DELAY_2 = '列车延误2分钟',
@ -271,6 +283,11 @@ enum showAlertTypeData {
PLATFORM_DOOR_WITHOUT_LOCKED_SIGNAL = '站台门无关闭且锁紧信号', PLATFORM_DOOR_WITHOUT_LOCKED_SIGNAL = '站台门无关闭且锁紧信号',
PLATFORM_DOOR_CANNOT_OPEN = '整侧站台门无法打开', PLATFORM_DOOR_CANNOT_OPEN = '整侧站台门无法打开',
PLATFORM_DOOR_CANNOT_CLOSE = '整侧站台门无法关闭', PLATFORM_DOOR_CANNOT_CLOSE = '整侧站台门无法关闭',
QX = '全线',
YHZ_LSQ = '鱼化寨联锁区',
HJM_LSQ = '胡家庙联锁区',
BCT_LSQ = '北池头联锁区',
BSQ_LSQ = '保税区联锁区',
} }
enum saveAlertTypeData { enum saveAlertTypeData {
@ -280,13 +297,18 @@ enum saveAlertTypeData {
站台门无关闭且锁紧信号 = 'PLATFORM_DOOR_WITHOUT_LOCKED_SIGNAL', 站台门无关闭且锁紧信号 = 'PLATFORM_DOOR_WITHOUT_LOCKED_SIGNAL',
整侧站台门无法打开 = 'PLATFORM_DOOR_CANNOT_OPEN', 整侧站台门无法打开 = 'PLATFORM_DOOR_CANNOT_OPEN',
整侧站台门无法关闭 = 'PLATFORM_DOOR_CANNOT_CLOSE', 整侧站台门无法关闭 = 'PLATFORM_DOOR_CANNOT_CLOSE',
全线 = 'QX',
鱼化寨联锁区 = 'YHZ_LSQ',
胡家庙联锁区 = 'HJM_LSQ',
北池头联锁区 = 'BCT_LSQ',
保税区联锁区 = 'BSQ_LSQ',
} }
function onReset() { function onReset() {
creatForm.id = ''; creatForm.id = '';
alertType.value = ''; alertType.value = '';
creatForm.timeType = ''; creatForm.timeType = '';
creatForm.locationType = ''; locationType.value = '';
creatForm.drivingInfo = ''; creatForm.drivingInfo = '';
creatForm.submissionInfo = ''; creatForm.submissionInfo = '';
myForm.value?.resetValidation(); myForm.value?.resetValidation();
@ -301,7 +323,7 @@ function onCreate() {
id: +creatForm.id, id: +creatForm.id,
alertType: (saveAlertTypeData as never)[alertType.value], alertType: (saveAlertTypeData as never)[alertType.value],
timeType: creatForm.timeType, timeType: creatForm.timeType,
locationType: creatForm.locationType, locationType: (saveAlertTypeData as never)[locationType.value],
drivingInfo: creatForm.drivingInfo, drivingInfo: creatForm.drivingInfo,
submissionInfo: creatForm.submissionInfo, submissionInfo: creatForm.submissionInfo,
}; };