Commit 78ea3d10 by zhaochengxiang

修改未分类资产bug

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