|
|
@ -75,9 +75,10 @@ |
|
|
|
class="resi-table" |
|
|
|
v-loading="tableLoading" |
|
|
|
:data="tableData" |
|
|
|
default-expand-all |
|
|
|
row-key="id" |
|
|
|
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }" |
|
|
|
lazy |
|
|
|
:load="nextTree" |
|
|
|
:tree-props="{ children: 'children',hasChildren: 'hasChildren'}" |
|
|
|
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }" |
|
|
|
:height="tableHeight" |
|
|
|
> |
|
|
@ -290,19 +291,40 @@ export default { |
|
|
|
let params = { |
|
|
|
limit: this.pageSize, |
|
|
|
page: this.pageNo, |
|
|
|
parentId:0, |
|
|
|
...this.formData, |
|
|
|
}; |
|
|
|
|
|
|
|
const { data, code, msg } = await requestGet(url, params); |
|
|
|
if (code === 0) { |
|
|
|
// this.total = data.total; |
|
|
|
data.forEach(item=>{ |
|
|
|
item.hasChildren =true; |
|
|
|
}) |
|
|
|
this.tableData = data; |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
this.tableLoading = false; |
|
|
|
}, |
|
|
|
|
|
|
|
async nextTree(tree, treeNode, resolve){ |
|
|
|
const url = "/resi/partymember/icpartyplace/getPageList"; |
|
|
|
let params = { |
|
|
|
limit: this.pageSize, |
|
|
|
page: this.pageNo, |
|
|
|
parentId:tree.id, |
|
|
|
...this.formData, |
|
|
|
}; |
|
|
|
const { data, code, msg } = await requestGet(url, params); |
|
|
|
if (code === 0) { |
|
|
|
data.forEach(item=>{ |
|
|
|
item.hasChildren =true; |
|
|
|
}) |
|
|
|
resolve(data) |
|
|
|
} else { |
|
|
|
resolve(null) |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
}, |
|
|
|
getTypeLable(type) { |
|
|
|
if (type) { |
|
|
|
const lable = this.unitList.filter((item) => item.value == type)[0] |
|
|
|