<a-tree
show-icon
v-if="treeData.length"
default-expand-all
:default-selected-keys="defaultSelectKeys"
:tree-data="treeData"
:selectedKeys="defaultSelectKeys"
@select="changeSelectType"
>
<a-icon slot="project" type="project" theme="twoTone" />
<a-icon slot="block" type="flag" theme="twoTone" />
<a-icon slot="building" type="home" theme="twoTone" />
</a-tree>
this.treeData = [
{
title: data.project.fname,
key: '项目' + data.project.fprjid,
slots: { icon: 'project' },
children: data.projectBlocks.map(e => {
return {
title: e.fname,
key: '分期' + e.fpbid,
slots: { icon: 'block' },
children: newcertInfoList
.filter(d => d.fpbid == e.fpbid)
.map(dd => {
return {
title: dd.fproductfeature,
children: formatdata
.filter(a => a.fpbid == e.fpbid && a.fproductfeature == dd.fproductfeature)
.map(bb => {
return { title: bb.fnumber, key: '楼栋' + bb.fbbid, slots: { icon: 'building' } }
})
}
})
}
})
}
]
this.defaultSelectKeys = ['项目' + data.project.fprjid]
this.selectTreeNodeName = data.project.fname
this.selectType = '项目'