From a789f301c30e3fefdf2b2796138d4e6fe0579d4e Mon Sep 17 00:00:00 2001 From: ival <610568032@qq.com> Date: Mon, 23 Sep 2019 09:46:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A6=8F=E5=B7=9E=E7=BA=BF?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E5=AF=BC=E8=87=B4=E7=9A=84=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E9=97=AE=E9=A2=98=E4=BB=A5=E5=8F=8Aeslint=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../childDialog/childDialog/noticeInfo.vue | 137 +-- .../dialog/childDialog/confirmControl.vue | 684 ++++++------- .../childDialog/confirmControlSpeed.vue | 284 +++--- .../childDialog/confirmSignalUnlock.vue | 214 ++-- .../menus/dialog/childDialog/confirmTrain.vue | 316 +++--- .../menus/dialog/routeCmdControl.vue | 849 ++++++++-------- .../fuzhou_01/menus/dialog/routeControl.vue | 625 ++++++------ .../fuzhou_01/menus/dialog/routeDetail.vue | 296 +++--- .../menus/dialog/routeHandControl.vue | 576 ++++++----- .../fuzhou_01/menus/dialog/routeLock.vue | 10 +- .../fuzhou_01/menus/dialog/routeSelection.vue | 12 +- .../menus/dialog/sectionCmdControl.vue | 854 ++++++++-------- .../fuzhou_01/menus/dialog/sectionControl.vue | 368 +++---- .../menus/dialog/speedCmdControl.vue | 12 +- .../menus/dialog/standBackStrategy.vue | 455 +++++---- .../fuzhou_01/menus/dialog/standControl.vue | 492 ++++----- .../fuzhou_01/menus/dialog/standDetail.vue | 332 +++--- .../menus/dialog/standDetainTrainAll.vue | 14 +- .../fuzhou_01/menus/dialog/standRunLevel.vue | 503 +++++----- .../fuzhou_01/menus/dialog/standStopTime.vue | 468 ++++----- .../menus/dialog/stationCmdControl.vue | 762 +++++++------- .../menus/dialog/stationHumanControlAll.vue | 206 ++-- .../dialog/stationSetRouteControlAll.vue | 243 ++--- .../menus/dialog/switchCmdControl.vue | 898 +++++++++-------- .../fuzhou_01/menus/dialog/switchControl.vue | 532 +++++----- .../fuzhou_01/menus/dialog/trainCreate.vue | 296 +++--- .../fuzhou_01/menus/dialog/trainDelete.vue | 4 +- .../menus/dialog/trainEditNumber.vue | 229 ++--- .../fuzhou_01/menus/dialog/trainMove.vue | 347 +++---- .../fuzhou_01/menus/dialog/trainSwitch.vue | 357 +++---- src/jmap/theme/fuzhou_01/menus/menuBar.vue | 2 +- .../childDialog/twoConfirmation.vue | 257 ++--- .../menus/menuDialog/childDialog/userAdd.vue | 296 +++--- .../menuDialog/childDialog/userDelete.vue | 242 ++--- .../menus/menuDialog/childDialog/userEdit.vue | 329 +++--- .../fuzhou_01/menus/menuDialog/helpAbout.vue | 232 ++--- .../fuzhou_01/menus/menuDialog/manageUser.vue | 552 +++++----- .../menus/menuDialog/passwordBox.vue | 348 +++---- .../fuzhou_01/menus/menuDialog/trainAdd.vue | 298 +++--- .../menus/menuDialog/trainDelete.vue | 266 ++--- .../menus/menuDialog/trainTranstalet.vue | 296 +++--- .../fuzhou_01/menus/menuDialog/viewDevice.vue | 290 +++--- .../fuzhou_01/menus/menuDialog/viewName.vue | 55 +- .../menus/menuDialog/viewTrainId.vue | 28 +- .../theme/fuzhou_01/menus/menuSection.vue | 795 +++++++-------- src/jmap/theme/fuzhou_01/menus/menuSignal.vue | 3 +- .../theme/fuzhou_01/menus/menuStation.vue | 585 +++++------ .../fuzhou_01/menus/menuStationControl.vue | 125 ++- .../fuzhou_01/menus/menuStationStand.vue | 3 +- src/jmap/theme/fuzhou_01/menus/menuSwitch.vue | 943 +++++++++--------- .../fuzhou_01/menus/passiveDialog/alarm.vue | 395 ++++---- .../fuzhou_01/menus/passiveDialog/control.vue | 560 ++++++----- .../fuzhou_01/menus/passiveDialog/timeout.vue | 207 ++-- .../fuzhou_01/menus/statusDownTrainDetail.vue | 42 +- .../fuzhou_01/menus/statusUpTrainDetail.vue | 43 +- .../theme/fuzhou_01/menusPlan/addTask.vue | 22 +- .../menusPlan/chooseTemplatePlan.vue | 4 +- .../fuzhou_01/menusPlan/createTodayPlan.vue | 4 +- .../fuzhou_01/menusPlan/createWeekPlan.vue | 6 +- .../theme/fuzhou_01/menusPlan/deleteTask.vue | 8 +- .../fuzhou_01/menusPlan/deleteTodayPlan.vue | 4 +- .../fuzhou_01/menusPlan/modifyingPlan.vue | 26 +- .../fuzhou_01/menusPlan/modifyingTask.vue | 34 +- .../theme/fuzhou_01/planSchedule/menuBar.vue | 32 +- .../fuzhou_01/planSchedule/statusBar.vue | 2 +- 65 files changed, 9591 insertions(+), 9118 deletions(-) diff --git a/src/jmap/theme/fuzhou_01/menus/dialog/childDialog/childDialog/noticeInfo.vue b/src/jmap/theme/fuzhou_01/menus/dialog/childDialog/childDialog/noticeInfo.vue index d4d9d5c30..ece241e2b 100644 --- a/src/jmap/theme/fuzhou_01/menus/dialog/childDialog/childDialog/noticeInfo.vue +++ b/src/jmap/theme/fuzhou_01/menus/dialog/childDialog/childDialog/noticeInfo.vue @@ -1,72 +1,81 @@ \ No newline at end of file + diff --git a/src/jmap/theme/fuzhou_01/menus/menuDialog/childDialog/userDelete.vue b/src/jmap/theme/fuzhou_01/menus/menuDialog/childDialog/userDelete.vue index 6a016b833..da9839f67 100644 --- a/src/jmap/theme/fuzhou_01/menus/menuDialog/childDialog/userDelete.vue +++ b/src/jmap/theme/fuzhou_01/menus/menuDialog/childDialog/userDelete.vue @@ -1,125 +1,135 @@ \ No newline at end of file + diff --git a/src/jmap/theme/fuzhou_01/menus/menuDialog/childDialog/userEdit.vue b/src/jmap/theme/fuzhou_01/menus/menuDialog/childDialog/userEdit.vue index f51273537..f6426b7d1 100644 --- a/src/jmap/theme/fuzhou_01/menus/menuDialog/childDialog/userEdit.vue +++ b/src/jmap/theme/fuzhou_01/menus/menuDialog/childDialog/userEdit.vue @@ -1,170 +1,181 @@ \ No newline at end of file + diff --git a/src/jmap/theme/fuzhou_01/menus/menuDialog/helpAbout.vue b/src/jmap/theme/fuzhou_01/menus/menuDialog/helpAbout.vue index a38a1cf00..3563ef085 100644 --- a/src/jmap/theme/fuzhou_01/menus/menuDialog/helpAbout.vue +++ b/src/jmap/theme/fuzhou_01/menus/menuDialog/helpAbout.vue @@ -1,122 +1,132 @@ \ No newline at end of file + diff --git a/src/jmap/theme/fuzhou_01/menus/menuDialog/manageUser.vue b/src/jmap/theme/fuzhou_01/menus/menuDialog/manageUser.vue index ed4f5ce58..31fbc4620 100644 --- a/src/jmap/theme/fuzhou_01/menus/menuDialog/manageUser.vue +++ b/src/jmap/theme/fuzhou_01/menus/menuDialog/manageUser.vue @@ -1,282 +1,300 @@ \ No newline at end of file + diff --git a/src/jmap/theme/fuzhou_01/menus/menuDialog/passwordBox.vue b/src/jmap/theme/fuzhou_01/menus/menuDialog/passwordBox.vue index c7980de07..881bd0b50 100644 --- a/src/jmap/theme/fuzhou_01/menus/menuDialog/passwordBox.vue +++ b/src/jmap/theme/fuzhou_01/menus/menuDialog/passwordBox.vue @@ -1,188 +1,196 @@ \ No newline at end of file + diff --git a/src/jmap/theme/fuzhou_01/menus/menuDialog/trainAdd.vue b/src/jmap/theme/fuzhou_01/menus/menuDialog/trainAdd.vue index b890854f5..dea29ff74 100644 --- a/src/jmap/theme/fuzhou_01/menus/menuDialog/trainAdd.vue +++ b/src/jmap/theme/fuzhou_01/menus/menuDialog/trainAdd.vue @@ -1,155 +1,167 @@ \ No newline at end of file + diff --git a/src/jmap/theme/fuzhou_01/menus/menuDialog/trainDelete.vue b/src/jmap/theme/fuzhou_01/menus/menuDialog/trainDelete.vue index 29dabbd91..d33c7bfdd 100644 --- a/src/jmap/theme/fuzhou_01/menus/menuDialog/trainDelete.vue +++ b/src/jmap/theme/fuzhou_01/menus/menuDialog/trainDelete.vue @@ -1,141 +1,149 @@ \ No newline at end of file + diff --git a/src/jmap/theme/fuzhou_01/menus/menuDialog/trainTranstalet.vue b/src/jmap/theme/fuzhou_01/menus/menuDialog/trainTranstalet.vue index b57f51969..938f5227a 100644 --- a/src/jmap/theme/fuzhou_01/menus/menuDialog/trainTranstalet.vue +++ b/src/jmap/theme/fuzhou_01/menus/menuDialog/trainTranstalet.vue @@ -1,152 +1,164 @@ \ No newline at end of file + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.doClose(); + } + }).catch(() => { this.doClose(); }); + } + } +}; + diff --git a/src/jmap/theme/fuzhou_01/menus/menuDialog/viewDevice.vue b/src/jmap/theme/fuzhou_01/menus/menuDialog/viewDevice.vue index 48a0b769e..f188b6b0a 100644 --- a/src/jmap/theme/fuzhou_01/menus/menuDialog/viewDevice.vue +++ b/src/jmap/theme/fuzhou_01/menus/menuDialog/viewDevice.vue @@ -1,158 +1,166 @@ \ No newline at end of file + diff --git a/src/jmap/theme/fuzhou_01/menus/menuDialog/viewName.vue b/src/jmap/theme/fuzhou_01/menus/menuDialog/viewName.vue index e4a4480e7..a3cd8e862 100644 --- a/src/jmap/theme/fuzhou_01/menus/menuDialog/viewName.vue +++ b/src/jmap/theme/fuzhou_01/menus/menuDialog/viewName.vue @@ -13,59 +13,59 @@ - {{$t('menu.menuDialog.signalName')}} + {{ $t('menu.menuDialog.signalName') }} - {{$t('menu.menuDialog.standTrackName')}} + {{ $t('menu.menuDialog.standTrackName') }} - {{$t('menu.menuDialog.buttonName')}} + {{ $t('menu.menuDialog.buttonName') }} - {{$t('menu.menuDialog.reentryTrackName')}} + {{ $t('menu.menuDialog.reentryTrackName') }} - {{$t('menu.menuDialog.trackName')}} + {{ $t('menu.menuDialog.trackName') }} - {{$t('menu.menuDialog.transferTrackName')}} + {{ $t('menu.menuDialog.transferTrackName') }} - {{$t('menu.menuDialog.turnoutName')}} + {{ $t('menu.menuDialog.turnoutName') }} - {{$t('menu.menuDialog.indicatorName')}} + {{ $t('menu.menuDialog.indicatorName') }} - {{$t('menu.menuDialog.turnoutSectionName')}} + {{ $t('menu.menuDialog.turnoutSectionName') }} - {{$t('menu.menuDialog.destinationName')}} + {{ $t('menu.menuDialog.destinationName') }} - {{$t('menu.menuDialog.axisSectionName')}} + {{ $t('menu.menuDialog.axisSectionName') }} - {{$t('menu.menuDialog.kmPost')}} + {{ $t('menu.menuDialog.kmPost') }} - {{$t('menu.menuDialog.confirm')}} + {{ $t('menu.menuDialog.confirm') }} - {{$t('menu.menuDialog.cancel')}} + {{ $t('menu.menuDialog.cancel') }} @@ -126,7 +126,7 @@ export default { this.$store.dispatch('training/emitTipFresh'); }, cancel() { - let operate = { + const operate = { type: this.operate.type, operation: OperationEvent.Command.cancel.menu.operation }; @@ -138,7 +138,7 @@ export default { }); }, commit() { - let operate = { + const operate = { over: true, type: this.operate.type, operation: OperationEvent.Command.close.confirm.operation, @@ -157,24 +157,21 @@ export default { }); }, setNameDisplay() { - let deviceList = []; + const deviceList = []; // 信号机 let nameShow = this.nameLevels.indexOf(1) !== -1; - let signalList = this.$store.getters['map/signalList']; + const signalList = this.$store.getters['map/signalList']; if (signalList && signalList.length > 0) { signalList.forEach(elem => { deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow })); }); } - // 按钮名称 - let show = this.nameLevels.indexOf(3) !== -1; - // 道岔 nameShow = this.nameLevels.indexOf(7) !== -1; // 道岔名称 - let switchSectionNameShow = this.nameLevels.indexOf(9) !== -1; // 道岔轨名称 - let switchList = this.$store.getters['map/switchList']; + const switchSectionNameShow = this.nameLevels.indexOf(9) !== -1; // 道岔轨名称 + const switchList = this.$store.getters['map/switchList']; if (switchList && switchList.length > 0) { switchList.forEach(elem => { deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {nameShow, switchSectionNameShow })); @@ -182,8 +179,8 @@ export default { } // 控制模式 - let indicatorShow = this.nameLevels.indexOf(8) !== -1; - let control = this.$store.getters['map/stationControlList']; + const indicatorShow = this.nameLevels.indexOf(8) !== -1; + const control = this.$store.getters['map/stationControlList']; if (control && control.length > 0) { control.forEach(elem => { // 标识灯名称 @@ -196,7 +193,7 @@ export default { let standTrackNameShow = false; let reentryTrackNameShow = false; let transferTrackNameShow = false; - let sectionList = this.$store.getters['map/sectionList']; + const sectionList = this.$store.getters['map/sectionList']; if (sectionList && sectionList.length > 0) { sectionList.forEach(elem => { elem._type = deviceType.Section; @@ -231,13 +228,13 @@ export default { transferTrackNameShow = this.nameLevels.indexOf(6) !== -1; } - deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow })); + deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow })); }); } // 车站 - let kmPostShow = this.nameLevels.indexOf(12) !== -1; - let stationList = this.$store.getters['map/stationList']; + const kmPostShow = this.nameLevels.indexOf(12) !== -1; + const stationList = this.$store.getters['map/stationList']; if (stationList && stationList.length > 0) { stationList.forEach(elem => { deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); // 公里标 diff --git a/src/jmap/theme/fuzhou_01/menus/menuDialog/viewTrainId.vue b/src/jmap/theme/fuzhou_01/menus/menuDialog/viewTrainId.vue index 4af9b9e72..ab0dfb8d9 100644 --- a/src/jmap/theme/fuzhou_01/menus/menuDialog/viewTrainId.vue +++ b/src/jmap/theme/fuzhou_01/menus/menuDialog/viewTrainId.vue @@ -11,64 +11,64 @@ :close-on-click-modal="false" >
- {{$t('menu.menuDialog.plantrainDisplayMode')}} + {{ $t('menu.menuDialog.plantrainDisplayMode') }} - {{$t('menu.menuDialog.serviceNumber')}} + {{$t('menu.menuDialog.tripNumber')}} + {{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.tripNumber') }} - {{$t('menu.menuDialog.serviceNumber')}} + {{$t('menu.menuDialog.groupNumber')}} + {{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.groupNumber') }} - {{$t('menu.menuDialog.targetNumber')}} + {{$t('menu.menuDialog.tripNumber')}} + {{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.tripNumber') }} - {{$t('menu.menuDialog.targetNumber')}} + {{$t('menu.menuDialog.groupNumber')}} + {{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.groupNumber') }} - {{$t('menu.menuDialog.targetNumber')}} + {{$t('menu.menuDialog.serviceNumber')}} + {{$t('menu.menuDialog.tripNumber')}} + {{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.tripNumber') }} - {{$t('menu.menuDialog.targetNumber')}} + {{$t('menu.menuDialog.serviceNumber')}} + {{$t('menu.menuDialog.groupNumber')}} + {{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}
- {{$t('menu.menuDialog.headCodeStationDisplayMode')}} + {{ $t('menu.menuDialog.headCodeStationDisplayMode') }} - {{$t('menu.menuDialog.targetNumber')}} + {{$t('menu.menuDialog.tripNumber')}} + {{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.tripNumber') }} - {{$t('menu.menuDialog.targetNumber')}} + {{$t('menu.menuDialog.groupNumber')}} + {{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}
- {{$t('menu.menuDialog.fontSize')}} + {{ $t('menu.menuDialog.fontSize') }} - {{$t('menu.menuDialog.range')}} + {{ $t('menu.menuDialog.range') }}
- {{$t('menu.menuDialog.confirm')}} + {{ $t('menu.menuDialog.confirm') }} - {{$t('menu.menuDialog.cancel')}} + {{ $t('menu.menuDialog.cancel') }} diff --git a/src/jmap/theme/fuzhou_01/menus/menuSection.vue b/src/jmap/theme/fuzhou_01/menus/menuSection.vue index b2ddee819..335570cc0 100644 --- a/src/jmap/theme/fuzhou_01/menus/menuSection.vue +++ b/src/jmap/theme/fuzhou_01/menus/menuSection.vue @@ -1,404 +1,405 @@ \ No newline at end of file + this.menu = menuConvert(this.menu); + }, + doShow(point) { + this.clickEvent(); + this.initMenu(); + if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) { + this.$refs.popMenu.resetShowPosition(point); + } + }, + doClose() { + if (this.$refs && this.$refs.popMenu) { + this.$refs.popMenu.close(); + } + }, + // 设置故障 + setStoppage() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.stoppage.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + } else { + this.$refs.noticeInfo.doShow(operate); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + }, + // 取消故障 + cancelStoppage() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.cancelStoppage.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + } else { + this.$refs.noticeInfo.doShow(operate); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + }, + // 故障解锁 + fault() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.fault.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.sectionCmdControl.doShow(operate, this.selected); + } + }); + }, + // 切除 + split() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.split.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.sectionControl.doShow(operate, this.selected); + } + }); + }, + // 激活 + active() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.active.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.sectionControl.doShow(operate, this.selected); + } + }); + }, + // 区段计轴预复位 + axlePreReset() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.axlePreReset.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.sectionCmdControl.doShow(operate, this.selected); + } + }); + }, + // 区段解锁 + lock() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.lock.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.sectionControl.doShow(operate, this.selected); + } + }); + }, + // 区段封锁 + unlock() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.unlock.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.sectionCmdControl.doShow(operate, this.selected); + } + }); + }, + // 设置速度 + setSpeed() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.setSpeed.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.speedCmdControl.doShow(operate, this.selected); + } + }); + }, + // 取消速度 + cancelSpeed() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.cancelSpeed.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid, response }) => { + if (valid) { + const tempData = response.data; + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.speedCmdControl.doShow(operate, this.selected, tempData); + } + }); + }, + // 新建列车 + newTrain() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Section.type, + label: MapDeviceType.Section.label, + operation: OperationEvent.Section.newtrain.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.trainCreate.doShow(operate, this.selected); + } + }); + } + } +}; + diff --git a/src/jmap/theme/fuzhou_01/menus/menuSignal.vue b/src/jmap/theme/fuzhou_01/menus/menuSignal.vue index 7fdcea09a..25182ee61 100644 --- a/src/jmap/theme/fuzhou_01/menus/menuSignal.vue +++ b/src/jmap/theme/fuzhou_01/menus/menuSignal.vue @@ -39,7 +39,8 @@ export default { }, props: { selected: { - type: Object + type: Object, + required: true } }, data() { diff --git a/src/jmap/theme/fuzhou_01/menus/menuStation.vue b/src/jmap/theme/fuzhou_01/menus/menuStation.vue index ff7540e4c..9b0c769a5 100644 --- a/src/jmap/theme/fuzhou_01/menus/menuStation.vue +++ b/src/jmap/theme/fuzhou_01/menus/menuStation.vue @@ -1,299 +1,300 @@  \ No newline at end of file + this.menu = menuConvert(this.menu); + }, + doShow(point) { + this.clickEvent(); + this.initMenu(); + if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) { + this.$refs.popMenu.resetShowPosition(point); + } + }, + doClose() { + if (this.$refs && this.$refs.popMenu) { + this.$refs.popMenu.close(); + } + }, + // 设置故障 + setStoppage() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.Station.type, + label: MapDeviceType.Station.label, + operation: OperationEvent.Station.stoppage.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + } else { + this.$refs.noticeInfo.doShow(operate); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + }, + // 取消故障 + cancelStoppage() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.Station.type, + label: MapDeviceType.Station.label, + operation: OperationEvent.Station.cancelStoppage.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + } else { + this.$refs.noticeInfo.doShow(operate); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + }, + // 全站设置联锁自动触发 + setAutoTrigger() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.Station.type, + label: MapDeviceType.Station.label, + operation: OperationEvent.Station.setAutoTrigger.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + }, + // 全站取消联锁自动触发 + cancelAutoTrigger() { + const operate = { + start: true, + send: true, + code: this.selected.code, + type: MapDeviceType.Station.type, + label: MapDeviceType.Station.label, + operation: OperationEvent.Station.cancelAutoTrigger.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + }, + // 上电解锁 + powerUnLock() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Station.type, + label: MapDeviceType.Station.label, + operation: OperationEvent.Station.powerUnLock.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.stationCmdControl.doShow(operate, this.selected); + } + }); + }, + // 执行关键操作测试 + execKeyOperationTest() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Station.type, + label: MapDeviceType.Station.label, + operation: OperationEvent.Station.execKeyOperationTest.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.stationCmdControl.doShow(operate, this.selected); + } + }); + }, + // 所有进路自排关 + humanControlALL() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Station.type, + label: MapDeviceType.Station.label, + operation: OperationEvent.Station.humanControlALL.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.stationHumanControlAll.doShow(operate); + } + }); + }, + // 所有进路自排开 + atsAutoControlALL() { + const operate = { + start: true, + code: this.selected.code, + type: MapDeviceType.Station.type, + label: MapDeviceType.Station.label, + operation: OperationEvent.Station.atsAutoControlALL.menu.operation + }; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.stationSetRouteControlAll.doShow(operate, this.selected); + } + }); + } + } +}; + diff --git a/src/jmap/theme/fuzhou_01/menus/menuStationControl.vue b/src/jmap/theme/fuzhou_01/menus/menuStationControl.vue index 3d6215a27..92a3aceeb 100644 --- a/src/jmap/theme/fuzhou_01/menus/menuStationControl.vue +++ b/src/jmap/theme/fuzhou_01/menus/menuStationControl.vue @@ -1,68 +1,67 @@ \ No newline at end of file +export default { + name: 'StationControlMenu', + components: { + PopMenu + }, + props: { + selected: { + type: Object, + required: true + } + }, + data() { + return { + menu: [], + menuNormal: [ + ], + menuForce: [ + ] + }; + }, + computed: { + ...mapGetters('training', [ + 'mode', + 'operatemode' + ]), + ...mapGetters('menuOperation', [ + 'buttonOperation' + ]) + }, + watch: { + '$store.state.menuOperation.menuCount': function (val) { + if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationControl) && !this.buttonOperation) { + this.doShow(this.$store.state.menuOperation.menuPosition); + } else { + this.doClose(); + } + } + }, + methods: { + clickEvent() { + const self = this; + window.onclick = function (e) { + self.doClose(); + }; + }, + doShow(point) { + if (this.$refs && this.$refs.popMenu) { + this.$refs.popMenu.close(); + } + }, + doClose() { + if (this.$refs && this.$refs.popMenu) { + this.$refs.popMenu.close(); + } + } + } +}; + diff --git a/src/jmap/theme/fuzhou_01/menus/menuStationStand.vue b/src/jmap/theme/fuzhou_01/menus/menuStationStand.vue index 03e5d549a..e4f6e7d6c 100644 --- a/src/jmap/theme/fuzhou_01/menus/menuStationStand.vue +++ b/src/jmap/theme/fuzhou_01/menus/menuStationStand.vue @@ -39,7 +39,8 @@ export default { }, props: { selected: { - type: Object + type: Object, + required: true } }, data() { diff --git a/src/jmap/theme/fuzhou_01/menus/menuSwitch.vue b/src/jmap/theme/fuzhou_01/menus/menuSwitch.vue index 123e68dd4..62e73bbb6 100644 --- a/src/jmap/theme/fuzhou_01/menus/menuSwitch.vue +++ b/src/jmap/theme/fuzhou_01/menus/menuSwitch.vue @@ -1,482 +1,483 @@ \ No newline at end of file + } +}; + diff --git a/src/jmap/theme/fuzhou_01/menus/passiveDialog/alarm.vue b/src/jmap/theme/fuzhou_01/menus/passiveDialog/alarm.vue index 57f11dab4..ee1a74227 100644 --- a/src/jmap/theme/fuzhou_01/menus/passiveDialog/alarm.vue +++ b/src/jmap/theme/fuzhou_01/menus/passiveDialog/alarm.vue @@ -1,209 +1,214 @@ \ No newline at end of file + diff --git a/src/jmap/theme/fuzhou_01/menus/passiveDialog/control.vue b/src/jmap/theme/fuzhou_01/menus/passiveDialog/control.vue index 04b760bae..af7a6ef96 100644 --- a/src/jmap/theme/fuzhou_01/menus/passiveDialog/control.vue +++ b/src/jmap/theme/fuzhou_01/menus/passiveDialog/control.vue @@ -1,290 +1,308 @@ \ No newline at end of file + diff --git a/src/jmap/theme/fuzhou_01/menus/passiveDialog/timeout.vue b/src/jmap/theme/fuzhou_01/menus/passiveDialog/timeout.vue index 68635274a..960018160 100644 --- a/src/jmap/theme/fuzhou_01/menus/passiveDialog/timeout.vue +++ b/src/jmap/theme/fuzhou_01/menus/passiveDialog/timeout.vue @@ -1,106 +1,115 @@ \ No newline at end of file + diff --git a/src/jmap/theme/fuzhou_01/menus/statusDownTrainDetail.vue b/src/jmap/theme/fuzhou_01/menus/statusDownTrainDetail.vue index 14f092b23..324ca17fc 100644 --- a/src/jmap/theme/fuzhou_01/menus/statusDownTrainDetail.vue +++ b/src/jmap/theme/fuzhou_01/menus/statusDownTrainDetail.vue @@ -1,31 +1,23 @@ \ No newline at end of file + diff --git a/src/jmap/theme/fuzhou_01/menus/statusUpTrainDetail.vue b/src/jmap/theme/fuzhou_01/menus/statusUpTrainDetail.vue index afafa39cf..77de68dfe 100644 --- a/src/jmap/theme/fuzhou_01/menus/statusUpTrainDetail.vue +++ b/src/jmap/theme/fuzhou_01/menus/statusUpTrainDetail.vue @@ -1,31 +1,24 @@ \ No newline at end of file + + diff --git a/src/jmap/theme/fuzhou_01/menusPlan/addTask.vue b/src/jmap/theme/fuzhou_01/menusPlan/addTask.vue index 71be68ee9..a374d3359 100644 --- a/src/jmap/theme/fuzhou_01/menusPlan/addTask.vue +++ b/src/jmap/theme/fuzhou_01/menusPlan/addTask.vue @@ -13,10 +13,10 @@
- {{$t('menu.addToTheFront')}} + {{ $t('menu.addToTheFront') }} - {{$t('menu.tripNumber') + $t('global.colon')}} + {{ $t('menu.tripNumber') + $t('global.colon') }} @@ -29,7 +29,7 @@ - {{$t('global.startTime') + $t('global.colon')}} + {{ $t('global.startTime') + $t('global.colon') }} @@ -44,10 +44,10 @@ - {{$t('menu.addToTheEnd')}} + {{ $t('menu.addToTheEnd') }} - {{$t('menu.tripNumber') + $t('global.colon')}} + {{ $t('menu.tripNumber') + $t('global.colon') }} @@ -60,7 +60,7 @@ - {{$t('global.startTime') + $t('global.colon')}} + {{ $t('global.startTime') + $t('global.colon') }} @@ -75,7 +75,7 @@ - {{$t('menu.crossing') + $t('global.colon')}} + {{ $t('menu.crossing') + $t('global.colon') }} @@ -86,7 +86,7 @@ - {{$t('global.details') + $t('global.colon')}} + {{ $t('global.details') + $t('global.colon') }} @@ -98,13 +98,13 @@ - {{$t('menu.displaysDefaultStopTimesAndRunLevels')}} + {{ $t('menu.displaysDefaultStopTimesAndRunLevels') }}
- {{$t('global.confirm')}} - {{$t('global.cancel')}} + {{ $t('global.confirm') }} + {{ $t('global.cancel') }} diff --git a/src/jmap/theme/fuzhou_01/menusPlan/chooseTemplatePlan.vue b/src/jmap/theme/fuzhou_01/menusPlan/chooseTemplatePlan.vue index 6fabe9ae7..5f611de38 100644 --- a/src/jmap/theme/fuzhou_01/menusPlan/chooseTemplatePlan.vue +++ b/src/jmap/theme/fuzhou_01/menusPlan/chooseTemplatePlan.vue @@ -11,8 +11,8 @@ > - {{$t('global.select')}} - {{$t('global.cancel')}} + {{ $t('global.select') }} + {{ $t('global.cancel') }} diff --git a/src/jmap/theme/fuzhou_01/menusPlan/createTodayPlan.vue b/src/jmap/theme/fuzhou_01/menusPlan/createTodayPlan.vue index 7386807c3..f47857639 100644 --- a/src/jmap/theme/fuzhou_01/menusPlan/createTodayPlan.vue +++ b/src/jmap/theme/fuzhou_01/menusPlan/createTodayPlan.vue @@ -11,8 +11,8 @@ > - {{$t('menu.load')}} - {{$t('global.cancel')}} + {{ $t('menu.load') }} + {{ $t('global.cancel') }} diff --git a/src/jmap/theme/fuzhou_01/menusPlan/createWeekPlan.vue b/src/jmap/theme/fuzhou_01/menusPlan/createWeekPlan.vue index e2317098c..2fb45f3c2 100644 --- a/src/jmap/theme/fuzhou_01/menusPlan/createWeekPlan.vue +++ b/src/jmap/theme/fuzhou_01/menusPlan/createWeekPlan.vue @@ -18,7 +18,7 @@ - {{this.$t('global.select')}} + {{ this.$t('global.select') }} @@ -36,8 +36,8 @@ - {{$t('global.confirm')}} - {{$t('global.cancel')}} + {{ $t('global.confirm') }} + {{ $t('global.cancel') }} diff --git a/src/jmap/theme/fuzhou_01/menusPlan/deleteTask.vue b/src/jmap/theme/fuzhou_01/menusPlan/deleteTask.vue index fc61cb683..35f2bb52c 100644 --- a/src/jmap/theme/fuzhou_01/menusPlan/deleteTask.vue +++ b/src/jmap/theme/fuzhou_01/menusPlan/deleteTask.vue @@ -11,14 +11,14 @@ :close-on-click-modal="false" > - {{$t('menu.deleteAllPreviousTasks')}} + {{ $t('menu.deleteAllPreviousTasks') }} - {{$t('menu.deleteAllSubsequentTasks')}} + {{ $t('menu.deleteAllSubsequentTasks') }} - {{$t('global.confirm')}} - {{$t('global.cancel')}} + {{ $t('global.confirm') }} + {{ $t('global.cancel') }} diff --git a/src/jmap/theme/fuzhou_01/menusPlan/deleteTodayPlan.vue b/src/jmap/theme/fuzhou_01/menusPlan/deleteTodayPlan.vue index b2de44fca..a4a3725fb 100644 --- a/src/jmap/theme/fuzhou_01/menusPlan/deleteTodayPlan.vue +++ b/src/jmap/theme/fuzhou_01/menusPlan/deleteTodayPlan.vue @@ -11,8 +11,8 @@ :close-on-click-modal="false" > - {{$t('global.confirm')}} - {{$t('global.cancel')}} + {{ $t('global.confirm') }} + {{ $t('global.cancel') }} diff --git a/src/jmap/theme/fuzhou_01/menusPlan/modifyingPlan.vue b/src/jmap/theme/fuzhou_01/menusPlan/modifyingPlan.vue index 683a52308..a5ff93a21 100644 --- a/src/jmap/theme/fuzhou_01/menusPlan/modifyingPlan.vue +++ b/src/jmap/theme/fuzhou_01/menusPlan/modifyingPlan.vue @@ -11,7 +11,7 @@ :close-on-click-modal="false" > - {{$t('menu.trainLine')}} + {{ $t('menu.trainLine') }} @@ -24,19 +24,19 @@ - {{this.$t('menu.addTask2')}} + {{ this.$t('menu.addTask2') }} - {{this.$t('menu.replace')}} + {{ this.$t('menu.replace') }} - {{this.$t('menu.deleteTask2')}} + {{ this.$t('menu.deleteTask2') }}
- {{this.$t('menu.inTheLibrary')}} - {{this.$t('menu.outOfTheLibrary')}} + {{ this.$t('menu.inTheLibrary') }} + {{ this.$t('menu.outOfTheLibrary') }}
@@ -50,21 +50,21 @@
- {{$t('menu.changeTripNumber')}} + {{ $t('menu.changeTripNumber') }}
- {{$t('menu.lineStartTime')}} + {{ $t('menu.lineStartTime') }} - {{$t('menu.lineEndTime')}} + {{ $t('menu.lineEndTime') }} - {{$t('menu.lineDetails')}} + {{ $t('menu.lineDetails') }} @@ -76,11 +76,11 @@ - {{$t('menu.affectSubsequentTasks')}} + {{ $t('menu.affectSubsequentTasks') }} - {{$t('global.confirm')}} - {{$t('global.cancel')}} + {{ $t('global.confirm') }} + {{ $t('global.cancel') }} diff --git a/src/jmap/theme/fuzhou_01/menusPlan/modifyingTask.vue b/src/jmap/theme/fuzhou_01/menusPlan/modifyingTask.vue index a24c58412..5d6a1405a 100644 --- a/src/jmap/theme/fuzhou_01/menusPlan/modifyingTask.vue +++ b/src/jmap/theme/fuzhou_01/menusPlan/modifyingTask.vue @@ -15,7 +15,7 @@ - {{$t('menu.tripNumber') + $t('global.colon')}} + {{ $t('menu.tripNumber') + $t('global.colon') }} @@ -32,14 +32,14 @@ - {{this.$t('menu.manual')}} + {{ this.$t('menu.manual') }} - {{$t('menu.defaultStopTime') + $t('global.colon')}} + {{ $t('menu.defaultStopTime') + $t('global.colon') }} @@ -56,7 +56,7 @@ - {{$t('menu.serviceNumber') + $t('global.colon')}} + {{ $t('menu.serviceNumber') + $t('global.colon') }} @@ -68,13 +68,13 @@ - {{$t('menu.clearGuest')}} + {{ $t('menu.clearGuest') }} - {{$t('menu.continuationPlan')}} + {{ $t('menu.continuationPlan') }} - {{$t('menu.firstTrain')}} + {{ $t('menu.firstTrain') }} @@ -85,7 +85,7 @@ - {{$t('menu.serialNumber') + $t('global.colon')}} + {{ $t('menu.serialNumber') + $t('global.colon') }} @@ -102,14 +102,14 @@ - {{this.$t('menu.manual')}} + {{ this.$t('menu.manual') }} - {{$t('menu.defaultRunLevel') + $t('global.colon')}} + {{ $t('menu.defaultRunLevel') + $t('global.colon') }} @@ -126,7 +126,7 @@ - {{$t('global.startTime') + $t('global.colon')}} + {{ $t('global.startTime') + $t('global.colon') }} @@ -152,7 +152,7 @@ - {{$t('menu.crossing') + $t('global.colon')}} + {{ $t('menu.crossing') + $t('global.colon') }} @@ -161,7 +161,7 @@ {{ formatName(scope.row.beginStationCode) }} - + diff --git a/src/jmap/theme/fuzhou_01/planSchedule/menuBar.vue b/src/jmap/theme/fuzhou_01/planSchedule/menuBar.vue index 1c59e0e01..051bf99f5 100644 --- a/src/jmap/theme/fuzhou_01/planSchedule/menuBar.vue +++ b/src/jmap/theme/fuzhou_01/planSchedule/menuBar.vue @@ -3,23 +3,23 @@