forked from ddrilling/asb_cloud_front
Исправлено отображение строк в таблицах во вкладке Измерения
This commit is contained in:
parent
fbe86e23f6
commit
a41f5d4bf5
@ -10,45 +10,42 @@ export const View = memo(({ columns, item }) => !item || !columns?.length ? (
|
|||||||
<Empty key={'empty'} image={Empty.PRESENTED_IMAGE_SIMPLE} />
|
<Empty key={'empty'} image={Empty.PRESENTED_IMAGE_SIMPLE} />
|
||||||
) : (
|
) : (
|
||||||
<Grid>
|
<Grid>
|
||||||
{columns.map((cols, j) => {
|
{columns.map((cols, i) => {
|
||||||
let rowPosition = 0
|
const columnPosition = 1 + i * 2
|
||||||
let columnPosition = 1 + j * 2
|
return cols.map((column, j) => (
|
||||||
return cols.map((column) => {
|
<Fragment key={column.key}>
|
||||||
rowPosition++
|
<GridItem
|
||||||
return (
|
key={column.dataIndex}
|
||||||
<Fragment key={column.key}>
|
row={j + 1}
|
||||||
<GridItem
|
col={columnPosition}
|
||||||
key={column.dataIndex}
|
className={'measure-column-header'}
|
||||||
row={rowPosition}
|
>
|
||||||
col={columnPosition}
|
{column.title}
|
||||||
className={'measure-column-header'}
|
</GridItem>
|
||||||
>
|
|
||||||
{column.title}
|
|
||||||
</GridItem>
|
|
||||||
|
|
||||||
<GridItem
|
<GridItem
|
||||||
key={column.title}
|
key={column.title}
|
||||||
row={rowPosition}
|
row={j + 1}
|
||||||
col={columnPosition + 1}
|
col={columnPosition + 1}
|
||||||
className={'measure-column-value'}
|
className={'measure-column-value'}
|
||||||
style={{ padding: 0 }}
|
style={{ padding: 0 }}
|
||||||
>
|
>
|
||||||
{column.render ? (
|
{column.render ? (
|
||||||
<Form.Item
|
<Form.Item
|
||||||
key={column.dataIndex}
|
key={column.dataIndex}
|
||||||
name={column.dataIndex}
|
name={column.dataIndex}
|
||||||
style={{ margin: 0 }}
|
style={{ margin: 0 }}
|
||||||
>
|
>
|
||||||
{column.render(item[column.dataIndex])}
|
{column.render(item[column.dataIndex])}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
) : (
|
) : (
|
||||||
<p key={column.title} className={'m-5px'}>
|
<p key={column.title} className={'m-5px'}>
|
||||||
{item[column.dataIndex]}
|
{item[column.dataIndex]}
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
</GridItem>
|
</GridItem>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)})
|
))
|
||||||
}).flat()}
|
}).flat()}
|
||||||
</Grid>
|
</Grid>
|
||||||
))
|
))
|
||||||
|
Loading…
Reference in New Issue
Block a user