From ccf186e98e4b3e9810986577d6b66326f7a0bb4d Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Thu, 14 May 2020 16:54:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=8C=BA=E6=AE=B5=E5=81=9C?= =?UTF-8?q?=E8=BD=A6=E7=82=B9=E5=81=8F=E7=A7=BB=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/baseUrl.js | 4 +-- .../newMapdraft/mapoperate/section/index.vue | 26 +++++-------------- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 7cedc6817..e9046878d 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,9 +2,9 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - // BASE_API = 'https://test.joylink.club/jlcloud'; + BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.3.5:9000'; // 袁琪 - BASE_API = 'http://192.168.3.6:9000'; // 旭强 + // BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.41:9000'; // 张赛 // BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://192.168.3.41:9000'; // 张赛 diff --git a/src/views/newMap/newMapdraft/mapoperate/section/index.vue b/src/views/newMap/newMapdraft/mapoperate/section/index.vue index 1b958e548..26866d41b 100644 --- a/src/views/newMap/newMapdraft/mapoperate/section/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/section/index.vue @@ -1005,26 +1005,15 @@ export default { edit() { this.$refs['dataform'].validate(valid => { if (valid) { - if ( - this.editModel.type === '03' && - this.editModel.leftSectionCode && - this.editModel.rightSectionCode - ) { + if (this.editModel.type === '03' && this.editModel.leftSectionCode && this.editModel.rightSectionCode) { this.$messageBox('道岔区段应仅有一侧关联区段!'); return; } let models = []; - const model = deepAssign(this.editModel, { - _type: 'Section' - }); // 修改元素model - if ( - model.lengthFact > 5 && - (model.transferTrack || - model.reentryTrack || - model.standTrack) - ) { - model.leftStopPointOffset = 5; - model.rightStopPointOffset = model.lengthFact - 5; + const model = deepAssign(this.editModel, { _type: 'Section' }); // 修改元素model + if (model.lengthFact > 5 && (model.transferTrack || model.reentryTrack || model.standTrack)) { + model.leftStopPointOffset = model.leftStopPointOffset || 5; + model.rightStopPointOffset = model.rightStopPointOffset || model.lengthFact - 5; } const changeSectionList = this.handleOtherSectionChange(model); models = [model, ...changeSectionList]; @@ -1091,9 +1080,8 @@ export default { lengthFact += model.lengthFact; copySection.lengthFact = lengthFact.toFixed(3); // 自动获取 物理区段的 实际长度 是由逻辑区段相加 if (copySection.lengthFact > 5) { - copySection.leftStopPointOffset = 5; - copySection.rightStopPointOffset = - copySection.lengthFact - 5; + copySection.leftStopPointOffset = copySection.leftStopPointOffset || 5; + copySection.rightStopPointOffset = copySection.rightStopPointOffset || copySection.lengthFact - 5; } updataFlag = true; }