Compare commits

..

9 Commits

Author SHA1 Message Date
guangyin 43cf540d8f feat:导览页面数据模拟 2023-05-18 13:59:02 +08:00
guangyin 1316579757 Merge branch 'guangyin' 2023-05-18 11:04:05 +08:00
吴延福 a298037c7d feat:新增导览路线 2023-05-18 11:01:39 +08:00
吴延福 276d9e1c2c Merge commit '957fff1316354747733661fc2ac898fe3ce9964f' 2023-05-18 10:45:56 +08:00
吴延福 cb149a0446 feat:新增导览路径 2023-05-18 10:45:45 +08:00
guangyin 957fff1316 Merge branch 'guangyin' 2023-05-18 10:35:21 +08:00
guangyin f71156aac9 Merge branch 'guangyin' 2023-05-18 10:23:53 +08:00
吴延福 4a5973d657 Merge commit 'a37cd8f9fca8289f949525bdc26e73834565176f' 2023-05-18 09:13:47 +08:00
吴延福 0361dc06ed feat:新增周界 2023-05-18 09:13:35 +08:00
6 changed files with 1784 additions and 21 deletions

View File

@ -25,12 +25,12 @@ export default class ViewLeftComponent extends Vue {
treeData = treeData; treeData = treeData;
viewList = [ viewList = [
{ {
id: Mock.mock("@id"), id: '1',
title: '北大门东区→南大门西区', title: '北大门东区→南大门西区',
from: '北大门东区', from: '北大门东区',
to: '南大门西区' to: '南大门西区'
}, { }, {
id: Mock.mock("@id"), id: '2',
title: '南大门东区→北大门西区', title: '南大门东区→北大门西区',
from: '南大门东区', from: '南大门东区',
to: '北大门西区' to: '北大门西区'

1752
src/mock/path.ts 100644

File diff suppressed because it is too large Load Diff

View File

@ -1,23 +1,27 @@
export default [[ export default [[
13312554.24, 11661118.72,
4098441.2800000003, 3692382.4,
0.4 0
],[ ],[
13313066.24, 11661186.56,
4098892.48, 3692696.64,
0.476328125 0
],[ ],[
13313446.4, 11660930.56,
4098451.52, 3692642.88,
0.4000390625 3.583046875
],[ ],[
13312994.56, 11660729.6,
4098064.96, 3692633.2800000003,
0.3999609375 3.5830078125
],[ ],[
13312628.48, 11660718.08,
4098448.3200000003, 3692349.12,
0.39998046875 0
],[
11660874.24,
3692352.3200000003,
-0.0000390625
] ]
] ]

View File

@ -10,6 +10,7 @@ import boundsData from "@/mock/bounds"
import ParkFileService from '@/service/park.service'; import ParkFileService from '@/service/park.service';
import CloseService from '@/service/close.service'; import CloseService from '@/service/close.service';
import * as turf from "@turf/turf" import * as turf from "@turf/turf"
import path from '@/mock/path';
@Component({ @Component({
template, template,
@ -25,6 +26,7 @@ export default class BaseComponent extends Vue {
public layerData = layerData; public layerData = layerData;
public lock = true; public lock = true;
public tourPathData = path;
public timerList = {} as any; public timerList = {} as any;
public pakFilePath = "@path:DTS_Library_V5.4.pak"; public pakFilePath = "@path:DTS_Library_V5.4.pak";
@ -59,7 +61,7 @@ export default class BaseComponent extends Vue {
// 添加电子围栏 // 安全线 // 实控线 // 规划线 // 添加电子围栏 // 安全线 // 实控线 // 规划线
public async toggleArea(layer){ public async toggleArea(layer){
if(!layer.ids.length){ if(!layer.ids.length){
const result = this.dataList[layer.value].map(item=>{ const result = layer.data.map(item=>{
return { return {
id:item.id, id:item.id,
groupId:layer.value, groupId:layer.value,

View File

@ -1,6 +1,6 @@
<div class="overview-container"> <div class="overview-container">
<!-- <MapComponent id="map" @onLoaded="getMap" @onHandleChange="handleChange"></MapComponent>--> <MapComponent id="map" @onLoaded="getMap" @onHandleChange="handleChange"></MapComponent>
<div class="bg-box left animate__animated"> <div class="bg-box left animate__animated">
<div class="panel-container"> <div class="panel-container">

View File

@ -57,6 +57,8 @@ export default class OverViewComponent extends BaseComponent {
this.player = store; this.player = store;
this.lock = false this.lock = false
this.resetMap(); this.resetMap();
this.player.api.cameraTour.delete("1");
this.player.api.cameraTour.delete("2");
this.player.api.customObject.clear(); this.player.api.customObject.clear();
this.player.api.polygon3d.clear(); this.player.api.polygon3d.clear();
this.player.api.marker.clear(); this.player.api.marker.clear();
@ -65,6 +67,7 @@ export default class OverViewComponent extends BaseComponent {
this.player.api.polyline.clear(); this.player.api.polyline.clear();
this.player.api.heatmap.clear(); this.player.api.heatmap.clear();
this.currentLayers = this.getCurrentLayers(); this.currentLayers = this.getCurrentLayers();
this.player.api.cameraTour.add(this.tourPathData)
} }
@ -118,7 +121,7 @@ export default class OverViewComponent extends BaseComponent {
this.hideAllPanel = !this.hideAllPanel; this.hideAllPanel = !this.hideAllPanel;
this.drawerChange(!this.hideAllPanel) this.drawerChange(!this.hideAllPanel)
if(!this.hideAllPanel){ if(!this.hideAllPanel){
this.player.api.cameraTour.stop();
this.player.api.settings.setInteractiveMode(0) this.player.api.settings.setInteractiveMode(0)
} }
} }
@ -135,6 +138,8 @@ export default class OverViewComponent extends BaseComponent {
layer.selected = !layer.selected; layer.selected = !layer.selected;
if(layer.type === "moveMarker"){ if(layer.type === "moveMarker"){
this.addMarker(layer,true) this.addMarker(layer,true)
}else{
this.toggleArea(layer)
} }
} }
//进入自由导览 //进入自由导览
@ -205,7 +210,7 @@ export default class OverViewComponent extends BaseComponent {
//进入路线导览 //进入路线导览
playView(item){ playView(item){
this.toggleAllPanel() this.toggleAllPanel()
console.log('进入路线导览',item) this.player.api.cameraTour.play(item.id)
} }
deactivated(){ deactivated(){