|
@ -54,7 +54,7 @@ const ResourceRepository = (props) => { |
|
|
return <div style={{ color: "#1890FF" }}> |
|
|
return <div style={{ color: "#1890FF" }}> |
|
|
<Space> |
|
|
<Space> |
|
|
<a href={'/_file-server/' + record.attachPath + '?filename=' + encodeURIComponent(record.fileName + record.fileType)}>下载</a> |
|
|
<a href={'/_file-server/' + record.attachPath + '?filename=' + encodeURIComponent(record.fileName + record.fileType)}>下载</a> |
|
|
<a onClick={() => handleDelFile(record.id)}>删除</a> |
|
|
{currentSelect.includes("公司培训资料") && <a style={{ cursor: 'pointer' }} onClick={() => handleDelFile(record.id)}>删除</a>} |
|
|
</Space> |
|
|
</Space> |
|
|
</div> |
|
|
</div> |
|
|
} |
|
|
} |
|
@ -175,7 +175,7 @@ const ResourceRepository = (props) => { |
|
|
setDefaultExpandedKey([payload.data[0].key]); |
|
|
setDefaultExpandedKey([payload.data[0].key]); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
setCurrentSelect([defaultKey]); |
|
|
setCurrentSelect(defaultKey); |
|
|
setTreeData(payload.data); |
|
|
setTreeData(payload.data); |
|
|
getFile(defaultKey); |
|
|
getFile(defaultKey); |
|
|
} |
|
|
} |
|
@ -228,7 +228,7 @@ const ResourceRepository = (props) => { |
|
|
<Row type="flex" justify="space-around" align="middle"> |
|
|
<Row type="flex" justify="space-around" align="middle"> |
|
|
<Col span={18}> |
|
|
<Col span={18}> |
|
|
<Space> |
|
|
<Space> |
|
|
{currentSelect && currentSelect.includes("部门培训资料") ? null : <Button theme='solid' type='primary' onClick={() => { setUploadModalVisiable(true) }} >上传文件</Button>} |
|
|
{currentSelect && currentSelect.includes("公司培训资料") && currentSelect.split("/").length == 3 ? <Button theme='solid' type='primary' onClick={() => { setUploadModalVisiable(true) }} >上传文件</Button> : null} |
|
|
<span className="path-lable"><strong>当前文件夹:{currentSelect}</strong></span> |
|
|
<span className="path-lable"><strong>当前文件夹:{currentSelect}</strong></span> |
|
|
</Space> |
|
|
</Space> |
|
|
</Col> |
|
|
</Col> |
|
|