From 6efe63bb2a94ea2f3093a7408dfb7254a6dbb240 Mon Sep 17 00:00:00 2001 From: DIAMOND <276397553@qq.com> Date: Mon, 25 Dec 2023 16:05:37 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E5=AD=97=E6=AE=B5SceneId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2.地球edit 暂时无法使用 --- src/views/earthMap/edit/EarthComp.vue | 160 +- src/views/earthMap/edit/EarthComp20231225.vue | 4707 +++++++++++++++++ src/views/earthMap/show/EarthComp.vue | 10 +- .../components/DtAiMonitorAreaForm.vue | 4 +- .../monitorArea/components/VCEarthViewer.vue | 2 +- .../earthMap/mapManage/modal/MapModel.vue | 6 +- .../modules/earthMap/scene/SceneManage.vue | 48 +- .../modules/earthMap/scene/model/Modal.vue | 8 +- .../scene/model/sceneInfo/SenceInfo.vue | 10 +- .../mapScene/components/MsMapSceneForm.vue | 6 +- 10 files changed, 4772 insertions(+), 189 deletions(-) create mode 100644 src/views/earthMap/edit/EarthComp20231225.vue diff --git a/src/views/earthMap/edit/EarthComp.vue b/src/views/earthMap/edit/EarthComp.vue index 9e50e40..61558a5 100644 --- a/src/views/earthMap/edit/EarthComp.vue +++ b/src/views/earthMap/edit/EarthComp.vue @@ -814,40 +814,19 @@ //监听鼠标事件 this.listenMouseHandler(earthUI); - - // 获取部门信息 //已弃用 - // await this.getSceneInfo(); - // 新的飞入方法 - await this.newfly(); + // 飞入方法 + await this.fly(); //加载地图线路资源 await this.createBBHLine(earthUI); - - //飞入地点 //已弃用 - // await this.fly(); - - + //创建工具栏 - // console.log("earthUI",earthUI); - this.toolbarShow = true - // window.$flyTo = this.flyTo - // console.log("window.$flyTo",window); - // console.log("this.flyTo",this); - // earthUI.showPropertyWindow( - // { - // flyTo: this.flyTo, - // setLabelStatus: this.setLabelStatus, - // }, - // { - // component: Toolbar, - // } - // ); - + }); } - //新的飞入方法 20231222 - async newfly(){ + //飞入方法 20231222 + async fly(){ let position, rotation, viewDistance, duration; const sceneId = this.userStore.userInfo?.sceneId; await defHttp.get({ @@ -855,8 +834,8 @@ params: { pageNo: 1, pageSize: 999, - sceneCode: sceneId + "*", - column: 'sceneCode', + sceneId: sceneId + "*", + column: 'sceneId', order: 'asc', } }, { isTransformResponse: false }).then((response) => { @@ -879,63 +858,6 @@ } - //已弃用 - async fly() { - let position, rotation, viewDistance, duration; - // - let parentData = - this.sceneInfo instanceof Array - ? this.sceneInfo.filter((item, index) => { - return item.sceneCode == "00001-00001"; - }) - : this.sceneInfo; - //过滤掉总部层级的 - let data = this.sceneInfo instanceof Array ? - this.sceneInfo.filter((item, index) => { - return item.sceneCode.length > 3; - }) - : this.sceneInfo; - // console.log("data",data); - // console.log("this.sceneInfo",this.sceneInfo); - if (data) { - if (!(data instanceof Array)) { - // debugger; - // 各岛礁 - // position = [data.lon, data.lat, data.altitude]; - position = [data.cameraLon, data.cameraLat, data.cameraAltitude]; - rotation = [data.rotationX, data.rotationY, data.rotationZ]; - viewDistance = data.viewDistance; - duration = data.duration ? data.duration : 0; - this._earth.camera.flyTo(position, viewDistance, rotation, duration); - // 地图复原事件 - window.$flyTo = this.flyTo = () => { - this._earth.camera.flyTo(position, viewDistance, rotation, duration); - }; - } else { - // 总指挥中心 - // position = [parentData[0].lon, parentData[0].lat, parentData[0].altitude]; - position = [parentData[0].cameraLon, parentData[0].cameraLat, parentData[0].cameraAltitude]; - rotation = [parentData[0].rotationX, parentData[0].rotationY, parentData[0].rotationZ]; - viewDistance = parentData[0].viewDistance; - duration = parentData[0].duration; - // 先飞入到能看见红旗 - this._earth.camera.flyTo(position, viewDistance, rotation, duration); - // 地图复原事件 - window.$flyTo = this.flyTo = () => { - this._earth.camera.flyTo(position, viewDistance, rotation, duration); - }; - for (let record of data) { - if (record.sceneCode.length == 11) { - continue; - } - // 设置红旗 - this.setLoginPoint(record); - } - } - } else { - // 没权限人员控制 - } - } setLoginPoint(data) { let position = [data.lon, data.lat, 0]; @@ -974,45 +896,6 @@ }; } - //已弃用 - async getSceneInfo() { - // 登录人部门信息 - // const orgCode = Vue.ls.get(USER_INFO).orgCode; - // const userStore = useUserStore() - const orgCode = this.userStore.userInfo?.orgCode; - this.orgCode = orgCode; - // console.log("orgCode",orgCode); - - // 登录人部门信息长度为3则为总部,否则为岛屿 - if (orgCode.length == 3) { - // 总部 - await defHttp.get({ - url: '/military/msMapScene/list', - params: { - pageNo: 1, - pageSize: 999, - sceneCode: "00001-00001*", - column: 'sysOrgCode', - order: 'asc', - } - }, { isTransformResponse: false }).then((response) => { - console.log("总部",response); - - const records = response.result.records - // 设置岛屿信息为数组 - this.sceneInfo = records; - return records; - }); - } 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; - return data; - }); - } - } //设置按钮颜色状态 setIconByRef(ref, el) { @@ -1039,36 +922,27 @@ } /* 使用async/await 处理异步方法顺序执行。成功的操作放到try里,失败的放在catch里 */ async createBBHLine(earthUI= null) { - let models: any = null; - let type = 0; - if (!(this.sceneInfo instanceof Array)) { - type = 2; - models = { - ref: 'areas', - expand: true, - title: '岛礁', - children: [], - }; - } else { - type = 1; - models = { + console.log("MyScene",this.userStore.userInfo?.sceneId); + let type = 1; //** + + let models: any = { ref: 'main', expand: true, title: this.sceneInfo[0].sceneName, children: [], - }; + } for (let record of this.sceneInfo) { - if (record.parentSceneCode.length == 5) { + if (record.sceneId == this.userStore.userInfo?.sceneId) { continue; } models.children.push({ - ref: record.sysOrgCode, + ref: record.sceneId, expand: false, title: record.sceneName, children: [], }); } - } + console.log('models',models); // 加载区域 @@ -1774,6 +1648,8 @@ return new Promise((resolve, reject) => { //请求地图标志信息 defHttp.get({ url: this.url.queryLabelList }, { isTransformResponse: false }).then(async (res) => { + console.log("请求地图标志信息",res); + if (res.success) { const labelItems = await this.setLabel(res.result, models, type); resolve(labelItems); diff --git a/src/views/earthMap/edit/EarthComp20231225.vue b/src/views/earthMap/edit/EarthComp20231225.vue new file mode 100644 index 0000000..b5fd18e --- /dev/null +++ b/src/views/earthMap/edit/EarthComp20231225.vue @@ -0,0 +1,4707 @@ + + + + + + diff --git a/src/views/earthMap/show/EarthComp.vue b/src/views/earthMap/show/EarthComp.vue index 93686bc..86d1a7f 100644 --- a/src/views/earthMap/show/EarthComp.vue +++ b/src/views/earthMap/show/EarthComp.vue @@ -813,13 +813,13 @@ let parentData = this.sceneInfo instanceof Array ? this.sceneInfo.filter((item, index) => { - return item.sceneCode == "00001-00001"; + return item.sceneId == "00001-00001"; }) : this.sceneInfo; //过滤掉总部层级的 let data = this.sceneInfo instanceof Array ? this.sceneInfo.filter((item, index) => { - return item.sceneCode.length > 3; + return item.sceneId.length > 3; }) : this.sceneInfo; // console.log("data",data); @@ -850,7 +850,7 @@ this._earth.camera.flyTo(position, viewDistance, rotation, duration); }; for (let record of data) { - if (record.sceneCode.length == 11) { + if (record.sceneId.length == 11) { continue; } // 设置红旗 @@ -915,7 +915,7 @@ params: { pageNo: 1, pageSize: 999, - sceneCode: "00001-00001*", + sceneId: "00001-00001*", column: 'sysOrgCode', order: 'asc', } @@ -982,7 +982,7 @@ children: [], }; for (let record of this.sceneInfo) { - if (record.parentSceneCode.length == 5) { + if (record.parentSceneId.length == 5) { continue; } models.children.push({ diff --git a/src/views/military/modules/ai/aiMonitorArea/components/DtAiMonitorAreaForm.vue b/src/views/military/modules/ai/aiMonitorArea/components/DtAiMonitorAreaForm.vue index aef63cb..289d0ab 100644 --- a/src/views/military/modules/ai/aiMonitorArea/components/DtAiMonitorAreaForm.vue +++ b/src/views/military/modules/ai/aiMonitorArea/components/DtAiMonitorAreaForm.vue @@ -64,8 +64,8 @@ -