Browse Source

文件编辑

dev
wenlele 1 year ago
parent
commit
9e9b01f41f
  1. 4
      web/client/src/sections/service/components/recordModal.jsx

4
web/client/src/sections/service/components/recordModal.jsx

@ -20,8 +20,7 @@ const RecordModal = (props) => {
useEffect(() => {
setEndTime(recordRow?.solvingTime)
setStartTime(recordRow?.occurrenceTime)
console.log('recordRow', recordRow)
setUploadData(recordRow?.files || [])
}, [recordRow])
const cancelHandler = () => {
onClose()
@ -136,6 +135,7 @@ const RecordModal = (props) => {
<Upload
style={{ display: 'inline-block' }}
action={`${apiRoot}/attachments/p`}
defaultFileList={recordRow?.files?.map(v => ({ url: `/_file-server/${v.url}`, name: v.name, status: 'success', preview: ['png','jpg'].includes(v.name?.split('.')?.pop()?.replace('.', '')), })) || []}
accept={'.txt, .doc, .docx, .xls, .xlsx, .pdf, .png, .jpg, .rar, .zip'}
limit={1}
maxSize={51200}

Loading…
Cancel
Save