调整上传处理

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

@ -34,12 +34,15 @@ class AccessoryModal2 extends Component{
}
// 附件相关 START
handleChange = (info) => {
let fileList = info.fileList;
console.log(fileList)
// for(var list of fileList ){
// console.log(fileList)
// }
this.setState({ fileList });
if(info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed'){
let fileList = info.fileList;
console.log(fileList)
// for(var list of fileList ){
// console.log(fileList)
// }
this.setState({ fileList });
}
}
onAttachmentRemove = (file) => {

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

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

@ -759,19 +759,21 @@ class Newshixuns extends Component {
// 附件相关 START
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') {
console.log("handleChange1");
// if(fileList.length===0){
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
console.log("handleChange1");
// if(fileList.length===0){
let fileLists = info.fileList;
this.setState({
// fileList:appendFileSizeToUploadFileAll(fileList),
fileList:fileLists,
deleteisnot:false});
// }
}
fileList: fileLists,
deleteisnot: false
});
// }
}
}
}
onAttachmentRemove = (file) => {
if(!file.percent || file.percent == 100){

Loading…
Cancel
Save