From e41d324c271bf4d76a033a2f3445b312ded0b5fd Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Thu, 14 Nov 2019 11:30:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=AE=9E=E8=AE=AD=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E8=BF=90=E8=A1=8C=E5=9B=BE=E7=BC=96=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=BC=E5=90=88=E6=BC=94=E7=BB=83=E5=80=BC?= =?UTF-8?q?=E7=8F=AD=E5=91=98=E8=A7=92=E8=89=B2=E8=B0=83=E6=95=B4=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chengdu_03/planSchedule/menuTool.vue | 240 +++++----- .../childDialog/childDialog/noticeInfo.vue | 94 ++-- .../fuzhou_01/menus/dialog/standControl.vue | 446 +++++++++--------- .../menus/dialog/standDetainTrainAll.vue | 248 +++++----- src/router/index.js | 5 - src/views/jointTraining/menuDemon.vue | 2 +- .../jointTraining/menuDraft/operateMenu.vue | 232 ++++----- src/views/trainingPlatform/demonList.vue | 3 - 8 files changed, 630 insertions(+), 640 deletions(-) diff --git a/src/jmap/theme/chengdu_03/planSchedule/menuTool.vue b/src/jmap/theme/chengdu_03/planSchedule/menuTool.vue index d3ecde016..a2ee9e8f0 100644 --- a/src/jmap/theme/chengdu_03/planSchedule/menuTool.vue +++ b/src/jmap/theme/chengdu_03/planSchedule/menuTool.vue @@ -1,130 +1,128 @@ \ No newline at end of file + 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 ece241e2b..c85893d53 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 @@ -28,53 +28,53 @@ import { OperationEvent } from '@/scripts/ConstDic'; export default { - name: 'NoticeInfo', - data() { - return { - dialogShow: false, - messages: [this.$t('tip.commandFailed')], - operate: null - }; - }, - computed: { - show() { - return this.dialogShow && !this.$store.state.menuOperation.break; - }, - title() { - return this.$t('tip.hint'); - }, - domIdSure() { - return this.dialogShow ? OperationEvent.Command.close.notice.domId : ''; - } - }, - mounted() { - this.$nextTick(() => { - this.$store.dispatch('training/tipReload'); - }); - }, - methods: { - doShow(operate, messages) { - this.operate = operate || {}; - this.dialogShow = true; - this.messages = [this.$t('tip.commandFailed')]; - if (messages) { - this.messages = messages; - } - this.$nextTick(function () { - this.$store.dispatch('training/emitTipFresh'); - }); - }, - doClose() { - this.dialogShow = false; - this.$store.dispatch('training/emitTipFresh'); - }, - commit() { - this.doClose(); - }, - cancel() { - this.doClose(); - } - } + name: 'NoticeInfo', + data() { + return { + dialogShow: false, + messages: [this.$t('tip.commandFailed')], + operate: null + }; + }, + computed: { + show() { + return this.dialogShow && !this.$store.state.menuOperation.break; + }, + title() { + return this.$t('tip.hint'); + }, + domIdSure() { + return this.dialogShow ? OperationEvent.Command.close.notice.domId : ''; + } + }, + mounted() { + this.$nextTick(() => { + this.$store.dispatch('training/tipReload'); + }); + }, + methods: { + doShow(operate, messages) { + this.operate = operate || {}; + this.dialogShow = true; + this.messages = [this.$t('tip.commandFailed')]; + if (messages) { + this.messages = messages; + } + this.$nextTick(function () { + this.$store.dispatch('training/emitTipFresh'); + }); + }, + doClose() { + this.dialogShow = false; + this.$store.dispatch('training/emitTipFresh'); + }, + commit() { + this.doClose(); + }, + cancel() { + this.doClose(); + } + } }; diff --git a/src/jmap/theme/fuzhou_01/menus/dialog/standControl.vue b/src/jmap/theme/fuzhou_01/menus/dialog/standControl.vue index 03b589830..e98e938f1 100644 --- a/src/jmap/theme/fuzhou_01/menus/dialog/standControl.vue +++ b/src/jmap/theme/fuzhou_01/menus/dialog/standControl.vue @@ -30,237 +30,237 @@ import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/Co import NoticeInfo from './childDialog/childDialog/noticeInfo'; export default { - name: 'StandDetainTrain', - components: { - NoticeInfo - }, - data() { - return { - dialogShow: false, - loading: false, - standName: '', - selected: null, - operation: null - }; - }, - computed: { - show() { - return this.dialogShow && !this.$store.state.menuOperation.break; - }, - domIdCancel() { - return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; - }, - domIdConfirm() { - return this.dialogShow ? getDomIdByOperation(this.operation) : ''; - }, - title() { - if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) { - return this.$t('menu.menuStationStand.detainTrain'); - } else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) { - return this.$t('menu.menuStationStand.cancelDetainTrain'); - } else if (this.operation == OperationEvent.StationStand.cancelDetainTrainForce.menu.operation) { - return this.$t('menu.menuStationStand.cancelDetainTrainForce'); - } else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) { - return this.$t('menu.menuStationStand.earlyDeparture'); - } else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) { - return this.$t('menu.menuStationStand.setJumpStop'); - } else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) { - return this.$t('menu.menuStationStand.cancelJumpStop'); - } - return ''; - }, - preContext() { - return this.title + ':'; - } - }, - mounted() { - this.$nextTick(() => { - this.$store.dispatch('training/tipReload'); - }); - }, - methods: { - doShow(operate, selected) { - if (!this.dialogShow) { - this.standName = ''; - if (selected) { - this.standName = selected.name; - } + name: 'StandDetainTrain', + components: { + NoticeInfo + }, + data() { + return { + dialogShow: false, + loading: false, + standName: '', + selected: null, + operation: null + }; + }, + computed: { + show() { + return this.dialogShow && !this.$store.state.menuOperation.break; + }, + domIdCancel() { + return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; + }, + domIdConfirm() { + return this.dialogShow ? getDomIdByOperation(this.operation) : ''; + }, + title() { + if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) { + return this.$t('menu.menuStationStand.detainTrain'); + } else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) { + return this.$t('menu.menuStationStand.cancelDetainTrain'); + } else if (this.operation == OperationEvent.StationStand.cancelDetainTrainForce.menu.operation) { + return this.$t('menu.menuStationStand.cancelDetainTrainForce'); + } else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) { + return this.$t('menu.menuStationStand.earlyDeparture'); + } else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) { + return this.$t('menu.menuStationStand.setJumpStop'); + } else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) { + return this.$t('menu.menuStationStand.cancelJumpStop'); + } + return ''; + }, + preContext() { + return this.title + ':'; + } + }, + mounted() { + this.$nextTick(() => { + this.$store.dispatch('training/tipReload'); + }); + }, + methods: { + doShow(operate, selected) { + if (!this.dialogShow) { + this.standName = ''; + if (selected) { + this.standName = selected.name; + } - this.selected = selected; - this.operation = operate.operation; - } - this.dialogShow = true; - this.$nextTick(function () { - this.$store.dispatch('training/emitTipFresh'); - }); - }, - doClose() { - this.loading = false; - this.dialogShow = false; - this.$store.dispatch('training/emitTipFresh'); - }, - commit() { - if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) { - /** 设置扣车*/ - this.setDetainTrain(); - } else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) { - /** 取消扣车*/ - this.cancelDetainTrain(); - } else if (this.operation == OperationEvent.StationStand.cancelDetainTrainForce.menu.operation) { - /** 强制取消扣车*/ - this.cancelDetainTrainForce(); - } else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) { - /** 提前发车*/ - this.earlyDeparture(); - } else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) { - /** 设置跳停*/ - this.setJumpStop(); - } else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) { - /** 取消跳停*/ - this.cancelJumpStop(); - } - }, - // 设置扣车 - setDetainTrain() { - const operate = { - send: true, - type: MapDeviceType.StationStand.type, - operation: OperationEvent.StationStand.setDetainTrain.menu.operation - }; + this.selected = selected; + this.operation = operate.operation; + } + this.dialogShow = true; + this.$nextTick(function () { + this.$store.dispatch('training/emitTipFresh'); + }); + }, + doClose() { + this.loading = false; + this.dialogShow = false; + this.$store.dispatch('training/emitTipFresh'); + }, + commit() { + if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) { + /** 设置扣车*/ + this.setDetainTrain(); + } else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) { + /** 取消扣车*/ + this.cancelDetainTrain(); + } else if (this.operation == OperationEvent.StationStand.cancelDetainTrainForce.menu.operation) { + /** 强制取消扣车*/ + this.cancelDetainTrainForce(); + } else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) { + /** 提前发车*/ + this.earlyDeparture(); + } else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) { + /** 设置跳停*/ + this.setJumpStop(); + } else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) { + /** 取消跳停*/ + this.cancelJumpStop(); + } + }, + // 设置扣车 + setDetainTrain() { + const operate = { + send: true, + type: MapDeviceType.StationStand.type, + operation: OperationEvent.StationStand.setDetainTrain.menu.operation + }; - this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - this.loading = false; - this.doClose(); - if (!valid) { - this.$refs.noticeInfo.doShow(operate); - } - }).catch(() => { - this.loading = false; - this.doClose(); - this.$refs.noticeInfo.doShow(operate); - }); - }, - // 取消扣车 - cancelDetainTrain() { - const operate = { - send: true, - type: MapDeviceType.StationStand.type, - operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation - }; + this.loading = true; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.loading = false; + this.doClose(); + if (!valid) { + this.$refs.noticeInfo.doShow(operate); + } + }).catch(() => { + this.loading = false; + this.doClose(); + this.$refs.noticeInfo.doShow(operate); + }); + }, + // 取消扣车 + cancelDetainTrain() { + const operate = { + send: true, + type: MapDeviceType.StationStand.type, + operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation + }; - this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - this.loading = false; - this.doClose(); - if (!valid) { - this.$refs.noticeInfo.doShow(operate); - } - }).catch(() => { - this.loading = false; - this.doClose(); - this.$refs.noticeInfo.doShow(operate); - }); - }, - // 强制取消扣车 - cancelDetainTrainForce() { - const operate = { - send: true, - type: MapDeviceType.StationStand.type, - operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation - }; + this.loading = true; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.loading = false; + this.doClose(); + if (!valid) { + this.$refs.noticeInfo.doShow(operate); + } + }).catch(() => { + this.loading = false; + this.doClose(); + this.$refs.noticeInfo.doShow(operate); + }); + }, + // 强制取消扣车 + cancelDetainTrainForce() { + const operate = { + send: true, + type: MapDeviceType.StationStand.type, + operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation + }; - this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - this.loading = false; - this.doClose(); - if (!valid) { - this.$refs.noticeInfo.doShow(operate); - } - }).catch(() => { - this.loading = false; - this.doClose(); - this.$refs.noticeInfo.doShow(operate); - }); - }, - // 提前发车 - earlyDeparture() { - const operate = { - send: true, - type: MapDeviceType.StationStand.type, - operation: OperationEvent.StationStand.earlyDeparture.menu.operation - }; + this.loading = true; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.loading = false; + this.doClose(); + if (!valid) { + this.$refs.noticeInfo.doShow(operate); + } + }).catch(() => { + this.loading = false; + this.doClose(); + this.$refs.noticeInfo.doShow(operate); + }); + }, + // 提前发车 + earlyDeparture() { + const operate = { + send: true, + type: MapDeviceType.StationStand.type, + operation: OperationEvent.StationStand.earlyDeparture.menu.operation + }; - this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - this.loading = false; - if (valid) { - this.doClose(); - } - }).catch(() => { - this.loading = false; - this.doClose(); - this.$refs.noticeInfo.doShow(operate); - }); - }, - // 设置跳停 - setJumpStop() { - const operate = { - send: true, - type: MapDeviceType.StationStand.type, - operation: OperationEvent.StationStand.setJumpStop.menu.operation, - val: this.selected.direction // 站台的上下行方向, 01:下行 /02:上行 - }; + this.loading = true; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.loading = false; + if (valid) { + this.doClose(); + } + }).catch(() => { + this.loading = false; + this.doClose(); + this.$refs.noticeInfo.doShow(operate); + }); + }, + // 设置跳停 + setJumpStop() { + const operate = { + send: true, + type: MapDeviceType.StationStand.type, + operation: OperationEvent.StationStand.setJumpStop.menu.operation, + val: this.selected.direction // 站台的上下行方向, 01:下行 /02:上行 + }; - this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - this.loading = false; - if (valid) { - this.doClose(); - } - }).catch(() => { - this.loading = false; - this.doClose(); - this.$refs.noticeInfo.doShow(operate); - }); - }, - // 取消跳停 - cancelJumpStop() { - const operate = { - send: true, - type: MapDeviceType.StationStand.type, - operation: OperationEvent.StationStand.cancelJumpStop.menu.operation, - val: this.selected.direction // 站台的上下行方向, 01:下行 /02:上行 - }; + this.loading = true; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.loading = false; + if (valid) { + this.doClose(); + } + }).catch(() => { + this.loading = false; + this.doClose(); + this.$refs.noticeInfo.doShow(operate); + }); + }, + // 取消跳停 + cancelJumpStop() { + const operate = { + send: true, + type: MapDeviceType.StationStand.type, + operation: OperationEvent.StationStand.cancelJumpStop.menu.operation, + val: this.selected.direction // 站台的上下行方向, 01:下行 /02:上行 + }; - this.loading = true; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - this.loading = false; - if (valid) { - this.doClose(); - } - }).catch(() => { - this.loading = false; - this.doClose(); - this.$refs.noticeInfo.doShow(operate); - }); - }, - cancel() { - const operate = { - type: MapDeviceType.StationStand.type, - operation: OperationEvent.Command.cancel.menu.operation - }; + this.loading = true; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.loading = false; + if (valid) { + this.doClose(); + } + }).catch(() => { + this.loading = false; + this.doClose(); + this.$refs.noticeInfo.doShow(operate); + }); + }, + cancel() { + const operate = { + type: MapDeviceType.StationStand.type, + operation: OperationEvent.Command.cancel.menu.operation + }; - this.loading = false; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.doClose(); - } - }).catch(() => { - this.doClose(); - }); - } - } + this.loading = false; + this.$store.dispatch('training/next', operate).then(({ valid }) => { + if (valid) { + this.doClose(); + } + }).catch(() => { + this.doClose(); + }); + } + } };