添加调取stationMap的方法
This commit is contained in:
@@ -87,13 +87,14 @@
|
||||
<Management
|
||||
ref="createRef"
|
||||
@project-change="onProjectChange"
|
||||
@station-map-updated="handleStationMapUpdated"
|
||||
></Management>
|
||||
</div>
|
||||
<div class="body-box">
|
||||
<!-- 第三行数据 -->
|
||||
<div class="content-box">
|
||||
<dv-border-box-10 :color="color[0]" style="position: relative">
|
||||
<Plan :project="currentProject" />
|
||||
<Plan :project="currentProject" ref="planRef"/>
|
||||
<!-- 将 flag 值传递给 SecurityDetail 组件 -->
|
||||
<!-- showDetail从SecurityDetail 组件传过来 -->
|
||||
<SecurityDetail
|
||||
@@ -235,6 +236,8 @@ const onProjectChange = (project: { id: string; name: string }) => {
|
||||
currentProject.value = project;
|
||||
};
|
||||
|
||||
const planRef = ref() // 添加对 Plan 组件的引用
|
||||
|
||||
const smsQueriesRef = ref(); // 短信查询组件引用
|
||||
const smsConfigRef = ref(); // 短信查询组件引用
|
||||
const sendRef = ref(); // 短信查询组件引用
|
||||
@@ -380,6 +383,14 @@ const createRef = ref();
|
||||
const openDialog = () => {
|
||||
createRef.value.open();
|
||||
};
|
||||
|
||||
// 处理 Management 组件发出的 station-map-updated 事件
|
||||
const handleStationMapUpdated = () => {
|
||||
// 通过 Plan 组件转发给 bdMap
|
||||
if (planRef.value && typeof planRef.value.handleStationMapUpdated === 'function') {
|
||||
planRef.value.handleStationMapUpdated()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user