Commit ab3d761e authored by XieZhiXiong's avatar XieZhiXiong

Merge branch 'cherry-pick-af81160a' into 'v2-220618'

Merge branch 'fix-v2-220418-1-adminListStyle' into 'v2-220618' See merge request linkseeks-design/pro-admin!104
parents b3e8986a fce888b5
......@@ -61,7 +61,8 @@ const ListWrap: React.FC<ListType> = (props) => {
currentListData.length && currentListData.forEach(item => {
let obj = {}
item.map(val => {
return obj[val.fieldName] = val.fieldValue
obj[val.fieldName] = val.fieldValue
obj.key = val.fieldOrder
})
sumData.push(obj)
})
......@@ -71,7 +72,7 @@ const ListWrap: React.FC<ListType> = (props) => {
}, [currentListData])
return (
<Table columns={tableCoumns} pagination={false} dataSource={tableData} style={{width: '95%'}} />
<Table rowKey='key' columns={tableCoumns} pagination={false} dataSource={tableData} style={{width: '95%'}} />
)
}
......
......@@ -85,9 +85,10 @@ const MemberForm: React.FC<MemberFormProps> = ({
...rest
}: any = infoRes.data;
// 注册资料处理
const detail = {}, list = []
const detail = {}
for (let i = 0; i < groups.length; i++) {
const item = groups[i];
const item = groups[i]
if (item.elements) {
for (let j = 0; j < item.elements.length; j++) {
const ele = item.elements[j];
......@@ -95,14 +96,13 @@ const MemberForm: React.FC<MemberFormProps> = ({
detail[ele.fieldName] = ele.fieldValue;
}
if (ele.fieldType === 'list') {
ele.registers && ele.registers.forEach(element => {
let obj = {}
element.map(val => {
detail[ele.fieldName] = ele.registers?.map(element => {
let obj = {};
element.forEach(val => {
obj[val.fieldName] = val.fieldValue;
})
list.push(obj)
})
detail[ele.fieldName] = list
});
return obj;
});
}
}
}
......
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