Merge remote-tracking branch 'origin/develop' into local-test
All checks were successful
local-test分支构建发布 / Docker-Build (push) Successful in 1m49s
All checks were successful
local-test分支构建发布 / Docker-Build (push) Successful in 1m49s
# Conflicts: # src/components/dialog/FaultQueryDialog.vue
This commit is contained in:
commit
5269e91153
@ -5,7 +5,7 @@
|
||||
@show="onDialogShow"
|
||||
title="故障查询"
|
||||
:width="990"
|
||||
:height="580"
|
||||
:height="600"
|
||||
>
|
||||
<div class="dialogContainer">
|
||||
<q-table
|
||||
@ -17,7 +17,7 @@
|
||||
:columns="columns"
|
||||
@request="onRequest"
|
||||
:rows-per-page-options="[10, 20, 50, 100]"
|
||||
style="width: 500px; height: 580px"
|
||||
style="width: 500px; height: 600px"
|
||||
>
|
||||
<template v-slot:body="props">
|
||||
<q-tr
|
||||
@ -45,7 +45,7 @@
|
||||
</template>
|
||||
</q-table>
|
||||
|
||||
<q-scroll-area style="width: 490px; height: 560px">
|
||||
<q-scroll-area style="width: 490px; height: 580px">
|
||||
<div class="detaiRow">
|
||||
<div class="text">
|
||||
<span class="textHead">故障类型</span> :{{
|
||||
@ -200,6 +200,11 @@ const onRequest: QTable['onRequest'] = async (props) => {
|
||||
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({
|
||||
@ -331,7 +336,7 @@ const onDialogShow = () => {
|
||||
}
|
||||
.box-card {
|
||||
width: 450px;
|
||||
height: 225px;
|
||||
height: 235px;
|
||||
margin-bottom: 10px;
|
||||
padding: 0 5px;
|
||||
.head {
|
||||
|
@ -108,7 +108,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted, onUnmounted, computed } from 'vue';
|
||||
import { ref, reactive, onMounted, onUnmounted, computed, watch } from 'vue';
|
||||
import SysMenu from 'src/components/SysMenu.vue';
|
||||
import { useRouter, useRoute } from 'vue-router';
|
||||
import { Dialog, DialogChainObject, useQuasar } from 'quasar';
|
||||
@ -141,6 +141,17 @@ const router = useRouter();
|
||||
const route = useRoute();
|
||||
const lineStore = useLineStore();
|
||||
const lineNetStore = useLineNetStore();
|
||||
|
||||
watch(
|
||||
() => route.path,
|
||||
() => {
|
||||
if (!route.path.includes('line/monitor') && faultQueryDialogInstance) {
|
||||
faultQueryDialogInstance.hide();
|
||||
faultQueryDialogInstance = null;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
function toggleLeftDrawer() {
|
||||
leftDrawerOpen.value = !leftDrawerOpen.value;
|
||||
onResize();
|
||||
@ -187,8 +198,10 @@ onMounted(() => {
|
||||
socket = webSocketConnect(destination, handler);
|
||||
});
|
||||
|
||||
let faultQueryDialogInstance: DialogChainObject | null = null;
|
||||
function openFaultQueryDialog() {
|
||||
$q.dialog({
|
||||
if (faultQueryDialogInstance) return;
|
||||
faultQueryDialogInstance = $q.dialog({
|
||||
component: FaultQueryDialog,
|
||||
});
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import {
|
||||
cancelSubscribe,
|
||||
} from 'src/drawApp/lineNetApp';
|
||||
import { markRaw } from 'vue';
|
||||
import { Notify, QTable } from 'quasar';
|
||||
import { Notify, QNotifyUpdateOptions, QTable } from 'quasar';
|
||||
import { state } from 'src/protos/system_warn_message';
|
||||
export interface AlarmInfo {
|
||||
id: string;
|
||||
@ -22,6 +22,10 @@ export interface AlarmInfo {
|
||||
alert_location_id: number;
|
||||
alarmStatus?: number;
|
||||
}
|
||||
let msgNotify: null | ((props?: QNotifyUpdateOptions | undefined) => void) =
|
||||
null;
|
||||
let tip = '';
|
||||
|
||||
export const useLineNetStore = defineStore('lineNet', {
|
||||
state: () => ({
|
||||
selectedGraphics: null as JlGraphic[] | null,
|
||||
@ -91,27 +95,24 @@ export const useLineNetStore = defineStore('lineNet', {
|
||||
});
|
||||
},
|
||||
setConnectInfo(data: state.WarnLineMessage) {
|
||||
let tip = '';
|
||||
let newTip = '';
|
||||
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 +
|
||||
`<div>${elem.lineId}号线路与卡斯柯的实时连接已断开;</div>`;
|
||||
}
|
||||
if (elem.occUnrealConned && !item.occUnrealConned) {
|
||||
tip =
|
||||
tip +
|
||||
`<div>${elem.lineId}号线路与卡斯柯的非实时连接已断开</div>`;
|
||||
if (!item.occRealConned) {
|
||||
newTip =
|
||||
newTip + `<div>${item.lineId}号线路与卡斯柯的实时连接已断开;</div>`;
|
||||
}
|
||||
if (!item.occUnrealConned) {
|
||||
newTip =
|
||||
newTip +
|
||||
`<div>${item.lineId}号线路与卡斯柯的非实时连接已断开</div>`;
|
||||
}
|
||||
});
|
||||
if (newTip && (newTip !== tip || !msgNotify)) {
|
||||
if (msgNotify) {
|
||||
msgNotify();
|
||||
}
|
||||
});
|
||||
if (tip) {
|
||||
const msgNotify = Notify.create({
|
||||
tip = newTip;
|
||||
msgNotify = Notify.create({
|
||||
type: 'negative',
|
||||
timeout: 0,
|
||||
position: 'top',
|
||||
@ -122,11 +123,17 @@ export const useLineNetStore = defineStore('lineNet', {
|
||||
icon: 'close',
|
||||
color: 'white',
|
||||
handler: () => {
|
||||
if (msgNotify) {
|
||||
msgNotify();
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
} else if (!newTip) {
|
||||
if (msgNotify) {
|
||||
msgNotify();
|
||||
}
|
||||
}
|
||||
this.connectInfo = data;
|
||||
const allConnectAmount = data.msgs.reduce((pre, cur) => {
|
||||
|
Loading…
Reference in New Issue
Block a user