佛山有轨电车 区段道岔操作代码调整
This commit is contained in:
parent
09a51635f5
commit
3d6f5a2537
@ -1,427 +0,0 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag :z-index="2000" class="ningbo-01__systerm alxe-effective" :title="title" :visible.sync="show" width="420px" :before-close="doClose" :modal="false" :close-on-click-modal="false">
|
||||
<div style="padding: 10px 20px;border: 1px solid lightgray;">
|
||||
<span class="base-label">准备</span>
|
||||
<div style="margin-top: -10px">
|
||||
<el-row type="flex" justify="left">
|
||||
<el-col :span="9">车站</el-col>
|
||||
<el-col :span="9">轨道/计轴</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="left">
|
||||
<el-col :span="9">
|
||||
<el-input v-model="model.stationName" :type="type" size="mini" :disabled="true" />
|
||||
</el-col>
|
||||
<el-col :span="9">
|
||||
<el-input v-model="model.sectionName" :type="type" size="mini" :disabled="true" />
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm1" size="mini" :disabled="type==='password'" @click="commitOnce">确认</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 10px 20px;border: 1px solid lightgray;margin-top: 10px">
|
||||
<span class="base-label">确认</span>
|
||||
<div style="margin-top: -10px">
|
||||
<el-row type="flex" justify="left">
|
||||
<el-col :span="9">车站</el-col>
|
||||
<el-col :span="9">轨道/计轴</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="left">
|
||||
<el-col :span="9">
|
||||
<el-select
|
||||
:id="domIdChoose1"
|
||||
v-model="model.confirmStationName"
|
||||
filterable
|
||||
size="mini"
|
||||
:disabled="type==='text'"
|
||||
@change="stationSelectChange"
|
||||
>
|
||||
<el-option v-for="(option,index) in filterStationList" :key="index" :label="option.name" :value="option.name" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="9">
|
||||
<el-select
|
||||
:id="domIdChoose2"
|
||||
v-model="model.confirmSectionName"
|
||||
filterable
|
||||
size="mini"
|
||||
:disabled="type==='text'"
|
||||
@change="sectionSelectChange"
|
||||
>
|
||||
<el-option v-for="(option,index) in randomSectionList" :key="index" :label="option.name" :value="option.name" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button
|
||||
:id="domIdConfirm2"
|
||||
size="mini"
|
||||
:loading="loading"
|
||||
:disabled="type==='text'"
|
||||
@click="commit"
|
||||
>确认</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<el-row type="flex" justify="left" style="margin-top:20px;margin-bottom: 10px;">
|
||||
<el-col :span="6" :offset="1">操作倒计时</el-col>
|
||||
<el-col :span="16">
|
||||
<el-input v-model="model.time" size="mini" :readonly="true" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :offset="1">状态</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :offset="1" :span="23">
|
||||
<el-input v-model="model.status" type="textarea" :rows="2" placeholder />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="botton-group" style="margin-top:20px">
|
||||
<el-col :span="4" :offset="10">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<popup-alarm ref="popupAlarm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import PopupAlarm from './childDialog/popupAlarm';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'AlxeEffective',
|
||||
components: {
|
||||
NoticeInfo,
|
||||
PopupAlarm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
type: 'text',
|
||||
timeout: 1000,
|
||||
timenum: 30,
|
||||
stepNum: 0,
|
||||
task: null,
|
||||
model: {
|
||||
stationName: '',
|
||||
sectionName: '',
|
||||
confirmStationName: '',
|
||||
confirmSectionName: '',
|
||||
status: '',
|
||||
time: 0
|
||||
},
|
||||
selected: null,
|
||||
operate: null,
|
||||
operation: '',
|
||||
randomSectionList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', ['stationList', 'sectionList']),
|
||||
filterStationList() {
|
||||
const list = [];
|
||||
if (this.stationList) {
|
||||
this.stationList.forEach(elem => {
|
||||
if (
|
||||
list.findIndex(it => {
|
||||
return it.name == elem.name;
|
||||
}) < 0
|
||||
) {
|
||||
list.push({ name: elem.name });
|
||||
}
|
||||
});
|
||||
}
|
||||
return list;
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdConfirm1() {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Section.alxeEffective.confirm1.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Switch.alxeEffective.confirm1.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm2() {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Section.alxeEffective.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Switch.alxeEffective.confirm2.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdChoose1() {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Section.alxeEffective.choose1.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Switch.alxeEffective.choose1.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdChoose2() {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Section.alxeEffective.choose2.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Switch.alxeEffective.choose2.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
if ( this.operation == OperationEvent.Section.alxeEffective.menu.operation || this.operation == OperationEvent.Switch.alxeEffective.menu.operation ) {
|
||||
return '确认计轴恢复工作';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'model.sectionName': function(name) {
|
||||
const index = Math.floor(Math.random(1) * 5);
|
||||
for (var i = 0; i < 5; i++) {
|
||||
if (i == index) {
|
||||
this.randomSectionList.push({ name });
|
||||
} else {
|
||||
const section = this.sectionList[
|
||||
Math.floor(Math.random(1) * this.sectionList.length)
|
||||
];
|
||||
if (section.type != '02') {
|
||||
if (
|
||||
this.randomSectionList.findIndex(it => {
|
||||
return it.name == section.name;
|
||||
}) < 0
|
||||
) {
|
||||
this.randomSectionList.push({ name: section.name });
|
||||
} else {
|
||||
i--;
|
||||
}
|
||||
} else {
|
||||
i--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
stopTask() {
|
||||
if (this.task) {
|
||||
clearInterval(this.task);
|
||||
this.task = null;
|
||||
}
|
||||
|
||||
if (this.stepNum < 3) {
|
||||
this.$store.dispatch('training/backSteps', this.stepNum);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.model.name = '';
|
||||
this.model.time = '';
|
||||
this.type = 'text';
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.status = '';
|
||||
this.model.stationName = '';
|
||||
this.model.sectionName = '';
|
||||
this.model.confirmStationName = '';
|
||||
this.model.confirmSectionName = '';
|
||||
if (selected) {
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
if (selected.isSwitchSection) {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
if (section) {
|
||||
this.model.sectionName = section.name;
|
||||
}
|
||||
} else {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
if (section) {
|
||||
this.model.sectionName = section.name;
|
||||
this.model.sectionName = `${section.name}-${selected.name}`;
|
||||
} else {
|
||||
this.model.sectionName = `${selected.name}`;
|
||||
}
|
||||
}
|
||||
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.switchSectionCode);
|
||||
if (section) {
|
||||
this.model.sectionName = section.name;
|
||||
}
|
||||
}
|
||||
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.model.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.stepNum = 0;
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
this.stopTask();
|
||||
this.$nextTick(function() {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
waitSelectEvent() {
|
||||
if (!this.$store.state.menuOperation.break) {
|
||||
this.model.time -= 1;
|
||||
if (this.model.time <= 0) {
|
||||
this.stopTask();
|
||||
}
|
||||
}
|
||||
},
|
||||
commitOnce() {
|
||||
this.stepNum = 1;
|
||||
const operate = {
|
||||
operation: ''
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.alxeEffective.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Switch.alxeEffective.confirm1.operation;
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.type = 'password';
|
||||
this.model.time = this.timenum;
|
||||
this.task = setInterval(this.waitSelectEvent, this.timeout);
|
||||
}
|
||||
});
|
||||
},
|
||||
stationSelectChange() {
|
||||
if (this.model.confirmStationName === this.model.stationName) {
|
||||
this.stepNum = 2;
|
||||
} else {
|
||||
this.model.time = 0;
|
||||
}
|
||||
|
||||
const operate = {
|
||||
operation: ''
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.alxeEffective.choose1.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Switch.alxeEffective.choose1.operation;
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
});
|
||||
},
|
||||
sectionSelectChange() {
|
||||
if (this.model.confirmSectionName === this.model.sectionName) {
|
||||
this.stepNum = 2;
|
||||
} else {
|
||||
this.model.time = 0;
|
||||
}
|
||||
|
||||
const operate = {
|
||||
operation: ''
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.alxeEffective.choose2.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Switch.alxeEffective.choose2.operation;
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', {
|
||||
break: true
|
||||
});
|
||||
});
|
||||
},
|
||||
/** 确认计轴恢复工作*/
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: '',
|
||||
cmdType: ''
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.alxeEffective.confirm2.operation;
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_COMFIRMATION_AXLE;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Switch.alxeEffective.confirm2.operation;
|
||||
operate.cmdType = CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE;
|
||||
}
|
||||
|
||||
this.model.status = '';
|
||||
if (this.model.stationName == this.model.confirmStationName && this.model.sectionName == this.model.confirmSectionName) {
|
||||
this.stepNum = 3;
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.type = 'text';
|
||||
this.stopTask();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.popupAlarm.doShow(
|
||||
Object.assign(this.operate, {val: operate.val}), [`集中站 ${this.model.stationName} 区段 ${this.model.sectionName}报告恢复计轴有效`]
|
||||
);
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
} else {
|
||||
if (this.model.stationName != this.model.confirmStationName) {
|
||||
this.model.status = '车站选择错误';
|
||||
} else if (
|
||||
this.model.sectionName != this.model.confirmSectionName
|
||||
) {
|
||||
this.model.status = '区段选择错误';
|
||||
}
|
||||
}
|
||||
},
|
||||
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>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.alxe-effective .context {
|
||||
height: 80px !important;
|
||||
}
|
||||
</style>
|
@ -1,89 +0,0 @@
|
||||
<template>
|
||||
<el-dialog class="ningbo-01__systerm popup-alarm" :title="title" :visible.sync="show" width="500px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<el-row>
|
||||
<el-col :offset="2">
|
||||
<span v-for="(message, index) in messages" :key="index">{{message}}</span><br>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="8">
|
||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'Popup-Alarm',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
messages: [],
|
||||
operate: null,
|
||||
operation: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '弹出式告警';
|
||||
},
|
||||
domIdSure() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, messages) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.dialogShow = true;
|
||||
this.messages = messages || [];
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
// 确认计轴有效
|
||||
this.alxeEffective();
|
||||
}
|
||||
|
||||
},
|
||||
alxeEffective() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.alarm.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.popup-alarm .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -22,7 +22,7 @@
|
||||
<el-input v-model="sectionName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="isShow" style="margin-top: 10px;">
|
||||
<el-row style="margin-top: 10px;">
|
||||
<el-col :span="11">
|
||||
<el-radio v-model="radio" label="1" :disabled="radio == 2" style="display: block; text-align: center;">
|
||||
激活</el-radio>
|
||||
@ -61,7 +61,6 @@ export default {
|
||||
loading: false,
|
||||
selected: null,
|
||||
operation: '',
|
||||
isShow: false,
|
||||
stationName: '',
|
||||
sectionName: '',
|
||||
radio: ''
|
||||
@ -78,9 +77,7 @@ export default {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Section.lock.menu.operation) {
|
||||
return '区段封锁';
|
||||
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||
if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||
return '区段控制';
|
||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||
return '区段控制';
|
||||
@ -114,13 +111,10 @@ export default {
|
||||
}
|
||||
}
|
||||
this.operation = operate.operation || '';
|
||||
this.isShow = false;
|
||||
if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||
this.radio = '2';
|
||||
this.isShow = true;
|
||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||
this.radio = '1';
|
||||
this.isShow = true;
|
||||
}
|
||||
}
|
||||
this.dialogShow = true;
|
||||
@ -135,10 +129,7 @@ export default {
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.Section.lock.menu.operation) {
|
||||
/** 区段封锁*/
|
||||
this.lock();
|
||||
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||
if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||
/** 轨道区段切除*/
|
||||
this.split();
|
||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||
@ -146,16 +137,6 @@ export default {
|
||||
this.active();
|
||||
}
|
||||
},
|
||||
// 区段封锁
|
||||
lock() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: this.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
};
|
||||
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 轨道区段切除
|
||||
split() {
|
||||
const operate = {
|
||||
|
@ -101,9 +101,7 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Section.unlock.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
return '解除封锁';
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
return '区故解';
|
||||
}
|
||||
return '';
|
||||
@ -156,9 +154,7 @@ export default {
|
||||
val: this.messageText2
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.unlock.choose.operation;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.fault.choose.operation;
|
||||
}
|
||||
|
||||
@ -176,9 +172,7 @@ export default {
|
||||
operation: ''
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.unlock.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.fault.confirm1.operation;
|
||||
}
|
||||
|
||||
@ -201,10 +195,7 @@ export default {
|
||||
cmdType: ''
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.unlock.confirm2.operation;
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_UNBLOCK;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.fault.confirm2.operation;
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_FAULT_UNLOCK;
|
||||
}
|
||||
@ -226,9 +217,7 @@ export default {
|
||||
operation: ''
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.unlock.confirm.operation;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.fault.confirm.operation;
|
||||
}
|
||||
|
||||
|
@ -22,16 +22,6 @@
|
||||
<el-input v-model="switchName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="isActive" style="margin-top: 10px;">
|
||||
<el-col :span="11">
|
||||
<el-radio v-model="activeRadio" label="1" :disabled="activeRadio == 2" style="display: block; text-align: center;">
|
||||
激活</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio v-model="activeRadio" label="2" :disabled="activeRadio == 1" style="display: block; text-align: center;">
|
||||
切除</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="isLock" style="margin-top: 10px;">
|
||||
<el-col :span="11">
|
||||
<el-radio v-model="lockRadio" label="1" style="display: block; text-align: center;">
|
||||
@ -86,7 +76,6 @@ export default {
|
||||
switchName: '',
|
||||
isLock: false,
|
||||
isTurnBlock: false,
|
||||
isActive: false,
|
||||
turnRadio: '1',
|
||||
lockRadio: '1',
|
||||
activeRadio: '1'
|
||||
@ -140,7 +129,6 @@ export default {
|
||||
this.operation = operate.operation;
|
||||
this.isLock = false;
|
||||
this.isTurnBlock = false;
|
||||
this.isActive = false;
|
||||
if (this.operation == OperationEvent.Switch.locate.menu.operation) {
|
||||
this.isTurnBlock = true;
|
||||
this.turnRadio = '1';
|
||||
@ -149,12 +137,6 @@ export default {
|
||||
this.turnRadio = '2';
|
||||
} else if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
||||
this.isLock = true;
|
||||
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
||||
this.isActive = true;
|
||||
this.activeRadio = '2';
|
||||
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
||||
this.isActive = true;
|
||||
this.activeRadio = '1';
|
||||
}
|
||||
}
|
||||
this.dialogShow = true;
|
||||
@ -181,12 +163,6 @@ export default {
|
||||
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
||||
/** 道岔反位*/
|
||||
this.reverse();
|
||||
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
||||
/** 区段切除*/
|
||||
this.split();
|
||||
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
||||
/** 区段激活*/
|
||||
this.active();
|
||||
}
|
||||
},
|
||||
// 道岔单锁
|
||||
@ -229,24 +205,6 @@ export default {
|
||||
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 区段切除
|
||||
split() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.split.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 区段激活
|
||||
active() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.active.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
|
@ -4,7 +4,6 @@
|
||||
<section-control ref="sectionControl" />
|
||||
<section-un-lock ref="sectionUnLock" />
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<alxe-effective ref="alxeEffective" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
</div>
|
||||
</template>
|
||||
@ -14,7 +13,6 @@ import PopMenu from '@/components/PopMenu';
|
||||
import SectionControl from './dialog/sectionControl';
|
||||
import SectionUnLock from './dialog/sectionUnLock';
|
||||
import SpeedLimitControl from './dialog/speedLimitControl';
|
||||
import AlxeEffective from './dialog/alxeEffective';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
@ -29,7 +27,6 @@ export default {
|
||||
SectionControl,
|
||||
SectionUnLock,
|
||||
SpeedLimitControl,
|
||||
AlxeEffective,
|
||||
NoticeInfo
|
||||
},
|
||||
props: {
|
||||
@ -59,16 +56,6 @@ export default {
|
||||
label: '区段切除跟踪',
|
||||
handler: this.split,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
},
|
||||
{
|
||||
label: '区段封锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
},
|
||||
{
|
||||
label: '区段解封',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
@ -81,17 +68,12 @@ export default {
|
||||
label: '区段跟踪切除',
|
||||
handler: this.split,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
},
|
||||
{
|
||||
label: '确认计轴有效',
|
||||
handler: this.alxeEffective,
|
||||
cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
|
||||
},
|
||||
{
|
||||
label: '设置临时限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
}
|
||||
// {
|
||||
// label: '设置临时限速',
|
||||
// handler: this.setSpeed,
|
||||
// cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
// }
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
@ -205,23 +187,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 确认计轴有效
|
||||
alxeEffective() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Section.alxeEffective.menu.operation,
|
||||
param: {
|
||||
sectionCode: 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);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段激活
|
||||
active() {
|
||||
const operate = {
|
||||
@ -238,58 +203,24 @@ export default {
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段封锁
|
||||
lock() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Section.lock.menu.operation,
|
||||
param: {
|
||||
sectionCode: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段解锁
|
||||
unlock() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Section.unlock.menu.operation,
|
||||
param: {
|
||||
sectionCode: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionUnLock.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置速度
|
||||
setSpeed() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Section.setSpeed.menu.operation,
|
||||
param: {
|
||||
sectionCode: 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);
|
||||
}
|
||||
});
|
||||
}
|
||||
// // 设置速度
|
||||
// setSpeed() {
|
||||
// const operate = {
|
||||
// start: true,
|
||||
// code: this.selected.code,
|
||||
// operation: OperationEvent.Section.setSpeed.menu.operation,
|
||||
// param: {
|
||||
// sectionCode: 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);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -4,7 +4,6 @@
|
||||
<switch-control ref="switchControl" />
|
||||
<switch-un-lock ref="switchUnLock" />
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<alxe-effective ref="alxeEffective" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
</div>
|
||||
</template>
|
||||
@ -14,7 +13,6 @@ import PopMenu from '@/components/PopMenu';
|
||||
import SwitchControl from './dialog/switchControl';
|
||||
import SwitchUnLock from './dialog/switchUnLock';
|
||||
import SpeedLimitControl from './dialog/speedLimitControl';
|
||||
import AlxeEffective from './dialog/alxeEffective';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
@ -30,7 +28,6 @@ export default {
|
||||
SwitchControl,
|
||||
SwitchUnLock,
|
||||
SpeedLimitControl,
|
||||
AlxeEffective,
|
||||
NoticeInfo
|
||||
},
|
||||
props: {
|
||||
@ -47,12 +44,12 @@ export default {
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '定操',
|
||||
label: '道岔总定',
|
||||
handler: this.locate,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN
|
||||
},
|
||||
{
|
||||
label: '反操',
|
||||
label: '道岔总反',
|
||||
handler: this.reverse,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN
|
||||
},
|
||||
@ -67,7 +64,7 @@ export default {
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '道岔封锁',
|
||||
label: '道岔封闭',
|
||||
handler: this.block,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
||||
},
|
||||
@ -76,52 +73,14 @@ export default {
|
||||
handler: this.unblock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
}
|
||||
// 道岔强板
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '定操',
|
||||
handler: this.locate,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN
|
||||
},
|
||||
{
|
||||
label: '反操',
|
||||
handler: this.reverse,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '区段激活',
|
||||
handler: this.active,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
},
|
||||
{
|
||||
label: '区段切除',
|
||||
handler: this.split,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '确认计轴有效',
|
||||
handler: this.alxeEffective,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
|
||||
},
|
||||
{
|
||||
label: '设置临时限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '查看公里标',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
}
|
||||
// {
|
||||
// label: '设置临时限速',
|
||||
// handler: this.setSpeed,
|
||||
// cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
// },
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
@ -329,74 +288,23 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段切除
|
||||
split() {
|
||||
const operate = {
|
||||
start: true,
|
||||
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() {
|
||||
const operate = {
|
||||
start: true,
|
||||
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() {
|
||||
const operate = {
|
||||
start: true,
|
||||
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() {
|
||||
const operate = {
|
||||
start: true,
|
||||
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);
|
||||
}
|
||||
});
|
||||
},
|
||||
// setSpeed() {
|
||||
// const operate = {
|
||||
// start: true,
|
||||
// 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);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
|
@ -22,6 +22,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 {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
@ -229,172 +230,62 @@ export default {
|
||||
},
|
||||
// 单操到定位
|
||||
locate() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.locate.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);
|
||||
}
|
||||
commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 单操到反位
|
||||
reverse() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.reverse.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);
|
||||
}
|
||||
commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 道岔单锁
|
||||
lock() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.lock.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);
|
||||
}
|
||||
commitOperate(menuOperate.Switch.lock, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 道岔解锁
|
||||
unlock() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.unlock.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.switchUnLock.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.Switch.unlock, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchUnLock.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 道岔封锁
|
||||
block() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.block.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);
|
||||
}
|
||||
commitOperate(menuOperate.Switch.block, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 道岔解封
|
||||
unblock() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.unblock.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.switchUnLock.doShow(operate, this.selected);
|
||||
}
|
||||
commitOperate(menuOperate.Switch.unblock, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchUnLock.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 区段切除
|
||||
split() {
|
||||
const operate = {
|
||||
start: true,
|
||||
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);
|
||||
}
|
||||
commitOperate(menuOperate.Switch.split, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 区段激活
|
||||
active() {
|
||||
const operate = {
|
||||
start: true,
|
||||
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);
|
||||
}
|
||||
commitOperate(menuOperate.Switch.active, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.switchControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 设置临时限速
|
||||
setSpeed() {
|
||||
const operate = {
|
||||
start: true,
|
||||
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);
|
||||
}
|
||||
commitOperate(menuOperate.Switch.setSpeed, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.speedLimitControl.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
// 确认计轴有效
|
||||
alxeEffective() {
|
||||
const operate = {
|
||||
start: true,
|
||||
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);
|
||||
}
|
||||
commitOperate(menuOperate.Switch.alxeEffective, {switchCode:this.selected.code}, 0).then((data)=>{
|
||||
this.$refs.alxeEffective.doShow(data.operate, this.selected);
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
|
@ -113,53 +113,58 @@ export const menuOperate = {
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
}
|
||||
},
|
||||
// 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
|
||||
// }
|
||||
|
||||
// },
|
||||
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
|
||||
},
|
||||
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:{
|
||||
// 设置扣车
|
||||
|
Loading…
Reference in New Issue
Block a user