计轴区段增量添加
This commit is contained in:
parent
dbd01d71a3
commit
e73fe0ede6
@ -93,8 +93,14 @@ export class AxleCountingSectionDraw extends GraphicDrawAssistant<
|
||||
draw(
|
||||
graphics: AxleCounting[],
|
||||
commonElement: JlGraphic[],
|
||||
map: Map<string, number>,
|
||||
turoutPos?: number
|
||||
) {
|
||||
if (
|
||||
map.has(`${graphics[0].id}+${graphics[1].id}`) ||
|
||||
map.has(`${graphics[1].id}+${graphics[0].id}`)
|
||||
)
|
||||
return;
|
||||
const axleCountingSection = new AxleCountingSection();
|
||||
axleCountingSection.loadData(this.graphicTemplate.datas);
|
||||
axleCountingSection.datas.points = [
|
||||
@ -135,11 +141,17 @@ export class AxleCountingSectionDraw extends GraphicDrawAssistant<
|
||||
}
|
||||
|
||||
oneGenerates() {
|
||||
const map = new Map();
|
||||
const axleCountingSections =
|
||||
this.app.queryStore.queryByType<AxleCountingSection>(
|
||||
AxleCountingSection.Type
|
||||
);
|
||||
this.app.deleteGraphics(...axleCountingSections);
|
||||
axleCountingSections.forEach((axleCountingSection) => {
|
||||
map.set(
|
||||
`${axleCountingSection.datas.paRef?.id}+${axleCountingSection.datas.pbRef?.id}`,
|
||||
1
|
||||
);
|
||||
});
|
||||
const axleCountings = this.app.queryStore.queryByType<AxleCounting>(
|
||||
AxleCounting.Type
|
||||
);
|
||||
@ -185,6 +197,7 @@ export class AxleCountingSectionDraw extends GraphicDrawAssistant<
|
||||
this.draw(
|
||||
[axleCounting, axleCountings[i]],
|
||||
[commonElement],
|
||||
map,
|
||||
turoutPos
|
||||
);
|
||||
}
|
||||
@ -244,7 +257,8 @@ export class AxleCountingSectionDraw extends GraphicDrawAssistant<
|
||||
) {
|
||||
this.draw(
|
||||
[fourAxleCounting[x].axleCounting, AxleCountings[y].axleCounting],
|
||||
[fourAxleCounting[x].refTurout, AxleCountings[y].refTurout]
|
||||
[fourAxleCounting[x].refTurout, AxleCountings[y].refTurout],
|
||||
map
|
||||
);
|
||||
break;
|
||||
}
|
||||
@ -264,7 +278,8 @@ export class AxleCountingSectionDraw extends GraphicDrawAssistant<
|
||||
fourAxleCounting[x + 1].axleCounting,
|
||||
AxleCountings[y].axleCounting,
|
||||
],
|
||||
[fourAxleCounting[x + 1].refTurout, AxleCountings[y].refTurout]
|
||||
[fourAxleCounting[x + 1].refTurout, AxleCountings[y].refTurout],
|
||||
map
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user