Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
This commit is contained in:
commit
03843cf217
@ -56,43 +56,36 @@ export default {
|
||||
label: '区段故障解锁',
|
||||
handler: this.fault,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
// auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '区段激活',
|
||||
handler: this.active,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
// auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '区段切除',
|
||||
handler: this.split,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
// auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '区段计轴预复位',
|
||||
handler: this.axlePreReset,
|
||||
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
|
||||
// auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '区段封锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
// auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '区段解封',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
// auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '区段设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
// auth: { station: true, center: false }
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
@ -100,41 +93,25 @@ export default {
|
||||
label: '轨道激活',
|
||||
handler: this.active,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
// auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: '轨道切除',
|
||||
handler: this.split,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
// auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '确认计轴有效',
|
||||
handler: this.alxeEffective,
|
||||
cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
|
||||
// auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
// {
|
||||
// label: '确认计轴有效',
|
||||
// handler: this.alxeEffective,
|
||||
// cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
|
||||
// },
|
||||
{
|
||||
label: '设置临时限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
// auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
}
|
||||
// {
|
||||
// label: '查看站场设备状态',
|
||||
// handler: this.undeveloped,
|
||||
// disabledCallback: MenuDisabledState.Section.setSpeed,
|
||||
// auth: { station: false, center: true }
|
||||
// }
|
||||
]
|
||||
},
|
||||
menuTrain: [
|
||||
|
@ -81,15 +81,12 @@ export default {
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '确认计轴有效',
|
||||
handler: this.alxeEffective,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
// {
|
||||
// label: '确认计轴有效',
|
||||
// handler: this.alxeEffective,
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE,
|
||||
// auth: { station: false, center: true }
|
||||
// },
|
||||
{
|
||||
label: '设置临时限速',
|
||||
handler: this.setSpeed,
|
||||
|
419
src/jmapNew/theme/chengdu_01/menus/dialog/sectionCmdControl.vue
Normal file
419
src/jmapNew/theme/chengdu_01/menus/dialog/sectionCmdControl.vue
Normal file
@ -0,0 +1,419 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-dialogDrag class="fuzhou-01__systerm section-cmd-control" :title="title" :visible.sync="show" width="840px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
|
||||
<el-form label-position="center" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="this.$t('global.status')" label-width="40px">
|
||||
<el-select v-model="operation" size="small" disabled>
|
||||
<el-option v-for="option in typeList" :key="option.code" :label="option.name" :value="option.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="this.$t('menu.stationName')" label-width="80px">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="this.$t('menu.sectionName')" label-width="100px">
|
||||
<el-input v-model="sectionName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table :data="tempData" border style="width: 100%" size="mini" highlight-current-row height="200">
|
||||
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
|
||||
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
|
||||
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
|
||||
<el-table-column prop="result" :label="this.$t('menu.executionResult')" />
|
||||
</el-table>
|
||||
<span class="notice">{{ message }}</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="2" :offset="3">
|
||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">
|
||||
{{ $t('menu.release') }}
|
||||
<span v-show="timeCountCommand>0">({{ timeCountCommand }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">
|
||||
{{ $t('menu.secondConfirm') }}
|
||||
<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">{{ $t('menu.suspend') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { now } from '@/utils/date';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'SectionCmdControl',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
backOperate: '',
|
||||
selected: '',
|
||||
order: 0,
|
||||
row: null,
|
||||
timer: null,
|
||||
operation: '',
|
||||
cmdDisabled: [true, true, true],
|
||||
stpDisabled: true,
|
||||
tempData: [],
|
||||
message: '',
|
||||
timeCountCommand: -1,
|
||||
timeCountConfirm: -1,
|
||||
stationName: '',
|
||||
sectionName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
typeList() {
|
||||
return [
|
||||
{ code: OperationEvent.Section.unlock.menu.operation, name: this.$t('menu.menuSection.sectionUnblock') },
|
||||
{ code: OperationEvent.Section.fault.menu.operation, name: this.$t('menu.menuSection.sectionFaultUnlock') },
|
||||
{ code: OperationEvent.Section.axlePreReset.menu.operation, name: this.$t('menu.menuSection.sectionAxisPreReset') }
|
||||
];
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCommand() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
return OperationEvent.Section.unlock.order.domId; // 区段解封
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
return OperationEvent.Section.fault.order.domId; // 区段故障解锁
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
return OperationEvent.Section.axlePreReset.order.domId; // 区段计轴预复位
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm1() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
return OperationEvent.Section.unlock.confirm1.domId; // 区段解封
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
return OperationEvent.Section.fault.confirm1.domId; // 区段故障解锁
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
return OperationEvent.Section.axlePreReset.confirm1.domId; // 区段计轴预复位
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm2() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
/** 区段解封*/
|
||||
return OperationEvent.Section.unlock.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
/** 区段故障解锁*/
|
||||
return OperationEvent.Section.fault.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
/** 区段计轴预复位*/
|
||||
return OperationEvent.Section.axlePreReset.confirm2.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdStop() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
/** 区段解封*/
|
||||
return OperationEvent.Section.unlock.stop.domId;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
/** 区段故障解锁*/
|
||||
return OperationEvent.Section.fault.stop.domId;
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
/** 区段计轴预复位*/
|
||||
return OperationEvent.Section.axlePreReset.stop.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdClose() {
|
||||
if (this.dialogShow) {
|
||||
return OperationEvent.Command.close.menu.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
return this.$t('menu.menuSection.sectionUnblock');
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
return this.$t('menu.menuSection.sectionFaultUnlock');
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
return this.$t('menu.menuSection.sectionAxisPreReset');
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cmdDisabled: {
|
||||
handler(val, oldVal) {
|
||||
this.stpDisabled = true;
|
||||
val.forEach((elem, index) => {
|
||||
// 在确定1之前的操作才可以终止
|
||||
if (elem == false && index >= 1 && index <= 2) {
|
||||
this.stpDisabled = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
this.timer = setInterval(() => {
|
||||
if (!this.$store.state.menuOperation.break) {
|
||||
if (this.timeCountCommand > 0) {
|
||||
this.timeCountCommand--;
|
||||
} else if (this.timeCountCommand == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountCommand = -1;
|
||||
}
|
||||
if (this.timeCountConfirm > 0) {
|
||||
this.timeCountConfirm--;
|
||||
} else if (this.timeCountConfirm == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountConfirm = -1;
|
||||
}
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
if (!this.dialogShow) {
|
||||
this.sectionName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
if (selected.type === '02') {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
if (section) {
|
||||
this.sectionName += section.name;
|
||||
}
|
||||
}
|
||||
this.sectionName += selected.name;
|
||||
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
this.selected = selected;
|
||||
}
|
||||
|
||||
this.order = 0;
|
||||
this.operation = operate.operation || '';
|
||||
this.dialogShow = true;
|
||||
this.tempData = [];
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.cmdDisabled = [false, true, true];
|
||||
}
|
||||
this.stpDisabled = true;
|
||||
this.setMessage(this.$t('tip.releaseTip'));
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
command() {
|
||||
if (this.operation == OperationEvent.Section.fault.menu.operation ||
|
||||
this.operation == OperationEvent.Section.unlock.menu.operation ||
|
||||
this.operation == OperationEvent.Section.cancelSpeed.menu.operation ||
|
||||
this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
/** 第一步不带弹框处理*/
|
||||
this.commandNoPopUp();
|
||||
} else {
|
||||
/** 第一步带弹框处理*/
|
||||
this.commandHasPopUp();
|
||||
}
|
||||
},
|
||||
commandHasPopUp() {
|
||||
},
|
||||
commandNoPopUp() {
|
||||
const operate = {};
|
||||
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
/** 区段解封*/
|
||||
operate.operation = OperationEvent.Section.unlock.order.operation;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
/** 区段故障解锁*/
|
||||
operate.operation = OperationEvent.Section.fault.order.operation;
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
/** 区段计轴预复位*/
|
||||
operate.operation = OperationEvent.Section.axlePreReset.order.operation;
|
||||
}
|
||||
|
||||
this.setMessage(this.$t('tip.firstConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
confirm1() {
|
||||
const operate = {
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
/** 区段解封*/
|
||||
operate.operation = OperationEvent.Section.unlock.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
/** 区段故障解锁*/
|
||||
operate.operation = OperationEvent.Section.fault.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
/** 区段计轴预复位*/
|
||||
operate.operation = OperationEvent.Section.axlePreReset.confirm1.operation;
|
||||
}
|
||||
|
||||
this.setMessage(this.$t('tip.secondConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = 10;
|
||||
this.setButtonEnable({ step: 2 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
confirm2() {
|
||||
const operate = {};
|
||||
|
||||
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) {
|
||||
/** 区段故障解锁*/
|
||||
operate.operation = OperationEvent.Section.fault.confirm2.operation;
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_FAULT_UNLOCK;
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
/** 区段计轴预复位*/
|
||||
operate.operation = OperationEvent.Section.axlePreReset.confirm2.operation;
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_AXIS_PRE_RESET;
|
||||
}
|
||||
|
||||
this.setMessage('');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
stop() {
|
||||
const operate = {};
|
||||
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
/** 区段解封*/
|
||||
operate.operation = OperationEvent.Section.unlock.stop.operation;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
/** 区段故障解锁*/
|
||||
operate.operation = OperationEvent.Section.fault.stop.operation;
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
/** 区段计轴预复位*/
|
||||
operate.operation = OperationEvent.Section.axlePreReset.stop.operation;
|
||||
}
|
||||
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
close() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
setButtonEnable(param) {
|
||||
this.cmdDisabled = [true, true, true];
|
||||
if (param && param.step >= 0) {
|
||||
this.cmdDisabled[param.step] = false;
|
||||
}
|
||||
},
|
||||
setMessage(message) {
|
||||
this.message = message;
|
||||
},
|
||||
writeRecord(param) {
|
||||
this.tempData.push(param);
|
||||
},
|
||||
editRecord(param) {
|
||||
this.tempData.forEach(elem => {
|
||||
if (elem.order == param.order) {
|
||||
for (var prop in param) {
|
||||
elem[prop] = param[prop];
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
167
src/jmapNew/theme/chengdu_01/menus/dialog/sectionControl.vue
Normal file
167
src/jmapNew/theme/chengdu_01/menus/dialog/sectionControl.vue
Normal file
@ -0,0 +1,167 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="fuzhou-01__systerm section-control" :title="title" :visible.sync="show" width="300px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row class="header">
|
||||
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||
<el-col :span="11" :offset="2"><span>{{ $t('menu.section') }}</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-input v-model="sectionName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'SectionControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operation: '',
|
||||
stationName: '',
|
||||
sectionName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Section.lock.menu.operation) {
|
||||
return this.$t('menu.menuSection.sectionBlockade');
|
||||
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||
return this.$t('menu.menuSection.orbitalSectionResection');
|
||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||
return this.$t('menu.menuSection.orbitalSectionActive');
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
if (!this.dialogShow) {
|
||||
this.sectionName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
if (selected.type === '02') {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
if (section) {
|
||||
this.sectionName += section.name;
|
||||
}
|
||||
}
|
||||
this.sectionName += selected.name;
|
||||
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.operation = operate.operation || '';
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.Section.lock.menu.operation) {
|
||||
this.lock(); // 区段封锁
|
||||
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||
this.split(); // 轨道区段切除
|
||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||
this.active(); // 轨道区段激活
|
||||
}
|
||||
},
|
||||
// 区段单锁
|
||||
lock() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Section.lock.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 轨道区段切除
|
||||
split() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Section.split.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 轨道区段激活
|
||||
active() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Section.active.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
sendCommand(operate) {
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
218
src/jmapNew/theme/chengdu_01/menus/dialog/switchControl.vue
Normal file
218
src/jmapNew/theme/chengdu_01/menus/dialog/switchControl.vue
Normal file
@ -0,0 +1,218 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="chengdou-01__system switch-control" :title="title" :visible.sync="show" width="300px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row class="header">
|
||||
<el-col :span="11"><span style="color:#000;">车站名称</span></el-col>
|
||||
<el-col :span="11" :offset="2"><span style="color:#000;">道岔</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-input v-model="switchName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'SwitchControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
operation: '',
|
||||
stationName: '',
|
||||
switchName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Switch.locate.menu.operation) {
|
||||
return '单操到定位';
|
||||
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
||||
return '单操到反位';
|
||||
} else if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
||||
return '道岔单锁';
|
||||
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
return '道岔解锁';
|
||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
||||
return '道岔封锁';
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
return '区故解';
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
return '道岔解封';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.switchName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||
this.switchName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.Switch.locate.menu.operation) {
|
||||
this.locate(); // 单操到正位
|
||||
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
||||
this.reverse(); // 单操到反位
|
||||
} else if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
||||
this.lock(); // 道岔单锁
|
||||
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
this.unlock(); // 道岔解锁
|
||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
||||
this.block(); // 道岔封锁
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
this.unblock(); // 道岔解封
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
this.fault();
|
||||
}
|
||||
},
|
||||
// 道岔单锁
|
||||
lock() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.lock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 道岔解锁
|
||||
unlock() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 道岔封锁
|
||||
block() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.block.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 道岔解封
|
||||
unblock() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.unblock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 单操到正位
|
||||
locate() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.locate.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_TURN
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 单操到反位
|
||||
reverse() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_TURN
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 区故解
|
||||
fault() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.fault.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
sendCommand(operate) { // 发送指令
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
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>
|
@ -5,7 +5,7 @@
|
||||
<template v-show="isShowBar">
|
||||
<menu-bar ref="menuBar" :selected="selected" />
|
||||
</template>
|
||||
<menu-request ref="menuRequest" />
|
||||
<!-- <menu-request ref="menuRequest" /> -->
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" />
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuRequest from './menuRequest';
|
||||
// import MenuRequest from './menuRequest';
|
||||
import MenuCancel from './menuCancel';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
@ -40,7 +40,7 @@ export default {
|
||||
name: 'Menus',
|
||||
components: {
|
||||
MenuBar,
|
||||
MenuRequest,
|
||||
// MenuRequest,
|
||||
MenuCancel,
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
@ -148,6 +148,7 @@ export default {
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left:25px;
|
||||
}
|
||||
|
||||
.chengdou-01__system .el-dialog .el-dialog__headerbtn {
|
||||
|
@ -2,6 +2,8 @@
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<section-control ref="sectionControl" />
|
||||
<section-cmd-control ref="sectionCmdControl" />
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
</div>
|
||||
</template>
|
||||
@ -10,6 +12,8 @@
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import SpeedLimitControl from './dialog/speedLimitControl';
|
||||
import SectionControl from './dialog/sectionControl';
|
||||
import SectionCmdControl from './dialog/sectionCmdControl';
|
||||
import { mapGetters } from 'vuex';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
@ -21,7 +25,9 @@ export default {
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo,
|
||||
SpeedLimitControl
|
||||
SpeedLimitControl,
|
||||
SectionControl,
|
||||
SectionCmdControl
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -41,12 +47,12 @@ export default {
|
||||
{
|
||||
label: '轨道封锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
},
|
||||
{
|
||||
label: '轨道封锁解除',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: '速度控制',
|
||||
@ -146,6 +152,7 @@ export default {
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT,
|
||||
@ -167,6 +174,7 @@ export default {
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT,
|
||||
@ -204,16 +212,19 @@ export default {
|
||||
lock() {
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.lock.menu.operation,
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
},
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({valid}) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
|
||||
this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation: { code: OperationEvent.Section.lock.menu.operation, name: '轨道封锁'}});
|
||||
this.$refs.sectionControl.doShow(step, this.selected);
|
||||
// this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation: { code: OperationEvent.Section.lock.menu.operation, name: '轨道封锁'}});
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -224,12 +235,14 @@ export default {
|
||||
operation: OperationEvent.Section.unlock.menu.operation,
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
},
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({valid}) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
|
||||
this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation: { code: OperationEvent.Section.unlock.menu.operation, name: '轨道封锁解除'}});
|
||||
this.$refs.sectionCmdControl.doShow(step, this.selected);
|
||||
// this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation: { code: OperationEvent.Section.unlock.menu.operation, name: '轨道封锁解除'}});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -192,6 +192,9 @@ export default {
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
]),
|
||||
...mapGetters('map', [
|
||||
'routeList'
|
||||
]),
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
}
|
||||
@ -237,11 +240,13 @@ export default {
|
||||
signalClose() {
|
||||
const step = {
|
||||
start: true,
|
||||
over: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
},
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -256,6 +261,7 @@ export default {
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
|
||||
operation: OperationEvent.Signal.stoppage.menu.operation,
|
||||
@ -278,6 +284,7 @@ export default {
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
|
||||
operation: OperationEvent.Signal.cancelStoppage.menu.operation,
|
||||
@ -300,17 +307,19 @@ export default {
|
||||
arrangementRoute() {
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
},
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true});
|
||||
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.arrangementRoute.menu.operation, name: '始端/终端选择',cmdType:CMD.Signal.CMD_SIGNAL_SET_ROUTE}});
|
||||
// this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.arrangementRoute.menu.operation, name: '始端/终端选择',cmdType:CMD.Signal.CMD_SIGNAL_SET_ROUTE}});
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
@ -320,16 +329,18 @@ export default {
|
||||
guide() {
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.guide.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
},
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation: { code: OperationEvent.Signal.guide.menu.operation, name: '引导信号',cmdType:CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE}});
|
||||
// this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation: { code: OperationEvent.Signal.guide.menu.operation, name: '引导信号',cmdType:CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE}});
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -337,16 +348,19 @@ export default {
|
||||
cancelTrainRoute() {
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
},
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation: { code: OperationEvent.Signal.cancelTrainRoute.menu.operation, name: '取消进路',cmdType:CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE}});
|
||||
// this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation: { code: OperationEvent.Signal.cancelTrainRoute.menu.operation, name: '取消进路',cmdType:CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE}});
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -354,16 +368,18 @@ export default {
|
||||
lock() {
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.lock.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
},
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.lock.menu.operation, name: '终端信号机封锁',cmdType:CMD.Signal.CMD_SIGNAL_BLOCK}});
|
||||
// this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.lock.menu.operation, name: '终端信号机封锁',cmdType:CMD.Signal.CMD_SIGNAL_BLOCK}});
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
@ -373,50 +389,85 @@ export default {
|
||||
unlock() {
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.unlock.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
},
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.unlock.menu.operation, name: '终端信号机解封',cmdType:CMD.Signal.CMD_SIGNAL_UNBLOCK}});
|
||||
// this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.unlock.menu.operation, name: '终端信号机解封',cmdType:CMD.Signal.CMD_SIGNAL_UNBLOCK}});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
const routes = [];
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === this.selected.code) {
|
||||
// routes.push(elem);
|
||||
if (elem.atsControl == '1') {
|
||||
routes.push(elem.code);
|
||||
}
|
||||
}
|
||||
});
|
||||
if (routes.length <= 0) {
|
||||
this.$refs.noticeInfo.doShow({}, ['所选的进路没有一个是人工的']);
|
||||
return false;
|
||||
}
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
signalCode: `${this.selected.code}`,
|
||||
routeCodeList:routes
|
||||
},
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: '关闭自动进路',cmdType:CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING});
|
||||
// this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: '关闭自动进路',cmdType:CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
const routes = [];
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === this.selected.code) {
|
||||
// routes.push(elem);
|
||||
if (elem.atsControl == '0') {
|
||||
routes.push(elem.code);
|
||||
}
|
||||
}
|
||||
});
|
||||
if (routes.length <= 0) {
|
||||
this.$refs.noticeInfo.doShow({}, ['所选的进路没有一个是自动的']);
|
||||
return false;
|
||||
}
|
||||
debugger;
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
signalCode: `${this.selected.code}`,
|
||||
routeCodeList:routes
|
||||
},
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.atsAutoControl.menu.operation, name: '开放自动进路',cmdType:CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING}});
|
||||
// this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.atsAutoControl.menu.operation, name: '开放自动进路',cmdType:CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING}});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -139,11 +139,12 @@ export default {
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.stoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
stationStandCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
@ -160,11 +161,12 @@ export default {
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
stationStandCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
|
||||
@ -185,7 +187,7 @@ export default {
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
stationStandCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
@ -203,7 +205,7 @@ export default {
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
stationStandCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
@ -218,11 +220,14 @@ export default {
|
||||
setStopTime() {
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
stationStandCode: `${this.selected.code}`
|
||||
},
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
|
@ -2,6 +2,7 @@
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<switch-control ref="switchControl" />
|
||||
<create-device-label ref="createDeviceLabel" />
|
||||
</div>
|
||||
</template>
|
||||
@ -10,6 +11,7 @@
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import CreateDeviceLabel from './dialog/createDeviceLabel';
|
||||
import SwitchControl from './dialog/switchControl';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import { mapGetters } from 'vuex';
|
||||
@ -22,7 +24,8 @@ export default {
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo,
|
||||
CreateDeviceLabel
|
||||
CreateDeviceLabel,
|
||||
SwitchControl
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
@ -39,7 +42,28 @@ export default {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [],
|
||||
Local: [
|
||||
{
|
||||
label: '道岔定位',
|
||||
handler: this.locate,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
},
|
||||
{
|
||||
label: '道岔反位',
|
||||
handler: this.reverse,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
},
|
||||
{
|
||||
label: '道岔单锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
},
|
||||
{
|
||||
label: '道岔单解',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '道岔定位',
|
||||
@ -61,33 +85,33 @@ export default {
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '设备标签',
|
||||
handler: '',
|
||||
cmdType: '',
|
||||
children: [
|
||||
{
|
||||
label: '创建设备标签',
|
||||
handler: this.createDeviceLabel,
|
||||
cmdType: ''
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '模拟',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: '选择设备',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: '帮助',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
}
|
||||
// {
|
||||
// label: '设备标签',
|
||||
// handler: '',
|
||||
// cmdType: '',
|
||||
// children: [
|
||||
// {
|
||||
// label: '创建设备标签',
|
||||
// handler: this.createDeviceLabel,
|
||||
// cmdType: ''
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// label: '模拟',
|
||||
// handler: '',
|
||||
// cmdType: ''
|
||||
// },
|
||||
// {
|
||||
// label: '选择设备',
|
||||
// handler: '',
|
||||
// cmdType: ''
|
||||
// },
|
||||
// {
|
||||
// label: '帮助',
|
||||
// handler: '',
|
||||
// cmdType: ''
|
||||
// }
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
@ -155,6 +179,7 @@ export default {
|
||||
setStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
over:true,
|
||||
operation: OperationEvent.Switch.stoppage.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_STOPPAGE,
|
||||
param: {
|
||||
@ -177,6 +202,7 @@ export default {
|
||||
cancelStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
over:true,
|
||||
operation: OperationEvent.Switch.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_CANCEL_STOPPAGE,
|
||||
param: {
|
||||
@ -207,8 +233,8 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Switch.lock.menu.operation, name: '道岔单锁'}} );
|
||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||
// this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Switch.lock.menu.operation, name: '道岔单锁'}} );
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -224,8 +250,8 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Switch.unlock.menu.operation, name: '道岔单解'}});
|
||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||
// this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Switch.unlock.menu.operation, name: '道岔单解'}});
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -241,8 +267,8 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Switch.locate.menu.operation, name: '道岔定位',cmdType:CMD.Switch.CMD_SWITCH_TURN}});
|
||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||
// this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Switch.locate.menu.operation, name: '道岔定位',cmdType:CMD.Switch.CMD_SWITCH_TURN}});
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -258,8 +284,8 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Switch.reverse.menu.operation, name: '道岔反位',cmdType:CMD.Switch.CMD_SWITCH_TURN}});
|
||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||
// this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Switch.reverse.menu.operation, name: '道岔反位',cmdType:CMD.Switch.CMD_SWITCH_TURN}});
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -56,12 +56,6 @@ export default {
|
||||
auth: { station: false, center: true },
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
},
|
||||
// {
|
||||
// label: '设置临时限速',
|
||||
// handler: this.setSpeed,
|
||||
// auth: { station: false, center: true },
|
||||
// cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
// },
|
||||
{
|
||||
label: '属性',
|
||||
handler: this.detail,
|
||||
@ -232,23 +226,6 @@ export default {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 设置速度
|
||||
setSpeed() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.setSpeed.menu.operation,
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
|
@ -246,7 +246,6 @@ export default {
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Switch.stoppage.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_STOPPAGE,
|
||||
param: {
|
||||
@ -267,7 +266,6 @@ export default {
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Switch.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_CANCEL_STOPPAGE,
|
||||
param: {
|
||||
@ -288,7 +286,6 @@ export default {
|
||||
lock() {
|
||||
const step = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Switch.lock.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
@ -305,7 +302,6 @@ export default {
|
||||
unlock() {
|
||||
const step = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
@ -322,7 +318,6 @@ export default {
|
||||
block() {
|
||||
const step = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Switch.block.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
@ -339,7 +334,6 @@ export default {
|
||||
unblock() {
|
||||
const step = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Switch.unblock.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
@ -356,7 +350,6 @@ export default {
|
||||
switchTurnoutForce() {
|
||||
const step = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Switch.turnoutForce.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
@ -373,7 +366,6 @@ export default {
|
||||
switchTurnout() {
|
||||
const step = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Switch.turnout.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
@ -393,7 +385,6 @@ export default {
|
||||
fault() {
|
||||
const step = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Switch.fault.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
@ -410,7 +401,6 @@ export default {
|
||||
axlePreReset() {
|
||||
const step = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Switch.axlePreReset.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
@ -427,7 +417,6 @@ export default {
|
||||
split() {
|
||||
const step = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Switch.split.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
@ -444,7 +433,6 @@ export default {
|
||||
active() {
|
||||
const step = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Switch.active.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
@ -461,7 +449,6 @@ export default {
|
||||
setSpeed() {
|
||||
const step = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Switch.setSpeed.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
@ -478,7 +465,6 @@ export default {
|
||||
cancelSpeed() {
|
||||
const step = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Switch.cancelSpeed.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_CANCEL_SPEED,
|
||||
param: {
|
||||
|
@ -1,18 +1,8 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="fuzhou-01__systerm switch-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-dialog v-dialogDrag class="chengdou-03__systerm switch-control" :title="title" :visible.sync="show" width="300px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row class="header">
|
||||
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||
<el-col :span="11" :offset="2"><span>{{ $t('menu.switch') }}</span></el-col>
|
||||
<el-col :span="11"><span>车站名称</span></el-col>
|
||||
<el-col :span="11" :offset="2"><span>道岔</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
@ -22,22 +12,12 @@
|
||||
<el-input v-model="switchName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="activeShow" style="margin-top: 10px;">
|
||||
<el-col :span="11">
|
||||
<el-radio v-model="radio" label="1" :disabled="radio == 2" style="display: block; text-align: center;">
|
||||
{{ $t('menu.activation') }}</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio v-model="radio" label="2" :disabled="radio == 1" style="display: block; text-align: center;">
|
||||
{{ $t('menu.resection') }}</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
@ -47,6 +27,7 @@
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
@ -55,15 +36,17 @@ export default {
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
operation: '',
|
||||
stationName: '',
|
||||
switchName: '',
|
||||
radio: 1,
|
||||
activeShow: false
|
||||
switchName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -77,18 +60,20 @@ export default {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
||||
return this.$t('menu.menuSwitch.switchLock');
|
||||
if (this.operation == OperationEvent.Switch.locate.menu.operation) {
|
||||
return '单操到定位';
|
||||
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
||||
return '单操到反位';
|
||||
} else if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
||||
return '道岔单锁';
|
||||
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
return '道岔解锁';
|
||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
||||
return this.$t('menu.menuSwitch.switchBlockade');
|
||||
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
|
||||
return this.$t('menu.menuSwitch.switchTurnout');
|
||||
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
|
||||
return this.$t('menu.menuSwitch.switchForcedPull');
|
||||
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
||||
return this.$t('menu.menuSwitch.sectionResection');
|
||||
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
||||
return this.$t('menu.menuSwitch.sectionActive');
|
||||
return '道岔封锁';
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
return '区故解';
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
return '道岔解封';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
@ -100,6 +85,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.switchName = '';
|
||||
this.stationName = '';
|
||||
@ -110,15 +96,7 @@ export default {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.operation = operate.operation;
|
||||
if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
||||
this.activeShow = true;
|
||||
this.radio = '2';
|
||||
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
||||
this.activeShow = true;
|
||||
this.radio = '1';
|
||||
}
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
@ -131,24 +109,20 @@ export default {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
||||
/** 道岔单锁*/
|
||||
this.lock();
|
||||
if (this.operation == OperationEvent.Switch.locate.menu.operation) {
|
||||
this.locate(); // 单操到正位
|
||||
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
||||
this.reverse(); // 单操到反位
|
||||
} else if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
||||
this.lock(); // 道岔单锁
|
||||
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
this.unlock(); // 道岔解锁
|
||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
||||
/** 道岔封锁*/
|
||||
this.block();
|
||||
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
|
||||
/** 道岔转动*/
|
||||
this.turnout(this.operation);
|
||||
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
|
||||
/** 道岔强扳*/
|
||||
this.turnoutForce();
|
||||
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
||||
/** 区段激活*/
|
||||
this.split();
|
||||
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
||||
/** 区段激活*/
|
||||
this.active();
|
||||
this.block(); // 道岔封锁
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
this.unblock(); // 道岔解封
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
this.fault();
|
||||
}
|
||||
},
|
||||
// 道岔单锁
|
||||
@ -158,18 +132,16 @@ export default {
|
||||
operation: OperationEvent.Switch.lock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 道岔解锁
|
||||
unlock() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 道岔封锁
|
||||
block() {
|
||||
@ -178,92 +150,52 @@ export default {
|
||||
operation: OperationEvent.Switch.block.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 道岔转动
|
||||
turnout(operation) {
|
||||
// 道岔解封
|
||||
unblock() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.turnout.menu.operation,
|
||||
operation: OperationEvent.Switch.unblock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 单操到正位
|
||||
locate() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.locate.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_TURN
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 道岔强扮
|
||||
turnoutForce() {
|
||||
// 单操到反位
|
||||
reverse() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.turnoutForce.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_FORCE_TURN
|
||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_TURN
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 区段切除
|
||||
split() {
|
||||
// 区故解
|
||||
fault() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.split.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
operation: OperationEvent.Switch.fault.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 区段激活
|
||||
active() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Switch.active.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
};
|
||||
sendCommand(operate) { // 发送指令
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
@ -273,7 +205,7 @@ export default {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
|
@ -43,81 +43,56 @@ export default {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
// {
|
||||
// label: '区段故障解锁',
|
||||
// handler: this.fault,
|
||||
// cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
// },
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionFaultUnlock'),
|
||||
handler: this.fault,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionResection'),
|
||||
handler: this.split,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionActive'),
|
||||
handler: this.active,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionAxisPreReset'),
|
||||
handler: this.axlePreReset,
|
||||
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionBlockade'),
|
||||
label: '区段封锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionUnblock'),
|
||||
label: '区段解封',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionSetSpeedLimit'),
|
||||
label: '区段设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionCancelSpeedLimit'),
|
||||
label: '区段取消限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
// {
|
||||
// label: '区段故障解锁',
|
||||
// handler: this.fault,
|
||||
// cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
// },
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionFaultUnlock'),
|
||||
handler: this.fault,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionResection'),
|
||||
handler: this.split,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionActive'),
|
||||
handler: this.active,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionBlockade'),
|
||||
label: '区段封锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionUnblock'),
|
||||
label: '区段解封',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionSetSpeedLimit'),
|
||||
label: '区段设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.sectionCancelSpeedLimit'),
|
||||
label: '区段取消限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
|
||||
}
|
||||
@ -125,12 +100,12 @@ export default {
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: this.$t('menu.menuSection.setFault'),
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.cancelFault'),
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT
|
||||
}
|
||||
@ -243,57 +218,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 切除
|
||||
split() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.split.menu.operation,
|
||||
param: {
|
||||
Section_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionControl.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 激活
|
||||
active() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.active.menu.operation,
|
||||
param: {
|
||||
Section_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionControl.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段计轴预复位
|
||||
axlePreReset() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.axlePreReset.menu.operation,
|
||||
param: {
|
||||
Section_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionCmdControl.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段解锁
|
||||
lock() {
|
||||
const step = {
|
||||
|
@ -43,148 +43,78 @@ export default {
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchLock'),
|
||||
label: '单操到定位',
|
||||
handler: this.locate,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
},
|
||||
{
|
||||
label: '单操到反位',
|
||||
handler: this.reverse,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
},
|
||||
{
|
||||
label: '道岔单锁',
|
||||
handler: this.lock,
|
||||
auth: { station: true, center: false },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchUnlock'),
|
||||
label: '道岔解封',
|
||||
handler: this.unlock,
|
||||
auth: { station: true, center: false },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchSectionBlockade'),
|
||||
label: '道岔封锁',
|
||||
handler: this.block,
|
||||
auth: { station: true, center: false },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_BLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchSectionUnblock'),
|
||||
label: '道岔解封',
|
||||
handler: this.unblock,
|
||||
auth: { station: true, center: false },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchTurnout'),
|
||||
handler: this.switchTurnout,
|
||||
auth: { station: true, center: false },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_TURN
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchSectionFaultUnlock'),
|
||||
handler: this.fault,
|
||||
auth: { station: true, center: false },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchSectionAxisPreReset'),
|
||||
handler: this.axlePreReset,
|
||||
auth: { station: true, center: false },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.sectionResection'),
|
||||
handler: this.split,
|
||||
auth: { station: true, center: false },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.sectionActive'),
|
||||
handler: this.active,
|
||||
auth: { station: true, center: false },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchSectionSetSpeedLimit'),
|
||||
handler: this.setSpeed,
|
||||
auth: { station: true, center: false },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchSectionCancelSpeedLimit'),
|
||||
handler: this.cancelSpeed,
|
||||
auth: { station: true, center: false },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchLock'),
|
||||
label: '单操到定位',
|
||||
handler: this.locate,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
},
|
||||
{
|
||||
label: '单操到反位',
|
||||
handler: this.reverse,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
},
|
||||
{
|
||||
label: '道岔单锁',
|
||||
handler: this.lock,
|
||||
auth: { station: false, center: true },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchUnlock'),
|
||||
label: '道岔解封',
|
||||
handler: this.unlock,
|
||||
auth: { station: false, center: true },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchSectionBlockade'),
|
||||
label: '道岔封锁',
|
||||
handler: this.block,
|
||||
auth: { station: false, center: true },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_BLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchSectionUnblock'),
|
||||
label: '道岔解封',
|
||||
handler: this.unblock,
|
||||
auth: { station: false, center: true },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchTurnout'),
|
||||
handler: this.switchTurnout,
|
||||
auth: { station: false, center: true },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_TURN
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchSectionFaultUnlock'),
|
||||
handler: this.fault,
|
||||
auth: { station: false, center: true },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.sectionResection'),
|
||||
handler: this.split,
|
||||
auth: { station: true, center: true },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.sectionActive'),
|
||||
handler: this.active,
|
||||
auth: { station: true, center: true },
|
||||
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchSectionSetSpeedLimit'),
|
||||
handler: this.setSpeed,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.switchSectionCancelSpeedLimit'),
|
||||
handler: this.cancelSpeed,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
|
||||
}
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.setFault'),
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
auth: {
|
||||
|
||||
},
|
||||
cmdType:CMD.Switch.CMD_SWITCH_ADD_FAULT
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.cancelFault'),
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
auth: {
|
||||
|
||||
},
|
||||
cmdType:CMD.Switch.CMD_SWITCH_REMOVE_FAULT
|
||||
}
|
||||
]
|
||||
@ -218,17 +148,11 @@ export default {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce];
|
||||
}
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
|
||||
// this.menu = MenuContextHandler.covert(this.menu);
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
@ -352,144 +276,35 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔强扳
|
||||
switchTurnoutForce() {
|
||||
const step = {
|
||||
// 单操到定位
|
||||
locate() {
|
||||
const operate = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Switch.turnoutForce.menu.operation,
|
||||
operation: OperationEvent.Switch.locate.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(step, this.selected);
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔转动
|
||||
switchTurnout() {
|
||||
const step = {
|
||||
// 单操到反位
|
||||
reverse() {
|
||||
const operate = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Switch.turnout.menu.operation,
|
||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
};
|
||||
|
||||
if (step.operation) {
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 道岔故障解锁
|
||||
fault() {
|
||||
const step = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Switch.fault.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchCmdControl.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔计轴预复位
|
||||
axlePreReset() {
|
||||
const step = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Switch.axlePreReset.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchCmdControl.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段切除
|
||||
split() {
|
||||
const step = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Switch.split.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段激活
|
||||
active() {
|
||||
const step = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Switch.active.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchControl.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔设置速度
|
||||
setSpeed() {
|
||||
const step = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Switch.setSpeed.menu.operation,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.speedCmdControl.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔取消速度
|
||||
cancelSpeed() {
|
||||
const step = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.Switch.cancelSpeed.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_CANCEL_SPEED,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
const tempData = response.data;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.speedCmdControl.doShow(step, this.selected, tempData);
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user