|
|
@ -54,7 +54,7 @@ const ResourceRepository = (props) => { |
|
|
|
return <div style={{ color: "#1890FF" }}> |
|
|
|
<Space> |
|
|
|
<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> |
|
|
|
</div> |
|
|
|
} |
|
|
@ -175,7 +175,7 @@ const ResourceRepository = (props) => { |
|
|
|
setDefaultExpandedKey([payload.data[0].key]); |
|
|
|
} |
|
|
|
} |
|
|
|
setCurrentSelect([defaultKey]); |
|
|
|
setCurrentSelect(defaultKey); |
|
|
|
setTreeData(payload.data); |
|
|
|
getFile(defaultKey); |
|
|
|
} |
|
|
@ -228,7 +228,7 @@ const ResourceRepository = (props) => { |
|
|
|
<Row type="flex" justify="space-around" align="middle"> |
|
|
|
<Col span={18}> |
|
|
|
<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> |
|
|
|
</Space> |
|
|
|
</Col> |
|
|
|