This commit is contained in:
fan 2020-04-09 18:57:03 +08:00
commit 9f5644ccc6
4 changed files with 75 additions and 52 deletions

View File

@ -138,7 +138,7 @@ export default {
let name = section.name; let name = section.name;
if (section.type == '02') { if (section.type == '02') {
const sectionParent = this.$store.getters['map/getDeviceByCode'](section.parentCode); const sectionParent = this.$store.getters['map/getDeviceByCode'](section.parentCode);
name = `${sectionParent.name}-${section.name}`; name = `${sectionParent.name}${section.name}`;
} }
list.push({ name: name, code: section.code }); list.push({ name: name, code: section.code });
}); });

View File

@ -75,7 +75,17 @@ export default {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : ''; return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
}, },
domIdConfirm() { domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : ''; if (this.dialogShow) {
if (this.operation == OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation) {
return OperationEvent.AutoTurnBack.SetAutoTurnBackButton.confirm.operation;
} else if (this.operation == OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation) {
return OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.confirm.operation;
} else {
return '';
}
} else {
return '';
}
}, },
title() { title() {
return '自动折返'; return '自动折返';

View File

@ -760,6 +760,34 @@ export default {
{ deviceType: 'button', orderNum: 1, operateCode: '202', tip: '鼠标右键菜单选择【请求站控】'}, { deviceType: 'button', orderNum: 1, operateCode: '202', tip: '鼠标右键菜单选择【请求站控】'},
{ deviceType: '05', orderNum: 2, operateCode: '2023', tip: '鼠标左键点击【应用】' } { deviceType: '05', orderNum: 2, operateCode: '2023', tip: '鼠标左键点击【应用】' }
] ]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Signal_Set_Auto_Turn_Back',
skinCode: '06',
trainingName: '设置自动折返进路({3})',
trainingRemark: '设置自动折返进路',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '05', orderNum: 1, operateCode: '900', tip: '鼠标右键菜单选择【设置自动折返】'},
{ deviceType: '05', orderNum: 2, operateCode: '9001', tip: '鼠标左键点击【应用】' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Signal_Cancel_Auto_Turn_Back',
skinCode: '06',
trainingName: ' 取消自动折返进路({3})',
trainingRemark: ' 取消自动折返进路',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '05', orderNum: 1, operateCode: '901', tip: '鼠标右键菜单选择【取消自动折返】'},
{ deviceType: '05', orderNum: 2, operateCode: '9011', tip: '鼠标左键点击【应用】' }
]
} }
] ]
}; };

View File

