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

<script>
import EquipmentList from '@/views/module_tpm/equipment/EquipmentList'

    export default({
        components: {
            EquipmentList
        },
        data () {
            return {
                selectData: {},
            }
        },
        methods: {
            selectEquipment(selectedKeys,e){
                console.log(222,selectedKeys,e.selectedNodes[0].data.props)
                this.selectData.equipmenttreeid = 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; */
}
</style>
