From dcb1779297db282e1f58cbb6c27c4c4b53d57817 Mon Sep 17 00:00:00 2001 From: joylink_fanyuhong <18706759286@163.com> Date: Wed, 12 Feb 2020 17:48:30 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chengdu_03/menus/dialog/trainInitPlan.vue | 192 ++++++++++++++++++ .../theme/chengdu_03/menus/menuTrain.vue | 45 +++- 2 files changed, 226 insertions(+), 11 deletions(-) create mode 100644 src/jmapNew/theme/chengdu_03/menus/dialog/trainInitPlan.vue diff --git a/src/jmapNew/theme/chengdu_03/menus/dialog/trainInitPlan.vue b/src/jmapNew/theme/chengdu_03/menus/dialog/trainInitPlan.vue new file mode 100644 index 000000000..f239906df --- /dev/null +++ b/src/jmapNew/theme/chengdu_03/menus/dialog/trainInitPlan.vue @@ -0,0 +1,192 @@ + + + + diff --git a/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue b/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue index 8a6ebf24d..8d26ed94a 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue @@ -8,6 +8,7 @@ + @@ -15,16 +16,19 @@ import PopMenu from '@/components/PopMenu'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import { mapGetters } from 'vuex'; -import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; -import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/menuItemStatus'; +import { MenuDisabledState } from './utils/menuItemStatus'; import TrainControl from './dialog/trainControl'; import TrainEditNumber from './dialog/trainEditNumber'; import TrainMoveNumber from './dialog/trainMoveNumber'; import TrainCreateNumber from './dialog/trainCreateNumber'; import TrainDeleteNumber from './dialog/trainDeleteNumber'; +import TrainInitPlan from './dialog/trainInitPlan'; import TrainDetailInfo from './dialog/trainDetailInfo'; import CancelMouseState from '@/mixin/CancelMouseState'; +import CMD from '@/scripts/cmdPlugin/CommandEnum'; +import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; +import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; export default { name: 'MenuTrain', @@ -36,7 +40,8 @@ export default { TrainMoveNumber, TrainCreateNumber, TrainDeleteNumber, - TrainDetailInfo + TrainDetailInfo, + TrainInitPlan }, mixins: [ CancelMouseState @@ -53,8 +58,8 @@ export default { return { menu: [], menuNormal: { - local: [], - central: [ + Local: [], + Center: [ { label: '新建车组号', handler: this.createTrainNo, @@ -114,8 +119,12 @@ export default { handler: this.undeveloped, disabledCallback: MenuDisabledState.Train.moveTrainId, auth: { station: true, center: true} + }, + { + label: '新建计划列车', + handler: this.createPlanTrain, + cmdType: CMD.TrainWindow.CMD_Train_Init_Plan } - ] }, menuForce: [ @@ -166,14 +175,12 @@ export default { }, initMenu() { // 编辑模式菜单列表 - this.menu = trainMenuFiltration(this.menuNormal); - + this.menu = MenuContextHandler.covert(this.menuNormal); + console.log('============', this.menu); // 故障模式菜单列表 if (this.operatemode === OperateMode.FAULT) { - this.menu = [...this.menuForce, ...this.menuSpeed]; + this.menu = this.menuForce; } - - this.menu = menuConvert(this.menu); }, doShow(point) { this.clickEvent(); @@ -377,6 +384,22 @@ export default { } }); }, + createPlanTrain() { + console.log(this.selected, '==========='); + const operate = { + start: true, + operation: OperationEvent.Train.createPlanTrain.menu.operation, + param: { + switchCode: this.selected.code + } + }; + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.trainInitPlan.doShow(operate, this.selected); + } + }); + }, undeveloped() { this.doClose(); this.$alert('实现中......', '提示', { From a14753024821ee54e97f0c600133fed539188f55 Mon Sep 17 00:00:00 2001 From: joylink_fanyuhong <18706759286@163.com> Date: Wed, 12 Feb 2020 18:08:31 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chengdu_03/menus/dialog/trainInitPlan.vue | 38 +++++++------------ .../theme/chengdu_03/menus/menuTrain.vue | 12 +++--- 2 files changed, 19 insertions(+), 31 deletions(-) diff --git a/src/jmapNew/theme/chengdu_03/menus/dialog/trainInitPlan.vue b/src/jmapNew/theme/chengdu_03/menus/dialog/trainInitPlan.vue index f239906df..9cd82c55c 100644 --- a/src/jmapNew/theme/chengdu_03/menus/dialog/trainInitPlan.vue +++ b/src/jmapNew/theme/chengdu_03/menus/dialog/trainInitPlan.vue @@ -11,33 +11,19 @@ :close-on-click-modal="false" >
- + 区段: - + - + - - - - + + - - - - + +
@@ -91,7 +77,8 @@ export default { }, computed: { ...mapGetters('map', [ - 'stationStandList' + 'stationStandList', + 'trainWindowSectionCode' ]), show() { return this.dialogShow && !this.$store.state.menuOperation.break; @@ -100,15 +87,16 @@ export default { return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; }, domIdConfirm() { - return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : ''; + return this.dialogShow ? OperationEvent.Train.createPlanTrain.menu.domId : ''; }, title() { - return '新建车组号'; + return '新建计划车'; } }, mounted() { this.$nextTick(() => { this.$store.dispatch('training/tipReload'); + this.addModel.sectionCode = this.trainWindowSectionCode.code; }); }, methods: { @@ -186,7 +174,7 @@ export default { background-color: #F0F0F0; } .el-dialog-div { - height: 400px; + height: 300px; overflow: auto; } diff --git a/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue b/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue index 8d26ed94a..8ce3829dc 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue @@ -176,7 +176,6 @@ export default { initMenu() { // 编辑模式菜单列表 this.menu = MenuContextHandler.covert(this.menuNormal); - console.log('============', this.menu); // 故障模式菜单列表 if (this.operatemode === OperateMode.FAULT) { this.menu = this.menuForce; @@ -385,18 +384,19 @@ export default { }); }, createPlanTrain() { - console.log(this.selected, '==========='); - const operate = { + const step = { start: true, + code: this.selected.code, operation: OperationEvent.Train.createPlanTrain.menu.operation, param: { - switchCode: this.selected.code + trainWindowCode: this.selected.code } }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { + + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.trainInitPlan.doShow(operate, this.selected); + this.$refs.trainInitPlan.doShow(step, this.selected); } }); }, From 926f82b04c1c10e0b05fc20995b56468d8c7af4a Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Wed, 12 Feb 2020 18:19:21 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E5=8C=97=E4=BA=AC=E4=B8=80=E5=8F=B7?= =?UTF-8?q?=E7=BA=BF=E8=BD=A6=E6=AC=A1=E7=AA=97=E6=96=B0=E5=BB=BA=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E8=BD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/beijing_01/menus/menuTrain.vue | 410 +++++++++--------- 1 file changed, 212 insertions(+), 198 deletions(-) diff --git a/src/jmapNew/theme/beijing_01/menus/menuTrain.vue b/src/jmapNew/theme/beijing_01/menus/menuTrain.vue index a37eb1d68..2b062f2ef 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuTrain.vue @@ -35,6 +35,8 @@ import TrainSetHead from './dialog/trainSetHead'; import TrainSetWork from './dialog/trainSetWork'; import TrainFlag from './dialog/trainFlag'; import { mouseCancelState } from './utils/menuItemStatus'; +import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; +import CMD from '@/scripts/cmdPlugin/CommandEnum'; export default { name: 'MenuTrain', @@ -65,197 +67,207 @@ export default { return { menu: [], menuNormal: { - local: [ + Local: [ + // { + // label: '定义车组号', + // handler: this.addTrainId, + // disabledCallback: MenuDisabledState.Train.addTrainId, + // auth: { station: true, center: true } + // }, + // { + // label: '删除车组号', + // handler: this.delTrainId, + // disabledCallback: MenuDisabledState.Train.delTrainId, + // auth: { station: true, center: true } + // }, + // { + // label: '修改车组号', + // handler: this.editTrainId, + // disabledCallback: MenuDisabledState.Train.editTrainId, + // auth: { station: true, center: true } + // }, + // { + // label: '移动车组号', + // handler: this.moveTrainId, + // disabledCallback: MenuDisabledState.Train.moveTrainId, + // auth: { station: true, center: true } + // }, + // { + // type: 'separator' + // }, + // { + // label: '设置计划车', + // handler: this.setPlanTrain, + // disabledCallback: MenuDisabledState.Train.setPlanTrain, + // auth: { station: true, center: true } + // }, + // { + // label: '设置头码车', + // handler: this.setHeadTrain, + // disabledCallback: MenuDisabledState.Train.setHeadTrain, + // auth: { station: true, center: true } + // }, + // { + // label: '设置人工车', + // handler: this.setWorkTrain, + // disabledCallback: MenuDisabledState.Train.setWorkTrain, + // auth: { station: true, center: true } + // }, + // { + // type: 'separator' + // }, + // { + // label: '添加计划车', + // // handler: this.undeveloped, + // handler: this.addPlanTrain, + // // disabledCallback: MenuDisabledState.Train.moveTrainId, + // disabledCallback: MenuDisabledState.Train.addPlanTrain, + // auth: { station: true, center: true } + // }, + // { + // label: '删除计划车', + // // handler: this.undeveloped, + // handler: this.deletePlanTrain, + // disabledCallback: MenuDisabledState.Train.moveTrainId, + // auth: { station: true, center: true } + // }, + // { + // label: '平移计划车', + // // handler: this.undeveloped, + // handler: this.moveEventlyTrain, + // disabledCallback: MenuDisabledState.Train.moveEventlyTrain, + // auth: { station: true, center: true } + // }, + // { + // type: 'separator' + // }, + // { + // label: '标记重点列车', + // handler: this.trainToFlag, + // disabledCallback: MenuDisabledState.Train.trainToFlag, + // auth: { station: true, center: true } + // }, + // { + // label: '取消标记重点列车', + // handler: this.trainUnFlag, + // disabledCallback: MenuDisabledState.Train.trainUnFlag, + // auth: { station: true, center: true } + // }, + // { + // type: 'separator' + // }, + // { + // label: '列车信息', + // handler: this.undeveloped, + // disabledCallback: MenuDisabledState.Train.moveTrainId, + // auth: { station: true, center: true } + // } { - label: '定义车组号', - handler: this.addTrainId, - disabledCallback: MenuDisabledState.Train.addTrainId, - auth: { station: true, center: true } - }, - { - label: '删除车组号', - handler: this.delTrainId, - disabledCallback: MenuDisabledState.Train.delTrainId, - auth: { station: true, center: true } - }, - { - label: '修改车组号', - handler: this.editTrainId, - disabledCallback: MenuDisabledState.Train.editTrainId, - auth: { station: true, center: true } - }, - { - label: '移动车组号', - handler: this.moveTrainId, - disabledCallback: MenuDisabledState.Train.moveTrainId, - auth: { station: true, center: true } - }, - { - type: 'separator' - }, - { - label: '设置计划车', - handler: this.setPlanTrain, - disabledCallback: MenuDisabledState.Train.setPlanTrain, - auth: { station: true, center: true } - }, - { - label: '设置头码车', - handler: this.setHeadTrain, - disabledCallback: MenuDisabledState.Train.setHeadTrain, - auth: { station: true, center: true } - }, - { - label: '设置人工车', - handler: this.setWorkTrain, - disabledCallback: MenuDisabledState.Train.setWorkTrain, - auth: { station: true, center: true } - }, - { - type: 'separator' - }, - { - label: '添加计划车', - // handler: this.undeveloped, - handler: this.addPlanTrain, - // disabledCallback: MenuDisabledState.Train.moveTrainId, - disabledCallback: MenuDisabledState.Train.addPlanTrain, - auth: { station: true, center: true } - }, - { - label: '删除计划车', - // handler: this.undeveloped, - handler: this.deletePlanTrain, - disabledCallback: MenuDisabledState.Train.moveTrainId, - auth: { station: true, center: true } - }, - { - label: '平移计划车', - // handler: this.undeveloped, - handler: this.moveEventlyTrain, - disabledCallback: MenuDisabledState.Train.moveEventlyTrain, - auth: { station: true, center: true } - }, - { - type: 'separator' - }, - { - label: '标记重点列车', - handler: this.trainToFlag, - disabledCallback: MenuDisabledState.Train.trainToFlag, - auth: { station: true, center: true } - }, - { - label: '取消标记重点列车', - handler: this.trainUnFlag, - disabledCallback: MenuDisabledState.Train.trainUnFlag, - auth: { station: true, center: true } - }, - { - type: 'separator' - }, - { - label: '列车信息', - handler: this.undeveloped, - disabledCallback: MenuDisabledState.Train.moveTrainId, - auth: { station: true, center: true } - } + label: '新建计划车', + handler: this.addPlanTrain, + cmdType: CMD.TrainWindow.CMD_Train_Init_Plan + }, ], - central: [ + Center: [ + // { + // label: '定义车组号', + // handler: this.addTrainId, + // disabledCallback: MenuDisabledState.Train.addTrainId, + // auth: { station: true, center: true } + // }, + // { + // label: '删除车组号', + // handler: this.delTrainId, + // disabledCallback: MenuDisabledState.Train.delTrainId, + // auth: { station: true, center: true } + // }, + // { + // label: '修改车组号', + // handler: this.editTrainId, + // disabledCallback: MenuDisabledState.Train.editTrainId, + // auth: { station: true, center: true } + // }, + // { + // label: '移动车组号', + // handler: this.moveTrainId, + // disabledCallback: MenuDisabledState.Train.moveTrainId, + // auth: { station: true, center: true } + // }, + // { + // type: 'separator' + // }, + // { + // label: '设置计划车', + // handler: this.setPlanTrain, + // disabledCallback: MenuDisabledState.Train.setPlanTrain, + // auth: { station: true, center: true } + // }, + // { + // label: '设置头码车', + // handler: this.setHeadTrain, + // disabledCallback: MenuDisabledState.Train.setHeadTrain, + // auth: { station: true, center: true } + // }, + // { + // label: '设置人工车', + // handler: this.setWorkTrain, + // disabledCallback: MenuDisabledState.Train.setWorkTrain, + // auth: { station: true, center: true } + // }, + // { + // type: 'separator' + // }, + // { + // label: '添加计划车', + // // handler: this.undeveloped, + // handler: this.addPlanTrain, + // // disabledCallback: MenuDisabledState.Train.moveTrainId, + // disabledCallback: MenuDisabledState.Train.addPlanTrain, + // auth: { station: true, center: true } + // }, + // { + // label: '删除计划车', + // // handler: this.undeveloped, + // handler: this.deletePlanTrain, + // disabledCallback: MenuDisabledState.Train.moveTrainId, + // auth: { station: true, center: true } + // }, + // { + // label: '平移计划车', + // // handler: this.undeveloped, + // handler: this.moveEventlyTrain, + // disabledCallback: MenuDisabledState.Train.moveTrainId, + // auth: { station: true, center: true } + // }, + // { + // type: 'separator' + // }, + // { + // label: '标记重点列车', + // handler: this.trainToFlag, + // disabledCallback: MenuDisabledState.Train.trainToFlag, + // auth: { station: true, center: true } + // }, + // { + // label: '取消标记重点列车', + // handler: this.trainUnFlag, + // disabledCallback: MenuDisabledState.Train.trainUnFlag, + // auth: { station: true, center: true } + // }, + // { + // type: 'separator' + // }, + // { + // label: '列车信息', + // handler: this.undeveloped, + // disabledCallback: MenuDisabledState.Train.moveTrainId, + // auth: { station: true, center: true } + // }, { - label: '定义车组号', - handler: this.addTrainId, - disabledCallback: MenuDisabledState.Train.addTrainId, - auth: { station: true, center: true } - }, - { - label: '删除车组号', - handler: this.delTrainId, - disabledCallback: MenuDisabledState.Train.delTrainId, - auth: { station: true, center: true } - }, - { - label: '修改车组号', - handler: this.editTrainId, - disabledCallback: MenuDisabledState.Train.editTrainId, - auth: { station: true, center: true } - }, - { - label: '移动车组号', - handler: this.moveTrainId, - disabledCallback: MenuDisabledState.Train.moveTrainId, - auth: { station: true, center: true } - }, - { - type: 'separator' - }, - { - label: '设置计划车', - handler: this.setPlanTrain, - disabledCallback: MenuDisabledState.Train.setPlanTrain, - auth: { station: true, center: true } - }, - { - label: '设置头码车', - handler: this.setHeadTrain, - disabledCallback: MenuDisabledState.Train.setHeadTrain, - auth: { station: true, center: true } - }, - { - label: '设置人工车', - handler: this.setWorkTrain, - disabledCallback: MenuDisabledState.Train.setWorkTrain, - auth: { station: true, center: true } - }, - { - type: 'separator' - }, - { - label: '添加计划车', - // handler: this.undeveloped, - handler: this.addPlanTrain, - // disabledCallback: MenuDisabledState.Train.moveTrainId, - disabledCallback: MenuDisabledState.Train.addPlanTrain, - auth: { station: true, center: true } - }, - { - label: '删除计划车', - // handler: this.undeveloped, - handler: this.deletePlanTrain, - disabledCallback: MenuDisabledState.Train.moveTrainId, - auth: { station: true, center: true } - }, - { - label: '平移计划车', - // handler: this.undeveloped, - handler: this.moveEventlyTrain, - disabledCallback: MenuDisabledState.Train.moveTrainId, - auth: { station: true, center: true } - }, - { - type: 'separator' - }, - { - label: '标记重点列车', - handler: this.trainToFlag, - disabledCallback: MenuDisabledState.Train.trainToFlag, - auth: { station: true, center: true } - }, - { - label: '取消标记重点列车', - handler: this.trainUnFlag, - disabledCallback: MenuDisabledState.Train.trainUnFlag, - auth: { station: true, center: true } - }, - { - type: 'separator' - }, - { - label: '列车信息', - handler: this.undeveloped, - disabledCallback: MenuDisabledState.Train.moveTrainId, - auth: { station: true, center: true } - } + label: '新建计划车', + handler: this.addPlanTrain, + cmdType: CMD.TrainWindow.CMD_Train_Init_Plan + }, ] }, menuForce: [ @@ -306,17 +318,18 @@ export default { }, initMenu() { // 编辑模式菜单列表 - this.menu = trainMenuFiltration(this.menuNormal); - if (this.operatemode === OperateMode.ADMIN) { - this.menu = [...this.menu, ...this.menuForce, ...this.menuSpeed]; - } + // this.menu = trainMenuFiltration(this.menuNormal); + this.menu = MenuContextHandler.covert(this.menuNormal); + // if (this.operatemode === OperateMode.ADMIN) { + // this.menu = [...this.menu, ...this.menuForce, ...this.menuSpeed]; + // } // 故障模式菜单列表 if (this.operatemode === OperateMode.FAULT) { this.menu = [...this.menuForce, ...this.menuSpeed]; } - this.menu = menuConvert(this.menu); + // this.menu = menuConvert(this.menu); }, doShow(point) { this.clickEvent(); @@ -488,12 +501,13 @@ export default { addPlanTrain() { const operate = { start: true, - code: this.selected.code, - type: MapDeviceType.Train.type, - label: MapDeviceType.Train.label, - operation: OperationEvent.Train.addPlanTrainId.menu.operation + code: this.selected.code, + operation: OperationEvent.Train.createPlanTrain.menu.operation, + param: { + trainWindowCode: this.selected.code + } }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.trainAddPlan.doShow(operate, this.selected); From 4c1b03e3d7657ab75a04374b90613ac1f107ec5a Mon Sep 17 00:00:00 2001 From: joylink_fanyuhong <18706759286@163.com> Date: Wed, 12 Feb 2020 18:37:24 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chengdu_03/menus/dialog/trainInitPlan.vue | 26 ++++++++++--------- .../theme/chengdu_03/menus/menuTrain.vue | 8 +++++- src/store/modules/map.js | 5 +++- src/utils/baseUrl.js | 4 +-- 4 files changed, 27 insertions(+), 16 deletions(-) diff --git a/src/jmapNew/theme/chengdu_03/menus/dialog/trainInitPlan.vue b/src/jmapNew/theme/chengdu_03/menus/dialog/trainInitPlan.vue index 9cd82c55c..609dd9bd1 100644 --- a/src/jmapNew/theme/chengdu_03/menus/dialog/trainInitPlan.vue +++ b/src/jmapNew/theme/chengdu_03/menus/dialog/trainInitPlan.vue @@ -12,12 +12,8 @@ >
- - 区段: - - - - + + @@ -42,6 +38,7 @@ import { mapGetters } from 'vuex'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import CancelMouseState from '@/mixin/CancelMouseState'; +import CMD from '@/scripts/cmdPlugin/CommandEnum'; export default { name: 'TrainCreateNumber', @@ -53,8 +50,8 @@ export default { trainNoList: [], trainList: [], selected: null, + sectionName: '', addModel: { - sectionCode: '', trainCode:'', serverNumber: '', tripNumber:'' @@ -96,7 +93,6 @@ export default { mounted() { this.$nextTick(() => { this.$store.dispatch('training/tipReload'); - this.addModel.sectionCode = this.trainWindowSectionCode.code; }); }, methods: { @@ -125,14 +121,20 @@ export default { this.mouseCancelState(this.selected); }, commit() { + console.log(this.trainWindowSectionCode, '=========', OperationEvent.Train.createPlanTrain.menu.operation); this.$refs['form'].validate((valid) => { if (valid) { const operate = { - send: true, - - operation: OperationEvent.Train.createTrainNo.menu.operation + over: true, + operation: OperationEvent.Train.createPlanTrain.menu.operation, + cmdType: CMD.TrainWindow.CMD_Train_Init_Plan, + param: { + sectionCode: this.trainWindowSectionCode, + trainCode: this.addModel.trainCode, // 车组号 + serverNumber: this.addModel.serverNumber, // 服务号 + tripNumber: this.addModel.tripNumber // 车次号 + } }; - this.loading = true; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.loading = false; diff --git a/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue b/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue index 8ce3829dc..38bfe42be 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue @@ -58,7 +58,13 @@ export default { return { menu: [], menuNormal: { - Local: [], + Local: [ + { + label: '新建计划列车', + handler: this.createPlanTrain, + cmdType: CMD.TrainWindow.CMD_Train_Init_Plan + } + ], Center: [ { label: '新建车组号', diff --git a/src/store/modules/map.js b/src/store/modules/map.js index 6923951eb..d3535d898 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -203,6 +203,9 @@ const map = { mapList: (state) => { return state.mapList; }, + trainWindowSectionCode: (state) => { + return state.trainWindowSectionCode; + }, mapConfig: (state) => { return state.mapConfig; }, @@ -467,8 +470,8 @@ const map = { state.map && state.map.sectionList && state.map.sectionList.length) { state.map.sectionList.forEach(elem => { - state.trainWindowSectionCode = elem.code; if (elem.trainWindowCode == code) { + state.trainWindowSectionCode = elem.code; if (state.map.stationList && state.map.stationList.length) { state.map.stationList.forEach(elems => { if (elems.code == elem.stationCode) { diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index fb43ab63b..7e2b70583 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,12 +3,12 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - BASE_API = 'https://test.joylink.club/jlcloud'; + // BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.41:9000'; // 张赛 // BASE_API = 'http://192.168.3.82:9000'; // 杜康 - // BASE_API = 'http://b29z135112.zicp.vip'; + BASE_API = 'http://b29z135112.zicp.vip'; } else { BASE_API = process.env.VUE_APP_BASE_API; } From 5721f17cf9acc4ae76509e283f92e9bd06d50ca1 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Wed, 12 Feb 2020 18:57:02 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E5=8C=97=E4=BA=AC=E7=BA=BF=20=E8=BD=A6?= =?UTF-8?q?=E6=AC=A1=E7=AA=97=20=E6=96=B0=E5=BB=BA=E5=88=97=E8=BD=A6?= =?UTF-8?q?=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 --- .../beijing_01/menus/dialog/trainAddPlan.vue | 93 +++++++++---------- .../theme/beijing_01/menus/menuTrain.vue | 9 +- 2 files changed, 49 insertions(+), 53 deletions(-) diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/trainAddPlan.vue b/src/jmapNew/theme/beijing_01/menus/dialog/trainAddPlan.vue index c187eb6ac..23521b4e1 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/trainAddPlan.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/trainAddPlan.vue @@ -1,16 +1,19 @@