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

Loading…
Cancel
Save