Commit c8627e28 authored by shaoan123's avatar shaoan123

解决表字段配置没有key的问题

parent 6d52b027
Pipeline #31321 passed with stages
in 51 minutes 11 seconds
...@@ -94,7 +94,8 @@ const TableManager = () => { ...@@ -94,7 +94,8 @@ const TableManager = () => {
setVisible(true); setVisible(true);
} }
//字段配置 //字段配置
const fieldsConfig = (record) => { const fieldsConfig = (record,e) => {
e.stopPropagation()
setFormObj(record); setFormObj(record);
history.push(`/platformCenter/bsmanger/filedConfig/${record.tableName}`) history.push(`/platformCenter/bsmanger/filedConfig/${record.tableName}`)
// setType('config'); // setType('config');
...@@ -174,24 +175,24 @@ const TableManager = () => { ...@@ -174,24 +175,24 @@ const TableManager = () => {
} }
} }
} }
for (let key in tempObj) { for (let keys in tempObj) {
let arr = [] let arr = []
tempObj[key].map(item => { tempObj[keys].map((item,index) => {
tempObj[key] = arr; tempObj[keys] = arr;
item.key = index
arr.push(item) arr.push(item)
}) })
} }
return tempObj return tempObj
} }
const expandedRowRender = (item) => { const expandedRowRender = (item) => {
console.log('item',item);
const columns1 = [ const columns1 = [
{ {
title: '名称', title: '名称',
dataIndex: 'tableName', dataIndex: 'tableName',
key: 'tableName', key: 'tableName',
width: 300, width: 300,
render: text => <a>{text}</a>, render: (text,record) => <a onClick={e=>fieldsConfig(record,e)}>{text}</a>,
}, },
{ {
...@@ -256,7 +257,7 @@ const TableManager = () => { ...@@ -256,7 +257,7 @@ const TableManager = () => {
</Tooltip> </Tooltip>
<Tooltip title="字段配置"> <Tooltip title="字段配置">
<FontColorsOutlined <FontColorsOutlined
onClick={() => fieldsConfig(record)} onClick={e => fieldsConfig(record,e)}
style={{ fontSize: '16px', color: '#1890FF' }} style={{ fontSize: '16px', color: '#1890FF' }}
/> />
</Tooltip> </Tooltip>
......
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