岔心代码调整

This commit is contained in:
joylink_cuiweidong 2021-01-13 18:33:07 +08:00
parent c42a184b7b
commit becb6a03df
5 changed files with 16 additions and 9 deletions

View File

@ -236,7 +236,7 @@ export default {
sectionLogicalNumber: '逻辑区段数量', sectionLogicalNumber: '逻辑区段数量',
sectionLsectioncode: '左侧区段名称:', sectionLsectioncode: '左侧区段名称:',
sectionRsectioncode: '右侧区段名称:', sectionRsectioncode: '右侧区段名称:',
associatedSection: '所属物理/道岔区段:', associatedSection: '所属物理/道岔/岔心区段:',
blockCoding: '区段编码:', blockCoding: '区段编码:',
sectionType: '区段类型:', sectionType: '区段类型:',
sectionNameColon: '区段名称:', sectionNameColon: '区段名称:',

View File

@ -24,7 +24,7 @@ class ETextName extends Group {
const traingle = new JTriangle(model.points[0], model.points[model.points.length - 1]); const traingle = new JTriangle(model.points[0], model.points[model.points.length - 1]);
const drict = model.trainPosType != '01' ? 1 : -1; const drict = model.trainPosType != '01' ? 1 : -1;
if (this.model.type == 'name') { if (this.model.type == 'name') {
if (model.type == '01') { // 物理区段名称 if (model.type == '01' && !model.parentCode) { // 物理区段名称
const tempx = x + traingle.getSin(styleModel.distance); const tempx = x + traingle.getSin(styleModel.distance);
const tempy = y + traingle.getCos(styleModel.distance) * (styleModel.position || drict); const tempy = y + traingle.getCos(styleModel.distance) * (styleModel.position || drict);
styleX = tempx + model.namePosition.x; styleX = tempx + model.namePosition.x;

View File

@ -11,7 +11,7 @@
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { getUID } from '@/jmapNew/utils/Uid'; import { getUID } from '@/jmapNew/utils/Uid';
import CreateOperate from '../components/createOperate'; import CreateOperate from '../components/createOperate';
import {segmentsIntr} from '@/utils/index'; import {segmentsIntr, deepAssign} from '@/utils/index';
export default { export default {
name:'CrossDraft', name:'CrossDraft',
components: { components: {
@ -116,6 +116,7 @@ export default {
}, },
updateMapDraw(standCode) { updateMapDraw(standCode) {
const models = [];
const model = { const model = {
_type: 'Section', _type: 'Section',
code: getUID('T', this.sectionList), code: getUID('T', this.sectionList),
@ -126,7 +127,15 @@ export default {
relateSectionList:this.addModel.relateSectionList, relateSectionList:this.addModel.relateSectionList,
stationCode:standCode stationCode:standCode
}; };
this.$emit('updateMapModel', model); const relateSectionList = this.addModel.relateSectionList;
const newSectionA = deepAssign({}, this.$store.getters['map/getDeviceByCode'](relateSectionList[0]));
const newSectionB = deepAssign({}, this.$store.getters['map/getDeviceByCode'](relateSectionList[1]));
newSectionA.parentCode = model.code;
newSectionB.parentCode = model.code;
models.push(model);
models.push(newSectionA);
models.push(newSectionB);
this.$emit('updateMapModel', models);
} }
} }
}; };

View File

@ -343,7 +343,7 @@ export default {
return this.hasAssociatedSection && this.editModel.rightAxlePosition; return this.hasAssociatedSection && this.editModel.rightAxlePosition;
}, },
isParentCode() { isParentCode() {
return this.editModel.type == '02' || this.editModel.type == '03'; return this.editModel.type == '02' || this.editModel.type == '03' || (this.editModel.type == '01' && this.editModel.parentCode);
}, },
isstandTrackNameShow() { isstandTrackNameShow() {
return this.editModel.type == '01' && this.editModel.standTrack; return this.editModel.type == '01' && this.editModel.standTrack;
@ -731,7 +731,8 @@ export default {
delRightSection.leftSectionCode = ''; delRightSection.leftSectionCode = '';
models.push(delRightSection); models.push(delRightSection);
} }
selected.relevanceSectionList.forEach(dataCode => { // const relateSection = selected.relevanceSectionList || selected.relateSectionList;
relateSection.forEach(dataCode => { //
const sectionModel = this.getSectionByCode(dataCode); const sectionModel = this.getSectionByCode(dataCode);
if (sectionModel) { if (sectionModel) {
sectionModel.parentCode = ''; sectionModel.parentCode = '';

View File

@ -304,9 +304,6 @@ export default {
}, },
// //
findSection(signal) { findSection(signal) {
if (signal.code == 'S40506' || signal.code == 'X99289' || signal.code == 'S63773') {
debugger;
}
const arrList = []; const arrList = [];
this.sectionList.forEach(section => { this.sectionList.forEach(section => {
if (section.type == '01' || section.type == '03') { if (section.type == '01' || section.type == '03') {