进路预览进路编辑增加 endButtonSignalCode
This commit is contained in:
parent
aedf08b85f
commit
6786dd92f4
@ -189,11 +189,15 @@ export default {
|
||||
},
|
||||
{
|
||||
title: this.$t('map.startingSignalName'),
|
||||
prop: 'startSignalCode'
|
||||
prop: 'startSignalName'
|
||||
},
|
||||
{
|
||||
title: this.$t('map.endingSignalName'),
|
||||
prop: 'endSignalCode'
|
||||
prop: 'endSignalName'
|
||||
},
|
||||
{
|
||||
title: '终端信号按钮',
|
||||
prop: 'endButtonSignalName'
|
||||
},
|
||||
{
|
||||
title: '延续保护',
|
||||
@ -305,7 +309,17 @@ export default {
|
||||
const list = data.list;
|
||||
if (list) {
|
||||
list.map(elem => {
|
||||
that.$convertSpecifiedField(elem, that.signalList, 'code', 'name', ['startSignalCode', 'endSignalCode']);
|
||||
that.signalList.forEach(item => {
|
||||
if (elem.startSignalCode === item.code) {
|
||||
elem.startSignalName = item.name;
|
||||
}
|
||||
if (elem.endSignalCode === item.code) {
|
||||
elem.endSignalName = item.name;
|
||||
}
|
||||
if (elem.endButtonSignalCode === item.code) {
|
||||
elem.endButtonSignalName = item.name;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -60,6 +60,20 @@
|
||||
@click="hover('endSignalCode')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="终端信号按钮" prop="endButtonSignalCode">
|
||||
<el-select v-model="addModel.endButtonSignalCode" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in signalList"
|
||||
:key="item.code"
|
||||
:label="item.name + ' (' + item.code+ ')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type=" field === 'endButtonSignalCode' ? 'danger' : 'primary'"
|
||||
@click="hover('endButtonSignalCode')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item :label="$t('map.greenOpen') + ':'" prop="greenOpen">
|
||||
<el-radio-group v-model="addModel.greenOpen">
|
||||
<el-radio :label="true">{{ $t('map.are') }}</el-radio>
|
||||
@ -186,6 +200,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getRouteNewList, getFlankProtectionList, putSetDraftMapRouteById, createRoute, queryOverunSectionList } from '@/api/jmap/mapdraft';
|
||||
import HostileData from './hostileData';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
// import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
@ -250,6 +265,7 @@ export default {
|
||||
turnBack: false, // 是否折返进路
|
||||
startSignalCode: '', // 始端信号机
|
||||
endSignalCode: '', // 终端信号机
|
||||
endButtonSignalCode: '',
|
||||
// greenOpen: true, // 是否开放绿灯
|
||||
aspect:'',
|
||||
routeSectionList: [], // 进路物理区段
|
||||
@ -324,7 +340,7 @@ export default {
|
||||
},
|
||||
routeData(val, old) {
|
||||
if (val) {
|
||||
this.addModel = val;
|
||||
this.addModel = deepAssign(this.addModel, val);
|
||||
this.addModel.routeSwitchList.forEach(item => {
|
||||
item.normal ? item.switchType = '定位' : item.switchType = '反位';
|
||||
});
|
||||
@ -522,6 +538,8 @@ export default {
|
||||
this.addModel.startSignalCode = selected.code;
|
||||
} else if (selected._type.toUpperCase() === 'Signal'.toUpperCase() && this.field.toUpperCase() === 'endSignalCode'.toUpperCase()) {
|
||||
this.addModel.endSignalCode = selected.code;
|
||||
} else if (selected._type.toUpperCase() === 'Signal'.toUpperCase() && this.field.toUpperCase() === 'endButtonSignalCode'.toUpperCase()) {
|
||||
this.addModel.endButtonSignalCode = selected.code;
|
||||
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'routeSectionList'.toUpperCase()) {
|
||||
const sectionIndex = this.addModel.routeSectionList.indexOf(selected.code);
|
||||
if ((selected.type === '01' || selected.type === '03') && sectionIndex === -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user