@ -143,23 +143,23 @@ export default {
{ prop: 'namePosition.x', firstLevel: 'namePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' }, { prop: 'namePosition.x', firstLevel: 'namePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
{ prop: 'namePosition.y', firstLevel: 'namePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' } { prop: 'namePosition.y', firstLevel: 'namePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
] }, ] },
{ prop: 'type', label: this.$t('map.sectionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionTypeList}, { prop: 'type', label: this.$t('map.sectionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionTypeList }, //
{ 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: '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: '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: true, options: this.sectionList, isHidden: !this.isParentCode }, { prop: 'parentCode', label: this.$t('map.associatedSection'), type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: true, 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 }, { prop: 'sepTypeLeft', label: this.$t('map.sepTypeLeft'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSwitchSectionType },
{ prop: 'sepTypeRight', label: this.$t('map.sepTypeRight'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSwitchSectionType }, { prop: 'sepTypeRight', label: this.$t('map.sepTypeRight'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSwitchSectionType },
{ prop: 'points', label: this.$t('map.segmentCoordinates'), type: 'points', width: '100px', isHidden: !this.isPointsShow, pointDisabled: this.isStationCodeDisabled, addPoint: this.addPoint, delPoint: this.delPoint, lastDisabled: true }, { prop: 'points', label: this.$t('map.segmentCoordinates'), type: 'points', width: '100px', isHidden: !this.isPointsShow, pointDisabled: this.isStationCodeDisabled, addPoint: this.addPoint, delPoint: this.delPoint, lastDisabled: true },
{ prop: 'logicSectionStartOffset', label: this.$t('map.logicalSectionStartOffset'), type: 'number', min: 0, width: '150px', isHidden: !this.isLSectionOffsetShow, disabled: true}, { prop: 'logicSectionStartOffset', label: this.$t('map.logicalSectionStartOffset'), type: 'number', min: 0, width: '150px', isHidden: !this.isStationCodeDisabled, disabled: true},
{ prop: 'logicSectionEndOffset', label: this.$t('map.logicalSectionEndOffset'), type: 'number', min: 0, width: '150px', isHidden: !this.isLSectionOffsetShow, disabled: true}, { prop: 'logicSectionEndOffset', label: this.$t('map.logicalSectionEndOffset'), type: 'number', min: 0, width: '150px', isHidden: !this.isStationCodeDisabled, disabled: true},
{ prop: 'standTrack', label: this.$t('map.isStandTrack'), type: 'checkbox', isHidden: !this.isStandTrackShow }, // 1 { prop: 'standTrack', label: this.$t('map.isStandTrack'), type: 'checkbox', isHidden: !this.isStandTrackShow }, //
{ prop: 'standTrackName', label: this.$t('map.standTrackName'), type: 'input', isHidden: !this.isstandTrackNameShow }, { prop: 'standTrackName', label: this.$t('map.standTrackName'), type: 'input', isHidden: !this.isstandTrackNameShow },
{ prop: 'standTrackNamePosition', label: this.$t('map.standTrackNamePosition'), type: 'coordinate', width: '150px', isHidden: !this.isstandTrackNameShow, children: [ { prop: 'standTrackNamePosition', label: this.$t('map.standTrackNamePosition'), type: 'coordinate', width: '150px', isHidden: !this.isstandTrackNameShow, children: [
{ prop: 'standTrackNamePosition.x', firstLevel: 'standTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px'}, { prop: 'standTrackNamePosition.x', firstLevel: 'standTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px'},
{ prop: 'standTrackNamePosition.y', firstLevel: 'standTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px'} { prop: 'standTrackNamePosition.y', firstLevel: 'standTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px'}
] }, ] },
{ prop: 'reentryTrack', label: this.$t('map.isReentryTrack'), type: 'checkbox', isHidden: !this.isStandTrackShow }, // 1 { prop: 'reentryTrack', label: this.$t('map.isReentryTrack'), type: 'checkbox', isHidden: !this.isStandTrackShow }, //
{ prop: 'reentryTrackName', label: this.$t('map.reentryTrackName'), type: 'input', isHidden: !this.isreentryTrackName }, { prop: 'reentryTrackName', label: this.$t('map.reentryTrackName'), type: 'input', isHidden: !this.isreentryTrackName },
{ prop: 'reentryTrackNamePosition', label: this.$t('map.reentryTrackNamePosition'), type: 'coordinate', width: '150px', isHidden: !this.isreentryTrackName, children: [ { prop: 'reentryTrackNamePosition', label: this.$t('map.reentryTrackNamePosition'), type: 'coordinate', width: '150px', isHidden: !this.isreentryTrackName, children: [
@ -167,7 +167,7 @@ export default {
{ prop: 'reentryTrackNamePosition.y', firstLevel: 'reentryTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px'} { prop: 'reentryTrackNamePosition.y', firstLevel: 'reentryTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px'}
] }, ] },
{ prop: 'transferTrack', label: this.$t('map.isTransferTrack'), type: 'checkbox', isHidden: !this.isStandTrackShow }, // 1 { prop: 'transferTrack', label: this.$t('map.isTransferTrack'), type: 'checkbox', isHidden: !this.isStandTrackShow }, //
{ prop: 'transferTrackName', label: this.$t('map.transferTrackName'), type: 'input', isHidden: !this.istransferTrackName }, { prop: 'transferTrackName', label: this.$t('map.transferTrackName'), type: 'input', isHidden: !this.istransferTrackName },
{ prop: 'transferTrackNamePosition', label: this.$t('map.transferTrackNamePosition'), type: 'coordinate', width: '150px', isHidden: !this.istransferTrackName, children: [ { prop: 'transferTrackNamePosition', label: this.$t('map.transferTrackNamePosition'), type: 'coordinate', width: '150px', isHidden: !this.istransferTrackName, children: [
@ -180,10 +180,10 @@ export default {
{ prop: 'destinationCodePoint.y', firstLevel: 'destinationCodePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px'} { prop: 'destinationCodePoint.y', firstLevel: 'destinationCodePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px'}
] }, ] },
{ prop: 'switchSection', label: this.$t('map.isSwitchSection'), type: 'checkbox', isHidden: !this.isAssociatedSwitchSectionshow, disabled: true }, { prop: 'switchSection', label: this.$t('map.isSwitchSection'), type: 'checkbox', disabled: true }, //
{ prop: 'relSwitchCode', label: this.$t('map.relSwitchCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.switchList, change: true, deviceChange: this.deviceChange, isHidden: !this.isRelSwitchCode, disabled: true }, { prop: 'relSwitchCode', label: this.$t('map.relSwitchCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.switchList, isHidden: this.isStandTrackShow, disabled: true }, //
{ prop: 'logicSectionShow', label: this.$t('map.displayLogicalExtents'), type: 'checkbox', isHidden: !this.isSwitchSectionShow }, // 1 { prop: 'logicSectionShow', label: this.$t('map.displayLogicalExtents'), type: 'checkbox', isHidden: !this.isSwitchSectionType }, // 1
{ prop: 'logicSectionNameSort', label: this.$t('map.logicSectionNameSort'), type: 'radio', optionLabel: 'label', optionValue: 'value', isHidden: !this.isLogicSectionNameSort, radioList: [ { prop: 'logicSectionNameSort', label: this.$t('map.logicSectionNameSort'), type: 'radio', optionLabel: 'label', optionValue: 'value', isHidden: !this.isLogicSectionNameSort, radioList: [
{value: true, label: this.$t('map.fromSmallToLarge')}, {value: true, label: this.$t('map.fromSmallToLarge')},
{value: false, label: this.$t('map.fromLargeToSmall')} {value: false, label: this.$t('map.fromLargeToSmall')}
@ -195,8 +195,8 @@ export default {
map: { map: {
name: this.$t('map.mapData'), name: this.$t('map.mapData'),
item: [ item: [
{ prop: 'stationCode', label: this.$t('map.equipmentStation') + ':', type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: this.isStationCodeDisabled, options: this.centralizedStationList, isHidden: this.isLSectionOffsetShow}, { prop: 'stationCode', label: this.$t('map.equipmentStation') + ':', type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: this.isStationCodeDisabled, options: this.centralizedStationList, isHidden: this.isStationCodeDisabled},
{ prop: 'lengthFact', label: this.$t('map.actualLength') + ':', type: 'number', min: 0, placeholder: this.$t('map.meter'), isHidden: this.isLengthFactShow }, { prop: 'lengthFact', label: this.$t('map.actualLength') + ':', type: 'number', min: 0, placeholder: this.$t('map.meter'), isHidden: !this.hasAssociatedSection },
{ prop: 'leftStopPointOffset', label: this.$t('map.leftStopPointOffset'), type: 'number', min: 0, disabled: true, isHidden: !this.isStopPointOffset }, { prop: 'leftStopPointOffset', label: this.$t('map.leftStopPointOffset'), type: 'number', min: 0, disabled: true, isHidden: !this.isStopPointOffset },
{ prop: 'rightStopPointOffset', label: this.$t('map.rightStopPointOffset'), type: 'number', min: 0, disabled: true, isHidden: !this.isStopPointOffset }, { prop: 'rightStopPointOffset', label: this.$t('map.rightStopPointOffset'), type: 'number', min: 0, disabled: true, isHidden: !this.isStopPointOffset },
{ prop: 'region', label: this.$t('map.sectionColon'), type: 'select', optionLabel: 'label', optionValue: 'value', options: this.regionList, isHidden: !this.sectionColonShow }, { prop: 'region', label: this.$t('map.sectionColon'), type: 'select', optionLabel: 'label', optionValue: 'value', options: this.regionList, isHidden: !this.sectionColonShow },
@ -302,15 +302,27 @@ export default {
}, },
// true false // true false
isParentCode() {
return this.editModel.type == '02' || this.editModel.relSwitchCode;
},
isStationCodeDisabled() { isStationCodeDisabled() {
return this.editModel.type == '02'; return this.editModel.type == '02';
}, },
isSwitchSectionType() { isSwitchSectionType() {
return this.editModel.type !== '04'; return this.editModel.type !== '04';
}, },
isLogicSectionNameSort() { //
return this.editModel.type == '01';
},
isPointsShow() {
return this.editModel.type !== '04' && this.editModel.points.length > 0;
},
isStandTrackShow() {
return this.editModel.type != '04' && this.editModel.type != '03';
},
hasAssociatedSection() {
return this.editModel.type == '01' || this.editModel.type == '03';
},
isParentCode() {
return this.editModel.type == '02' || this.editModel.type == '03';
},
isstandTrackNameShow() { isstandTrackNameShow() {
return this.editModel.type !== '04' && this.editModel.standTrack; return this.editModel.type !== '04' && this.editModel.standTrack;
}, },
@ -326,44 +338,18 @@ export default {
isStopPointOffset() { isStopPointOffset() {
return this.editModel.type !== '04' && (this.editModel.reentryTrack || this.editModel.standTrack || this.editModel.transferTrack); return this.editModel.type !== '04' && (this.editModel.reentryTrack || this.editModel.standTrack || this.editModel.transferTrack);
}, },
isRelSwitchCode() {
return this.editModel.type !== '04' && this.editModel.switchSection;
},
isLogicSectionNameSort() { //
return this.editModel.type === '01' && !this.editModel.switchSection;
},
isPointsShow() {
return this.editModel.type !== '04' && this.editModel.points.length > 0;
},
sectionColonShow() {
if (this.$store.state.map.map) {
return this.$store.state.map.map.skinVO.code === '03';
}
return false;
},
isSwitchSectionShow() { //
return this.editModel.type !== '04' && !this.editModel.switchSection;
},
isAssociatedSwitchSectionshow() {
return this.editModel.type !== '04' || this.editModel.type !== '03';
},
isStandTrackShow() {
return this.editModel.type !== '04' && this.editModel.type !== '03' && !this.editModel.switchSection;
},
isLeftSectionButtonShow() { isLeftSectionButtonShow() {
return this.field === 'leftSection'; return this.field === 'leftSection';
}, },
isRightSectionButtonShow() { isRightSectionButtonShow() {
return this.field === 'rightSection'; return this.field === 'rightSection';
}, },
hasAssociatedSection() { sectionColonShow() {
return this.editModel.type === '01' || this.editModel.type === '03'; if (this.$store.state.map.map) {
}, return this.$store.state.map.map.skinVO.code === '03';
isLSectionOffsetShow() { }
return this.editModel.type === '02'; return false;
},
isLengthFactShow() {
return this.editModel.type === '02' || this.editModel.type === '04';
}, },
centralizedStationList() { centralizedStationList() {
let list = []; let list = [];
@ -417,7 +403,6 @@ export default {
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);
this.editModel.logicSectionNum = selected.type === '01' ? selected.logicSectionNum : [0]; this.editModel.logicSectionNum = selected.type === '01' ? selected.logicSectionNum : [0];
this.editModel.points = JSON.parse(JSON.stringify(selected.points)); this.editModel.points = JSON.parse(JSON.stringify(selected.points));
console.log(selected, selected.lengthFact, '实际长度');
this.editModel.lengthFact = selected.lengthFact || 0; this.editModel.lengthFact = selected.lengthFact || 0;
this.oldPoint = JSON.parse(JSON.stringify(selected.points)); this.oldPoint = JSON.parse(JSON.stringify(selected.points));
this.oldLeftSectionCode = selected.leftSectionCode; this.oldLeftSectionCode = selected.leftSectionCode;