Browse Source

绘制内容结算12.27

zhiyuan-007 3 months ago
parent
commit
b587ed26b3

+ 1 - 1
package.json

@@ -4,7 +4,7 @@
   "version": "0.0.0",
   "type": "module",
   "scripts": {
-    "dev": "vite",
+    "dev": "vite --host",
     "build": "vite build",
     "preview": "vite preview",
     "copy": "ncp ./node_modules/@arcgis/core/assets ./public/assets",

+ 5 - 3
src/components/mapJK.vue

@@ -1181,7 +1181,7 @@ export default {
           return
         }
         //优化数据
-        params.paths = Path.paths;
+        //params.paths = Path.paths;
         debugger
         let pathPipeEvent = new PathPipeEvent({
           view:m_view,
@@ -1406,16 +1406,18 @@ export default {
 
       function featurePolygonPlotting(params){
         let status = params.status;
-        let f_layer = m_map.layers.find(item => item.id === "featurePointsPlottingEvent");
+        let f_layer = m_map.layers.find(item => item.id === "featurePolygonPlottingEvent");
         if (f_layer) {
           m_map.remove(f_layer);
         }
         if(status == "hide"){
           return
         }
+        debugger
         featurePointsPlottingEvent = new FeaturePolygonPlottingEvent({
           view:m_view,
-          data:params.data
+          data:params.data,
+          color:params.color
         })
         m_map.add(featurePointsPlottingEvent.featureLayer);
       }

+ 2 - 2
src/components/mapTest.vue

@@ -74,8 +74,8 @@ export default {
       //加载地图插件
       bridge = new CityGIS.Bridge({
         id:"i_map",
-        url:'http://localhost:5174/#/jk_map',
-        //url:'https://10.90.11.49:2002/VUE-Map-Tool-Widget/#/jk_map',
+        url:'https://cimweb.zjw.sh.cegn.cn:2007/map-tool-widget-4301227/#/jk_map',
+        //url:'https://cimweb.zjw.sh.cegn.cn:2007/map-tool-widget-4301227/#/jk_map',
         onReady:function (){
           // console.log("地图创建完成");
         }

+ 1 - 1
src/config/basicTool.json

@@ -42,7 +42,7 @@
             "title":"BaseMap",
             "visible": true,
             "opacity": 1,
-            "url": "https://cimweb.zjw.sh.cegn.cn:2008/MapServiceProxy/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MzUyNjMxMzMsImtleSI6IjkzNDkzMzIxIiwic2VydmljZU5vIjoiRDkwMDEwMDcxMjAyMzA4MDEiLCJ1c2VybmFtZSI6InB0Z2wifQ.M5MIHF4a3EA3CDWRh2k9IhJ0orr0gglTdY3t70XbSOA",
+            "url": "https://cimweb.zjw.sh.cegn.cn:2008/MapServiceProxy/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MzUzNTIzMDgsImtleSI6IjkzNDkzMzIxIiwic2VydmljZU5vIjoiRDkwMDEwMDcxMjAyMzA4MDEiLCJ1c2VybmFtZSI6InB0Z2wifQ.DJG8sex0Ud6LBm7qKzy1FYIwyAkNwwyUbBElNTAQifU",
             "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,

+ 8 - 6
src/units/map/FeaturePolygonPlottingEvent.js

@@ -6,6 +6,7 @@ class FeaturePolygonPlottingEvent {
     constructor(options) {
         this.view = options.view;
         this.data = options.data;
+        this.color = options.color;
         this.featureLayer = null;
         this.add();
     }
@@ -42,12 +43,13 @@ class FeaturePolygonPlottingEvent {
                             type: "extrude",
                             size: 300,
                             material: {
-                                color: [
-                                    4,
-                                    138,
-                                    255,
-                                    0.3
-                                ]
+                                color: this.color
+                                // color: [
+                                //     4,
+                                //     138,
+                                //     255,
+                                //     0.3
+                                // ]
                             }
                         }
                     ]

+ 1 - 1
vite.config.js

@@ -33,6 +33,6 @@ export default defineConfig({
     }
   },
   plugins: [vue()],
-  base:'./',
+  base:'/map-tool-widget-4301227/',
   publicDir: resolve('static'),
 })