This commit is contained in:
zyy 2020-03-05 14:33:20 +08:00
commit 2df1803ca5
4 changed files with 36 additions and 68 deletions

View File

@ -113,13 +113,13 @@ export default {
},
{
label: '开放自动进路',
handler: this.atsAutoControl,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
handler: this.singalPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
},
{
label: '关闭自动进路',
handler: this.humanControl,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
handler: this.singalCancelPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
},
{
label: '终端信号封锁',
@ -404,69 +404,37 @@ export default {
}
});
},
//
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 = {
//
singalPassModel() {
const operate = {
start: true,
over:true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.humanControl.menu.operation,
code: this.selected.code,
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
param: {
signalCode: `${this.selected.code}`,
routeCodeList:routes
},
// cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
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: '关闭自动进路',cmdType:CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING});
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.setAutoInterlock.menu.operation, name: '开放自动进路', cmdType:CMD.Signal.CMD_SIGNAL_SET_CI_AUTO}});
}
});
},
//
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;
}
const step = {
//
singalCancelPassModel() {
const operate = {
start: true,
// over:true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
code: this.selected.code,
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
param: {
signalCode: `${this.selected.code}`,
routeCodeList:routes
},
// cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
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.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.cancelAutoInterlock.menu.operation, name: '关闭自动进路', cmdType:CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO}});
}
});
},

View File

@ -101,8 +101,8 @@ export const translate = {
{ key: 'overlapSwitchCode', tHeader: '延续保护道岔ID', formatter: (val) => { return val || ''; } },
{ key: 'overlapSwitchLocateType', tHeader: '延续保护道岔位置类型', formatter: (val) => { return val || ''; } },
{ key: 'turnBackSectionCode', tHeader: '折返轨ID', formatter: (val) => { return val || ''; } },
{ key: 'arc', tHeader: '是否自动追踪/联锁自动触发', formatter: (val) => { return val || false; } },
{ key: 'flt', tHeader: '是否车队/联锁自动进路', formatter: (val) => { return val || false; } },
{ key: 'ciControl', tHeader: '是否自动追踪/联锁自动触发', formatter: (val) => { return val || false; } },
{ key: 'setFleetMode', tHeader: '是否车队/联锁自动进路', formatter: (val) => { return val || false; } },
{ key: 'delayReleaseTime', tHeader: '延时解锁时间', formatter: (val) => { return val || 0; } }
]
},

View File

@ -10,14 +10,14 @@
<el-option v-for="item in stationList" :key="item.code" :label="item.name" :value="item.code" />
</el-select>
</el-form-item>
<el-form-item :label="$t('map.routeArc') + ':'" prop="arc">
<el-radio-group v-model="addModel.arc">
<el-form-item :label="$t('map.routeArc') + ':'" prop="ciControl">
<el-radio-group v-model="addModel.ciControl">
<el-radio :label="true">{{ $t('map.are') }}</el-radio>
<el-radio :label="false">{{ $t('map.deny') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('map.routeFlt') + ':'" prop="flt">
<el-radio-group v-model="addModel.flt">
<el-form-item :label="$t('map.routeFlt') + ':'" prop="setFleetMode">
<el-radio-group v-model="addModel.setFleetMode">
<el-radio :label="true">{{ $t('map.are') }}</el-radio>
<el-radio :label="false">{{ $t('map.deny') }}</el-radio>
</el-radio-group>
@ -313,8 +313,8 @@ export default {
code: '',
name: '', //
stationCode: '', //
arc: false, // /
flt: false, // /
ciControl: false, // /
setFleetMode: false, // /
delayReleaseTime: '', //
turnBack: false, //
startSignalCode: '', //

View File

@ -10,14 +10,14 @@
<el-option v-for="item in interBlockStationList" :key="item.code" :label="item.name" :value="item.code" />
</el-select>
</el-form-item>
<el-form-item :label="$t('map.routeArc') + ':'" prop="arc">
<el-radio-group v-model="addModel.arc">
<el-form-item :label="$t('map.routeArc') + ':'" prop="ciControl">
<el-radio-group v-model="addModel.ciControl">
<el-radio :label="true">{{ $t('map.are') }}</el-radio>
<el-radio :label="false">{{ $t('map.deny') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('map.routeFlt') + ':'" prop="flt">
<el-radio-group v-model="addModel.flt">
<el-form-item :label="$t('map.routeFlt') + ':'" prop="setFleetMode">
<el-radio-group v-model="addModel.setFleetMode">
<el-radio :label="true">{{ $t('map.are') }}</el-radio>
<el-radio :label="false">{{ $t('map.deny') }}</el-radio>
</el-radio-group>
@ -250,8 +250,8 @@ export default {
code: '',
name: '', //
stationCode: '', //
arc: false, // /
flt: false, // /
ciControl: false, // /
setFleetMode: false, // /
lockFirst:false, //
delayReleaseTime: '', //
turnBack: false, //