|
|
|
@ -168,8 +168,29 @@ class GraduationTaskDetail extends Component{
|
|
|
|
|
typs:"end",
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
coursetaskend=()=>{
|
|
|
|
|
const coursesId = this.props.match.params.coursesId;
|
|
|
|
|
const task_Id = this.props.match.params.task_Id;
|
|
|
|
|
|
|
|
|
|
let url = `/courses/${coursesId}/graduation_tasks/end_task.json`;
|
|
|
|
|
axios.post(url,{
|
|
|
|
|
task_ids:[task_Id],
|
|
|
|
|
group_ids: this.state.course_groupslist,
|
|
|
|
|
}).then((response)=>{
|
|
|
|
|
if (response.data.status == 0) {
|
|
|
|
|
this.props.showNotification(response.data.message);
|
|
|
|
|
this.cancelmodel();
|
|
|
|
|
this.getdatas();
|
|
|
|
|
this.child && this.child.reInit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 取消
|
|
|
|
|
cancelmodel=()=>{
|
|
|
|
|
debugger
|
|
|
|
|
this.setState({
|
|
|
|
|
Modalstype:false,
|
|
|
|
|
Loadtype:false,
|
|
|
|
@ -399,14 +420,14 @@ class GraduationTaskDetail extends Component{
|
|
|
|
|
{questionslist.work_status===undefined||questionslist.work_status===null||questionslist.work_status.length===0?"":questionslist.work_status.map((item,key)=>{
|
|
|
|
|
return(
|
|
|
|
|
<span key={key} className="fr mt20">
|
|
|
|
|
{item==="提交作品"?<a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/works/new"}>提交作品</a>:""}
|
|
|
|
|
{item==="补交作品"?<a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/works/new"}>补交作品</a>:""}
|
|
|
|
|
{item==="修改作品"?<a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+task_Id+"/works"+"/"+ questionslist.work_id + "/edit"}>修改作品</a>:""}
|
|
|
|
|
{item==="查看作品"?<a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+task_Id+"/works"+"/"+ questionslist.work_id + "/edit"}>查看作品</a> :""}
|
|
|
|
|
{item==="创建项目"?<a className={"fr color-blue font-16"} href={'/projects/new'} target="_blank">创建项目</a>:""}
|
|
|
|
|
{item==="关联项目"?<a className={"fr color-blue font-16"} onClick={this.AssociationItems}>关联项目</a>:""}
|
|
|
|
|
{item==="取消关联"?<a className={"fr color-blue font-16"} onClick={this.cannelAssociation}>取消关联</a>:""}
|
|
|
|
|
{item==="补交附件"?<a className={"fr color-blue font-16"} onClick={this.handaccessory}>补交附件</a>:""}
|
|
|
|
|
{item==="提交作品"?<a className={"fr color-blue font-16 ml20"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/works/new"}>提交作品</a>:""}
|
|
|
|
|
{item==="补交作品"?<a className={"fr color-blue font-16 ml20"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/works/new"}>补交作品</a>:""}
|
|
|
|
|
{item==="修改作品"?<a className={"fr color-blue font-16 ml20"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/works"+"/"+ questionslist.work_id + "/edit"}>修改作品</a>:""}
|
|
|
|
|
{item==="查看作品"?<a className={"fr color-blue font-16 ml20"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/works"+"/"+ questionslist.work_id + "/edit"}>查看作品</a> :""}
|
|
|
|
|
{item==="创建项目"?<a className={"fr color-blue font-16 ml20"} href={'/projects/new'} target="_blank">创建项目</a>:""}
|
|
|
|
|
{item==="关联项目"?<a className={"fr color-blue font-16 ml20"} onClick={this.AssociationItems}>关联项目</a>:""}
|
|
|
|
|
{item==="取消关联"?<a className={"fr color-blue font-16 ml20"} onClick={this.cannelAssociation}>取消关联</a>:""}
|
|
|
|
|
{item==="补交附件"?<a className={"fr color-blue font-16 ml20"} onClick={this.handaccessory}>补交附件</a>:""}
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
)
|
|
|
|
|