Merge branch 'master' of git.code.tencent.com:xian-ncc-da/xian-ncc-da-client

This commit is contained in:
Yuan 2023-08-25 17:28:50 +08:00
commit 6f2c573411
12 changed files with 82 additions and 18 deletions

View File

@ -38,14 +38,18 @@ export async function alarmInfoListQuery(
/** /**
* *
* @param recordId id * @param id id
* * @param tipId id * @param tipType
* @param alertLocationId id
*/ */
export function recordConfirmAlarmInfoByTipType( export function recordConfirmAlarmInfoByTipType(
id: number, id: number,
tipType: string tipType: string,
alertLocationId?: number
): Promise<AlarmInfo<Item>> { ): Promise<AlarmInfo<Item>> {
return api.get(`/api/alertRecord/confirm/${id}/${tipType}`); return api.get(`/api/alertRecord/confirm/${id}/${tipType}`, {
params: {alertLocationId:alertLocationId},
});
} }
/** /**

View File

@ -64,6 +64,7 @@ interface IAreaConfig<T = unknown> {
export async function getAllDeviceArea() { export async function getAllDeviceArea() {
return await api.get<PageDto<IAreaConfigListItem>>( return await api.get<PageDto<IAreaConfigListItem>>(
'/api/config/device/area/page' '/api/config/device/area/page',
{ params: { current: 1, size: 50 } }
); );
} }

View File

@ -120,6 +120,7 @@ const alarmInfo = ref({
alertObject: '', alertObject: '',
alertType: '', alertType: '',
locator_device_id: '', locator_device_id: '',
alert_location_id: '',
}); });
const drivingInfo = ref(''); const drivingInfo = ref('');
const submissionInfo = ref(''); const submissionInfo = ref('');
@ -131,9 +132,11 @@ onMounted(() => {
messageUse = lineNetStore.alarmInfo[0] as AlarmInfo; messageUse = lineNetStore.alarmInfo[0] as AlarmInfo;
} else { } else {
messageUse = props.alarmMeaasge as AlarmInfo; messageUse = props.alarmMeaasge as AlarmInfo;
if (messageUse.alarmStatus == 1 || messageUse.alarmStatus == 0) { if (messageUse.alarmStatus == 1) {
showConfirmMmessage.value = false; showConfirmMmessage.value = false;
searchById(); searchById();
} else if (messageUse.alarmStatus == 0) {
showConfirmMmessage.value = false;
} }
} }
updata(); updata();
@ -183,7 +186,8 @@ async function searchByTipType() {
const type = (saveAlertTypeData as never)[faultType.value]; const type = (saveAlertTypeData as never)[faultType.value];
const response = await recordConfirmAlarmInfoByTipType( const response = await recordConfirmAlarmInfoByTipType(
+messageUse.id, +messageUse.id,
type type,
messageUse.alert_location_id
); );
drivingInfo.value = JSON.parse(response.data.drivingInfo); drivingInfo.value = JSON.parse(response.data.drivingInfo);
submissionInfo.value = JSON.parse(response.data.submissionInfo); submissionInfo.value = JSON.parse(response.data.submissionInfo);

View File

@ -16,6 +16,8 @@ export enum showAlertTypeData {
'计轴大面积红光带', '计轴大面积红光带',
'计轴橙光带', '计轴橙光带',
'计轴大面积橙光带', '计轴大面积橙光带',
'道岔大面积失表',
'列车信号故障',
I = 'I类信息', I = 'I类信息',
II = 'II类信息', II = 'II类信息',
III = 'III类信息', III = 'III类信息',
@ -40,6 +42,7 @@ export enum showAlertTypeData {
AXLE_LED_ORANGE = '计轴橙光带', AXLE_LED_ORANGE = '计轴橙光带',
AXLE_LED_ORANGE_MOST = '计轴大面积橙光带', AXLE_LED_ORANGE_MOST = '计轴大面积橙光带',
SWITCH_LOST_MOST = '道岔大面积失表', SWITCH_LOST_MOST = '道岔大面积失表',
TRAIN_EB_ATP = '列车信号故障',
} }
export enum saveAlertTypeData { export enum saveAlertTypeData {
@ -62,6 +65,8 @@ export enum saveAlertTypeData {
= 'AXLE_LED_RED_MOST', = 'AXLE_LED_RED_MOST',
= 'AXLE_LED_ORANGE', = 'AXLE_LED_ORANGE',
= 'AXLE_LED_ORANGE_MOST', = 'AXLE_LED_ORANGE_MOST',
= 'SWITCH_LOST_MOST',
= 'TRAIN_EB_ATP',
} }
export const GuardConfigTypeData = { export const GuardConfigTypeData = {

View File

@ -185,6 +185,7 @@ function openAlarmDialog(row: any) {
row.line_id = row.lineId; row.line_id = row.lineId;
row.alert_object = row.alertObject; row.alert_object = row.alertObject;
row.alert_tip_id = row.alertTipId; row.alert_tip_id = row.alertTipId;
row.alert_location_id = row.alertLocationId;
dialogInstance.value = $q.dialog({ dialogInstance.value = $q.dialog({
component: alarmInfoDialog, component: alarmInfoDialog,
componentProps: { componentProps: {

View File

@ -1,5 +1,5 @@
<template> <template>
<div v-if="rangeConfigStore.selectedGraphics !== null"> <div v-if="showRangeConfig">
<q-card class="q-gutter-sm q-pa-sm"> <q-card class="q-gutter-sm q-pa-sm">
<q-card-section> <q-card-section>
<div class="text-h6">{{ handleState }}</div> <div class="text-h6">{{ handleState }}</div>
@ -90,6 +90,7 @@ defineExpose({ searchById });
const route = useRoute(); const route = useRoute();
const rangeConfigStore = useRangeConfigStore(); const rangeConfigStore = useRangeConfigStore();
const $q = useQuasar(); const $q = useQuasar();
const showRangeConfig = ref(true);
const rangeConfig = reactive<{ const rangeConfig = reactive<{
areaName: string; areaName: string;
deviceType: `${DeviceType}` | ''; deviceType: `${DeviceType}` | '';
@ -126,10 +127,12 @@ const optionsAlertType = [
'计轴大面积红光带', '计轴大面积红光带',
'计轴橙光带', '计轴橙光带',
'计轴大面积橙光带', '计轴大面积橙光带',
'道岔大面积失表',
'列车信号故障',
]; ];
enum DeviceType { enum DeviceType {
Station = 'DEVICE_TYPE_RTU', station = 'DEVICE_TYPE_RTU',
Turnout = 'DEVICE_TYPE_SWITCH', Turnout = 'DEVICE_TYPE_SWITCH',
LogicSection = 'DEVICE_TYPE_TRACK', LogicSection = 'DEVICE_TYPE_TRACK',
Platform = 'DEVICE_TYPE_PLATFORM', Platform = 'DEVICE_TYPE_PLATFORM',
@ -146,13 +149,25 @@ watch(
() => rangeConfigStore.selectedGraphics, () => rangeConfigStore.selectedGraphics,
(val) => { (val) => {
if (val && val.length > 0) { if (val && val.length > 0) {
const deviceFilter = rangeConfigStore.selectedGraphics?.filter( const deviceFilter = rangeConfigStore.selectedGraphics?.filter((g) => {
(g) => let select = false;
g.type == rangeConfig.deviceType || if (
g.type == Station.Type &&
rangeConfig.deviceType == Station.Type &&
(g as Station).datas.concentrationStations
) {
select = true;
}
if (
(g.type == rangeConfig.deviceType && g.type !== Station.Type) ||
(g.type == Section.Type && (g.type == Section.Type &&
(g as Section).datas.sectionType === SectionType.TurnoutPhysical && (g as Section).datas.sectionType === SectionType.TurnoutPhysical &&
rangeConfig.deviceType == LogicSection.Type) rangeConfig.deviceType == LogicSection.Type)
) as JlGraphic[]; ) {
select = true;
}
return select;
}) as JlGraphic[];
selectGraphic.push(...deviceFilter); selectGraphic.push(...deviceFilter);
selectGraphic = Array.from(new Set(selectGraphic)); selectGraphic = Array.from(new Set(selectGraphic));
getRangeConfigApp().updateSelected(...selectGraphic); getRangeConfigApp().updateSelected(...selectGraphic);
@ -196,11 +211,17 @@ async function onSubmit() {
type: 'positive', type: 'positive',
message: handle.value, message: handle.value,
}); });
onReset();
showRangeConfig.value = false;
} catch (err) { } catch (err) {
$q.notify({ $q.notify({
type: 'negative', type: 'negative',
message: handleError.value, message: handleError.value,
}); });
} finally {
setTimeout(() => {
showRangeConfig.value = true;
}, 0);
} }
} }
}); });

View File

@ -198,6 +198,8 @@ const optionsAlertType = [
'计轴大面积红光带', '计轴大面积红光带',
'计轴橙光带', '计轴橙光带',
'计轴大面积橙光带', '计轴大面积橙光带',
'道岔大面积失表',
'列车信号故障',
]; ];
async function alarmMockSet() { async function alarmMockSet() {

View File

@ -148,7 +148,7 @@ const columnDefs: QTableColumn[] = [
}, },
{ {
name: 'value', name: 'value',
label: '值', label: '值(可修改)',
field: 'value', field: 'value',
align: 'center', align: 'center',
}, },

View File

@ -285,6 +285,8 @@ const optionsAlertType = [
'计轴大面积红光带', '计轴大面积红光带',
'计轴橙光带', '计轴橙光带',
'计轴大面积橙光带', '计轴大面积橙光带',
'道岔大面积失表',
'列车信号故障',
]; ];
const optionsTimeType = ['CLOCK_7_9', 'CLOCK_7_9_AND_19_21', '无']; const optionsTimeType = ['CLOCK_7_9', 'CLOCK_7_9_AND_19_21', '无'];
let optionsLocationType = []; let optionsLocationType = [];

View File

@ -30,6 +30,6 @@ export namespace alert {
AXLE_LED_ORANGE = 15, AXLE_LED_ORANGE = 15,
AXLE_LED_ORANGE_MOST = 16, AXLE_LED_ORANGE_MOST = 16,
SWITCH_LOST_MOST = 17, SWITCH_LOST_MOST = 17,
TRAIN_SIGNAL = 18 TRAIN_EB_ATP = 18
} }
} }

View File

@ -85,6 +85,7 @@ export namespace alert {
alert_object?: string; alert_object?: string;
alert_type?: dependency_1.alert.AlertType; alert_type?: dependency_1.alert.AlertType;
locator_device_id?: string; locator_device_id?: string;
alert_location_id?: number;
mock?: boolean; mock?: boolean;
}) { }) {
super(); super();
@ -114,6 +115,9 @@ export namespace alert {
if ("locator_device_id" in data && data.locator_device_id != undefined) { if ("locator_device_id" in data && data.locator_device_id != undefined) {
this.locator_device_id = data.locator_device_id; this.locator_device_id = data.locator_device_id;
} }
if ("alert_location_id" in data && data.alert_location_id != undefined) {
this.alert_location_id = data.alert_location_id;
}
if ("mock" in data && data.mock != undefined) { if ("mock" in data && data.mock != undefined) {
this.mock = data.mock; this.mock = data.mock;
} }
@ -167,11 +171,17 @@ export namespace alert {
set locator_device_id(value: string) { set locator_device_id(value: string) {
pb_1.Message.setField(this, 8, value); pb_1.Message.setField(this, 8, value);
} }
get alert_location_id() {
return pb_1.Message.getFieldWithDefault(this, 9, 0) as number;
}
set alert_location_id(value: number) {
pb_1.Message.setField(this, 9, value);
}
get mock() { get mock() {
return pb_1.Message.getFieldWithDefault(this, 9, false) as boolean; return pb_1.Message.getFieldWithDefault(this, 10, false) as boolean;
} }
set mock(value: boolean) { set mock(value: boolean) {
pb_1.Message.setField(this, 9, value); pb_1.Message.setField(this, 10, value);
} }
static fromObject(data: { static fromObject(data: {
id?: string; id?: string;
@ -182,6 +192,7 @@ export namespace alert {
alert_object?: string; alert_object?: string;
alert_type?: dependency_1.alert.AlertType; alert_type?: dependency_1.alert.AlertType;
locator_device_id?: string; locator_device_id?: string;
alert_location_id?: number;
mock?: boolean; mock?: boolean;
}): Message { }): Message {
const message = new Message({}); const message = new Message({});
@ -209,6 +220,9 @@ export namespace alert {
if (data.locator_device_id != null) { if (data.locator_device_id != null) {
message.locator_device_id = data.locator_device_id; message.locator_device_id = data.locator_device_id;
} }
if (data.alert_location_id != null) {
message.alert_location_id = data.alert_location_id;
}
if (data.mock != null) { if (data.mock != null) {
message.mock = data.mock; message.mock = data.mock;
} }
@ -224,6 +238,7 @@ export namespace alert {
alert_object?: string; alert_object?: string;
alert_type?: dependency_1.alert.AlertType; alert_type?: dependency_1.alert.AlertType;
locator_device_id?: string; locator_device_id?: string;
alert_location_id?: number;
mock?: boolean; mock?: boolean;
} = {}; } = {};
if (this.id != null) { if (this.id != null) {
@ -250,6 +265,9 @@ export namespace alert {
if (this.locator_device_id != null) { if (this.locator_device_id != null) {
data.locator_device_id = this.locator_device_id; data.locator_device_id = this.locator_device_id;
} }
if (this.alert_location_id != null) {
data.alert_location_id = this.alert_location_id;
}
if (this.mock != null) { if (this.mock != null) {
data.mock = this.mock; data.mock = this.mock;
} }
@ -275,8 +293,10 @@ export namespace alert {
writer.writeEnum(7, this.alert_type); writer.writeEnum(7, this.alert_type);
if (this.locator_device_id.length) if (this.locator_device_id.length)
writer.writeString(8, this.locator_device_id); writer.writeString(8, this.locator_device_id);
if (this.alert_location_id != 0)
writer.writeInt64(9, this.alert_location_id);
if (this.mock != false) if (this.mock != false)
writer.writeBool(9, this.mock); writer.writeBool(10, this.mock);
if (!w) if (!w)
return writer.getResultBuffer(); return writer.getResultBuffer();
} }
@ -311,6 +331,9 @@ export namespace alert {
message.locator_device_id = reader.readString(); message.locator_device_id = reader.readString();
break; break;
case 9: case 9:
message.alert_location_id = reader.readInt64();
break;
case 10:
message.mock = reader.readBool(); message.mock = reader.readBool();
break; break;
default: reader.skipField(); default: reader.skipField();

View File

@ -14,6 +14,7 @@ export interface AlarmInfo {
alert_object: string; alert_object: string;
alert_type: number; alert_type: number;
locator_device_id: string; locator_device_id: string;
alert_location_id: number;
alarmStatus?: number; alarmStatus?: number;
} }
export const useLineNetStore = defineStore('lineNet', { export const useLineNetStore = defineStore('lineNet', {