Squashed commit of the following:
local-test分支构建发布 / Docker-Build (push) Successful in 1m53s Details

commit e932e7d0ae
Author: joylink_zhaoerwei <Bob_Engineer@163.com>
Date:   Thu Nov 14 18:14:13 2024 +0800

    增加是否播报语音

commit 05896cb241
Author: joylink_zhaoerwei <Bob_Engineer@163.com>
Date:   Thu Nov 14 17:51:50 2024 +0800

    添加应急处置流程表

commit debaf97510
Author: joylink_fanyuhong <18706759286@163.com>
Date:   Thu Nov 14 15:59:51 2024 +0800

    菜单调整

commit 99b7cba025
Author: joylink_fanyuhong <18706759286@163.com>
Date:   Thu Nov 14 14:50:39 2024 +0800

    卡斯柯=》同方

commit 41e59960ee
Author: joylink_fanyuhong <18706759286@163.com>
Date:   Thu Nov 14 14:46:13 2024 +0800

    公里表显示调整

commit 0da7654efa
Author: joylink_zhaoerwei <Bob_Engineer@163.com>
Date:   Thu Nov 14 11:14:19 2024 +0800

    增加5个故障
This commit is contained in:
joylink_zhaoerwei 2024-11-14 18:15:56 +08:00
parent 5269e91153
commit f699666f96
13 changed files with 561 additions and 28 deletions

View File

@ -3,7 +3,7 @@
ref="dialogRef"
@show="onDialogShow"
seamless
title="与卡斯柯连接状态信息"
title="与同方连接状态信息"
:width="300"
:height="0"
>

View File

