Commit dcd9cfcc by zhaochengxiang

模型提示信息

parent 26f36d2f
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@ant-design/pro-table": "^2.45.0",
"@antv/g2": "^4.1.12", "@antv/g2": "^4.1.12",
"@antv/g6": "^4.2.1", "@antv/g6": "^4.2.1",
"@craco/craco": "^6.1.2", "@craco/craco": "^6.1.2",
......
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { Input, Drawer } from 'antd'; import { Input, Drawer, Table, Tooltip } from 'antd';
import ProTable from "@ant-design/pro-table";
import { dispatch } from '../../../../model'; import { dispatch } from '../../../../model';
...@@ -49,23 +48,51 @@ const ConstraintDetailDrawer = (props) => { ...@@ -49,23 +48,51 @@ const ConstraintDetailDrawer = (props) => {
dataIndex: 'name', dataIndex: 'name',
width: 180, width: 180,
ellipsis: true, ellipsis: true,
render: (text, _, __) => {
return (
<Tooltip title={text||''}>
{text||''}
</Tooltip>
)
}
}, },
{ {
title: '规范中文名称', title: '规范中文名称',
dataIndex: 'cnName', dataIndex: 'cnName',
width: 180, width: 180,
ellipsis: true, ellipsis: true,
render: (text, _, __) => {
return (
<Tooltip title={text||''}>
{text||''}
</Tooltip>
)
}
}, },
{ {
title: '前置依赖', title: '前置依赖',
dataIndex: 'ruleName', dataIndex: 'ruleName',
width: 180, width: 180,
ellipsis: true, ellipsis: true,
render: (text, _, __) => {
return (
<Tooltip title={text||''}>
{text||''}
</Tooltip>
)
}
}, },
{ {
title: '描述', title: '描述',
dataIndex: 'ruleDesc', dataIndex: 'ruleDesc',
ellipsis: true, ellipsis: true,
render: (text, _, __) => {
return (
<Tooltip title={text||''}>
{text||''}
</Tooltip>
)
}
} }
] ]
...@@ -94,19 +121,12 @@ const ConstraintDetailDrawer = (props) => { ...@@ -94,19 +121,12 @@ const ConstraintDetailDrawer = (props) => {
style={{ width: 230 }} style={{ width: 230 }}
/> />
</div> </div>
<ProTable <Table
loading={loading} loading={loading}
columns={columns} columns={columns}
rowKey={'ruleName'} rowKey={'ruleName'}
dataSource={(rules||[]).filter(item => (item.ruleName||'').indexOf(keyword)!==-1)} dataSource={(rules||[]).filter(item => (item.ruleName||'').indexOf(keyword)!==-1)}
pagination={false} pagination={false}
search={false}
options={{
density: false,
setting: false,
reload: false,
}}
columnEmptyText={false}
sticky sticky
/> />
</Drawer> </Drawer>
......
...@@ -435,7 +435,9 @@ const ImportActionIndex = (props) => { ...@@ -435,7 +435,9 @@ const ImportActionIndex = (props) => {
ellipsis: true, ellipsis: true,
render: (text, record, index) => { render: (text, record, index) => {
return ( return (
<Tooltip title={text||''}>
<span style={{ fontWeight: 'bold' }} >{highlightSearchContentByTerms(text, terms)}</span> <span style={{ fontWeight: 'bold' }} >{highlightSearchContentByTerms(text, terms)}</span>
</Tooltip>
) )
} }
}, },
......
...@@ -502,9 +502,11 @@ const ImportActionTable = (props) => { ...@@ -502,9 +502,11 @@ const ImportActionTable = (props) => {
fixed: 'left', fixed: 'left',
render: (text, _, __) => { render: (text, _, __) => {
return ( return (
<Tooltip title={text||''}>
<span> <span>
{highlightSearchContentByTerms(text, terms)} {highlightSearchContentByTerms(text, terms)}
</span> </span>
</Tooltip>
) )
} }
}, },
...@@ -517,7 +519,9 @@ const ImportActionTable = (props) => { ...@@ -517,7 +519,9 @@ const ImportActionTable = (props) => {
require: true, require: true,
render: (text, record, index) => { render: (text, record, index) => {
return ( return (
<Tooltip title={text||''}>
<span style={{ fontWeight: 'bold' }} >{highlightSearchContentByTerms(text, terms)}</span> <span style={{ fontWeight: 'bold' }} >{highlightSearchContentByTerms(text, terms)}</span>
</Tooltip>
) )
} }
}, },
...@@ -651,9 +655,11 @@ const ImportActionTable = (props) => { ...@@ -651,9 +655,11 @@ const ImportActionTable = (props) => {
width: 200, width: 200,
render: (text, _, __) => { render: (text, _, __) => {
return ( return (
<Tooltip title={text||''}>
<span> <span>
{highlightSearchContentByTerms(text, terms)} {highlightSearchContentByTerms(text, terms)}
</span> </span>
</Tooltip>
) )
} }
}, },
......
...@@ -50,9 +50,11 @@ const ModelTable = (props) => { ...@@ -50,9 +50,11 @@ const ModelTable = (props) => {
ellipsis: true, ellipsis: true,
render: (text, record, _) => { render: (text, record, _) => {
return ( return (
<Button type="link" onClick={()=>{detailItem(record);}}> <Tooltip title={text||''}>
<a href='' onClick={()=>{detailItem(record);}}>
{text||''} {text||''}
</Button> </a>
</Tooltip>
); );
} }
}, },
...@@ -61,11 +63,25 @@ const ModelTable = (props) => { ...@@ -61,11 +63,25 @@ const ModelTable = (props) => {
dataIndex: 'cnName', dataIndex: 'cnName',
width: 180, width: 180,
ellipsis: true, ellipsis: true,
render: (text, _, __) => {
return (
<Tooltip title={text||''}>
{text||''}
</Tooltip>
)
}
}, },
{ {
title: '模型描述', title: '模型描述',
dataIndex: 'remark', dataIndex: 'remark',
ellipsis: true, ellipsis: true,
render: (text, _, __) => {
return (
<Tooltip title={text||''}>
{text||''}
</Tooltip>
);
}
}, },
{ {
title: '状态', title: '状态',
......
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