competitions
杨树明 6 years ago
parent 8817c87677
commit 4a3837cd90

@ -7,7 +7,6 @@ import Loading from '../../../../Loading';
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom'; import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
import axios from 'axios'; import axios from 'axios';
import HomeworkModal from "../../coursesPublic/HomeworkModal"; import HomeworkModal from "../../coursesPublic/HomeworkModal";
import OneSelfOrderModal from "../../coursesPublic/OneSelfOrderModal";
import AccessoryModal from "../../coursesPublic/AccessoryModal"; import AccessoryModal from "../../coursesPublic/AccessoryModal";
import Associationmodel from '../../coursesPublic/Associationmodel'; import Associationmodel from '../../coursesPublic/Associationmodel';
import CoursesListType from '../../coursesPublic/CoursesListType'; import CoursesListType from '../../coursesPublic/CoursesListType';
@ -21,90 +20,89 @@ import Modals from '../../../modals/Modals';
//毕设描述 //毕设描述
const GraduationTasksquestions= Loadable({ const GraduationTasksquestions= Loadable({
loader: () => import('./GraduationTaskssettingquestions'), loader: () => import('./GraduationTaskssettingquestions'),
loading: Loading, loading: Loading,
}) })
//毕设任务设置 //毕设任务设置
const GraduationTaskssetting=Loadable({ const GraduationTaskssetting=Loadable({
loader: () => import('./GraduationTaskssetting'), loader: () => import('./GraduationTaskssetting'),
loading: Loading, loading: Loading,
}) })
//毕设任务列表 //毕设任务列表
const GraduationTaskslist=Loadable({ const GraduationTaskslist=Loadable({
loader: () => import('./GraduationTaskssettinglist'), loader: () => import('./GraduationTaskssettinglist'),
loading: Loading, loading: Loading,
}) })
class GraduationTaskDetail extends Component{ class GraduationTaskDetail extends Component{
constructor(props){ constructor(props){
super(props); super(props);
this.state={ this.state={
modalname:undefined, modalname:undefined,
visible:false, visible:false,
OneSelftype:false,
Topval:undefined, Topval:undefined,
starttime:undefined, starttime:undefined,
starttimes:undefined, starttimes:undefined,
typs:undefined, typs:undefined,
endtime:undefined, endtime:undefined,
Cancelname:undefined, Cancelname:undefined,
Savesname:undefined, Savesname:undefined,
Cancel:undefined, Cancel:undefined,
Saves:undefined, Saves:undefined,
Topvalright:undefined, Topvalright:undefined,
Botvalleft:undefined, Botvalleft:undefined,
course_groupslist:undefined, course_groupslist:undefined,
course_groups:undefined, course_groups:undefined,
questionslist:undefined, questionslist:undefined,
tab:"list", tab:"list",
visibles:undefined, visibles:undefined,
Modalstype:undefined, Modalstype:undefined,
Modalstopval:undefined, Modalstopval:undefined,
ModalCancel:undefined, ModalCancel:undefined,
ModalSave:undefined, ModalSave:undefined,
acrossVisible:undefined acrossVisible:undefined
} }
} }
componentDidMount(){ componentDidMount(){
this.getdatas() this.getdatas()
} }
getdatas=()=>{ getdatas=()=>{
const task_Id = this.props.match.params.task_Id; const task_Id = this.props.match.params.task_Id;
let url="/graduation_tasks/"+task_Id+".json"; let url="/graduation_tasks/"+task_Id+".json";
axios.get(url).then((result)=>{ axios.get(url).then((result)=>{
if(result.status===200){ if(result.status===200){
this.setState({ this.setState({
questionslist:result.data questionslist:result.data
}) })
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error) console.log(error)
}) })
} }
// 交叉评阅设置弹框 // 交叉评阅设置弹框
openAcross=()=>{ openAcross=()=>{
this.setState({ this.setState({
acrossVisible:true acrossVisible:true
}) })
} }
closeAcross=()=>{ closeAcross=()=>{
this.setState({ this.setState({
acrossVisible:false acrossVisible:false
}) })
this.getdatas() this.getdatas()
} }
//返回 //返回
goback=()=>{ goback=()=>{
// let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
// let category_id=this.props.match.params.category_id; // let category_id=this.props.match.params.category_id;
// window.location.href="/courses/"+courseId+"/graduation_tasks/"+category_id; // window.location.href="/courses/"+courseId+"/graduation_tasks/"+category_id;
// let courseId = this.props.match.params.coursesId; // let courseId = this.props.match.params.coursesId;
// if(courseId===undefined){ // if(courseId===undefined){
// this.props.history.push("/courses"); // this.props.history.push("/courses");
@ -114,76 +112,71 @@ class GraduationTaskDetail extends Component{
// this.props.history.goBack() // this.props.history.goBack()
this.props.history.replace(`/courses/${this.state.questionslist.course_id}/graduation_tasks/${this.state.questionslist.graduation_id}`); this.props.history.replace(`/courses/${this.state.questionslist.course_id}/graduation_tasks/${this.state.questionslist.graduation_id}`);
} }
//立即发布 //立即发布
publish=()=>{ publish=()=>{
let {questionslist}=this.state; let starttime= this.props.getNowFormatDates(1,1);
let starttime= this.props.getNowFormatDates(1,1); let endtime=this.props.getNowFormatDates(2,1);
let endtime=this.props.getNowFormatDates(2,1); // this.homeworkstart()
// this.homeworkstart() this.setState({
this.setState({ modalname:"立即发布",
modalname:"立即发布", visible:true,
visible:true,
OneSelftype:true,
Topval:"学生将立即收到毕设任务", Topval:"学生将立即收到毕设任务",
// Botvalleft:"点击修改", // Botvalleft:"点击修改",
// Botval:`本操作只对"未发布"的分班有效`, // Botval:`本操作只对"未发布"的分班有效`,
starttime:moment(moment(new Date())).format("YYYY-MM-DD HH:mm") , starttime:moment(moment(new Date())).format("YYYY-MM-DD HH:mm") ,
starttimes:questionslist.end_time, starttimes:this.props.getNowFormatDates(1),
staytime:this.props.getNowFormatDates(1),
typs:"start", typs:"start",
endtime:endtime, endtime:endtime,
Cancelname:"暂不发布", Cancelname:"暂不发布",
Savesname:"立即发布", Savesname:"立即发布",
Cancel:this.cancelmodel, Cancel:this.cancelmodel,
Saves:this.homepublish, Saves:this.homepublish,
}) })
} }
// 确定立即发布 // 确定立即发布
homepublish=(ids,endtime)=>{ homepublish=(ids,endtime)=>{
this.cancelmodel(); this.cancelmodel();
let task_Id=this.props.match.params.task_Id; let task_Id=this.props.match.params.task_Id;
const cid = this.props.match.params.coursesId; 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`;
let url="/courses/"+cid+"/graduation_tasks/publish_task.json" let url="/courses/"+cid+"/graduation_tasks/publish_task.json"
axios.post(url,{ axios.post(url,{
task_ids:[task_Id], task_ids:[task_Id],
group_ids: this.state.course_groupslist, group_ids: this.state.course_groupslist,
end_time:endtime, end_time:endtime,
}).then((response)=>{ }).then((response)=>{
if (response.data.status == 0) { if (response.data.status == 0) {
this.getdatas() this.getdatas()
this.props.showNotification(response.data.message); this.props.showNotification(response.data.message);
this.setState({ this.setState({
// Modalstopval:response.data.message, // Modalstopval:response.data.message,
// ModalSave:this.cancelmodel, // ModalSave:this.cancelmodel,
// Loadtype:true, // Loadtype:true,
course_groupslist:[], course_groupslist:[],
checkAllValue:false checkAllValue:false
}) })
} }
}).catch((error)=>{ }).catch((error)=>{
}) })
} }
// 刷新 // 刷新
resetList=()=>{ resetList=()=>{
this.getdatas(); this.getdatas();
this.child && this.child.searchValue(); this.child && this.child.searchValue();
} }
// 立即截止 // 立即截止
end=()=>{ end=()=>{
// this.homeworkstart() // this.homeworkstart()
this.setState({ this.setState({
modalname:"立即截止", modalname:"立即截止",
visible:true, visible:true,
OneSelftype:true,
Topval:"学生将不能再提交作品", Topval:"学生将不能再提交作品",
starttime:undefined,
// Botvalleft:"暂不截止", // Botvalleft:"暂不截止",
// Botval:`本操作只对"提交中"的分班有效`, // Botval:`本操作只对"提交中"的分班有效`,
Cancelname:"暂不截止", Cancelname:"暂不截止",
@ -192,75 +185,74 @@ class GraduationTaskDetail extends Component{
Saves:this.coursetaskend, Saves:this.coursetaskend,
typs:"end", typs:"end",
}) })
} }
coursetaskend=()=>{ coursetaskend=()=>{
const coursesId = this.props.match.params.coursesId; const coursesId = this.props.match.params.coursesId;
const task_Id = this.props.match.params.task_Id; const task_Id = this.props.match.params.task_Id;
let url = `/courses/${coursesId}/graduation_tasks/end_task.json`; let url = `/courses/${coursesId}/graduation_tasks/end_task.json`;
axios.post(url,{ axios.post(url,{
task_ids:[task_Id], task_ids:[task_Id],
group_ids: this.state.course_groupslist, group_ids: this.state.course_groupslist,
}).then((response)=>{ }).then((response)=>{
if (response.data.status == 0) { if (response.data.status == 0) {
this.props.showNotification(response.data.message); this.props.showNotification(response.data.message);
this.cancelmodel(); this.cancelmodel();
this.getdatas(); this.getdatas();
this.child && this.child.reInit(); this.child && this.child.reInit();
} }
}).catch((error)=>{ }).catch((error)=>{
}) })
} }
// 取消 // 取消
cancelmodel=()=>{ cancelmodel=()=>{
this.setState({ this.setState({
Modalstype:false, Modalstype:false,
Loadtype:false, Loadtype:false,
visible:false, visible:false,
OneSelftype:false, Modulationtype:false,
Modulationtype:false, Allocationtype:false,
Allocationtype:false, Modalstopval:"",
Modalstopval:"", ModalCancel:"",
ModalCancel:"", ModalSave:"",
ModalSave:"", })
}) }
}
getcourse_groupslist=(id)=>{
getcourse_groupslist=(id)=>{ this.setState({
this.setState({ course_groupslist:id
course_groupslist:id })
}) }
}
setTab = (tab) =>{
setTab = (tab) =>{ this.setState({
this.setState({ tab
tab })
}) }
}
// 关联项目
// 关联项目 AssociationItems=()=>{
AssociationItems=()=>{
this.setState({ this.setState({
visibles:true visibles:true
}) })
} }
Cancel=()=>{ Cancel=()=>{
this.setState({ this.setState({
visibles:false visibles:false
}) })
} }
// 取消关联 // 取消关联
cannelAssociation=()=>{ cannelAssociation=()=>{
this.setState({ this.setState({
Modalstype:true, Modalstype:true,
Modalstopval:"确定要取消该项目关联?", Modalstopval:"确定要取消该项目关联?",
ModalCancel:this.cannerassocition, ModalCancel:this.cannerassocition,
ModalSave:this.savetassociton ModalSave:this.savetassociton
}) })
} }
savetassociton=()=>{ savetassociton=()=>{
this.cannerassocition(); this.cannerassocition();
let {questionslist}=this.state; let {questionslist}=this.state;
let url = "/graduation_tasks/"+questionslist.task_id+"/graduation_works/cancel_relate_project.json"; let url = "/graduation_tasks/"+questionslist.task_id+"/graduation_works/cancel_relate_project.json";
@ -274,7 +266,7 @@ class GraduationTaskDetail extends Component{
}) })
} }
cannerassocition=()=>{ cannerassocition=()=>{
this.setState({ this.setState({
Modalstype:false, Modalstype:false,
Modalstopval:"", Modalstopval:"",
@ -283,10 +275,10 @@ class GraduationTaskDetail extends Component{
loadtype:false, loadtype:false,
visibles:false visibles:false
}) })
} }
// 补交附件 // 补交附件
handaccessory=()=>{ handaccessory=()=>{
// let {taskslistdata}=this.state; // let {taskslistdata}=this.state;
// let courseId=this.props.match.params.coursesId; // let courseId=this.props.match.params.coursesId;
// //
// let url="/courses/"+courseId+"/graduation_tasks/"+taskslistdata.work_id+"/appraise" // let url="/courses/"+courseId+"/graduation_tasks/"+taskslistdata.work_id+"/appraise"
@ -300,130 +292,129 @@ class GraduationTaskDetail extends Component{
this.setState({ this.setState({
avisible:false avisible:false
}) })
} }
bindRef = ref => { this.child = ref } ; bindRef = ref => { this.child = ref } ;
render(){ render(){
let courseId=this.props.match.params.coursesId; let courseId=this.props.match.params.coursesId;
let category_id=this.props.match.params.category_id; let category_id=this.props.match.params.category_id;
let task_Id=this.props.match.params.task_Id; let task_Id=this.props.match.params.task_Id;
let { let {
questionslist , questionslist ,
tab , tab ,
visibles , visibles ,
Modalstype, Modalstype,
Modalstopval, Modalstopval,
ModalCancel, ModalCancel,
ModalSave, ModalSave,
acrossVisible acrossVisible
} = this.state } = this.state
const commom = { const commom = {
setTab:this.setTab, setTab:this.setTab,
getdatas:this.getdatas getdatas:this.getdatas
} }
return( return(
<div className="newMain clearfix"> <div className="newMain clearfix">
{ {
questionslist && questionslist &&
<div className={"educontent mb20"}> <div className={"educontent mb20"}>
<OneSelfOrderModal <HomeworkModal
staytime={this.state.staytime} starttimes={this.state.starttimes}
starttimes={this.state.starttimes} typs={this.state.typs}
typs={this.state.typs} modalname={this.state.modalname}
modalname={this.state.modalname} visible={this.state.visible}
OneSelftype={this.state.OneSelftype} Topval={this.state.Topval}
Topval={this.state.Topval} Topvalright={this.state.Topvalright}
Topvalright={this.state.Topvalright} Botvalleft={this.state.Botvalleft}
Botvalleft={this.state.Botvalleft} Botval={this.state.Botval}
Botval={this.state.Botval} starttime={this.state.starttime}
starttime={this.state.starttime} endtime={this.state.endtime}
endtime={this.state.endtime} Cancelname={this.state.Cancelname}
Cancelname={this.state.Cancelname} Savesname={this.state.Savesname}
Savesname={this.state.Savesname} Cancel={this.state.Cancel}
Cancel={this.state.Cancel} Saves={this.state.Saves}
Saves={this.state.Saves} course_groups={this.state.course_groups}
course_groups={this.state.course_groups} modaltype={this.state.modaltype}
modaltype={this.state.modaltype} getcourse_groupslist={(id) => this.getcourse_groupslist(id)}
getcourse_groupslist={(id) => this.getcourse_groupslist(id)} />
/> {/*关联项目*/}
{/*关联项目*/} {visibles===true?
{visibles===true? <Associationmodel
<Associationmodel modalname={"关联项目"}
modalname={"关联项目"} visible={visibles}
visible={visibles} Cancel={()=>this.Cancel()}
Cancel={()=>this.Cancel()} taskid={ questionslist && questionslist.task_id }
taskid={ questionslist && questionslist.task_id } funlist={this.resetList}
funlist={this.resetList} />
/> :""}
:""}
{this.state.avisible===true?<AccessoryModal
{this.state.avisible===true?<AccessoryModal {...this.props}
{...this.props} modalname={"补交附件"}
modalname={"补交附件"} visible={this.state.avisible}
visible={this.state.avisible} Cancelname={"取消"}
Cancelname={"取消"} Savesname={"确认"}
Savesname={"确认"} Cancel={this.Cancelvisible}
Cancel={this.Cancelvisible} categoryid={questionslist.work_id}
categoryid={questionslist.work_id} setupdate={this.resetList}
setupdate={this.resetList} />:""}
/>:""} {/*提示*/}
{/*提示*/} <Modals
<Modals modalsType={Modalstype}
modalsType={Modalstype} modalsTopval={Modalstopval}
modalsTopval={Modalstopval} modalCancel={ModalCancel}
modalCancel={ModalCancel} modalSave={ModalSave}
modalSave={ModalSave} closable={false}
closable={false} footer={null}
footer={null} destroyOnClose={true}
destroyOnClose={true} centered={true}
centered={true} />
/>
{
{ acrossVisible &&
acrossVisible && <GraduationAcross
<GraduationAcross {...this.props}
{...this.props} {...this.state}
{...this.state} task_Id={task_Id}
task_Id={task_Id} modalVisible={acrossVisible}
modalVisible={acrossVisible} modalCloss={this.closeAcross}
modalCloss={this.closeAcross} resetFun={this.resetList}
resetFun={this.resetList} comment_status={ questionslist && questionslist.comment_status }
comment_status={ questionslist && questionslist.comment_status } />
/> }
}
<p className="clearfix mt10">
<p className="clearfix mt10"> <a onClick={this.goback} className="color-grey-9 fl">{questionslist.course_name}</a>
<a onClick={this.goback} className="color-grey-9 fl">{questionslist.course_name}</a> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <Link to={`/courses/${courseId}/graduation_tasks/${category_id}`} className="color-grey-9 fl">{questionslist.graduation_name}</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-9 fl ml3 mr3">&gt;</span> <span className="color-grey-6">任务详情</span>
<span className="color-grey-6">任务详情</span> </p>
</p> <div className="clearfix mt20 mb20 lineh-25 linbox">
<div className="clearfix mt20 mb20 lineh-25 linbox"> <p className=" fl color-black summaryname">
<p className=" fl color-black summaryname"> <Link to={`/courses/${courseId}/graduation_tasks/${category_id}`} className="color-grey-3">{questionslist.task_name}</Link>
<Link to={`/courses/${courseId}/graduation_tasks/${category_id}`} className="color-grey-3">{questionslist.task_name}</Link> </p>
</p> <CoursesListType
<CoursesListType typelist={questionslist.task_status}
typelist={questionslist.task_status} />
/> <a className="color-grey-3 fr font-16 ml30 mr20" onClick={this.goback}>返回</a>
<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="stud-class-set bor-bottom-greyE"> <div className="clearfix edu-back-white pl30 pr30 graduationTaskMenu">
<div className="clearfix edu-back-white pl30 pr30 graduationTaskMenu">
<Link className={tab && tab == "list" ? "active" : ""} to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+task_Id+"/list"}>任务列表</Link>
<Link className={tab && tab == "list" ? "active" : ""} to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+task_Id+"/list"}>任务列表</Link> <Link className={tab && tab == "questions" ? "active" : ""} to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+task_Id+"/questions"}>毕设描述</Link>
<Link className={tab && tab == "questions" ? "active" : ""} to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+task_Id+"/questions"}>毕设描述</Link> <Link className={tab && tab == "setting" ? "active" : ""} to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+task_Id+"/setting?tab=3"}>设置</Link>
<Link className={tab && tab == "setting" ? "active" : ""} to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/detail/"+task_Id+"/setting?tab=3"}>设置</Link>
{/*<a className={"fr color-blue font-16"}>导出成绩</a>*/}
{/*<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.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>:""}*/}
{/*{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{ .drop_down_menu{
height: 118px; height: 118px;
left:0px; left:0px;
@ -451,63 +442,63 @@ class GraduationTaskDetail extends Component{
height: 26px; height: 26px;
} }
`} `}
</style> </style>
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mt20" style={{"paddingLeft":"0px"}}> {this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mt20" style={{"paddingLeft":"0px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a onClick={()=>this.child.confirmysl("/graduation_tasks/"+task_Id+"/tasks_list.xlsx")} className="color-dark">导出成绩</a></li> <li><a onClick={()=>this.child.confirmysl("/graduation_tasks/"+task_Id+"/tasks_list.xlsx")} className="color-dark">导出成绩</a></li>
<li><a onClick={()=>this.child.confirmysl("/graduation_tasks/"+task_Id+"/tasks_list.zip")} className="color-dark">导出作品附件</a></li> <li><a onClick={()=>this.child.confirmysl("/graduation_tasks/"+task_Id+"/tasks_list.zip")} className="color-dark">导出作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}
{questionslist.work_status===undefined||questionslist.work_status===null||questionslist.work_status.length===0?"":questionslist.work_status.map((item,key)=>{ {questionslist.work_status===undefined||questionslist.work_status===null||questionslist.work_status.length===0?"":questionslist.work_status.map((item,key)=>{
return( return(
<span key={key} className="fr mt20"> <span key={key} className="fr mt20">
{item==="提交作品"?<a className={"fr color-blue font-16 ml20"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/works/"+task_Id+"/new"}>提交作品</a>:""} {item==="提交作品"?<a className={"fr color-blue font-16 ml20"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/works/"+task_Id+"/new"}>提交作品</a>:""}
{item==="补交作品"?<a className={"fr color-blue font-16 ml20"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/works/"+task_Id+"/new"}>补交作品</a>:""} {item==="补交作品"?<a className={"fr color-blue font-16 ml20"} href={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/works/"+task_Id+"/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"} target="_blank" href={"/courses/"+courseId+"/graduation_tasks/"+ questionslist.work_id + "/appraise"}>查看作品</a> :""} {item==="查看作品"?<a className={"fr color-blue font-16 ml20"} target="_blank" href={"/courses/"+courseId+"/graduation_tasks/"+ questionslist.work_id + "/appraise"}>查看作品</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"} 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.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.cannelAssociation}>取消关联</a>:""}
{item==="补交附件"?<a className={"fr color-blue font-16 ml20"} onClick={this.handaccessory}>补交附件</a>:""} {item==="补交附件"?<a className={"fr color-blue font-16 ml20"} onClick={this.handaccessory}>补交附件</a>:""}
</span> </span>
) )
})} })}
{/*<a className={"fr color-blue font-16"}>项目在线质量检测</a>*/} {/*<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() ? questionslist.status===0 ? <a className={"fr color-blue font-16 mr20"} onClick={() => { this.publish()} }>立即发布</a> : "" : "" }
{ this.props.isAdmin() && questionslist.cross_comment ? <a className={"fr color-blue font-16"} onClick={this.openAcross}>交叉评阅设置</a> : "" } { this.props.isAdmin() && questionslist.cross_comment ? <a className={"fr color-blue font-16"} onClick={this.openAcross}>交叉评阅设置</a> : "" }
{ this.props.isAdmin() ? <a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+task_Id+"/edit"}>编辑任务</a> : "" } { this.props.isAdmin() ? <a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+task_Id+"/edit"}>编辑任务</a> : "" }
</div> </div>
</div> </div>
<Switch {...this.props}> <Switch {...this.props}>
<Route exact path="/courses/:coursesId/graduation_tasks/:category_id/detail/:task_Id/list" <Route exact path="/courses/:coursesId/graduation_tasks/:category_id/detail/:task_Id/list"
render={ render={
(props) => (<GraduationTaskslist {...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} tab={`list`}/>) (props) => (<GraduationTaskslist {...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} tab={`list`}/>)
} }
></Route> ></Route>
<Route exact path="/courses/:coursesId/graduation_tasks/:category_id/detail/:task_Id/setting" <Route exact path="/courses/:coursesId/graduation_tasks/:category_id/detail/:task_Id/setting"
render={ render={
(props) => (<GraduationTaskssetting {...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} tab={`setting`}/>) (props) => (<GraduationTaskssetting {...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} tab={`setting`}/>)
} }
></Route> ></Route>
<Route exact path="/courses/:coursesId/graduation_tasks/:category_id/detail/:task_Id/questions" <Route exact path="/courses/:coursesId/graduation_tasks/:category_id/detail/:task_Id/questions"
render={ render={
(props) => (<GraduationTasksquestions {...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} tab={`questions`}/>) (props) => (<GraduationTasksquestions {...this.props} {...props} {...this.state} {...commom} triggerRef={this.bindRef} tab={`questions`}/>)
}></Route> }></Route>
</Switch> </Switch>
</div> </div>
} }
</div> </div>
) )
} }
} }
// CNotificationHOC() ( SnackbarHOC() ( TPMIndexHOC)) // CNotificationHOC() ( SnackbarHOC() ( TPMIndexHOC))
export default (GraduationTaskDetail) ; export default (GraduationTaskDetail) ;
Loading…
Cancel
Save