diff --git a/web/client/src/sections/fillion/components/luzhengmodel.js b/web/client/src/sections/fillion/components/luzhengmodel.js index 72cabb2b..292e87a2 100644 --- a/web/client/src/sections/fillion/components/luzhengmodel.js +++ b/web/client/src/sections/fillion/components/luzhengmodel.js @@ -89,6 +89,7 @@ const LuzhengModel = ({ editData, check, visible, onCancel, dispatch }) => { maxFileSize={200} fileList={editData?.picfile} listType ={'picture-card'} + isedit={editData?true:false} /> diff --git a/web/client/src/sections/fillion/components/uploads.js b/web/client/src/sections/fillion/components/uploads.js index 50686cf4..782fc311 100644 --- a/web/client/src/sections/fillion/components/uploads.js +++ b/web/client/src/sections/fillion/components/uploads.js @@ -18,7 +18,7 @@ class Uploads extends Component { removeFilesList: [] }; } - + dealName = (uploaded) => { console.log(uploaded) let realName = uploaded.split('/')[2] @@ -29,7 +29,6 @@ class Uploads extends Component { } setFileList = (value) => { - console.log(value,'value') let defaultFileList = []; defaultFileList = value.map((u, index) => { let fileUrl = `${u.url}`; @@ -57,11 +56,11 @@ class Uploads extends Component { componentWillReceiveProps (np) { const { dispatch, value: thisEditData, onChange } = this.props; const { value: nextEditData, clearFileList } = np; - console.log(np,'npp') + const setFileList = () => { let defaultFileList = []; defaultFileList = nextEditData.map((u, index) => { - let fileUrl = `${u.storageUrl}`; + let fileUrl = `${this.ApiRoot}/${u.storageUrl}`; return { uid: -index - 1, name: this.dealName(u.storageUrl), @@ -151,7 +150,7 @@ class Uploads extends Component { name: 'checkFile_', multiple: false, showUploadList: showUploadList || true, - action: `attachments/${uploadType_}`, + action: `${this.ApiRoot}/attachments/${uploadType_}`, listType: listType || 'text', disabled: disabled, beforeUpload: (file) => { @@ -247,7 +246,6 @@ class Uploads extends Component { }); }, onPreview (file) { - console.log(file,'file') let filePostfix = file.url.split('.').pop(); filePostfix = filePostfix.toLowerCase(); if (UploadPath.image.some((img) => img == filePostfix)) { @@ -261,7 +259,6 @@ class Uploads extends Component { }; let fileList_ = fileList - // .map(f => { // if (f.storageUrl) { // let realName = f.storageUrl.split('/').pop()