<!--左侧工具栏 -- 图例列表-->
<template>
    <div class="lengend-list">
        <!-- 基础图例 -->
        <addBaseItem v-if="chiceStatus == 0"></addBaseItem>
        <!-- 设备类 -->
        <equipmentList v-if="chiceStatus == 1" @openAddEqupModle="openAddEqupModle"></equipmentList>
        <!-- 管线类 -->
        <pipeList v-if="chiceStatus == 3"></pipeList>

        <!-- 添加设备 -->
        <add-equipment-dialog @closeModal="showAddEquipmentDialog = false" :showDialog="showAddEquipmentDialog" />
        <!-- <div class="close-lengend"></div> -->
    </div>
</template>
<script>
import pipeList from "./pipeList.vue";
import equipmentList from "./equipmentList.vue";
// import addItemModel from "./addItemModel.vue";
import addBaseItem from "./addBaseItem.vue";
import addEquipmentDialog from "./addEquipmentDialog";
export default {
    components: { pipeList, equipmentList, addBaseItem, addEquipmentDialog },
    props: ["chiceStatus"],
    data() {
        return {
            showAddEquipmentDialog: false,
            // choiceLegend: "" //选中绘制类型
        };
    },
    methods: {
        openAddEqupModle() {
            console.log("openAddEqupModle");
            this.showAddEquipmentDialog = true;
        },
    },
};
</script>
<style scoped lang="less">
.lengend-list {
    width: 100%;
    height: 100%;
    position: relative;
    .close-lengend {
        width: 20px;
        height: 40px;
        position: absolute;
        right: -20px;
        top: 50%;
        transform: translateY(-50%);
        background: red;
        z-index: 999;
    }
}
</style>