Browse Source

处理EarthComp代码 新增控制

master
DIAMOND 12 months ago
parent
commit
8695c28b5c
  1. 120
      src/views/earthMap/edit/EarthComp.vue
  2. 2
      src/views/earthMap/edit/ElectronicMap.vue

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

@ -5,7 +5,7 @@
<template>
<div>
<div id="earthContainer" ref="earthContainer" style="width: 100%; height: 100%; top: 300px"></div>
<div class="earthUI_header">
<div class="earthUI_header" v-if="PropsEarthHeaderShow">
<header>
<p>{{ earthTitle }}</p>
<p>{{ realTime }}</p>
@ -140,6 +140,7 @@
setClassEl1.className = 'xbsj-checkbox-wrapper xbsj-checkbox-wrapper-checked xbsj-checkbox-default';
setClassEl2.className = 'xbsj-checkbox xbsj-checkbox-checked';
}
}
function setClassNoChecked(setClassEl1, setClassEl2) {
// node.checkStatus = ''
@ -202,7 +203,73 @@
AISInfoDetail,
AISInfoWindow,
},
props: {},
props: {
//
all: {
type: Boolean,
default: false
},
//
earthHeaderShow: {
type: Boolean,
default: false
},
//
sceneTreeShow:{
type: Boolean,
default: false
},
//
statusBarShow:{
type: Boolean,
default: true
},
//
mainBar:{
type: Boolean,
default: false
},
//
listenMouseHandlerOpen:{
type: Boolean,
default: false
},
//mitt
listenMittHandlerOpen:{
type: Boolean,
default: false
},
//线
createBBHLineOpen:{
type: Boolean,
default: false
},
//
getLineInfoShow:{
type: Boolean,
default: false
},
//
getCameraInfoShow:{
type: Boolean,
default: false
},
//
getLabelInfoShow:{
type: Boolean,
default: false
},
//
drawInitShow:{
type: Boolean,
default: false
},
//
keyControlInitShow:{
type: Boolean,
default: false
},
},
})
export default class EarthComp extends Vue {
/**
@ -470,6 +537,19 @@
let that = this;
//使storeXbsjEarthUI
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
}
XbsjEarthUI.create('earthContainer').then(async (earthUI: any) => {
//
window.$uia = earthUI;
@ -575,18 +655,22 @@
this.cameraPositionChange(this);
});
//线
// this.createRealTimeObj(earthUI)
//
//线
// this.createRealTimeObj(earthUI)
//
if (this.PropsListenMouseHandlerOpen)
this.listenMouseHandler(earthUI);
//mitt
//mitt
if (this.PropsListenMittHandlerOpen)
this.listenMittHandler(earthUI);
//
await this.fly();
//
await this.fly();
//线
//线
if (this.PropsCreateBBHLineOpen)
await this.createBBHLine(earthUI);
//
@ -695,6 +779,7 @@
/* 使用async/await 处理异步方法顺序执行。成功的操作放到try里,失败的放在catch里 */
async createBBHLine(earthUI = null) {
console.log('MyScene', this.userStore.userInfo?.sceneId);
let labelItems: any = undefined
let type = 1; //**
let models: any = {
@ -719,16 +804,25 @@
//
// console.log("");
await this.getLineInfo(models, type);
if (this.PropsGetLineInfoShow)
await this.getLineInfo(models, type);
//
// console.log("");
await this.getCameraInfo(models, type);
if (this.PropsGetCameraInfoShow)
await this.getCameraInfo(models, type);
//
// console.log("");
const labelItems: any = await this.getLabelInfo(models, type);
//
if (this.PropsGetLabelInfoShow)
labelItems = await this.getLabelInfo(models, type);
//
if (this.PropsDrawInitShow)
await drawInit();
//
if (this.PropsKeyControlInitShow)
await keyControlInit();
// dom

2
src/views/earthMap/edit/ElectronicMap.vue

@ -1,6 +1,6 @@
<template>
<div style="width: 100%; height: 100%">
<EarthComp/>
<EarthComp :all="true"/>
</div>
</template>

Loading…
Cancel
Save