Commit 13956d86 by zhaochengxiang

bug fix

parent 9a2ef149
...@@ -255,6 +255,8 @@ const AssetTable = (props) => { ...@@ -255,6 +255,8 @@ const AssetTable = (props) => {
//eslint-disable-next-line react-hooks/exhaustive-deps //eslint-disable-next-line react-hooks/exhaustive-deps
}, []) }, [])
console.log('node type', nodeType)
useEffect(() => { useEffect(() => {
if (nodeId !== null && nodeId !== undefined) { if (nodeId !== null && nodeId !== undefined) {
setSelectItem({}); setSelectItem({});
...@@ -284,7 +286,7 @@ const AssetTable = (props) => { ...@@ -284,7 +286,7 @@ const AssetTable = (props) => {
}, [timestamp]) }, [timestamp])
useEffect(() => { useEffect(() => {
if (reference !== AssetRecycleReference && nodeId) { if (reference !== AssetRecycleReference && nodeId && nodeType) {
getFilterElementsGroupThenGetDataAssets(); getFilterElementsGroupThenGetDataAssets();
} }
//eslint-disable-next-line react-hooks/exhaustive-deps //eslint-disable-next-line react-hooks/exhaustive-deps
...@@ -1037,7 +1039,7 @@ const AssetTable = (props) => { ...@@ -1037,7 +1039,7 @@ const AssetTable = (props) => {
> >
<Space> <Space>
{ {
((reference===AssetManageReference||isDataKeyUser) && template && template?.structedStateEnum!=='structured') && nodeId && <Button onClick={addAsset}>新增</Button> (((reference===AssetManageReference&&nodeType!=='custom')||isDataKeyUser) && template && template?.structedStateEnum!=='structured') && nodeId && <Button onClick={addAsset}>新增</Button>
} }
{ {
(reference===AssetManageReference && nodeType!=='custom') && <Button onClick={importAsset}>导入</Button> (reference===AssetManageReference && nodeType!=='custom') && <Button onClick={importAsset}>导入</Button>
......
...@@ -74,6 +74,8 @@ const AssetManage = (props) => { ...@@ -74,6 +74,8 @@ const AssetManage = (props) => {
'middle-fullscreen': assetFullScreen 'middle-fullscreen': assetFullScreen
}); });
console.log('node type', nodeType)
return ( return (
<div className={classes}> <div className={classes}>
<ResizableBox <ResizableBox
......
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