修改显示问题
This commit is contained in:
parent
2d3e8c733c
commit
b44fc70a6a
@ -25,7 +25,8 @@
|
||||
</el-row>
|
||||
</ContentWrap>
|
||||
<ContentWrap>
|
||||
<el-table :data="data1" show-summary max-height="650"
|
||||
<el-table
|
||||
:data="data1" show-summary max-height="650"
|
||||
default-expand-all
|
||||
row-key="orgname"
|
||||
:tree-props="{ children: 'children' }">
|
||||
@ -143,7 +144,8 @@ const getList = async ()=>{
|
||||
]
|
||||
}
|
||||
let resp = await PatientApi.getData(params)
|
||||
data1.value = dataProcessing(resp)
|
||||
const rawData = toRaw(resp)
|
||||
data1.value = dataProcessing(rawData)
|
||||
console.log(data1.value)
|
||||
}
|
||||
/**
|
||||
@ -173,10 +175,10 @@ const dataProcessing = (data) => {
|
||||
acc[key].smiflag += current.smiflag;
|
||||
acc[key].pulflag += current.pulflag;
|
||||
acc[key].sum += current.sum;
|
||||
// 将当前对象添加到 list 中(避免引用问题需深拷贝)
|
||||
let cObj = Object.assign(current,{})
|
||||
delete cObj.orgname
|
||||
acc[key].children.push({ ...cObj });
|
||||
// 将当前对象添加到 children 中,移除 orgname
|
||||
const child = { ...current };
|
||||
delete child.orgname;
|
||||
acc[key].children.push(child);
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user