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(); + }); + } + } };