diff --git a/src/components/dialog/FaultQueryDialog.vue b/src/components/dialog/FaultQueryDialog.vue index c9f9267..97eafb1 100644 --- a/src/components/dialog/FaultQueryDialog.vue +++ b/src/components/dialog/FaultQueryDialog.vue @@ -3,11 +3,11 @@ seamless ref="dialogRef" @show="onDialogShow" - :title="props.dialogTitle" + title="故障查询" :width="990" - :height="0" + :height="580" > - + + +
+
+ 故障类型 :{{ + clickRowInfo.faultType + }} +
+
+ {{ showTitle.faultNameShower }}:{{ clickRowInfo.faultNameShower }} +
+ +
{{ showTitle.faultDriverShower }}
+ +
+
{{ clickRowInfo.faultDriverShower }}
+
+
+ +
{{ showTitle.resultMsg }}
+ +
+
{{ clickRowInfo.resultMsg }}
+
+
+
+
+ - diff --git a/src/drawApp/lineNetApp.ts b/src/drawApp/lineNetApp.ts index ab23b88..42dd35c 100644 --- a/src/drawApp/lineNetApp.ts +++ b/src/drawApp/lineNetApp.ts @@ -157,7 +157,7 @@ export function cancelSubscribe(lineNetApp: IGraphicApp) { } let monitorDestinations: string[] = []; -export function handleSubscribe(lineNetApp: IGraphicApp) { +function handleSubscribe(lineNetApp: IGraphicApp) { const lineNetStore = useLineNetStore(); lineNetApp.enableWsMassaging({ wsUrl: `${getWebsocketUrl()}`, diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index 1315359..a5d5d0b 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -18,16 +18,9 @@ - { socket = webSocketConnect(destination, handler); }); -function openFaultQueryDialog(dialogTitle: string) { +function openFaultQueryDialog() { $q.dialog({ component: FaultQueryDialog, - componentProps: { - dialogTitle, - }, }); } diff --git a/src/stores/line-net-store.ts b/src/stores/line-net-store.ts index c805161..975caab 100644 --- a/src/stores/line-net-store.ts +++ b/src/stores/line-net-store.ts @@ -7,7 +7,7 @@ import { cancelSubscribe, } from 'src/drawApp/lineNetApp'; import { markRaw } from 'vue'; -import { QTable } from 'quasar'; +import { Notify, QTable } from 'quasar'; import { state } from 'src/protos/system_warn_message'; export interface AlarmInfo { id: string; @@ -91,6 +91,43 @@ export const useLineNetStore = defineStore('lineNet', { }); }, setConnectInfo(data: state.WarnLineMessage) { + let tip = ''; + data.msgs.forEach((item: state.WarnMessage) => { + if (this.connectInfo) { + this.connectInfo.msgs.forEach((elem) => { + if (elem.lineId === item.lineId) { + if (elem.occRealConned && !item.occRealConned) { + tip = + tip + + `
${elem.lineId}号线路与卡斯柯的实时连接已断开;
`; + } + if (elem.occUnrealConned && !item.occUnrealConned) { + tip = + tip + + `
${elem.lineId}号线路与卡斯柯的非实时连接已断开
`; + } + } + }); + } + }); + if (tip) { + const msgNotify = Notify.create({ + type: 'negative', + timeout: 0, + position: 'top', + html: true, + message: tip, + actions: [ + { + icon: 'close', + color: 'white', + handler: () => { + msgNotify(); + }, + }, + ], + }); + } this.connectInfo = data; const allConnectAmount = data.msgs.reduce((pre, cur) => { let addValue = 0;