Commit 42a4b586 by zhaochengxiang

资产路径定位

parent 602d8381
...@@ -200,8 +200,9 @@ const AssetAction = (props) => { ...@@ -200,8 +200,9 @@ const AssetAction = (props) => {
if (!readOnly) { if (!readOnly) {
setFullScreen(false); setFullScreen(false);
let event = new Event('storage'); let event = new Event('storage');
event.key = 'assetDirChangeEvent'; event.key = 'assetPathOnClickEvent';
event.dirId = item.dirId||''; event.dirId = item.dirId||'';
event.id = item.dataAssetId||'';
window?.dispatchEvent(event); window?.dispatchEvent(event);
} else { } else {
const timestamp = new Date().getTime(); const timestamp = new Date().getTime();
......
...@@ -107,7 +107,7 @@ const AssetManageTree = (props) => { ...@@ -107,7 +107,7 @@ const AssetManageTree = (props) => {
}, [centerId]) }, [centerId])
const storageChange = (e) => { const storageChange = (e) => {
if (e.key === 'assetDirChangeEvent') { if (e.key === 'assetDirChangeEvent' || e.key === 'assetPathOnClickEvent') {
if ((e.dirId||'') !== '') { if ((e.dirId||'') !== '') {
treeDirectoryChanged(e.dirId); treeDirectoryChanged(e.dirId);
} }
......
...@@ -243,6 +243,12 @@ const AssetTable = (props) => { ...@@ -243,6 +243,12 @@ const AssetTable = (props) => {
if (e.key === 'assetRelationOnClickEvent') { if (e.key === 'assetRelationOnClickEvent') {
remoteRelationRef.current = e.relation; remoteRelationRef.current = e.relation;
shouldScrollRef.current = true; shouldScrollRef.current = true;
} else if (e.key === 'assetPathOnClickEvent') {
remoteRelationRef.current = {
dataAssetId: e.id,
dirId: e.dirId
};
shouldScrollRef.current = true;
} }
} }
......
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