<template>
    <div class="app-container">
        <div class="layout-container">
            <el-row :gutter="18">
                <el-col :span="4" class="left-col">
                    <LeftLabelGroup :value="activeCategory" @change="handleCategoryChange" />
                </el-col>
                <el-col :span="20" class="right-col">
                    <RightTable :value="activeCategory" :activeCategoryName="activeCategoryName" />
                </el-col>
            </el-row>
        </div>
    </div>
</template>

<script>
import LeftLabelGroup from './components/LeftLabelGroup.vue'
import RightTable from './components/RightTable.vue'

export default {
    name: 'Label',
    components: {
        LeftLabelGroup,
        RightTable
    },
    data() {
        return {
            activeCategory:  null,
            activeCategoryName: '',
        }
    },
    methods: {
        handleCategoryChange(categoryId, categoryName) {
            this.activeCategory = categoryId
            this.activeCategoryName = categoryName
        },
    }
}
</script>

<style scoped lang="scss">
.app-container {
    width: 100%;
    height: calc(100vh - 84px);
    overflow: hidden;
    background: linear-gradient(180deg, #F1F6FF 20%, #E5EFFF 100%);
}


.layout-container {
    display: flex;
    height: 100%;
    width: 100%;
    justify-content: space-around;
}

.left-col {
    height: calc(100vh - 120px);
    padding-left: 0 !important;
}

.right-col {
    height: calc(100vh - 120px);
    padding-right: 0 !important;
}

.el-row {
  width: 100%;
  height: 100%;
}
.el-col {
  height: 100%;
}
</style>