diff --git a/src/views/earthMap/edit/EarthComp.vue b/src/views/earthMap/edit/EarthComp.vue
index 6667ccc..9e50e40 100644
--- a/src/views/earthMap/edit/EarthComp.vue
+++ b/src/views/earthMap/edit/EarthComp.vue
@@ -813,14 +813,19 @@
// this.createRealTimeObj(earthUI)
//监听鼠标事件
this.listenMouseHandler(earthUI);
- // 获取部门信息
- await this.getSceneInfo();
+
+
+ // 获取部门信息 //已弃用
+ // await this.getSceneInfo();
+ // 新的飞入方法
+ await this.newfly();
//加载地图线路资源
await this.createBBHLine(earthUI);
- //飞入地点
- await this.fly();
+ //飞入地点 //已弃用
+ // await this.fly();
+
//创建工具栏
// console.log("earthUI",earthUI);
@@ -841,6 +846,40 @@
});
}
+ //新的飞入方法 20231222
+ async newfly(){
+ let position, rotation, viewDistance, duration;
+ const sceneId = this.userStore.userInfo?.sceneId;
+ await defHttp.get({
+ url: '/military/msMapScene/list',
+ params: {
+ pageNo: 1,
+ pageSize: 999,
+ sceneCode: sceneId + "*",
+ column: 'sceneCode',
+ order: 'asc',
+ }
+ }, { isTransformResponse: false }).then((response) => {
+ console.log("newfly",response);
+ // 设置岛屿信息为数组
+ this.sceneInfo = response.result.records;
+ return response.result.records;
+ }).then((res)=>{
+ //飞入
+ position = [res[0].cameraLon, res[0].cameraLat, res[0].cameraAltitude];
+ rotation = [res[0].rotationX, res[0].rotationY, res[0].rotationZ];
+ viewDistance = res[0].viewDistance;
+ duration = res[0].duration;
+ this._earth.camera.flyTo(position, viewDistance, rotation, duration);
+ // 地图复原事件
+ window.$flyTo = this.flyTo = () => {
+ this._earth.camera.flyTo(position, viewDistance, rotation, duration);
+ };
+ })
+
+ }
+
+ //已弃用
async fly() {
let position, rotation, viewDistance, duration;
//
@@ -935,6 +974,7 @@
};
}
+ //已弃用
async getSceneInfo() {
// 登录人部门信息
// const orgCode = Vue.ls.get(USER_INFO).orgCode;
@@ -956,7 +996,7 @@
order: 'asc',
}
}, { isTransformResponse: false }).then((response) => {
- // console.log("response",response);
+ console.log("总部",response);
const records = response.result.records
// 设置岛屿信息为数组
@@ -965,7 +1005,7 @@
});
} else {
await defHttp.get({ url: '/military/msMapScene/queryByOrgCode', params: { orgCode: orgCode } }, { isTransformResponse: false }).then((response) => {
-
+ console.log("岛屿",response);
const data = response.result;
// 设置岛屿信息为Object
this.sceneInfo = data;
@@ -998,7 +1038,7 @@
}
}
/* 使用async/await 处理异步方法顺序执行。成功的操作放到try里,失败的放在catch里 */
- async createBBHLine(earthUI =null) {
+ async createBBHLine(earthUI= null) {
let models: any = null;
let type = 0;
if (!(this.sceneInfo instanceof Array)) {
@@ -1014,7 +1054,7 @@
models = {
ref: 'main',
expand: true,
- title: '岛礁',
+ title: this.sceneInfo[0].sceneName,
children: [],
};
for (let record of this.sceneInfo) {
@@ -1029,7 +1069,7 @@
});
}
}
- // console.log('models',models);
+ console.log('models',models);
// 加载区域
// console.log("加载区域");
diff --git a/src/views/earthMap/show/EarthComp.vue b/src/views/earthMap/show/EarthComp.vue
index abd6801..93686bc 100644
--- a/src/views/earthMap/show/EarthComp.vue
+++ b/src/views/earthMap/show/EarthComp.vue
@@ -993,7 +993,7 @@
});
}
}
- // console.log('models',models);
+ console.log('models1',models);
// 加载区域
// console.log("加载区域");
diff --git a/src/views/military/modules/ai/monitorArea/DtMonitorAreaList.vue b/src/views/military/modules/ai/monitorArea/DtMonitorAreaList.vue
index c0f7afc..0ab9a1a 100644
--- a/src/views/military/modules/ai/monitorArea/DtMonitorAreaList.vue
+++ b/src/views/military/modules/ai/monitorArea/DtMonitorAreaList.vue
@@ -102,7 +102,8 @@
import { defHttp } from '/@/utils/http/axios';
import DtMonitorDeviceList from './areaDevice/DtMonitorDeviceList.vue';
import MonitorAreaLinkageList from './linkageDevice/MonitorAreaLinkageList.vue';
-
+ import { useUserStore } from '/@/store/modules/user';
+ const userStore = useUserStore();
const deviceInfo = ref(); //表格信息
// 区域设备表
const AreaDeviceShow = ref(false);
@@ -131,6 +132,7 @@
fixed: 'right',
},
beforeFetch: (params) => {
+ // params.sceneId = userStore.userInfo?.sceneId + '*';
return Object.assign(params, queryParam);
},
},
diff --git a/src/views/military/modules/ai/monitorArea/components/DtMonitorAreaForm.vue b/src/views/military/modules/ai/monitorArea/components/DtMonitorAreaForm.vue
index 4f58e1f..987565d 100644
--- a/src/views/military/modules/ai/monitorArea/components/DtMonitorAreaForm.vue
+++ b/src/views/military/modules/ai/monitorArea/components/DtMonitorAreaForm.vue
@@ -78,7 +78,7 @@
-
+