删除调整

dev_hss
杨树明 5 years ago
parent f26aa7b19b
commit a449496d59

@ -159,7 +159,8 @@ class GraduationTasksSubmitedit extends Component{
onAttachmentRemove = (file) => {
if(!file.percent || file.percent == 100){
let {attachments,fileList}=this.state;
const url = `/attachments/${file}.json`
let id=file.response ==undefined ? file.id : file.response.id;
const url = `/attachments/${id}.json`
axios.delete(url, {
})
.then((response) => {

@ -168,9 +168,10 @@ class GraduationTasksSubmitnew extends Component{
}
deleteAttachment = (file) => {
const url = `/attachments/${file}.json`
axios.delete(url, {
})
if(!file.percent || file.percent == 100){
let id = file.response == undefined ? file.id : file.response.id;
const url = `/attachments/${id}.json`
axios.delete(url, {})
.then((response) => {
if (response.data) {
// const { status } = response.data;
@ -199,6 +200,7 @@ class GraduationTasksSubmitnew extends Component{
console.log(error);
});
}
}
inputSearchValue=(e)=>{

Loading…
Cancel
Save