|
|
|
@ -0,0 +1,237 @@
|
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
|
|
|
|
|
|
import {Link} from 'react-router-dom';
|
|
|
|
|
import {Tooltip,Menu} from 'antd';
|
|
|
|
|
import Loadable from 'react-loadable';
|
|
|
|
|
import Loading from '../../../../Loading';
|
|
|
|
|
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
import HomeworkModal from "../../coursesPublic/HomeworkModal";
|
|
|
|
|
|
|
|
|
|
import CoursesListType from '../../coursesPublic/CoursesListType';
|
|
|
|
|
import moment from 'moment';
|
|
|
|
|
import "../../css/members.css"
|
|
|
|
|
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,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
class GraduationTaskDetail extends Component{
|
|
|
|
|
constructor(props){
|
|
|
|
|
super(props);
|
|
|
|
|
this.state={
|
|
|
|
|
modalname:undefined,
|
|
|
|
|
visible:false,
|
|
|
|
|
Topval:undefined,
|
|
|
|
|
starttime:undefined,
|
|
|
|
|
starttimes:undefined,
|
|
|
|
|
typs:undefined,
|
|
|
|
|
endtime:undefined,
|
|
|
|
|
Cancelname:undefined,
|
|
|
|
|
Savesname:undefined,
|
|
|
|
|
Cancel:undefined,
|
|
|
|
|
Saves:undefined,
|
|
|
|
|
Topvalright:undefined,
|
|
|
|
|
Botvalleft:undefined
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
componentDidMount =()=>{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//返回
|
|
|
|
|
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;
|
|
|
|
|
// let courseId = this.props.match.params.coursesId;
|
|
|
|
|
// if(courseId===undefined){
|
|
|
|
|
// this.props.history.push("/courses");
|
|
|
|
|
// }else{
|
|
|
|
|
// this.props.history.push(this.props.current_user.first_category_url);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// this.props.history.goBack()
|
|
|
|
|
this.props.history.replace(`/courses/${this.state.questionslist.course_id}/graduation_tasks/${this.state.questionslist.graduation_id}`);
|
|
|
|
|
}
|
|
|
|
|
//立即发布
|
|
|
|
|
publish=()=>{
|
|
|
|
|
let starttime= this.props.getNowFormatDates(1,1);
|
|
|
|
|
let endtime=this.props.getNowFormatDates(2,1);
|
|
|
|
|
// this.homeworkstart()
|
|
|
|
|
this.setState({
|
|
|
|
|
modalname:"立即发布",
|
|
|
|
|
visible:true,
|
|
|
|
|
Topval:"学生将立即收到毕设任务",
|
|
|
|
|
// Botvalleft:"点击修改",
|
|
|
|
|
// Botval:`本操作只对"未发布"的分班有效`,
|
|
|
|
|
starttime:moment(moment(new Date())).format("YYYY-MM-DD HH:mm") ,
|
|
|
|
|
starttimes:this.props.getNowFormatDates(1),
|
|
|
|
|
typs:"start",
|
|
|
|
|
endtime:endtime,
|
|
|
|
|
Cancelname:"暂不发布",
|
|
|
|
|
Savesname:"立即发布",
|
|
|
|
|
Cancel:this.cancelmodel,
|
|
|
|
|
Saves:this.homepublish,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 立即截止
|
|
|
|
|
end=()=>{
|
|
|
|
|
// this.homeworkstart()
|
|
|
|
|
this.setState({
|
|
|
|
|
modalname:"立即截止",
|
|
|
|
|
visible:true,
|
|
|
|
|
Topval:"学生将不能再提交作品",
|
|
|
|
|
// Botvalleft:"暂不截止",
|
|
|
|
|
// Botval:`本操作只对"提交中"的分班有效`,
|
|
|
|
|
Cancelname:"暂不截止",
|
|
|
|
|
Savesname:"立即截止",
|
|
|
|
|
Cancel:this.cancelmodel,
|
|
|
|
|
Saves:this.coursetaskend,
|
|
|
|
|
typs:"end",
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 取消
|
|
|
|
|
cancelmodel=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
Modalstype:false,
|
|
|
|
|
Loadtype:false,
|
|
|
|
|
visible:false,
|
|
|
|
|
Modulationtype:false,
|
|
|
|
|
Allocationtype:false,
|
|
|
|
|
Modalstopval:"",
|
|
|
|
|
ModalCancel:"",
|
|
|
|
|
ModalSave:"",
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render(){
|
|
|
|
|
return(
|
|
|
|
|
<div className="newMain clearfix">
|
|
|
|
|
<div className={"educontent mb20"}>
|
|
|
|
|
<HomeworkModal
|
|
|
|
|
starttimes={this.state.starttimes}
|
|
|
|
|
typs={this.state.typs}
|
|
|
|
|
modalname={this.state.modalname}
|
|
|
|
|
visible={this.state.visible}
|
|
|
|
|
Topval={this.state.Topval}
|
|
|
|
|
Topvalright={this.state.Topvalright}
|
|
|
|
|
Botvalleft={this.state.Botvalleft}
|
|
|
|
|
Botval={this.state.Botval}
|
|
|
|
|
starttime={this.state.starttime}
|
|
|
|
|
endtime={this.state.endtime}
|
|
|
|
|
Cancelname={this.state.Cancelname}
|
|
|
|
|
Savesname={this.state.Savesname}
|
|
|
|
|
Cancel={this.state.Cancel}
|
|
|
|
|
Saves={this.state.Saves}
|
|
|
|
|
course_groups={this.state.course_groups}
|
|
|
|
|
modaltype={this.state.modaltype}
|
|
|
|
|
getcourse_groupslist={(id) => this.getcourse_groupslist(id)}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<p className="clearfix mt10">
|
|
|
|
|
<a onClick={this.goback} className="color-grey-9 fl">计算机基础····</a>
|
|
|
|
|
<span className="color-grey-9 fl ml3 mr3">></span>
|
|
|
|
|
<Link to={`/courses/1309/graduation_tasks/14655`} className="color-grey-9 fl">毕设任务</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>
|
|
|
|
|
</p>
|
|
|
|
|
<CoursesListType
|
|
|
|
|
typelist={['补交中']}
|
|
|
|
|
/>
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
{/*<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>:""}*/}
|
|
|
|
|
{/*{this.props.isAdmin()?<a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} className={"fr color-blue font-16"}>导出作品附件</a>:""}*/}
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
{ `
|
|
|
|
|
.drop_down_menu{
|
|
|
|
|
height: 118px;
|
|
|
|
|
left:0px;
|
|
|
|
|
width: 121px;
|
|
|
|
|
}
|
|
|
|
|
.drop_down_menu li {
|
|
|
|
|
overflow: visible;
|
|
|
|
|
width: 121px;
|
|
|
|
|
}
|
|
|
|
|
.drop_down_menu li a{
|
|
|
|
|
padding: 0px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
.mt19{
|
|
|
|
|
margin-top:19px;
|
|
|
|
|
}
|
|
|
|
|
.drop_down_menu, .drop_down_normal{
|
|
|
|
|
padding-top: 10px;
|
|
|
|
|
padding-bottom: 8px;
|
|
|
|
|
}
|
|
|
|
|
.drop_down_menu li .color-dark{
|
|
|
|
|
color: #666 !important;
|
|
|
|
|
}
|
|
|
|
|
`}
|
|
|
|
|
</style>
|
|
|
|
|
{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>
|
|
|
|
|
</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>:""}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<Switch {...this.props}>
|
|
|
|
|
|
|
|
|
|
<Route path="/courses/:coursesId/graduation_tasks/:category_id/:task_Id/setting"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<GraduationTaskssetting {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}
|
|
|
|
|
></Route>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Route path="/courses/:coursesId/graduation_tasks/:category_id/:task_Id/questions"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<GraduationTasksquestions {...this.props} {...props} {...this.state} />)
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
</Switch>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// CNotificationHOC() ( SnackbarHOC() ( TPMIndexHOC))
|
|
|
|
|
export default (GraduationTaskDetail) ;
|