diff --git a/src/views/modules/communityParty/partyOrg/orgTree.vue b/src/views/modules/communityParty/partyOrg/orgTree.vue index 0b2b62e59..07420f7b2 100644 --- a/src/views/modules/communityParty/partyOrg/orgTree.vue +++ b/src/views/modules/communityParty/partyOrg/orgTree.vue @@ -41,8 +41,8 @@ :load="handleTreeNodeExpand" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" ref="table" - > - + :row-class-name="rowClassName" + > { + if(item.childrenQty != 0){ + item.hasChildren = true + } + }) this.tableKey = new Date().getTime(); // 默认加载2级,并且展开,从第三级开始,需要展开上一级动态查询得到 console.log(">>>>", this.partyOrgTree) @@ -285,6 +299,11 @@ export default { }) this.epmetResultResolver.success((data) => { + data.forEach(item=>{ + if(item.childrenQty != 0){ + item.hasChildren = true + } + }) row.children = data; // 清空原有子节点 resolve(row.children); // 重新添加子节点 // this.partyOrgTree.push(data); @@ -379,4 +398,7 @@ export default { margin-top: 20px; text-align: center; } +::v-deep .no-expand>:nth-child(1) .cell .el-table__expand-icon{ + display: none; +}