This commit is contained in:
fan 2023-12-13 17:56:13 +08:00
parent 40983afcd0
commit d2dba9f3e0
13 changed files with 31 additions and 31 deletions

@ -1 +1 @@
Subproject commit 87c59e79299ffc92383b0c88188e03a50a3ecbbd
Subproject commit 9c1d8889e2b0fdcc3f931259a8d2ebc2952285a4

View File

@ -109,9 +109,9 @@
<slope-property
v-else-if="drawStore.selectedGraphicType === Slope.Type"
></slope-property>
<link-property
<!-- <link-property
v-else-if="drawStore.selectedGraphicType === Link.Type"
></link-property>
></link-property> -->
<curvature-property
v-else-if="drawStore.selectedGraphicType === Curvature.Type"
></curvature-property>
@ -197,7 +197,7 @@ import { SlopeKiloMarker } from 'src/graphics/slopeKiloMarker/SlopeKiloMarker';
import { Slope } from 'src/graphics/slope/Slope';
import SlopeProperty from './properties/SlopeProperty.vue';
import { Link } from 'src/graphics/link/Link';
import LinkProperty from './properties/LinkProperty.vue';
// import LinkProperty from './properties/LinkProperty.vue';
import { Curvature } from 'src/graphics/curvature/Curvature';
import CurvatureProperty from './properties/CurvatureProperty.vue';
import { Beacon } from 'src/graphics/beacon/Beacon';

View File