@ -45,12 +45,6 @@ import { reactive } from 'vue';
const userStore = useUserStore();
const list = reactive([
{
show: true,
path: getMonitorPath(userStore.roles).monitorPath,
label: '监控',
icon: 'computer',
},
{
show: userStore.defaultRole == 'ADMIN',
path: '',
@ -72,11 +66,6 @@ const list = reactive([
label: '线路信息管理',
icon: 'format_list_numbered',
},
{
path: '/dataManage/decisionInfo',
label: '决策信息管理',
icon: 'format_align_center',
},
{
path: '/dataManage/faultQuery',
label: '故障查询管理',
@ -106,6 +95,7 @@ const list = reactive([
icon: 'manage_accounts',
},
{
show: userStore.defaultRole == 'ADMIN',
path: '/sysManage/role',
label: '权限管理',
icon: 'nature_people',
@ -127,5 +117,35 @@ const list = reactive([
},
],
},
{
show: true,
path: getMonitorPath(userStore.roles).monitorPath,
label: '监控管理',
icon: 'computer',
},
{
show: true,
path: '/sysManage/alarmRecord',
label: '报警管理',
icon: 'alarm_on',
},
{
show: true,
path: '',
label: '辅助决策',
icon: 'developer_board',
children: [
{
path: '/dataManage/decisionInfo',
label: '辅助决策方案管理查询',
icon: 'format_align_center',
},
{
path: '/dataManage/emergencyResponse',
label: '应急处置流程表',
icon: 'call_merge',
},
],
},
]);
</script>

View File

@ -25,6 +25,11 @@ export enum showAlertTypeData {
'一级联锁',
'应急触发',
'道岔挤岔',
'zc联锁故障',
'列车定位丢失',
'列车完整性',
'列车故障救援',
'ats卡滞',
I = 'I类信息',
II = 'II类信息',
III = 'III类信息',
@ -57,6 +62,11 @@ export enum showAlertTypeData {
INTERLOCK_LEVEL_ONE = '一级联锁',
PLATFORM_EMERG_STOP = '应急触发',
SWITCH_JAMMED = '道岔挤岔',
INTERLOCKED_ZC_FAULT = 'zc联锁故障',
TRAIN_LOST_LOCATION = '列车定位丢失',
TRAIN_INTEGRITY_ALARM = '列车完整性',
TRAIN_FAULT_HELP = '列车故障救援',
INTERLOCKED_ATS_STUCK = 'ats卡滞',
}
export enum saveAlertTypeData {
@ -88,6 +98,11 @@ export enum saveAlertTypeData {
= 'INTERLOCK_LEVEL_ONE',
= 'PLATFORM_EMERG_STOP',
= 'SWITCH_JAMMED',
zc联锁故障 = 'INTERLOCKED_ZC_FAULT',
= 'TRAIN_LOST_LOCATION',
= 'TRAIN_INTEGRITY_ALARM',
= 'TRAIN_FAULT_HELP',
ats卡滞 = 'INTERLOCKED_ATS_STUCK',
}
export const GuardConfigTypeData = {

View File

@ -81,6 +81,7 @@ function playAlarmMusic(type: number, lineId: number) {
i--;
}
}
if (!lineNetStore.handlePlayAble) return;
if (lineNetStore.playAble && audio.value.paused) {
const alarmType = (showAlertTypeData as never)[type + ''];
let mapAlarmMusic = new Map();

View File

@ -160,6 +160,7 @@ const optionsAlertType = [
'列车信号故障',
'应急触发',
'道岔挤岔',
'列车完整性'
];
const mapAlertType = new Map([
['蓝显', ['station']],
@ -169,6 +170,7 @@ const mapAlertType = new Map([
['列车信号故障', ['LogicSection', 'Turnout']],
['应急触发', ['Platform']],
['道岔挤岔', ['Turnout']],
['列车完整性', ['LogicSection']],
]);
enum DeviceType {
station = 'DEVICE_TYPE_RTU',

View File

@ -195,14 +195,26 @@ export class Station extends JlGraphic {
codeGraph.anchor.set(0.5);
const kilometerCode = this.datas.kilometerSystem?.kilometer || 12345678;
if (Math.floor(kilometerCode * 1000).toString().length > 3) {
const kiloBit = Math.floor(Number(kilometerCode) / 1000000).toString();
kilometerGraph.text =
'K' +
kiloBit +
'+' +
(
Number(kilometerCode.toString().substring(kiloBit.length)) / 1000
).toFixed(3);
if (Number(kilometerCode) > 0) {
const kiloBit = Math.floor(Number(kilometerCode) / 1000000).toString();
kilometerGraph.text =
'K' +
kiloBit +
'+' +
(
Number(kilometerCode.toString().substring(kiloBit.length)) / 1000
).toFixed(3);
} else {
const fuKilometerCode = Number(kilometerCode) * -1;
const kiloBit = Math.floor(fuKilometerCode / 1000000).toString();
kilometerGraph.text =
'K-' +
kiloBit +
'-' +
(
Number(kilometerCode.toString().substring(kiloBit.length)) / 1000
).toFixed(3);
}
} else {
kilometerGraph.text = (kilometerCode * 1000).toFixed(3);
}

View File

@ -15,13 +15,13 @@
<img :src="NCC" style="width: 80px" />
</div>
<q-toolbar-title> 西安NCC调度辅助决策系统 </q-toolbar-title>
<q-btn
<!-- <q-btn
v-show="route.path.includes('line/monitor')"
color="info"
label="故障查询"
class="q-mr-sm"
@click="openFaultQueryDialog()"
/>
/> -->
<q-btn
v-show="route.path.includes('line/monitor')"
color="info"
@ -51,6 +51,14 @@
label="返回"
@click="backConfirm"
/>
<q-btn
round
dense
flat
:color="lineNetStore.handlePlayAble ? 'white' : 'red'"
:icon="lineNetStore.handlePlayAble ? 'alarm_on' : 'alarm_off'"
@click="changeCanPlayAlarmMusic"
/>
<q-btn
round
dense
@ -288,4 +296,8 @@ function resetFn() {
});
});
}
function changeCanPlayAlarmMusic() {
lineNetStore.handlePlayAble = !lineNetStore.handlePlayAble;
}
</script>

View File

@ -413,6 +413,11 @@ const optionsAlertType = [
'联锁区失表',
'应急触发',
'道岔挤岔',
'zc联锁故障',
'列车定位丢失',
'列车完整性',
'列车故障救援',
'ats卡滞',
];
const searchOptionsAlertType = ['全部', ...optionsAlertType];
let optionsLocationType = ref<string[]>([]);

View File

@ -0,0 +1,456 @@
<template>
<q-tabs
v-model="tab"
dense
active-color="primary"
indicator-color="primary"
align="justify"
narrow-indicator
>
<q-tab
v-for="(item, index) in tabList"
:key="index"
:name="item.value"
:label="item.label"
/>
</q-tabs>
<q-separator />
<q-tab-panel>
<div class="dialogContainer">
<q-table
ref="tableRef"
row-key="id"
v-model:pagination="pagination"
:loading="loading"
:rows="rows"
:columns="columns"
@request="onRequest"
:rows-per-page-options="[10, 20, 50, 100]"
:filter="filter"
class="left"
>
<template v-slot:top-right>
<q-form ref="myForm" @submit="searchDecisionInfo" style="width: 100%">
<div class="q-gutter-md q-mt-none row justify-center items-start">
<q-select
dense
v-model="filter.lineId"
:options="searchOptionsLineId"
emit-value
map-options
options-dense
label="线路ID"
style="width: 75px"
no-error-icon
lazy-rules
@update:model-value="handleSelectSearchLineId"
:rules="[(val) => val >= 0 || '请选择线路ID']"
/>
<q-select
dense
label="故障类型"
v-model="filter.faultType"
emit-value
map-options
:options="searchOptionsFaultType"
style="min-width: 130px"
/>
<q-input
dense
:label="inputSearchName"
v-model="filter.faultName"
lazy-rules
/>
<q-btn
flat
round
color="primary"
icon="search"
@click="searchTable"
/>
</div>
</q-form>
</template>
<template v-slot:body="props">
<q-tr
:props="props"
:class="{ changeBackground: props.row.id === clickRowInfo.id }"
@click="handleRowClick(props.row)"
>
<q-td
v-for="col in props.cols"
:key="col.name"
:props="props"
class="custom-column"
>
{{ col.value }}
<q-tooltip
anchor="bottom middle"
v-if="props.value && props.value.length > 20"
>
<div class="message-tip">
{{ col.value }}
</div>
</q-tooltip>
</q-td>
</q-tr>
</template>
</q-table>
<q-scroll-area class="right">
<div class="detaiRow">
<div class="text">
<span class="textHead">故障类型</span> {{
clickRowInfo.faultType
}}
</div>
<div class="text">
<span class="textHead"> {{ showTitle.faultNameShower }}</span
>{{ clickRowInfo.faultNameShower }}
</div>
<q-card class="box-card">
<div class="head">{{ showTitle.faultDriverShower }}</div>
<q-separator />
<div>
<div class="detail">{{ clickRowInfo.faultDriverShower }}</div>
</div>
</q-card>
<q-card class="box-card">
<div class="head">{{ showTitle.resultMsg }}</div>
<q-separator />
<div>
<div class="detail">{{ clickRowInfo.resultMsg }}</div>
</div>
</q-card>
</div>
</q-scroll-area>
</div>
</q-tab-panel>
</template>
<script setup lang="ts">
import { reactive, ref, computed, onMounted, watch } from 'vue';
import { QTable, useQuasar } from 'quasar';
import {
FaultQueryListItem,
faultQueryPageQuery,
faultQueryType,
FaultTypeItem,
} from 'src/api/faultQuery';
import { pageQuery } from 'src/api/LineInfoApi';
import { ApiError } from 'src/boot/axios';
const $q = useQuasar();
const tab = ref('GUIDE');
const tableTitle = reactive({
faultNameShower: '',
faultDriverShower: '',
});
const inputSearchName = ref('故障现象');
watch(tab, (tabVal) => {
if (tabVal == 'GUIDE') {
inputSearchName.value = '故障现象';
tableTitle.faultNameShower = '故障现象';
tableTitle.faultDriverShower = '司机处理结果';
} else {
inputSearchName.value = '故障名称';
tableTitle.faultNameShower = '故障名称';
tableTitle.faultDriverShower = '故障现象';
}
handleSelectFaultType();
searchTable();
});
const tabList = ref([
{
label: '故障指导',
value: 'GUIDE',
},
{
label: '退出服务',
value: 'SERVICE',
},
]);
const tableRef = ref<QTable>();
const columns = computed(() => [
{
name: 'id',
label: '编号',
field: 'id',
required: true,
align: 'center',
},
{
name: 'lineId',
label: '线路',
field: 'lineId',
required: true,
align: 'center',
},
{
name: 'faultType',
label: '故障类型',
field: (row: FaultQueryListItem) => {
if (row.faultType) {
return getFaultTypeName(row);
}
},
align: 'center',
},
{
name: 'faultNameShower',
label: tableTitle.faultNameShower,
field: 'faultNameShower',
required: true,
align: 'center',
},
{
name: 'faultDriverShower',
label: tableTitle.faultDriverShower,
field: 'faultDriverShower',
required: true,
align: 'center',
},
]);
const rows = reactive([]);
const loading = ref(false);
const pagination = ref({
sortBy: 'desc',
descending: false,
page: 1,
rowsPerPage: 10,
rowsNumber: 10,
});
const filter = reactive({
lineId: 0,
faultType: '',
faultName: '',
});
const onRequest: QTable['onRequest'] = async (props) => {
const { page, rowsPerPage } = props.pagination;
loading.value = true;
try {
const params = {
current: page,
size: rowsPerPage,
};
if (filter.lineId !== 0) {
Object.assign(params, {
lineId: filter.lineId,
});
}
if (filter.faultType !== '') {
Object.assign(params, {
faultType: filter.faultType,
});
}
if (filter.faultName !== '') {
Object.assign(params, {
faultName: filter.faultName,
});
}
let resp = await faultQueryPageQuery(params);
pagination.value.page = resp.current;
pagination.value.rowsNumber = resp.total;
pagination.value.rowsPerPage = resp.size;
rows.splice(0, rows.length, ...(resp.records as []));
if (rows.length) {
handleRowClick(rows[0]);
} else {
clickRowInfo.faultType = '';
clickRowInfo.faultNameShower = '';
clickRowInfo.faultDriverShower = '';
clickRowInfo.resultMsg = '';
}
} catch (err) {
$q.notify({
type: 'negative',
message: '无法获取范围列表',
});
} finally {
loading.value = false;
}
};
const clickRowInfo = reactive({
id: 0,
faultType: '',
faultNameShower: '',
faultDriverShower: '',
resultMsg: '',
});
const showTitle = reactive({
faultNameShower: '',
faultDriverShower: '',
resultMsg: '',
});
function handleRowClick(row: FaultQueryListItem) {
if (row.faultType.includes('FAULT_EMERGENCY_GUIDE')) {
showTitle.faultNameShower = '故障现象';
showTitle.faultDriverShower = '司机处理结果';
showTitle.resultMsg = '行调提醒司机关键点';
} else {
showTitle.faultNameShower = '故障名称';
showTitle.faultDriverShower = '故障现象';
showTitle.resultMsg = '退出服务地点';
}
clickRowInfo.id = row?.id as number;
clickRowInfo.faultType = getFaultTypeName(row) as string;
clickRowInfo.faultNameShower = row.faultNameShower;
clickRowInfo.faultDriverShower = row.faultDriverShower;
clickRowInfo.resultMsg = row.resultMsg;
}
async function queryAllFaultType() {
try {
allOptionsFaultType = await faultQueryType();
handleSelectFaultType();
} catch (err) {
$q.notify({
type: 'negative',
message: '无法获取指定线路的故障类型配置',
});
}
}
let allOptionsFaultType: FaultTypeItem[] = [];
function getFaultTypeName(row: FaultQueryListItem) {
for (let i = 0; i < allOptionsFaultType.length; i++) {
if (allOptionsFaultType[i].lineId == row.lineId) {
const fts = allOptionsFaultType[i].fts;
for (let j = 0; i < fts.length; j++) {
if (fts[j].faultType == row.faultType) {
return fts[j].typeName;
}
}
}
}
}
const searchOptionsFaultType = ref([{ label: '全部', value: '' }]);
function handleSelectFaultType() {
let allType = '';
searchOptionsFaultType.value = [{ label: '全部', value: '' }];
for (let i = 0; i < allOptionsFaultType.length; i++) {
allOptionsFaultType[i].fts.forEach((item) => {
if (
(tab.value == 'GUIDE' &&
item.faultType.includes('FAULT_EMERGENCY_GUIDE')) ||
(tab.value == 'SERVICE' &&
item.faultType.includes('FAULT_EXIT_SERVICE'))
) {
searchOptionsFaultType.value.push({
label: item.typeName,
value: item.faultType,
});
if (allType == '') {
allType = item.faultType;
} else {
allType = allType + ',' + item.faultType;
}
}
});
}
filter.faultType = allType;
searchOptionsFaultType.value[0].value = allType;
}
const searchOptionsLineId = ref<{ label: string; value: number }[]>([
{ label: '全部', value: 0 },
]);
async function queryLineInfo() {
try {
let response = await pageQuery({
current: 1,
size: 50,
});
response.records.forEach((info) => {
searchOptionsLineId.value.push({ label: info.name, value: info.lineId });
});
} catch (err) {
const error = err as ApiError;
$q.notify({
type: 'negative',
message: error.title,
});
}
}
function searchTable() {
tableRef.value?.requestServerInteraction();
}
onMounted(() => {
queryLineInfo();
queryAllFaultType();
setTimeout(() => {
searchTable();
}, 1000);
});
</script>
<style lang='scss' scoped>
.changeBackground {
background-color: #31ccec;
}
.custom-column {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.message-tip {
width: 300px;
overflow: auto;
line-height: 22px;
white-space: pre-wrap;
font-size: 14px;
}
.button-container {
display: flex;
justify-content: center;
margin-top: 10px;
}
.dialogContainer {
display: flex;
height: calc(100vh - 120px);
.left {
width: calc(50vw + 60px);
}
.right {
flex: 1;
height: calc(100vh - 120px);
.detaiRow {
margin: 10px 0 0 20px;
.text {
width: 450px;
word-wrap: break-word;
margin-bottom: 10px;
font-size: 18px;
.textHead {
font-weight: 600;
}
}
.box-card {
width: 98%;
height: calc(50vh - 115px);
margin-bottom: 10px;
padding: 0 5px;
.head {
padding: 5px 5px;
font-size: 20px;
font-weight: 600;
}
.detail {
margin-bottom: 10px;
padding: 5px 5px;
line-height: 28px;
white-space: pre-wrap;
font-size: 20px;
}
}
}
}
}
</style>

View File

@ -37,7 +37,12 @@ export namespace alert {
SWITCH_LOST_INTERLOCK_AREA = 22,
INTERLOCK_LEVEL_ONE = 23,
PLATFORM_EMERG_STOP = 24,
SWITCH_JAMMED = 25
SWITCH_JAMMED = 25,
INTERLOCKED_ZC_FAULT = 26,
TRAIN_LOST_LOCATION = 27,
TRAIN_INTEGRITY_ALARM = 28,
TRAIN_FAULT_HELP = 29,
INTERLOCKED_ATS_STUCK = 30
}
export enum TipTimeConfig {
HOLIDAYS_MORN_PEAK = 0,

View File

@ -51,6 +51,11 @@ const routes: RouteRecordRaw[] = [
name: 'faultQuery',
component: () => import('pages/FaultQueryManage.vue'),
},
{
path: 'emergencyResponse',
name: 'emergencyResponse',
component: () => import('pages/EmergencyResponseManage.vue'),
},
{
path: 'thresholdValue',
name: 'thresholdValue',

View File

@ -33,7 +33,8 @@ export const useLineNetStore = defineStore('lineNet', {
alarmInfo: [] as AlarmInfo[], //报警信息
untreatedMap: new Map(), // 未处理的报警
alarmInfoListTable: undefined as QTable | undefined,
playAble: false, //是否允许播放音乐
playAble: false, //是否允许播放音乐(与页面交互之后为true)
handlePlayAble: true, //默认交互之后可播放音乐
closeAllAlarmInfoDialog: false,
connectButtonColor: 'green',
connectInfo: null as state.WarnLineMessage | null,
@ -99,12 +100,11 @@ export const useLineNetStore = defineStore('lineNet', {
data.msgs.forEach((item: state.WarnMessage) => {
if (!item.occRealConned) {
newTip =
newTip + `<div>${item.lineId}号线路与卡斯柯的实时连接已断开;</div>`;
newTip + `<div>${item.lineId}号线路与同方的实时连接已断开;</div>`;
}
if (!item.occUnrealConned) {
newTip =
newTip +
`<div>${item.lineId}号线路与卡斯柯的非实时连接已断开</div>`;
newTip + `<div>${item.lineId}号线路与同方的非实时连接已断开</div>`;
}
});
if (newTip && (newTip !== tip || !msgNotify)) {

@ -1 +1 @@
Subproject commit a7b726826b89520f047c268415702df8116d225f
Subproject commit 0f95f00449d14672b382f03727b34e339131786b