新增功能 点击快速处置标题的时候 关闭图像对比 并且灾害点定位在屏幕正中心
This commit is contained in:
parent
24e0a7f278
commit
9588c5490b
@ -1,7 +1,11 @@
|
||||
<template>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel__content">
|
||||
<CollapsiblePanel title="快速处置" subtitle="「调度指挥」">
|
||||
<CollapsiblePanel
|
||||
title="快速处置"
|
||||
subtitle="「调度指挥」"
|
||||
@title-click="handleQuickDisposalClick"
|
||||
>
|
||||
<DispatchCommand />
|
||||
</CollapsiblePanel>
|
||||
|
||||
@ -29,6 +33,13 @@ import DispatchCommand from "./DispatchCommand.vue";
|
||||
import VideoMonitorGrid from "./VideoMonitorGrid.vue";
|
||||
// import DispatchSuggestion from './DispatchSuggestion.vue'
|
||||
import CollaborationInfo from "./CollaborationInfo.vue";
|
||||
|
||||
const emit = defineEmits(["quick-disposal-click"]);
|
||||
|
||||
const handleQuickDisposalClick = () => {
|
||||
console.log('@@@@@点击了标题');
|
||||
emit("quick-disposal-click");
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@ -31,6 +31,11 @@ export const DEFAULT_CAMERA_POSITION = {
|
||||
lat: 30.175697,
|
||||
}
|
||||
|
||||
export const DEFAULT_CAMERA_POSITION_CENTER = {
|
||||
lon: 108.011400,
|
||||
lat: 30.175600,
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认相机配置
|
||||
* 包含高度、朝向等参数
|
||||
|
||||
@ -41,7 +41,9 @@
|
||||
v-if="isCompareMode"
|
||||
class="situational-awareness__sync-btn"
|
||||
@click="toggleCameraSync"
|
||||
:text="isCameraSyncEnabled ? '同步灾前灾后实景' : '未同步灾前灾后实景'"
|
||||
:text="
|
||||
isCameraSyncEnabled ? '同步灾前灾后实景' : '未同步灾前灾后实景'
|
||||
"
|
||||
>
|
||||
</ActionButton>
|
||||
<!-- 灾前现场实景标签 - 在中间分割线左侧 -->
|
||||
@ -76,7 +78,7 @@
|
||||
v-show="!isRightPanelCollapsed"
|
||||
class="situational-awareness__panel-column situational-awareness__panel-column--right"
|
||||
>
|
||||
<RightPanel />
|
||||
<RightPanel @quick-disposal-click="handleQuickDisposalClick" />
|
||||
</div>
|
||||
</Transition>
|
||||
</div>
|
||||
@ -284,6 +286,7 @@ import {
|
||||
DISASTER_CENTER,
|
||||
DEFAULT_CAMERA_CARTESIAN,
|
||||
DEFAULT_CAMERA_POSITION,
|
||||
DEFAULT_CAMERA_POSITION_CENTER,
|
||||
DEFAULT_CAMERA_VIEW,
|
||||
DEFAULT_SEARCH_RADIUS,
|
||||
MARKER_ICON_SIZE,
|
||||
@ -337,11 +340,42 @@ const { isCompareMode, toggleCompareMode, isCameraSyncEnabled } =
|
||||
useDualMapCompare();
|
||||
|
||||
const toggleCameraSync = () => {
|
||||
ElMessage.success(isCameraSyncEnabled.value ? "画面同步已关闭" : "画面同步已启用");
|
||||
ElMessage.success(
|
||||
isCameraSyncEnabled.value ? "画面同步已关闭" : "画面同步已启用"
|
||||
);
|
||||
console.log("[index.vue] 切换相机同步状态");
|
||||
isCameraSyncEnabled.value = !isCameraSyncEnabled.value;
|
||||
};
|
||||
|
||||
// 快速处置点击事件
|
||||
const handleQuickDisposalClick = async () => {
|
||||
console.log("[index.vue] 快速处置点击事件");
|
||||
const success = await setCompareToolState(false, "quick-disposal");
|
||||
|
||||
if (!success) {
|
||||
// 如果关闭对比模式失败,不继续执行后续操作
|
||||
console.error("[index.vue] 关闭地图对比模式失败,中止快速处置操作");
|
||||
return;
|
||||
}
|
||||
|
||||
const viewer = mapStore.viewer;
|
||||
console.log("[index.vue] 设置相机到目标位置...");
|
||||
viewer.camera.setView({
|
||||
destination: Cesium.Cartesian3.fromDegrees(
|
||||
DEFAULT_CAMERA_POSITION_CENTER.lon,
|
||||
DEFAULT_CAMERA_POSITION_CENTER.lat,
|
||||
DEFAULT_CAMERA_VIEW.height
|
||||
),
|
||||
orientation: {
|
||||
heading: Cesium.Math.toRadians(DEFAULT_CAMERA_VIEW.heading),
|
||||
pitch: Cesium.Math.toRadians(DEFAULT_CAMERA_VIEW.pitch),
|
||||
roll: DEFAULT_CAMERA_VIEW.roll,
|
||||
},
|
||||
});
|
||||
|
||||
console.log("[index.vue] 已关闭地图对比模式");
|
||||
};
|
||||
|
||||
// 地图标记功能
|
||||
const {
|
||||
initializeMarkers,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user