<template>
    <el-tree ref="ElTreeRef" :class="ui"
             :data="ElTreeData"
             :indent="0"
             :props="ElTreeProps"
             accordion
             class="hc-tree-node tree-line"
             highlight-current
             node-key="id"
             show-checkbox
    >
        <template #default="{ node, data }">
            <div :id="`'entry-sampling-'${data['primaryKeyId']}`" class="data-custom-tree-node">
                <div class="label">
                    <span> {{ node.label }}</span>
                    <span class="text-orange text-sm">（该目录已分属XX专家，如需调整，请联系该专家进行转让）</span>
                </div>
            </div>
        </template>
    </el-tree>
</template>

<script setup>
import {ref} from "vue";
//import dataFillQuery from '~api/data-fill/query';
//import {isItem,getArrValue,getObjValue,isValueNull} from "vue-utils-plus"

//参数
const props = defineProps({
    ui: {
        type: String,
        default: ''
    },
    projectId: {
        type: [String, Number],
        default: ''
    },
    contractId: {
        type: [String, Number],
        default: ''
    },
})

//变量
const ElTreeRef = ref(null)
const ElTreeProps = ref({
    children: 'children',
    label: 'label',
})

const ElTreeData = [
    {
        id: 1,
        label: '建设单位资料（1600卷）',
        children: [
            {
                id: 4,
                label: '资料 1-1',
                children: [
                    {
                        id: 9,
                        label: '资料 1-1-1',
                    },
                    {
                        id: 10,
                        label: '资料 1-1-2',
                    },
                ],
            },
        ],
    },
    {
        id: 2,
        label: '监理单位资料（890卷）',
        children: [
            {
                id: 5,
                label: '监理资料 2-1',
            },
            {
                id: 6,
                label: '监理资料 2-2',
            },
        ],
    },
    {
        id: 3,
        label: '施工单位资料（3200卷）',
        children: [
            {
                id: 7,
                label: '质量进度控制文件（120卷）',
            },
            {
                id: 8,
                label: '第二段',
                children: [
                    {
                        id: 11,
                        label: '第三段',
                    },
                    {
                        id: 12,
                        label: '第四段',
                    },
                ],
            },
        ],
    },
]
</script>

<style lang="scss" scoped>
@import "../../../../styles/app/tree.scss";

</style>
