From 1a998f405a72a1a6e41585c8e5ae181bab5d8da1 Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Mon, 30 Mar 2020 09:45:23 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BD=9B=E5=B1=B1=E4=B8=80=E5=8F=B7=E7=BA=BF?=
=?UTF-8?q?=20=E6=93=8D=E4=BD=9C=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
---
.../theme/chengdu_03/menus/menuSignal.vue | 2 +-
.../foshan_01/menus/menuStationStand.vue | 153 +++---------------
2 files changed, 20 insertions(+), 135 deletions(-)
diff --git a/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue b/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue
index 5fd587718..9e5ff2028 100644
--- a/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue
+++ b/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue
@@ -7,7 +7,7 @@
-
+
diff --git a/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue b/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue
index 1f8f107ce..97499ce3f 100644
--- a/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue
+++ b/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue
@@ -28,6 +28,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
+import {menuOperate, commitOperate} from './utils/menuOperate';
export default {
name: 'StationStandMenu',
@@ -236,172 +237,56 @@ export default {
},
// 设置扣车
setDetainTrain() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
- param: {
- standCode: `${this.selected.code}`
- }
- };
-
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standControl.doShow(step, this.selected);
- }
+ commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:this.selected.code}, 0).then((data)=>{
+ this.$refs.standControl.doShow(data.operate, this.selected);
});
},
// 取消扣车
cancelDetainTrain() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
- param: {
- standCode: `${this.selected.code}`
- }
- };
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standControl.doShow(step, this.selected);
- }
+ commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:this.selected.code}, 0).then((data)=>{
+ this.$refs.standControl.doShow(data.operate, this.selected);
});
},
// 设置跳停
setJumpStop() {
- const step = {
- start: true,
- code: this.selected.code,
- operation: OperationEvent.StationStand.setJumpStop.menu.operation,
- param: {
- standCode: this.selected.code
- }
- };
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standJumpStopControl.doShow(step, this.selected);
- }
+ commitOperate(menuOperate.StationStand.setJumpStop, {standCode:this.selected.code}, 0).then((data)=>{
+ this.$refs.standJumpStopControl.doShow(data.operate, this.selected);
});
},
// 取消跳停
cancelJumpStop() {
- const step = {
- start: true,
- code: this.selected.code,
- operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
- param: {
- standCode: this.selected.code
- }
- };
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standJumpStopControl.doShow(step, this.selected);
- }
+ commitOperate(menuOperate.StationStand.cancelJumpStop, {standCode:this.selected.code}, 0).then((data)=>{
+ this.$refs.standJumpStopControl.doShow(data.operate, this.selected);
});
},
// 设置停站时间
setStopTime() {
- const step = {
- start: true,
- code: this.selected.code,
- operation: OperationEvent.StationStand.setStopTime.menu.operation,
- param: {
- standCode: this.selected.code
- }
- };
- this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- // Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {standCode: `${this.selected.code}`}).then(resp => {
- // const tempData = resp.data;
- const tempData = [];
- this.$refs.standStopTime.doShow(step, this.selected, tempData);
- // });
- }
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
+ commitOperate(menuOperate.StationStand.setStopTime, {standCode:this.selected.code}, 0).then((data)=>{
+ this.$refs.standStopTime.doShow(data.operate, this.selected, []);
});
},
// 设置运行等级
setRunLevel() {
- const step = {
- start: true,
- code: this.selected.code,
- operation: OperationEvent.StationStand.setRunLevel.menu.operation,
- param: {
- standCode: this.selected.code
- }
- };
- this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- // Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {standCode: `${this.selected.code}`}).then(resp => {
- // const tempData = resp.data;
- const tempData = [];
- this.$refs.standRunLevel.doShow(step, this.selected, tempData);
- // });
- }
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
+ commitOperate(menuOperate.StationStand.setRunLevel, {standCode:this.selected.code}, 0).then((data)=>{
+ this.$refs.standRunLevel.doShow(data.operate, this.selected, []);
});
},
// 设置提前发车
earlyDeparture() {
- const step = {
- start: true,
- code: this.selected.code,
- operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
- param: {
- standCode: this.selected.code
- }
- };
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standControl.doShow(step, this.selected);
- }
+ commitOperate(menuOperate.StationStand.earlyDeparture, {standCode:this.selected.code}, 0).then((data)=>{
+ this.$refs.standControl.doShow(data.operate, this.selected);
});
},
// 全线取消扣车
cancelDetainTrainAll() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
- param: {
- standCode: `${this.selected.code}`
- }
- };
- this.$store.dispatch('training/next', step).then(({ valid }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.standDetainTrainAll.doShow(step, this.selected);
- }
+ commitOperate(menuOperate.StationStand.cancelDetainTrainAll, {standCode:this.selected.code}, 0).then((data)=>{
+ this.$refs.standDetainTrainAll.doShow(data.operate, this.selected);
});
},
// 查询站台状态
detail() {
- const step = {
- start: true,
- code: this.selected.code,
- operation: OperationEvent.StationStand.detail.menu.operation,
- param: {}
- };
- this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- // Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {standCode: `${this.selected.code}`}).then(resp => {
- // const tempData = resp.data;
- const tempData = [];
- this.$refs.standDetail.doShow(step, this.selected, tempData);
- // });
- }
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
+ commitOperate(menuOperate.StationStand.detail, {standCode:this.selected.code}, 0).then((data)=>{
+ this.$refs.standDetail.doShow(data.operate, this.selected, []);
});
}
}