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/aiMonitorArea/DtAiMonitorArea.data.ts b/src/views/military/modules/ai/aiMonitorArea/DtAiMonitorArea.data.ts index b8dbd37..e82c229 100644 --- a/src/views/military/modules/ai/aiMonitorArea/DtAiMonitorArea.data.ts +++ b/src/views/military/modules/ai/aiMonitorArea/DtAiMonitorArea.data.ts @@ -18,7 +18,7 @@ export const columns: BasicColumn[] = [ title: '监控相机', align: 'center', dataIndex: 'cameraId_dictText', - width: 150, + width: 200, }, { title: '监控模型', @@ -36,6 +36,11 @@ export const columns: BasicColumn[] = [ align: 'center', dataIndex: 'drawdata', }, + { + title: '所属场景', + align: 'center', + dataIndex: 'sceneId_dictText', + }, // , // { // title: '备注', @@ -43,11 +48,6 @@ export const columns: BasicColumn[] = [ // dataIndex: 'remark', // }, // { - // title: '备用2', - // align: "center", - // dataIndex: 'field2' - // }, - // { // title: '备用3', // align: "center", // dataIndex: 'field3' diff --git a/src/views/military/modules/ai/aiMonitorArea/checkCom/CheckCom.vue b/src/views/military/modules/ai/aiMonitorArea/checkCom/CheckCom.vue index bc144e5..d5ca818 100644 --- a/src/views/military/modules/ai/aiMonitorArea/checkCom/CheckCom.vue +++ b/src/views/military/modules/ai/aiMonitorArea/checkCom/CheckCom.vue @@ -1,3 +1,9 @@ +