Commit a448bac9 by zhaochengxiang

资产项

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