增加 区段的新建列车操作,以及菜单实训operate配置

This commit is contained in:
lVAL 2021-01-22 17:39:12 +08:00
parent 527f59cc58
commit 584a30a634
6 changed files with 370 additions and 165 deletions

View File

@ -245,6 +245,7 @@ export default {
}
},
data() {
console.log(OperationEvent.Command.commandNingBo.line_stand)
return {
classA: -1,
classB: -1,
@ -256,7 +257,7 @@ export default {
Local: [
// {
// title: '(W)',
// operate: OperationEvent.Command.mBar.system,
// operate: '',
// children: [
// {
// title: '',
@ -412,118 +413,139 @@ export default {
},
{
title: '线路(G)',
operate: '',
operate: OperationEvent.Command.commandNingBo.line,
children: [
{
title: '站台',
operate: '',
operate: OperationEvent.Command.commandNingBo.line_stand,
children: [
{
title: '开放/关闭',
click: this.standOpenOrClose
click: this.standOpenOrClose,
operate: OperationEvent.Command.commandNingBo.line_stand_openOrClose
},
{
title: '设置/取消扣车',
click: this.setStandDetain
click: this.setStandDetain,
operate: OperationEvent.Command.commandNingBo.line_stand_holdOrNot
},
{
title: '设置站间列车数量',
// click: this.setIntervalStopNumber
click: this.undeveloped
click: this.undeveloped,
operate: OperationEvent.Command.commandNingBo.line_stand_trainNum
},
{
title: '分配停站时间',
click: this.setAllocateTime
click: this.setAllocateTime,
operate: OperationEvent.Command.commandNingBo.line_stand_stopTime
},
{
title: '授权转移',
click: this.authorizeTransfer
click: this.authorizeTransfer,
operate: OperationEvent.Command.commandNingBo.line_stand_transfer
},
{
title: '显示',
click: this.showStandDetail
click: this.showStandDetail,
operate: OperationEvent.Command.commandNingBo.line_stand_detail
}
]
},
{
title: '道岔',
operate: '',
operate: OperationEvent.Command.commandNingBo.line_switch,
children: [
{
title: '命令',
title: '命令',
operate: OperationEvent.Command.commandNingBo.line_switch_cmd,
click: this.setSwitchCommand
},
{
title: '封锁',
title: '封锁',
operate: OperationEvent.Command.commandNingBo.line_switch_block,
click: this.setBlockSwitch
},
{
title: '解除封锁',
title: '解除封锁',
operate: OperationEvent.Command.commandNingBo.line_switch_unblock,
click: this.setUnblockSwitch
},
{
title: '请求动岔/请求或授权/取消',
title: '请求动岔/请求或授权/取消',
operate: OperationEvent.Command.commandNingBo.line_switch_empower,
click: this.setSwitchActive
},
{
title: '显示',
title: '显示',
operate: OperationEvent.Command.commandNingBo.line_switch_detail,
click: this.showSwitchDetail
}
]
},
{
title: '信号机',
operate: '',
operate: OperationEvent.Command.commandNingBo.line_signal,
children: [
{
title: '引导',
title: '引导',
operate: OperationEvent.Command.commandNingBo.line_signal_guide,
click: this.setSignalGuide
},
{
title: '取消允许锁闭',
title: '取消允许锁闭',
operate: OperationEvent.Command.commandNingBo.line_signal_lockOrNot,
click: this.setSignalCanBlock
},
{
title: '进路/命令',
title: '进路/命令',
operate: OperationEvent.Command.commandNingBo.line_signal_cmd,
click: this.setRouteCommand
},
{
title: '信号指示模式',
title: '信号指示模式',
operate: OperationEvent.Command.commandNingBo.line_signal_indicator,
click: this.setSignalModel
},
{
title: '封锁',
title: '封锁',
operate: OperationEvent.Command.commandNingBo.line_signal_block,
click: this.setSignalBlock
},
{
title: '解除封锁',
title: '解除封锁',
operate: OperationEvent.Command.commandNingBo.line_signal_unblock,
click: this.setSignalCancelBlock
},
{
title: '显示',
title: '显示',
operate: OperationEvent.Command.commandNingBo.line_signal_detail,
click: this.showSignalDetail
}
]
},
{
title: '轨道',
operate: '',
operate: OperationEvent.Command.commandNingBo.line_section,
children: [
{
title: '开放',
title: '开放',
operate: OperationEvent.Command.commandNingBo.line_section_open,
click: this.handleOpenSection
},
{
title: '关闭',
title: '关闭',
operate: OperationEvent.Command.commandNingBo.line_section_close,
click: this.handleCloseSection
},
{
title: '临时限速',
title: '临时限速',
operate: OperationEvent.Command.commandNingBo.line_section_limitSpeed,
click: this.handleLimitSpeed
},
{
title: '显示',
title: '显示',
operate: OperationEvent.Command.commandNingBo.line_section_detail,
click: this.handleSectionShow
}
]
@ -887,121 +909,142 @@ export default {
},
{
title: '线路(G)',
operate: '',
operate: OperationEvent.Command.commandNingBo.line,
children: [
{
{
title: '站台',
operate: '',
operate: OperationEvent.Command.commandNingBo.line_stand,
children: [
{
title: '开放/关闭',
click: this.standOpenOrClose
click: this.standOpenOrClose,
operate: OperationEvent.Command.commandNingBo.line_stand_openOrClose
},
{
title: '设置/取消扣车',
click: this.setStandDetain
click: this.setStandDetain,
operate: OperationEvent.Command.commandNingBo.line_stand_holdOrNot
},
{
title: '设置站间列车数量',
click: this.setIntervalStopNumber
click: this.undeveloped,
operate: OperationEvent.Command.commandNingBo.line_stand_trainNum
},
{
title: '分配停站时间',
click: this.setAllocateTime
click: this.setAllocateTime,
operate: OperationEvent.Command.commandNingBo.line_stand_stopTime
},
{
title: '授权转移',
click: this.authorizeTransfer
click: this.authorizeTransfer,
operate: OperationEvent.Command.commandNingBo.line_stand_transfer
},
{
title: '显示',
click: this.showStandDetail
click: this.showStandDetail,
operate: OperationEvent.Command.commandNingBo.line_stand_detail
}
]
},
{
title: '道岔',
operate: '',
operate: OperationEvent.Command.commandNingBo.line_switch,
children: [
{
title: '命令',
title: '命令',
operate: OperationEvent.Command.commandNingBo.line_switch_cmd,
click: this.setSwitchCommand
},
{
title: '封锁',
title: '封锁',
operate: OperationEvent.Command.commandNingBo.line_switch_block,
click: this.setBlockSwitch
},
{
title: '解除封锁',
title: '解除封锁',
operate: OperationEvent.Command.commandNingBo.line_switch_unblock,
click: this.setUnblockSwitch
},
{
title: '请求动岔/请求或授权/取消',
title: '请求动岔/请求或授权/取消',
operate: OperationEvent.Command.commandNingBo.line_switch_empower,
click: this.setSwitchActive
},
{
title: '显示',
title: '显示',
operate: OperationEvent.Command.commandNingBo.line_switch_detail,
click: this.showSwitchDetail
}
]
},
{
{
title: '信号机',
operate: '',
operate: OperationEvent.Command.commandNingBo.line_signal,
children: [
{
title: '引导',
title: '引导',
operate: OperationEvent.Command.commandNingBo.line_signal_guide,
click: this.setSignalGuide
},
{
title: '取消允许锁闭',
title: '取消允许锁闭',
operate: OperationEvent.Command.commandNingBo.line_signal_lockOrNot,
click: this.setSignalCanBlock
},
{
title: '进路/命令',
title: '进路/命令',
operate: OperationEvent.Command.commandNingBo.line_signal_cmd,
click: this.setRouteCommand
},
{
title: '信号指示模式',
title: '信号指示模式',
operate: OperationEvent.Command.commandNingBo.line_signal_indicator,
click: this.setSignalModel
},
{
title: '封锁',
title: '封锁',
operate: OperationEvent.Command.commandNingBo.line_signal_block,
click: this.setSignalBlock
},
{
title: '解除封锁',
title: '解除封锁',
operate: OperationEvent.Command.commandNingBo.line_signal_unblock,
click: this.setSignalCancelBlock
},
{
title: '显示',
title: '显示',
operate: OperationEvent.Command.commandNingBo.line_signal_detail,
click: this.showSignalDetail
}
]
},
{
{
title: '轨道',
operate: '',
operate: OperationEvent.Command.commandNingBo.line_section,
children: [
{
title: '开放',
title: '开放',
operate: OperationEvent.Command.commandNingBo.line_section_open,
click: this.handleOpenSection
},
{
title: '关闭',
title: '关闭',
operate: OperationEvent.Command.commandNingBo.line_section_close,
click: this.handleCloseSection
},
{
title: '临时限速',
title: '临时限速',
operate: OperationEvent.Command.commandNingBo.line_section_limitSpeed,
click: this.handleLimitSpeed
},
{
title: '显示',
title: '显示',
operate: OperationEvent.Command.commandNingBo.line_section_detail,
click: this.handleSectionShow
}
]
},
},
{
title: '闭塞区段',
operate: '',
@ -1234,7 +1277,7 @@ export default {
return true;
},
initMenu(menu) {
const type = State2SimulationMap[this.$store.state.training.prdType];
const type = State2SimulationMap[this.$store.state.training.prdType];
this.menu = MenuContextHandler.menuBarConvert(this.menuNormal[type], this.$store.state.training.operatemode);
this.clickEvent();
this.closeMenu(true);

View File

@ -1,48 +1,50 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="600px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-table
ref="singleTable"
:data="filterSignalList"
highlight-current-row
height="350px"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="信号机" />
<el-table-column prop="status" label="信号机封锁状态">
<template slot-scope="scope">
<span>{{ getSignalStatus(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" label="设置封锁进程">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code, 'lock') }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" label="解除封锁进程">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code, 'unlock') }}</span>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !!initEle" @click="commit(true)">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !!initEle" @click="commit(false)">应用(A)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button>帮助(H)</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<signal-block ref="signalBlock" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</el-dialog>
<div>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="600px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-table
ref="singleTable"
:data="filterSignalList"
highlight-current-row
height="350px"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="信号机" />
<el-table-column prop="status" label="信号机封锁状态">
<template slot-scope="scope">
<span>{{ getSignalStatus(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" label="设置封锁进程">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code, 'lock') }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" label="解除封锁进程">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code, 'unlock') }}</span>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !!initEle" @click="commit(true)">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !!initEle" @click="commit(false)">应用(A)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button>帮助(H)</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog>
<signal-block ref="signalBlock" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</div>
</template>
<script>

View File

@ -1,44 +1,46 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-table
ref="singleTable"
:data="signalList"
highlight-current-row
height="300px"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="信号机" />
<el-table-column prop="blockStatus" label="允许锁闭">
<template slot-scope="scope">
<span>{{ getSignalBlock(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" label="同意取消"></el-table-column>
<el-table-column prop="unblockProcess" label="取消进程">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code) }}</span>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit(true)">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit(false)">应用(A)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button>帮助(H)</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<signal-can-block ref="signalCanBlock" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</el-dialog>
<div>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-table
ref="singleTable"
:data="signalList"
highlight-current-row
height="300px"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="信号机" />
<el-table-column prop="blockStatus" label="允许锁闭">
<template slot-scope="scope">
<span>{{ getSignalBlock(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" label="同意取消"></el-table-column>
<el-table-column prop="unblockProcess" label="取消进程">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code) }}</span>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit(true)">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit(false)">应用(A)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button>帮助(H)</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog>
<signal-can-block ref="signalCanBlock" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</div>
</template>
<script>

View File

@ -122,21 +122,21 @@ export default {
this.$store.dispatch('training/emitTipFresh');
},
commit(isClose = false) {
// const operate = {
// cmdType: this.command ? CMD.Signal.CMD_SIGNAL_BLOCK : CMD.Signal.CMD_SIGNAL_UNBLOCK,
// operation: this.command ? OperationEvent.Signal.lock.confirm1.operation : OperationEvent.Signal.unlock.confirm1.operation,
// over: true,
// param: {signalCode: this.selected.code}
// };
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
// if (valid) {
// isClose && this.doClose();
// this.$emit('commandSuccess', this.selected.code);
// }
// }).catch(() => {
// isClose && this.doClose();
// this.$refs.noticeInfo.doShow();
// });
const operate = {
cmdType: this.command ? CMD.Signal.CMD_SIGNAL_BLOCK : CMD.Signal.CMD_SIGNAL_UNBLOCK,
operation: this.command ? OperationEvent.Signal.lock.confirm1.operation : OperationEvent.Signal.unlock.confirm1.operation,
over: true,
param: {signalCode: this.selected.code}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
isClose && this.doClose();
this.$emit('commandSuccess', this.selected.code);
}
}).catch(() => {
isClose && this.doClose();
this.$refs.noticeInfo.doShow();
});
},
handleCurrentChange(val) {
this.$refs.singleTable.setCurrentRow(this.selected);

View File

@ -8,6 +8,7 @@
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
<train-add-plan ref="trainAddPlan" pop-class="ningbo-01__systerm" />
<load-spare-train ref="loadSpareTrain" pop-class="foshan-01__systerm" />
</div>
</template>
@ -25,6 +26,8 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
export default {
name: 'SectionMenu',
@ -36,7 +39,8 @@ export default {
AlxeEffective,
NoticeInfo,
TrainAddPlan,
SetFault
SetFault,
LoadSpareTrain
},
props: {
selected: {
@ -110,6 +114,11 @@ export default {
label: this.$t('menu.menuSection.cancelFault'),
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '设置备用车',
handler: this.loadSpare,
cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN
}
]
};
@ -268,7 +277,15 @@ export default {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
});
}
},
//
loadSpare() {
commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{
if (valid) {
this.$refs.loadSpareTrain.doShow(operate, this.selected);
}
});
}
}
};
</script>

View File

@ -234,7 +234,8 @@ export const OperationEvent = {
operation: '0082',
domId: '_Tips-commandHaerbin-confirmCr2{BOTTOM}'
}
},
},
// 西安
commandXian: {
confirm: {
operation: '009',
@ -248,7 +249,145 @@ export const OperationEvent = {
operation: '0092',
domId: '_Tips-commandXian-requestBar{TOP}'
}
}
},
// 宁波三
commandNingBo: {
//线路
line: {
operation: '00a',
domId: '_Tips-ningBo-line{TOP}'
},
//站台
line_stand: {
operation: '00a0',
domId: '_Tips-ningBo-line-stand{TOP}'
},
//开放或关闭
line_stand_openOrClose: {
operation: '00a01',
domId: '_Tips-ningBo-line-stand-openOrClose{TOP}'
},
//设置或取消扣车
line_stand_holdOrNot: {
operation: '00a02',
domId: '_Tips-ningBo-line_stand_holdOrNote{TOP}'
},
//设置站间列车数量
line_stand_trainNum: {
operation: '00a03',
domId: '_Tips-ningBo-line_stand_trainNum{TOP}'
},
//设置站间停站时间
line_stand_stopTime: {
operation: '00a04',
domId: '_Tips-ningBo-line_stand_stopTime{TOP}'
},
//授权转移
line_stand_transfer: {
operation: '00a05',
domId: '_Tips-ningBo-line_stand_transfer{TOP}'
},
//显示
line_stand_detail: {
operation: '00a06',
domId: '_Tips-ningBo-line_stand_detail{TOP}'
},
//道岔
line_switch: {
operation: '00a1',
domId: '_Tips-ningBo-line-switch{TOP}'
},
//命令
line_switch_cmd: {
operation: '00a11',
domId: '_Tips-ningBo-line-switch-cmd{TOP}'
},
//封锁
line_switch_block: {
operation: '00a12',
domId: '_Tips-ningBo-line-switch-block{TOP}'
},
//解除封锁
line_switch_unblock: {
operation: '00a13',
domId: '_Tips-ningBo-line-switch-unblock{TOP}'
},
//请求动岔/请求/授权
line_switch_empower: {
operation: '00a14',
domId: '_Tips-ningBo-line-switch-empower{TOP}'
},
//显示
line_switch_detail: {
operation: '00a15',
domId: '_Tips-ningBo-line-switch-detail{TOP}'
},
//信号机
line_signal: {
operation: '00a2',
domId: '_Tips-ningBo-line-signal{TOP}'
},
//引导
line_signal_guide: {
operation: '00a21',
domId: '_Tips-ningBo-line-signal-guide{TOP}'
},
//取消允许锁闭
line_signal_lockOrNot: {
operation: '00a22',
domId: '_Tips-ningBo-line-signal-lockOrNot{TOP}'
},
//进路
line_signal_cmd: {
operation: '00a23',
domId: '_Tips-ningBo-line-signal-cmd{TOP}'
},
//信号指示模式
line_signal_indicator: {
operation: '00a24',
domId: '_Tips-ningBo-line-signal-indicator{TOP}'
},
//封锁
line_signal_block: {
operation: '00a25',
domId: '_Tips-ningBo-line-signal-block{TOP}'
},
//解封
line_signal_unblock: {
operation: '00a26',
domId: '_Tips-ningBo-line-signal-unblock{TOP}'
},
//显示
line_signal_detail: {
operation: '00a27',
domId: '_Tips-ningBo-line-signal-detail{TOP}'
},
//轨道
line_section: {
operation: '00a3',
domId: '_Tips-ningBo-line-section{TOP}'
},
//开放
line_section_open: {
operation: '00a31',
domId: '_Tips-ningBo-line-section-open{TOP}'
},
//关闭
line_section_close: {
operation: '00a32',
domId: '_Tips-ningBo-line-section-close{TOP}'
},
//临时限速
line_section_limitSpeed: {
operation: '00a33',
domId: '_Tips-ningBo-line-section-limitSpeed{TOP}'
},
//显示
line_section_detail: {
operation: '00a34',
domId: '_Tips-ningBo-line-section-detail{TOP}'
}
}
},
// 站台概要表
StandTable: {
@ -2597,6 +2736,8 @@ export const OperationEvent = {
};
console.log(OperationEvent);
import { MapDeviceType } from './Config.js';
class OperationHandler {