<template>
    <div>
        <el-dialog v-model="centerDialogVisible" width="800" align-center modal-class="track-dialog">
            <template #header>
                <div class="track-title">
                    <img class="track-icon" src="@/assets/images/warningHome/chat/track.png" alt="" />
                    植保轨迹
                </div>
            </template>
            <div class="track">
                <img class="track-img" src="@/assets/images/warningHome/chat/trackpng.png" alt="">
            </div>
        </el-dialog>
    </div>
</template>

<script setup>
import eventBus from "@/api/eventBus";
import { onMounted, ref } from "vue";

const centerDialogVisible = ref(false);

onMounted(() => {
    // ai与地图交互
    eventBus.on("chat:showMapLayer", handleMapLayer)
})

const handleMapLayer = (name) => {
    console.log('handleMapLayerdialog', name);
}
</script>

<style lang="scss" scoped>
.track-title {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    .track-icon {
        width: 24px;
        margin-right: 4px;
    }
}
.track-img {
    width: 100%;
}
</style>

<style lang="scss">
.track-dialog {
    .el-dialog {
        background: #232323;
        border: 1px solid #777777;
        border-radius: 12px;
        color: #fff;
    }
}
</style>
