区段增加方向运行端点
This commit is contained in:
parent
5ebb0139ec
commit
2d4a196dc8
@ -57,6 +57,7 @@ class Model {
|
||||
this.logicLengthList = [];
|
||||
this.relCrossSection = '';
|
||||
this.srCode = '';
|
||||
this.endForFlipRunDir = 'NON';
|
||||
}
|
||||
SignalModel() {
|
||||
this._type = 'Signal';
|
||||
|
@ -107,6 +107,11 @@ export default {
|
||||
{ code: 'DEPOT', name: '联段线' },
|
||||
{ code: 'PARKING', name: '库线' }
|
||||
],
|
||||
endForFlipRunDirList: [
|
||||
{ value: 'LEFT', label: '左' },
|
||||
{ value: 'RIGHT', label: '右' },
|
||||
{ value: 'NON', label: '无' }
|
||||
],
|
||||
editModel: getModel('Section'),
|
||||
oldPoint: [], // 区段未修改前 坐标
|
||||
field: '',
|
||||
@ -148,7 +153,8 @@ export default {
|
||||
{ prop: 'roadType', label: '线路类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.sectionRoadTypeList, clearable: true, isHidden: !this.isSwitchSectionType || !this.isCrossSectionType, deviceChange: this.roadTypeChange },
|
||||
{ prop: 'leftSectionCode', label: this.$t('map.leftAssociatedSection'), type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.switchAndPhySicalSectionList, hover: this.hover, buttonType: 'leftSection', buttonShowType: this.isLeftSectionButtonShow, isHidden: !this.hasAssociatedSection }, // 左关联区段
|
||||
{ prop: 'rightSectionCode', label: this.$t('map.rightAssociatedSection'), type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.switchAndPhySicalSectionList, hover: this.hover, buttonType: 'rightSection', buttonShowType: this.isRightSectionButtonShow, isHidden: !this.hasAssociatedSection }, // 右关联区段
|
||||
{ prop: 'parentCode', label: this.$t('map.associatedSection'), type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: this.isCrossSectionType, options: this.sectionList, isHidden: !this.isParentCode }, // 所属物理/道岔区段code
|
||||
{ prop: 'endForFlipRunDir', label: '方向运行端点:', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.endForFlipRunDirList, isHidden: !this.hasAssociatedSection },
|
||||
{ prop: 'parentCode', label: this.$t('map.associatedSection'), type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: this.isCrossSectionType, options: this.sectionList, isHidden: !this.isParentCode }, // 所属物理/道岔区段code
|
||||
{ prop: 'sepTypeLeft', label: this.$t('map.sepTypeLeft'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSwitchSectionType || !this.isCrossSectionType },
|
||||
{ prop: 'sepTypeRight', label: this.$t('map.sepTypeRight'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSwitchSectionType || !this.isCrossSectionType },
|
||||
{ prop: 'points', label: this.$t('map.segmentCoordinates'), type: 'points', width: '100px', isHidden: !this.isPointsShow, addPoint: this.addPoint, delPoint: this.delPoint, lastDisabled: true },
|
||||
@ -409,6 +415,7 @@ export default {
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
// 判断是否激活选择站台
|
||||
console.log(selected, '****************---');
|
||||
if (selected && selected._type === 'Section') {
|
||||
if (this.field == 'relatedSection' ) {
|
||||
if (selected.type === '01') {
|
||||
@ -544,7 +551,10 @@ export default {
|
||||
model.leftStopPointOffset = model.leftStopPointOffset || 5;
|
||||
model.rightStopPointOffset = model.rightStopPointOffset || model.lengthFact - 5;
|
||||
}
|
||||
const changeSectionList = this.handleOtherSectionChange(model);
|
||||
let changeSectionList = [model];
|
||||
if(model.endForFlipRunDir === 'NON') {
|
||||
changeSectionList = this.handleOtherSectionChange(model);
|
||||
}
|
||||
const changeStandList = this.handleRelevanceStand(model);
|
||||
if (model.relCrossSection) {
|
||||
this.crossSectionList.forEach(item => {
|
||||
@ -556,6 +566,7 @@ export default {
|
||||
}
|
||||
|
||||
models = [...models, ...changeSectionList, ...changeStandList];
|
||||
console.log(models, 'mmmmmmmmmmmmmmmmmm');
|
||||
this.$emit('updateMapModel', models);
|
||||
this.oldPoint = JSON.parse(JSON.stringify(model.points));
|
||||
this.oldLeftSectionCode = model.leftSectionCode;
|
||||
|
Loading…
Reference in New Issue
Block a user