毕设任务

topic_bank
caicai8 5 years ago
parent b32f6e3db0
commit 541ec0340a

@ -578,14 +578,13 @@ class CoursesIndex extends Component{
}></Route> */}
<Route path="/courses/:coursesId/graduation_tasks/:category_id/:task_Id/list"
<Route path="/courses/:coursesId/graduation_tasks/:category_id/:task_Id"
render={
(props) => (<GraduationTaskssettinglist {...this.props} {...props} {...this.state} />)
}
></Route>
{/* 修改毕设任务 https://www.trustie.net/issues/19981 */}
<Route path="/courses/:coursesId/graduation_tasks/:category_id/edit"
render={

@ -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,11 +170,25 @@ 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">
<div className={"educontent mb20"}>
{
questionslist &&
<div className={"educontent mb20"}>
<HomeworkModal
starttimes={this.state.starttimes}
typs={this.state.typs}
@ -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">&gt;</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">&gt;</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>
)
}

@ -1064,11 +1064,11 @@ class GraduationTaskssettingapp extends Component{
<div className="newMain clearfix">
<div className={"educontent mb20"}>
<p className="clearfix mt10">
{/* <p className="clearfix mt10">
<a onClick={this.goback} className="color-grey-9 fl">{coursename}</a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<Link to={"/courses/"+courseId+"/graduation_tasks/"+settingdata.graduation_id} className="color-grey-9 fl">毕设任务</Link>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> */}
{/*{taskname===""?"":*/}
{/*<WordsBtn style="grey" className="fl">*/}
@ -1077,10 +1077,10 @@ class GraduationTaskssettingapp extends Component{
{/*</WordsBtn>*/}
{/*}*/}
<span className="color-grey-6">任务详情</span>
</p>
{/* <span className="color-grey-6"></span>
</p> */}
<div className="clearfix mt20 mb20 lineh-25 linbox">
{/* <div className="clearfix mt20 mb20 lineh-25 linbox">
<p className=" fl color-black lineh-25 summaryname">
<Link to={"/courses/"+courseId+"/graduation"+"/graduation_tasks/"} className="color-grey-3">{taskname}</Link>
</p>
@ -1088,20 +1088,20 @@ class GraduationTaskssettingapp extends Component{
typelist={task_status}
/>
<a className="color-grey-3 fr font-16 ml30 mr20" onClick={this.goback}>返回</a>
</div>
</div> */}
<div className="stud-class-set bor-bottom-greyE" id={"publishtimestart"}>
<div className="mt10 clearfix edu-back-white poll_list pl20" id={"publishtimeend"}>
{/* <div className="stud-class-set bor-bottom-greyE" id={"publishtimestart"}>
<div className="mt10 clearfix edu-back-white poll_list pl20" id={"publishtimeend"}> */}
<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>任务列表</Link>
{/* <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"}></Link>
<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>毕设描述</Link>
<Link className="active"
style={{paddingLeft:'38px'}}
to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting?tab=3"}>设置</Link>
to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting?tab=3"}>设置</Link> */}
{/*<a className={"fr color-blue font-16"}>导出</a>*/}
<style>
{/* <style>
{ `
.drop_down_menu{
height: 118px;
@ -1134,16 +1134,16 @@ class GraduationTaskssettingapp extends Component{
<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>:""}
</li>:""} */}
{/*{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>:""}*/}
{/*<a className={"fr color-blue font-16"}>项目在线质量检测</a>*/}
{this.props.isAdmin()?settingdata.status===1?<a className={"fr color-blue font-16 mr20"} onClick={() => { this.end()} }>立即截止</a>:"":""}
{/* {this.props.isAdmin()?settingdata.status===1?<a className={"fr color-blue font-16 mr20"} onClick={() => { this.end()} }></a>:"":""}
{this.props.isAdmin()?settingdata.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>
</div> */}

@ -1090,98 +1090,11 @@ class GraduationTaskssettinglist extends Component{
/>
{taskslistdata&&taskslistdata?
{ taskslistdata && taskslistdata?
// 教师列表
this.props.isAdmin()?<div className="newMain clearfix">
<div className={"educontent mb20"}>
<p className="clearfix mt10">
<a className="color-grey-9 fl" onClick={this.goback}>{taskslistdata.course_name}</a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<Link className="color-grey-9 fl" to={"/courses/"+courseId+"/graduation_tasks/"+taskslistdata.graduation_id}>{taskslistdata.graduation_name}</Link>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<span className="color-grey-6 fl">任务详情</span>
</p>
<div className="clearfix lineh-25 mt20 mb20 linbox">
<p className=" fl color-black summaryname lineh-25 "> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id} className="color-grey-3">{taskslistdata.task_name}</Link></p>
<CoursesListType
typelist={taskslistdata.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">
{/*<a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xls"} className={"fr color-blue font-16"}>导出成绩</a>*/}
{/*<a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} className={"fr color-blue font-16"}>导出作品附件</a>*/}
<Link className="active" to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>任务列表</Link>
<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>毕设描述</Link>
<Link style={{paddingLeft:'38px'}}
to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting?tab=3"}>设置</Link>
{/*<a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+task_Id+"/edit"}>编辑任务</a>*/}
{/*<a className={"fr color-blue font-16"} onClick={this.end}>立即截止</a>*/}
{/*<a 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/"+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>*/}
{taskslistdata.status===1? <a className={"fr color-blue font-16 mr20"} onClick={() => { this.end()} }>立即截止</a>:""}
{taskslistdata.status===0?<a className={"fr color-blue font-16 mr20"} onClick={() => { this.publish()} }>立即发布</a>:""}
<a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+task_Id+"/edit"}>编辑任务</a>
</div>
</div>
this.props.isAdmin()?
<div className="stud-class-set">
<div className="clearfix edu-back-white" >
{/*提示*/}
{/*<Modals*/}
{/*modalsType={Modalstype}*/}
{/*modalsTopval={Modalstopval}*/}
{/*modalCancel={ModalCancel}*/}
{/*modalSave={ModalSave}*/}
{/*/>*/}
<ul className="clearfix" style={{padding:'20px 40px 10px 40px'}}>
<li className="clearfix">
@ -1384,11 +1297,7 @@ class GraduationTaskssettinglist extends Component{
</div>
: ""
}
</div>
</div>
</div>:
</div>:
// 学生列表
this.props.isStudent()||this.props.isNotMember()?
<div className="newMain clearfix">

@ -307,7 +307,7 @@ class GraduationTasksquestions extends Component{
{questionslist&&questionslist?<div className="newMain clearfix">
<div className={"educontent mb20"}>
<p className="clearfix mt10">
{/* <p className="clearfix mt10">
<a onClick={this.goback} className="color-grey-9 fl">{questionslist.course_name}</a>
<span className="color-grey-9 fl ml3 mr3">&gt;</span>
<Link to={"/courses/"+courseId+"/graduation_tasks/"+questionslist.graduation_id} className="color-grey-9 fl">{questionslist.graduation_name}</Link>
@ -323,22 +323,22 @@ class GraduationTasksquestions extends Component{
typelist={questionslist.task_status}
/>
<a className="color-grey-3 fr font-16 ml30 mr20" onClick={this.goback}>返回</a>
</div>
</div> */}
<div className="stud-class-set bor-bottom-greyE">
<div className="mt10 clearfix edu-back-white poll_list pl20">
{/* <div className="stud-class-set bor-bottom-greyE">
<div className="mt10 clearfix edu-back-white poll_list pl20"> */}
<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>任务列表</Link>
{/* <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"}></Link>
<Link className="active" to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>毕设描述</Link>
<Link style={{paddingLeft:'38px'}}
to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting?tab=3"}>设置</Link>
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>:""}*/}
{/*{this.props.isAdmin()?<a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} className={"fr color-blue font-16"}>导出作品附件</a>:""}*/}
<style>
{/* <style>
{ `
.drop_down_menu{
height: 118px;
@ -371,14 +371,14 @@ class GraduationTasksquestions extends Component{
<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>:""}
</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===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>
</div> */}

Loading…
Cancel
Save