调整参数

dev_aliyun_beta
杨树明 6 years ago
parent 0b43367fa9
commit 672fcd61de

@ -186,6 +186,7 @@ class BoardsNew extends Component{
}); });
} }
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
if(file.response!=undefined){
confirm({ confirm({
// title: '确定要删除这个附件吗?', // title: '确定要删除这个附件吗?',
title: '是否确认删除?', title: '是否确认删除?',
@ -204,6 +205,8 @@ class BoardsNew extends Component{
return false; return false;
} }
}
deleteAttachment = (file) => { deleteAttachment = (file) => {
// 初次上传不能直接取uid // 初次上传不能直接取uid
const url = `/attachments/${file.response ? file.response.id : file.uid}.json` const url = `/attachments/${file.response ? file.response.id : file.uid}.json`

@ -88,6 +88,7 @@ class GraduationTasksappraiseMainEditor extends Component{
this.setState({ fileList }); this.setState({ fileList });
} }
onAttachmentRemove = (file, stateName) => { onAttachmentRemove = (file, stateName) => {
if(file.response!=undefined){
this.props.confirm({ this.props.confirm({
content: '确定要删除这个附件吗?', content: '确定要删除这个附件吗?',
okText: '确定', okText: '确定',
@ -104,6 +105,8 @@ class GraduationTasksappraiseMainEditor extends Component{
return false; return false;
} }
}
deleteAttachment = (file, stateName) => { deleteAttachment = (file, stateName) => {
// 初次上传不能直接取uid // 初次上传不能直接取uid
const url = `/attachments/${file.response ? file.response.id : file.uid}.json` const url = `/attachments/${file.response ? file.response.id : file.uid}.json`

@ -148,6 +148,7 @@ class GraduationTasksedit extends Component{
} }
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
if(file.response!=undefined){
// debugger // debugger
this.cancelAttachment(); this.cancelAttachment();
const url = `/attachments/${file.response ? file.response.id : file.uid}.json` const url = `/attachments/${file.response ? file.response.id : file.uid}.json`
@ -183,6 +184,8 @@ class GraduationTasksedit extends Component{
}); });
} }
}
Commoninterface=(fileList)=>{ Commoninterface=(fileList)=>{
let listid=[] let listid=[]
let graduation_id=this.state.data.graduation_id; let graduation_id=this.state.data.graduation_id;

@ -215,6 +215,8 @@ class GraduateTopicNew extends Component{
this.setState({ fileList }); this.setState({ fileList });
} }
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
if(file.response!=undefined){
confirm({ confirm({
title: '确定要删除这个附件吗?', title: '确定要删除这个附件吗?',
okText: '确定', okText: '确定',
@ -229,6 +231,8 @@ class GraduateTopicNew extends Component{
}); });
return false; return false;
} }
}
deleteAttachment = (file) => { deleteAttachment = (file) => {
console.log(file); console.log(file);
let id=file.response ==undefined ? file.id : file.response.id let id=file.response ==undefined ? file.id : file.response.id

@ -163,6 +163,7 @@ class GraduateTopicPostWorksNew extends Component{
this.setState({ fileList }); this.setState({ fileList });
} }
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
if(file.response!=undefined){
confirm({ confirm({
title: '确定要删除这个附件吗?', title: '确定要删除这个附件吗?',
okText: '确定', okText: '确定',
@ -179,6 +180,9 @@ class GraduateTopicPostWorksNew extends Component{
return false; return false;
} }
}
deleteAttachment = (file) => { deleteAttachment = (file) => {
const url = `/attachments/${file.id}.json` const url = `/attachments/${file.id}.json`
axios.delete(url, { axios.delete(url, {

@ -561,6 +561,7 @@ class MemoNew extends Component {
} }
} }
onAttachmentRemove = (file) => { onAttachmentRemove = (file) => {
if(file.response!=undefined){
this.props.confirm({ this.props.confirm({
// title: '确定要删除这个附件吗?', // title: '确定要删除这个附件吗?',
content: '是否确认删除?', content: '是否确认删除?',
@ -577,6 +578,8 @@ class MemoNew extends Component {
}); });
return false; return false;
} }
}
deleteAttachment = (file) => { deleteAttachment = (file) => {
// 初次上传不能直接取uid // 初次上传不能直接取uid
const url = `/attachments/${file.response ? file.response.id : file.uid}.json` const url = `/attachments/${file.response ? file.response.id : file.uid}.json`

@ -47,6 +47,7 @@ class CaseNew extends Component{
// 上传附件-删除确认框 // 上传附件-删除确认框
onAttachmentRemove = (file, stateName) => { onAttachmentRemove = (file, stateName) => {
if(file.response!=undefined){
this.props.confirm({ this.props.confirm({
content: '是否确认删除?', content: '是否确认删除?',
onOk: () => { onOk: () => {
@ -59,6 +60,8 @@ class CaseNew extends Component{
return false; return false;
} }
}
// 上传附件-确认删除 // 上传附件-确认删除
deleteAttachment = (file, stateName) => { deleteAttachment = (file, stateName) => {
// 初次上传不能直接取uid // 初次上传不能直接取uid

Loading…
Cancel
Save