diff --git a/src/components/draw-app/dialogs/AddTrainDialog.vue b/src/components/draw-app/dialogs/AddTrainDialog.vue index 94e7ce0..eb15621 100644 --- a/src/components/draw-app/dialogs/AddTrainDialog.vue +++ b/src/components/draw-app/dialogs/AddTrainDialog.vue @@ -8,8 +8,8 @@ dense outlined :disable="true" - label="Link" - v-model="props.link.code" + label="SectionLink" + v-model="props.sectionLink.code" /> @@ -17,7 +17,7 @@ type="number" dense outlined - :label="`列车偏移(mm)[Link长度为${props.link.linkLength}mm]`" + :label="`列车偏移(mm)[SectionLink长度为${props.sectionLink.linkLength}mm]`" :min="0" v-model.number="offset" /> @@ -52,7 +52,7 @@ import { SectionLink } from 'src/graphics/sectionLink/SectionLink'; import { ref } from 'vue'; const props = defineProps({ - link: { + sectionLink: { type: SectionLink, required: true, }, diff --git a/src/drawApp/graphics/SectionLinkInteraction.ts b/src/drawApp/graphics/SectionLinkInteraction.ts index 992d5cb..d4e49c9 100644 --- a/src/drawApp/graphics/SectionLinkInteraction.ts +++ b/src/drawApp/graphics/SectionLinkInteraction.ts @@ -149,8 +149,8 @@ export class SectionLinkOperateInteraction extends GraphicInteractionPlugin { @@ -158,14 +158,14 @@ export class SectionLinkOperateInteraction extends GraphicInteractionPlugin { addTrain({ simulationId, up: !!data.dir, - headLinkId: link.datas.index.toString(), + headLinkId: sectionLink.datas.index.toString(), headLinkOffset: data.offset, }) .then(() => {