附件删除问题

dev_hss
caicai8 6 years ago
parent e307ee9927
commit c88aafa0c5

@ -84,9 +84,11 @@ class GraduationTasksappraiseMainEditor extends Component{
componentDidMount(){ componentDidMount(){
} }
handleUploadChange = (info) => { handleUploadChange = (info) => {
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
let fileList = info.fileList; let fileList = info.fileList;
this.setState({ fileList }); this.setState({ fileList });
} }
}
onAttachmentRemove = (file, stateName) => { onAttachmentRemove = (file, stateName) => {
if(!file.percent || file.percent == 100){ if(!file.percent || file.percent == 100){
this.props.confirm({ this.props.confirm({

@ -103,7 +103,7 @@ class GraduationTasksedit extends Component{
} }
// 附件相关 START // 附件相关 START
handleChange = (info) => { handleChange = (info) => {
if(info.file.status == "done" || info.file.status == "uploading"){ 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 ){

@ -159,9 +159,11 @@ class GraduateTopicPostWorksNew 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;
this.setState({ fileList }); this.setState({ fileList });
} }
}
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
if(!file.percent || file.percent == 100){ if(!file.percent || file.percent == 100){
confirm({ confirm({

@ -1373,6 +1373,7 @@ export default class TPMsettings extends Component {
} }
handleChange = (info) => { handleChange = (info) => {
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
console.log("handleChange1"); console.log("handleChange1");
let {fileList}=this.state; let {fileList}=this.state;
if(fileList.length===0){ if(fileList.length===0){
@ -1380,7 +1381,7 @@ export default class TPMsettings extends Component {
this.setState({ fileList:fileLists, this.setState({ fileList:fileLists,
deleteisnot:false}); deleteisnot:false});
} }
}
} }
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {

@ -760,6 +760,7 @@ class Newshixuns extends Component {
// 附件相关 START // 附件相关 START
handleChange = (info) => { handleChange = (info) => {
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
let {fileList}=this.state; let {fileList}=this.state;
console.log("handleChange1"); console.log("handleChange1");
if(fileList.length===0){ if(fileList.length===0){
@ -769,6 +770,7 @@ class Newshixuns extends Component {
fileList:fileLists, fileList:fileLists,
deleteisnot:false}); deleteisnot:false});
} }
}
} }
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {

Loading…
Cancel
Save