@ -40,7 +40,7 @@ async function onSubmit() {
if (!res) return;
const section = drawStore.selectedGraphic as Section;
const visited: string[] = [];
const visited: number[] = [];
const queue: {
node: Section | Turnout;

View File

@ -247,13 +247,13 @@ function addStation() {
component: AddCentralizedStationDialog,
cancel: true,
persistent: true,
}).onOk((data: string) => {
}).onOk((data: number) => {
sectionModel.centralizedStations.push(data);
onUpdate();
});
}
function getName(id: string) {
function getName(id: number) {
try {
const station = drawStore.getDrawApp().queryStore.queryById<Station>(id);
return station.datas.code;

View File

@ -77,7 +77,7 @@ async function onSubmit() {
if (!res) return;
const section = drawStore.selectedGraphic as Section;
const visited: string[] = [];
const visited: number[] = [];
const queue: {
node: Section | Turnout;
@ -100,7 +100,7 @@ async function onSubmit() {
[current.datas.paRef?.id, 'A'],
[current.datas.pbRef?.id, 'B'],
]
.filter((item): item is [string, 'A' | 'B'] => !!item[0])
.filter((item): item is [number, 'A' | 'B'] => !!item[0])
.forEach(([id, port]) => {
const target = current.queryStore.queryById<Section | Turnout>(id);
if (target instanceof Turnout) {
@ -145,7 +145,7 @@ async function onSubmit() {
[current.datas.paRef?.id, 'A'],
[current.datas.pbRef?.id, 'B'],
]
.filter((item): item is [string, 'A' | 'B'] => !!item[0])
.filter((item): item is [number, 'A' | 'B'] => !!item[0])
.forEach(([id, port]) => {
const target = current.queryStore.queryById<Section | Turnout>(id);
const isPortSame =

View File

@ -194,13 +194,13 @@ function addStation() {
component: AddCentralizedStationDialog,
cancel: true,
persistent: true,
}).onOk((data: string) => {
}).onOk((data: number) => {
signalModel.centralizedStations.push(data);
onUpdate();
});
}
function getName(id: string) {
function getName(id: number) {
try {
const station = drawStore.getDrawApp().queryStore.queryById<Station>(id);
return station.datas.code;

View File

@ -51,8 +51,8 @@ const { data: spksSwitchModel, onUpdate } = useFormData(
new SpksSwitchData(),
drawStore.getDrawApp()
);
const sectionList: { label: string; value: string }[] = reactive([]);
const platformList: { label: string; value: string }[] = reactive([]);
const sectionList: { label: string; value: number }[] = reactive([]);
const platformList: { label: string; value: number }[] = reactive([]);
onMounted(() => {
const sections = drawStore

View File

@ -111,7 +111,7 @@ const directionOptions = [
{ label: '右行', value: 1 },
];
let optionsStations = [];
let optionsStations: { label: string; value: number }[] = [];
watchEffect(() => {
if (

View File

@ -70,7 +70,7 @@ const { data: stopPositionModel, onUpdate } = useFormData(
new StopPositionData(),
drawStore.getDrawApp()
);
const sectionList: { label: string; value: string }[] = reactive([]);
const sectionList: { label: string; value: number }[] = reactive([]);
const directionOptions = [
{ label: '左行', value: 0 },
{ label: '右行', value: 1 },

View File

@ -138,7 +138,7 @@ function addStation() {
component: AddCentralizedStationDialog,
cancel: true,
persistent: true,
}).onOk((data: string) => {
}).onOk((data: number) => {
transponderModel.centralizedStations.push(data);
onUpdate();
});
@ -173,7 +173,7 @@ const turnoutRelations = computed(() => {
);
});
function getName(id: string) {
function getName(id: number) {
try {
const station = drawStore.getDrawApp().queryStore.queryById<Station>(id);
return station.datas.code;

View File

@ -141,7 +141,7 @@ function addStation() {
component: AddCentralizedStationDialog,
cancel: true,
persistent: true,
}).onOk((data: string) => {
}).onOk((data: number) => {
turnoutModel.centralizedStations.push(data);
onUpdate();
});
@ -179,7 +179,7 @@ const turnoutRelations = computed(() => {
);
});
function getName(id: string) {
function getName(id: number) {
try {
const station = drawStore.getDrawApp().queryStore.queryById<Station>(id);
return station.datas.code;

View File

@ -249,6 +249,7 @@ export function loadCommonDrawDatas(
storage: graphicData.RtssGraphicStorage
): GraphicData[] {
const datas: GraphicData[] = [];
console.log(storage, 'storage');
UniqueIdPrefix = storage.UniqueIdPrefix;
screenDoorConfig = storage.screenDoorConfig;
generateAxleCountingConfig = storage.generateAxleCountingConfig;

View File

@ -3,7 +3,6 @@ import {
GraphicState,
IGraphicApp,
IGraphicStorage,
IdGenerator,
GraphicQueryStore,
} from 'src/jl-graphic';
import { TrainState } from './graphics/TrainInteraction';
@ -121,8 +120,8 @@ import {
SlopeKiloMarkerTemplate,
} from 'src/graphics/slopeKiloMarker/SlopeKiloMarker';
import { SlopeKiloMarkerData } from './graphics/SlopeKiloMarkerInteraction';
import { Link, LinkTemplate } from 'src/graphics/link/Link';
import { LinkData } from './graphics/LinkInteraction';
// import { Link, LinkTemplate } from 'src/graphics/link/Link';
// import { LinkData } from './graphics/LinkInteraction';
import { Slope, SlopeTemplate } from 'src/graphics/slope/Slope';
import {
CurvatureKiloMarker,
@ -188,7 +187,7 @@ export const layerList = [
{ label: '门控箱', value: GatedBox.Type, defaultShow: true },
{ label: '紧急关闭按钮', value: EsbButton.Type, defaultShow: true },
{ label: '应答器', value: Transponder.Type, defaultShow: true },
{ label: 'Link', value: Link.Type, defaultShow: false },
// { label: 'Link', value: Link.Type, defaultShow: false },
{ label: '车次窗', value: TrainWindow.Type, defaultShow: false },
{ label: '计轴区段', value: AxleCountingSection.Type, defaultShow: false },
{ label: '逻辑区段', value: LogicSection.Type, defaultShow: false },
@ -254,7 +253,7 @@ export function initLineScene(lineApp: IGraphicApp, sceneName: string) {
new EsbButtonTemplate(new EsbButtonData(), new EsbButtonState()),
new TransponderTemplate(new TransponderData()),
new SlopeKiloMarkerTemplate(new SlopeKiloMarkerData()),
new LinkTemplate(new LinkData()),
// new LinkTemplate(new LinkData()),
new TrainWindowTemplate(new TrainWindowData()),
new SlopeTemplate(new SlopeData()),
new CurvatureKiloMarkerTemplate(new CurvatureKiloMarkerData()),
@ -527,12 +526,12 @@ export async function loadLineDatas(): Promise<IGraphicStorage> {
storage.autoReturnBoxs.forEach((autoReturnBox) => {
datas.push(new AutoReturnBoxData(autoReturnBox));
});
const linkIdGenerator = new IdGenerator(Link.Type);
storage.CalculateLink.forEach((link) => {
const g = new LinkData(link);
g.id = linkIdGenerator.next();
datas.push(g);
});
// const linkIdGenerator = new IdGenerator(Link.Type);
// storage.CalculateLink.forEach((link) => {
// const g = new LinkData(link);
// g.id = linkIdGenerator.next();
// datas.push(g);
// });
// await app.loadGraphic(datas);
return Promise.resolve({
canvasProperty: storage.canvas,