Browse Source

低空修改250326-01

zhiyuan-007 5 days ago
parent
commit
777f14efe2
5 changed files with 14 additions and 9 deletions
  1. 7 2
      src/components/mapJK.vue
  2. 2 2
      src/components/mapTest.vue
  3. 1 1
      src/config/basicTool.json
  4. 2 2
      src/main.js
  5. 2 2
      src/units/threejs/flyGLTF.js

+ 7 - 2
src/components/mapJK.vue

@@ -2018,11 +2018,16 @@ export default {
           }, 2000); // 每2秒执行一次
         } else {
           // 状态非show时停止发送
-          if (getFixedFlyInstance[id].timerId !== null) {
+          debugger
+          if (getFixedFlyInstance[id]?.timerId !== null && getFixedFlyInstance[id]?.timerId !== undefined) {
             clearInterval(getFixedFlyInstance[id].timerId);
             getFixedFlyInstance[id].timerId = null;
-            getFixedFlyInstance[id] = null;
           }
+          getFixedFlyInstance[id] = null;
+          flyGLTF({
+            uavid:id,
+            status:"hide"
+          });
         }
       }
 

+ 2 - 2
src/components/mapTest.vue

@@ -75,8 +75,8 @@ export default {
       bridge = new CityGIS.Bridge({
         id:"i_map",
         //url:'https://cimweb.zjw.sh.cegn.cn:2007/map-tool-widget/#/jk_map',
-        //url:'http://localhost:5173/map-tool-widget/#/jk_map',
-        url: 'http://172.16.8.44:9250/map-tool-widget/#/jk_map',
+        url:'http://localhost:5173/map-tool-widget/#/jk_map',
+        //url: 'http://172.16.8.44:9250/map-tool-widget/#/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.eyJleHAiOjE3NDI4ODQzNzksImtleSI6IjkzNDkzMzIxIiwic2VydmljZU5vIjoiRDkwMDEwMDcxMjAyMzA4MDEiLCJ1c2VybmFtZSI6InB0Z2wifQ.DH5xs3Z9CRnSWr4TINknLKXX37AGYE36euh3NZlEfEQ",
+            "url": "https://cimweb.zjw.sh.cegn.cn:2008/MapServiceProxy/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NDMwNDExNzUsImtleSI6IjkzNDkzMzIxIiwic2VydmljZU5vIjoiRDkwMDEwMDcxMjAyMzA4MDEiLCJ1c2VybmFtZSI6InB0Z2wifQ.COZ3rKPYx-BhuGoMMgsdM_5koCxkhRdON9B3r8Vhslo",
             "token": ""
           }
         }

+ 2 - 2
src/main.js

@@ -6,8 +6,8 @@ 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 = '/map-tool-widget/assets';
+esriConfig.assetsPath = '/public/assets';
+//esriConfig.assetsPath = '/map-tool-widget/assets';
 import mitt from 'mitt'
 app.use(ElementPlus, {
     locale: zhCn,

+ 2 - 2
src/units/threejs/flyGLTF.js

@@ -69,8 +69,8 @@ export const FlyGLTFClass = {
     loadGLTF(){
         const loader = new GLTFLoader();
         let that = this;
-        loader.load('public/gltf/mtwrj.glb', function (gltf) {
-            gltf.scene.scale.set(6, 6, 6);
+        loader.load('public/gltf/wrj.glb', function (gltf) {
+            gltf.scene.scale.set(1, 1, 1);
             that.scene.add(gltf.scene);
             that.targetObject = gltf.scene;