Commit a448bac9 by zhaochengxiang

资产项

parent fa76e217
...@@ -69,7 +69,7 @@ const AssetItem = (props) => { ...@@ -69,7 +69,7 @@ const AssetItem = (props) => {
return ( return (
<Tooltip <Tooltip
overlayClassName='tooltip-common' overlayClassName='tooltip-common'
title={(typeof metadata==='string') ? (content||'') : <div style={{ width: 500, maxHeight: 300, overflow: 'auto' }}> title={(typeof metadata==='string') ? (content||'') : <div style={{ width: 500 }}>
<Table <Table
dataSource={metadata?.columnItems||[]} dataSource={metadata?.columnItems||[]}
columns={cols} columns={cols}
......
...@@ -1392,6 +1392,13 @@ const MetadataColumnTooltipTitle = ({ data }) => { ...@@ -1392,6 +1392,13 @@ const MetadataColumnTooltipTitle = ({ data }) => {
return ( return (
[ [
{ {
title: '序号',
width: 60,
dataIndex: 'index',
ellipsis: true,
render: (_, __, index) => (index+1)
},
{
title: '名称', title: '名称',
width: 160, width: 160,
dataIndex: 'name', dataIndex: 'name',
...@@ -1408,17 +1415,25 @@ const MetadataColumnTooltipTitle = ({ data }) => { ...@@ -1408,17 +1415,25 @@ const MetadataColumnTooltipTitle = ({ data }) => {
width: 150, width: 150,
dataIndex: 'typeName', dataIndex: 'typeName',
ellipsis: true, ellipsis: true,
render: (text, record) => {
let suffix = (record.size!==null&&record.size!==undefined) ? `(${record.size})` : ''
if(record.size && record.decimalDigits){
suffix = `(${record.size},${record.decimalDigits})`
}
return `${text}${suffix}`
}
}, },
{ {
title: '是否允许为空', title: '是否允许为空',
dataIndex: 'isNullable', dataIndex: 'isNullable',
width: 100, width: 120,
ellipsis: true, ellipsis: true,
}, },
{ {
title: '是否为主键', title: '是否为主键',
dataIndex: 'isPrimaryKey', dataIndex: 'isPrimaryKey',
width: 100, width: 120,
ellipsis: true, ellipsis: true,
}, },
] ]
...@@ -1458,20 +1473,26 @@ const MetadataColumnTooltipTitle = ({ data }) => { ...@@ -1458,20 +1473,26 @@ const MetadataColumnTooltipTitle = ({ data }) => {
} }
return ( return (
<div style={{ maxHeight: 300, overflow: 'auto' }}> <div>
<div className='mb-2'> {
((data??[]).length > 1) && <div className='mb-2'>
<Select <Select
value={currentMetadataId} value={currentMetadataId}
onChange={(value) => { onChange={(value) => {
setMetadataId(value) setMetadataId(value)
}} }}
style={{ width: 170 }} style={{ width: 170 }}
dropdownStyle={{
zIndex: 1100
}}
> >
{ {
(data??[]).map((item, index) => <Select.Option value={item.metadataId} key={index}>{item.enName}</Select.Option>) (data??[]).map((item, index) => <Select.Option value={item.metadataId} key={index}>{item.enName}</Select.Option>)
} }
</Select> </Select>
</div> </div>
}
<AntdTable <AntdTable
dataSource={columnData} dataSource={columnData}
columns={cols} columns={cols}
...@@ -1506,7 +1527,7 @@ const MetadataColumn = ({ data }) => { ...@@ -1506,7 +1527,7 @@ const MetadataColumn = ({ data }) => {
<Typography.Text ellipsis={true}> <Typography.Text ellipsis={true}>
{decodeData} {decodeData}
</Typography.Text> </Typography.Text>
</Tooltip> : ((typeof decodeData === 'object') ? <Tooltip </Tooltip> : (Array.isArray(decodeData) ? <Tooltip
overlayClassName='tooltip-common' overlayClassName='tooltip-common'
title={<MetadataColumnTooltipTitle data={decodeData} />} title={<MetadataColumnTooltipTitle data={decodeData} />}
> >
......
...@@ -94,7 +94,7 @@ const FC = (props) => { ...@@ -94,7 +94,7 @@ const FC = (props) => {
return ( return (
<Tooltip <Tooltip
title={ title={
<div style={{ maxWidth: 400, maxHeight: 300, overflow: 'auto' }}> <div style={{ maxWidth: 400 }}>
{text} {text}
</div> </div>
} }
......
...@@ -46,7 +46,7 @@ const ModelNameColumn = (props) => { ...@@ -46,7 +46,7 @@ const ModelNameColumn = (props) => {
let _textComponent = <span style={{ color: '#000' }}>{text}</span>; let _textComponent = <span style={{ color: '#000' }}>{text}</span>;
if (data.digest) { if (data.digest) {
_textComponent = <div style={{ width: 500, maxHeight: 300, overflow: 'auto' }}> _textComponent = <div style={{ width: 500 }}>
<Table <Table
rowKey='name' rowKey='name'
dataSource={data.digest.attributeDigests||[]} dataSource={data.digest.attributeDigests||[]}
......
...@@ -88,7 +88,7 @@ const ModelNameColumn = (props) => { ...@@ -88,7 +88,7 @@ const ModelNameColumn = (props) => {
let _textComponent = <span style={{ color: '#000' }}>{text}</span>; let _textComponent = <span style={{ color: '#000' }}>{text}</span>;
if (data.digest) { if (data.digest) {
_textComponent = <div style={{ maxHeight: 300, overflow: 'auto' }}> _textComponent = <div>
<Table <Table
rowKey='name' rowKey='name'
dataSource={data.digest.attributeDigests||[]} dataSource={data.digest.attributeDigests||[]}
......
...@@ -41,7 +41,7 @@ const ResizeableHeaderCell = props => { ...@@ -41,7 +41,7 @@ const ResizeableHeaderCell = props => {
const SourceComponent = (props) => { const SourceComponent = (props) => {
const { data, onClick, name } = props; const { data, onClick, name } = props;
const moreSourceComponent = <div style={{ maxWidth: 400, maxHeight: 300, overflow: 'auto' }}> const moreSourceComponent = <div style={{ maxWidth: 400 }}>
{ {
(data||[]).map((source, index) => { (data||[]).map((source, index) => {
return ( return (
......
...@@ -91,7 +91,7 @@ const PartitionCURD = (props) => { ...@@ -91,7 +91,7 @@ const PartitionCURD = (props) => {
<Tooltip <Tooltip
placement='topLeft' placement='topLeft'
title={ title={
<div style={{ maxWidth: 400, maxHeight: 300, overflow: 'auto' }}> <div style={{ maxWidth: 400 }}>
{text||''} {text||''}
</div> </div>
} }
......
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