北京一成都线路手动设置zc故障

This commit is contained in:
joylink_cuiweidong 2020-07-06 18:45:15 +08:00
parent 8d09215323
commit a6b2f62c3e
3 changed files with 25 additions and 82 deletions

View File

@ -4,6 +4,7 @@
<station-cmd-control ref="stationCmdControl" /> <station-cmd-control ref="stationCmdControl" />
<station-human-control-all ref="stationHumanControlAll" /> <station-human-control-all ref="stationHumanControlAll" />
<station-set-route-control-all ref="stationSetRouteControlAll" /> <station-set-route-control-all ref="stationSetRouteControlAll" />
<set-fault ref="setFault" pop-class="beijing-01__systerm" />
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" /> <notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
</div> </div>
</template> </template>
@ -20,12 +21,15 @@ import { DeviceMenu } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus'; // import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default { export default {
name: 'StationMenu', name: 'StationMenu',
components: { components: {
PopMenu, PopMenu,
SetFault,
StationCmdControl, StationCmdControl,
StationHumanControlAll, StationHumanControlAll,
StationSetRouteControlAll, StationSetRouteControlAll,
@ -162,42 +166,18 @@ export default {
}, },
// //
setStoppage() { setStoppage() {
const operate = { commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
start: true,
send: true,
code: this.selected.code,
operation: OperationEvent.Station.stoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
} else {
this.$refs.noticeInfo.doShow(operate);
} }
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
cancelStoppage() { cancelStoppage() {
const operate = { commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
start: true,
send: true,
code: this.selected.code,
operation: OperationEvent.Station.cancelStoppage.menu.operation
};
mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
} else {
this.$refs.noticeInfo.doShow(operate);
} }
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //

View File

@ -1,6 +1,7 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<set-fault ref="setFault" pop-class="chengdou-01__systerm" />
<notice-info ref="noticeInfo" pop-class="chengdou-01__system" /> <notice-info ref="noticeInfo" pop-class="chengdou-01__system" />
</div> </div>
</template> </template>
@ -12,11 +13,14 @@ import CancelMouseState from '@/mixin/CancelMouseState';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default { export default {
name: 'StationMenu', name: 'StationMenu',
components: { components: {
PopMenu, PopMenu,
SetFault,
NoticeInfo NoticeInfo
}, },
mixins: [ mixins: [
@ -98,38 +102,18 @@ export default {
}, },
// //
setStoppage() { setStoppage() {
const operate = { commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
code: this.selected.code,
operation: OperationEvent.Station.stoppage.menu.operation
};
this.mouseCancelState(this.selected);
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
} else {
this.$refs.noticeInfo.doShow(operate);
} }
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
cancelStoppage() { cancelStoppage() {
const operate = { commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
code: this.selected.code,
operation: OperationEvent.Station.cancelStoppage.menu.operation
};
this.mouseCancelState(this.selected);
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
} else {
this.$refs.noticeInfo.doShow(operate);
} }
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
}); });
} }
} }

View File

@ -1,6 +1,7 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" /> <notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</div> </div>
</template> </template>
@ -11,13 +12,15 @@ import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CancelMouseState from '@/mixin/CancelMouseState'; import CancelMouseState from '@/mixin/CancelMouseState';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default { export default {
name: 'StationMenu', name: 'StationMenu',
components: { components: {
PopMenu, PopMenu,
SetFault,
NoticeInfo NoticeInfo
}, },
mixins: [ mixins: [
@ -100,42 +103,18 @@ export default {
}, },
// //
setStoppage() { setStoppage() {
const operate = { commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
start: true,
send: true,
code: this.selected.code,
operation: OperationEvent.Station.stoppage.menu.operation
};
this.mouseCancelState(this.selected);
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
} else {
this.$refs.noticeInfo.doShow(operate);
} }
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
cancelStoppage() { cancelStoppage() {
const operate = { commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
start: true,
send: true,
code: this.selected.code,
operation: OperationEvent.Station.cancelStoppage.menu.operation
};
this.mouseCancelState(this.selected);
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
} else {
this.$refs.noticeInfo.doShow(operate);
} }
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
}); });
} }
} }