Commit a6bb98f6 by 放生的三文鱼

修复未挂载数据

parent e780a0b6
......@@ -69,7 +69,7 @@ const FC = (props) => {
const [columns, tableData, total] = React.useMemo(() => {
let [newColumns, newTableData] = [[], []]
for (const element of filterElements??[]) {
for (const element of filterElements??[]) {
const name = element.name
const column = {
title: name,
......@@ -109,21 +109,18 @@ const FC = (props) => {
}
newColumns.push(column)
}
}
if (!loadingFilterElements) {
for (const item of (data?.data??[])) {
let index = 0
let newItem = {}
for (const elementValue of (item.elementValues??[])) {
for (const value of elementValue.values) {
for (const elementValue of (item.elementValuesWithoutTypeAttribute??[])) {
if ((newColumns??[]).length > index) {
const name = newColumns[index].dataIndex
newItem[name] = value
newItem[name] = elementValue
}
index++
}
}
newTableData.push({...item, ...newItem})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment