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