|
|
|
@ -41,6 +41,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
data: [],
|
|
|
|
|
datas: [],
|
|
|
|
|
view_report:false,
|
|
|
|
|
computeTimetype:true,
|
|
|
|
|
page: 1,
|
|
|
|
|
pages: 1,
|
|
|
|
|
limit: 20,
|
|
|
|
@ -746,13 +747,69 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
this.Getalistofworkstwo(this.state.order, "", "", "", pageNumber, this.state.limit);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setComputeTime=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
computeTimetype:false
|
|
|
|
|
})
|
|
|
|
|
let homeworkid = this.props.match.params.homeworkid;
|
|
|
|
|
let url = "/homework_commons/"+homeworkid+"/update_student_score.json";
|
|
|
|
|
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
this.props.showNotification(`${response.data.message}`);
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
let {visibles, game_list,columns, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate} = this.state;
|
|
|
|
|
let {visibles, game_list,columns, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate,computeTimetype} = this.state;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ?
|
|
|
|
|
// 学生不能查看别人的
|
|
|
|
|
<div className="newMain clearfix ">
|
|
|
|
|
<style>
|
|
|
|
|
{`
|
|
|
|
|
.startbox{
|
|
|
|
|
height: 48px;
|
|
|
|
|
background: rgba(255,104,0,0.1);
|
|
|
|
|
line-height: 48px;
|
|
|
|
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.startfont{
|
|
|
|
|
font-size:14px;
|
|
|
|
|
font-family:MicrosoftYaHei;
|
|
|
|
|
font-weight:400;
|
|
|
|
|
color:rgba(255,104,0,1);
|
|
|
|
|
}
|
|
|
|
|
.computeTime{
|
|
|
|
|
width: 73px;
|
|
|
|
|
height: 24px;
|
|
|
|
|
display: inline-block;
|
|
|
|
|
padding: 5px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
line-height: 13px;
|
|
|
|
|
color: #4CACFF;
|
|
|
|
|
border: 1px solid #4CACFF;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.computeTimes{
|
|
|
|
|
width: 73px;
|
|
|
|
|
height: 24px;
|
|
|
|
|
display: inline-block;
|
|
|
|
|
padding: 5px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
line-height: 13px;
|
|
|
|
|
color: #C5C5C5;
|
|
|
|
|
border: 1px solid #EDEDED;
|
|
|
|
|
background:#EDEDED;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
`}
|
|
|
|
|
</style>
|
|
|
|
|
{visibles === true ?
|
|
|
|
|
<div>
|
|
|
|
|
<style>
|
|
|
|
@ -833,6 +890,14 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{computeTimetype===false?<li className="clearfix startbox mb20">
|
|
|
|
|
<span className={"startfont"}>
|
|
|
|
|
正在执行成绩计算,请稍后刷新页面查看结果
|
|
|
|
|
温馨提示:执行时间因作品数量而异
|
|
|
|
|
</span>
|
|
|
|
|
</li>:""}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{JSON.stringify(data) !== "[]" ?
|
|
|
|
|
<div>
|
|
|
|
|
<div id="graduation_work_list"
|
|
|
|
@ -843,7 +908,9 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
}}>
|
|
|
|
|
|
|
|
|
|
<div className="clearfix">
|
|
|
|
|
<span className="fl color-grey-6 font-12"><span
|
|
|
|
|
|
|
|
|
|
<span className="fl color-grey-6 font-12">
|
|
|
|
|
<span
|
|
|
|
|
className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.commit_count === undefined ? "" : teacherdata.commit_count}</span>已交<span
|
|
|
|
|
className="ml10">{teacherdata === undefined ? "" : teacherdata.uncommit_count}</span><span>未交</span>
|
|
|
|
|
{teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" :
|
|
|
|
@ -855,6 +922,19 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
}
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
<div className="fr">
|
|
|
|
|
|
|
|
|
|
<span className="fl mr10 color-grey-6 ">计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
|
|
|
|
|
<span>
|
|
|
|
|
{computeTimetype===true?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
|
|
|
|
|
计算成绩
|
|
|
|
|
</div>:<div className={"computeTimes font-13"} onClick={this.setComputeTime}>
|
|
|
|
|
计算成绩
|
|
|
|
|
</div>}
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
@ -962,17 +1042,14 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{computeTimetype===false?<li className="clearfix startbox mb20">
|
|
|
|
|
<span className={"startfont"}>
|
|
|
|
|
正在执行成绩计算,请稍后刷新页面查看结果
|
|
|
|
|
温馨提示:执行时间因作品数量而异
|
|
|
|
|
</span>
|
|
|
|
|
</li>:""}
|
|
|
|
|
|
|
|
|
|
{/*<div id="graduation_work_list" style={{padding: '0px 40px 10px 40px'}}>*/}
|
|
|
|
|
|
|
|
|
|
{/* <div className="clearfix">*/}
|
|
|
|
|
{/* <span className="fl color-grey-6 font-12"><span className="color-orange-tip">89</span>已交<span*/}
|
|
|
|
|
{/* className="ml10">9000</span><span>未交</span> <span className="ml20">剩余提交时间:</span><span*/}
|
|
|
|
|
{/* className="ml20">{this.state.day}天 {this.state.hour}:{this.state.minute}:{this.state.second}</span></span>*/}
|
|
|
|
|
|
|
|
|
|
{/* </div>*/}
|
|
|
|
|
|
|
|
|
|
{/*</div>*/}
|
|
|
|
|
<div className="edu-table edu-back-white ">
|
|
|
|
|
{data === undefined ? "" : <Table
|
|
|
|
|
style={styletable}
|
|
|
|
@ -991,34 +1068,52 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
"margin-bottom": "10px"
|
|
|
|
|
}}>
|
|
|
|
|
<div className="clearfix">
|
|
|
|
|
<span className="fl color-grey-6 font-12"><span
|
|
|
|
|
className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.commit_count === undefined ? "" : teacherdata.commit_count}</span>已交<span
|
|
|
|
|
className="ml10">{teacherdata === undefined ? "" : teacherdata.uncommit_count}</span><span>未交</span>
|
|
|
|
|
<span className="fl color-grey-6 font-12">
|
|
|
|
|
<span className="color-orange-tip">
|
|
|
|
|
{teacherdata === undefined ? "" : teacherdata.commit_count === undefined ? "" : teacherdata.commit_count}
|
|
|
|
|
</span>已交
|
|
|
|
|
<span className="ml10">{teacherdata === undefined ? "" : teacherdata.uncommit_count}</span><span>未交</span>
|
|
|
|
|
{teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" :
|
|
|
|
|
<span className="ml20">{teacherdata.left_time.status}</span>}
|
|
|
|
|
{teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" :
|
|
|
|
|
<span className="ml20"
|
|
|
|
|
style={{"color": '#FF6800'}}>{teacherdata.left_time.time}</span>}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div className="fr">
|
|
|
|
|
|
|
|
|
|
<span className="fl mr10 color-grey-6 ">计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
|
|
|
|
|
<span>
|
|
|
|
|
{computeTimetype===true?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
|
|
|
|
|
计算成绩
|
|
|
|
|
</div>:<div className={"computeTimes font-13"} onClick={this.setComputeTime}>
|
|
|
|
|
计算成绩
|
|
|
|
|
</div>}
|
|
|
|
|
</span>
|
|
|
|
|
<div className="fr edu-menu-panel">
|
|
|
|
|
<ul>
|
|
|
|
|
<li className="edu-position edu-position-hidebox">
|
|
|
|
|
<a className="font-12 ">
|
|
|
|
|
{order === "updated_at" ? "时间" : order === "work_score" ? "成绩" : order === "student_id" ? "学号" : ""}排序</a>
|
|
|
|
|
<i className="iconfont icon-xiajiantou ml5 font-12 "></i>
|
|
|
|
|
<ul className="edu-position-hide undis mt10">
|
|
|
|
|
<li><a onClick={(e) => this.funorder("updated_at")} data-remote="true"
|
|
|
|
|
className="color-grey-6 font-12" style={{"text-align": "center "}}>更新时间</a></li>
|
|
|
|
|
<li><a onClick={(e) => this.funorder("work_score")} data-remote="true"
|
|
|
|
|
className="color-grey-6 font-12" style={{"text-align": "center "}}>最终成绩</a></li>
|
|
|
|
|
<li><a onClick={(e) => this.funorder("student_id")} data-remote="true"
|
|
|
|
|
className="color-grey-6 font-12" style={{"text-align": "center "}}>学生学号</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
{/*因为计算按钮占了和这个位置,和设计沟通学生视角取消这个按钮*/}
|
|
|
|
|
{/*<div className="fr edu-menu-panel">*/}
|
|
|
|
|
{/*<ul>*/}
|
|
|
|
|
{/*<li className="edu-position edu-position-hidebox">*/}
|
|
|
|
|
{/*<a className="font-12 ">*/}
|
|
|
|
|
{/*{order === "updated_at" ? "时间" : order === "work_score" ? "成绩" : order === "student_id" ? "学号" : ""}排序</a>*/}
|
|
|
|
|
{/*<i className="iconfont icon-xiajiantou ml5 font-12 "></i>*/}
|
|
|
|
|
{/*<ul className="edu-position-hide undis mt10">*/}
|
|
|
|
|
{/*<li><a onClick={(e) => this.funorder("updated_at")} data-remote="true"*/}
|
|
|
|
|
{/*className="color-grey-6 font-12" style={{"text-align": "center "}}>更新时间</a></li>*/}
|
|
|
|
|
{/*<li><a onClick={(e) => this.funorder("work_score")} data-remote="true"*/}
|
|
|
|
|
{/*className="color-grey-6 font-12" style={{"text-align": "center "}}>最终成绩</a></li>*/}
|
|
|
|
|
{/*<li><a onClick={(e) => this.funorder("student_id")} data-remote="true"*/}
|
|
|
|
|
{/*className="color-grey-6 font-12" style={{"text-align": "center "}}>学生学号</a></li>*/}
|
|
|
|
|
{/*</ul>*/}
|
|
|
|
|
{/*</li>*/}
|
|
|
|
|
{/*</ul>*/}
|
|
|
|
|
{/*</div>*/}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|