北京一号线道岔操作代码调整

This commit is contained in:
joylink_cuiweidong 2020-03-20 11:23:46 +08:00
parent cc21437843
commit 61d54b2209
5 changed files with 237 additions and 282 deletions

View File

@ -79,8 +79,10 @@ export default {
}, },
title() { title() {
if (this.operation == OperationEvent.Section.split.menu.operation) { if (this.operation == OperationEvent.Section.split.menu.operation) {
this.radio = '2';
return '区段控制'; return '区段控制';
} else if (this.operation == OperationEvent.Section.active.menu.operation) { } else if (this.operation == OperationEvent.Section.active.menu.operation) {
this.radio = '1';
return '区段控制'; return '区段控制';
} else if (this.operation == OperationEvent.Section.fault.menu.operation) { } else if (this.operation == OperationEvent.Section.fault.menu.operation) {
return '区故解'; return '区故解';

View File

@ -1,78 +1,104 @@
<template> <template>
<div> <div>
<el-dialog class="beijing-01__systerm section-cmd-speed" :title="title" :visible.sync="show" width="800px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
<div style="padding: 10px 20px; border: 1px solid lightgray;"> class="beijing-01__systerm section-cmd-speed"
<span class="base-label">命令信息</span> :title="title"
<el-form label-position="center" size="mini"> :visible.sync="show"
<el-row> width="800px"
<el-col :span="6"> :before-close="doClose"
<el-form-item label="类型" label-width="40px"> :z-index="2000"
<el-select v-model="operation" size="small" disabled> :modal="false"
<el-option v-for="option in typeList" :key="option.code" :label="option.name" :close-on-click-modal="false"
:value="option.code"> >
</el-option> <div style="padding: 10px 20px; border: 1px solid lightgray;">
</el-select> <span class="base-label">命令信息</span>
</el-form-item> <el-form label-position="center" size="mini">
</el-col> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="车站名称" label-width="80px"> <el-form-item label="类型" label-width="40px">
<el-input v-model="stationName" size="small" disabled></el-input> <el-select v-model="operation" size="small" disabled>
</el-form-item> <el-option
</el-col> v-for="option in typeList"
<el-col :span="6"> :key="option.code"
<el-form-item :label="nameLabel" label-width="80px"> :label="option.name"
<el-input v-model="name" size="small" disabled></el-input> :value="option.code"
</el-form-item> />
</el-col> </el-select>
<el-col :span="6"> </el-form-item>
<el-form-item label="限速值" label-width="80px"> </el-col>
<el-select v-model="speed" :id="domIdChoose" size="small" :disabled="spdDisabled" <el-col :span="6">
@change="speedSelectChange"> <el-form-item label="车站名称" label-width="80px">
<el-option v-for="item in speedList" :key="item.value" :label="item.name" <el-input v-model="stationName" size="small" disabled />
:value="item.value"> </el-form-item>
</el-option> </el-col>
</el-select> <el-col :span="6">
</el-form-item> <el-form-item :label="nameLabel" label-width="80px">
</el-col> <el-input v-model="name" size="small" disabled />
</el-row> </el-form-item>
</el-form> </el-col>
</div> <el-col :span="6">
<el-table class="table" ref="table" :data="tableData" border style="width: 100%" size="mini" <el-form-item label="限速值" label-width="80px">
highlight-current-row height="200"> <el-select
<el-table-column prop="order" :width="50" label="序号"> :id="domIdChoose"
</el-table-column> v-model="speed"
<el-table-column prop="date" :width="160" label="时间"> size="small"
</el-table-column> :disabled="spdDisabled"
<el-table-column prop="context" :width="180" label="执行过程"> @change="speedSelectChange"
</el-table-column> >
<el-table-column prop="result" label="执行结果"> <el-option
</el-table-column> v-for="item in speedList"
</el-table> :key="item.value"
<span class="notice">{{message}}</span> :label="item.name"
<el-row class="button-group"> :value="item.value"
<el-col :span="2" :offset="2"> />
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span </el-select>
v-show="timeCountCommand>0">({{timeCountCommand}})</span></el-button> </el-form-item>
</el-col> </el-col>
<el-col :span="2" :offset="2"> </el-row>
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1 </el-form>
</el-button> </div>
</el-col> <el-table
<el-col :span="2" :offset="2"> ref="table"
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span class="table"
v-show="timeCountConfirm>0">({{timeCountConfirm}})</span></el-button> :data="tableData"
</el-col> border
<el-col :span="2" :offset="2"> style="width: 100%"
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button> size="mini"
</el-col> highlight-current-row
<el-col :span="2" :offset="2"> height="200"
<el-button :id="domIdClose" @click="close">关闭</el-button> >
</el-col> <el-table-column prop="order" :width="50" label="序号" />
</el-row> <el-table-column prop="date" :width="160" label="时间" />
</el-dialog> <el-table-column prop="context" :width="180" label="执行过程" />
<confirm-control-speed ref="confirmControlSpeed" @setOperate="getOperate"></confirm-control-speed> <el-table-column prop="result" label="执行结果" />
</div> </el-table>
<span class="notice">{{ message }}</span>
<el-row class="button-group">
<el-col :span="2" :offset="2">
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
v-show="timeCountCommand>0"
>({{ timeCountCommand }})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
v-show="timeCountConfirm>0"
>({{ timeCountConfirm }})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdClose" @click="close">关闭</el-button>
</el-col>
</el-row>
</el-dialog>
<confirm-control-speed ref="confirmControlSpeed" @setOperate="getOperate" />
</div>
</template> </template>
<script> <script>
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
@ -107,7 +133,7 @@ export default {
stationName: '', stationName: '',
name: '', name: '',
speed: '' speed: ''
} };
}, },
computed: { computed: {
nameLabel() { nameLabel() {
@ -117,14 +143,14 @@ export default {
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation || } else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation ||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) { this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
return '道岔名称'; return '道岔名称';
}else{ } else {
return ''; return '';
} }
}, },
speedList() { speedList() {
let list = [{ name: '不限速', value: '-1' }]; const list = [{ name: '不限速', value: '-1' }];
for (var i = 0; i * this.speedSpace <= this.maxSpeed; i++) { for (var i = 0; i * this.speedSpace <= this.maxSpeed; i++) {
let speed = String(i * this.speedSpace); const speed = String(i * this.speedSpace);
list.push({ name: speed, value: speed }); list.push({ name: speed, value: speed });
} }
return list; return list;
@ -134,8 +160,8 @@ export default {
{ code: OperationEvent.Section.setSpeed.menu.operation, name: '区段设置限速' }, { code: OperationEvent.Section.setSpeed.menu.operation, name: '区段设置限速' },
{ code: OperationEvent.Section.cancelSpeed.menu.operation, name: '区段取消限速' }, { code: OperationEvent.Section.cancelSpeed.menu.operation, name: '区段取消限速' },
{ code: OperationEvent.Switch.setSpeed.menu.operation, name: '区段设置限速' }, { code: OperationEvent.Switch.setSpeed.menu.operation, name: '区段设置限速' },
{ code: OperationEvent.Switch.cancelSpeed.menu.operation, name: '区段取消限速' }, { code: OperationEvent.Switch.cancelSpeed.menu.operation, name: '区段取消限速' }
] ];
}, },
title() { title() {
if (this.dialogShow) { if (this.dialogShow) {
@ -264,9 +290,9 @@ export default {
} }
}, },
isCancelSpeed() { isCancelSpeed() {
return this.operation == OperationEvent.Section.cancelSpeed.menu.operation return this.operation == OperationEvent.Section.cancelSpeed.menu.operation ||
|| this.operation == OperationEvent.Switch.cancelSpeed.menu.operation this.operation == OperationEvent.Switch.cancelSpeed.menu.operation;
}, }
}, },
watch: { watch: {
cmdDisabled: { cmdDisabled: {
@ -294,7 +320,7 @@ export default {
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
this.timer = setInterval(() => { this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) { if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) { if (this.timeCountCommand > 0) {
@ -310,7 +336,7 @@ export default {
this.timeCountConfirm = -1; this.timeCountConfirm = -1;
} }
} }
}, 1000) }, 1000);
}, },
beforeDestroy() { beforeDestroy() {
clearInterval(this.timer); clearInterval(this.timer);
@ -326,20 +352,20 @@ export default {
operate.operation == OperationEvent.Section.cancelSpeed.menu.operation) { operate.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
if (selected.type === '02') { if (selected.type === '02') {
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode); const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
if (section) { if (section) {
this.name += section.name this.name += section.name;
} }
} }
this.name += selected.name this.name += selected.name;
} }
} else if (operate.operation == OperationEvent.Switch.setSpeed.menu.operation) { } else if (operate.operation == OperationEvent.Switch.setSpeed.menu.operation) {
if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) { if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
this.name = selected.name this.name = selected.name;
} }
} }
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) { if (station) {
this.stationName = station.name; this.stationName = station.name;
} }
@ -373,17 +399,17 @@ export default {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
speedSelectChange(val) { speedSelectChange(val) {
let operate = { const operate = {
type: this.type, type: this.type,
val: val, val: val
} };
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) { if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/ /** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.choose.operation operate.operation = OperationEvent.Section.setSpeed.choose.operation;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) { } else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/ /** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.choose.operation operate.operation = OperationEvent.Switch.setSpeed.choose.operation;
} }
this.setMessage('请点击“下达”按钮,下达命令!'); this.setMessage('请点击“下达”按钮,下达命令!');
@ -392,12 +418,12 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 }); this.setButtonEnable({ step: 0 });
} }
}) });
}, },
command() { command() {
let operate = { const operate = {
type: this.type, type: this.type
} };
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) { if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/ /** 区段设置限速*/
@ -429,12 +455,12 @@ export default {
} }
}).catch(() => { }).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' }); this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
}) });
}, },
confirm1() { confirm1() {
let operate = { const operate = {
type: this.type, type: this.type
} };
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) { if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/ /** 区段设置限速*/
@ -464,17 +490,17 @@ export default {
} }
}).catch(() => { }).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' }); this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
}) });
}, },
confirm2() { confirm2() {
let operate = { const operate = {
over:true, over:true,
type: this.type, type: this.type,
val: this.speed, val: this.speed,
param: { param: {
speedLimitValue: `${this.speed}` speedLimitValue: `${this.speed}`
} }
} };
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) { if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/ /** 区段设置限速*/
@ -509,12 +535,12 @@ export default {
this.timeCountConfirm = -1; this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 }); this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' }); this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
}) });
}, },
stop() { stop() {
let operate = { const operate = {
type: this.type, type: this.type
} };
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) { if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/ /** 区段设置限速*/
@ -541,13 +567,13 @@ export default {
} }
}).catch(() => { }).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' }); this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
}) });
}, },
close() { close() {
let operate = { const operate = {
type: this.type, type: this.type,
operation: OperationEvent.Command.close.menu.operation, operation: OperationEvent.Command.close.menu.operation
} };
this.writeRecord({ order: ++this.order, date: now(), context: '点击关闭', result: '' }); this.writeRecord({ order: ++this.order, date: now(), context: '点击关闭', result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -581,8 +607,8 @@ export default {
elem[prop] = param[prop]; elem[prop] = param[prop];
} }
} }
}) });
} }
} }
} };
</script> </script>

