From a31655ccc56220ee027c22927a9bd55430d2a210 Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期五, 25 八月 2023 17:48:18 +0800 Subject: [PATCH] 配置文件修改,图层对比修改 --- src/utils/request.js | 4 ++-- src/views/layer/doubleLayer.vue | 6 +++--- public/config/config.js | 5 ++++- src/assets/js/Map/config.js | 19 ++++++++----------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/public/config/config.js b/public/config/config.js index 55a5acb..f6a3fee 100644 --- a/public/config/config.js +++ b/public/config/config.js @@ -1,2 +1,5 @@ const BASE_URL = "http://192.168.20.83:8088/MoonServer/"; //鍚庣鎺ュ彛鍦板潃 -// const BASE_URL = "http://192.168.20.106:9000/MoonServer/"; //鍚庣鎺ュ彛鍦板潃 \ No newline at end of file +// const BASE_URL = "http://192.168.20.106:9000/MoonServer/"; //鍚庣鎺ュ彛鍦板潃 + + +var isWeb = location.hostname.indexOf("103.85.165.") > -1; \ No newline at end of file diff --git a/src/assets/js/Map/config.js b/src/assets/js/Map/config.js index 7eccce8..b4f5ec7 100644 --- a/src/assets/js/Map/config.js +++ b/src/assets/js/Map/config.js @@ -1,7 +1,9 @@ //鏄惁涓虹敓浜х幆澧� -const isWeb = true; +var isWeb = location.hostname.indexOf("103.85.165.") > -1; //鏄惁涓虹敓浜х幆澧� -const webUrl = isWeb ? "/web" : ""; +const webUrl = location.href.indexOf("/web") > -1 ? "/web" : ""; + +var webHost = isWeb ? "103.85.165.99" + ":28888" : '192.168.20.83' + ":8888"; //閰嶇疆鏂囦欢鍦板潃 const config = { mapMoon: webUrl + "/mapscreen/index.html", @@ -11,15 +13,10 @@ licenseServer: "http://183.162.245.49:18080", //SDK璁稿彲 StaticFileBaseUrl: webUrl + "/CIMSDK/", - //tmsserver - moonTms: "http://172.16.2.10:50001/sj_raster/v6/service/10003901/1/tms.xml", - //Wmtsserver - moonWmts: - "http://172.16.2.10:50001/sj_raster/v6/wmts/service/system/10000201/3?ak=mf72ff9295c740ec0f37e61433e8a3ad8d&srs=ESRI:104903", - proxy: "http://192.168.20.83:8088/MoonServer", - //鍦板舰 - moonTerrain: "http://172.16.2.10:50001/sj_raster/v6/terrain_mesh/10013901/45", - BASE_URL: "http://192.168.20.83:8088/MoonServer", + + proxy: "http://" + webHost + "/MoonServer", + + BASE_URL: "http://" + webHost + "/MoonServer", conditions: [ ["=", "<>", "like"], [">=", ">", " =", "<=", "<", "<>"], diff --git a/src/utils/request.js b/src/utils/request.js index 6c597b8..b24edba 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -10,10 +10,10 @@ import router from "@/router/index"; import { getToken } from "@/utils/auth"; - +import config from "../assets/js/Map/config"; // create an axios instance const service = axios.create({ - baseURL: BASE_URL, // api鐨刡ase_url + baseURL: config.BASE_URL, // api鐨刡ase_url timeout: 35000, // 璇锋眰瓒呮椂鏃堕棿 // headers: { // "content-type": "application/json;charset=UTF-8", diff --git a/src/views/layer/doubleLayer.vue b/src/views/layer/doubleLayer.vue index ee246a4..26535af 100644 --- a/src/views/layer/doubleLayer.vue +++ b/src/views/layer/doubleLayer.vue @@ -253,12 +253,12 @@ const dt = await perms_selectLayers(); if (dt.code == 200) { treeData.value = setTreeData(dt.result).sort(function (a, b) { - return a.sort - b.sort; + return a.orderNum - b.orderNum; }); var std = []; var terrainId = null; dt.result.filter((res) => { - if (res.isLayer == 1 && res.status == 1) { + if (res.isLayer == 1 && res.isShow == 1) { if (res.type == 1 && res.data == 2) { if (!terrainId) { terrainId = res.id; @@ -290,7 +290,7 @@ let branchArr = cloneData.filter((child) => father.id == child.pid); if (branchArr.length > 0) { branchArr.sort(function (a, b) { - return a.sort - b.sort; + return a.orderNum - b.orderNum; }); } -- Gitblit v1.9.3