Commit 2c2773e9 by zhaochengxiang

字段来源跳转

parent 9b2ec7ac
......@@ -39,7 +39,7 @@ const ResizeableHeaderCell = props => {
};
const SourceComponent = (props) => {
const { data, onClick } = props;
const { data, onClick, name } = props;
const moreSourceComponent = <div style={{ maxWidth: 400, maxHeight: 300, overflow: 'auto' }}>
{
......@@ -53,7 +53,7 @@ const SourceComponent = (props) => {
}}
onClick={(e) => {
e.stopPropagation();
onClick && onClick(source.sourceId);
onClick && onClick(source.sourceId, name);
}}
>
{source.sourcePath||''}
......@@ -72,7 +72,7 @@ const SourceComponent = (props) => {
href='#'
onClick={(e) => {
e.stopPropagation();
onClick && onClick(data[0].sourceId);
onClick && onClick(data[0].sourceId, name);
}}
>
{
......@@ -158,7 +158,7 @@ const SuggestTable = (props) => {
ellipsis: true,
render: (_, record) => {
return (
<SourceComponent data={record.recommendedStats?.sourceInfos||[]} onClick={sourceOnClick} />
<SourceComponent data={record.recommendedStats?.sourceInfos||[]} name={record.name||''} onClick={sourceOnClick} />
);
}
},
......@@ -166,7 +166,7 @@ const SuggestTable = (props) => {
const [ columns, setColumns ] = useState(cols);
const sourceOnClick = (id) => {
const sourceOnClick = (id, name) => {
const timestamp = new Date().getTime();
const tempArray = id.split('=');
......@@ -179,7 +179,7 @@ const SuggestTable = (props) => {
id
},
callback: data => {
window.open(`/center-home/menu/metasearch?id=${data._id}&did=${tempArray[1]||''}&timestamp=${timestamp}`);
window.open(`/center-home/metadetail?mid=${encodeURIComponent(data._id)}&action=metadetail&type=detail&manager=false&activekey=1&name=${encodeURIComponent(name||'')}`);
}
})
} else {
......
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