View File

@ -333,13 +333,7 @@ export default {
// //
arrangementRoute() { arrangementRoute() {
commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then((data)=>{ commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then((data)=>{
const routes = []; this.$refs.routeSelection.doShow(data.operate, this.selected, this.getRouteList(this.selected));
this.routeList.forEach(elem => {
if (elem.startSignalCode === this.selected.code) {
routes.push(elem);
}
});
this.$refs.routeSelection.doShow(data.operate, this.selected, routes);
}); });
}, },
// //
@ -399,25 +393,13 @@ export default {
// //
humanControl() { humanControl() {
commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then((data)=>{ commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then((data)=>{
const routes = []; this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected));
this.routeList.forEach(elem => {
if (elem.startSignalCode === this.selected.code) {
routes.push(elem);
}
});
this.$refs.routeHandControl.doShow(data.operate, this.selected, routes);
}); });
}, },
// //
atsAutoControl() { atsAutoControl() {
commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then((data)=>{ commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then((data)=>{
const routes = []; this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected));
this.routeList.forEach(elem => {
if (elem.startSignalCode === this.selected.code) {
routes.push(elem);
}
});
this.$refs.routeHandControl.doShow(data.operate, this.selected, routes);
}); });
}, },
// //
@ -437,15 +419,19 @@ export default {
// //
detail() { detail() {
commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then((data)=>{ commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then((data)=>{
const routes = []; this.$refs.routeDetail.doShow(data.operate, this.selected, this.getRouteList(this.selected));
this.routeList.forEach(elem => {
if (elem.startSignalCode === this.selected.code) {
routes.push(elem);
}
});
this.$refs.routeDetail.doShow(data.operate, this.selected, routes);
}); });
}, },
//
getRouteList(selectType) {
const routes = [];
this.routeList.forEach(elem => {
if (elem.startSignalCode === selectType.code) {
routes.push(elem);
}
});
return routes;
},
passWordCommit(data) { passWordCommit(data) {
const operate = { const operate = {
operation: data.operation, operation: data.operation,

View File

@ -23,6 +23,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mouseCancelState } from './utils/menuItemStatus'; import { mouseCancelState } from './utils/menuItemStatus';
import {menuOperate, commitOperate} from './utils/menuOperate';
export default { export default {
name: 'SwitchMenu', name: 'SwitchMenu',
@ -237,167 +238,63 @@ export default {
}, },
// //
lock(selectType) { lock(selectType) {
const operate = { commitOperate(menuOperate.Switch.lock, {switchCode:selectType.code}, 3).then((data)=>{
start: true, }).catch(error=>{
over: true, this.$refs.noticeInfo.doShow({}, error.message);
operation: OperationEvent.Switch.lock.menu.operation,
param: {
switchCode: selectType.code
},
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate, error.message);
}); });
}, },
// //
unlock(selectType) { unlock(selectType) {
const operate = { commitOperate(menuOperate.Switch.unlock, {switchCode:selectType.code}, 0).then((data)=>{
start: true, this.$refs.switchControl.doShow(data.operate, selectType);
code: this.selected.code, }).catch(error=>{
operation: OperationEvent.Switch.unlock.menu.operation, this.$refs.noticeInfo.doShow({}, error.message);
param: {
switchCode: selectType.code
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, selectType);
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate, error.message);
}); });
}, },
// //
switchTurnoutForce(selectType) { switchTurnoutForce(selectType) {
const operate = { commitOperate(menuOperate.Switch.turnoutForce, {switchCode:selectType.code}, 0).then((data)=>{
start: true, this.$refs.switchControl.doShow(data.operate, selectType);
code: this.selected.code, }).catch(error=>{
operation: OperationEvent.Switch.turnoutForce.menu.operation, this.$refs.noticeInfo.doShow({}, error.message);
param:{
switchCode:selectType.code
}
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
}); });
}, },
// //
locate(selectType) { locate(selectType) {
const operate = { commitOperate(menuOperate.Switch.locate, {switchCode:selectType.code}, 3).then((data)=>{
start: true, }).catch(error=>{
over: true, this.$refs.noticeInfo.doShow({}, error.message);
operation: OperationEvent.Switch.locate.menu.operation,
param: {
switchCode: selectType.code
},
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate, error.message);
}); });
}, },
// //
reverse(selectType) { reverse(selectType) {
const operate = { commitOperate(menuOperate.Switch.reverse, {switchCode:selectType.code}, 3).then((data)=>{
start: true, }).catch(error=>{
over: true, this.$refs.noticeInfo.doShow({}, error.message);
operation: OperationEvent.Switch.reverse.menu.operation,
param: {
switchCode: selectType.code
},
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate, error.message);
}); });
}, },
// //
split() { split() {
const operate = { commitOperate(menuOperate.Switch.split, {switchCode:this.selected.code}, 0).then((data)=>{
start: true, this.$refs.switchControl.doShow(data.operate, this.selected);
code: this.selected.code,
operation: OperationEvent.Switch.split.menu.operation,
param: {
switchCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
}); });
}, },
// //
active() { active() {
const operate = { commitOperate(menuOperate.Switch.active, {switchCode:this.selected.code}, 0).then((data)=>{
start: true, this.$refs.switchControl.doShow(data.operate, this.selected);
code: this.selected.code,
operation: OperationEvent.Switch.active.menu.operation,
param: {
switchCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
}); });
}, },
// //
setSpeed() { setSpeed() {
const operate = { commitOperate(menuOperate.Switch.setSpeed, {switchCode:this.selected.code}, 0).then((data)=>{
start: true, this.$refs.speedLimitControl.doShow(data.operate, this.selected);
code: this.selected.code,
operation: OperationEvent.Switch.setSpeed.menu.operation,
param: {
switchCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.speedLimitControl.doShow(operate, this.selected);
}
}); });
}, },
// //
alxeEffective() { alxeEffective() {
const operate = { commitOperate(menuOperate.Switch.alxeEffective, {switchCode:this.selected.code}, 0).then((data)=>{
start: true, this.$refs.alxeEffective.doShow(data.operate, this.selected);
code: this.selected.code,
operation: OperationEvent.Switch.alxeEffective.menu.operation,
param: {
switchCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.alxeEffective.doShow(operate, this.selected);
}
}); });
}, },
undeveloped() { undeveloped() {

View File

@ -8,37 +8,31 @@ export const menuOperate = {
active:{ active:{
// 区段激活 // 区段激活
operation: OperationEvent.Section.active.menu.operation, operation: OperationEvent.Section.active.menu.operation,
param:['sectionCode'],
cmdType: CMD.Section.CMD_SECTION_ACTIVE cmdType: CMD.Section.CMD_SECTION_ACTIVE
}, },
alxeEffective:{ alxeEffective:{
// 确认计轴有效 // 确认计轴有效
operation: OperationEvent.Section.alxeEffective.menu.operation, operation: OperationEvent.Section.alxeEffective.menu.operation,
param:['sectionCode'],
cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
}, },
split:{ split:{
// 区段切除 // 区段切除
operation: OperationEvent.Section.split.menu.operation, operation: OperationEvent.Section.split.menu.operation,
param:['sectionCode'],
cmdType: CMD.Section.CMD_SECTION_CUT_OFF cmdType: CMD.Section.CMD_SECTION_CUT_OFF
}, },
setSpeed:{ setSpeed:{
// 设置速度 // 设置速度
operation: OperationEvent.Section.setSpeed.menu.operation, operation: OperationEvent.Section.setSpeed.menu.operation,
param:['sectionCode'],
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
}, },
axlePreReset:{ axlePreReset:{
// 区段计轴预复位 // 区段计轴预复位
operation: OperationEvent.Section.axlePreReset.menu.operation, operation: OperationEvent.Section.axlePreReset.menu.operation,
param:['sectionCode'],
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
}, },
fault:{ fault:{
// 区段故障解锁 // 区段故障解锁
operation: OperationEvent.Section.fault.menu.operation, operation: OperationEvent.Section.fault.menu.operation,
param:['sectionCode'],
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
} }
}, },
@ -92,6 +86,56 @@ export const menuOperate = {
// 查询进路状态 // 查询进路状态
operation: OperationEvent.Signal.detail.menu.operation operation: OperationEvent.Signal.detail.menu.operation
} }
},
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
},
turnoutForce:{
// 道岔强扳
operation: OperationEvent.Switch.turnoutForce.menu.operation
},
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
},
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
}
},
Stand:{
} }
}; };
@ -102,8 +146,8 @@ export function commitOperate(operate, paramList, over) {
param:{} param:{}
}; };
step.param = paramList; step.param = paramList;
// isOnce 0为首次操作1为中间操作2为最后操作3为直接一次性操作 // over 0为首次操作1为中间操作2为最后操作3为直接一次性操作
if (over != 0) { if (over != 0 && over != 3) {
delete step.start; delete step.start;
} }
if (over == 2 || over == 3) { if (over == 2 || over == 3) {