计轴和计轴区段的code显示

This commit is contained in:
joylink_zhaoerwei 2023-07-12 10:12:15 +08:00
parent e73fe0ede6
commit bc0844523b
3 changed files with 4 additions and 4 deletions

View File

@ -75,7 +75,7 @@ const drawStore = useDrawStore();
const axleCountingSectionModel = reactive(new AxleCountingSectionData());
enum turoutPos {
'位',
'位',
'反位',
}
@ -133,7 +133,7 @@ const turnoutRelations = computed(() => {
refTurnoutAndPos.push({ turnout: refTurout, pos: ref.position });
});
const ref = refTurnoutAndPos.map(
(ref) => `${ref.turnout.datas.code}+${turoutPos[ref.pos]}`
(ref) => `${ref.turnout.datas.code}:${turoutPos[ref.pos]}`
);
return Array.from(new Set(ref));
});

View File

@ -118,7 +118,7 @@ export class AxleCountingDraw extends GraphicDrawAssistant<
}
axleCounting.id = GraphicIdGenerator.next();
axleCounting.datas.axleCountingRef = [refData2, refData1];
axleCounting.datas.code = `${graphic.datas.code}-${port}+${refGraphic.datas.code}-${refPort}`;
axleCounting.datas.code = `${graphic.datas.code}-${port}\\${refGraphic.datas.code}-${refPort}`;
this.storeGraphic(axleCounting);
axleCounting.loadRelations();
}

View File

@ -25,7 +25,7 @@ export interface IAxleCountingSectionData extends GraphicData {
set paRef(ref: IRelatedRefData | undefined);
get pbRef(): IRelatedRefData | undefined; //区段B端关联的设备
set pbRef(ref: IRelatedRefData | undefined);
get turnoutPosRef(): ITurnoutPosRefData[]; //关联道岔的反位
get turnoutPosRef(): ITurnoutPosRefData[]; //关联道岔的定反位--0是定位1是反位
set turnoutPosRef(ref: ITurnoutPosRefData[]);
get indexNumber(): number; // 索引编号
set indexNumber(v: number);