|
|
@ -16,7 +16,8 @@ class AccessoryModal extends Component{
|
|
|
|
ModalCancel:"",
|
|
|
|
ModalCancel:"",
|
|
|
|
ModalSave:"",
|
|
|
|
ModalSave:"",
|
|
|
|
loadtype:false,
|
|
|
|
loadtype:false,
|
|
|
|
updatas:false
|
|
|
|
updatas:false,
|
|
|
|
|
|
|
|
shixunsreplace:false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -103,7 +104,8 @@ class AccessoryModal extends Component{
|
|
|
|
Modalstype:false,
|
|
|
|
Modalstype:false,
|
|
|
|
Modalstopval:"",
|
|
|
|
Modalstopval:"",
|
|
|
|
ModalSave:this.ModalCancelModalCancel,
|
|
|
|
ModalSave:this.ModalCancelModalCancel,
|
|
|
|
loadtype:false
|
|
|
|
loadtype:false,
|
|
|
|
|
|
|
|
shixunsreplace:false,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.props.Cancel()
|
|
|
|
this.props.Cancel()
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -115,11 +117,11 @@ class AccessoryModal extends Component{
|
|
|
|
for(var list of fileList){
|
|
|
|
for(var list of fileList){
|
|
|
|
newfileList.push(list.response.id)
|
|
|
|
newfileList.push(list.response.id)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
debugger
|
|
|
|
|
|
|
|
if (newfileList.length == 0) {
|
|
|
|
if (newfileList.length == 0) {
|
|
|
|
// this.props.showNotification('请先上传附件')
|
|
|
|
// this.props.showNotification('请先上传附件')
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
updatas:true
|
|
|
|
shixunsreplace:true,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -130,7 +132,7 @@ debugger
|
|
|
|
attachment_ids:newfileList
|
|
|
|
attachment_ids:newfileList
|
|
|
|
}).then((result)=>{
|
|
|
|
}).then((result)=>{
|
|
|
|
console.log(result)
|
|
|
|
console.log(result)
|
|
|
|
if(result.data.status===0){
|
|
|
|
if(result !== undefined){
|
|
|
|
this.props.setupdate()
|
|
|
|
this.props.setupdate()
|
|
|
|
this.props.showNotification('提交成功')
|
|
|
|
this.props.showNotification('提交成功')
|
|
|
|
// this.setState({
|
|
|
|
// this.setState({
|
|
|
@ -139,7 +141,6 @@ debugger
|
|
|
|
// ModalSave:this.ModalCancelModalCancel,
|
|
|
|
// ModalSave:this.ModalCancelModalCancel,
|
|
|
|
// loadtype:true
|
|
|
|
// loadtype:true
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
|
|
this.ModalCancelModalCancel()
|
|
|
|
this.ModalCancelModalCancel()
|
|
|
|
if(this.props.seeworks!=undefined){
|
|
|
|
if(this.props.seeworks!=undefined){
|
|
|
|
this.props.history.push(this.props.seeworks);
|
|
|
|
this.props.history.push(this.props.seeworks);
|
|
|
@ -155,6 +156,46 @@ debugger
|
|
|
|
description:e.target.value
|
|
|
|
description:e.target.value
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//确认
|
|
|
|
|
|
|
|
hidestartshixunsreplace=()=>{
|
|
|
|
|
|
|
|
let id=this.props.categoryid;
|
|
|
|
|
|
|
|
let {fileList,description} =this.state;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let newfileList=[];
|
|
|
|
|
|
|
|
for(var list of fileList){
|
|
|
|
|
|
|
|
newfileList.push(list.response.id)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let url= this.props.reviseAttachmentUrl || "/graduation_works/"+id+"/revise_attachment.json"
|
|
|
|
|
|
|
|
axios.post(url,{
|
|
|
|
|
|
|
|
description:description,
|
|
|
|
|
|
|
|
attachment_ids:newfileList
|
|
|
|
|
|
|
|
}).then((result)=>{
|
|
|
|
|
|
|
|
console.log(result)
|
|
|
|
|
|
|
|
if(result.data.status===0){
|
|
|
|
|
|
|
|
this.props.setupdate()
|
|
|
|
|
|
|
|
this.props.showNotification('提交成功')
|
|
|
|
|
|
|
|
// this.setState({
|
|
|
|
|
|
|
|
// Modalstype:true,
|
|
|
|
|
|
|
|
// Modalstopval:result.data.message,
|
|
|
|
|
|
|
|
// ModalSave:this.ModalCancelModalCancel,
|
|
|
|
|
|
|
|
// loadtype:true
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.ModalCancelModalCancel()
|
|
|
|
|
|
|
|
if(this.props.seeworks!=undefined){
|
|
|
|
|
|
|
|
this.props.history.push(this.props.seeworks);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//取消
|
|
|
|
|
|
|
|
hidestartshixunsreplacetwo=()=>{
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
shixunsreplace:false,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
render(){
|
|
|
|
render(){
|
|
|
|
let {settextarea,fileList,
|
|
|
|
let {settextarea,fileList,
|
|
|
@ -163,6 +204,7 @@ debugger
|
|
|
|
ModalCancel,
|
|
|
|
ModalCancel,
|
|
|
|
ModalSave,
|
|
|
|
ModalSave,
|
|
|
|
loadtype,
|
|
|
|
loadtype,
|
|
|
|
|
|
|
|
shixunsreplace,
|
|
|
|
}=this.state;
|
|
|
|
}=this.state;
|
|
|
|
let {course_groups}=this.props;
|
|
|
|
let {course_groups}=this.props;
|
|
|
|
const uploadProps = {
|
|
|
|
const uploadProps = {
|
|
|
@ -186,6 +228,25 @@ debugger
|
|
|
|
|
|
|
|
|
|
|
|
return(
|
|
|
|
return(
|
|
|
|
<React.Fragment>
|
|
|
|
<React.Fragment>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Modal
|
|
|
|
|
|
|
|
keyboard={false}
|
|
|
|
|
|
|
|
title="提示"
|
|
|
|
|
|
|
|
visible={shixunsreplace}
|
|
|
|
|
|
|
|
closable={false}
|
|
|
|
|
|
|
|
footer={null}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<div className="task-popup-content">
|
|
|
|
|
|
|
|
<p className="task-popup-text-center font-16 ">还未上传附件</p>
|
|
|
|
|
|
|
|
<p className="task-popup-text-center font-16 pb20">是否确认提交作品?</p>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className="task-popup-submit clearfix">
|
|
|
|
|
|
|
|
<a className="task-btn task-btn-orange fr "
|
|
|
|
|
|
|
|
onClick={() => this.hidestartshixunsreplace()}>确认</a>
|
|
|
|
|
|
|
|
<a className="task-btn fr mr50"
|
|
|
|
|
|
|
|
onClick={() => this.hidestartshixunsreplacetwo()}>取消</a>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</Modal>
|
|
|
|
{/*提示*/}
|
|
|
|
{/*提示*/}
|
|
|
|
<Modals
|
|
|
|
<Modals
|
|
|
|
modalsType={Modalstype}
|
|
|
|
modalsType={Modalstype}
|
|
|
|