北京一号线道岔操作代码调整
This commit is contained in:
parent
cc21437843
commit
61d54b2209
@ -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 '区故解';
|
||||||
|
@ -1,7 +1,16 @@
|
|||||||
<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
|
||||||
|
class="beijing-01__systerm section-cmd-speed"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="800px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||||
<span class="base-label">命令信息</span>
|
<span class="base-label">命令信息</span>
|
||||||
<el-form label-position="center" size="mini">
|
<el-form label-position="center" size="mini">
|
||||||
@ -9,51 +18,67 @@
|
|||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="类型" label-width="40px">
|
<el-form-item label="类型" label-width="40px">
|
||||||
<el-select v-model="operation" size="small" disabled>
|
<el-select v-model="operation" size="small" disabled>
|
||||||
<el-option v-for="option in typeList" :key="option.code" :label="option.name"
|
<el-option
|
||||||
:value="option.code">
|
v-for="option in typeList"
|
||||||
</el-option>
|
:key="option.code"
|
||||||
|
:label="option.name"
|
||||||
|
:value="option.code"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="车站名称" label-width="80px">
|
<el-form-item label="车站名称" label-width="80px">
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item :label="nameLabel" label-width="80px">
|
<el-form-item :label="nameLabel" label-width="80px">
|
||||||
<el-input v-model="name" size="small" disabled></el-input>
|
<el-input v-model="name" size="small" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="限速值" label-width="80px">
|
<el-form-item label="限速值" label-width="80px">
|
||||||
<el-select v-model="speed" :id="domIdChoose" size="small" :disabled="spdDisabled"
|
<el-select
|
||||||
@change="speedSelectChange">
|
:id="domIdChoose"
|
||||||
<el-option v-for="item in speedList" :key="item.value" :label="item.name"
|
v-model="speed"
|
||||||
:value="item.value">
|
size="small"
|
||||||
</el-option>
|
:disabled="spdDisabled"
|
||||||
|
@change="speedSelectChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in speedList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<el-table class="table" ref="table" :data="tableData" border style="width: 100%" size="mini"
|
<el-table
|
||||||
highlight-current-row height="200">
|
ref="table"
|
||||||
<el-table-column prop="order" :width="50" label="序号">
|
class="table"
|
||||||
</el-table-column>
|
:data="tableData"
|
||||||
<el-table-column prop="date" :width="160" label="时间">
|
border
|
||||||
</el-table-column>
|
style="width: 100%"
|
||||||
<el-table-column prop="context" :width="180" label="执行过程">
|
size="mini"
|
||||||
</el-table-column>
|
highlight-current-row
|
||||||
<el-table-column prop="result" label="执行结果">
|
height="200"
|
||||||
</el-table-column>
|
>
|
||||||
|
<el-table-column prop="order" :width="50" label="序号" />
|
||||||
|
<el-table-column prop="date" :width="160" label="时间" />
|
||||||
|
<el-table-column prop="context" :width="180" label="执行过程" />
|
||||||
|
<el-table-column prop="result" label="执行结果" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<span class="notice">{{message}}</span>
|
<span class="notice">{{ message }}</span>
|
||||||
<el-row class="button-group">
|
<el-row class="button-group">
|
||||||
<el-col :span="2" :offset="2">
|
<el-col :span="2" :offset="2">
|
||||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
|
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
|
||||||
v-show="timeCountCommand>0">({{timeCountCommand}})</span></el-button>
|
v-show="timeCountCommand>0"
|
||||||
|
>({{ timeCountCommand }})</span></el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="2">
|
<el-col :span="2" :offset="2">
|
||||||
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
|
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
|
||||||
@ -61,7 +86,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="2">
|
<el-col :span="2" :offset="2">
|
||||||
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
|
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
|
||||||
v-show="timeCountConfirm>0">({{timeCountConfirm}})</span></el-button>
|
v-show="timeCountConfirm>0"
|
||||||
|
>({{ timeCountConfirm }})</span></el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="2">
|
<el-col :span="2" :offset="2">
|
||||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
|
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
|
||||||
@ -71,7 +97,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<confirm-control-speed ref="confirmControlSpeed" @setOperate="getOperate"></confirm-control-speed>
|
<confirm-control-speed ref="confirmControlSpeed" @setOperate="getOperate" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -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>
|
@ -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,14 +419,18 @@ 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)=>{
|
||||||
|
this.$refs.routeDetail.doShow(data.operate, this.selected, this.getRouteList(this.selected));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 获取进路列表
|
||||||
|
getRouteList(selectType) {
|
||||||
const routes = [];
|
const routes = [];
|
||||||
this.routeList.forEach(elem => {
|
this.routeList.forEach(elem => {
|
||||||
if (elem.startSignalCode === this.selected.code) {
|
if (elem.startSignalCode === selectType.code) {
|
||||||
routes.push(elem);
|
routes.push(elem);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.$refs.routeDetail.doShow(data.operate, this.selected, routes);
|
return routes;
|
||||||
});
|
|
||||||
},
|
},
|
||||||
passWordCommit(data) {
|
passWordCommit(data) {
|
||||||
const operate = {
|
const operate = {
|
||||||
|
@ -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() {
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user