Browse Source

引入显隐组件

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

76
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';
@ -120,20 +123,28 @@
import { useMessage } from '/@/hooks/web/useMessage';
import { CircleScan } from '@/utils/earthMap/radarEntity';
import { radianToDegreeInLngLatHeight } from '@/utils/earthMap/earth';
import listenMouseHandlerSence from '@/utils/earthMap/listenMouseHandlerSence';
import listenMouseHandler from '@/utils/earthMap/listenMouseHandler';
import getLineInfo from '@/utils/earthMap/getLineInfo';
import getCameraInfo from '@/utils/earthMap/getCameraInfo';
import getLabelInfo from '@/utils/earthMap/getLabelInfo';
import { setLabelStatus, setAllLabelStatus } from '@/utils/earthMap/setLabelStatus';
import keyControlInit from '@/utils/earthMap/keyControlInit';
import createRealTimeObj from '@/utils/earthMap/createRealTimeObj';
import sceneTreePopContextMenu from '@/utils/earthMap/sceneTreePopContextMenu';
import listenMouseHandlerSence from '@/utils/earthMap/listenMouseHandlerSence';
import listenMouseHandler from '@/utils/earthMap/listenMouseHandler';
import getLineInfo from '@/utils/earthMap/getLineInfo';
import getCameraInfo from '@/utils/earthMap/getCameraInfo';
import getLabelInfo from '@/utils/earthMap/getLabelInfo';
import { setLabelStatus, setAllLabelStatus } from '@/utils/earthMap/setLabelStatus';
import keyControlInit from '@/utils/earthMap/keyControlInit';
import createRealTimeObj from '@/utils/earthMap/createRealTimeObj';
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 setIconByRef from '@/utils/earthMap/setIconByRef';
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';
import rotationXYZ 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: {
//
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,16 +471,14 @@
// ais
ship_aisData = {};
//
// pin: any = undefined;
// viewer: any = undefined;
// //
// cursorCss = "grab";
// position: any = null;
// rotation: any = null;
// fov: any = null;
// pin: any = undefined;
// viewer: any = undefined;
// //
// cursorCss = "grab";
// position: any = null;
// rotation: any = null;
// fov: any = null;
mounted() {
let that = this;
//
@ -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();
@ -733,11 +742,11 @@
}
//
async fly() {
if(this.$attrs.onCustomFly){
async fly() {
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