Compare commits
12 Commits
5c9f6c4a43
...
dd6fd1ed80
Author | SHA1 | Date | |
---|---|---|---|
|
dd6fd1ed80 | ||
|
dd7cb75ceb | ||
|
6252bf426c | ||
|
342aff6ebd | ||
|
ca8a2fb279 | ||
|
718835302e | ||
|
59ffd45dfb | ||
|
2070142e56 | ||
|
48c9adc9dc | ||
|
d02295b206 | ||
|
d142917797 | ||
|
c514486354 |
@ -23,6 +23,7 @@ import { RunLineGraphicHitArea } from 'src/graphics/runLine/RunLineDrawAssistant
|
|||||||
import { Dialog } from 'quasar';
|
import { Dialog } from 'quasar';
|
||||||
import SetDashLineDialog from '../../components/draw-app/dialogs/SetDashLineDialog.vue';
|
import SetDashLineDialog from '../../components/draw-app/dialogs/SetDashLineDialog.vue';
|
||||||
import SetGaryLineDialog from '../../components/draw-app/dialogs/SetGaryLineDialog.vue';
|
import SetGaryLineDialog from '../../components/draw-app/dialogs/SetGaryLineDialog.vue';
|
||||||
|
import { useLineNetStore } from 'src/stores/line-net-store';
|
||||||
|
|
||||||
export class RunLineData extends GraphicDataBase implements IRunLineData {
|
export class RunLineData extends GraphicDataBase implements IRunLineData {
|
||||||
constructor(data?: graphicData.RunLine) {
|
constructor(data?: graphicData.RunLine) {
|
||||||
@ -235,7 +236,6 @@ export class DrawRunLinePlugin extends GraphicInteractionPlugin<RunLine> {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
setGrayLineConfig.handler = () => {
|
setGrayLineConfig.handler = () => {
|
||||||
console.log(runLine.datas, '11111');
|
|
||||||
Dialog.create({
|
Dialog.create({
|
||||||
title: '设置灰线段',
|
title: '设置灰线段',
|
||||||
message: '',
|
message: '',
|
||||||
@ -280,10 +280,22 @@ export class RunLineOperateInteraction extends GraphicInteractionPlugin<RunLine>
|
|||||||
g.cursor = 'pointer';
|
g.cursor = 'pointer';
|
||||||
g.lineBody.hitArea = new RunLineGraphicHitArea(g);
|
g.lineBody.hitArea = new RunLineGraphicHitArea(g);
|
||||||
g.selectable = true;
|
g.selectable = true;
|
||||||
|
g.on('_leftclick', this.leftClick, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
unbind(g: RunLine): void {
|
unbind(g: RunLine): void {
|
||||||
g.selectable = false;
|
g.selectable = false;
|
||||||
g.eventMode = 'none';
|
g.eventMode = 'none';
|
||||||
|
g.off('_leftclick', this.leftClick, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
leftClick(e: FederatedMouseEvent) {
|
||||||
|
const target = e.target as DisplayObject;
|
||||||
|
const runLine = target.getGraphic() as RunLine;
|
||||||
|
const lineId = runLine.datas.lineId;
|
||||||
|
if (lineId) {
|
||||||
|
useLineNetStore().jumpLineCount++;
|
||||||
|
useLineNetStore().jumpLineId = lineId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -330,7 +330,7 @@ class codeGraph extends Container {
|
|||||||
this.stopTime.visible = true;
|
this.stopTime.visible = true;
|
||||||
this.stopTime.text = stateData.stopTime;
|
this.stopTime.text = stateData.stopTime;
|
||||||
}
|
}
|
||||||
if (stateData.bizWaitTimeSec && useLineStore().faultStatistics) {
|
if (useLineStore().faultStatistics) {
|
||||||
const minutes = Math.floor(stateData.bizWaitTimeSec / 60);
|
const minutes = Math.floor(stateData.bizWaitTimeSec / 60);
|
||||||
const seconds = stateData.bizWaitTimeSec % 60;
|
const seconds = stateData.bizWaitTimeSec % 60;
|
||||||
let minutesString = '' + minutes;
|
let minutesString = '' + minutes;
|
||||||
@ -343,7 +343,9 @@ class codeGraph extends Container {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.waitSec.visible = true;
|
this.waitSec.visible = true;
|
||||||
this.waitSec.text = `乘客已经等待了${minutesString}:${secondsString}`;
|
this.waitSec.text = `${minutesString}:${secondsString}`;
|
||||||
|
} else {
|
||||||
|
this.waitSec.visible = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,13 +51,26 @@
|
|||||||
label="返回"
|
label="返回"
|
||||||
@click="backConfirm"
|
@click="backConfirm"
|
||||||
/>
|
/>
|
||||||
<q-toggle
|
<q-btn
|
||||||
v-model="lineStore.faultStatistics"
|
round
|
||||||
checked-icon="check"
|
dense
|
||||||
color="red"
|
flat
|
||||||
label="故障信息统计"
|
:color="lineStore.faultStatistics ? 'white' : 'red'"
|
||||||
unchecked-icon="clear"
|
:icon="lineStore.faultStatistics ? 'grid_on' : 'grid_off'"
|
||||||
/>
|
@click="
|
||||||
|
() => {
|
||||||
|
lineStore.faultStatistics = !lineStore.faultStatistics;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<q-tooltip style="font-size: 14px">
|
||||||
|
{{
|
||||||
|
lineStore.faultStatistics
|
||||||
|
? '关闭故障信息统计'
|
||||||
|
: '开启故障信息统计'
|
||||||
|
}}
|
||||||
|
</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
<q-btn
|
<q-btn
|
||||||
round
|
round
|
||||||
dense
|
dense
|
||||||
@ -81,6 +94,9 @@
|
|||||||
@click="$q.fullscreen.toggle()"
|
@click="$q.fullscreen.toggle()"
|
||||||
v-if="$q.screen.gt.sm"
|
v-if="$q.screen.gt.sm"
|
||||||
>
|
>
|
||||||
|
<q-tooltip style="font-size: 14px">
|
||||||
|
{{ $q.fullscreen.isActive ? '关闭全屏' : '开启全屏' }}
|
||||||
|
</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<q-btn
|
||||||
flat
|
flat
|
||||||
@ -89,7 +105,9 @@
|
|||||||
icon="connected_tv"
|
icon="connected_tv"
|
||||||
:color="lineNetStore.connectButtonColor"
|
:color="lineNetStore.connectButtonColor"
|
||||||
@click="openConnectInfoDialog"
|
@click="openConnectInfoDialog"
|
||||||
/>
|
>
|
||||||
|
<q-tooltip style="font-size: 14px">与同方连接状态</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
<q-btn-dropdown
|
<q-btn-dropdown
|
||||||
flat
|
flat
|
||||||
stretch
|
stretch
|
||||||
|
@ -5,19 +5,73 @@
|
|||||||
</q-page-container>
|
</q-page-container>
|
||||||
<div
|
<div
|
||||||
v-if="faultInfo"
|
v-if="faultInfo"
|
||||||
style="position: fixed; right: 0; top: 10%; background: white"
|
style="
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 10px;
|
||||||
|
background: white;
|
||||||
|
width: 400px;
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<div style="width: 100%; text-align: right" class="bg-primary q-pa-ms">
|
<div style="width: 100%; text-align: right" class="bg-primary q-pa-ms">
|
||||||
<q-icon
|
<q-icon
|
||||||
name="close"
|
name="add_circle"
|
||||||
size="xs"
|
size="md"
|
||||||
|
v-if="faultInfoMin"
|
||||||
|
style="cursor: pointer"
|
||||||
|
@click="() => (faultInfoMin = false)"
|
||||||
|
/>
|
||||||
|
<q-icon
|
||||||
|
name="remove_circle"
|
||||||
|
size="md"
|
||||||
|
v-if="!faultInfoMin"
|
||||||
|
style="cursor: pointer"
|
||||||
|
@click="() => (faultInfoMin = true)"
|
||||||
|
/>
|
||||||
|
<q-icon
|
||||||
|
name="cancel"
|
||||||
|
size="md"
|
||||||
style="cursor: pointer"
|
style="cursor: pointer"
|
||||||
@click="() => (faultInfo = false)"
|
@click="() => (faultInfo = false)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="q-pa-ms column" style="background: white; max-width: 400px">
|
<div
|
||||||
|
v-if="!faultInfoMin"
|
||||||
|
class="q-pa-ms"
|
||||||
|
style="
|
||||||
|
background: white;
|
||||||
|
max-width: 400px;
|
||||||
|
height: 268px;
|
||||||
|
overflow-y: scroll;
|
||||||
|
"
|
||||||
|
>
|
||||||
<template v-for="(item, index) in timeInfoLabel" :key="index">
|
<template v-for="(item, index) in timeInfoLabel" :key="index">
|
||||||
<q-chip
|
<div
|
||||||
|
class="row justify-between q-ma-sm bg-blue text-white"
|
||||||
|
style="border-radius: 5px; padding: 5px"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
max-width: 250px;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
{{ item.split('--')[0] }}
|
||||||
|
<q-tooltip>{{ item.split('--')[0] }}</q-tooltip>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span>{{ item.split('--')[1] }}</span>
|
||||||
|
<q-icon
|
||||||
|
name="cancel"
|
||||||
|
size="xs"
|
||||||
|
style="cursor: pointer; margin-left: 10px"
|
||||||
|
@click="handleRemoveInfo(index)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <q-chip
|
||||||
removable
|
removable
|
||||||
@remove="handleRemoveInfo(index)"
|
@remove="handleRemoveInfo(index)"
|
||||||
color="primary"
|
color="primary"
|
||||||
@ -26,7 +80,7 @@
|
|||||||
:label="item"
|
:label="item"
|
||||||
>
|
>
|
||||||
<q-tooltip v-if="item.length > 34"> {{ item }} </q-tooltip>
|
<q-tooltip v-if="item.length > 34"> {{ item }} </q-tooltip>
|
||||||
</q-chip>
|
</q-chip> -->
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -39,6 +93,7 @@ import { useLineStore } from 'src/stores/line-store';
|
|||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { AlarmInfo, useLineNetStore } from 'src/stores/line-net-store';
|
import { AlarmInfo, useLineNetStore } from 'src/stores/line-net-store';
|
||||||
import { showAlertTypeData } from 'src/components/alarm/alarmInfoEnum';
|
import { showAlertTypeData } from 'src/components/alarm/alarmInfoEnum';
|
||||||
|
import { Platform } from 'src/graphics/platform/Platform';
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
@ -51,6 +106,7 @@ const route = useRoute();
|
|||||||
const lineStore = useLineStore();
|
const lineStore = useLineStore();
|
||||||
const lineNetStore = useLineNetStore();
|
const lineNetStore = useLineNetStore();
|
||||||
const faultInfo = ref(false);
|
const faultInfo = ref(false);
|
||||||
|
const faultInfoMin = ref(false);
|
||||||
const alarmInfoList: AlarmInfo[] = reactive([]);
|
const alarmInfoList: AlarmInfo[] = reactive([]);
|
||||||
let timeInterval = null;
|
let timeInterval = null;
|
||||||
let timeInfoLabel: string[] = reactive([]);
|
let timeInfoLabel: string[] = reactive([]);
|
||||||
@ -124,6 +180,18 @@ watch(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => lineStore.faultStatistics,
|
||||||
|
() => {
|
||||||
|
const platfroms = lineStore
|
||||||
|
.getLineApp()
|
||||||
|
.queryStore.queryByType<Platform>(Platform.Type);
|
||||||
|
platfroms.forEach((platfrom) => {
|
||||||
|
platfrom.changeState();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const lineId = Number(route.params.lineId);
|
const lineId = Number(route.params.lineId);
|
||||||
const lineApp = lineStore.initLineApp(lineId);
|
const lineApp = lineStore.initLineApp(lineId);
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, onUnmounted, watch } from 'vue';
|
import { onMounted, onUnmounted, watch } from 'vue';
|
||||||
import { useLineNetStore } from 'src/stores/line-net-store';
|
import { useLineNetStore } from 'src/stores/line-net-store';
|
||||||
import { RunLine } from 'src/graphics/runLine/RunLine';
|
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
@ -35,13 +34,10 @@ watch(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
watch(
|
watch(
|
||||||
() => lineNetStore.selectedGraphic,
|
() => lineNetStore.jumpLineCount,
|
||||||
(val) => {
|
(val) => {
|
||||||
if (val && lineNetStore.selectedGraphicType == RunLine.Type) {
|
if (val) {
|
||||||
const lineId = (val as RunLine)?.datas.lineId;
|
router.replace(`/line/monitor/${lineNetStore.jumpLineId}`);
|
||||||
if (lineId) {
|
|
||||||
router.replace(`/line/monitor/${lineId}`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -151,12 +151,6 @@ const columnDefs: QTableColumn[] = [
|
|||||||
field: 'registerTime',
|
field: 'registerTime',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'mobile',
|
|
||||||
label: '手机号',
|
|
||||||
field: 'mobile',
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
@ -237,7 +231,6 @@ function getAllRole() {
|
|||||||
function edieUserData(row: User) {
|
function edieUserData(row: User) {
|
||||||
userInfo.id = row.id;
|
userInfo.id = row.id;
|
||||||
userInfo.name = row.name;
|
userInfo.name = row.name;
|
||||||
userInfo.mobile = row.mobile;
|
|
||||||
userInfo.registerTime = row.registerTime;
|
userInfo.registerTime = row.registerTime;
|
||||||
if (row?.roleList) {
|
if (row?.roleList) {
|
||||||
userInfo.roleList = row.roleList;
|
userInfo.roleList = row.roleList;
|
||||||
|
@ -38,6 +38,8 @@ export const useLineNetStore = defineStore('lineNet', {
|
|||||||
closeAllAlarmInfoDialog: false,
|
closeAllAlarmInfoDialog: false,
|
||||||
connectButtonColor: 'green',
|
connectButtonColor: 'green',
|
||||||
connectInfo: null as state.WarnLineMessage | null,
|
connectInfo: null as state.WarnLineMessage | null,
|
||||||
|
jumpLineCount: 0,
|
||||||
|
jumpLineId: '',
|
||||||
}),
|
}),
|
||||||
getters: {
|
getters: {
|
||||||
untreatedNum: (state) => {
|
untreatedNum: (state) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user