Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
5ef9b0aaaf
@ -1005,26 +1005,15 @@ export default {
|
|||||||
edit() {
|
edit() {
|
||||||
this.$refs['dataform'].validate(valid => {
|
this.$refs['dataform'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (
|
if (this.editModel.type === '03' && this.editModel.leftSectionCode && this.editModel.rightSectionCode) {
|
||||||
this.editModel.type === '03' &&
|
|
||||||
this.editModel.leftSectionCode &&
|
|
||||||
this.editModel.rightSectionCode
|
|
||||||
) {
|
|
||||||
this.$messageBox('道岔区段应仅有一侧关联区段!');
|
this.$messageBox('道岔区段应仅有一侧关联区段!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let models = [];
|
let models = [];
|
||||||
const model = deepAssign(this.editModel, {
|
const model = deepAssign(this.editModel, { _type: 'Section' }); // 修改元素model
|
||||||
_type: 'Section'
|
if (model.lengthFact > 5 && (model.transferTrack || model.reentryTrack || model.standTrack)) {
|
||||||
}); // 修改元素model
|
model.leftStopPointOffset = model.leftStopPointOffset || 5;
|
||||||
if (
|
model.rightStopPointOffset = model.rightStopPointOffset || model.lengthFact - 5;
|
||||||
model.lengthFact > 5 &&
|
|
||||||
(model.transferTrack ||
|
|
||||||
model.reentryTrack ||
|
|
||||||
model.standTrack)
|
|
||||||
) {
|
|
||||||
model.leftStopPointOffset = 5;
|
|
||||||
model.rightStopPointOffset = model.lengthFact - 5;
|
|
||||||
}
|
}
|
||||||
const changeSectionList = this.handleOtherSectionChange(model);
|
const changeSectionList = this.handleOtherSectionChange(model);
|
||||||
models = [model, ...changeSectionList];
|
models = [model, ...changeSectionList];
|
||||||
@ -1091,9 +1080,8 @@ export default {
|
|||||||
lengthFact += model.lengthFact;
|
lengthFact += model.lengthFact;
|
||||||
copySection.lengthFact = lengthFact.toFixed(3); // 自动获取 物理区段的 实际长度 是由逻辑区段相加
|
copySection.lengthFact = lengthFact.toFixed(3); // 自动获取 物理区段的 实际长度 是由逻辑区段相加
|
||||||
if (copySection.lengthFact > 5) {
|
if (copySection.lengthFact > 5) {
|
||||||
copySection.leftStopPointOffset = 5;
|
copySection.leftStopPointOffset = copySection.leftStopPointOffset || 5;
|
||||||
copySection.rightStopPointOffset =
|
copySection.rightStopPointOffset = copySection.rightStopPointOffset || copySection.lengthFact - 5;
|
||||||
copySection.lengthFact - 5;
|
|
||||||
}
|
}
|
||||||
updataFlag = true;
|
updataFlag = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user