From 928b38081163b6421c7d4595033b7099932253d1 Mon Sep 17 00:00:00 2001 From: fan Date: Thu, 1 Jun 2023 15:43:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E9=93=81=E7=BA=BF=E8=B7=AF=E4=BA=8C?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=E6=96=B0=E5=BB=BA=E8=AE=A1=E5=88=92=E8=BD=A6?= =?UTF-8?q?&=E6=96=B0=E5=A2=9E=E6=95=85=E9=9A=9C=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A4=87=E7=94=A8=E8=BD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datie_02/menus/dialog/loadSpareTrain.vue | 163 ++++++++++++++++++ .../theme/datie_02/menus/menuSection.vue | 33 +++- 2 files changed, 187 insertions(+), 9 deletions(-) create mode 100644 src/jmapNew/theme/datie_02/menus/dialog/loadSpareTrain.vue diff --git a/src/jmapNew/theme/datie_02/menus/dialog/loadSpareTrain.vue b/src/jmapNew/theme/datie_02/menus/dialog/loadSpareTrain.vue new file mode 100644 index 000000000..6f9248a37 --- /dev/null +++ b/src/jmapNew/theme/datie_02/menus/dialog/loadSpareTrain.vue @@ -0,0 +1,163 @@ + + + + diff --git a/src/jmapNew/theme/datie_02/menus/menuSection.vue b/src/jmapNew/theme/datie_02/menus/menuSection.vue index 5ce3df704..80c1a3906 100644 --- a/src/jmapNew/theme/datie_02/menus/menuSection.vue +++ b/src/jmapNew/theme/datie_02/menus/menuSection.vue @@ -4,6 +4,7 @@ + @@ -22,6 +23,7 @@ import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/men import AddSpareTrain from './dialog/addSpareTrain'; import DrawSelect from './dialog/drawSelect'; import ForkDirective from './dialog/forkDirective'; +import LoadSpareTrain from './dialog/loadSpareTrain'; export default { name: 'SectionMenu', @@ -32,7 +34,8 @@ export default { SetFault, AddSpareTrain, DrawSelect, - ForkDirective + ForkDirective, + LoadSpareTrain }, props: { selected: { @@ -84,6 +87,11 @@ export default { label: '取消故障', handler: this.cancelStoppage, cmdType: CMD.Fault.CMD_CANCEL_FAULT + }, + { + label: '设置备用车', + handler: this.loadSpare, + cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN } ] }; @@ -107,14 +115,14 @@ export default { } }, mounted() { - const isDev = process.env.NODE_ENV === 'development'; - if (isDev) { - this.menuNormal.push( { - label: '新建计划列车', - handler: this.createPlanTrain, - cmdType: CMD.Section.CMD_Train_Init_Plan - }); - } + // const isDev = process.env.NODE_ENV === 'development'; + // if (isDev) { + // this.menuNormal.push( { + // label: '新建计划列车', + // handler: this.createPlanTrain, + // cmdType: CMD.Section.CMD_Train_Init_Plan + // }); + // } }, methods: { initMenu() { @@ -202,6 +210,13 @@ export default { this.$refs.trainAddPlan.doShow(operate); } }); + }, + loadSpare() { + commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{ + if (valid) { + this.$refs.loadSpareTrain.doShow(operate, this.selected); + } + }); } } };