diff --git a/src/jmapNew/theme/beijing_01/menus/menuSection.vue b/src/jmapNew/theme/beijing_01/menus/menuSection.vue
index 07d648269..7871ce8f2 100644
--- a/src/jmapNew/theme/beijing_01/menus/menuSection.vue
+++ b/src/jmapNew/theme/beijing_01/menus/menuSection.vue
@@ -5,6 +5,7 @@
+
@@ -21,6 +22,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {menuOperate, commitOperate} from './utils/menuOperate';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default {
name: 'SectionMenu',
@@ -29,7 +31,8 @@ export default {
SectionControl,
SpeedLimitControl,
AlxeEffective,
- NoticeInfo
+ NoticeInfo,
+ SetFault
},
props: {
selected: {
@@ -72,11 +75,16 @@ export default {
]
},
menuForce: [
- // {
- // label: '设置计轴失效',
- // handler: this.alxeFailure
- // // disabledCallback: MenuDisabledState.Section.alxeFailure
- // }
+ {
+ label: '设置故障',
+ handler: this.setStoppage,
+ cmdType: CMD.Fault.CMD_SET_FAULT
+ },
+ {
+ label: '取消故障',
+ handler: this.cancelStoppage,
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
+ }
]
};
},
@@ -234,6 +242,22 @@ export default {
this.$refs.speedLimitControl.doShow(operate, this.selected);
}
});
+ },
+ // 设置故障
+ setStoppage() {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
+ if (valid) {
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
+ }
+ });
+ },
+ // 取消故障
+ cancelStoppage() {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
+ if (valid) {
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
+ }
+ });
}
}
};
diff --git a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue
index d61298593..6c533599b 100644
--- a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue
+++ b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue
@@ -7,6 +7,7 @@
+
@@ -26,6 +27,7 @@ import { DeviceMenu } from '@/scripts/ConstDic';
import { mouseCancelState } from './utils/menuItemStatus';
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
import {menuOperate, commitOperate} from './utils/menuOperate';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default {
name: 'SignalMenu',
@@ -36,7 +38,8 @@ export default {
RouteHandControl,
RouteDetail,
NoticeInfo,
- PasswordBox
+ PasswordBox,
+ SetFault
},
props: {
selected: {
@@ -91,21 +94,16 @@ export default {
]
},
menuForce: [
- {
- label: '信号关灯',
- handler: this.signalClose,
- cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
- },
- {
- label: '设置故障',
- handler: this.setStoppage,
- cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT
- },
- {
- label: '取消故障',
- handler: this.cancelStoppage,
- cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT
- }
+ {
+ label: '设置故障',
+ handler: this.setStoppage,
+ cmdType: CMD.Fault.CMD_SET_FAULT
+ },
+ {
+ label: '取消故障',
+ handler: this.cancelStoppage,
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
+ }
]
};
},
@@ -284,50 +282,18 @@ export default {
},
// 设置故障
setStoppage() {
- const operate = {
- start: true,
- over: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.Signal.stoppage.menu.operation,
- cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
- param: {
- signalCode: `${this.selected.code}`
- }
-
- };
- mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
});
},
// 取消故障
cancelStoppage() {
- const operate = {
- start: true,
- over: true,
- code: this.selected.code,
- cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
- operation: OperationEvent.Signal.cancelStoppage.menu.operation,
- param: {
- signalCode: `${this.selected.code}`
- }
- };
-
- mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
});
},
// 设置进路
diff --git a/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue b/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue
index d9d87027e..fa303a19d 100644
--- a/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue
+++ b/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue
@@ -6,6 +6,7 @@
+
@@ -22,8 +23,8 @@ import {DeviceMenu } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
-import { mouseCancelState } from './utils/menuItemStatus';
import {menuOperate, commitOperate} from './utils/menuOperate';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default {
name: 'SwitchMenu',
@@ -33,7 +34,8 @@ export default {
SwitchControl,
SpeedLimitControl,
AlxeEffective,
- NoticeInfo
+ NoticeInfo,
+ SetFault
},
props: {
selected: {
@@ -89,16 +91,25 @@ export default {
{
label: '设置故障',
handler: this.setStoppage,
- cmdType: CMD.Switch.CMD_SWITCH_ADD_FAULT
+ cmdType: CMD.Fault.CMD_SET_FAULT
},
{
label: '取消故障',
handler: this.cancelStoppage,
- cmdType: CMD.Switch.CMD_SWITCH_REMOVE_FAULT
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
},
+ computed: {
+ ...mapGetters('training', [
+ 'mode',
+ 'operatemode'
+ ]),
+ ...mapGetters('menuOperation', [
+ 'buttonOperation'
+ ])
+ },
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
@@ -113,15 +124,6 @@ export default {
}
}
},
- computed: {
- ...mapGetters('training', [
- 'mode',
- 'operatemode'
- ]),
- ...mapGetters('menuOperation', [
- 'buttonOperation'
- ])
- },
methods: {
clickEvent() {
const self = this;
@@ -192,48 +194,18 @@ export default {
},
// 设置故障
setStoppage() {
- const operate = {
- start: true,
- code: this.selected.code,
- operation: OperationEvent.Switch.stoppage.menu.operation,
- cmdType: CMD.Switch.CMD_SWITCH_ADD_FAULT,
- param: {
- switchCode: `${this.selected.code}`
- }
- };
-
- mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
});
},
// 取消故障
cancelStoppage() {
- const operate = {
- start: true,
- code: this.selected.code,
- operation: OperationEvent.Switch.cancelStoppage.menu.operation,
- cmdType: CMD.Switch.CMD_SWITCH_REMOVE_FAULT,
- param: {
- switchCode: `${this.selected.code}`
- }
- };
-
- mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
});
},
// 道岔单锁
diff --git a/src/jmapNew/theme/chengdu_01/menus/dialog/platformDwell.vue b/src/jmapNew/theme/chengdu_01/menus/dialog/platformDwell.vue
index 4a067f5d2..96ca967de 100644
--- a/src/jmapNew/theme/chengdu_01/menus/dialog/platformDwell.vue
+++ b/src/jmapNew/theme/chengdu_01/menus/dialog/platformDwell.vue
@@ -73,7 +73,7 @@
- 确认
+ 确认
取消
帮助
diff --git a/src/jmapNew/theme/chengdu_01/menus/menuDialog/playBack.vue b/src/jmapNew/theme/chengdu_01/menus/menuDialog/playBack.vue
index 86cc82035..9a18253a0 100644
--- a/src/jmapNew/theme/chengdu_01/menus/menuDialog/playBack.vue
+++ b/src/jmapNew/theme/chengdu_01/menus/menuDialog/playBack.vue
@@ -63,7 +63,7 @@
- 确定
+ 确定
取消
帮助
diff --git a/src/jmapNew/theme/chengdu_01/menus/menuDialog/systemLogin.vue b/src/jmapNew/theme/chengdu_01/menus/menuDialog/systemLogin.vue
index 6f61b5d27..40fbc395a 100644
--- a/src/jmapNew/theme/chengdu_01/menus/menuDialog/systemLogin.vue
+++ b/src/jmapNew/theme/chengdu_01/menus/menuDialog/systemLogin.vue
@@ -56,7 +56,7 @@
- 确定
+ 确定
取消
帮助
diff --git a/src/jmapNew/theme/chengdu_01/menus/menuDialog/systemLogout.vue b/src/jmapNew/theme/chengdu_01/menus/menuDialog/systemLogout.vue
index 5afea1f63..a4f9e7f2d 100644
--- a/src/jmapNew/theme/chengdu_01/menus/menuDialog/systemLogout.vue
+++ b/src/jmapNew/theme/chengdu_01/menus/menuDialog/systemLogout.vue
@@ -28,7 +28,7 @@
- 确定
+ 确定
取消
帮助
diff --git a/src/jmapNew/theme/chengdu_01/menus/menuRequest.vue b/src/jmapNew/theme/chengdu_01/menus/menuRequest.vue
index f8bd7d56e..27134db34 100644
--- a/src/jmapNew/theme/chengdu_01/menus/menuRequest.vue
+++ b/src/jmapNew/theme/chengdu_01/menus/menuRequest.vue
@@ -43,6 +43,8 @@ export default {
return {
unfold: true,
tempData: [],
+ commitDisabled: false,
+ loading: false,
tableStyle: {
'border-bottom': 'none',
'border-right': 'none'
diff --git a/src/jmapNew/theme/chengdu_01/menus/menuSection.vue b/src/jmapNew/theme/chengdu_01/menus/menuSection.vue
index 0873e9e97..7853e271d 100644
--- a/src/jmapNew/theme/chengdu_01/menus/menuSection.vue
+++ b/src/jmapNew/theme/chengdu_01/menus/menuSection.vue
@@ -5,6 +5,7 @@
+
@@ -19,6 +20,8 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
+import {menuOperate, commitOperate} from './utils/menuOperate';
export default {
name: 'SectionMenu',
@@ -27,7 +30,8 @@ export default {
NoticeInfo,
SpeedLimitControl,
SectionControl,
- SectionCmdControl
+ SectionCmdControl,
+ SetFault
},
props: {
selected: {
@@ -63,24 +67,14 @@ export default {
},
menuForce: [
{
- label: '设置计轴失效',
- handler: this.alxeFailure,
- cmdType:''
- },
- {
- label: this.$t('menu.menuSection.setFault'),
+ label: '设置故障',
handler: this.setStoppage,
- cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
+ cmdType: CMD.Fault.CMD_SET_FAULT
},
{
- label: this.$t('menu.menuSection.cancelFault'),
+ label: '取消故障',
handler: this.cancelStoppage,
- cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT
- },
- {
- label: '创建速度限制',
- handler: this.setSpeed,
- cmdType: CMD.Section.CMD_SWITCH_SET_LIMIT_SPEED
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -152,49 +146,20 @@ export default {
this.$refs.noticeInfo.doShow(step);
});
},
-
// 设置故障
setStoppage() {
- const step = {
- start: true,
- over:true,
- code: `${this.selected.code}`,
- operation: OperationEvent.Section.stoppage.menu.operation,
- cmdType: CMD.Section.CMD_SECTION_ADD_FAULT,
- param: {
- sectionCode: `${this.selected.code}`
- }
- };
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 取消故障
cancelStoppage() {
- const step = {
- start: true,
- over:true,
- code: `${this.selected.code}`,
- operation: OperationEvent.Section.cancelStoppage.menu.operation,
- cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT,
- param: {
- sectionCode: `${this.selected.code}`
- }
- };
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 设置速度
diff --git a/src/jmapNew/theme/chengdu_01/menus/menuSignal.vue b/src/jmapNew/theme/chengdu_01/menus/menuSignal.vue
index 6c70337c7..0e623ebb7 100644
--- a/src/jmapNew/theme/chengdu_01/menus/menuSignal.vue
+++ b/src/jmapNew/theme/chengdu_01/menus/menuSignal.vue
@@ -3,6 +3,7 @@
+
@@ -15,13 +16,16 @@ 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 SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
+import {menuOperate, commitOperate} from './utils/menuOperate';
export default {
name: 'SignalMenu',
components: {
PopMenu,
NoticeInfo,
- CreateDeviceLabel
+ CreateDeviceLabel,
+ SetFault
},
props: {
selected: {
@@ -166,20 +170,15 @@ export default {
]
},
menuForce: [
- {
- label: '信号关灯',
- handler: this.signalClose,
- cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
- },
{
label: '设置故障',
handler: this.setStoppage,
- cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT
+ cmdType: CMD.Fault.CMD_SET_FAULT
},
{
label: '取消故障',
handler: this.cancelStoppage,
- cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -259,48 +258,18 @@ export default {
},
// 设置故障
setStoppage() {
- const step = {
- start: true,
- over:true,
- code: `${this.selected.code}`,
- cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
- operation: OperationEvent.Signal.stoppage.menu.operation,
- param: {
- signalCode: `${this.selected.code}`
- }
- };
-
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 取消故障
cancelStoppage() {
- const step = {
- start: true,
- over:true,
- code: `${this.selected.code}`,
- cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
- operation: OperationEvent.Signal.cancelStoppage.menu.operation,
- param: {
- signalCode: `${this.selected.code}`
- }
- };
-
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 设置进路
diff --git a/src/jmapNew/theme/chengdu_01/menus/menuSwitch.vue b/src/jmapNew/theme/chengdu_01/menus/menuSwitch.vue
index d7daad700..b74d34dc1 100644
--- a/src/jmapNew/theme/chengdu_01/menus/menuSwitch.vue
+++ b/src/jmapNew/theme/chengdu_01/menus/menuSwitch.vue
@@ -4,6 +4,7 @@
+
@@ -18,6 +19,8 @@ import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
+import {menuOperate, commitOperate} from './utils/menuOperate';
export default {
name: 'SwitchMenu',
@@ -25,7 +28,8 @@ export default {
PopMenu,
NoticeInfo,
CreateDeviceLabel,
- SwitchControl
+ SwitchControl,
+ SetFault
},
mixins: [
CancelMouseState
@@ -118,12 +122,12 @@ export default {
{
label: '设置故障',
handler: this.setStoppage,
- cmdType:CMD.Switch.CMD_SWITCH_ADD_FAULT
+ cmdType: CMD.Fault.CMD_SET_FAULT
},
{
label: '取消故障',
handler: this.cancelStoppage,
- cmdType:CMD.Switch.CMD_SWITCH_REMOVE_FAULT
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -177,48 +181,18 @@ export default {
},
// 设置故障
setStoppage() {
- const operate = {
- start: true,
- over:true,
- operation: OperationEvent.Switch.stoppage.menu.operation,
- cmdType: CMD.Switch.CMD_STOPPAGE,
- param: {
- switchCode: this.selected.code
- }
- };
-
- // mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
});
},
// 取消故障
cancelStoppage() {
- const operate = {
- start: true,
- over:true,
- operation: OperationEvent.Switch.cancelStoppage.menu.operation,
- cmdType: CMD.Switch.CMD_CANCEL_STOPPAGE,
- param: {
- switchCode: this.selected.code
- }
- };
-
- // mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
});
},
// 道岔单锁
diff --git a/src/jmapNew/theme/chengdu_01/menus/utils/menuOperate.js b/src/jmapNew/theme/chengdu_01/menus/utils/menuOperate.js
new file mode 100644
index 000000000..85d6fd6f6
--- /dev/null
+++ b/src/jmapNew/theme/chengdu_01/menus/utils/menuOperate.js
@@ -0,0 +1,257 @@
+import store from '@/store/index_APP_TARGET';
+import CMD from '@/scripts/cmdPlugin/CommandEnum';
+import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
+
+// 操作
+export const menuOperate = {
+ Section:{
+ alxeFailure:{
+ // 设置计轴失效
+ operation: OperationEvent.Section.alxeFailure.menu.operation,
+ // cmdType 值有问题
+ cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
+ },
+ active:{
+ // 区段激活
+ operation: OperationEvent.Section.active.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_ACTIVE
+ },
+ split:{
+ // 区段切除
+ operation: OperationEvent.Section.split.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_CUT_OFF
+ },
+ setSpeed:{
+ // 设置速度
+ operation: OperationEvent.Section.setSpeed.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
+ },
+ fault:{
+ // 区段故障解锁
+ operation: OperationEvent.Section.fault.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
+ }
+ },
+ Signal:{
+ arrangementRoute:{
+ // 排列进路
+ operation: OperationEvent.Signal.arrangementRoute.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
+ },
+ cancelTrainRoute:{
+ // 取消进路
+ operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
+ },
+ lock:{
+ // 信号封锁
+ operation:OperationEvent.Signal.lock.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
+ },
+ unlock:{
+ // 信号解封
+ operation: OperationEvent.Signal.unlock.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
+ },
+ guide:{
+ // 进路引导
+ operation: OperationEvent.Signal.guide.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
+ },
+ reopenSignal:{
+ // 信号重开
+ operation: OperationEvent.Signal.reopenSignal.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
+ },
+ signalClose:{
+ // 信号关灯
+ operation: OperationEvent.Signal.signalClose.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
+ },
+ humanControl:{
+ // 进路交人工控
+ operation: OperationEvent.Signal.humanControl.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
+ },
+ atsAutoControl:{
+ // 进路交自动控
+ operation: OperationEvent.Signal.atsAutoControl.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
+ },
+ setAutoInterlock:{
+ // 设置通过模式
+ operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
+ },
+ cancelAutoInterlock:{
+ // 取消通过模式
+ operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
+ },
+ detail:{
+ // 查询进路状态
+ operation: OperationEvent.Signal.detail.menu.operation
+ },
+ cancelGuide:{
+ // 人工解锁进路(信号机取消引导)
+ operation: OperationEvent.Signal.cancelGuide.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
+ },
+ setAutoTurnBack:{
+ // 设置自动折返
+ operation: OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
+ },
+ cancelAutoTurnBack:{
+ // 取消自动折返
+ operation: OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
+ }
+ },
+ Switch:{
+ lock:{
+ // 道岔单锁
+ operation: OperationEvent.Switch.lock.menu.operation,
+ cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
+ },
+ unlock:{
+ // 道岔解锁
+ operation: OperationEvent.Switch.unlock.menu.operation,
+ cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
+ },
+ block:{
+ // 道岔封锁
+ operation: OperationEvent.Switch.block.menu.operation,
+ cmdType: CMD.Switch.CMD_SWITCH_BLOCK
+ },
+ unblock:{
+ // 道岔解封
+ operation: OperationEvent.Switch.unblock.menu.operation,
+ cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
+ },
+ locate:{
+ // 单操到定位
+ operation: OperationEvent.Switch.locate.menu.operation,
+ cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
+ },
+ reverse:{
+ // 单操到反位
+ operation: OperationEvent.Switch.reverse.menu.operation,
+ cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
+ },
+ setSpeed:{
+ // 设置临时限速
+ operation: OperationEvent.Switch.setSpeed.menu.operation,
+ cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
+ },
+ turnoutForce: {
+ // 道岔强制扳动
+ operation: OperationEvent.Switch.turnoutForce.menu.operation,
+ cmdType:CMD.Switch.CMD_SWITCH_FORCE_TURN
+ }
+ },
+ StationStand:{
+ setDetainTrain:{
+ // 设置扣车
+ operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
+ },
+ cancelDetainTrain:{
+ // 取消扣车
+ operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
+ },
+ cancelDetainTrainAll:{
+ // 全线取消扣车
+ operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
+ cmdType:CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
+ },
+ setJumpStop:{
+ // 设置跳停
+ operation: OperationEvent.StationStand.setJumpStop.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
+ },
+ cancelJumpStop:{
+ // 取消跳停
+ operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
+ },
+ setStopTime:{
+ // 停站时间控制
+ operation: OperationEvent.StationStand.setStopTime.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
+ },
+ setRunLevel:{
+ // 运行时间控制
+ operation: OperationEvent.StationStand.setRunLevel.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
+ },
+ earlyDeparture:{
+ // 设置提前发车
+ operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
+ },
+ detail:{
+ // 查询站台状态
+ operation: OperationEvent.StationStand.detail.menu.operation
+ }
+ },
+ StationControl:{
+ // requestCentralControl:{
+ // // 请求中控(遥控)
+ // operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
+ // cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
+ // },
+ // requestStationControl:{
+ // // 请求站控
+ // operation: OperationEvent.StationControl.requestStationControl.menu.operation,
+ // cmdType:CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
+ // },
+ // emergencyStationControl:{
+ // // 紧急站控
+ // operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
+ // cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
+ // }
+ },
+ Common: {
+ setFault: {
+ operation: OperationEvent.Section.stoppage.menu.operation,
+ cmdType: CMD.Fault.CMD_SET_FAULT
+ },
+ cancelFault: {
+ operation: OperationEvent.Section.cancelStoppage.menu.operation,
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
+ }
+ }
+};
+
+export function commitOperate(operate, paramList, over) {
+ const step = {
+ start: true,
+ operation: operate.operation,
+ param:{}
+ };
+ step.param = paramList;
+ // over 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作
+ if (over == 0 || over == 3) {
+ const codeList = Object.values(paramList);
+ step.code = codeList[0];
+ }
+ if (over != 0 && over != 3) {
+ delete step.start;
+ }
+ if (over == 2 || over == 3) {
+ step.over = true;
+ step.cmdType = operate.cmdType;
+ }
+ return new Promise(function(resolve, reject) {
+ store.dispatch('training/nextNew', step).then(({ valid }) => {
+ if (valid) {
+ store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ }
+ resolve({ valid: valid, operate: step });
+ }).catch(error=>{
+ reject(error);
+ });
+ });
+}
diff --git a/src/jmapNew/theme/chengdu_03/menus/menuSection.vue b/src/jmapNew/theme/chengdu_03/menus/menuSection.vue
index 3427384e8..9d6056367 100644
--- a/src/jmapNew/theme/chengdu_03/menus/menuSection.vue
+++ b/src/jmapNew/theme/chengdu_03/menus/menuSection.vue
@@ -5,6 +5,7 @@
+
@@ -19,6 +20,8 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
+import {menuOperate, commitOperate} from './utils/menuOperate';
export default {
name: 'SectionMenu',
@@ -27,7 +30,8 @@ export default {
SectionControl,
SectionDetail,
TrainCreate,
- NoticeInfo
+ NoticeInfo,
+ SetFault
},
props: {
selected: {
@@ -43,10 +47,10 @@ export default {
menuNormal: {
Local: [
{
- label: '区故解',
- handler: this.fault,
+ label: '区故解',
+ handler: this.fault,
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
- auth: { station: true, center: false }
+ auth: { station: true, center: false }
}
],
Center: [
@@ -66,19 +70,14 @@ export default {
},
menuForce: [
{
- label: '设置计轴失效',
- handler: this.alxeFailure,
- cmdType:''
- },
- {
- label: this.$t('menu.menuSection.setFault'),
+ label: '设置故障',
handler: this.setStoppage,
- cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
+ cmdType: CMD.Fault.CMD_SET_FAULT
},
{
- label: this.$t('menu.menuSection.cancelFault'),
+ label: '取消故障',
handler: this.cancelStoppage,
- cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -186,44 +185,18 @@ export default {
},
// 设置故障
setStoppage() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.Section.stoppage.menu.operation,
- cmdType: CMD.Section.CMD_SECTION_ADD_FAULT,
- param: {
- sectionCode: `${this.selected.code}`
- }
- };
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 取消故障
cancelStoppage() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.Section.cancelStoppage.menu.operation,
- cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT,
- param: {
- sectionCode: `${this.selected.code}`
- }
- };
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
undeveloped() {
diff --git a/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue b/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue
index 9e5ff2028..9501c8ced 100644
--- a/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue
+++ b/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue
@@ -8,6 +8,7 @@
+
@@ -25,6 +26,8 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import PasswordBox from './dialog/childDialog/passwordInputBox';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
+import {menuOperate, commitOperate} from './utils/menuOperate';
export default {
name: 'SignalMenu',
@@ -36,7 +39,8 @@ export default {
RouteDetail,
RouteGuide,
NoticeInfo,
- PasswordBox
+ PasswordBox,
+ SetFault
},
props: {
selected: {
@@ -141,20 +145,15 @@ export default {
]
},
menuForce: [
- {
- label: '信号关灯',
- handler: this.signalClose,
- cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
- },
{
label: '设置故障',
handler: this.setStoppage,
- cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT
+ cmdType: CMD.Fault.CMD_SET_FAULT
},
{
label: '取消故障',
handler: this.cancelStoppage,
- cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -232,46 +231,18 @@ export default {
},
// 设置故障
setStoppage() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
- operation: OperationEvent.Signal.stoppage.menu.operation,
- param: {
- signalCode: `${this.selected.code}`
- }
- };
-
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 取消故障
cancelStoppage() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
- operation: OperationEvent.Signal.cancelStoppage.menu.operation,
- param: {
- signalCode: `${this.selected.code}`
- }
- };
-
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 设置进路
diff --git a/src/jmapNew/theme/chengdu_03/menus/menuSwitch.vue b/src/jmapNew/theme/chengdu_03/menus/menuSwitch.vue
index e4c842f0d..4abe91ca7 100644
--- a/src/jmapNew/theme/chengdu_03/menus/menuSwitch.vue
+++ b/src/jmapNew/theme/chengdu_03/menus/menuSwitch.vue
@@ -4,6 +4,7 @@
+
@@ -18,6 +19,8 @@ import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
+import {menuOperate, commitOperate} from './utils/menuOperate';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default {
name: 'SwitchMenu',
@@ -25,7 +28,8 @@ export default {
PopMenu,
SectionControl,
SwitchControl,
- NoticeInfo
+ NoticeInfo,
+ SetFault
},
mixins: [
CancelMouseState
@@ -91,12 +95,12 @@ export default {
{
label: '设置故障',
handler: this.setStoppage,
- cmdType:CMD.Switch.CMD_SWITCH_ADD_FAULT
+ cmdType: CMD.Fault.CMD_SET_FAULT
},
{
label: '取消故障',
handler: this.cancelStoppage,
- cmdType:CMD.Switch.CMD_SWITCH_REMOVE_FAULT
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -150,46 +154,18 @@ export default {
},
// 设置故障
setStoppage() {
- const operate = {
- start: true,
- operation: OperationEvent.Switch.stoppage.menu.operation,
- cmdType: CMD.Switch.CMD_STOPPAGE,
- param: {
- switchCode: this.selected.code
- }
- };
-
- // mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
});
},
// 取消故障
cancelStoppage() {
- const operate = {
- start: true,
- operation: OperationEvent.Switch.cancelStoppage.menu.operation,
- cmdType: CMD.Switch.CMD_CANCEL_STOPPAGE,
- param: {
- switchCode: this.selected.code
- }
- };
-
- // mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
});
},
// 道岔单锁
diff --git a/src/jmapNew/theme/chengdu_03/menus/utils/menuOperate.js b/src/jmapNew/theme/chengdu_03/menus/utils/menuOperate.js
new file mode 100644
index 000000000..85d6fd6f6
--- /dev/null
+++ b/src/jmapNew/theme/chengdu_03/menus/utils/menuOperate.js
@@ -0,0 +1,257 @@
+import store from '@/store/index_APP_TARGET';
+import CMD from '@/scripts/cmdPlugin/CommandEnum';
+import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
+
+// 操作
+export const menuOperate = {
+ Section:{
+ alxeFailure:{
+ // 设置计轴失效
+ operation: OperationEvent.Section.alxeFailure.menu.operation,
+ // cmdType 值有问题
+ cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
+ },
+ active:{
+ // 区段激活
+ operation: OperationEvent.Section.active.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_ACTIVE
+ },
+ split:{
+ // 区段切除
+ operation: OperationEvent.Section.split.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_CUT_OFF
+ },
+ setSpeed:{
+ // 设置速度
+ operation: OperationEvent.Section.setSpeed.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
+ },
+ fault:{
+ // 区段故障解锁
+ operation: OperationEvent.Section.fault.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
+ }
+ },
+ Signal:{
+ arrangementRoute:{
+ // 排列进路
+ operation: OperationEvent.Signal.arrangementRoute.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
+ },
+ cancelTrainRoute:{
+ // 取消进路
+ operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
+ },
+ lock:{
+ // 信号封锁
+ operation:OperationEvent.Signal.lock.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
+ },
+ unlock:{
+ // 信号解封
+ operation: OperationEvent.Signal.unlock.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
+ },
+ guide:{
+ // 进路引导
+ operation: OperationEvent.Signal.guide.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
+ },
+ reopenSignal:{
+ // 信号重开
+ operation: OperationEvent.Signal.reopenSignal.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
+ },
+ signalClose:{
+ // 信号关灯
+ operation: OperationEvent.Signal.signalClose.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
+ },
+ humanControl:{
+ // 进路交人工控
+ operation: OperationEvent.Signal.humanControl.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
+ },
+ atsAutoControl:{
+ // 进路交自动控
+ operation: OperationEvent.Signal.atsAutoControl.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
+ },
+ setAutoInterlock:{
+ // 设置通过模式
+ operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
+ },
+ cancelAutoInterlock:{
+ // 取消通过模式
+ operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
+ },
+ detail:{
+ // 查询进路状态
+ operation: OperationEvent.Signal.detail.menu.operation
+ },
+ cancelGuide:{
+ // 人工解锁进路(信号机取消引导)
+ operation: OperationEvent.Signal.cancelGuide.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
+ },
+ setAutoTurnBack:{
+ // 设置自动折返
+ operation: OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
+ },
+ cancelAutoTurnBack:{
+ // 取消自动折返
+ operation: OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
+ }
+ },
+ Switch:{
+ lock:{
+ // 道岔单锁
+ operation: OperationEvent.Switch.lock.menu.operation,
+ cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
+ },
+ unlock:{
+ // 道岔解锁
+ operation: OperationEvent.Switch.unlock.menu.operation,
+ cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
+ },
+ block:{
+ // 道岔封锁
+ operation: OperationEvent.Switch.block.menu.operation,
+ cmdType: CMD.Switch.CMD_SWITCH_BLOCK
+ },
+ unblock:{
+ // 道岔解封
+ operation: OperationEvent.Switch.unblock.menu.operation,
+ cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
+ },
+ locate:{
+ // 单操到定位
+ operation: OperationEvent.Switch.locate.menu.operation,
+ cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
+ },
+ reverse:{
+ // 单操到反位
+ operation: OperationEvent.Switch.reverse.menu.operation,
+ cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
+ },
+ setSpeed:{
+ // 设置临时限速
+ operation: OperationEvent.Switch.setSpeed.menu.operation,
+ cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
+ },
+ turnoutForce: {
+ // 道岔强制扳动
+ operation: OperationEvent.Switch.turnoutForce.menu.operation,
+ cmdType:CMD.Switch.CMD_SWITCH_FORCE_TURN
+ }
+ },
+ StationStand:{
+ setDetainTrain:{
+ // 设置扣车
+ operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
+ },
+ cancelDetainTrain:{
+ // 取消扣车
+ operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
+ },
+ cancelDetainTrainAll:{
+ // 全线取消扣车
+ operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
+ cmdType:CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
+ },
+ setJumpStop:{
+ // 设置跳停
+ operation: OperationEvent.StationStand.setJumpStop.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
+ },
+ cancelJumpStop:{
+ // 取消跳停
+ operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
+ },
+ setStopTime:{
+ // 停站时间控制
+ operation: OperationEvent.StationStand.setStopTime.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
+ },
+ setRunLevel:{
+ // 运行时间控制
+ operation: OperationEvent.StationStand.setRunLevel.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
+ },
+ earlyDeparture:{
+ // 设置提前发车
+ operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
+ },
+ detail:{
+ // 查询站台状态
+ operation: OperationEvent.StationStand.detail.menu.operation
+ }
+ },
+ StationControl:{
+ // requestCentralControl:{
+ // // 请求中控(遥控)
+ // operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
+ // cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
+ // },
+ // requestStationControl:{
+ // // 请求站控
+ // operation: OperationEvent.StationControl.requestStationControl.menu.operation,
+ // cmdType:CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
+ // },
+ // emergencyStationControl:{
+ // // 紧急站控
+ // operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
+ // cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
+ // }
+ },
+ Common: {
+ setFault: {
+ operation: OperationEvent.Section.stoppage.menu.operation,
+ cmdType: CMD.Fault.CMD_SET_FAULT
+ },
+ cancelFault: {
+ operation: OperationEvent.Section.cancelStoppage.menu.operation,
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
+ }
+ }
+};
+
+export function commitOperate(operate, paramList, over) {
+ const step = {
+ start: true,
+ operation: operate.operation,
+ param:{}
+ };
+ step.param = paramList;
+ // over 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作
+ if (over == 0 || over == 3) {
+ const codeList = Object.values(paramList);
+ step.code = codeList[0];
+ }
+ if (over != 0 && over != 3) {
+ delete step.start;
+ }
+ if (over == 2 || over == 3) {
+ step.over = true;
+ step.cmdType = operate.cmdType;
+ }
+ return new Promise(function(resolve, reject) {
+ store.dispatch('training/nextNew', step).then(({ valid }) => {
+ if (valid) {
+ store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ }
+ resolve({ valid: valid, operate: step });
+ }).catch(error=>{
+ reject(error);
+ });
+ });
+}
diff --git a/src/jmapNew/theme/foshan_01/menus/menuSection.vue b/src/jmapNew/theme/foshan_01/menus/menuSection.vue
index 9982b12aa..5af573bcf 100644
--- a/src/jmapNew/theme/foshan_01/menus/menuSection.vue
+++ b/src/jmapNew/theme/foshan_01/menus/menuSection.vue
@@ -5,6 +5,7 @@
+
@@ -19,6 +20,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from './utils/menuOperate';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default {
name: 'SectionMenu',
@@ -27,7 +29,8 @@ export default {
SectionControl,
SectionUnLock,
SpeedLimitControl,
- NoticeInfo
+ NoticeInfo,
+ SetFault
},
props: {
selected: {
@@ -78,9 +81,14 @@ export default {
},
menuForce: [
{
- label: '设置计轴失效', // 设置区段故障
- handler: this.alxeFailure,
- cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
+ label: '设置故障',
+ handler: this.setStoppage,
+ cmdType: CMD.Fault.CMD_SET_FAULT
+ },
+ {
+ label: '取消故障',
+ handler: this.cancelStoppage,
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -130,11 +138,20 @@ export default {
this.$refs.popMenu.close();
}
},
- // 设置计轴失效
- alxeFailure() {
- commitOperate(menuOperate.Section.alxeFailure, {sectionCode:this.selected.code}, 3).then(({valid, operate})=>{
- }).catch(error=>{
- this.$refs.noticeInfo.doShow({}, error.message);
+ // 设置故障
+ setStoppage() {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
+ if (valid) {
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
+ }
+ });
+ },
+ // 取消故障
+ cancelStoppage() {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
+ if (valid) {
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
+ }
});
},
// 故障解锁
diff --git a/src/jmapNew/theme/foshan_01/menus/menuSignal.vue b/src/jmapNew/theme/foshan_01/menus/menuSignal.vue
index 830957023..4ce8a70fc 100644
--- a/src/jmapNew/theme/foshan_01/menus/menuSignal.vue
+++ b/src/jmapNew/theme/foshan_01/menus/menuSignal.vue
@@ -9,6 +9,7 @@
+
@@ -22,6 +23,7 @@ import RouteHandControl from './dialog/routeHandControl';
import RouterCommand from './dialog/routerCommand';
import RouteDetail from './dialog/routeDetail';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
@@ -41,7 +43,8 @@ export default {
RouteHandControl,
RouteDetail,
RouterCommand,
- NoticeInfo
+ NoticeInfo,
+ SetFault
},
props: {
selected: {
@@ -144,20 +147,15 @@ export default {
]
},
menuForce: [
- {
- label: '信号关灯',
- handler: this.signalClose,
- cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
- },
{
label: '设置故障',
handler: this.setStoppage,
- cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT
+ cmdType: CMD.Fault.CMD_SET_FAULT
},
{
label: '取消故障',
handler: this.cancelStoppage,
- cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -220,46 +218,18 @@ export default {
},
// 设置故障
setStoppage() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.Signal.stoppage.menu.operation,
- cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
- param: {
- signalCode: `${this.selected.code}`
- }
- };
- this.mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 取消故障
cancelStoppage() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.Signal.cancelStoppage.menu.operation,
- cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
- param: {
- signalCode: `${this.selected.code}`
- }
- };
- this.mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
operationHandler(buttonOperation, selectType) {
diff --git a/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue b/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue
index dc2b1669a..d21fcadbb 100644
--- a/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue
+++ b/src/jmapNew/theme/foshan_01/menus/menuSwitch.vue
@@ -5,6 +5,7 @@
+
@@ -20,6 +21,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default {
name: 'SwitchMenu',
@@ -28,7 +30,8 @@ export default {
SwitchControl,
SwitchUnLock,
SpeedLimitControl,
- NoticeInfo
+ NoticeInfo,
+ SetFault
},
props: {
selected: {
@@ -81,12 +84,12 @@ export default {
{
label: '设置故障',
handler: this.setStoppage,
- cmdType: CMD.Switch.CMD_SWITCH_ADD_FAULT
+ cmdType: CMD.Fault.CMD_SET_FAULT
},
{
label: '取消故障',
handler: this.cancelStoppage,
- cmdType: CMD.Switch.CMD_SWITCH_REMOVE_FAULT
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -143,46 +146,18 @@ export default {
},
// 设置故障
setStoppage() {
- const operate = {
- start: true,
- code: this.selected.code,
- operation: OperationEvent.Switch.stoppage.menu.operation,
- param: {
- switchCode: this.selected.code
- }
- };
-
- this.mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
});
},
// 取消故障
cancelStoppage() {
- const operate = {
- start: true,
- code: this.selected.code,
- operation: OperationEvent.Switch.cancelStoppage.menu.operation,
- param: {
- switchCode: this.selected.code
- }
- };
-
- this.mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
});
},
operationHandler(buttonOperation, selectType) {
diff --git a/src/jmapNew/theme/foshan_01/menus/utils/menuOperate.js b/src/jmapNew/theme/foshan_01/menus/utils/menuOperate.js
index abaeb2ea0..85d6fd6f6 100644
--- a/src/jmapNew/theme/foshan_01/menus/utils/menuOperate.js
+++ b/src/jmapNew/theme/foshan_01/menus/utils/menuOperate.js
@@ -212,6 +212,16 @@ export const menuOperate = {
// operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
// cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
// }
+ },
+ Common: {
+ setFault: {
+ operation: OperationEvent.Section.stoppage.menu.operation,
+ cmdType: CMD.Fault.CMD_SET_FAULT
+ },
+ cancelFault: {
+ operation: OperationEvent.Section.cancelStoppage.menu.operation,
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
+ }
}
};
diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue b/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue
index 885bda462..c9eadaeda 100644
--- a/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue
+++ b/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue
@@ -5,6 +5,7 @@
+
@@ -20,6 +21,8 @@ import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
+import {menuOperate, commitOperate} from './utils/menuOperate';
export default {
name: 'SectionMenu',
@@ -28,7 +31,8 @@ export default {
SectionControl,
SectionCmdControl,
SpeedCmdControl,
- NoticeInfo
+ NoticeInfo,
+ SetFault
},
props: {
selected: {
@@ -127,12 +131,12 @@ export default {
{
label: this.$t('menu.menuSection.setFault'),
handler: this.setStoppage,
- cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
+ cmdType: CMD.Fault.CMD_SET_FAULT
},
{
label: this.$t('menu.menuSection.cancelFault'),
handler: this.cancelStoppage,
- cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -185,45 +189,18 @@ export default {
},
// 设置故障
setStoppage() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.Section.stoppage.menu.operation,
- cmdType: CMD.Section.CMD_SECTION_ADD_FAULT,
- param: {
- Section_Code: `${this.selected.code}`
- }
- };
-
- this.$store.dispatch('training/next', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 取消故障
cancelStoppage() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.Section.cancelStoppage.menu.operation,
- cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT,
- param: {
- Section_Code: `${this.selected.code}`
- }
- };
- this.$store.dispatch('training/next', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 故障解锁
diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuSignal.vue b/src/jmapNew/theme/fuzhou_01/menus/menuSignal.vue
index 958cd69f1..bfd31336c 100644
--- a/src/jmapNew/theme/fuzhou_01/menus/menuSignal.vue
+++ b/src/jmapNew/theme/fuzhou_01/menus/menuSignal.vue
@@ -8,6 +8,7 @@
+
@@ -26,6 +27,8 @@ import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import { querySignalStatus } from '@/api/simulation';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
+import {menuOperate, commitOperate} from './utils/menuOperate';
export default {
name: 'SignalMenu',
@@ -37,7 +40,8 @@ export default {
RouteCmdControl,
RouteHandControl,
RouteDetail,
- NoticeInfo
+ NoticeInfo,
+ SetFault
},
props: {
selected: {
@@ -155,12 +159,12 @@ export default {
{
label: this.$t('menu.menuSignal.setFault'),
handler: this.setStoppage,
- cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT
+ cmdType: CMD.Fault.CMD_SET_FAULT
},
{
label: this.$t('menu.menuSignal.cancelFault'),
handler: this.cancelStoppage,
- cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -214,44 +218,18 @@ export default {
},
// 设置故障
setStoppage() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.Signal.stoppage.menu.operation,
- cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
- param: {
- Signal_Code: `${this.selected.code}`
- }
- };
- this.$store.dispatch('training/next', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 取消故障
cancelStoppage() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.Signal.cancelStoppage.menu.operation,
- cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
- param: {
- Signal_Code: `${this.selected.code}`
- }
- };
- this.$store.dispatch('training/next', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 排列进路
diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue b/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue
index 0efa0bfed..e4f0cd4db 100644
--- a/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue
+++ b/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue
@@ -89,12 +89,12 @@ export default {
{
label: this.$t('menu.menuStation.setStoppage'),
handler: this.setStoppage,
- cmdType: CMD.Station.CMD_STATION_ADD_FAULT
+ cmdType: CMD.Fault.CMD_SET_FAULT
},
{
label: this.$t('menu.menuStation.cancelStoppage'),
handler: this.cancelStoppage,
- cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue b/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue
index 2ae658968..d805cad83 100644
--- a/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue
+++ b/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue
@@ -5,6 +5,7 @@
+
@@ -19,6 +20,8 @@ import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
+import {menuOperate, commitOperate} from './utils/menuOperate';
export default {
name: 'SwitchMenu',
@@ -27,7 +30,8 @@ export default {
SwitchControl,
SwitchCmdControl,
SpeedCmdControl,
- NoticeInfo
+ NoticeInfo,
+ SetFault
},
props: {
selected: {
@@ -174,18 +178,12 @@ export default {
{
label: this.$t('menu.menuSwitch.setFault'),
handler: this.setStoppage,
- auth: {
-
- },
- cmdType:CMD.Switch.CMD_SWITCH_ADD_FAULT
+ cmdType:CMD.Fault.CMD_SET_FAULT
},
{
label: this.$t('menu.menuSwitch.cancelFault'),
handler: this.cancelStoppage,
- auth: {
-
- },
- cmdType:CMD.Switch.CMD_SWITCH_REMOVE_FAULT
+ cmdType:CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -244,42 +242,18 @@ export default {
},
// 设置故障
setStoppage() {
- const step = {
- start: true,
- operation: OperationEvent.Switch.stoppage.menu.operation,
- cmdType: CMD.Switch.CMD_STOPPAGE,
- param: {
- Switch_Code: this.selected.code
- }
- };
- this.$store.dispatch('training/next', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 取消故障
cancelStoppage() {
- const step = {
- start: true,
- operation: OperationEvent.Switch.cancelStoppage.menu.operation,
- cmdType: CMD.Switch.CMD_CANCEL_STOPPAGE,
- param: {
- Switch_Code: this.selected.code
- }
- };
- this.$store.dispatch('training/next', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 道岔单锁
diff --git a/src/jmapNew/theme/fuzhou_01/menus/utils/menuOperate.js b/src/jmapNew/theme/fuzhou_01/menus/utils/menuOperate.js
new file mode 100644
index 000000000..09a216171
--- /dev/null
+++ b/src/jmapNew/theme/fuzhou_01/menus/utils/menuOperate.js
@@ -0,0 +1,308 @@
+import store from '@/store/index_APP_TARGET';
+import CMD from '@/scripts/cmdPlugin/CommandEnum';
+import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
+
+// 操作
+export const menuOperate = {
+ Section:{
+ alxeFailure:{
+ // 设置计轴失效
+ operation: OperationEvent.Section.alxeFailure.menu.operation,
+ // cmdType 值有问题
+ cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
+ },
+ active:{
+ // 区段激活
+ operation: OperationEvent.Section.active.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_ACTIVE
+ },
+ alxeEffective:{
+ // 确认计轴有效
+ operation: OperationEvent.Section.alxeEffective.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
+ },
+ split:{
+ // 区段切除
+ operation: OperationEvent.Section.split.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_CUT_OFF
+ },
+ lock:{
+ // 区段封锁
+ operation: OperationEvent.Section.lock.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_BLOCK
+ },
+ unlock:{
+ // 区段解锁
+ operation: OperationEvent.Section.unlock.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_UNBLOCK
+ },
+ setSpeed:{
+ // 设置速度
+ operation: OperationEvent.Section.setSpeed.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
+ },
+ fault:{
+ // 区段故障解锁
+ operation: OperationEvent.Section.fault.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
+ },
+ setFault: {
+ operation: OperationEvent.Section.stoppage.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
+ }
+ },
+ Signal:{
+ arrangementRoute:{
+ // 排列进路
+ operation: OperationEvent.Signal.arrangementRoute.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
+ },
+ cancelTrainRoute:{
+ // 取消进路
+ operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
+ },
+ lock:{
+ // 信号封锁
+ operation:OperationEvent.Signal.lock.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
+ },
+ unlock:{
+ // 信号解封
+ operation: OperationEvent.Signal.unlock.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
+ },
+ guide:{
+ // 进路引导
+ operation: OperationEvent.Signal.guide.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
+ },
+ reopenSignal:{
+ // 信号重开
+ operation: OperationEvent.Signal.reopenSignal.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
+ },
+ signalClose:{
+ // 信号关灯
+ operation: OperationEvent.Signal.signalClose.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
+ },
+ humanControl:{
+ // 进路交人工控
+ operation: OperationEvent.Signal.humanControl.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
+ },
+ atsAutoControl:{
+ // 进路交自动控
+ operation: OperationEvent.Signal.atsAutoControl.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
+ },
+ setAutoInterlock:{
+ // 设置通过模式
+ operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
+ },
+ cancelAutoInterlock:{
+ // 取消通过模式
+ operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
+ },
+ detail:{
+ // 查询进路状态
+ operation: OperationEvent.Signal.detail.menu.operation
+ },
+ cancelGuide:{
+ // 人工解锁进路(信号机取消引导)
+ operation: OperationEvent.Signal.cancelGuide.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
+ },
+ setAutoTurnBack:{
+ // 设置自动折返
+ operation: OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
+ },
+ cancelAutoTurnBack:{
+ // 取消自动折返
+ operation: OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
+ }
+ },
+ Switch:{
+ lock:{
+ // 道岔单锁(联锁)
+ operation: OperationEvent.Switch.lock.menu.operation,
+ // cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
+ cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK_CHAIN
+ },
+ unlock:{
+ // 道岔解锁(联锁)
+ operation: OperationEvent.Switch.unlock.menu.operation,
+ // cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
+ cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK_CHAIN
+ },
+ block:{
+ // 道岔封锁
+ operation: OperationEvent.Switch.block.menu.operation,
+ cmdType: CMD.Switch.CMD_SWITCH_BLOCK
+ },
+ unblock:{
+ // 道岔解封
+ operation: OperationEvent.Switch.unblock.menu.operation,
+ cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
+ },
+ npChain:{
+ // 道岔定操(联动)
+ operation: OperationEvent.Switch.locate.menu.operation,
+ cmdType:CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN
+ },
+ rpChain:{
+ // 道岔反操(联动)
+ operation: OperationEvent.Switch.reverse.menu.operation,
+ cmdType:CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN
+ },
+ split:{
+ // 区段切除
+ operation: OperationEvent.Switch.split.menu.operation,
+ cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
+ },
+ active:{
+ // 区段激活
+ operation: OperationEvent.Switch.active.menu.operation,
+ cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
+ },
+ setSpeed:{
+ // 设置临时限速
+ operation: OperationEvent.Switch.setSpeed.menu.operation,
+ cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
+ },
+ alxeEffective:{
+ // 确认计轴有效
+ operation: OperationEvent.Switch.alxeEffective.menu.operation,
+ cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
+ }
+ },
+ StationStand:{
+ setDetainTrain:{
+ // 设置扣车
+ operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
+ },
+ cancelDetainTrain:{
+ // 取消扣车
+ operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
+ },
+ setDetainTrainAuto:{
+ // 区间列车数量限制
+ operation: OperationEvent.StationStand.setDetainTrainAuto.menu.operation,
+ cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_AUTO
+ },
+ cancelDetainTrainAuto:{
+ // 取消区间列车数量限制
+ operation: OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation,
+ cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_AUTO
+ },
+ setBulkBuckleTrain:{
+ // 批量扣车
+ operation: OperationEvent.StationStand.setBulkBuckleTrain.menu.operation,
+ cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_ALL
+ },
+ cancelBulkBuckleTrain:{
+ // 批量取消扣车
+ operation: OperationEvent.StationStand.cancelBulkBuckleTrain.menu.operation,
+ cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_ALL
+ },
+ setJumpStop:{
+ // 设置跳停
+ operation: OperationEvent.StationStand.setJumpStop.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
+ },
+ cancelJumpStop:{
+ // 取消跳停
+ operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
+ },
+ setStopTime:{
+ // 停站时间控制
+ operation: OperationEvent.StationStand.setStopTime.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
+ },
+ setRunLevel:{
+ // 运行时间控制
+ operation: OperationEvent.StationStand.setRunLevel.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
+ },
+ earlyDeparture:{
+ // 设置提前发车
+ operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
+ },
+ setBackStrategy:{
+ // 设置折返策略
+ operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
+ },
+ detail:{
+ // 查询站台状态
+ operation: OperationEvent.StationStand.detail.menu.operation
+ }
+ },
+ StationControl:{
+ requestCentralControl:{
+ // 请求中控(遥控)
+ operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
+ cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
+ },
+ requestStationControl:{
+ // 请求站控
+ operation: OperationEvent.StationControl.requestStationControl.menu.operation,
+ cmdType:CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
+ },
+ emergencyStationControl:{
+ // 紧急站控
+ operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
+ cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
+ }
+ },
+ Common: {
+ setFault: {
+ operation: OperationEvent.Section.stoppage.menu.operation,
+ cmdType: CMD.Fault.CMD_SET_FAULT
+ },
+ cancelFault: {
+ operation: OperationEvent.Section.cancelStoppage.menu.operation,
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
+ }
+ }
+};
+
+export function commitOperate(operate, paramList, over) {
+ const step = {
+ start: true,
+ operation: operate.operation,
+ param:{}
+ };
+ step.param = paramList;
+ // over 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作
+ if (over == 0 || over == 3) {
+ const codeList = Object.values(paramList);
+ step.code = codeList[0];
+ }
+ if (over != 0 && over != 3) {
+ delete step.start;
+ }
+ if (over == 2 || over == 3) {
+ step.over = true;
+ step.cmdType = operate.cmdType;
+ }
+ return new Promise(function(resolve, reject) {
+ store.dispatch('training/nextNew', step).then(({ valid }) => {
+ if (valid) {
+ store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ }
+ resolve({ valid: valid, operate: step });
+ }).catch(error=>{
+ reject(error);
+ });
+ });
+}
diff --git a/src/jmapNew/theme/haerbin_01/menus/menuSection.vue b/src/jmapNew/theme/haerbin_01/menus/menuSection.vue
index 50c2225aa..db1b769eb 100644
--- a/src/jmapNew/theme/haerbin_01/menus/menuSection.vue
+++ b/src/jmapNew/theme/haerbin_01/menus/menuSection.vue
@@ -5,6 +5,7 @@
+
@@ -15,11 +16,12 @@ import SectionCmdControl from './dialog/sectionCmdControl';
import SpeedCmdControl from './dialog/speedCmdControl';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
-// import Handler from '@/scripts/cmdPlugin/Handler';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
+import {menuOperate, commitOperate} from './utils/menuOperate';
export default {
name: 'SectionMenu',
@@ -28,7 +30,8 @@ export default {
SectionControl,
SectionCmdControl,
SpeedCmdControl,
- NoticeInfo
+ NoticeInfo,
+ SetFault
},
props: {
selected: {
@@ -75,12 +78,12 @@ export default {
{
label: '设置故障',
handler: this.setStoppage,
- cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
+ cmdType: CMD.Fault.CMD_SET_FAULT
},
{
label: '取消故障',
handler: this.cancelStoppage,
- cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -133,45 +136,18 @@ export default {
},
// 设置故障
setStoppage() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.Section.stoppage.menu.operation,
- cmdType: CMD.Section.CMD_SECTION_ADD_FAULT,
- param: {
- sectionCode: `${this.selected.code}`
- }
- };
-
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 取消故障
cancelStoppage() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.Section.cancelStoppage.menu.operation,
- cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT,
- param: {
- sectionCode: `${this.selected.code}`
- }
- };
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 故障解锁
diff --git a/src/jmapNew/theme/haerbin_01/menus/menuSignal.vue b/src/jmapNew/theme/haerbin_01/menus/menuSignal.vue
index 71cf26971..67b88f525 100644
--- a/src/jmapNew/theme/haerbin_01/menus/menuSignal.vue
+++ b/src/jmapNew/theme/haerbin_01/menus/menuSignal.vue
@@ -8,6 +8,7 @@
+
@@ -26,6 +27,8 @@ import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
// import { querySignalStatus } from '@/api/simulation';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
+import {menuOperate, commitOperate} from './utils/menuOperate';
export default {
name: 'SignalMenu',
@@ -37,7 +40,8 @@ export default {
RouteCmdControl,
RouteHandControl,
RouteDetail,
- NoticeInfo
+ NoticeInfo,
+ SetFault
},
props: {
selected: {
@@ -109,12 +113,12 @@ export default {
{
label: this.$t('menu.menuSignal.setFault'),
handler: this.setStoppage,
- cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT
+ cmdType: CMD.Fault.CMD_SET_FAULT
},
{
label: this.$t('menu.menuSignal.cancelFault'),
handler: this.cancelStoppage,
- cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -171,44 +175,18 @@ export default {
},
// 设置故障
setStoppage() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.Signal.stoppage.menu.operation,
- cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
- param: {
- signalCode: `${this.selected.code}`
- }
- };
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 取消故障
cancelStoppage() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.Signal.cancelStoppage.menu.operation,
- cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
- param: {
- signalCode: `${this.selected.code}`
- }
- };
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 排列进路
diff --git a/src/jmapNew/theme/haerbin_01/menus/menuSwitch.vue b/src/jmapNew/theme/haerbin_01/menus/menuSwitch.vue
index f8d6cb09a..e6dd094c1 100644
--- a/src/jmapNew/theme/haerbin_01/menus/menuSwitch.vue
+++ b/src/jmapNew/theme/haerbin_01/menus/menuSwitch.vue
@@ -5,6 +5,7 @@
+
@@ -19,6 +20,8 @@ import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
+import {menuOperate, commitOperate} from './utils/menuOperate';
export default {
name: 'SwitchMenu',
@@ -27,7 +30,8 @@ export default {
SwitchControl,
SwitchCmdControl,
SpeedCmdControl,
- NoticeInfo
+ NoticeInfo,
+ SetFault
},
props: {
selected: {
@@ -80,12 +84,12 @@ export default {
{
label: '设置故障',
handler: this.setStoppage,
- cmdType:CMD.Switch.CMD_SWITCH_ADD_FAULT
+ cmdType:CMD.Fault.CMD_SET_FAULT
},
{
label: '取消故障',
handler: this.cancelStoppage,
- cmdType:CMD.Switch.CMD_SWITCH_REMOVE_FAULT
+ cmdType:CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -138,42 +142,18 @@ export default {
},
// 设置故障
setStoppage() {
- const step = {
- start: true,
- operation: OperationEvent.Switch.stoppage.menu.operation,
- cmdType: CMD.Switch.CMD_STOPPAGE,
- param: {
- switchCode: this.selected.code
- }
- };
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 取消故障
cancelStoppage() {
- const step = {
- start: true,
- operation: OperationEvent.Switch.cancelStoppage.menu.operation,
- cmdType: CMD.Switch.CMD_CANCEL_STOPPAGE,
- param: {
- switchCode: this.selected.code
- }
- };
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 道岔单锁
diff --git a/src/jmapNew/theme/haerbin_01/menus/utils/menuOperate.js b/src/jmapNew/theme/haerbin_01/menus/utils/menuOperate.js
new file mode 100644
index 000000000..09a216171
--- /dev/null
+++ b/src/jmapNew/theme/haerbin_01/menus/utils/menuOperate.js
@@ -0,0 +1,308 @@
+import store from '@/store/index_APP_TARGET';
+import CMD from '@/scripts/cmdPlugin/CommandEnum';
+import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
+
+// 操作
+export const menuOperate = {
+ Section:{
+ alxeFailure:{
+ // 设置计轴失效
+ operation: OperationEvent.Section.alxeFailure.menu.operation,
+ // cmdType 值有问题
+ cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
+ },
+ active:{
+ // 区段激活
+ operation: OperationEvent.Section.active.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_ACTIVE
+ },
+ alxeEffective:{
+ // 确认计轴有效
+ operation: OperationEvent.Section.alxeEffective.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
+ },
+ split:{
+ // 区段切除
+ operation: OperationEvent.Section.split.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_CUT_OFF
+ },
+ lock:{
+ // 区段封锁
+ operation: OperationEvent.Section.lock.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_BLOCK
+ },
+ unlock:{
+ // 区段解锁
+ operation: OperationEvent.Section.unlock.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_UNBLOCK
+ },
+ setSpeed:{
+ // 设置速度
+ operation: OperationEvent.Section.setSpeed.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
+ },
+ fault:{
+ // 区段故障解锁
+ operation: OperationEvent.Section.fault.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
+ },
+ setFault: {
+ operation: OperationEvent.Section.stoppage.menu.operation,
+ cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
+ }
+ },
+ Signal:{
+ arrangementRoute:{
+ // 排列进路
+ operation: OperationEvent.Signal.arrangementRoute.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
+ },
+ cancelTrainRoute:{
+ // 取消进路
+ operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
+ },
+ lock:{
+ // 信号封锁
+ operation:OperationEvent.Signal.lock.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
+ },
+ unlock:{
+ // 信号解封
+ operation: OperationEvent.Signal.unlock.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
+ },
+ guide:{
+ // 进路引导
+ operation: OperationEvent.Signal.guide.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
+ },
+ reopenSignal:{
+ // 信号重开
+ operation: OperationEvent.Signal.reopenSignal.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
+ },
+ signalClose:{
+ // 信号关灯
+ operation: OperationEvent.Signal.signalClose.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
+ },
+ humanControl:{
+ // 进路交人工控
+ operation: OperationEvent.Signal.humanControl.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
+ },
+ atsAutoControl:{
+ // 进路交自动控
+ operation: OperationEvent.Signal.atsAutoControl.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
+ },
+ setAutoInterlock:{
+ // 设置通过模式
+ operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
+ },
+ cancelAutoInterlock:{
+ // 取消通过模式
+ operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
+ },
+ detail:{
+ // 查询进路状态
+ operation: OperationEvent.Signal.detail.menu.operation
+ },
+ cancelGuide:{
+ // 人工解锁进路(信号机取消引导)
+ operation: OperationEvent.Signal.cancelGuide.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
+ },
+ setAutoTurnBack:{
+ // 设置自动折返
+ operation: OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
+ },
+ cancelAutoTurnBack:{
+ // 取消自动折返
+ operation: OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation,
+ cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
+ }
+ },
+ Switch:{
+ lock:{
+ // 道岔单锁(联锁)
+ operation: OperationEvent.Switch.lock.menu.operation,
+ // cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
+ cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK_CHAIN
+ },
+ unlock:{
+ // 道岔解锁(联锁)
+ operation: OperationEvent.Switch.unlock.menu.operation,
+ // cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
+ cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK_CHAIN
+ },
+ block:{
+ // 道岔封锁
+ operation: OperationEvent.Switch.block.menu.operation,
+ cmdType: CMD.Switch.CMD_SWITCH_BLOCK
+ },
+ unblock:{
+ // 道岔解封
+ operation: OperationEvent.Switch.unblock.menu.operation,
+ cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
+ },
+ npChain:{
+ // 道岔定操(联动)
+ operation: OperationEvent.Switch.locate.menu.operation,
+ cmdType:CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN
+ },
+ rpChain:{
+ // 道岔反操(联动)
+ operation: OperationEvent.Switch.reverse.menu.operation,
+ cmdType:CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN
+ },
+ split:{
+ // 区段切除
+ operation: OperationEvent.Switch.split.menu.operation,
+ cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
+ },
+ active:{
+ // 区段激活
+ operation: OperationEvent.Switch.active.menu.operation,
+ cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
+ },
+ setSpeed:{
+ // 设置临时限速
+ operation: OperationEvent.Switch.setSpeed.menu.operation,
+ cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
+ },
+ alxeEffective:{
+ // 确认计轴有效
+ operation: OperationEvent.Switch.alxeEffective.menu.operation,
+ cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
+ }
+ },
+ StationStand:{
+ setDetainTrain:{
+ // 设置扣车
+ operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
+ },
+ cancelDetainTrain:{
+ // 取消扣车
+ operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
+ },
+ setDetainTrainAuto:{
+ // 区间列车数量限制
+ operation: OperationEvent.StationStand.setDetainTrainAuto.menu.operation,
+ cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_AUTO
+ },
+ cancelDetainTrainAuto:{
+ // 取消区间列车数量限制
+ operation: OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation,
+ cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_AUTO
+ },
+ setBulkBuckleTrain:{
+ // 批量扣车
+ operation: OperationEvent.StationStand.setBulkBuckleTrain.menu.operation,
+ cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_ALL
+ },
+ cancelBulkBuckleTrain:{
+ // 批量取消扣车
+ operation: OperationEvent.StationStand.cancelBulkBuckleTrain.menu.operation,
+ cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_ALL
+ },
+ setJumpStop:{
+ // 设置跳停
+ operation: OperationEvent.StationStand.setJumpStop.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
+ },
+ cancelJumpStop:{
+ // 取消跳停
+ operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
+ },
+ setStopTime:{
+ // 停站时间控制
+ operation: OperationEvent.StationStand.setStopTime.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
+ },
+ setRunLevel:{
+ // 运行时间控制
+ operation: OperationEvent.StationStand.setRunLevel.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
+ },
+ earlyDeparture:{
+ // 设置提前发车
+ operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
+ },
+ setBackStrategy:{
+ // 设置折返策略
+ operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
+ cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
+ },
+ detail:{
+ // 查询站台状态
+ operation: OperationEvent.StationStand.detail.menu.operation
+ }
+ },
+ StationControl:{
+ requestCentralControl:{
+ // 请求中控(遥控)
+ operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
+ cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
+ },
+ requestStationControl:{
+ // 请求站控
+ operation: OperationEvent.StationControl.requestStationControl.menu.operation,
+ cmdType:CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
+ },
+ emergencyStationControl:{
+ // 紧急站控
+ operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
+ cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
+ }
+ },
+ Common: {
+ setFault: {
+ operation: OperationEvent.Section.stoppage.menu.operation,
+ cmdType: CMD.Fault.CMD_SET_FAULT
+ },
+ cancelFault: {
+ operation: OperationEvent.Section.cancelStoppage.menu.operation,
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
+ }
+ }
+};
+
+export function commitOperate(operate, paramList, over) {
+ const step = {
+ start: true,
+ operation: operate.operation,
+ param:{}
+ };
+ step.param = paramList;
+ // over 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作
+ if (over == 0 || over == 3) {
+ const codeList = Object.values(paramList);
+ step.code = codeList[0];
+ }
+ if (over != 0 && over != 3) {
+ delete step.start;
+ }
+ if (over == 2 || over == 3) {
+ step.over = true;
+ step.cmdType = operate.cmdType;
+ }
+ return new Promise(function(resolve, reject) {
+ store.dispatch('training/nextNew', step).then(({ valid }) => {
+ if (valid) {
+ store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ }
+ resolve({ valid: valid, operate: step });
+ }).catch(error=>{
+ reject(error);
+ });
+ });
+}
diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSection.vue b/src/jmapNew/theme/ningbo_01/menus/menuSection.vue
index c35831e1c..aeb16bf71 100644
--- a/src/jmapNew/theme/ningbo_01/menus/menuSection.vue
+++ b/src/jmapNew/theme/ningbo_01/menus/menuSection.vue
@@ -22,7 +22,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from './utils/menuOperate';
-import SetFault from './dialog/setFault';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default {
name: 'SectionMenu',
@@ -98,20 +98,15 @@ export default {
]
},
menuForce: [
- // {
- // label: '设置计轴失效', // 设置区段故障
- // handler: this.alxeFailure,
- // cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
- // },
{
label: this.$t('menu.menuSection.setFault'),
handler: this.setStoppage,
- cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
+ cmdType: CMD.Fault.CMD_SET_FAULT
},
{
label: this.$t('menu.menuSection.cancelFault'),
handler: this.cancelStoppage,
- cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -228,14 +223,22 @@ export default {
}
});
},
+ // 设置故障
setStoppage() {
- commitOperate(menuOperate.Section.setFault, { sectionCode: this.selected.code }, 0).then(({valid, operate})=>{
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$refs.setFault.doShow(operate, this.selected);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
});
},
- cancelStoppage() {}
+ // 取消故障
+ cancelStoppage() {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
+ if (valid) {
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
+ }
+ });
+ }
}
};
diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSignal.vue b/src/jmapNew/theme/ningbo_01/menus/menuSignal.vue
index 7bbd70f20..a5d218da8 100644
--- a/src/jmapNew/theme/ningbo_01/menus/menuSignal.vue
+++ b/src/jmapNew/theme/ningbo_01/menus/menuSignal.vue
@@ -8,7 +8,8 @@
-
+ \
+
@@ -26,9 +27,8 @@ import {menuOperate, commitOperate} from './utils/menuOperate';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { mapGetters } from 'vuex';
-import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
-// import { querySignalStatus } from '@/api/simulation';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default {
name: 'SignalMenu',
@@ -41,7 +41,8 @@ export default {
RouteHandControl,
RouteDetail,
RouterCommand,
- NoticeInfo
+ NoticeInfo,
+ SetFault
},
props: {
selected: {
@@ -166,20 +167,15 @@ export default {
]
},
menuForce: [
- {
- label: '信号关灯',
- handler: this.signalClose,
- cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
- },
{
label: '设置故障',
handler: this.setStoppage,
- cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT
+ cmdType: CMD.Fault.CMD_SET_FAULT
},
{
label: '取消故障',
handler: this.cancelStoppage,
- cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -215,7 +211,7 @@ export default {
self.doClose();
};
},
- initMenu() {
+ initMenu() {
this.menu = MenuContextHandler.covert(this.menuNormal);
// 故障模式菜单列表
if (this.operatemode === OperateMode.FAULT) {
@@ -235,50 +231,6 @@ export default {
this.$refs.popMenu.close();
}
},
- // 设置故障
- setStoppage() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.Signal.stoppage.menu.operation,
- cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
- param: {
- signalCode: `${this.selected.code}`
- }
- };
- this.mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow();
- }
- }).catch(() => {
- this.$refs.noticeInfo.doShow();
- });
- },
- // 取消故障
- cancelStoppage() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.Signal.cancelStoppage.menu.operation,
- cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
- param: {
- signalCode: `${this.selected.code}`
- }
- };
- this.mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow();
- }
- }).catch(() => {
- this.$refs.noticeInfo.doShow();
- });
- },
// 获取进路列表
getRouteList(selectType) {
const routes = [];
@@ -392,6 +344,22 @@ export default {
this.$refs.routerCommand.doShow(operate, this.selected, '是否执行引导命令?');
}
});
+ },
+ // 设置故障
+ setStoppage() {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
+ if (valid) {
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
+ }
+ });
+ },
+ // 取消故障
+ cancelStoppage() {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
+ if (valid) {
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
+ }
+ });
}
}
};
diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue b/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue
index 6cbcd77fc..c47a6cc6f 100644
--- a/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue
+++ b/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue
@@ -6,6 +6,7 @@
+
@@ -17,9 +18,9 @@ import SpeedLimitControl from './dialog/speedLimitControl';
import AlxeEffective from './dialog/alxeEffective';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
-import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from './utils/menuOperate';
@@ -32,7 +33,8 @@ export default {
SwitchUnLock,
SpeedLimitControl,
AlxeEffective,
- NoticeInfo
+ NoticeInfo,
+ SetFault
},
props: {
selected: {
@@ -129,12 +131,12 @@ export default {
{
label: '设置故障',
handler: this.setStoppage,
- cmdType: CMD.Switch.CMD_SWITCH_ADD_FAULT
+ cmdType: CMD.Fault.CMD_SET_FAULT
},
{
label: '取消故障',
handler: this.cancelStoppage,
- cmdType: CMD.Switch.CMD_SWITCH_REMOVE_FAULT
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -184,50 +186,6 @@ export default {
this.$refs.popMenu.close();
}
},
- // 设置故障
- setStoppage() {
- const operate = {
- start: true,
- code: this.selected.code,
- operation: OperationEvent.Switch.stoppage.menu.operation,
- param: {
- switchCode: this.selected.code
- }
- };
-
- this.mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow();
- }
- }).catch(() => {
- this.$refs.noticeInfo.doShow();
- });
- },
- // 取消故障
- cancelStoppage() {
- const operate = {
- start: true,
- code: this.selected.code,
- operation: OperationEvent.Switch.cancelStoppage.menu.operation,
- param: {
- switchCode: this.selected.code
- }
- };
-
- this.mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow();
- }
- }).catch(() => {
- this.$refs.noticeInfo.doShow();
- });
- },
// 定操定位
locate() {
commitOperate(menuOperate.Switch.npChain, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
@@ -315,6 +273,22 @@ export default {
callback: action => {
}
});
+ },
+ // 设置故障
+ setStoppage() {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
+ if (valid) {
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
+ }
+ });
+ },
+ // 取消故障
+ cancelStoppage() {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
+ if (valid) {
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
+ }
+ });
}
}
};
diff --git a/src/jmapNew/theme/ningbo_01/menus/utils/menuOperate.js b/src/jmapNew/theme/ningbo_01/menus/utils/menuOperate.js
index 34383dd3c..09a216171 100644
--- a/src/jmapNew/theme/ningbo_01/menus/utils/menuOperate.js
+++ b/src/jmapNew/theme/ningbo_01/menus/utils/menuOperate.js
@@ -263,6 +263,16 @@ export const menuOperate = {
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
}
+ },
+ Common: {
+ setFault: {
+ operation: OperationEvent.Section.stoppage.menu.operation,
+ cmdType: CMD.Fault.CMD_SET_FAULT
+ },
+ cancelFault: {
+ operation: OperationEvent.Section.cancelStoppage.menu.operation,
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
+ }
}
};
diff --git a/src/jmapNew/theme/xian_01/menus/menuSection.vue b/src/jmapNew/theme/xian_01/menus/menuSection.vue
index 8c55dfa1a..21816f04b 100644
--- a/src/jmapNew/theme/xian_01/menus/menuSection.vue
+++ b/src/jmapNew/theme/xian_01/menus/menuSection.vue
@@ -17,11 +17,10 @@ import SpeedCmdControl from './dialog/speedCmdControl';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex';
-import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate } from './utils/menuOperate';
-import SetFault from './dialog/setFault';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default {
name: 'SectionMenu',
@@ -113,14 +112,14 @@ export default {
},
menuForce: [
{
- label: this.$t('menu.menuSection.setFault'),
+ label: '设置故障',
handler: this.setStoppage,
- cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
+ cmdType: CMD.Fault.CMD_SET_FAULT
},
{
- label: this.$t('menu.menuSection.cancelFault'),
+ label: '取消故障',
handler: this.cancelStoppage,
- cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -175,7 +174,7 @@ export default {
setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$refs.setFault.doShow(operate, this.selected);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
});
},
@@ -183,7 +182,7 @@ export default {
cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$refs.setFault.doShow(operate, this.selected);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
});
},
diff --git a/src/jmapNew/theme/xian_01/menus/menuSignal.vue b/src/jmapNew/theme/xian_01/menus/menuSignal.vue
index d349989f0..197a15e81 100644
--- a/src/jmapNew/theme/xian_01/menus/menuSignal.vue
+++ b/src/jmapNew/theme/xian_01/menus/menuSignal.vue
@@ -8,7 +8,7 @@
-
+
@@ -24,10 +24,9 @@ import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { mapGetters } from 'vuex';
-import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import { menuOperate, commitOperate } from './utils/menuOperate';
-import SetFault from './dialog/setFault';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default {
name: 'SignalMenu',
@@ -40,7 +39,7 @@ export default {
RouteHandControl,
RouteDetail,
NoticeInfo,
- SetFault
+ SetFault
},
props: {
selected: {
@@ -166,14 +165,14 @@ export default {
},
menuForce: [
{
- label: this.$t('menu.menuSignal.setFault'),
+ label: '设置故障',
handler: this.setStoppage,
- cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT
+ cmdType: CMD.Fault.CMD_SET_FAULT
},
{
- label: this.$t('menu.menuSignal.cancelFault'),
+ label: '取消故障',
handler: this.cancelStoppage,
- cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -232,7 +231,7 @@ export default {
setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$refs.setFault.doShow(operate, this.selected);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
});
},
@@ -240,7 +239,7 @@ export default {
cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$refs.setFault.doShow(operate, this.selected);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
});
},
diff --git a/src/jmapNew/theme/xian_01/menus/menuSwitch.vue b/src/jmapNew/theme/xian_01/menus/menuSwitch.vue
index ead1453dc..17aebdcbe 100644
--- a/src/jmapNew/theme/xian_01/menus/menuSwitch.vue
+++ b/src/jmapNew/theme/xian_01/menus/menuSwitch.vue
@@ -17,11 +17,10 @@ import SpeedCmdControl from './dialog/speedCmdControl';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex';
-import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate } from './utils/menuOperate';
-import SetFault from './dialog/setFault';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default {
name: 'SwitchMenu',
@@ -157,20 +156,14 @@ export default {
},
menuForce: [
{
- label: this.$t('menu.menuSwitch.setFault'),
+ label: '设置故障',
handler: this.setStoppage,
- auth: {
-
- },
- cmdType:CMD.Switch.CMD_SWITCH_ADD_FAULT
+ cmdType: CMD.Fault.CMD_SET_FAULT
},
{
- label: this.$t('menu.menuSwitch.cancelFault'),
+ label: '取消故障',
handler: this.cancelStoppage,
- auth: {
-
- },
- cmdType:CMD.Switch.CMD_SWITCH_REMOVE_FAULT
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -227,7 +220,7 @@ export default {
setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$refs.setFault.doShow(operate, this.selected);
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
});
},
@@ -235,7 +228,7 @@ export default {
cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$refs.setFault.doShow(operate, this.selected);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
});
},
diff --git a/src/jmapNew/theme/xian_02/menus/index.vue b/src/jmapNew/theme/xian_02/menus/index.vue
index 93d0672ea..2eb3607ae 100644
--- a/src/jmapNew/theme/xian_02/menus/index.vue
+++ b/src/jmapNew/theme/xian_02/menus/index.vue
@@ -228,6 +228,12 @@ export default {
.xian-02__system .el-dialog .el-button:disabled span {
border: 0px;
}
+ .xian-02__system .el-select-dropdown__item {
+ background: #5F9EA0;
+ }
+ .xian-02__system .el-select-dropdown__list {
+ background: #5F9EA0;
+ }
.xian-02__select-option .el-select-dropdown__item{
background: #5F9EA0;
}
@@ -296,9 +302,9 @@ export default {
line-height: 22px !important;
}
- .xian-02__system .el-dialog .el-input.is-disabled .el-input__inner {
- background: #F0F0F0 !important;
- }
+ /*.xian-02__system .el-dialog .el-input.is-disabled .el-input__inner {*/
+ /*background: #F0F0F0 !important;*/
+ /*}*/
.xian-02__system .el-dialog .el-textarea {
border-style:solid;
diff --git a/src/jmapNew/theme/xian_02/menus/menuSection.vue b/src/jmapNew/theme/xian_02/menus/menuSection.vue
index 4d753ce25..705cad421 100644
--- a/src/jmapNew/theme/xian_02/menus/menuSection.vue
+++ b/src/jmapNew/theme/xian_02/menus/menuSection.vue
@@ -6,6 +6,7 @@
+
@@ -22,6 +23,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from './utils/menuOperate';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default {
name: 'SectionMenu',
@@ -31,7 +33,8 @@ export default {
SectionUnLock,
SpeedLimitControl,
AlxeEffective,
- NoticeInfo
+ NoticeInfo,
+ SetFault
},
props: {
selected: {
@@ -116,9 +119,14 @@ export default {
},
menuForce: [
{
- label: '设置计轴失效', // 设置区段故障
- handler: this.alxeFailure,
- cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
+ label: '设置故障',
+ handler: this.setStoppage,
+ cmdType: CMD.Fault.CMD_SET_FAULT
+ },
+ {
+ label: '取消故障',
+ handler: this.cancelStoppage,
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -170,12 +178,20 @@ export default {
this.$refs.popMenu.close();
}
},
- // 设置计轴失效
- alxeFailure() {
- this.mouseCancelState(this.selected);
- commitOperate(menuOperate.Section.alxeFailure, {sectionCode:this.selected.code}, 3).then(({valid, operate})=>{
- }).catch((error)=>{
- this.$refs.noticeInfo.doShow({}, error.message);
+ // 设置故障
+ setStoppage() {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
+ if (valid) {
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
+ }
+ });
+ },
+ // 取消故障
+ cancelStoppage() {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
+ if (valid) {
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
+ }
});
},
// 故障解锁
diff --git a/src/jmapNew/theme/xian_02/menus/menuSignal.vue b/src/jmapNew/theme/xian_02/menus/menuSignal.vue
index 94c7d49e7..363b79694 100644
--- a/src/jmapNew/theme/xian_02/menus/menuSignal.vue
+++ b/src/jmapNew/theme/xian_02/menus/menuSignal.vue
@@ -9,6 +9,7 @@
+
@@ -28,7 +29,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
-// import { querySignalStatus } from '@/api/simulation';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default {
name: 'SignalMenu',
@@ -41,7 +42,8 @@ export default {
RouteHandControl,
RouteDetail,
RouterCommand,
- NoticeInfo
+ NoticeInfo,
+ SetFault
},
props: {
selected: {
@@ -188,20 +190,15 @@ export default {
}
],
menuForce: [
- {
- label: '信号关灯',
- handler: this.signalClose,
- cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
- },
{
label: '设置故障',
handler: this.setStoppage,
- cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT
+ cmdType: CMD.Fault.CMD_SET_FAULT
},
{
label: '取消故障',
handler: this.cancelStoppage,
- cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -269,46 +266,19 @@ export default {
},
// 设置故障
setStoppage() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.Signal.stoppage.menu.operation,
- cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
- param: {
- signalCode: `${this.selected.code}`
- }
- };
- this.mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ console.log(this, this.$refs, '===');
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 取消故障
cancelStoppage() {
- const step = {
- start: true,
- code: `${this.selected.code}`,
- operation: OperationEvent.Signal.cancelStoppage.menu.operation,
- cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
- param: {
- signalCode: `${this.selected.code}`
- }
- };
- this.mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(step);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(step);
});
},
// 获取进路列表
diff --git a/src/jmapNew/theme/xian_02/menus/menuSwitch.vue b/src/jmapNew/theme/xian_02/menus/menuSwitch.vue
index 2046d7da4..62efcc86f 100644
--- a/src/jmapNew/theme/xian_02/menus/menuSwitch.vue
+++ b/src/jmapNew/theme/xian_02/menus/menuSwitch.vue
@@ -6,6 +6,7 @@
+
@@ -23,6 +24,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import {menuOperate, commitOperate} from './utils/menuOperate';
+import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default {
name: 'SwitchMenu',
@@ -32,7 +34,8 @@ export default {
SwitchUnLock,
SpeedLimitControl,
AlxeEffective,
- NoticeInfo
+ NoticeInfo,
+ SetFault
},
props: {
selected: {
@@ -146,12 +149,12 @@ export default {
{
label: '设置故障',
handler: this.setStoppage,
- cmdType: CMD.Switch.CMD_SWITCH_ADD_FAULT
+ cmdType: CMD.Fault.CMD_SET_FAULT
},
{
label: '取消故障',
handler: this.cancelStoppage,
- cmdType: CMD.Switch.CMD_SWITCH_REMOVE_FAULT
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
@@ -238,26 +241,20 @@ export default {
this.$refs.noticeInfo.doShow(operate);
});
},
+ // 设置故障
+ setStoppage() {
+ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
+ if (valid) {
+ this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
+ }
+ });
+ },
// 取消故障
cancelStoppage() {
- const operate = {
- start: true,
- code: this.selected.code,
- operation: OperationEvent.Switch.cancelStoppage.menu.operation,
- param: {
- switchCode: this.selected.code
- }
- };
-
- this.mouseCancelState(this.selected);
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- } else {
- this.$refs.noticeInfo.doShow(operate);
+ this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
- }).catch(() => {
- this.$refs.noticeInfo.doShow(operate);
});
},
// 定操定位
diff --git a/src/jmapNew/theme/xian_02/menus/utils/menuOperate.js b/src/jmapNew/theme/xian_02/menus/utils/menuOperate.js
index 5dcae4248..929324f24 100644
--- a/src/jmapNew/theme/xian_02/menus/utils/menuOperate.js
+++ b/src/jmapNew/theme/xian_02/menus/utils/menuOperate.js
@@ -257,6 +257,16 @@ export const menuOperate = {
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
}
+ },
+ Common: {
+ setFault: {
+ operation: OperationEvent.Section.stoppage.menu.operation,
+ cmdType: CMD.Fault.CMD_SET_FAULT
+ },
+ cancelFault: {
+ operation: OperationEvent.Section.cancelStoppage.menu.operation,
+ cmdType: CMD.Fault.CMD_CANCEL_FAULT
+ }
}
};
diff --git a/src/views/newMap/mapsystemNew/plugin/setFault.vue b/src/views/newMap/mapsystemNew/plugin/setFault.vue
new file mode 100644
index 000000000..20c3688ba
--- /dev/null
+++ b/src/views/newMap/mapsystemNew/plugin/setFault.vue
@@ -0,0 +1,174 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+
+
+ 取消
+
+
+
+
+
+