Compare commits
2 Commits
d142917797
...
48c9adc9dc
Author | SHA1 | Date | |
---|---|---|---|
|
48c9adc9dc | ||
|
d02295b206 |
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,13 +35,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}`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -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