|
|
@ -84,7 +84,7 @@ |
|
|
|
></AddModelWin> |
|
|
|
<AddRoamVideo v-if="addRoamVideoShow"></AddRoamVideo> |
|
|
|
<!-- AIS信息显示窗口 --> |
|
|
|
<AISInfoWindow v-if="AISInfoWindowShow"></AISInfoWindow> |
|
|
|
<AISInfoWindow v-if="AISInfoWindowShow" :ship_guid="ship_guid" :ship_aisData="ship_aisData"></AISInfoWindow> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -117,15 +117,14 @@ |
|
|
|
import hidePng from '@/assets/earthMap/hide.png'; |
|
|
|
import alarmImg from '@/assets/earthMap/alarm.gif'; |
|
|
|
import VideoFusionWin from './components/VideoFusionWin.vue'; |
|
|
|
import { useMessage } from "/@/hooks/web/useMessage"; |
|
|
|
import { CircleScan } from '@/utils/earthMap/radarEntity' |
|
|
|
import { radianToDegreeInLngLatHeight } from '@/utils/earthMap/earth' |
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'; |
|
|
|
import { CircleScan } from '@/utils/earthMap/radarEntity'; |
|
|
|
import { radianToDegreeInLngLatHeight } from '@/utils/earthMap/earth'; |
|
|
|
|
|
|
|
import circleDot2 from '@/assets/earthMap/circleDot2.png'; |
|
|
|
import circleDot1 from '@/assets/earthMap/circleDot1.png'; |
|
|
|
import circleDot3 from '@/assets/earthMap/circleDot3.png'; |
|
|
|
|
|
|
|
|
|
|
|
const { createMessage } = useMessage(); |
|
|
|
function setClassEl(setClassEl1, setClassEl2, checked) { |
|
|
|
if (checked) { |
|
|
@ -143,7 +142,6 @@ |
|
|
|
setClassEl2.className = 'xbsj-checkbox xbsj-checkbox-checked'; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function setClassNoChecked(setClassEl1, setClassEl2) { |
|
|
|
// node.checkStatus = '' |
|
|
|
// node.disabled = 'disabled' |
|
|
@ -209,67 +207,67 @@ |
|
|
|
//全部显示 |
|
|
|
all: { |
|
|
|
type: Boolean, |
|
|
|
default: false |
|
|
|
default: false, |
|
|
|
}, |
|
|
|
//头部显示 |
|
|
|
earthHeaderShow: { |
|
|
|
type: Boolean, |
|
|
|
default: false |
|
|
|
default: false, |
|
|
|
}, |
|
|
|
//图层显示 |
|
|
|
sceneTreeShow: { |
|
|
|
type: Boolean, |
|
|
|
default: false |
|
|
|
default: false, |
|
|
|
}, |
|
|
|
//状态栏 |
|
|
|
statusBarShow: { |
|
|
|
type: Boolean, |
|
|
|
default: true |
|
|
|
default: true, |
|
|
|
}, |
|
|
|
//主工具栏 |
|
|
|
mainBar: { |
|
|
|
type: Boolean, |
|
|
|
default: false |
|
|
|
default: false, |
|
|
|
}, |
|
|
|
//监听事件 |
|
|
|
listenMouseHandlerOpen: { |
|
|
|
type: Boolean, |
|
|
|
default: false |
|
|
|
default: false, |
|
|
|
}, |
|
|
|
//监听mitt |
|
|
|
listenMittHandlerOpen: { |
|
|
|
type: Boolean, |
|
|
|
default: false |
|
|
|
default: false, |
|
|
|
}, |
|
|
|
//地图路线资源 |
|
|
|
createBBHLineOpen: { |
|
|
|
type: Boolean, |
|
|
|
default: false |
|
|
|
default: false, |
|
|
|
}, |
|
|
|
//加载区域 |
|
|
|
getLineInfoShow: { |
|
|
|
type: Boolean, |
|
|
|
default: false |
|
|
|
default: false, |
|
|
|
}, |
|
|
|
//加载站点 |
|
|
|
getCameraInfoShow: { |
|
|
|
type: Boolean, |
|
|
|
default: false |
|
|
|
default: false, |
|
|
|
}, |
|
|
|
//加载微波和雷达 |
|
|
|
getLabelInfoShow: { |
|
|
|
type: Boolean, |
|
|
|
default: false |
|
|
|
default: false, |
|
|
|
}, |
|
|
|
//加载绘图 |
|
|
|
drawInitShow: { |
|
|
|
type: Boolean, |
|
|
|
default: false |
|
|
|
default: false, |
|
|
|
}, |
|
|
|
//加载重点监控区域 |
|
|
|
keyControlInitShow: { |
|
|
|
type: Boolean, |
|
|
|
default: false |
|
|
|
default: false, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}) |
|
|
@ -417,20 +415,23 @@ |
|
|
|
monitorPosition: any = []; |
|
|
|
|
|
|
|
//处理props 由于从父组件传来props,为作区分其他变量,则采用首字母大写命名 |
|
|
|
PropsEarthHeaderShow = this.earthHeaderShow |
|
|
|
PropsSceneTreeShow = this.sceneTreeShow |
|
|
|
PropsListenMouseHandlerOpen = this.listenMouseHandlerOpen |
|
|
|
PropsListenMittHandlerOpen = this.listenMittHandlerOpen |
|
|
|
PropsCreateBBHLineOpen = this.createBBHLineOpen |
|
|
|
PropsGetLineInfoShow = this.getLineInfoShow |
|
|
|
PropsGetCameraInfoShow = this.getCameraInfoShow |
|
|
|
PropsGetLabelInfoShow = this.getLabelInfoShow |
|
|
|
PropsDrawInitShow = this.drawInitShow |
|
|
|
PropsKeyControlInitShow = this.keyControlInitShow |
|
|
|
PropsEarthHeaderShow = this.earthHeaderShow; |
|
|
|
PropsSceneTreeShow = this.sceneTreeShow; |
|
|
|
PropsListenMouseHandlerOpen = this.listenMouseHandlerOpen; |
|
|
|
PropsListenMittHandlerOpen = this.listenMittHandlerOpen; |
|
|
|
PropsCreateBBHLineOpen = this.createBBHLineOpen; |
|
|
|
PropsGetLineInfoShow = this.getLineInfoShow; |
|
|
|
PropsGetCameraInfoShow = this.getCameraInfoShow; |
|
|
|
PropsGetLabelInfoShow = this.getLabelInfoShow; |
|
|
|
PropsDrawInitShow = this.drawInitShow; |
|
|
|
PropsKeyControlInitShow = this.keyControlInitShow; |
|
|
|
/////////////////////////////////////////////////////////////////////////// |
|
|
|
//AIS信息窗口显示 |
|
|
|
AISInfoWindowShow = false; |
|
|
|
// 船只guid |
|
|
|
ship_guid = '123456'; |
|
|
|
// 船只ais信息 |
|
|
|
ship_aisData = {}; |
|
|
|
|
|
|
|
mounted() { |
|
|
|
let that = this; |
|
|
@ -554,16 +555,16 @@ |
|
|
|
this.store.xbsjEarthUI = XbsjEarthUI; |
|
|
|
//处理props |
|
|
|
if (this.all) { |
|
|
|
this.PropsEarthHeaderShow = true |
|
|
|
this.PropsSceneTreeShow = true |
|
|
|
this.PropsListenMouseHandlerOpen = true |
|
|
|
this.PropsListenMittHandlerOpen = true |
|
|
|
this.PropsCreateBBHLineOpen = true |
|
|
|
this.PropsGetLineInfoShow = true |
|
|
|
this.PropsGetCameraInfoShow = true |
|
|
|
this.PropsGetLabelInfoShow = true |
|
|
|
this.PropsDrawInitShow = true |
|
|
|
this.PropsKeyControlInitShow = true |
|
|
|
this.PropsEarthHeaderShow = true; |
|
|
|
this.PropsSceneTreeShow = true; |
|
|
|
this.PropsListenMouseHandlerOpen = true; |
|
|
|
this.PropsListenMittHandlerOpen = true; |
|
|
|
this.PropsCreateBBHLineOpen = true; |
|
|
|
this.PropsGetLineInfoShow = true; |
|
|
|
this.PropsGetCameraInfoShow = true; |
|
|
|
this.PropsGetLabelInfoShow = true; |
|
|
|
this.PropsDrawInitShow = true; |
|
|
|
this.PropsKeyControlInitShow = true; |
|
|
|
} |
|
|
|
XbsjEarthUI.create('earthContainer').then(async (earthUI: any) => { |
|
|
|
// 设置全局变量,可调试 |
|
|
@ -674,19 +675,16 @@ |
|
|
|
// this.createRealTimeObj(earthUI) |
|
|
|
|
|
|
|
//监听鼠标事件 |
|
|
|
if (this.PropsListenMouseHandlerOpen) |
|
|
|
this.listenMouseHandler(earthUI); |
|
|
|
if (this.PropsListenMouseHandlerOpen) this.listenMouseHandler(earthUI); |
|
|
|
|
|
|
|
//监听mitt |
|
|
|
if (this.PropsListenMittHandlerOpen) |
|
|
|
this.listenMittHandler(earthUI); |
|
|
|
if (this.PropsListenMittHandlerOpen) this.listenMittHandler(earthUI); |
|
|
|
|
|
|
|
// 飞入方法 |
|
|
|
await this.fly(); |
|
|
|
|
|
|
|
//加载地图线路资源 |
|
|
|
if (this.PropsCreateBBHLineOpen) |
|
|
|
await this.createBBHLine(earthUI); |
|
|
|
if (this.PropsCreateBBHLineOpen) await this.createBBHLine(earthUI); |
|
|
|
|
|
|
|
//创建工具栏 |
|
|
|
this.toolbarShow = true; |
|
|
@ -794,7 +792,7 @@ |
|
|
|
/* 使用async/await 处理异步方法顺序执行。成功的操作放到try里,失败的放在catch里 */ |
|
|
|
async createBBHLine(earthUI = null) { |
|
|
|
console.log('MyScene', this.userStore.userInfo?.sceneId); |
|
|
|
let labelItems: any = undefined |
|
|
|
let labelItems: any = undefined; |
|
|
|
let type = 1; //** |
|
|
|
|
|
|
|
let models: any = { |
|
|
@ -819,26 +817,21 @@ |
|
|
|
|
|
|
|
// 加载区域 |
|
|
|
// console.log("加载区域"); |
|
|
|
if (this.PropsGetLineInfoShow) |
|
|
|
await this.getLineInfo(models, type); |
|
|
|
if (this.PropsGetLineInfoShow) await this.getLineInfo(models, type); |
|
|
|
|
|
|
|
// 加载站点 |
|
|
|
// console.log("加载站点"); |
|
|
|
if (this.PropsGetCameraInfoShow) |
|
|
|
await this.getCameraInfo(models, type); |
|
|
|
if (this.PropsGetCameraInfoShow) await this.getCameraInfo(models, type); |
|
|
|
|
|
|
|
// 加载雷达和微波 |
|
|
|
// console.log("加载雷达和微波"); |
|
|
|
if (this.PropsGetLabelInfoShow) |
|
|
|
labelItems = await this.getLabelInfo(models, type); |
|
|
|
if (this.PropsGetLabelInfoShow) labelItems = await this.getLabelInfo(models, type); |
|
|
|
|
|
|
|
//加载绘画资源 |
|
|
|
if (this.PropsDrawInitShow) |
|
|
|
await drawInit(); |
|
|
|
if (this.PropsDrawInitShow) await drawInit(); |
|
|
|
|
|
|
|
//加载重点监控区域 |
|
|
|
if (this.PropsKeyControlInitShow) |
|
|
|
await keyControlInit(); |
|
|
|
if (this.PropsKeyControlInitShow) await keyControlInit(); |
|
|
|
|
|
|
|
// 监听树的dom节点变化 |
|
|
|
// console.log("监听树的dom节点变化"); |
|
|
@ -4209,7 +4202,7 @@ |
|
|
|
// 资源销毁 |
|
|
|
beforeDestroy() { |
|
|
|
// vue程序销毁时,需要清理相关资源 |
|
|
|
console.log("vue程序销毁"); |
|
|
|
console.log('vue程序销毁'); |
|
|
|
|
|
|
|
this._earth = this._earth && this._earth.destroy(); |
|
|
|
this.websocketclose(); |
|
|
@ -4221,8 +4214,7 @@ |
|
|
|
// 资源销毁 |
|
|
|
destroy() { |
|
|
|
// vue程序销毁时,需要清理相关资源 |
|
|
|
console.log("vue程序销毁",this._earth); |
|
|
|
|
|
|
|
console.log('vue程序销毁', this._earth); |
|
|
|
|
|
|
|
// this.websocketclose(); |
|
|
|
//清除定时器 |
|
|
@ -4232,7 +4224,7 @@ |
|
|
|
// window.$uia.tools.sceneTree.destroy() |
|
|
|
// this._earth = this._earth && this._earth.destroy(); |
|
|
|
//利用store.xbsjEarthUI 重新赋值 window.XbsjEarthUI |
|
|
|
window.XbsjEarthUI = this.store.xbsjEarthUI |
|
|
|
window.XbsjEarthUI = this.store.xbsjEarthUI; |
|
|
|
this._earth = undefined; |
|
|
|
} |
|
|
|
} |
|
|
|