Merge branch 'master' of git.code.tencent.com:xian-ncc-da/xian-ncc-da-client
This commit is contained in:
commit
6f2c573411
@ -38,14 +38,18 @@ export async function alarmInfoListQuery(
|
||||
|
||||
/**
|
||||
* 确认报警处理
|
||||
* @param recordId 推送的警告信息的id
|
||||
* * @param tipId 决策信息的id
|
||||
* @param id 推送的警告信息的id
|
||||
* @param tipType 故障类型
|
||||
* @param alertLocationId 故障范围对应的列表id
|
||||
*/
|
||||
export function recordConfirmAlarmInfoByTipType(
|
||||
id: number,
|
||||
tipType: string
|
||||
tipType: string,
|
||||
alertLocationId?: number
|
||||
): Promise<AlarmInfo<Item>> {
|
||||
return api.get(`/api/alertRecord/confirm/${id}/${tipType}`);
|
||||
return api.get(`/api/alertRecord/confirm/${id}/${tipType}`, {
|
||||
params: {alertLocationId:alertLocationId},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -64,6 +64,7 @@ interface IAreaConfig<T = unknown> {
|
||||
|
||||
export async function getAllDeviceArea() {
|
||||
return await api.get<PageDto<IAreaConfigListItem>>(
|
||||
'/api/config/device/area/page'
|
||||
'/api/config/device/area/page',
|
||||
{ params: { current: 1, size: 50 } }
|
||||
);
|
||||
}
|
||||
|
@ -120,6 +120,7 @@ const alarmInfo = ref({
|
||||
alertObject: '',
|
||||
alertType: '',
|
||||
locator_device_id: '',
|
||||
alert_location_id: '',
|
||||
});
|
||||
const drivingInfo = ref('');
|
||||
const submissionInfo = ref('');
|
||||
@ -131,9 +132,11 @@ onMounted(() => {
|
||||
messageUse = lineNetStore.alarmInfo[0] as AlarmInfo;
|
||||
} else {
|
||||
messageUse = props.alarmMeaasge as AlarmInfo;
|
||||
if (messageUse.alarmStatus == 1 || messageUse.alarmStatus == 0) {
|
||||
if (messageUse.alarmStatus == 1) {
|
||||
showConfirmMmessage.value = false;
|
||||
searchById();
|
||||
} else if (messageUse.alarmStatus == 0) {
|
||||
showConfirmMmessage.value = false;
|
||||
}
|
||||
}
|
||||
updata();
|
||||
@ -183,7 +186,8 @@ async function searchByTipType() {
|
||||
const type = (saveAlertTypeData as never)[faultType.value];
|
||||
const response = await recordConfirmAlarmInfoByTipType(
|
||||
+messageUse.id,
|
||||
type
|
||||
type,
|
||||
messageUse.alert_location_id
|
||||
);
|
||||
drivingInfo.value = JSON.parse(response.data.drivingInfo);
|
||||
submissionInfo.value = JSON.parse(response.data.submissionInfo);
|
||||
|
@ -16,6 +16,8 @@ export enum showAlertTypeData {
|
||||
'计轴大面积红光带',
|
||||
'计轴橙光带',
|
||||
'计轴大面积橙光带',
|
||||
'道岔大面积失表',
|
||||
'列车信号故障',
|
||||
I = 'I类信息',
|
||||
II = 'II类信息',
|
||||
III = 'III类信息',
|
||||
@ -40,6 +42,7 @@ export enum showAlertTypeData {
|
||||
AXLE_LED_ORANGE = '计轴橙光带',
|
||||
AXLE_LED_ORANGE_MOST = '计轴大面积橙光带',
|
||||
SWITCH_LOST_MOST = '道岔大面积失表',
|
||||
TRAIN_EB_ATP = '列车信号故障',
|
||||
}
|
||||
|
||||
export enum saveAlertTypeData {
|
||||
@ -62,6 +65,8 @@ export enum saveAlertTypeData {
|
||||
计轴大面积红光带 = 'AXLE_LED_RED_MOST',
|
||||
计轴橙光带 = 'AXLE_LED_ORANGE',
|
||||
计轴大面积橙光带 = 'AXLE_LED_ORANGE_MOST',
|
||||
道岔大面积失表 = 'SWITCH_LOST_MOST',
|
||||
列车信号故障 = 'TRAIN_EB_ATP',
|
||||
}
|
||||
|
||||
export const GuardConfigTypeData = {
|
||||
|
@ -185,6 +185,7 @@ function openAlarmDialog(row: any) {
|
||||
row.line_id = row.lineId;
|
||||
row.alert_object = row.alertObject;
|
||||
row.alert_tip_id = row.alertTipId;
|
||||
row.alert_location_id = row.alertLocationId;
|
||||
dialogInstance.value = $q.dialog({
|
||||
component: alarmInfoDialog,
|
||||
componentProps: {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div v-if="rangeConfigStore.selectedGraphics !== null">
|
||||
<div v-if="showRangeConfig">
|
||||
<q-card class="q-gutter-sm q-pa-sm">
|
||||
<q-card-section>
|
||||
<div class="text-h6">{{ handleState }}</div>
|
||||
@ -90,6 +90,7 @@ defineExpose({ searchById });
|
||||
const route = useRoute();
|
||||
const rangeConfigStore = useRangeConfigStore();
|
||||
const $q = useQuasar();
|
||||
const showRangeConfig = ref(true);
|
||||
const rangeConfig = reactive<{
|
||||
areaName: string;
|
||||
deviceType: `${DeviceType}` | '';
|
||||
@ -126,10 +127,12 @@ const optionsAlertType = [
|
||||
'计轴大面积红光带',
|
||||
'计轴橙光带',
|
||||
'计轴大面积橙光带',
|
||||
'道岔大面积失表',
|
||||
'列车信号故障',
|
||||
];
|
||||
|
||||
enum DeviceType {
|
||||
Station = 'DEVICE_TYPE_RTU',
|
||||
station = 'DEVICE_TYPE_RTU',
|
||||
Turnout = 'DEVICE_TYPE_SWITCH',
|
||||
LogicSection = 'DEVICE_TYPE_TRACK',
|
||||
Platform = 'DEVICE_TYPE_PLATFORM',
|
||||
@ -146,13 +149,25 @@ watch(
|
||||
() => rangeConfigStore.selectedGraphics,
|
||||
(val) => {
|
||||
if (val && val.length > 0) {
|
||||
const deviceFilter = rangeConfigStore.selectedGraphics?.filter(
|
||||
(g) =>
|
||||
g.type == rangeConfig.deviceType ||
|
||||
const deviceFilter = rangeConfigStore.selectedGraphics?.filter((g) => {
|
||||
let select = false;
|
||||
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 as Section).datas.sectionType === SectionType.TurnoutPhysical &&
|
||||
rangeConfig.deviceType == LogicSection.Type)
|
||||
) as JlGraphic[];
|
||||
) {
|
||||
select = true;
|
||||
}
|
||||
return select;
|
||||
}) as JlGraphic[];
|
||||
selectGraphic.push(...deviceFilter);
|
||||
selectGraphic = Array.from(new Set(selectGraphic));
|
||||
getRangeConfigApp().updateSelected(...selectGraphic);
|
||||
@ -196,11 +211,17 @@ async function onSubmit() {
|
||||
type: 'positive',
|
||||
message: handle.value,
|
||||
});
|
||||
onReset();
|
||||
showRangeConfig.value = false;
|
||||
} catch (err) {
|
||||
$q.notify({
|
||||
type: 'negative',
|
||||
message: handleError.value,
|
||||
});
|
||||
} finally {
|
||||
setTimeout(() => {
|
||||
showRangeConfig.value = true;
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -198,6 +198,8 @@ const optionsAlertType = [
|
||||
'计轴大面积红光带',
|
||||
'计轴橙光带',
|
||||
'计轴大面积橙光带',
|
||||
'道岔大面积失表',
|
||||
'列车信号故障',
|
||||
];
|
||||
|
||||
async function alarmMockSet() {
|
||||
|
@ -148,7 +148,7 @@ const columnDefs: QTableColumn[] = [
|
||||
},
|
||||
{
|
||||
name: 'value',
|
||||
label: '值',
|
||||
label: '值(可修改)',
|
||||
field: 'value',
|
||||
align: 'center',
|
||||
},
|
||||
|
@ -285,6 +285,8 @@ const optionsAlertType = [
|
||||
'计轴大面积红光带',
|
||||
'计轴橙光带',
|
||||
'计轴大面积橙光带',
|
||||
'道岔大面积失表',
|
||||
'列车信号故障',
|
||||
];
|
||||
const optionsTimeType = ['CLOCK_7_9', 'CLOCK_7_9_AND_19_21', '无'];
|
||||
let optionsLocationType = [];
|
||||
|
@ -30,6 +30,6 @@ export namespace alert {
|
||||
AXLE_LED_ORANGE = 15,
|
||||
AXLE_LED_ORANGE_MOST = 16,
|
||||
SWITCH_LOST_MOST = 17,
|
||||
TRAIN_SIGNAL = 18
|
||||
TRAIN_EB_ATP = 18
|
||||
}
|
||||
}
|
||||
|
@ -85,6 +85,7 @@ export namespace alert {
|
||||
alert_object?: string;
|
||||
alert_type?: dependency_1.alert.AlertType;
|
||||
locator_device_id?: string;
|
||||
alert_location_id?: number;
|
||||
mock?: boolean;
|
||||
}) {
|
||||
super();
|
||||
@ -114,6 +115,9 @@ export namespace alert {
|
||||
if ("locator_device_id" in data && data.locator_device_id != undefined) {
|
||||
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) {
|
||||
this.mock = data.mock;
|
||||
}
|
||||
@ -167,11 +171,17 @@ export namespace alert {
|
||||
set locator_device_id(value: string) {
|
||||
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() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 9, false) as boolean;
|
||||
return pb_1.Message.getFieldWithDefault(this, 10, false) as boolean;
|
||||
}
|
||||
set mock(value: boolean) {
|
||||
pb_1.Message.setField(this, 9, value);
|
||||
pb_1.Message.setField(this, 10, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
id?: string;
|
||||
@ -182,6 +192,7 @@ export namespace alert {
|
||||
alert_object?: string;
|
||||
alert_type?: dependency_1.alert.AlertType;
|
||||
locator_device_id?: string;
|
||||
alert_location_id?: number;
|
||||
mock?: boolean;
|
||||
}): Message {
|
||||
const message = new Message({});
|
||||
@ -209,6 +220,9 @@ export namespace alert {
|
||||
if (data.locator_device_id != null) {
|
||||
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) {
|
||||
message.mock = data.mock;
|
||||
}
|
||||
@ -224,6 +238,7 @@ export namespace alert {
|
||||
alert_object?: string;
|
||||
alert_type?: dependency_1.alert.AlertType;
|
||||
locator_device_id?: string;
|
||||
alert_location_id?: number;
|
||||
mock?: boolean;
|
||||
} = {};
|
||||
if (this.id != null) {
|
||||
@ -250,6 +265,9 @@ export namespace alert {
|
||||
if (this.locator_device_id != null) {
|
||||
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) {
|
||||
data.mock = this.mock;
|
||||
}
|
||||
@ -275,8 +293,10 @@ export namespace alert {
|
||||
writer.writeEnum(7, this.alert_type);
|
||||
if (this.locator_device_id.length)
|
||||
writer.writeString(8, this.locator_device_id);
|
||||
if (this.alert_location_id != 0)
|
||||
writer.writeInt64(9, this.alert_location_id);
|
||||
if (this.mock != false)
|
||||
writer.writeBool(9, this.mock);
|
||||
writer.writeBool(10, this.mock);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
@ -311,6 +331,9 @@ export namespace alert {
|
||||
message.locator_device_id = reader.readString();
|
||||
break;
|
||||
case 9:
|
||||
message.alert_location_id = reader.readInt64();
|
||||
break;
|
||||
case 10:
|
||||
message.mock = reader.readBool();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
|
@ -14,6 +14,7 @@ export interface AlarmInfo {
|
||||
alert_object: string;
|
||||
alert_type: number;
|
||||
locator_device_id: string;
|
||||
alert_location_id: number;
|
||||
alarmStatus?: number;
|
||||
}
|
||||
export const useLineNetStore = defineStore('lineNet', {
|
||||
|
Loading…
Reference in New Issue
Block a user