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

@ -911,8 +911,8 @@ class Listofworksstudentone extends Component {
} }
} }
student=()=>{ student=()=>{
console.log("914"); // console.log("914");
debugger // debugger
this.props.triggerRef(this); this.props.triggerRef(this);
var homeworkid = this.props.match.params.homeworkid; var homeworkid = this.props.match.params.homeworkid;
this.Getalistofworks(homeworkid); this.Getalistofworks(homeworkid);
@ -932,8 +932,8 @@ class Listofworksstudentone extends Component {
// 获取作品列表 // 获取作品列表
Getalistofworks = (homeworkid) => { Getalistofworks = (homeworkid) => {
// console.log("获取作品列表"); // console.log("获取作品列表");
console.log("935"); // console.log("935");
debugger // debugger
let urll = `/homework_commons/${homeworkid}/works_list.json`; let urll = `/homework_commons/${homeworkid}/works_list.json`;
var data = { var data = {
search: "", search: "",
@ -948,9 +948,9 @@ class Listofworksstudentone extends Component {
if(result === undefined){ if(result === undefined){
return return
} }
console.log("951"); // console.log("951");
console.log(result); // console.log(result);
debugger // debugger
if (result.status === 200) { if (result.status === 200) {
this.setState({ this.setState({
teacherdata: result.data, teacherdata: result.data,
@ -1109,11 +1109,11 @@ class Listofworksstudentone extends Component {
}) })
// } // }
var teacherlist = { //分页 // var teacherlist = { //分页
total: teacherdata.student_works.length, //数据总数量 // total: teacherdata.student_works.length, //数据总数量
pageSize: teacherdata.student_works.length, //一页显示几条 // pageSize: teacherdata.student_works.length, //一页显示几条
current: this.state.page, // current: this.state.page,
} // }
styletable = {"display": "block",} styletable = {"display": "block",}
} else { } else {
// console.log("seacthdata设置数据2") // console.log("seacthdata设置数据2")
@ -1231,11 +1231,11 @@ class Listofworksstudentone extends Component {
}) })
// } // }
var teacherlist = { //分页 // var teacherlist = { //分页
total: teacherdata.student_works.length, //数据总数量 // total: teacherdata.student_works.length, //数据总数量
pageSize: teacherdata.student_works.length, //一页显示几条 // pageSize: teacherdata.student_works.length, //一页显示几条
current: this.state.page, // current: this.state.page,
} // }
} else { } else {
// console.log("seacthdata设置数据2") // console.log("seacthdata设置数据2")
var teacherlist = undefined; var teacherlist = undefined;
@ -1404,11 +1404,11 @@ class Listofworksstudentone extends Component {
TablePagination = (e) => { TablePagination = (e) => {
// console.log(e.current); // console.log(e.current);
var teacherlists = { //分页 // var teacherlists = { //分页
total: this.state.student_works.length, //数据总数量 // total: this.state.student_works.length, //数据总数量
pageSize: 10, //一页显示几条 // pageSize: 10, //一页显示几条
current: e.current, // current: e.current,
} // }
this.setState({ this.setState({
page: e.current, page: e.current,
teacherlists: teacherlists teacherlists: teacherlists
@ -1468,7 +1468,7 @@ class Listofworksstudentone extends Component {
// 获取作品列表 // 获取作品列表
Getalistofworkst = (homeworkid) => { Getalistofworkst = (homeworkid) => {
// console.log("获取作品列表");7009 // console.log("获取作品列表");7009
debugger // debugger
let urll = `/homework_commons/${homeworkid}/works_list.json`; let urll = `/homework_commons/${homeworkid}/works_list.json`;
// console.log(homeworkid); // console.log(homeworkid);
@ -1488,7 +1488,7 @@ class Listofworksstudentone extends Component {
limit:20, limit:20,
} }
axios.post(urll, data).then((result) => { axios.post(urll, data).then((result) => {
debugger // debugger
if (result !== undefined) { if (result !== undefined) {
// console.log(url) // console.log(url)
// console.log("作品列表6789077") // console.log("作品列表6789077")
@ -1583,7 +1583,7 @@ class Listofworksstudentone extends Component {
// 设置数据 // 设置数据
seacthdatat = (teacherdata,student_works,work_efficiency,course_group_info) => { seacthdatat = (teacherdata,student_works,work_efficiency,course_group_info) => {
debugger // debugger
let {page, limit} = this.state; let {page, limit} = this.state;
let datalist = []; let datalist = [];
let columns = this.state.columns; let columns = this.state.columns;
@ -1615,11 +1615,11 @@ class Listofworksstudentone extends Component {
} }
var teacherlist = { //分页 // var teacherlist = { //分页
total: student_works.length, //数据总数量 // total: student_works.length, //数据总数量
pageSize: 20, //一页显示几条 // pageSize: 20, //一页显示几条
current: page, // current: page,
} // }
if (work_efficiency === false) { if (work_efficiency === false) {
if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined||course_group_info === null){ 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(this.state.data);
// console.log("841"); // console.log("841");
// console.log(this.state.columns); // console.log(this.state.columns);
// console.log(data);
// console.log("2202");
// console.log(this.props.isAdmin());
return ( return (
this.props.isAdmin === true ? this.props.isAdmin() === true ?
(
<div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}> <div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
{visible === true ? <ModulationModal {visible === true ? <ModulationModal
visible={visible} visible={visible}
@ -2488,7 +2491,7 @@ class Listofworksstudentone extends Component {
</div> </div>
{ {
teacherdata && teacherdata.work_count && teacherdata.work_count > limit ? 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} <Pagination showQuickJumper current={page}
onChange={this.paginationonChanges} pageSize={limit} onChange={this.paginationonChanges} pageSize={limit}
total={teacherdata.work_count}></Pagination> total={teacherdata.work_count}></Pagination>
@ -2498,8 +2501,9 @@ class Listofworksstudentone extends Component {
</div> </div>
</div> </div>
) :( :
<div>
{
teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ? teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ?
// 学生不能查看别人的 // 学生不能查看别人的
<div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}> <div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
@ -2837,7 +2841,7 @@ class Listofworksstudentone extends Component {
</div> </div>
{ {
teacherdata && teacherdata.work_count && teacherdata.work_count > limit ? 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} <Pagination showQuickJumper current={page}
onChange={this.paginationonChanges} pageSize={limit} onChange={this.paginationonChanges} pageSize={limit}
total={teacherdata.work_count}></Pagination> total={teacherdata.work_count}></Pagination>
@ -2868,7 +2872,8 @@ class Listofworksstudentone extends Component {
</div> </div>
</div> </div>
) }
</div>
) )
} }

Loading…
Cancel
Save