From 6fcba825f2f67456d534a22e62d9b8e5bdfc6dc0 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Thu, 14 Nov 2019 10:50:11 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=BF=90=E8=A1=8C=E5=9B=BE=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=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 --- src/views/approval/runPlan/index.vue | 3 - src/views/components/systemTime/digit.vue | 136 +++++++++--------- src/views/planMonitor/editTool/index.vue | 8 +- .../editTool/menus/components/dataTable.vue | 76 +++++----- src/views/planMonitor/editTool/schedule.vue | 11 +- 5 files changed, 110 insertions(+), 124 deletions(-) diff --git a/src/views/approval/runPlan/index.vue b/src/views/approval/runPlan/index.vue index 352a185ab..7595d97e0 100644 --- a/src/views/approval/runPlan/index.vue +++ b/src/views/approval/runPlan/index.vue @@ -110,9 +110,6 @@ export default { this.queryList.reload(); } }, - goDetail() { - this.$router.push({path:``}); - }, async loadInitData() { try { // 获取地图 diff --git a/src/views/components/systemTime/digit.vue b/src/views/components/systemTime/digit.vue index 04015e69c..c249cfd26 100644 --- a/src/views/components/systemTime/digit.vue +++ b/src/views/components/systemTime/digit.vue @@ -33,74 +33,74 @@ diff --git a/src/views/planMonitor/editTool/index.vue b/src/views/planMonitor/editTool/index.vue index 45f1d5b23..58a6ca1d9 100644 --- a/src/views/planMonitor/editTool/index.vue +++ b/src/views/planMonitor/editTool/index.vue @@ -3,7 +3,6 @@ { checkLoginLine(); - }, 3000 * 60); + }, 5000 * 60); }, beforeDestroy() { if (this.timeDemon) { @@ -116,11 +115,6 @@ export default { } }, methods: { - setPosition() { - this.$nextTick(() => { - this.$refs.schedule.setPosition(); - }); - }, dispatchDialog(dialogObj) { this.$nextTick(() => { if (this.$refs[dialogObj.name]) { diff --git a/src/views/planMonitor/editTool/menus/components/dataTable.vue b/src/views/planMonitor/editTool/menus/components/dataTable.vue index 11f699a69..5fce37d15 100644 --- a/src/views/planMonitor/editTool/menus/components/dataTable.vue +++ b/src/views/planMonitor/editTool/menus/components/dataTable.vue @@ -31,44 +31,44 @@ diff --git a/src/views/planMonitor/editTool/schedule.vue b/src/views/planMonitor/editTool/schedule.vue index 142580285..52af4548a 100644 --- a/src/views/planMonitor/editTool/schedule.vue +++ b/src/views/planMonitor/editTool/schedule.vue @@ -38,14 +38,10 @@ export default { DataTable }, props: { - lineCode: { - type: String, + planConvert: { + type: Object, required: true }, - // planConvert: { - // type: Object, - // required: true - // }, maxWidth: { type: Number, required: true @@ -57,7 +53,6 @@ export default { }, data() { return { - planConvert: null, top: 0, height: 0, mapName: '', @@ -368,7 +363,7 @@ export default { this.mapName = `${resp.data.name} (${this.$route.query.planName || ''})`; }); } - this.planConvert = this.$theme.loadPlanConvert(this.lineCode); + this.$store.dispatch('runPlan/clear').then(() => { this.loadInitChart().then(() => { if (this.$route.query.mapId) { From 25f7b4f0c96f74000774deaffc9aa6f9b20948e3 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Thu, 14 Nov 2019 11:26:23 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=B7=AF=E7=94=B1=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/permission.js | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/permission.js b/src/permission.js index a321cc4fb..6d9573c38 100644 --- a/src/permission.js +++ b/src/permission.js @@ -2,7 +2,6 @@ import Vue from 'vue'; import store from '@/store'; import router from './router'; import NProgress from 'nprogress'; // Progress 进度条 -// import 'nprogress/nprogress.css';// Progress 进度条样式 import { admin, userDesign} from './router'; import { getToken, getDesignToken} from '@/utils/auth'; // 验权 import { LoginParams } from '@/utils/login'; @@ -17,6 +16,14 @@ function hasPermission(roles, permissionRoles) { const whiteList = ['/login', '/design/login', '/xty/login', '/designxty/login']; // 不重定向白名单 +const designPageRegex = [/^\/design/, /^\/scriptDisplay/, /^\/publish/, /^\/orderauthor/, /^\/system/, /^\/display\/record/, /^\/display\/manage/, /^\/apply/, /^\/plan/, /^\/display\/plan/]; + +function isDesignPage(toRoutePath) { + return designPageRegex.some(item => { + return item.test(toRoutePath); + }); +} + const loginPage = whiteList[0]; const loginDesignPage = whiteList[1]; @@ -35,20 +42,10 @@ function getRouteInfo(to) { loginPath = loginDesignXtyPage; getTokenInfo = getDesignToken; clientId = LoginParams.Design.clientId; - } else if (/^\/design/.test(toRoutePath) || /^\/scriptDisplay/.test(toRoutePath) || /^\/publish/.test(toRoutePath) || /^\/orderauthor/.test(toRoutePath) || /^\/system/.test(toRoutePath) || /^\/display\/record/.test(toRoutePath) || /^\/display\/manage/.test(toRoutePath) || /^\/apply/.test(toRoutePath)) { + } else if (isDesignPage(toRoutePath)) { loginPath = getSessionStorage('project') === 'designxty' ? loginDesignXtyPage : loginDesignPage; getTokenInfo = getDesignToken; clientId = LoginParams.Design.clientId; - } else if (/^\/plan/.test(toRoutePath) || /^\/display\/plan/.test(toRoutePath)) { - if (getSessionStorage('project').startsWith('design')) { - loginPath = getSessionStorage('project') === 'designxty' ? loginDesignXtyPage : loginDesignPage; - getTokenInfo = getDesignToken; - clientId = LoginParams.Design.clientId; - } else { - loginPath = getSessionStorage('project') === 'xty' ? loginXtyPage : loginPage; - getTokenInfo = getToken; - clientId = null; - } } else if ( /^\/xty/.test(toRoutePath)) { loginPath = loginXtyPage; getTokenInfo = getToken; @@ -58,7 +55,6 @@ function getRouteInfo(to) { getTokenInfo = getToken; clientId = null; } - return { clientId, loginPath, getTokenInfo }; } 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 3/3] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=AE=9E=E8=AE=AD?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E8=BF=90=E8=A1=8C=E5=9B=BE=E7=BC=96=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E7=BB=BC=E5=90=88=E6=BC=94=E7=BB=83?= =?UTF-8?q?=E5=80=BC=E7=8F=AD=E5=91=98=E8=A7=92=E8=89=B2=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E9=97=AE=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(); + }); + } + } };