|
|
|
@ -168,9 +168,9 @@ class GraduationTasksSubmitedit extends Component{
|
|
|
|
|
if (response.data.status === 0) {
|
|
|
|
|
console.log('--- success')
|
|
|
|
|
let newattachments=attachments;
|
|
|
|
|
if(file.uid===undefined){
|
|
|
|
|
if(id===undefined){
|
|
|
|
|
for(var i=0; i<newattachments.length; i++){
|
|
|
|
|
if(newattachments[i].id===file.id){
|
|
|
|
|
if(newattachments[i].id===id){
|
|
|
|
|
newattachments.splice(i, 1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -186,7 +186,7 @@ class GraduationTasksSubmitedit extends Component{
|
|
|
|
|
|
|
|
|
|
this.cancelAttachment();
|
|
|
|
|
this.setState((state) => {
|
|
|
|
|
const index = state.fileList.indexOf(file);
|
|
|
|
|
const index = state.fileList.indexOf(id);
|
|
|
|
|
const newFileList = state.fileList.slice();
|
|
|
|
|
newFileList.splice(index, 1);
|
|
|
|
|
return {
|
|
|
|
|