Commit 2c2773e9 by zhaochengxiang

字段来源跳转

parent 9b2ec7ac
...@@ -39,7 +39,7 @@ const ResizeableHeaderCell = props => { ...@@ -39,7 +39,7 @@ const ResizeableHeaderCell = props => {
}; };
const SourceComponent = (props) => { const SourceComponent = (props) => {
const { data, onClick } = props; const { data, onClick, name } = props;
const moreSourceComponent = <div style={{ maxWidth: 400, maxHeight: 300, overflow: 'auto' }}> const moreSourceComponent = <div style={{ maxWidth: 400, maxHeight: 300, overflow: 'auto' }}>
{ {
...@@ -53,7 +53,7 @@ const SourceComponent = (props) => { ...@@ -53,7 +53,7 @@ const SourceComponent = (props) => {
}} }}
onClick={(e) => { onClick={(e) => {
e.stopPropagation(); e.stopPropagation();
onClick && onClick(source.sourceId); onClick && onClick(source.sourceId, name);
}} }}
> >
{source.sourcePath||''} {source.sourcePath||''}
...@@ -72,7 +72,7 @@ const SourceComponent = (props) => { ...@@ -72,7 +72,7 @@ const SourceComponent = (props) => {
href='#' href='#'
onClick={(e) => { onClick={(e) => {
e.stopPropagation(); e.stopPropagation();
onClick && onClick(data[0].sourceId); onClick && onClick(data[0].sourceId, name);
}} }}
> >
{ {
...@@ -158,7 +158,7 @@ const SuggestTable = (props) => { ...@@ -158,7 +158,7 @@ const SuggestTable = (props) => {
ellipsis: true, ellipsis: true,
render: (_, record) => { render: (_, record) => {
return ( 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) => { ...@@ -166,7 +166,7 @@ const SuggestTable = (props) => {
const [ columns, setColumns ] = useState(cols); const [ columns, setColumns ] = useState(cols);
const sourceOnClick = (id) => { const sourceOnClick = (id, name) => {
const timestamp = new Date().getTime(); const timestamp = new Date().getTime();
const tempArray = id.split('='); const tempArray = id.split('=');
...@@ -179,7 +179,7 @@ const SuggestTable = (props) => { ...@@ -179,7 +179,7 @@ const SuggestTable = (props) => {
id id
}, },
callback: data => { 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 { } 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