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