Browse Source

绘制内容结算0119

zhiyuan-007 23 hours ago
parent
commit
f7663ce28c
3 changed files with 6 additions and 6 deletions
  1. 2 3
      src/components/mapJK.vue
  2. 1 1
      src/config/basicTool.json
  3. 3 2
      src/units/map/addDrawEvent.js

+ 2 - 3
src/components/mapJK.vue

@@ -1837,12 +1837,11 @@ export default {
             path:path,
             hasZ
           });
-          addDrawEvent.start(symbol,geometryType);
-        }else{
-          addDrawEvent.start(symbol,geometryType);
         }
         if(path){
           addDrawEvent.update();
+        }else{
+          addDrawEvent.start(symbol,geometryType);
         }
         addDrawEvent.createListenerEvent((geometry) =>{
           bus.emit('SendMessage',{

+ 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.eyJleHAiOjE3MzY5OTYwMTQsImtleSI6IjkzNDkzMzIxIiwic2VydmljZU5vIjoiRDkwMDEwMDcxMjAyMzA4MDEiLCJ1c2VybmFtZSI6InB0Z2wifQ.Rhc3Yxcx4JKliP5aqBhkIcRLFdBajx2VymHWmNGHSuw",
+            "url": "https://cimweb.zjw.sh.cegn.cn:2008/MapServiceProxy/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MzczNTkzMDQsImtleSI6IjkzNDkzMzIxIiwic2VydmljZU5vIjoiRDkwMDEwMDcxMjAyMzA4MDEiLCJ1c2VybmFtZSI6InB0Z2wifQ.oAFlepo9-LzFo6RxcbrXTJBIlyyEKAReYyRyn7Ks8rE",
             "token": ""
           }
         }

+ 3 - 2
src/units/map/addDrawEvent.js

@@ -50,6 +50,7 @@ class AddDrawEvent {
         this.sketchViewModel.create(type);
     }
     update(){
+        debugger
         if(this.path){
             const predefinedPath = {
                 type: "polyline",
@@ -62,8 +63,8 @@ class AddDrawEvent {
             });
             this.graphicLayer.add(this.graphic);
         }
-        const updateOptions = { tool: "reshape", highlightOptions: { enabled: false }};
-        this.sketchViewModel.update([this.graphic],updateOptions);
+        // const updateOptions = { tool: "reshape", highlightOptions: { enabled: false }};
+        // this.sketchViewModel.update([this.graphic],updateOptions);
     }
     createListenerEvent(callback){
         this.clearCreateListenerEvent()