|
|
|
@ -13,25 +13,16 @@
|
|
|
|
|
</div>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
<el-tab-pane class="view-control" :label="$t('map.bothCreate')" name="second">
|
|
|
|
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
|
|
|
|
<el-form ref="make">
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-transfer
|
|
|
|
|
v-model="linksCollection"
|
|
|
|
|
filterable
|
|
|
|
|
:filter-method="filterLinks"
|
|
|
|
|
:filter-placeholder="$t('rules.linkSelectName')"
|
|
|
|
|
:data="DatasCollection"
|
|
|
|
|
:titles="[$t('map.linkSet'), $t('map.selectLink')]"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight + 60 +'px' }">
|
|
|
|
|
<div class="flex_box">
|
|
|
|
|
<el-button type="primary" @click="create">一键生成区段</el-button>
|
|
|
|
|
<el-card v-if="questionList.length" class="box-card">
|
|
|
|
|
<div v-for="(item, index) in questionList" :key="index" class="text item">
|
|
|
|
|
{{ item }}
|
|
|
|
|
</div>
|
|
|
|
|
</el-card>
|
|
|
|
|
</div>
|
|
|
|
|
</el-scrollbar>
|
|
|
|
|
<div class="button_box">
|
|
|
|
|
<el-button-group class="map-draft-group">
|
|
|
|
|
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</div>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
<el-tab-pane class="view-control" :label="$t('map.splitMerge')" name="three">
|
|
|
|
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight+60+'px' }">
|
|
|
|
@ -145,7 +136,6 @@ import { mapGetters } from 'vuex';
|
|
|
|
|
import { getUID } from '@/jmap/utils/Uid';
|
|
|
|
|
import JTriangle from '@/jmap/utils/JTriangle';
|
|
|
|
|
import ConfigList from './config/list';
|
|
|
|
|
import { deepClone } from '@/utils/index';
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: 'SectionDraft',
|
|
|
|
@ -166,6 +156,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
questionList: [],
|
|
|
|
|
linksCollection: [],
|
|
|
|
|
activeName: 'first',
|
|
|
|
|
SectionTypeList: [],
|
|
|
|
@ -545,14 +536,78 @@ export default {
|
|
|
|
|
this.$refs.dataform.clearValidate();
|
|
|
|
|
this.activeName = 'first';
|
|
|
|
|
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
|
|
|
|
const data = deepClone(selected);
|
|
|
|
|
Object.assign(this.editModel, data);
|
|
|
|
|
this.editModel.logicSectionNum = selected.type === '01' ? selected.logicSectionNum : [0];
|
|
|
|
|
this.editModel.isSegmentation = selected.isSegmentation || false;
|
|
|
|
|
this.editModel.points = selected.points.slice();
|
|
|
|
|
this.editModel.code = selected.code;
|
|
|
|
|
this.editModel.name = selected.name;
|
|
|
|
|
this.editModel.type = selected.type;
|
|
|
|
|
this.editModel.namePosition = {
|
|
|
|
|
x: selected.namePosition.x,
|
|
|
|
|
y: selected.namePosition.y
|
|
|
|
|
};
|
|
|
|
|
this.editModel.nameShow = selected.nameShow;
|
|
|
|
|
this.editModel.axleShow = selected.axleShow;
|
|
|
|
|
this.editModel.relStandCode = selected.relStandCode;
|
|
|
|
|
this.editModel.leftStopPointOffset = selected.leftStopPointOffset;
|
|
|
|
|
this.editModel.rightStopPointOffset = selected.rightStopPointOffset;
|
|
|
|
|
this.editModel.destinationCode = selected.destinationCode;
|
|
|
|
|
if (selected.destinationCodePoint) {
|
|
|
|
|
this.editModel.destinationCodePoint = {
|
|
|
|
|
x: selected.destinationCodePoint.x,
|
|
|
|
|
y: selected.destinationCodePoint.y
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
this.editModel.kmRangeRight = selected.kmRangeRight;
|
|
|
|
|
this.editModel.kmRangeLeft = selected.kmRangeLeft;
|
|
|
|
|
this.editModel.region = selected.region;
|
|
|
|
|
|
|
|
|
|
this.editModel.destinationCodeShow = selected.destinationCodeShow;
|
|
|
|
|
|
|
|
|
|
this.editModel.logicSectionNum = selected.type === '01' ? selected.logicSectionNum : [0];
|
|
|
|
|
this.editModel.logicSectionShow = selected.logicSectionShow;
|
|
|
|
|
this.editModel.logicSectionNameShow = selected.logicSectionNameShow;
|
|
|
|
|
this.editModel.isStandTrack = selected.isStandTrack;
|
|
|
|
|
this.editModel.standTrackName = selected.standTrackName;
|
|
|
|
|
this.editModel.standTrackNamePosition = {
|
|
|
|
|
x: selected.standTrackNamePosition.x,
|
|
|
|
|
y: selected.standTrackNamePosition.y
|
|
|
|
|
};
|
|
|
|
|
this.editModel.isReentryTrack = selected.isReentryTrack;
|
|
|
|
|
this.editModel.reentryTrackName = selected.reentryTrackName;
|
|
|
|
|
this.editModel.reentryTrackNamePosition = {
|
|
|
|
|
x: selected.reentryTrackNamePosition.x,
|
|
|
|
|
y: selected.reentryTrackNamePosition.y
|
|
|
|
|
};
|
|
|
|
|
this.editModel.isTransferTrack = selected.isTransferTrack;
|
|
|
|
|
this.editModel.transferTrackName = selected.transferTrackName;
|
|
|
|
|
this.editModel.transferTrackNamePosition = {
|
|
|
|
|
x: selected.transferTrackNamePosition.x,
|
|
|
|
|
y: selected.transferTrackNamePosition.y
|
|
|
|
|
};
|
|
|
|
|
this.editModel.isSegmentation = selected.isSegmentation || false;
|
|
|
|
|
if (selected.segmentationPosition) {
|
|
|
|
|
this.editModel.segmentationPosition = {
|
|
|
|
|
x: selected.segmentationPosition.x,
|
|
|
|
|
y: selected.segmentationPosition.y
|
|
|
|
|
};
|
|
|
|
|
} else {
|
|
|
|
|
this.editModel.segmentationPosition = { x: 0, y: 0 };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.editModel.logicSectionNameSort = selected.logicSectionNameSort;
|
|
|
|
|
this.editModel.isSwitchSection = selected.isSwitchSection;
|
|
|
|
|
this.editModel.relSwitchCode = selected.relSwitchCode;
|
|
|
|
|
this.editModel.linkCode = selected.linkCode;
|
|
|
|
|
this.editModel.sepTypeLeft = selected.sepTypeLeft;
|
|
|
|
|
this.editModel.offsetLeft = selected.offsetLeft;
|
|
|
|
|
this.editModel.sepTypeRight = selected.sepTypeRight;
|
|
|
|
|
this.editModel.offsetRight = selected.offsetRight;
|
|
|
|
|
this.editModel.stationCode = selected.stationCode;
|
|
|
|
|
this.editModel.trainPosType = selected.trainPosType;
|
|
|
|
|
this.editModel.parentCode = selected.parentCode;
|
|
|
|
|
this.editModel.points = selected.points.slice();
|
|
|
|
|
this.editModel.isCurve = selected.isCurve;
|
|
|
|
|
this.addModel.splitOffsetMax = Math.sqrt(new JTriangle(selected.points[0], selected.points[selected.points.length - 1]).abspowz);
|
|
|
|
|
this.addModel.splitOffset = this.addModel.splitOffsetMax / 2;
|
|
|
|
|
|
|
|
|
|
this.computedLogicSectionNumList(this.editModel.logicSectionNum);
|
|
|
|
|
if (this.field.toUpperCase() === 'splitSection'.toUpperCase()) {
|
|
|
|
|
this.addModel.code = selected.code;
|
|
|
|
@ -690,91 +745,97 @@ export default {
|
|
|
|
|
create() {
|
|
|
|
|
const models = [];
|
|
|
|
|
const remove = [];
|
|
|
|
|
this.linksCollection.forEach(elem => {
|
|
|
|
|
this.linkList.forEach(link => {
|
|
|
|
|
if (elem === link.code) {
|
|
|
|
|
const uid = getUID('Section');
|
|
|
|
|
const uname = 'Section_' + link.name.replace('Link_', '');
|
|
|
|
|
const model = {
|
|
|
|
|
_type: 'Section',
|
|
|
|
|
code: uid,
|
|
|
|
|
name: uname,
|
|
|
|
|
type: '01',
|
|
|
|
|
axleShow: false,
|
|
|
|
|
isStandTrack: false,
|
|
|
|
|
standTrackName: '',
|
|
|
|
|
standTrackNamePosition: { x: 0, y: 0 },
|
|
|
|
|
isReentryTrack: false,
|
|
|
|
|
reentryTrackName: '',
|
|
|
|
|
reentryTrackNamePosition: { x: 0, y: 0 },
|
|
|
|
|
isTransferTrack: false,
|
|
|
|
|
transferTrackName: '',
|
|
|
|
|
transferTrackNamePosition: { x: 0, y: 0 },
|
|
|
|
|
isSwitchSection: false, // 是否道岔管理区段
|
|
|
|
|
isSegmentation: false,
|
|
|
|
|
segmentationPosition: { x: 0, y: 0 },
|
|
|
|
|
relSwitchCode: '',
|
|
|
|
|
kmRangeRight: '',
|
|
|
|
|
kmRangeLeft: '',
|
|
|
|
|
region: '',
|
|
|
|
|
namePosition: { x: 0, y: 0 },
|
|
|
|
|
logicSectionNum: [0],
|
|
|
|
|
logicSectionShow: true,
|
|
|
|
|
logicSectionNameSort: true,
|
|
|
|
|
linkCode: link.code,
|
|
|
|
|
sepTypeLeft: '01', // 分隔符类型
|
|
|
|
|
offsetLeft: 0,
|
|
|
|
|
sepTypeRight: '01',
|
|
|
|
|
trainPosType: '01',
|
|
|
|
|
offsetRight: link.lengthFact,
|
|
|
|
|
parentCode: '',
|
|
|
|
|
relStandCode: '',
|
|
|
|
|
rightStopPointOffset: 0,
|
|
|
|
|
leftStopPointOffset: 0,
|
|
|
|
|
destinationCode: '',
|
|
|
|
|
destinationCodePoint: { x: 0, y: 0 },
|
|
|
|
|
destinationCodeShow: false,
|
|
|
|
|
points: [
|
|
|
|
|
{ x: link.lp.x, y: link.lp.y },
|
|
|
|
|
{ x: link.rp.x, y: link.rp.y }
|
|
|
|
|
],
|
|
|
|
|
isCurve: false
|
|
|
|
|
};
|
|
|
|
|
// 判断左分隔符类型
|
|
|
|
|
if (!link.leftFdCode && !link.leftSdcode) {
|
|
|
|
|
model.sepTypeLeft = '03';
|
|
|
|
|
} else if (link.leftFdCode && link.leftSdCode) {
|
|
|
|
|
model.sepTypeLeft = '00';
|
|
|
|
|
} else if (link.leftFdCode) {
|
|
|
|
|
const node = this.findLinkData(link.leftFdCode);
|
|
|
|
|
if (node && node.rightFdCode && node.rightSdCode) {
|
|
|
|
|
model.sepTypeLeft = '00';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 判断右分隔符类型
|
|
|
|
|
if (!link.rightFdCode && !link.rightSdCode) {
|
|
|
|
|
model.sepTypeRight = '03';
|
|
|
|
|
} else if (link.rightFdCode && link.rightSdCode) {
|
|
|
|
|
model.sepTypeRight = '00';
|
|
|
|
|
} else if (link.rightFdCode) {
|
|
|
|
|
const node = this.findLinkData(link.rightFdCode);
|
|
|
|
|
if (node && node.leftFdCode && node.leftSdCode) {
|
|
|
|
|
model.sepTypeRight = '00';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
models.push(model);
|
|
|
|
|
const sectionList = this.findSectionListDataByLinkCode(link.code);
|
|
|
|
|
if (sectionList) {
|
|
|
|
|
sectionList.forEach(section => {
|
|
|
|
|
remove.push({ _type: 'Section', code: section.code });
|
|
|
|
|
if (section.type === '02' && section.parentCode === elem.code) {
|
|
|
|
|
remove.push(section);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
this.linkList.forEach(link => {
|
|
|
|
|
let count = 0;
|
|
|
|
|
this.sectionList.forEach(setction => {
|
|
|
|
|
console.log(setction);
|
|
|
|
|
count++;
|
|
|
|
|
if (setction.linkCode == link.code) {
|
|
|
|
|
count = 0;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (count == this.sectionList.length) {
|
|
|
|
|
const uid = getUID('Section');
|
|
|
|
|
const uname = 'Section_' + link.name.replace('Link_', '');
|
|
|
|
|
const model = {
|
|
|
|
|
_type: 'Section',
|
|
|
|
|
code: uid,
|
|
|
|
|
name: uname,
|
|
|
|
|
type: '01',
|
|
|
|
|
axleShow: false,
|
|
|
|
|
isStandTrack: false,
|
|
|
|
|
standTrackName: '',
|
|
|
|
|
standTrackNamePosition: { x: 0, y: 0 },
|
|
|
|
|
isReentryTrack: false,
|
|
|
|
|
reentryTrackName: '',
|
|
|
|
|
reentryTrackNamePosition: { x: 0, y: 0 },
|
|
|
|
|
isTransferTrack: false,
|
|
|
|
|
transferTrackName: '',
|
|
|
|
|
transferTrackNamePosition: { x: 0, y: 0 },
|
|
|
|
|
isSwitchSection: false, // 是否道岔管理区段
|
|
|
|
|
isSegmentation: false,
|
|
|
|
|
segmentationPosition: { x: 0, y: 0 },
|
|
|
|
|
relSwitchCode: '',
|
|
|
|
|
kmRangeRight: '',
|
|
|
|
|
kmRangeLeft: '',
|
|
|
|
|
region: '',
|
|
|
|
|
namePosition: { x: 0, y: 0 },
|
|
|
|
|
logicSectionNum: [0],
|
|
|
|
|
logicSectionShow: true,
|
|
|
|
|
logicSectionNameSort: true,
|
|
|
|
|
linkCode: link.code,
|
|
|
|
|
sepTypeLeft: '01', // 分隔符类型
|
|
|
|
|
offsetLeft: 0,
|
|
|
|
|
sepTypeRight: '01',
|
|
|
|
|
trainPosType: '01',
|
|
|
|
|
offsetRight: link.lengthFact,
|
|
|
|
|
parentCode: '',
|
|
|
|
|
relStandCode: '',
|
|
|
|
|
rightStopPointOffset: 0,
|
|
|
|
|
leftStopPointOffset: 0,
|
|
|
|
|
destinationCode: '',
|
|
|
|
|
destinationCodePoint: { x: 0, y: 0 },
|
|
|
|
|
destinationCodeShow: false,
|
|
|
|
|
points: [
|
|
|
|
|
{ x: link.lp.x, y: link.lp.y },
|
|
|
|
|
{ x: link.rp.x, y: link.rp.y }
|
|
|
|
|
],
|
|
|
|
|
isCurve: false
|
|
|
|
|
};
|
|
|
|
|
// 判断左分隔符类型
|
|
|
|
|
if (!link.leftFdCode && !link.leftSdcode) {
|
|
|
|
|
model.sepTypeLeft = '03';
|
|
|
|
|
} else if (link.leftFdCode && link.leftSdCode) {
|
|
|
|
|
model.sepTypeLeft = '00';
|
|
|
|
|
} else if (link.leftFdCode) {
|
|
|
|
|
const node = this.findLinkData(link.leftFdCode);
|
|
|
|
|
if (node && node.rightFdCode && node.rightSdCode) {
|
|
|
|
|
model.sepTypeLeft = '00';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 判断右分隔符类型
|
|
|
|
|
if (!link.rightFdCode && !link.rightSdCode) {
|
|
|
|
|
model.sepTypeRight = '03';
|
|
|
|
|
} else if (link.rightFdCode && link.rightSdCode) {
|
|
|
|
|
model.sepTypeRight = '00';
|
|
|
|
|
} else if (link.rightFdCode) {
|
|
|
|
|
const node = this.findLinkData(link.rightFdCode);
|
|
|
|
|
if (node && node.leftFdCode && node.leftSdCode) {
|
|
|
|
|
model.sepTypeRight = '00';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
models.push(model);
|
|
|
|
|
const sectionList = this.findSectionListDataByLinkCode(link.code);
|
|
|
|
|
if (sectionList) {
|
|
|
|
|
sectionList.forEach(section => {
|
|
|
|
|
remove.push({ _type: 'Section', code: section.code });
|
|
|
|
|
if (section.type === '02' && section.parentCode) {
|
|
|
|
|
remove.push(section);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const _that = this;
|
|
|
|
@ -792,78 +853,82 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
buildEditModel() {
|
|
|
|
|
const pointArr = JSON.stringify(this.editModel.points);
|
|
|
|
|
const model = {
|
|
|
|
|
_type: 'Section',
|
|
|
|
|
code: this.editModel.code,
|
|
|
|
|
name: this.editModel.name,
|
|
|
|
|
type: this.editModel.type,
|
|
|
|
|
relStandCode: this.editModel.relStandCode,
|
|
|
|
|
leftStopPointOffset: Number(this.editModel.leftStopPointOffset),
|
|
|
|
|
rightStopPointOffset: Number(this.editModel.rightStopPointOffset),
|
|
|
|
|
axleShow: this.editModel.axleShow,
|
|
|
|
|
namePosition: {
|
|
|
|
|
x: this.editModel.namePosition.x,
|
|
|
|
|
y: this.editModel.namePosition.y
|
|
|
|
|
},
|
|
|
|
|
kmRangeRight: this.editModel.kmRangeRight,
|
|
|
|
|
kmRangeLeft: this.editModel.kmRangeLeft,
|
|
|
|
|
region: this.editModel.region,
|
|
|
|
|
isStandTrack: this.editModel.isStandTrack,
|
|
|
|
|
standTrackName: this.editModel.standTrackName,
|
|
|
|
|
standTrackNamePosition: {
|
|
|
|
|
x: this.editModel.standTrackNamePosition.x,
|
|
|
|
|
y: this.editModel.standTrackNamePosition.y
|
|
|
|
|
},
|
|
|
|
|
isReentryTrack: this.editModel.isReentryTrack,
|
|
|
|
|
reentryTrackName: this.editModel.reentryTrackName,
|
|
|
|
|
reentryTrackNamePosition: {
|
|
|
|
|
x: this.editModel.reentryTrackNamePosition.x,
|
|
|
|
|
y: this.editModel.reentryTrackNamePosition.y
|
|
|
|
|
},
|
|
|
|
|
isSegmentation: this.editModel.isSegmentation,
|
|
|
|
|
segmentationPosition: {
|
|
|
|
|
x: this.editModel.segmentationPosition.x,
|
|
|
|
|
y: this.editModel.segmentationPosition.y
|
|
|
|
|
},
|
|
|
|
|
isTransferTrack: this.editModel.isTransferTrack,
|
|
|
|
|
transferTrackName: this.editModel.transferTrackName,
|
|
|
|
|
transferTrackNamePosition: {
|
|
|
|
|
x: this.editModel.transferTrackNamePosition.x,
|
|
|
|
|
y: this.editModel.transferTrackNamePosition.y
|
|
|
|
|
},
|
|
|
|
|
logicSectionNameSort: this.editModel.logicSectionNameSort,
|
|
|
|
|
isSwitchSection: this.editModel.isSwitchSection,
|
|
|
|
|
relSwitchCode: this.editModel.relSwitchCode,
|
|
|
|
|
points: JSON.parse(pointArr),
|
|
|
|
|
logicSectionNum: this.editModel.logicSectionNum,
|
|
|
|
|
logicSectionShow: this.editModel.logicSectionShow,
|
|
|
|
|
sepTypeLeft: this.editModel.sepTypeLeft,
|
|
|
|
|
offsetLeft: this.editModel.offsetLeft,
|
|
|
|
|
sepTypeRight: this.editModel.sepTypeRight,
|
|
|
|
|
offsetRight: this.editModel.offsetRight,
|
|
|
|
|
stationCode: this.editModel.stationCode,
|
|
|
|
|
trainPosType: this.editModel.trainPosType,
|
|
|
|
|
linkCode: this.editModel.linkCode,
|
|
|
|
|
isCurve: this.editModel.isCurve,
|
|
|
|
|
destinationCodeShow: false
|
|
|
|
|
};
|
|
|
|
|
if (model.isReentryTrack || this.editModel.isTransferTrack) {
|
|
|
|
|
model.destinationCode = this.editModel.destinationCode;
|
|
|
|
|
model.destinationCodePoint = {
|
|
|
|
|
x: this.editModel.destinationCodePoint.x,
|
|
|
|
|
y: this.editModel.destinationCodePoint.y
|
|
|
|
|
};
|
|
|
|
|
model.destinationCodeShow = this.editModel.destinationCodeShow;
|
|
|
|
|
}
|
|
|
|
|
return model;
|
|
|
|
|
},
|
|
|
|
|
// buildEditModel() {
|
|
|
|
|
// const pointArr = JSON.stringify(this.editModel.points);
|
|
|
|
|
// const model = {
|
|
|
|
|
// _type: 'Section',
|
|
|
|
|
// code: this.editModel.code,
|
|
|
|
|
// name: this.editModel.name,
|
|
|
|
|
// type: this.editModel.type,
|
|
|
|
|
// relStandCode: this.editModel.relStandCode,
|
|
|
|
|
// leftStopPointOffset: Number(this.editModel.leftStopPointOffset),
|
|
|
|
|
// rightStopPointOffset: Number(this.editModel.rightStopPointOffset),
|
|
|
|
|
// axleShow: this.editModel.axleShow,
|
|
|
|
|
// namePosition: {
|
|
|
|
|
// x: this.editModel.namePosition.x,
|
|
|
|
|
// y: this.editModel.namePosition.y
|
|
|
|
|
// },
|
|
|
|
|
// kmRangeRight: this.editModel.kmRangeRight,
|
|
|
|
|
// kmRangeLeft: this.editModel.kmRangeLeft,
|
|
|
|
|
// region: this.editModel.region,
|
|
|
|
|
// isStandTrack: this.editModel.isStandTrack,
|
|
|
|
|
// standTrackName: this.editModel.standTrackName,
|
|
|
|
|
// standTrackNamePosition: {
|
|
|
|
|
// x: this.editModel.standTrackNamePosition.x,
|
|
|
|
|
// y: this.editModel.standTrackNamePosition.y
|
|
|
|
|
// },
|
|
|
|
|
// isReentryTrack: this.editModel.isReentryTrack, // 是否折返轨
|
|
|
|
|
// reentryTrackName: this.editModel.reentryTrackName,
|
|
|
|
|
// reentryTrackNamePosition: {
|
|
|
|
|
// x: this.editModel.reentryTrackNamePosition.x,
|
|
|
|
|
// y: this.editModel.reentryTrackNamePosition.y
|
|
|
|
|
// },
|
|
|
|
|
// isSegmentation: this.editModel.isSegmentation,
|
|
|
|
|
// segmentationPosition: {
|
|
|
|
|
// x: this.editModel.segmentationPosition.x,
|
|
|
|
|
// y: this.editModel.segmentationPosition.y
|
|
|
|
|
// },
|
|
|
|
|
// isTransferTrack: this.editModel.isTransferTrack, // 是否转换轨
|
|
|
|
|
// transferTrackName: this.editModel.transferTrackName,
|
|
|
|
|
// transferTrackNamePosition: {
|
|
|
|
|
// x: this.editModel.transferTrackNamePosition.x,
|
|
|
|
|
// y: this.editModel.transferTrackNamePosition.y
|
|
|
|
|
// },
|
|
|
|
|
// logicSectionNameSort: this.editModel.logicSectionNameSort,
|
|
|
|
|
// isSwitchSection: this.editModel.isSwitchSection,
|
|
|
|
|
// relSwitchCode: this.editModel.relSwitchCode,
|
|
|
|
|
// points: JSON.parse(pointArr),
|
|
|
|
|
// logicSectionNum: this.editModel.logicSectionNum,
|
|
|
|
|
// logicSectionShow: this.editModel.logicSectionShow,
|
|
|
|
|
// sepTypeLeft: this.editModel.sepTypeLeft,
|
|
|
|
|
// offsetLeft: this.editModel.offsetLeft,
|
|
|
|
|
// sepTypeRight: this.editModel.sepTypeRight,
|
|
|
|
|
// offsetRight: this.editModel.offsetRight,
|
|
|
|
|
// stationCode: this.editModel.stationCode,
|
|
|
|
|
// trainPosType: this.editModel.trainPosType,
|
|
|
|
|
// linkCode: this.editModel.linkCode,
|
|
|
|
|
// isCurve: this.editModel.isCurve,
|
|
|
|
|
// destinationCodeShow: false
|
|
|
|
|
// };
|
|
|
|
|
// if (model.isReentryTrack || this.editModel.isTransferTrack) {
|
|
|
|
|
// model.destinationCode = this.editModel.destinationCode; // 目的地码
|
|
|
|
|
// model.destinationCodePoint = { // 目的地吗坐标
|
|
|
|
|
// x: this.editModel.destinationCodePoint.x,
|
|
|
|
|
// y: this.editModel.destinationCodePoint.y
|
|
|
|
|
// };
|
|
|
|
|
// model.destinationCodeShow = this.editModel.destinationCodeShow;
|
|
|
|
|
// }
|
|
|
|
|
// return model;
|
|
|
|
|
// },
|
|
|
|
|
edit() {
|
|
|
|
|
this.$refs['dataform'].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
const edits = [];
|
|
|
|
|
const model = this.buildEditModel();
|
|
|
|
|
const model = Object.assign({_type: 'Section'}, this.editModel);
|
|
|
|
|
model.points = JSON.stringify(model.points);
|
|
|
|
|
model.leftStopPointOffset = Number(model.leftStopPointOffset);
|
|
|
|
|
model.rightStopPointOffset = Number(model.rightStopPointOffset);
|
|
|
|
|
// const model = this.buildEditModel();
|
|
|
|
|
this.sectionList.forEach(section => {
|
|
|
|
|
if (section.parentCode == model.code) {
|
|
|
|
|
section.logicSectionShow = model.logicSectionShow;
|
|
|
|
@ -1271,6 +1336,11 @@ export default {
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.flex_box{
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/deep/ {
|
|
|
|
|
.card .el-transfer-panel__filter{
|
|
|
|
|
margin: 5px 15px;
|
|
|
|
|