From 285700c10d4d8d36961d8ed71ec180e1e2af60b7 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 8 May 2020 18:51:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../newMapdraft/dataRelation/routingoperate/route.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/newMap/newMapdraft/dataRelation/routingoperate/route.vue b/src/views/newMap/newMapdraft/dataRelation/routingoperate/route.vue index 941926391..b243b16f9 100644 --- a/src/views/newMap/newMapdraft/dataRelation/routingoperate/route.vue +++ b/src/views/newMap/newMapdraft/dataRelation/routingoperate/route.vue @@ -438,7 +438,7 @@ export default { } else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'endSectionCode'.toUpperCase()) { if (selected.standTrack || selected.reentryTrack || selected.transferTrack) { if (selected.belongStation) { - this.addModel.startStationCode = selected.belongStation; + this.addModel.endStationCode = selected.belongStation; } this.addModel.endSectionCode = selected.code; this.judgeAllowSelected(); @@ -478,10 +478,10 @@ export default { if (index < 0) { list.splice(0, 1, data); } else { - if (index == list.length - 1) { + if (index == list.length - 1 && list.length >= 2) { this.$messageBox('起始区段和终到区段不能相同'); this.addModel.startSectionCode = list[0].sectionCode; - } else { + } else if (index != list.length - 1 && index != 0) { this.$messageBox('该区段已经在交路区段中存在'); } } @@ -505,10 +505,10 @@ export default { list.push(data); } } else { - if (index == 0) { + if (index == 0 && list.length >= 2) { this.$messageBox('起始区段和终到区段不能相同'); this.addModel.endSectionCode = list[list.length - 1].sectionCode; - } else { + } else if (index != list.length - 1 && index != 0) { this.$messageBox('该区段已经在交路区段中存在'); } }