Commit 78ea3d10 by zhaochengxiang

修改未分类资产bug

parent 2ce75a88
......@@ -47,7 +47,7 @@ const AssetTree = (props) => {
useEffect(() => {
if ((tableId||'') !== '') {
getTableDirIds();
}
}
//eslint-disable-next-line react-hooks/exhaustive-deps
}, [tableId])
......
......@@ -44,7 +44,6 @@ const AssetMount = (props) => {
const reset = () => {
setConfirmLoading(false);
setDirIds([]);
}
return(
......@@ -59,15 +58,13 @@ const AssetMount = (props) => {
}}
onOk={ onOk }
>
{
visible && <AssetTree
readOnly={true}
checkable={true}
onCheck={onCheck}
tableId={refrence==='asset-manage'?id:''}
{...props}
/>
}
<AssetTree
readOnly={true}
checkable={true}
onCheck={onCheck}
tableId={refrence==='asset-manage'?id:''}
{...props}
/>
</Modal>
)
}
......
......@@ -126,6 +126,11 @@ const AssetRecycle = (props) => {
}
const mountItems = () => {
if ((selectedRowKeys||[]).length === 0) {
showMessage('warn', '请先选择资产');
return;
}
setBatchMount(true);
setAssetMountVisible(true);
}
......@@ -180,7 +185,12 @@ const AssetRecycle = (props) => {
const onAssetMountCancel = (refresh = false) => {
setAssetMountVisible(false);
refresh && getAssets();
if (refresh) {
batchMount && setSelectedRowKeys([]);
getAssets();
}
}
const onSelectChange = keys => {
......
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