调整上传处理

dev_aliyun_beta
杨树明 6 years ago
parent 9392cafd52
commit 8613995658

@ -34,6 +34,7 @@ class AccessoryModal2 extends Component{
} }
// 附件相关 START // 附件相关 START
handleChange = (info) => { handleChange = (info) => {
if(info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed'){
let fileList = info.fileList; let fileList = info.fileList;
console.log(fileList) console.log(fileList)
// for(var list of fileList ){ // for(var list of fileList ){
@ -42,6 +43,8 @@ class AccessoryModal2 extends Component{
this.setState({ fileList }); this.setState({ fileList });
} }
}
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
// confirm({ // confirm({
// title: '确定要删除这个附件吗?', // title: '确定要删除这个附件吗?',

@ -253,19 +253,19 @@ class Selectsetting extends Component{
// 附件相关 START // 附件相关 START
handleChange = (info) => { handleChange = (info) => {
if(info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
let fileList = info.fileList; let fileList = info.fileList;
if(info.file.status!="removed"){ if (info.file.status != "removed") {
this.setState({ this.setState({
fileList: appendFileSizeToUploadFileAll(fileList), fileList: appendFileSizeToUploadFileAll(fileList),
fileListtype:true fileListtype: true
}); });
}else{ } else {
this.setState({ this.setState({
fileList: appendFileSizeToUploadFileAll(fileList), fileList: appendFileSizeToUploadFileAll(fileList),
}); });
} }
}
} }
// onAttachmentRemove = (file) => { // onAttachmentRemove = (file) => {

@ -86,19 +86,20 @@ class Sendresource extends Component{
} }
// 附件相关 START // 附件相关 START
handleChange = (info) => { handleChange = (info) => {
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
let fileList = info.fileList; let fileList = info.fileList;
if(info.file.status!="removed"){ if (info.file.status != "removed") {
this.setState({ this.setState({
fileList: appendFileSizeToUploadFileAll(fileList), fileList: appendFileSizeToUploadFileAll(fileList),
fileListtype:true fileListtype: true
}); });
}else{ } else {
this.setState({ this.setState({
fileList: appendFileSizeToUploadFileAll(fileList), fileList: appendFileSizeToUploadFileAll(fileList),
}); });
} }
} }
}
// onAttachmentRemove = (file) => { // onAttachmentRemove = (file) => {
// //

@ -759,7 +759,8 @@ class Newshixuns extends Component {
// 附件相关 START // 附件相关 START
handleChange = (info) => { handleChange = (info) => {
let {fileList}=this.state; if(info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
let {fileList} = this.state;
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
console.log("handleChange1"); console.log("handleChange1");
@ -767,11 +768,12 @@ class Newshixuns extends Component {
let fileLists = info.fileList; let fileLists = info.fileList;
this.setState({ this.setState({
// fileList:appendFileSizeToUploadFileAll(fileList), // fileList:appendFileSizeToUploadFileAll(fileList),
fileList:fileLists, fileList: fileLists,
deleteisnot:false}); deleteisnot: false
});
// } // }
} }
}
} }
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
if(!file.percent || file.percent == 100){ if(!file.percent || file.percent == 100){

Loading…
Cancel
Save