优化
This commit is contained in:
@ -40,6 +40,7 @@
|
|||||||
style="width: 100%; margin-bottom: 20px; height: calc(100vh - 230px)"
|
style="width: 100%; margin-bottom: 20px; height: calc(100vh - 230px)"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
border
|
border
|
||||||
|
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||||
>
|
>
|
||||||
<el-table-column prop="num" label="编号" />
|
<el-table-column prop="num" label="编号" />
|
||||||
<el-table-column prop="name" label="工程或费用名称" width="180" />
|
<el-table-column prop="name" label="工程或费用名称" width="180" />
|
||||||
@ -248,7 +249,8 @@ async function getMasterDataList() {
|
|||||||
|
|
||||||
// 处理结果
|
// 处理结果
|
||||||
if (supplyPlanRes.list == null) {
|
if (supplyPlanRes.list == null) {
|
||||||
state.tableData = supplyPlanRes.rows || [];
|
// state.tableData = supplyPlanRes.rows || [];
|
||||||
|
state.tableData = proxy?.handleTree(supplyPlanRes.rows, 'sid', 'pid');
|
||||||
console.log('state.tableData', state.tableData);
|
console.log('state.tableData', state.tableData);
|
||||||
} else {
|
} else {
|
||||||
// 根据实际业务逻辑处理有list的情况
|
// 根据实际业务逻辑处理有list的情况
|
||||||
|
Reference in New Issue
Block a user