Compare commits

...

2 Commits

Author SHA1 Message Date
joylink_fanyuhong 48c9adc9dc Merge branch 'develop' of https://gitea.joylink.club/joylink/xian-ncc-da-client into develop 2024-11-20 10:17:35 +08:00
joylink_fanyuhong d02295b206 跳转ats判断逻辑调整 2024-11-20 10:17:32 +08:00
3 changed files with 18 additions and 7 deletions

View File

@ -23,6 +23,7 @@ import { RunLineGraphicHitArea } from 'src/graphics/runLine/RunLineDrawAssistant
import { Dialog } from 'quasar';
import SetDashLineDialog from '../../components/draw-app/dialogs/SetDashLineDialog.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 {
constructor(data?: graphicData.RunLine) {
@ -235,7 +236,6 @@ export class DrawRunLinePlugin extends GraphicInteractionPlugin<RunLine> {
});
};
setGrayLineConfig.handler = () => {
console.log(runLine.datas, '11111');
Dialog.create({
title: '设置灰线段',
message: '',
@ -280,10 +280,22 @@ export class RunLineOperateInteraction extends GraphicInteractionPlugin<RunLine>
g.cursor = 'pointer';
g.lineBody.hitArea = new RunLineGraphicHitArea(g);
g.selectable = true;
g.on('_leftclick', this.leftClick, this);
}
unbind(g: RunLine): void {
g.selectable = false;
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;
}
}
}

View File

@ -35,13 +35,10 @@ watch(
}
);
watch(
() => lineNetStore.selectedGraphic,
() => lineNetStore.jumpLineCount,
(val) => {
if (val && lineNetStore.selectedGraphicType == RunLine.Type) {
const lineId = (val as RunLine)?.datas.lineId;
if (lineId) {
router.replace(`/line/monitor/${lineId}`);
}
if (val) {
router.replace(`/line/monitor/${lineNetStore.jumpLineId}`);
}
}
);

View File

@ -38,6 +38,8 @@ export const useLineNetStore = defineStore('lineNet', {
closeAllAlarmInfoDialog: false,
connectButtonColor: 'green',
connectInfo: null as state.WarnLineMessage | null,
jumpLineCount: 0,
jumpLineId: '',
}),
getters: {
untreatedNum: (state) => {