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

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

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

<style scoped>
.all{
    height: calc(100vh - 65px);
    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; */
}
</style>
