Commit 42a4b586 by zhaochengxiang

资产路径定位

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