Browse Source

绘制内容结算0119

zhiyuan-007 19 hours ago
parent
commit
4d4327a201
4 changed files with 8 additions and 3 deletions
  1. 1 1
      src/config/basicTool.json
  2. 1 1
      src/main.js
  3. 0 1
      src/units/map/addDrawEvent.js
  4. 6 0
      vite.config.js

+ 1 - 1
src/config/basicTool.json

@@ -58,7 +58,7 @@
             "title":"WhiteMold",
             "visible": true,
             "opacity": 1,
-            "url": "https://cimweb.zjw.sh.cegn.cn:2008/MapServiceProxy/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MzUyNjMzNjcsImtleSI6IjA1MTk1NDE4Iiwic2VydmljZU5vIjoiRDkwMDMwMDA2MjAyMzA4MDEiLCJ1c2VybmFtZSI6InB0Z2wifQ.J6UYdLt30bDAoPHRHqt5Yh5mgaGsyu0R94TP_hvo5s0",
+            "url": "https://cimweb.zjw.sh.cegn.cn:2008/MapServiceProxy/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MzczNzExNjgsImtleSI6IjA1MTk1NDE4Iiwic2VydmljZU5vIjoiRDkwMDMwMDA2MjAyMzA4MDEiLCJ1c2VybmFtZSI6InB0Z2wifQ.6sMjNd4Faz9ZaxOw_GYNip8ww8GRMLZfKRF3xcoEKgo/SceneServer",
             "token": ""
           }
         }

+ 1 - 1
src/main.js

@@ -6,7 +6,7 @@ import '@arcgis/core/assets/esri/themes/dark/main.css'
 import router from "./router/index.js";
 import './assets/global.scss'
 import esriConfig from  '@arcgis/core/config.js'
-//esriConfig.assetsPath = '/public/assets';
+esriConfig.assetsPath = '/public/assets';
 import mitt from 'mitt'
 app.use(ElementPlus, {
     locale: zhCn,

+ 0 - 1
src/units/map/addDrawEvent.js

@@ -50,7 +50,6 @@ class AddDrawEvent {
         this.sketchViewModel.create(type);
     }
     update(){
-        debugger
         if(this.path){
             const predefinedPath = {
                 type: "polyline",

+ 6 - 0
vite.config.js

@@ -9,6 +9,12 @@ import vue from '@vitejs/plugin-vue'
 export default defineConfig({
   server:{
     cors: true,
+    resolve: {
+      alias: {
+        // 将 ArcGIS API 本地路径指向 node_modules 中的 `@arcgis/core`
+        '@arcgis/core': path.resolve(__dirname, 'node_modules/@arcgis/core')
+      }
+    },
     proxy: {
       '/api': {
         // 代理请求之后的请求地址(你的真实接口地址)