Browse Source

绘制内容结算0115

zhiyuan-007 2 months ago
parent
commit
a89eb4daca

+ 7 - 2
src/components/mapJK.vue

@@ -593,6 +593,10 @@ export default {
       function showThreeCubeDetail(params){
         let status = params.status;
         let id = params.id;
+        let depthTest = params.depthTest;
+        if(depthTest == undefined){
+          depthTest = true;
+        }
         if(status == "hide"){
           if(addThreeCubeDetailInstance[id]){
             addThreeCubeDetailInstance[id].clear();
@@ -608,7 +612,8 @@ export default {
             view: m_view,
             points:params.points,
             size,
-            bus
+            bus,
+            depthTest
           });
           addThreeCubeDetailEvent.start();
           addThreeCubeDetailInstance[id] = addThreeCubeDetailEvent;
@@ -1426,7 +1431,7 @@ export default {
           if(socket){
             socket.send(JSON.stringify(params.flyList));
           }else{
-            socket = new WebSocket('ws://10.1.101.207:19259/aircraftRouteSpeedWebSocket');
+            socket = new WebSocket('ws://58.34.215.19:19259/aircraftRouteSpeedWebSocket');
             socket.onopen = () => {
               console.log('WebSocket 连接成功');
               socket.send(JSON.stringify(params.flyList));

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

+ 2 - 0
src/units/map/AddThreeCubeDetailEvent.js

@@ -9,6 +9,7 @@ class AddThreeCubeDetailEvent{
         this.bus = options.bus;
         this.points = options.points || []; // 初始点位(可为空)
         this.size = options.size; // 初始大小(可根据需求调整)
+        this.depthTest = options.depthTest;
         this.addThreeCubeEvent = null;
     }
 
@@ -26,6 +27,7 @@ class AddThreeCubeDetailEvent{
                 size:that.size,
                 points:this.points, // 初始为空,等待后续增量加载
                 webgl,
+                depthTest: this.depthTest,
                 mesh :null,
                 edgesReferences : [],
                 _camera : null,

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

@@ -24,7 +24,13 @@ class AddDrawEvent {
         this.sketchViewModel = new SketchViewModel({
             view: this.view,
             layer: this.graphicLayer,
-            defaultCreateOptions: {hasZ: this.hasZ}
+            defaultCreateOptions: {hasZ: this.hasZ},
+            defaultUpdateOptions:{
+                enableRotation: false, // 禁用旋转
+                enableScaling: false,  // 禁用缩放
+                toggleToolOnClick:false,  //不允许切换
+                tool: "reshape"        // 设置默认工具为 reshape
+            }
         });
     }
     start(symbol,type){

+ 2 - 1
src/units/threejs/threeCubeDetail.js

@@ -14,6 +14,7 @@ export const ThreeCubeDetailClass = {
         this.mouse =  options.mouse; // 鼠标位置
         this.callBackFunction = options.callBackFunction; // 回调函数
         this.mouseClickEvent = null;
+        this.depthTest = options.depthTest;    //false是优先级低,true是优先级高
     },
 
     initialize() {
@@ -76,7 +77,7 @@ export const ThreeCubeDetailClass = {
             map: texture,
             transparent: true,
             opacity: 0.5,
-            depthTest: true,
+            depthTest: this.depthTest,
             side: THREE.DoubleSide,
             depthWrite: false,
         });