|
|
|
@ -17,16 +17,21 @@ import "../../css/Courses.css"
|
|
|
|
|
import Trialapplication from '../../../login/Trialapplication'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//毕设任务列表任务列表
|
|
|
|
|
//毕设描述
|
|
|
|
|
const GraduationTasksquestions= Loadable({
|
|
|
|
|
loader: () => import('./GraduationTaskssettingquestions'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
})
|
|
|
|
|
//毕设任务列表设置
|
|
|
|
|
//毕设任务设置
|
|
|
|
|
const GraduationTaskssetting=Loadable({
|
|
|
|
|
loader: () => import('./GraduationTaskssetting'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
})
|
|
|
|
|
//毕设任务列表
|
|
|
|
|
const GraduationTaskslist=Loadable({
|
|
|
|
|
loader: () => import('./GraduationTaskssettinglist'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
class GraduationTaskDetail extends Component{
|
|
|
|
|
constructor(props){
|
|
|
|
@ -44,18 +49,36 @@ class GraduationTaskDetail extends Component{
|
|
|
|
|
Cancel:undefined,
|
|
|
|
|
Saves:undefined,
|
|
|
|
|
Topvalright:undefined,
|
|
|
|
|
Botvalleft:undefined
|
|
|
|
|
Botvalleft:undefined,
|
|
|
|
|
course_groupslist:undefined,
|
|
|
|
|
course_groups:undefined,
|
|
|
|
|
questionslist:undefined
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
componentDidMount =()=>{
|
|
|
|
|
componentDidMount(){
|
|
|
|
|
this.getdatas()
|
|
|
|
|
}
|
|
|
|
|
getdatas=()=>{
|
|
|
|
|
const task_Id = this.props.match.params.task_Id;
|
|
|
|
|
let url="/graduation_tasks/"+task_Id+".json";
|
|
|
|
|
|
|
|
|
|
axios.get(url).then((result)=>{
|
|
|
|
|
if(result.status===200){
|
|
|
|
|
this.setState({
|
|
|
|
|
questionslist:result.data
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
console.log(error)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//返回
|
|
|
|
|
goback=()=>{
|
|
|
|
|
// let courseId=this.props.match.params.coursesId;
|
|
|
|
|
// let category_id=this.props.match.params.category_id;
|
|
|
|
|
// window.location.href="/courses/1309/graduation_tasks/"+category_id;
|
|
|
|
|
// window.location.href="/courses/"+courseId+"/graduation_tasks/"+category_id;
|
|
|
|
|
// let courseId = this.props.match.params.coursesId;
|
|
|
|
|
// if(courseId===undefined){
|
|
|
|
|
// this.props.history.push("/courses");
|
|
|
|
@ -87,6 +110,36 @@ class GraduationTaskDetail extends Component{
|
|
|
|
|
Saves:this.homepublish,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 确定立即发布
|
|
|
|
|
homepublish=(ids,endtime)=>{
|
|
|
|
|
this.cancelmodel();
|
|
|
|
|
let task_Id=this.props.match.params.task_Id;
|
|
|
|
|
const cid = this.props.match.params.coursesId;
|
|
|
|
|
// let url = `/courses/${cid}/graduation_tasks/publish_task.json`;
|
|
|
|
|
|
|
|
|
|
let url="/courses/"+cid+"/graduation_tasks/publish_task.json"
|
|
|
|
|
axios.post(url,{
|
|
|
|
|
task_ids:[task_Id],
|
|
|
|
|
group_ids: this.state.course_groupslist,
|
|
|
|
|
end_time:endtime,
|
|
|
|
|
}).then((response)=>{
|
|
|
|
|
if (response.data.status == 0) {
|
|
|
|
|
this.getdatas()
|
|
|
|
|
this.props.showNotification(response.data.message);
|
|
|
|
|
this.searchValue();
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
// Modalstopval:response.data.message,
|
|
|
|
|
// ModalSave:this.cancelmodel,
|
|
|
|
|
// Loadtype:true,
|
|
|
|
|
course_groupslist:[],
|
|
|
|
|
checkAllValue:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 立即截止
|
|
|
|
|
end=()=>{
|
|
|
|
|
// this.homeworkstart()
|
|
|
|
@ -117,10 +170,24 @@ class GraduationTaskDetail extends Component{
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getcourse_groupslist=(id)=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
course_groupslist:id
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render(){
|
|
|
|
|
|
|
|
|
|
let courseId=this.props.match.params.coursesId;
|
|
|
|
|
let category_id=this.props.match.params.category_id;
|
|
|
|
|
let task_Id=this.props.match.params.task_Id;
|
|
|
|
|
let { tab } = this.props;
|
|
|
|
|
let { questionslist } = this.state
|
|
|
|
|
return(
|
|
|
|
|
<div className="newMain clearfix">
|
|
|
|
|
{
|
|
|
|
|
questionslist &&
|
|
|
|
|
<div className={"educontent mb20"}>
|
|
|
|
|
<HomeworkModal
|
|
|
|
|
starttimes={this.state.starttimes}
|
|
|
|
@ -143,28 +210,28 @@ class GraduationTaskDetail extends Component{
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<p className="clearfix mt10">
|
|
|
|
|
<a onClick={this.goback} className="color-grey-9 fl">计算机基础····</a>
|
|
|
|
|
<a onClick={this.goback} className="color-grey-9 fl">{questionslist.course_name}</a>
|
|
|
|
|
<span className="color-grey-9 fl ml3 mr3">></span>
|
|
|
|
|
<Link to={`/courses/1309/graduation_tasks/14655`} className="color-grey-9 fl">毕设任务</Link>
|
|
|
|
|
<Link to={`/courses/${courseId}/graduation_tasks/${category_id}`} className="color-grey-9 fl">{questionslist.graduation_name}</Link>
|
|
|
|
|
<span className="color-grey-9 fl ml3 mr3">></span>
|
|
|
|
|
<span className="color-grey-6">任务详情</span>
|
|
|
|
|
</p>
|
|
|
|
|
<div className="clearfix mt20 mb20 lineh-25 linbox">
|
|
|
|
|
<p className=" fl color-black summaryname">
|
|
|
|
|
<Link to={`/courses/1309/graduation_tasks/14655`} className="color-grey-3">测试第一次设置发布时间时截止时间会联动,其它情况不联动</Link>
|
|
|
|
|
<Link to={`/courses/${courseId}/graduation_tasks/${category_id}`} className="color-grey-3">{questionslist.task_name}</Link>
|
|
|
|
|
</p>
|
|
|
|
|
<CoursesListType
|
|
|
|
|
typelist={['补交中']}
|
|
|
|
|
typelist={questionslist.task_status}
|
|
|
|
|
/>
|
|
|
|
|
<a className="color-grey-3 fr font-16 ml30 mr20" onClick={this.goback}>返回</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="stud-class-set bor-bottom-greyE">
|
|
|
|
|
<div className="mt10 clearfix edu-back-white poll_list pl20">
|
|
|
|
|
|
|
|
|
|
<Link to={"/courses/1309/graduation_tasks/16455/67/list"}>任务列表</Link>
|
|
|
|
|
<Link className="active" to={"/courses/1309/graduation_tasks/16455/67/questions"}>毕设描述</Link>
|
|
|
|
|
<Link style={{paddingLeft:'38px'}}
|
|
|
|
|
to={"/courses/1309/graduation_tasks/16455/67/setting?tab=3"}>设置</Link>
|
|
|
|
|
<Link className={tab && tab == "list" ? "active" : ""} to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>任务列表</Link>
|
|
|
|
|
<Link className={tab && tab == "questions" ? "active" : ""} to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>毕设描述</Link>
|
|
|
|
|
<Link className={tab && tab == "setting" ? "active" : ""} style={{paddingLeft:'38px'}}
|
|
|
|
|
to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting?tab=3"}>设置</Link>
|
|
|
|
|
|
|
|
|
|
{/*<a className={"fr color-blue font-16"}>导出成绩</a>*/}
|
|
|
|
|
{/*{this.props.isAdmin()?<a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xls"} className={"fr color-blue font-16"}>导出成绩</a>:""}*/}
|
|
|
|
@ -200,35 +267,41 @@ class GraduationTaskDetail extends Component{
|
|
|
|
|
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}>
|
|
|
|
|
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
|
|
|
|
|
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
|
|
|
|
|
<li><a onClick={()=>this.confirmysl("/graduation_tasks/67/tasks_list.xlsx")} className="color-dark">导出成绩</a></li>
|
|
|
|
|
<li><a onClick={()=>this.confirmysl("/graduation_tasks/67/tasks_list.zip")} className="color-dark">导出作品附件</a></li>
|
|
|
|
|
<li><a onClick={()=>this.confirmysl("/graduation_tasks/"+task_Id+"/tasks_list.xlsx")} className="color-dark">导出成绩</a></li>
|
|
|
|
|
<li><a onClick={()=>this.confirmysl("/graduation_tasks/"+task_Id+"/tasks_list.zip")} className="color-dark">导出作品附件</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>:""}
|
|
|
|
|
|
|
|
|
|
{/*<a className={"fr color-blue font-16"}>项目在线质量检测</a>*/}
|
|
|
|
|
{/* {this.props.isAdmin()?questionslist.status===1? <a className={"fr color-blue font-16 mr20"} onClick={() => { this.end()} }>立即截止</a>:"":""}
|
|
|
|
|
{this.props.isAdmin()?questionslist.status===0? <a className={"fr color-blue font-16 mr20"} onClick={() => { this.publish()} }>立即发布</a>:"":""} */}
|
|
|
|
|
<a className={"fr color-blue font-16 mr20"} onClick={() => { this.end()} }>立即截止</a>
|
|
|
|
|
<a className={"fr color-blue font-16 mr20"} onClick={() => { this.publish()} }>立即发布</a>
|
|
|
|
|
{this.props.isAdmin()?<a className={"fr color-blue font-16"} href={"/courses/1309/graduation_tasks/67/edit"}>编辑任务</a>:""}
|
|
|
|
|
{ this.props.isAdmin() ? questionslist.status===1 ? <a className={"fr color-blue font-16 mr20"} onClick={() => { this.end()} }>立即截止</a> : "" : "" }
|
|
|
|
|
{ this.props.isAdmin() ? questionslist.status===0 ? <a className={"fr color-blue font-16 mr20"} onClick={() => { this.publish()} }>立即发布</a> : "" : "" }
|
|
|
|
|
|
|
|
|
|
{ this.props.isAdmin() ? <a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+task_Id+"/edit"}>编辑任务</a> : "" }
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<Switch {...this.props}>
|
|
|
|
|
|
|
|
|
|
<Route path="/courses/:coursesId/graduation_tasks/:category_id/:task_Id/setting"
|
|
|
|
|
<Route exact path="/courses/:coursesId/graduation_tasks/:category_id/:task_Id/list"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<GraduationTaskssetting {...this.props} {...props} {...this.state} />)
|
|
|
|
|
(props) => (<GraduationTaskslist {...this.props} {...props} {...this.state} tab={`list`}/>)
|
|
|
|
|
}
|
|
|
|
|
></Route>
|
|
|
|
|
|
|
|
|
|
<Route exact path="/courses/:coursesId/graduation_tasks/:category_id/:task_Id/setting"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<GraduationTaskssetting {...this.props} {...props} {...this.state} tab={`setting`}/>)
|
|
|
|
|
}
|
|
|
|
|
></Route>
|
|
|
|
|
|
|
|
|
|
<Route path="/courses/:coursesId/graduation_tasks/:category_id/:task_Id/questions"
|
|
|
|
|
<Route exact path="/courses/:coursesId/graduation_tasks/:category_id/:task_Id/questions"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<GraduationTasksquestions {...this.props} {...props} {...this.state} />)
|
|
|
|
|
(props) => (<GraduationTasksquestions {...this.props} {...props} {...this.state} tab={`setting`}/>)
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
</Switch>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|