From 439e9194c67b49e8a2c3293af819100adf151d35 Mon Sep 17 00:00:00 2001 From: lVAL Date: Thu, 22 Oct 2020 18:20:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9AUSTool=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/theme/aus_00/planConvert.js | 23 ++++ src/utils/baseUrl.js | 4 +- src/views/planMonitor/editToolAUS/index.vue | 106 +++++++++++-------- src/views/planMonitor/editToolAUS/monitor.js | 45 +++++--- 4 files changed, 116 insertions(+), 62 deletions(-) diff --git a/src/jmapNew/theme/aus_00/planConvert.js b/src/jmapNew/theme/aus_00/planConvert.js index e77b4e1ad..518365cb6 100644 --- a/src/jmapNew/theme/aus_00/planConvert.js +++ b/src/jmapNew/theme/aus_00/planConvert.js @@ -233,5 +233,28 @@ export default { } } return null; + }, + + /** 检查公里表是否超出范围*/ + limitAreaKmRange(stations, model) { + const closerKmRange = model.closerKmRange||0; + const fartherKmRange = model.fartherKmRange||0; + const length = stations.length; + const last = stations[length-1]||{}; + const minRange = this.EdgeHeight/2; + const maxRange = last.kmRange; + + if (closerKmRange < minRange) { + const offset = closerKmRange - minRange + model.closerKmRange = minRange; + model.fartherKmRange -= offset; + return Math.abs(offset) > 2; + } else if (fartherKmRange > maxRange) { + const offset = fartherKmRange - maxRange; + model.fartherKmRange = maxRange; + model.closerKmRange -= offset; + return Math.abs(offset) > 2; + } + return false; } }; diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index b84a0c2ce..8ba0bf0ce 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,8 +2,8 @@ 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 = 'http://192.168.3.5:9000'; // 袁琪 + // BASE_API = 'https://test.joylink.club/jlcloud'; + BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.169:9000'; // 旭强 // BASE_API = 'http://192.168.3.175:9000'; // 张赛 // BASE_API = 'http://192.168.3.82:9008'; // 杜康 diff --git a/src/views/planMonitor/editToolAUS/index.vue b/src/views/planMonitor/editToolAUS/index.vue index 86ebc2301..dc0a22177 100644 --- a/src/views/planMonitor/editToolAUS/index.vue +++ b/src/views/planMonitor/editToolAUS/index.vue @@ -12,6 +12,7 @@ @clear="onClear" @create="onCreate" @translate="onTranslate" + @refresh="refresh" >