dev_forum
杨树林 5 years ago
parent f2605ef12d
commit 5df41988fd

@ -911,8 +911,8 @@ class Listofworksstudentone extends Component {
}
}
student=()=>{
console.log("914");
debugger
// console.log("914");
// debugger
this.props.triggerRef(this);
var homeworkid = this.props.match.params.homeworkid;
this.Getalistofworks(homeworkid);
@ -932,8 +932,8 @@ class Listofworksstudentone extends Component {
// 获取作品列表
Getalistofworks = (homeworkid) => {
// console.log("获取作品列表");
console.log("935");
debugger
// console.log("935");
// debugger
let urll = `/homework_commons/${homeworkid}/works_list.json`;
var data = {
search: "",
@ -948,9 +948,9 @@ class Listofworksstudentone extends Component {
if(result === undefined){
return
}
console.log("951");
console.log(result);
debugger
// console.log("951");
// console.log(result);
// debugger
if (result.status === 200) {
this.setState({
teacherdata: result.data,
@ -1109,11 +1109,11 @@ class Listofworksstudentone extends Component {
})
// }
var teacherlist = { //分页
total: teacherdata.student_works.length, //数据总数量
pageSize: teacherdata.student_works.length, //一页显示几条
current: this.state.page,
}
// var teacherlist = { //分页
// total: teacherdata.student_works.length, //数据总数量
// pageSize: teacherdata.student_works.length, //一页显示几条
// current: this.state.page,
// }
styletable = {"display": "block",}
} else {
// console.log("seacthdata设置数据2")
@ -1231,11 +1231,11 @@ class Listofworksstudentone extends Component {
})
// }
var teacherlist = { //分页
total: teacherdata.student_works.length, //数据总数量
pageSize: teacherdata.student_works.length, //一页显示几条
current: this.state.page,
}
// var teacherlist = { //分页
// total: teacherdata.student_works.length, //数据总数量
// pageSize: teacherdata.student_works.length, //一页显示几条
// current: this.state.page,
// }
} else {
// console.log("seacthdata设置数据2")
var teacherlist = undefined;
@ -1404,11 +1404,11 @@ class Listofworksstudentone extends Component {
TablePagination = (e) => {
// console.log(e.current);
var teacherlists = { //分页
total: this.state.student_works.length, //数据总数量
pageSize: 10, //一页显示几条
current: e.current,
}
// var teacherlists = { //分页
// total: this.state.student_works.length, //数据总数量
// pageSize: 10, //一页显示几条
// current: e.current,
// }
this.setState({
page: e.current,
teacherlists: teacherlists
@ -1468,7 +1468,7 @@ class Listofworksstudentone extends Component {
// 获取作品列表
Getalistofworkst = (homeworkid) => {
// console.log("获取作品列表");7009
debugger
// debugger
let urll = `/homework_commons/${homeworkid}/works_list.json`;
// console.log(homeworkid);
@ -1488,7 +1488,7 @@ class Listofworksstudentone extends Component {
limit:20,
}
axios.post(urll, data).then((result) => {
debugger
// debugger
if (result !== undefined) {
// console.log(url)
// console.log("作品列表6789077")
@ -1583,7 +1583,7 @@ class Listofworksstudentone extends Component {
// 设置数据
seacthdatat = (teacherdata,student_works,work_efficiency,course_group_info) => {
debugger
// debugger
let {page, limit} = this.state;
let datalist = [];
let columns = this.state.columns;
@ -1615,11 +1615,11 @@ class Listofworksstudentone extends Component {
}
var teacherlist = { //分页
total: student_works.length, //数据总数量
pageSize: 20, //一页显示几条
current: page,
}
// var teacherlist = { //分页
// total: student_works.length, //数据总数量
// pageSize: 20, //一页显示几条
// current: page,
// }
if (work_efficiency === false) {
if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined||course_group_info === null){
//这里没有分班 没有 关卡得分 没有效率分
@ -2198,9 +2198,12 @@ class Listofworksstudentone extends Component {
// console.log(this.state.data);
// console.log("841");
// console.log(this.state.columns);
// console.log(data);
// console.log("2202");
// console.log(this.props.isAdmin());
return (
this.props.isAdmin === true ?
(
this.props.isAdmin() === true ?
<div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
{visible === true ? <ModulationModal
visible={visible}
@ -2488,7 +2491,7 @@ class Listofworksstudentone extends Component {
</div>
{
teacherdata && teacherdata.work_count && teacherdata.work_count > limit ?
<div className="edu-txt-center edu-back-white mt30 mb20">
<div className="edu-txt-center mt30 ">
<Pagination showQuickJumper current={page}
onChange={this.paginationonChanges} pageSize={limit}
total={teacherdata.work_count}></Pagination>
@ -2498,13 +2501,14 @@ class Listofworksstudentone extends Component {
</div>
</div>
) :(
teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ?
// 学生不能查看别人的
<div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
<style>
{`
:
<div>
{
teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ?
// 学生不能查看别人的
<div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
<style>
{`
.startbox{
height: 48px;
background: rgba(255,104,0,0.1);
@ -2544,65 +2548,65 @@ class Listofworksstudentone extends Component {
cursor: pointer;
}
`}
</style>
{visibles === true ?
<div>
<DownloadMessageysl
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
<style>
{
`
</style>
{visibles === true ?
<div>
<DownloadMessageysl
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
<style>
{
`
body {
overflow: hidden !important;
}
`
}
</style>
<TraineetraininginformationModal
homeworkid={this.props.match.params.homeworkid}
coursesId={this.props.match.params.coursesId}
userids={this.state.userids}
viewtrainingdata={viewtrainingdata}
game_list={game_list}
visible={visibles}
experience={experience}
boolgalist={boolgalist}
Cancel={() => this.cancelModulationModels()}
/>
</div>
: ""
}
</style>
<TraineetraininginformationModal
homeworkid={this.props.match.params.homeworkid}
coursesId={this.props.match.params.coursesId}
userids={this.state.userids}
viewtrainingdata={viewtrainingdata}
game_list={game_list}
visible={visibles}
experience={experience}
boolgalist={boolgalist}
Cancel={() => this.cancelModulationModels()}
/>
</div>
: ""
}
<div className={"educontent "}>
<div className="edu-back-white" style={{width: "1200"}}>
<div className={"educontent "}>
<div className="edu-back-white" style={{width: "1200"}}>
{computeTimetype===false?<li className="clearfix startbox mb20">
{computeTimetype===false?<li className="clearfix startbox mb20">
<span className={"startfont"}>
正在执行成绩计算请稍后刷新页面查看结果
温馨提示执行时间因作品数量而异
</span>
</li>:""}
</li>:""}
{JSON.stringify(data) !== "[]" ?
<div>
<div id="graduation_work_list"
style={{
"padding": '20px 20px 10px 20px',
"margin-bottom": "10px"
}}>
{JSON.stringify(data) !== "[]" ?
<div>
<div id="graduation_work_list"
style={{
"padding": '20px 20px 10px 20px',
"margin-bottom": "10px"
}}>
<div className="clearfix">
<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="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>
@ -2613,16 +2617,16 @@ class Listofworksstudentone extends Component {
}
</span>
<div className="fr">
<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>
{teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
<span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
{teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
{computeTimetype===true?
(this.props.isNotMember()===false?
<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩
</div>
:"")
<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩
</div>
:"")
:
(teacherdata&&teacherdata.homework_status[0]=== "未发布"? "":
this.props.isNotMember()===false?
@ -2633,100 +2637,100 @@ class Listofworksstudentone extends Component {
}
</span>}
</div>
</div>
</div>
</div>
</div>
<div className={"justify break_full_word new_li edu-back-white"}
style={{minHeight: "480px"}}>
<style>{`
</div>
<div className={"justify break_full_word new_li edu-back-white"}
style={{minHeight: "480px"}}>
<style>{`
.ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
top: 72%;}
}
`}</style>
<div className="edu-table edu-back-white ">
{data === undefined ? "222222" : <Table
dataSource={data}
columns={columnsstu}
pagination={false}
loading={false}
/>}
</div>
</div>
</div>
<div className="edu-table edu-back-white ">
{data === undefined ? "222222" : <Table
dataSource={data}
columns={columnsstu}
pagination={false}
loading={false}
/>}
</div>
</div>
</div>
:
<div id="forum_list" className="forum_table">
<div className="mh650 edu-back-white">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20"
src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb30">没有数据可以显示</p>
</div>
</div>
</div>
}
:
<div id="forum_list" className="forum_table">
<div className="mh650 edu-back-white">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20"
src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb30">没有数据可以显示</p>
</div>
</div>
</div>
}
</div>
</div>
</div>
:
// 学生能查看别人的
<div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
<DownloadMessageysl
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
</div>
:
// 学生能查看别人的
<div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
<DownloadMessageysl
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
{visibles === true ?
<TraineetraininginformationModal
homeworkid={this.props.match.params.homeworkid}
coursesId={this.props.match.params.coursesId}
userids={this.state.userids}
viewtrainingdata={viewtrainingdata}
game_list={game_list}
visible={visibles}
experience={experience}
boolgalist={boolgalist}
Cancel={() => this.cancelModulationModels()}
/> : ""
}
<div className={"educontent mb20"}>
{visibles === true ?
<TraineetraininginformationModal
homeworkid={this.props.match.params.homeworkid}
coursesId={this.props.match.params.coursesId}
userids={this.state.userids}
viewtrainingdata={viewtrainingdata}
game_list={game_list}
visible={visibles}
experience={experience}
boolgalist={boolgalist}
Cancel={() => this.cancelModulationModels()}
/> : ""
}
<div className={"educontent mb20"}>
<div className="edu-back-white">
<div className="edu-back-white">
{computeTimetype===false?<li className="clearfix startbox mb20">
{computeTimetype===false?<li className="clearfix startbox mb20">
<span className={"startfont"}>
正在执行成绩计算请稍后刷新页面查看结果
温馨提示执行时间因作品数量而异
</span>
</li>:""}
<div className="edu-table edu-back-white ">
{data === undefined ? "" : <Table
style={styletable}
dataSource={data}
columns={columnsstu}
pagination={false}
loading={false}
showHeader={false}
/>}
</div>
{JSON.stringify(datas) !== "[]" ?
<div>
<div id="graduation_work_list" style={{
"padding": '20px 20px 10px 20px',
"margin-bottom": "10px"
}}>
<div className="clearfix">
</li>:""}
<div className="edu-table edu-back-white ">
{data === undefined ? "" : <Table
style={styletable}
dataSource={data}
columns={columnsstu}
pagination={false}
loading={false}
showHeader={false}
/>}
</div>
{JSON.stringify(datas) !== "[]" ?
<div>
<div id="graduation_work_list" style={{
"padding": '20px 20px 10px 20px',
"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}
@ -2739,8 +2743,8 @@ class Listofworksstudentone extends Component {
style={{"color": '#FF6800'}}>{teacherdata.left_time.time}</span>}
</span>
<style>
{`
<style>
{`
.startbox{
height: 48px;
background: rgba(255,104,0,0.1);
@ -2780,95 +2784,96 @@ class Listofworksstudentone extends Component {
cursor: pointer;
}
`}
</style>
<div className="fr">
</style>
<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>
{teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
<span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
{teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
{computeTimetype===true?
(this.props.isNotMember()===false?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩
</div>:""):
teacherdata&&teacherdata.homework_status[0]=== "未发布"? "":
(this.props.isNotMember()===false?<div className={"computeTimes font-13"}>
计算成绩
</div>:"")
计算成绩
</div>:""):
teacherdata&&teacherdata.homework_status[0]=== "未发布"? "":
(this.props.isNotMember()===false?<div className={"computeTimes font-13"}>
计算成绩
</div>:"")
}
</span>}
</div>
{/*因为计算按钮占了和这个位置,和设计沟通学生视角取消这个按钮*/}
{/*<div className="fr edu-menu-panel">*/}
{/*<ul>*/}
{/*<li className="edu-position edu-position-hidebox">*/}
</div>
{/*因为计算按钮占了和这个位置,和设计沟通学生视角取消这个按钮*/}
{/*<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>*/}
{/*{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>*/}
{/*<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>*/}
{/*</li>*/}
{/*</ul>*/}
{/*</div>*/}
{/*</div>*/}
</div>
</div>
</div>
</div>
<div className={"justify break_full_word new_li edu-back-white"}
style={{minHeight: "480px"}}>
<style>{`
<div className={"justify break_full_word new_li edu-back-white"}
style={{minHeight: "480px"}}>
<style>{`
.ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
top: 72%;}
}
`}</style>
<div className="edu-table edu-back-white ">
{datas === undefined ? "" : <Table
dataSource={datas}
columns={columnsstu}
pagination={false}
loading={loadingstate}
/>}
</div>
{
teacherdata && teacherdata.work_count && teacherdata.work_count > limit ?
<div className="edu-txt-center edu-back-white mt30 mb20">
<Pagination showQuickJumper current={page}
onChange={this.paginationonChanges} pageSize={limit}
total={teacherdata.work_count}></Pagination>
<div className="edu-table edu-back-white ">
{datas === undefined ? "" : <Table
dataSource={datas}
columns={columnsstu}
pagination={false}
loading={loadingstate}
/>}
</div>
{
teacherdata && teacherdata.work_count && teacherdata.work_count > limit ?
<div className="edu-txt-center mt30">
<Pagination showQuickJumper current={page}
onChange={this.paginationonChanges} pageSize={limit}
total={teacherdata.work_count}></Pagination>
</div>
: ""
}
</div>
</div>
:
<div id="forum_list" className="forum_table">
<div className="mh650 edu-back-white">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20"
src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb30">没有数据可以显示</p>
</div>
</div>
: ""
}
</div>
</div>
:
<div id="forum_list" className="forum_table">
<div className="mh650 edu-back-white">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20"
src={getImageUrl("images/educoder/nodata.png")}/>
<p className="edu-nodata-p mb30">没有数据可以显示</p>
</div>
</div>
</div>
}
</div>
}
{/*///*/}
{/*///*/}
</div>
</div>
</div>
</div>
</div>
}
</div>
)
)
}

Loading…
Cancel
Save