道岔
This commit is contained in:
parent
d1f03f2cfc
commit
bae53824c3
@ -23,7 +23,7 @@
|
|||||||
"echarts": "^5.4.3",
|
"echarts": "^5.4.3",
|
||||||
"google-protobuf": "^3.21.2",
|
"google-protobuf": "^3.21.2",
|
||||||
"jl-graphic": "git+https://git.code.tencent.com/jl-framework/graphic-pixi.git#v0.1.8",
|
"jl-graphic": "git+https://git.code.tencent.com/jl-framework/graphic-pixi.git#v0.1.8",
|
||||||
"rt-graphic-component": "git+https://git.code.tencent.com/jl-framework/rt-graphic-component.git#5eecd80",
|
"rt-graphic-component": "git+https://git.code.tencent.com/jl-framework/rt-graphic-component.git#c7eb525",
|
||||||
"js-base64": "^3.7.5",
|
"js-base64": "^3.7.5",
|
||||||
"pinia": "^2.0.11",
|
"pinia": "^2.0.11",
|
||||||
"quasar": "^2.6.0",
|
"quasar": "^2.6.0",
|
||||||
|
@ -101,6 +101,12 @@ import { useFormData } from 'src/components/DrawAppFormUtils';
|
|||||||
import AddCentralizedStationDialog from '../dialogs/AddCentralizedStationDialog.vue';
|
import AddCentralizedStationDialog from '../dialogs/AddCentralizedStationDialog.vue';
|
||||||
import { Station } from 'src/graphics/station/Station';
|
import { Station } from 'src/graphics/station/Station';
|
||||||
|
|
||||||
|
enum DevicePort {
|
||||||
|
A = 0,
|
||||||
|
B = 1,
|
||||||
|
C = 2,
|
||||||
|
}
|
||||||
|
|
||||||
const drawStore = useDrawStore();
|
const drawStore = useDrawStore();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
@ -157,9 +163,9 @@ const sectionRelations = computed(() => {
|
|||||||
);
|
);
|
||||||
return sectionRelations.map(
|
return sectionRelations.map(
|
||||||
(relation) =>
|
(relation) =>
|
||||||
`${relation.getRelationParam(turnout).param}: ${
|
`${DevicePort[relation.getRelationParam(turnout).param]}: ${
|
||||||
relation.getOtherGraphic<Section>(turnout).datas.code
|
relation.getOtherGraphic<Section>(turnout).datas.code
|
||||||
}(${relation.getOtherRelationParam(turnout).param})`
|
}(${DevicePort[relation.getOtherRelationParam(turnout).param]})`
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -173,9 +179,9 @@ const turnoutRelations = computed(() => {
|
|||||||
);
|
);
|
||||||
return turnoutRelations.map(
|
return turnoutRelations.map(
|
||||||
(relation) =>
|
(relation) =>
|
||||||
`${relation.getRelationParam(turnout).param}: ${
|
`${DevicePort[relation.getRelationParam(turnout).param]}: ${
|
||||||
relation.getOtherGraphic<Turnout>(turnout).datas.code
|
relation.getOtherGraphic<Turnout>(turnout).datas.code
|
||||||
}(${relation.getOtherRelationParam(turnout).param})`
|
}(${DevicePort[relation.getOtherRelationParam(turnout).param]})`
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -62,6 +62,7 @@ import {
|
|||||||
Turnout,
|
Turnout,
|
||||||
TurnoutTemplate,
|
TurnoutTemplate,
|
||||||
TurnoutDraw,
|
TurnoutDraw,
|
||||||
|
handleData,
|
||||||
} from 'src/graphics/turnout/Turnout';
|
} from 'src/graphics/turnout/Turnout';
|
||||||
import { TurnoutData, TurnoutStates } from './graphics/TurnoutInteraction';
|
import { TurnoutData, TurnoutStates } from './graphics/TurnoutInteraction';
|
||||||
import { Section, SectionTemplate } from 'src/graphics/section/Section';
|
import { Section, SectionTemplate } from 'src/graphics/section/Section';
|
||||||
@ -187,7 +188,12 @@ export function initCommonDrawApp(app: IDrawApp) {
|
|||||||
new SignalDraw(app, new SignalTemplate(new SignalData(), new SignalState()));
|
new SignalDraw(app, new SignalTemplate(new SignalData(), new SignalState()));
|
||||||
new TurnoutDraw(
|
new TurnoutDraw(
|
||||||
app,
|
app,
|
||||||
new TurnoutTemplate(new TurnoutData(), new TurnoutStates(), StyleType.GP)
|
new TurnoutTemplate(
|
||||||
|
new TurnoutData(),
|
||||||
|
new TurnoutStates(),
|
||||||
|
StyleType.GP,
|
||||||
|
handleData
|
||||||
|
)
|
||||||
);
|
);
|
||||||
new TrainWindowDraw(app, new TrainWindowTemplate(new TrainWindowData()));
|
new TrainWindowDraw(app, new TrainWindowTemplate(new TrainWindowData()));
|
||||||
new OneClickGenerateDraw(app, new OneClickGenerateTemplate());
|
new OneClickGenerateDraw(app, new OneClickGenerateTemplate());
|
||||||
|
@ -49,7 +49,11 @@ import {
|
|||||||
TurnoutOperationPlugin,
|
TurnoutOperationPlugin,
|
||||||
TurnoutStates,
|
TurnoutStates,
|
||||||
} from './graphics/TurnoutInteraction';
|
} from './graphics/TurnoutInteraction';
|
||||||
import { Turnout, TurnoutTemplate } from 'src/graphics/turnout/Turnout';
|
import {
|
||||||
|
Turnout,
|
||||||
|
TurnoutTemplate,
|
||||||
|
handleData,
|
||||||
|
} from 'src/graphics/turnout/Turnout';
|
||||||
import {
|
import {
|
||||||
SectionData,
|
SectionData,
|
||||||
SectionOperateInteraction,
|
SectionOperateInteraction,
|
||||||
@ -237,7 +241,12 @@ export function initLineScene(lineApp: IGraphicApp, sceneName: string) {
|
|||||||
new PlatformTemplate(new PlatformData(), new PlatformState(), StyleType.GP),
|
new PlatformTemplate(new PlatformData(), new PlatformState(), StyleType.GP),
|
||||||
new ScreenDoorTemplate(new ScreenDoorData(), new ScreenDoorState()),
|
new ScreenDoorTemplate(new ScreenDoorData(), new ScreenDoorState()),
|
||||||
new StationTemplate(new StationData(), new StationState(), StyleType.GP),
|
new StationTemplate(new StationData(), new StationState(), StyleType.GP),
|
||||||
new TurnoutTemplate(new TurnoutData(), new TurnoutStates(), StyleType.GP),
|
new TurnoutTemplate(
|
||||||
|
new TurnoutData(),
|
||||||
|
new TurnoutStates(),
|
||||||
|
StyleType.GP,
|
||||||
|
handleData
|
||||||
|
),
|
||||||
new SectionTemplate(new SectionData(), new SectionStates()),
|
new SectionTemplate(new SectionData(), new SectionStates()),
|
||||||
new AxleCountingTemplate(new AxleCountingData()),
|
new AxleCountingTemplate(new AxleCountingData()),
|
||||||
new TrainWindowTemplate(new TrainWindowData()),
|
new TrainWindowTemplate(new TrainWindowData()),
|
||||||
|
@ -7,6 +7,8 @@ import {
|
|||||||
import { TurnoutTemplate } from 'rt-graphic-component/components/packages/Turnout/common/TurnoutTemplate';
|
import { TurnoutTemplate } from 'rt-graphic-component/components/packages/Turnout/common/TurnoutTemplate';
|
||||||
import { IGPTurnoutState as ITurnoutState } from 'rt-graphic-component/components/packages/Turnout/GPTurnout';
|
import { IGPTurnoutState as ITurnoutState } from 'rt-graphic-component/components/packages/Turnout/GPTurnout';
|
||||||
import { TurnoutDraw } from 'rt-graphic-component/components/packages/Turnout/common/TurnoutDrawAssistant';
|
import { TurnoutDraw } from 'rt-graphic-component/components/packages/Turnout/common/TurnoutDrawAssistant';
|
||||||
|
import { IRelatedRef } from 'rt-graphic-component/components/common/common';
|
||||||
|
import { graphicData } from 'src/protos/stationLayoutGraphics';
|
||||||
|
|
||||||
export { Turnout, TurnoutTemplate, TurnoutDraw, TurnoutConsts };
|
export { Turnout, TurnoutTemplate, TurnoutDraw, TurnoutConsts };
|
||||||
export type { ITurnoutState, ITurnoutData, TurnoutSection };
|
export type { ITurnoutState, ITurnoutData, TurnoutSection };
|
||||||
@ -16,3 +18,12 @@ export enum TurnoutPort {
|
|||||||
B = 1,
|
B = 1,
|
||||||
C = 2,
|
C = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleTurnoutRefDeviceData(data: IRelatedRef) {
|
||||||
|
const protoData = new graphicData.RelatedRef(data);
|
||||||
|
return protoData;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const handleData = {
|
||||||
|
handleRefDeviceData: handleTurnoutRefDeviceData,
|
||||||
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user