forked from huge/frontEnd/hugeOA

Mr Ke
2020-05-16 c235b08e0e1f965357b34e0dbd6d8605fd6c68df
src/components/page/DocumentDetailPage/index.jsx
@@ -58,7 +58,7 @@
          documentType: res.documentType || 'DT00002'
        },
        loading: false,
        fileList: res.attachmentList && res.attachmentList.map((a) => ({ ...a, key: a.id, uid: a.id, name: a.fileName + '.' + a.suffix, })) || []
        fileList: res.attachmentList && res.attachmentList.map((a) => ({ ...a, key: a.id, uid: a.id, name: a.fileName + '.' + a.suffix, status: 'done' })) || []
      });
    });
  }
@@ -136,6 +136,14 @@
      header: {
        Authorization: window.localStorage.getItem('token')
      },
      showUploadList: {
        showDownloadIcon: true,
        showRemoveIcon: false,
        showPreviewIcon: true
      },
      onDownload: (file) => {
        console.log('file', file)
      },
      onChange: ({ file, fileList }) => {
        fileList = fileList.slice(-2);
        fileList = fileList.map(file => {
@@ -151,7 +159,6 @@
      onPreview: (file) => {
        window.open(file.url);
      },
      showUploadList: { showPreviewIcon: true, showDownloadIcon: true, showRemoveIcon: false }
    };
    return (