|
|
@ -10,7 +10,7 @@ import './style.less' |
|
|
|
|
|
|
|
|
|
|
|
const Rest = (props) => { |
|
|
|
const { dispatch, actions, user, qiniu, loading, clientHeight, overallProjectId } = props |
|
|
|
const { dispatch, actions, user, qiniu, loading, clientHeight, overallProjectId ,apiRoot} = props |
|
|
|
const { install, means } = actions |
|
|
|
const [pomsList, setPomsList] = useState([]); //项目 |
|
|
|
const [showPomsList, setShowPomsList] = useState([]); //项目 |
|
|
@ -86,6 +86,7 @@ const Rest = (props) => { |
|
|
|
}, [fileId]) |
|
|
|
|
|
|
|
const fileList = (id) => { |
|
|
|
|
|
|
|
dispatch(means.fileList({ projectId: id, type: 3 })).then((res => { |
|
|
|
if (res.success) { |
|
|
|
let data = res.payload.data |
|
|
@ -391,7 +392,7 @@ const Rest = (props) => { |
|
|
|
<div style={{ marginTop: 6 }}>文件<span style={{ color: 'red' }}>*</span>:</div> |
|
|
|
<Upload |
|
|
|
style={{ display: 'inline-block' }} |
|
|
|
action="/_upload/attachments" |
|
|
|
action={`${apiRoot}/attachments/p`} |
|
|
|
accept={'.txt, .doc, .docx, .xls, .xlsx, .pdf, .png, .jpg, .rar, .zip'} |
|
|
|
limit={1} |
|
|
|
maxSize={51200} |
|
|
@ -399,7 +400,6 @@ const Rest = (props) => { |
|
|
|
setUploadData({}) |
|
|
|
}} |
|
|
|
onSuccess={(responseBody, file) => { |
|
|
|
|
|
|
|
setUploadData({ |
|
|
|
name: file.name, |
|
|
|
size: file.size, |
|
|
@ -558,7 +558,8 @@ function mapStateToProps (state) { |
|
|
|
overallProjectId: global.pepProjectId, |
|
|
|
// socket: webSocket.socket |
|
|
|
clientHeight: global.clientHeight, |
|
|
|
qiniu: global.qiniu?.domain |
|
|
|
qiniu: global.qiniu?.domain, |
|
|
|
apiRoot:global.apiRoot |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|