This commit is contained in:
fan 2020-04-08 14:25:27 +08:00
commit df0d560df8
3 changed files with 24 additions and 4 deletions

View File

@ -219,7 +219,7 @@ export default class Section extends Group {
// 创建区段
this.section = new ELines({
zlevel: this.zlevel,
z: this.z, // 逻辑区段会覆盖物理区段
z: model.type == '02' ? this.z + 1 : this.z, // 逻辑区段会覆盖物理区段
isSwitchSection: model.switchSection,
isCurve: model.curve,
points: model.type == '04' ? [model.namePosition, model.namePosition] : model.points,
@ -230,7 +230,7 @@ export default class Section extends Group {
if (this.style.Section.block.special) { // 创建哈尔滨特殊区段(用作封锁显示)
this.sectionBlock = new EblockLines({
zlevel: this.zlevel,
z: this.z,
z: this.z + 2,
isSwitchSection: model.switchSection,
isCurve: model.curve,
points: model.points,

View File

@ -96,7 +96,9 @@ export default {
let count = 0;
this.seclectDeviceList.forEach(item => {
if (item._type == 'Section') {
this.modelList[0].list.push(item);
if (item.type != '02') {
this.modelList[0].list.push(item);
}
} else if (item._type == 'Switch') {
this.modelList[1].list.push(item);
} else if (item._type == 'Signal') {

View File

@ -195,7 +195,7 @@ export default {
map: {
name: this.$t('map.mapData'),
item: [
{ prop: 'stationCode', label: this.$t('map.equipmentStation') + ':', type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: this.isStationCodeDisabled, options: this.centralizedStationList },
{ 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: 'lengthFact', label: this.$t('map.actualLength') + ':', type: 'number', min: 0, placeholder: this.$t('map.meter') },
{ 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 },
@ -501,6 +501,8 @@ export default {
if (section.parentCode === model.code) {
const copySection = deepAssign({}, section);
copySection.logicSectionShow = model.logicSectionShow;
copySection.lengthFact = (Number(model.lengthFact) / model.logicSectionCodeList.length).toFixed(3);
copySection.stationCode = model.stationCode; //
models.push(copySection);
} else if (model.code !== section.code && (section.type === '01' || section.type === '03')) {
const copySection = deepAssign({}, section);
@ -524,6 +526,22 @@ export default {
}
}
if (model.parentCode == copySection.code) {
let lengthFact = 0;
copySection.logicSectionCodeList.forEach(code => {
if (model.code != code) {
const localSectionModel = this.$store.getters['map/getDeviceByCode'](code);
lengthFact += Number(localSectionModel.lengthFact);
}
});
lengthFact += model.lengthFact;
copySection.lengthFact = lengthFact.toFixed(3);
if (copySection.lengthFact > 5) {
copySection.leftStopPointOffset = 5;
copySection.rightStopPointOffset = copySection.lengthFact - 5;
}
updataFlag = true;
}
if (this.checkPointsCoincide(this.oldPoint[0], section.points[section.points.length - 1])) {
pointModel.push(copySection);
}