dev_forum
杨树明 6 years ago
parent f50e32075a
commit a019b59761

@ -49,20 +49,28 @@ class CoursesBanner extends Component {
componentDidMount() {
this.updatabanner()
this.onloadupdatabanner()
}
updatabanner=()=>{
let courseId = this.props.match.params.coursesId;
let url = "/courses/" + courseId + "/top_banner.json"
axios.get(url).then((result) => {
if( result!=undefined){
let data = result.data;
this.setState({
coursedata: data
})
}
})
}
onloadupdatabanner=()=>{
this.updatabanner()
}
updatabanner=()=>{
let courseId = this.props.match.params.coursesId;
let url = "/courses/" + courseId + "/top_banner.json"
axios.get(url).then((result) => {
if( result!=undefined){
let data = result.data;
this.setState({
coursedata: data
})
}else{
this.onloadupdatabanner()
}
})
}
showeditmenu = () => {
this.setState({
show: true,

@ -17,8 +17,6 @@ const CheckboxGroup = Checkbox.Group;
const Search = Input.Search;
const qs = require('qs');
class GraduationTaskssettinglist extends Component{
constructor(props){
@ -1538,8 +1536,10 @@ class GraduationTaskssettinglist extends Component{
<div id="graduation_work_list" style={{padding:'0px 40px 10px 40px'}}>
<div className="clearfix">
{this.props.isAdmin()?<span className="fl color-grey-6 font-12"><span className="color-orange-tip">{taskslistdata&&taskslistdata.work_count}</span>{taskslistdata&&taskslistdata.work_count} </span>:""}
{this.props.isAdmin()?<div className="fr color-grey-6 edu-menu-panel">
{this.props.isAdmin()===true?<span className="fl color-grey-6 font-12">
<span className="color-orange-tip">{taskslistdata&&taskslistdata.work_count}</span>
个检索结果{taskslistdata&&taskslistdata.work_count} 学生 </span>:""}
{this.props.isAdmin()===true?<div className="fr color-grey-6 edu-menu-panel">
<p>
<a data-remote="true">
{order==="updated_at"?"更新时间":order==="work_score"?"最终成绩":order==="student_id"?"学生学号":""}排序</a>
@ -1555,6 +1555,24 @@ class GraduationTaskssettinglist extends Component{
</div>:""}
</div>
{this.props.isStudent()===true?
<div className="clearfix">
<span className="mr15 color-grey9">
<span className={"color-orange"}>{taskslistdata&&taskslistdata.commit_count}
</span> </span>
<span className="mr15 color-grey9">
<span className={"color-orange"}>{taskslistdata&&taskslistdata.uncommit_count}
</span> </span>
<Tooltip title={taskslistdata&&taskslistdata.left_time.status} placement="bottom">
<span className="mr15 color-grey9">
{taskslistdata&&taskslistdata.left_time.status} :
<span className={"ml10 color-orange"}>
{taskslistdata&&taskslistdata.left_time.time}</span>
</span>
</Tooltip>
</div>
:""}
</div>
{
@ -1774,24 +1792,49 @@ class GraduationTaskssettinglist extends Component{
<div id="graduation_work_list" style={{ padding: '18px 40px 10px',height: '56px'}}>
<div className="clearfix">
<span className="fl color-grey-6 font-12"><span className="color-orange-tip">{taskslistdata&&taskslistdata.work_count}</span>{taskslistdata&&taskslistdata.work_count} </span>
<div className="fr color-grey-6 edu-menu-panel">
<p><a data-remote="true">
{order==="updated_at"?"时间":order==="work_score"?"成绩":order==="student_id"?"学号":""}排序</a><i
className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i></p>
<ul className="edu-menu-list">
<li onClick={(e)=>this.funorder("updated_at")} className={order==="updated_at"?"none":""}><a data-remote="true">时间</a>
</li>
<li onClick={(e)=>this.funorder("work_score" )} className={order==="work_score"?"none":""}><a data-remote="true">成绩</a>
</li>
<li onClick={(e)=>this.funorder("student_id" )} className={order==="student_id"?"none":""}><a data-remote="true">学号</a>
</li>
</ul>
</div>
</div>
{this.props.isAdmin()===true?
<div className="clearfix">
<span className="fl color-grey-6 font-12">
<span className="color-orange-tip">{taskslistdata&&taskslistdata.work_count}</span>
个检索结果{taskslistdata&&taskslistdata.work_count} 学生
</span>
<div className="fr color-grey-6 edu-menu-panel">
<p><a data-remote="true">
{order==="updated_at"?"时间":order==="work_score"?"成绩":order==="student_id"?"学号":""}排序</a><i
className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i></p>
<ul className="edu-menu-list">
<li onClick={(e)=>this.funorder("updated_at")} className={order==="updated_at"?"none":""}><a data-remote="true">时间</a>
</li>
<li onClick={(e)=>this.funorder("work_score" )} className={order==="work_score"?"none":""}><a data-remote="true">成绩</a>
</li>
<li onClick={(e)=>this.funorder("student_id" )} className={order==="student_id"?"none":""}><a data-remote="true">学号</a>
</li>
</ul>
</div>
</div>
:""}
{this.props.isStudent()===true?
<div className="clearfix">
<span className="mr15 color-grey9">
<span className={"color-orange"}>{taskslistdata&&taskslistdata.commit_count}
</span> </span>
<span className="mr15 color-grey9">
<span className={"color-orange"}>{taskslistdata&&taskslistdata.uncommit_count}
</span> </span>
<Tooltip title={taskslistdata&&taskslistdata.left_time.status} placement="bottom">
<span className="mr15 color-grey9">
{taskslistdata&&taskslistdata.left_time.status} :
<span className={"ml10 color-orange"}>
{taskslistdata&&taskslistdata.left_time.time}</span>
</span>
</Tooltip>
</div>
:""}
</div>

Loading…
Cancel
Save