|
@ -75,7 +75,7 @@ const ResourceRepository = (props) => { |
|
|
const child = data.children ? true : false; |
|
|
const child = data.children ? true : false; |
|
|
const key = data.key.split('/'); |
|
|
const key = data.key.split('/'); |
|
|
return (<div> |
|
|
return (<div> |
|
|
<Tooltip content={label}><span >{label.length > 8 ? label.substring(0, 8) + '...' : label}</span></Tooltip> |
|
|
<Tooltip content={label}><span >{label.length > 7 ? label.substring(0, 7) + '...' : label}</span></Tooltip> |
|
|
{true == data.operation ? |
|
|
{true == data.operation ? |
|
|
<span className='tree-icon'> |
|
|
<span className='tree-icon'> |
|
|
<IconEditStroked size='default' onClick={() => handleFolderClick(child ? '编辑' : '编辑子', !child, key[1], key[2] || undefined)} /> |
|
|
<IconEditStroked size='default' onClick={() => handleFolderClick(child ? '编辑' : '编辑子', !child, key[1], key[2] || undefined)} /> |
|
@ -129,7 +129,8 @@ const ResourceRepository = (props) => { |
|
|
const handleDelFile = (id) => { |
|
|
const handleDelFile = (id) => { |
|
|
dispatch(delResourceFile(id)).then(res => { |
|
|
dispatch(delResourceFile(id)).then(res => { |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
|
getFile(currentSelect); |
|
|
getFile(currentSelect, { limit: 10, page: 0 }, { restSearch: true }); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
@ -177,6 +178,9 @@ const ResourceRepository = (props) => { |
|
|
const query = pagination ? { ...pagination, type: arr[0] } : { ...paginationQuery, type: arr[0] }; |
|
|
const query = pagination ? { ...pagination, type: arr[0] } : { ...paginationQuery, type: arr[0] }; |
|
|
if (opt && opt.restSearch) { |
|
|
if (opt && opt.restSearch) { |
|
|
//选中树节点重置 |
|
|
//选中树节点重置 |
|
|
|
|
|
setPaginatioQuery({ limit: 10, page: 0 }); |
|
|
|
|
|
setKeyword(null); |
|
|
|
|
|
setDataRange(null); |
|
|
} else { |
|
|
} else { |
|
|
if (keyword) { query.keyword = keyword; } |
|
|
if (keyword) { query.keyword = keyword; } |
|
|
if (dataRange) { |
|
|
if (dataRange) { |
|
|