From ede7335ab16473b3ec9086def2e5c39d69e44e0c Mon Sep 17 00:00:00 2001 From: lVAL Date: Wed, 13 Jan 2021 09:51:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=20=E4=BA=A4=E8=B7=AF?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E8=B5=B7=E5=A7=8B=E4=BF=A1=E5=8F=B7=E6=9C=BA?= =?UTF-8?q?=E5=92=8C=E7=BB=88=E6=AD=A2=E4=BF=A1=E5=8F=B7=E6=9C=BA=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E7=9A=84bug=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/demonstration/detail/index.vue | 2 +- src/views/exam/detail/courseDetail.vue | 2 +- .../editTool/routingoperate/routeConfig.vue | 45 +++++++----- .../planMonitor/editToolAUS/line/stations.vue | 68 +++++++++---------- src/views/teach/detail/index.vue | 2 +- 5 files changed, 65 insertions(+), 54 deletions(-) diff --git a/src/views/demonstration/detail/index.vue b/src/views/demonstration/detail/index.vue index 850cb78af..e01874c67 100644 --- a/src/views/demonstration/detail/index.vue +++ b/src/views/demonstration/detail/index.vue @@ -70,7 +70,7 @@ export default { isShow = true; } } - return isShow; + return this.$store.state.user.companyId || isShow; }, isLocal() { // 是否为本地项目 return process.env.VUE_APP_PRO === 'local'; diff --git a/src/views/exam/detail/courseDetail.vue b/src/views/exam/detail/courseDetail.vue index 5be2ee0d4..6f5940450 100644 --- a/src/views/exam/detail/courseDetail.vue +++ b/src/views/exam/detail/courseDetail.vue @@ -98,7 +98,7 @@ export default { isShow = true; } } - return isShow; + return this.$store.state.user.companyId || isShow; }, isLocal() { // 是否为本地项目 return process.env.VUE_APP_PRO === 'local'; diff --git a/src/views/planMonitor/editTool/routingoperate/routeConfig.vue b/src/views/planMonitor/editTool/routingoperate/routeConfig.vue index 6a3d50a6f..4cc5e0235 100644 --- a/src/views/planMonitor/editTool/routingoperate/routeConfig.vue +++ b/src/views/planMonitor/editTool/routingoperate/routeConfig.vue @@ -446,11 +446,16 @@ export default { }, changeStartSection(data) { const section = this.$store.getters['map/getDeviceByCode'](data); - if (section.belongStation) { + if (section && + section.belongStation) { this.addModel.startStationCode = section.belongStation; + this.judgeAllowSelected(); + this.addStartSectionData(false); + } else { + this.addModel.parkSectionCodeList.shift(); + this.addModel.startStationCode = ''; + this.addModel.startSectionCode = ''; } - this.judgeAllowSelected(); - this.addStartSectionData(false); }, changeEndStation() { this.judgeAllowSelected(); @@ -459,16 +464,17 @@ export default { changeEndSection(data) { if (data) { const section = this.$store.getters['map/getDeviceByCode'](data); - if (section.belongStation) { + if (section && + section.belongStation) { this.addModel.endStationCode = section.belongStation; } this.addModel.destinationCode = section.destinationCode || ''; this.judgeAllowSelected(); this.addEndSectionData(false); } else { + this.addModel.parkSectionCodeList.pop(); this.addModel.endStationCode = ''; this.addModel.endSectionCode = ''; - this.addModel.parkSectionCodeList.pop(); } }, judgeAllowSelected() { @@ -589,10 +595,18 @@ export default { } case 'top': { if (isStation) { - list.splice(0, 1, data); + if (list.find(el => { el.sectionCode == this.addModel.startSectionCode; })) { + list.splice(0, 1, data); + } else { + list.unshift(data); + } } else { if (index < 0) { - list.splice(0, 1, data); + if (list.find(el => { el.sectionCode == this.addModel.startSectionCode; })) { + list.splice(0, 1, data); + } else { + list.unshift(data); + } } else { if (index == list.length - 1 && list.length >= 2) { this.addModel.startSectionCode = list[0].sectionCode; @@ -607,21 +621,18 @@ export default { } case 'bottom': { if (isStation) { - if (list.length >= 2) { + if (list.find(el => { el.sectionCode == this.addModel.endSectionCode; })) { list.splice(list.length - 1, 1, data); } else { - if (index < 0) { - list.push(data); - } + list.push(data); } } else { if (index < 0) { - // debugger; - // if (list.length >= 2) { - // list.splice(list.length - 1, 1, data); - // } else { - list.push(data); - // } + if (list.find(el => { el.sectionCode == this.addModel.endSectionCode; })) { + list.splice(list.length - 1, 1, data); + } else { + list.push(data); + } } else { if (index == 0 && list.length >= 2) { this.addModel.endSectionCode = list[list.length - 1].sectionCode; diff --git a/src/views/planMonitor/editToolAUS/line/stations.vue b/src/views/planMonitor/editToolAUS/line/stations.vue index 044f3ff48..7c9ce2ecb 100644 --- a/src/views/planMonitor/editToolAUS/line/stations.vue +++ b/src/views/planMonitor/editToolAUS/line/stations.vue @@ -1,42 +1,42 @@