<script lang="ts" setup name="TrajectoryMap"> // 地图显示的缩放级别 import MapComponent from '@/components/map/Map.vue' const dialogFormVisible = ref(false) // 对话框是否显示 const center = ref([116.481485, 39.990464]) // 地图中心 const zoom = ref(10) // 初始化对话框 const initDialog = (row: any) => { dialogFormVisible.value = true } defineExpose({ initDialog, }) const cancel = () => { dialogFormVisible.value = false } </script> <template> <el-dialog v-model="dialogFormVisible" title="报警处置" append-to-body width="50%"> <div class="container"> <map-component :center="center" :zoom="zoom" /> </div> <template #footer> <div class="dialog-footer"> <el-button type="primary" @click="cancel"> 确认 </el-button> </div> </template> </el-dialog> </template> <style lang="scss" scoped> .container { width: 100%; height: 500px; } .el-dialog { width: 700px; } .el-select { width: 100%; } </style>