<template>
    <div class="all">
        <div class="left">
            <u-equipment-tree @select="selectEquipment"></u-equipment-tree>
        </div>
        <div class="right">
            <spotcheck-list ref="realForm" :selectData="selectData"></spotcheck-list>
        </div>
    </div>
</template>

<script>
import SpotcheckList from './SpotcheckList.vue';

    export default({
        components: {
            SpotcheckList
        },
        data () {
            return {
                selectData: {}
            }
        },
        methods: {
            selectEquipment(selectedKeys,e){
                // console.log(selectedKeys,e.selectedNodes[0].data.props)
                this.selectData.id = e.selectedNodes[0].data.props.id
                this.$nextTick(()=>{
                    this.$refs.realForm.getDataList();
                })
            }
        },
    })
</script>

<style scoped>
.all{
    height: calc(100vh - 90px);
    width: 100%;
    display: flex;
}
.left{
    height: 100%;
    width: 20%;
    /* border: 2px solid red; */
    margin-right: 10px;
    margin-left: 5px;
}
.right{
    height: 100%;
    width: 80%;
    /* border: 2px solid red; */
}
/* .ant-card{
    height: 100%;
    overflow: auto;
} */
</style>
