Browse Source

引入显隐组件

master
Fuyuu 8 months ago
parent
commit
87fb94b73c
  1. 36
      src/views/earthMap/edit/EarthComp.vue

36
src/views/earthMap/edit/EarthComp.vue

@ -69,6 +69,8 @@
<!-- 左侧操作栏 -->
<Toolbar v-if="toolbarShow" :setLabelStatus="setLabelStatus"></Toolbar>
<!-- 左下角显隐控件 -->
<ShowHideControl v-if="toolbarShow"></ShowHideControl>
<AddModelWin
v-if="addModelWinShow"
:setLabelStatus="setLabelStatus"
@ -98,6 +100,7 @@
import { useUserStore } from '/@/store/modules/user';
import { useEarthMapStore } from '/@/store/modules/earthMap';
import Toolbar from '@/components/earthMap/Toolbar.vue';
import ShowHideControl from '/@/components/earthMap/ShowHideControl.vue';
import AddModelWin from '@/components/earthMap/toolbar/AddModelWin.vue';
import AddRoamVideo from '@/components/earthMap/toolbar/AddRoamVideo.vue';
import VideoSplitScreen from '@/components/earthMap/VideoSplitScreen.vue';
@ -131,8 +134,16 @@
import sceneTreePopContextMenu from '@/utils/earthMap/sceneTreePopContextMenu';
import { drawInit } from '@/utils/earthMap/earthDraw';
import { cloneModel, cloneShamNode } from '@/utils/earthMap/clone';
import { initWebSocket, websocketonopen, websocketonerror, loreadAlarmInfo,
websocketclose, websocketonmessage, websocketdosend, websock,} from '@/utils/earthMap/websocket';
import {
initWebSocket,
websocketonopen,
websocketonerror,
loreadAlarmInfo,
websocketclose,
websocketonmessage,
websocketdosend,
websock,
} from '@/utils/earthMap/websocket';
import setIconByRef from '@/utils/earthMap/setIconByRef';
import dwPng from '@/assets/images/rotationXYZ.png';
@ -210,6 +221,7 @@
@Options({
components: {
Toolbar,
ShowHideControl,
VideoSplitScreen,
VideoWindow,
WarnInfoList,
@ -288,12 +300,12 @@
//
enablePointer: {
type: Boolean,
default: false
default: false,
},
//
listenMouseHandlerSenceOpen: {
type: Boolean,
default: false
default: false,
},
},
})
@ -303,8 +315,8 @@
*/
userStore = useUserStore();
store = useEarthMapStore();
setLabelStatus: any = setLabelStatus
setIconByRef: any = setIconByRef
setLabelStatus: any = setLabelStatus;
setIconByRef: any = setIconByRef;
earthTitle = '态势监控一张图';
realTime = '……';
// EarthCesiumvue使线
@ -459,8 +471,6 @@
// ais
ship_aisData = {};
//
// pin: any = undefined;
// viewer: any = undefined;
@ -699,7 +709,6 @@
this.sceneTree.children[2].czmObject.xbsjTerrainProvider.XbsjCesiumTerrainProvider.url =
window._CONFIG['earthMapURL'] + window._CONFIG['terrain'];
window.$earth.sceneTree.root = {
expand: true,
title: '场景树',
@ -716,7 +725,7 @@
//
if (this.PropsListenMouseHandlerOpen) listenMouseHandler(that);
//
if (this.listenMouseHandlerSenceOpen) listenMouseHandlerSence(this.enablePointer,this);
if (this.listenMouseHandlerSenceOpen) listenMouseHandlerSence(this.enablePointer, this);
//mitt
if (this.PropsListenMittHandlerOpen) this.listenMittHandler();
@ -734,10 +743,10 @@
//
async fly() {
if(this.$attrs.onCustomFly){
if (this.$attrs.onCustomFly) {
// customFly
this.$emit('customFly');
return
return;
}
let position, rotation, viewDistance, duration;
const sceneId = this.userStore.userInfo?.sceneId;
@ -812,7 +821,6 @@
};
}
/* 使用async/await 处理异步方法顺序执行。成功的操作放到try里,失败的放在catch里 */
async createBBHLine() {
// console.log('MyScene', this.userStore.userInfo?.sceneId);
@ -1149,7 +1157,6 @@
chrome.call('close');
}
/**
* 保存更改的ref到模型和后台数据中;
* @param {Object} model 当前模型
@ -1235,7 +1242,6 @@
this.clearRadarAlarmModel(this.store.radarAlarmDataMap, eventNum);
}
//
getRealTime() {
this.timer2 = setInterval(() => {

Loading…
Cancel
Save