Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
559c33bb2a
@ -5,6 +5,7 @@
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<alxe-effective ref="alxeEffective" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -7,6 +7,7 @@
|
||||
<route-detail ref="routeDetail" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<password-box ref="password" @checkOver="passWordCommit" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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);
|
||||
});
|
||||
},
|
||||
// 设置进路
|
||||
|
@ -6,6 +6,7 @@
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<alxe-effective ref="alxeEffective" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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);
|
||||
});
|
||||
},
|
||||
// 道岔单锁
|
||||
|
@ -73,7 +73,7 @@
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="12" :offset="7">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确认</el-button>
|
||||
<el-button :id="domIdConfirm" type="primary" @click="commit">确认</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">取消</el-button>
|
||||
<el-button>帮助</el-button>
|
||||
</el-col>
|
||||
|
@ -63,7 +63,7 @@
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="16" :offset="5">
|
||||
<el-button type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
<el-button type="primary" @click="commit">确定</el-button>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
<el-button>帮助</el-button>
|
||||
</el-col>
|
||||
|
@ -56,7 +56,7 @@
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="20" :offset="2">
|
||||
<el-button type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
<el-button type="primary" @click="commit">确定</el-button>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
<el-button>帮助</el-button>
|
||||
</el-col>
|
||||
|
@ -28,7 +28,7 @@
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="24">
|
||||
<el-button type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
<el-button type="primary" @click="commit">确定</el-button>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
<el-button>帮助</el-button>
|
||||
</el-col>
|
||||
|
@ -43,6 +43,8 @@ export default {
|
||||
return {
|
||||
unfold: true,
|
||||
tempData: [],
|
||||
commitDisabled: false,
|
||||
loading: false,
|
||||
tableStyle: {
|
||||
'border-bottom': 'none',
|
||||
'border-right': 'none'
|
||||
|
@ -5,6 +5,7 @@
|
||||
<section-control ref="sectionControl" />
|
||||
<section-cmd-control ref="sectionCmdControl" />
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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);
|
||||
});
|
||||
},
|
||||
// 设置速度
|
||||
|
@ -3,6 +3,7 @@
|
||||
<pop-menu ref="popMenu" :menu="menu" :pop-class="popClass" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<create-device-label ref="createDeviceLabel" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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);
|
||||
});
|
||||
},
|
||||
// 设置进路
|
||||
|
@ -4,6 +4,7 @@
|
||||
<notice-info ref="noticeInfo" />
|
||||
<switch-control ref="switchControl" />
|
||||
<create-device-label ref="createDeviceLabel" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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);
|
||||
});
|
||||
},
|
||||
// 道岔单锁
|
||||
|
257
src/jmapNew/theme/chengdu_01/menus/utils/menuOperate.js
Normal file
257
src/jmapNew/theme/chengdu_01/menus/utils/menuOperate.js
Normal file
@ -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);
|
||||
});
|
||||
});
|
||||
}
|
@ -5,6 +5,7 @@
|
||||
<train-create ref="trainCreate" />
|
||||
<section-detail ref="sectionDetail" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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() {
|
||||
|
@ -8,6 +8,7 @@
|
||||
<route-hand-control ref="routeHandControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<password-box ref="passwordBox" @checkOver="passWordCommit" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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);
|
||||
});
|
||||
},
|
||||
// 设置进路
|
||||
|
@ -4,6 +4,7 @@
|
||||
<section-control ref="sectionControl" />
|
||||
<switch-control ref="switchControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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);
|
||||
});
|
||||
},
|
||||
// 道岔单锁
|
||||
|
257
src/jmapNew/theme/chengdu_03/menus/utils/menuOperate.js
Normal file
257
src/jmapNew/theme/chengdu_03/menus/utils/menuOperate.js
Normal file
@ -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);
|
||||
});
|
||||
});
|
||||
}
|
@ -5,6 +5,7 @@
|
||||
<section-un-lock ref="sectionUnLock" />
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 故障解锁
|
||||
|
@ -9,6 +9,7 @@
|
||||
<route-detail ref="routeDetail" />
|
||||
<router-command ref="routerCommand" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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) {
|
||||
|
@ -5,6 +5,7 @@
|
||||
<switch-un-lock ref="switchUnLock" />
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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) {
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
<section-cmd-control ref="sectionCmdControl" />
|
||||
<speed-cmd-control ref="speedCmdControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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);
|
||||
});
|
||||
},
|
||||
// 故障解锁
|
||||
|
@ -8,6 +8,7 @@
|
||||
<route-hand-control ref="routeHandControl" />
|
||||
<route-detail ref="routeDetail" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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);
|
||||
});
|
||||
},
|
||||
// 排列进路
|
||||
|
@ -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
|
||||
}
|
||||
]
|
||||
};
|
||||
|
@ -5,6 +5,7 @@
|
||||
<switch-cmd-control ref="switchCmdControl" />
|
||||
<speed-cmd-control ref="speedCmdControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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);
|
||||
});
|
||||
},
|
||||
// 道岔单锁
|
||||
|
308
src/jmapNew/theme/fuzhou_01/menus/utils/menuOperate.js
Normal file
308
src/jmapNew/theme/fuzhou_01/menus/utils/menuOperate.js
Normal file
@ -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);
|
||||
});
|
||||
});
|
||||
}
|
@ -5,6 +5,7 @@
|
||||
<section-cmd-control ref="sectionCmdControl" />
|
||||
<speed-cmd-control ref="speedCmdControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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);
|
||||
});
|
||||
},
|
||||
// 故障解锁
|
||||
|
@ -8,6 +8,7 @@
|
||||
<route-hand-control ref="routeHandControl" />
|
||||
<route-detail ref="routeDetail" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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);
|
||||
});
|
||||
},
|
||||
// 排列进路
|
||||
|
@ -5,6 +5,7 @@
|
||||
<switch-cmd-control ref="switchCmdControl" />
|
||||
<speed-cmd-control ref="speedCmdControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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);
|
||||
});
|
||||
},
|
||||
// 道岔单锁
|
||||
|
308
src/jmapNew/theme/haerbin_01/menus/utils/menuOperate.js
Normal file
308
src/jmapNew/theme/haerbin_01/menus/utils/menuOperate.js
Normal file
@ -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);
|
||||
});
|
||||
});
|
||||
}
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -8,7 +8,8 @@
|
||||
<route-hand-control ref="routeHandControl" />
|
||||
<route-detail ref="routeDetail" />
|
||||
<router-command ref="routerCommand" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" />\
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -6,6 +6,7 @@
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<alxe-effective ref="alxeEffective" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -8,7 +8,7 @@
|
||||
<route-hand-control ref="routeHandControl" />
|
||||
<route-detail ref="routeDetail" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -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);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -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;
|
||||
|
@ -6,6 +6,7 @@
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<alxe-effective ref="alxeEffective" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 故障解锁
|
||||
|
@ -9,6 +9,7 @@
|
||||
<route-detail ref="routeDetail" />
|
||||
<router-command ref="routerCommand" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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);
|
||||
});
|
||||
},
|
||||
// 获取进路列表
|
||||
|
@ -6,6 +6,7 @@
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<alxe-effective ref="alxeEffective" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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);
|
||||
});
|
||||
},
|
||||
// 定操定位
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
174
src/views/newMap/mapsystemNew/plugin/setFault.vue
Normal file
174
src/views/newMap/mapsystemNew/plugin/setFault.vue
Normal file
@ -0,0 +1,174 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag :class="className" :title="title" :visible.sync="show" width="350px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row class="header">
|
||||
<el-col :span="11"><span>设备:</span></el-col>
|
||||
<el-col :span="11" :offset="2"><span>故障类型:</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="deviceName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-select v-model="faultType" size="small" style="height: 28px;" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in faultList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
|
||||
|
||||
export default {
|
||||
name: 'SwitchControl',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operation: '',
|
||||
stationName: '',
|
||||
switchName: '',
|
||||
activeShow: false,
|
||||
deviceName: '',
|
||||
faultType: '',
|
||||
faultList: [],
|
||||
className: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Section.stoppage.menu.operation) {
|
||||
return '设置故障';
|
||||
} else if (this.operation === OperationEvent.Section.cancelStoppage.menu.operation) {
|
||||
return '取消故障';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
created() {
|
||||
switch (this.$route.query.lineCode) {
|
||||
case '02':
|
||||
case '05':
|
||||
this.className = 'fuzhou-01__systerm';
|
||||
break;
|
||||
case '03':
|
||||
this.className = 'beijing-01__systerm';
|
||||
break;
|
||||
case '04':
|
||||
this.className = 'chengdou-03__systerm';
|
||||
break;
|
||||
case '06':
|
||||
this.className = 'ningbo-01__systerm';
|
||||
break;
|
||||
case '07':
|
||||
this.className = 'haerbin-01__systerm';
|
||||
break;
|
||||
case '08':
|
||||
this.className = 'foshan-01__systerm';
|
||||
break;
|
||||
case '09':
|
||||
this.className = 'xian-02__system';
|
||||
break;
|
||||
case '10':
|
||||
case '11':
|
||||
this.className = 'xian-01__systerm';
|
||||
break;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
if (!this.dialogShow) {
|
||||
this.switchName = '';
|
||||
this.stationName = '';
|
||||
this.operation = operate.operation;
|
||||
this.cmdType = operate.cmdType;
|
||||
this.deviceName = deviceType[selected._type] + '-' + selected.name;
|
||||
this.faultList = deviceFaultType[selected._type];
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.faultType) {
|
||||
this.sendCommand();
|
||||
}
|
||||
},
|
||||
sendCommand() { // 发送指令
|
||||
this.loading = true;
|
||||
const setp = {
|
||||
over: true,
|
||||
operation: this.operation,
|
||||
cmdType: this.cmdType,
|
||||
param: {
|
||||
faultType: this.faultType
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', setp).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
} else {
|
||||
this.doClose();
|
||||
this.$messageBox('设置或取消故障操作失败!');
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$messageBox(error.message || '设置或取消故障操作失败!');
|
||||
});
|
||||
},
|
||||
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user