|
|
import React, {Component} from "react";
|
|
|
import CoursesListType from '../coursesPublic/CoursesListType';
|
|
|
import {WordsBtn} from 'educoder';
|
|
|
|
|
|
import {
|
|
|
Select,
|
|
|
Input,
|
|
|
Checkbox,
|
|
|
Table,
|
|
|
Radio,
|
|
|
Pagination
|
|
|
} from "antd";
|
|
|
import axios from 'axios';
|
|
|
import '../css/members.css'
|
|
|
import "../common/formCommon.css"
|
|
|
import '../css/Courses.css'
|
|
|
import '../css/busyWork.css'
|
|
|
import '../poll/pollStyle.css'
|
|
|
import moment from 'moment';
|
|
|
import 'moment/locale/zh-cn';
|
|
|
import {getImageUrl, toPath} from 'educoder';
|
|
|
import CheckBoxGroup from "../../page/component/CheckBoxGroup";
|
|
|
|
|
|
const Search = Input.Search;
|
|
|
const RadioGroup = Radio.Group;
|
|
|
const CheckboxGroup = Checkbox.Group;
|
|
|
const {Option} = Select;
|
|
|
|
|
|
//学生老师页面
|
|
|
class Studentshavecompletedthelist extends Component {
|
|
|
// http://localhost:3007/courses/1309/exercises/722/exercises/student_exercise_list?debug=s
|
|
|
constructor(props) {
|
|
|
super(props);
|
|
|
this.state = {
|
|
|
data: [],
|
|
|
datas: [],
|
|
|
page: 1,
|
|
|
limit: 20,
|
|
|
styletable: {
|
|
|
"display": "block"
|
|
|
},
|
|
|
course_groupyslstwodatas: [{id: 0, tu: "未评"}, {id: 1, tu: "已评"}],
|
|
|
course_groupyslsthree: undefined,
|
|
|
teacherlist: undefined,
|
|
|
searchtext: "",
|
|
|
Teacherliststudentlist: undefined,
|
|
|
review: null,
|
|
|
course_groupysls: undefined,
|
|
|
nocomment: false,
|
|
|
course_groupyslstwo: undefined,
|
|
|
commented: false,
|
|
|
commit_status: undefined,
|
|
|
submitted: false,
|
|
|
unsubmitted: false,
|
|
|
exercise_users: undefined,
|
|
|
loadingstate: true,
|
|
|
order: undefined,
|
|
|
current_answer_user: undefined,
|
|
|
course_groups: undefined,
|
|
|
course_groupsdatas: false,
|
|
|
noclassroom: undefined,
|
|
|
current_status: props.current_status,
|
|
|
course_groupyslstwodata: [{id: 0, tu: "未提交"}, {id: 1, tu: "提交"}],
|
|
|
columns: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
dataIndex: 'number',
|
|
|
key: 'number',
|
|
|
align: 'center',
|
|
|
width: "84px",
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center", "width": "84px",}}>{record.number}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width: "110px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center", "width": "110px"}}>{record.name}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '学号',
|
|
|
dataIndex: 'stduynumber',
|
|
|
key: 'stduynumber',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width: "175px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{
|
|
|
"color": '#9A9A9A',
|
|
|
"text-align": "center"
|
|
|
, "width": "175px"
|
|
|
}}>{record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '分班',
|
|
|
key: 'classroom',
|
|
|
dataIndex: 'classroom',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width: "120px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{
|
|
|
"color": '#07111B',
|
|
|
"text-align": "center"
|
|
|
, "width": "120px"
|
|
|
}}>{record.classroom === null ? "--" : record.classroom === "" ? "--" : record.classroom}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '提交状态',
|
|
|
dataIndex: 'submitstate',
|
|
|
key: 'submitstate',
|
|
|
align: 'center',
|
|
|
width: "124px",
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={record.submitstate === "未提交" ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center",
|
|
|
"width": "124px",
|
|
|
} : record.submitstate === "已提交" ? {"color": '#29BD8B', "text-align": "center"} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
"width": "124px",
|
|
|
}}>{record.submitstate}</a>
|
|
|
</span>
|
|
|
)
|
|
|
|
|
|
},
|
|
|
{
|
|
|
title: '提交时间',
|
|
|
dataIndex: 'updatetime',
|
|
|
key: 'updatetime',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width: "236.4px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center", "width": "236.4px",}}>{record.updatetime}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '客观题分',
|
|
|
dataIndex: 'completion',
|
|
|
key: 'completion',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width: "124px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={parseInt(record.completion) > 90 ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center"
|
|
|
, "width": "124px"
|
|
|
} : parseInt(record.completion) <= 90 ? {
|
|
|
"color": '#FF6800',
|
|
|
"text-align": "center"
|
|
|
, "width": "124px"
|
|
|
} : parseInt(record.completion) <= 60 ? {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center"
|
|
|
, "width": "124px"
|
|
|
} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center"
|
|
|
, "width": "124px"
|
|
|
}}>{record.completion}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '主观题得分',
|
|
|
dataIndex: 'levelscore',
|
|
|
key: 'levelscore',
|
|
|
align: 'center',
|
|
|
width: "124px",
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={parseInt(record.levelscore) > 90 ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center"
|
|
|
, "width": "124px"
|
|
|
} : parseInt(record.levelscore) <= 90 ? {
|
|
|
"color": '#FF6800',
|
|
|
"text-align": "center"
|
|
|
, "width": "124px"
|
|
|
} : parseInt(record.levelscore) <= 60 ? {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center"
|
|
|
, "width": "124px"
|
|
|
} : {"color": '#747A7F', "text-align": "center"}}>{record.levelscore}</a>
|
|
|
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '最终成绩',
|
|
|
dataIndex: 'efficiencyscore',
|
|
|
key: 'efficiencyscore',
|
|
|
align: 'center',
|
|
|
width: "124px",
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={parseInt(record.efficiencyscore) > 90 ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center"
|
|
|
, "width": "124px"
|
|
|
} : parseInt(record.efficiencyscore) <= 90 ? {
|
|
|
"color": '#FF6800',
|
|
|
"text-align": "center"
|
|
|
, "width": "124px"
|
|
|
} : parseInt(record.efficiencyscore) <= 60 ? {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center"
|
|
|
, "width": "124px"
|
|
|
}}>{record.efficiencyscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
}
|
|
|
],
|
|
|
columnstwo: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
dataIndex: 'number',
|
|
|
key: 'number',
|
|
|
align: 'center',
|
|
|
width: "84px",
|
|
|
className: "edu-txt-center tabletd",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center", "width": "84px",}}>{record.number}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center tabletd",
|
|
|
width: "110px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center", "width": "110px"}}>{record.name}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '学号',
|
|
|
dataIndex: 'stduynumber',
|
|
|
key: 'stduynumber',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center tabletd",
|
|
|
width: "175px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{
|
|
|
"color": '#9A9A9A',
|
|
|
"text-align": "center"
|
|
|
, "width": "175px"
|
|
|
}}>{record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '分班',
|
|
|
key: 'classroom',
|
|
|
dataIndex: 'classroom',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center tabletd",
|
|
|
width: "120px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{
|
|
|
"color": '#07111B',
|
|
|
"text-align": "center"
|
|
|
, "width": "120px"
|
|
|
}}>{record.classroom === null ? "--" : record.classroom === "" ? "--" : record.classroom}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '提交状态',
|
|
|
dataIndex: 'submitstate',
|
|
|
key: 'submitstate',
|
|
|
align: 'center',
|
|
|
width: "124px",
|
|
|
className: "edu-txt-center tabletd",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={record.submitstate === "未提交" ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center",
|
|
|
"width": "124px",
|
|
|
} : record.submitstate === "已提交" ? {"color": '#29BD8B', "text-align": "center"} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
"width": "124px",
|
|
|
}}>{record.submitstate}</a>
|
|
|
</span>
|
|
|
)
|
|
|
|
|
|
},
|
|
|
{
|
|
|
title: '提交时间',
|
|
|
dataIndex: 'updatetime',
|
|
|
key: 'updatetime',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center tabletd",
|
|
|
width: "236.4px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center", "width": "236.4px",}}>{record.updatetime}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '客观题分',
|
|
|
dataIndex: 'completion',
|
|
|
key: 'completion',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center tabletd",
|
|
|
width: "124px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={parseInt(record.completion) > 90 ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center"
|
|
|
, "width": "124px"
|
|
|
} : parseInt(record.completion) <= 90 ? {
|
|
|
"color": '#FF6800',
|
|
|
"text-align": "center"
|
|
|
, "width": "124px"
|
|
|
} : parseInt(record.completion) <= 60 ? {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center"
|
|
|
, "width": "124px"
|
|
|
} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center"
|
|
|
, "width": "124px"
|
|
|
}}>{record.completion}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '主观题得分',
|
|
|
dataIndex: 'levelscore',
|
|
|
key: 'levelscore',
|
|
|
align: 'center',
|
|
|
width: "124px",
|
|
|
className: "edu-txt-center tabletd",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={parseInt(record.levelscore) > 90 ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center"
|
|
|
, "width": "124px"
|
|
|
} : parseInt(record.levelscore) <= 90 ? {
|
|
|
"color": '#FF6800',
|
|
|
"text-align": "center"
|
|
|
, "width": "124px"
|
|
|
} : parseInt(record.levelscore) <= 60 ? {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center"
|
|
|
, "width": "124px"
|
|
|
} : {"color": '#747A7F', "text-align": "center"}}>{record.levelscore}</a>
|
|
|
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '最终成绩',
|
|
|
dataIndex: 'efficiencyscore',
|
|
|
key: 'efficiencyscore',
|
|
|
align: 'center',
|
|
|
width: "124px",
|
|
|
className: "edu-txt-center tabletd",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={parseInt(record.efficiencyscore) > 90 ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center"
|
|
|
, "width": "124px"
|
|
|
} : parseInt(record.efficiencyscore) <= 90 ? {
|
|
|
"color": '#FF6800',
|
|
|
"text-align": "center"
|
|
|
, "width": "124px"
|
|
|
} : parseInt(record.efficiencyscore) <= 60 ? {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center"
|
|
|
, "width": "124px"
|
|
|
}}>{record.efficiencyscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
}
|
|
|
],
|
|
|
columnss: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
dataIndex: 'number',
|
|
|
key: 'number',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.number}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.name}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '学号',
|
|
|
dataIndex: 'stduynumber',
|
|
|
key: 'stduynumber',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{
|
|
|
"color": '#9A9A9A',
|
|
|
"text-align": "center"
|
|
|
}}>{record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '分班',
|
|
|
key: 'classroom',
|
|
|
dataIndex: 'classroom',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{
|
|
|
"color": '#07111B',
|
|
|
"text-align": "center"
|
|
|
}}>{record.classroom === null ? "--" : record.classroom === "" ? "--" : record.classroom}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '提交状态',
|
|
|
dataIndex: 'submitstate',
|
|
|
key: 'submitstate',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={record.submitstate === "未提交" ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center"
|
|
|
} : record.submitstate === "已提交" ? {"color": '#29BD8B', "text-align": "center"} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center"
|
|
|
}}>{record.submitstate}</a>
|
|
|
</span>
|
|
|
)
|
|
|
|
|
|
},
|
|
|
{
|
|
|
title: '提交时间',
|
|
|
dataIndex: 'updatetime',
|
|
|
key: 'updatetime',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.updatetime}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '客观题分',
|
|
|
dataIndex: 'completion',
|
|
|
key: 'completion',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={parseInt(record.completion) > 90 ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center",
|
|
|
} : parseInt(record.completion) <= 90 ? {
|
|
|
"color": '#FF6800',
|
|
|
"text-align": "center",
|
|
|
} : parseInt(record.completion) <= 60 ? {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
}}>{record.completion}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '主观题得分',
|
|
|
dataIndex: 'levelscore',
|
|
|
key: 'levelscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={parseInt(record.levelscore) > 90 ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center",
|
|
|
} : parseInt(record.levelscore) <= 90 ? {
|
|
|
"color": '#FF6800',
|
|
|
"text-align": "center",
|
|
|
} : parseInt(record.levelscore) <= 60 ? {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
} : {"color": '#747A7F', "text-align": "center"}}>{record.levelscore}</a>
|
|
|
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '最终成绩',
|
|
|
dataIndex: 'efficiencyscore',
|
|
|
key: 'efficiencyscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={parseInt(record.efficiencyscore) > 90 ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center",
|
|
|
} : parseInt(record.efficiencyscore) <= 90 ? {
|
|
|
"color": '#FF6800',
|
|
|
"text-align": "center",
|
|
|
} : parseInt(record.efficiencyscore) <= 60 ? {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
}}>{record.efficiencyscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '查看',
|
|
|
dataIndex: 'operating',
|
|
|
key: 'operating',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"text-align": "center"}} className="color-blue"
|
|
|
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.operating}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
],
|
|
|
vaiew: false,
|
|
|
unlimited: 0,
|
|
|
unlimiteds: 0,
|
|
|
unlimitedtwo: 0,
|
|
|
checkedValues: [],
|
|
|
checkedValuesineinfo: [],
|
|
|
Evaluationarray: [{id: 1, value: "未评"}, {id: 2, value: "已评"}],
|
|
|
columnsys: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
dataIndex: 'number',
|
|
|
key: 'number',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'76px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.number}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'149px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.name}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '学号',
|
|
|
dataIndex: 'stduynumber',
|
|
|
key: 'stduynumber',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'159px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.stduynumber}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '分班',
|
|
|
key: 'classroom',
|
|
|
dataIndex: 'classroom',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '提交状态',
|
|
|
dataIndex: 'submitstate',
|
|
|
key: 'submitstate',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'112px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={record.submitstate === "未提交" ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center"
|
|
|
} : record.submitstate === "已提交" ? {"color": '#29BD8B', "text-align": "center"} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center"
|
|
|
}}>{record.submitstate}</a>
|
|
|
</span>
|
|
|
)
|
|
|
|
|
|
},
|
|
|
{
|
|
|
title: '提交时间',
|
|
|
dataIndex: 'updatetime',
|
|
|
key: 'updatetime',
|
|
|
align: 'center',
|
|
|
width:'194px',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.updatetime}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '客观题分',
|
|
|
dataIndex: 'completion',
|
|
|
key: 'completion',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'112px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.completion}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '主观题得分',
|
|
|
dataIndex: 'levelscore',
|
|
|
key: 'levelscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'130px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#FF6800', "text-align": "center"}}>{record.levelscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '最终成绩',
|
|
|
dataIndex: 'efficiencyscore',
|
|
|
key: 'efficiencyscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'112px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={parseInt(record.efficiencyscore) > 90 ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center",
|
|
|
} : parseInt(record.efficiencyscore) <= 90 ? {
|
|
|
"color": '#FF6800',
|
|
|
"text-align": "center",
|
|
|
} : parseInt(record.efficiencyscore) <= 60 ? {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
}}>{record.efficiencyscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '操作',
|
|
|
dataIndex: 'finalscore',
|
|
|
key: 'finalscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'78px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"text-align": "center"}} className="color-blue"
|
|
|
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
]
|
|
|
}
|
|
|
// console.log("Studentshavecompletedthelist");
|
|
|
// console.log(props.current_status);
|
|
|
}
|
|
|
|
|
|
paginationonChange = (pageNumber) => {
|
|
|
// console.log('Page: ');
|
|
|
if(this.state.loadingstate=== false){
|
|
|
this.setState({
|
|
|
page: pageNumber,
|
|
|
loadingstate:true,
|
|
|
})
|
|
|
|
|
|
}else{
|
|
|
this.setState({
|
|
|
page: pageNumber,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
this.Searchdatasys(this.state.order, this.state.commit_status, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, pageNumber, 20);
|
|
|
|
|
|
}
|
|
|
paginationonChanges = (pageNumber) => {
|
|
|
// console.log('Page: ');
|
|
|
if(this.state.loadingstate=== false) {
|
|
|
this.setState({
|
|
|
page: pageNumber,
|
|
|
loadingstate:true,
|
|
|
})
|
|
|
|
|
|
}else{
|
|
|
this.setState({
|
|
|
page: pageNumber,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
this.Searchdata(this.state.order, null, null, null, null, pageNumber, this.state.limit)
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
componentDidMount() {
|
|
|
// if(this.props.isAdmin() === true){
|
|
|
// this.Teacherliststudentlistsy();
|
|
|
// console.log("1111111111111111");
|
|
|
// console.log(this.props.isAdmin());
|
|
|
// }else {
|
|
|
this.Teacherliststudentlist();
|
|
|
// console.log("2222222222222");
|
|
|
// console.log(this.props.isAdmin());
|
|
|
// }
|
|
|
}
|
|
|
|
|
|
componentWillReceiveProps = (nextProps) => {
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
//试卷列表
|
|
|
Teacherliststudentlist = () => {
|
|
|
// console.log("Teacherliststudentlist"); // 764
|
|
|
var thiss = this;
|
|
|
var exercise_id = this.props.match.params.Id;
|
|
|
// console.log(731); // 764 935
|
|
|
var url = `/exercises/${exercise_id}/exercise_lists.json`;
|
|
|
axios.get((url), {
|
|
|
params: {
|
|
|
order: "end_at",
|
|
|
commit_status: null,
|
|
|
review: null,
|
|
|
exercise_group_id: null,
|
|
|
search: "",
|
|
|
page: null,
|
|
|
limit: null,
|
|
|
}
|
|
|
}).then((response) => {
|
|
|
//学生
|
|
|
if (response.data.exercise_types.user_permission === 1) {
|
|
|
this.setState({
|
|
|
Teacherliststudentlist: response.data,
|
|
|
review: response.data.review,
|
|
|
commit_status: response.data.commit_status,
|
|
|
exercise_users: response.data.exercise_users,
|
|
|
current_answer_user: response.data.current_answer_user,
|
|
|
course_groups: response.data.course_groups,
|
|
|
})
|
|
|
if (response.data.current_answer_user === undefined || response.data.current_answer_user === null) {
|
|
|
// 学生未截止
|
|
|
|
|
|
this.Generatenewdatas(response.data.exercise_users);
|
|
|
if (response.data.exercise_types.subjective === 0) {
|
|
|
if (this.state.noclassroom === undefined || this.state.noclassroom === "" || this.state.noclassroom === null) {
|
|
|
this.setState({
|
|
|
columnss: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
dataIndex: 'number',
|
|
|
key: 'number',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{
|
|
|
"color": '#07111B',
|
|
|
"text-align": "center",
|
|
|
}}>{record.number}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.name}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '学号',
|
|
|
dataIndex: 'stduynumber',
|
|
|
key: 'stduynumber',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{
|
|
|
"color": '#9A9A9A',
|
|
|
"text-align": "center"
|
|
|
}}>{record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '提交状态',
|
|
|
dataIndex: 'submitstate',
|
|
|
key: 'submitstate',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={record.submitstate === "未提交" ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center"
|
|
|
} : record.submitstate === "已提交" ? {"color": '#29BD8B', "text-align": "center"} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center"
|
|
|
}}>{record.submitstate}</a>
|
|
|
</span>
|
|
|
)
|
|
|
|
|
|
},
|
|
|
{
|
|
|
title: '提交时间',
|
|
|
dataIndex: 'updatetime',
|
|
|
key: 'updatetime',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.updatetime}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '最终成绩',
|
|
|
dataIndex: 'efficiencyscore',
|
|
|
key: 'efficiencyscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{
|
|
|
"color": '#FF6800',
|
|
|
"text-align": "center",
|
|
|
}}>{record.efficiencyscore === null ? "--" : record.efficiencyscore === "" ? "--" : record.efficiencyscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '操作',
|
|
|
dataIndex: 'operating',
|
|
|
key: 'operating',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
{
|
|
|
this.props.current_status === 1 ?
|
|
|
<a style={{"text-align": "center"}} className="color-blue"
|
|
|
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>查看</a>
|
|
|
:
|
|
|
<a style={{"text-align": "center"}}
|
|
|
className="color-blue">{"--"}</a>
|
|
|
}
|
|
|
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
]
|
|
|
})
|
|
|
} else {
|
|
|
this.setState({
|
|
|
columnss: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
dataIndex: 'number',
|
|
|
key: 'number',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{
|
|
|
"color": '#07111B',
|
|
|
"text-align": "center",
|
|
|
}}>{record.number}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.name}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '学号',
|
|
|
dataIndex: 'stduynumber',
|
|
|
key: 'stduynumber',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{
|
|
|
"color": '#9A9A9A',
|
|
|
"text-align": "center"
|
|
|
}}>{record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '分班',
|
|
|
key: 'classroom',
|
|
|
dataIndex: 'classroom',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{
|
|
|
"color": '#07111B',
|
|
|
"text-align": "center"
|
|
|
}}>{record.classroom === null ? "--" : record.classroom === "" ? "--" : record.classroom} </a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '提交状态',
|
|
|
dataIndex: 'submitstate',
|
|
|
key: 'submitstate',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={record.submitstate === "未提交" ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center"
|
|
|
} : record.submitstate === "已提交" ? {"color": '#29BD8B', "text-align": "center"} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center"
|
|
|
}}>{record.submitstate}</a>
|
|
|
</span>
|
|
|
)
|
|
|
|
|
|
},
|
|
|
{
|
|
|
title: '提交时间',
|
|
|
dataIndex: 'updatetime',
|
|
|
key: 'updatetime',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.updatetime}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '最终成绩',
|
|
|
dataIndex: 'efficiencyscore',
|
|
|
key: 'efficiencyscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{
|
|
|
"color": '#FF6800',
|
|
|
"text-align": "center",
|
|
|
}}>{record.efficiencyscore === null ? "--" : record.efficiencyscore === "" ? "--" : record.efficiencyscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '操作',
|
|
|
dataIndex: 'operating',
|
|
|
key: 'operating',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
{
|
|
|
this.props.current_status === 1 ?
|
|
|
<a style={{"text-align": "center"}} className="color-blue"
|
|
|
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>查看</a>
|
|
|
:
|
|
|
<a style={{"text-align": "center"}}
|
|
|
className="color-blue">{"--"}</a>
|
|
|
}
|
|
|
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
]
|
|
|
})
|
|
|
}
|
|
|
|
|
|
}
|
|
|
} else {
|
|
|
//学生已截止
|
|
|
if (response.data.exercise_types.subjective === 0) {
|
|
|
if(this.state.loadingstate=== false){
|
|
|
thiss.setState({
|
|
|
columns: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
dataIndex: 'number',
|
|
|
key: 'number',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center ",
|
|
|
width: "84px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center", "width": "84px"}}>{record.number}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
align: 'center',
|
|
|
width: "110px",
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center", "width": "110px",}}>{record.name}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '学号',
|
|
|
dataIndex: 'stduynumber',
|
|
|
key: 'stduynumber',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width: "175px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center", "width": "175px"}}> {record.stduynumber}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '分班',
|
|
|
key: 'classroom',
|
|
|
dataIndex: 'classroom',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width: "120px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center", "width": "120px"}}>{record.classroom===""?"--":record.classroom===undefined?"--":record.classroom}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '提交状态',
|
|
|
dataIndex: 'submitstate',
|
|
|
key: 'submitstate',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width: "175px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={record.submitstate === "未提交" ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center",
|
|
|
"width": "124px",
|
|
|
} : record.submitstate === "已提交" ? {"color": '#29BD8B', "text-align": "center", "width": "124px",} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
"width": "124px",
|
|
|
}}>{record.submitstate}</a>
|
|
|
</span>
|
|
|
)
|
|
|
|
|
|
},
|
|
|
{
|
|
|
title: '提交时间',
|
|
|
dataIndex: 'updatetime',
|
|
|
key: 'updatetime',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width: "236.4px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center", "width": "236.4px",}}>{record.updatetime}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '最终成绩',
|
|
|
dataIndex: 'efficiencyscore',
|
|
|
key: 'efficiencyscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width: "124px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#FF6800', "text-align": "center", "width": "124px",}}>{record.efficiencyscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
}
|
|
|
],
|
|
|
columnstwo: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
dataIndex: 'number',
|
|
|
key: 'number',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center tabletd",
|
|
|
width: "84px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center", "width": "84px"}}>{record.number}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
align: 'center',
|
|
|
width: "110px",
|
|
|
className: "edu-txt-center tabletd",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center", "width": "110px",}}>{record.name}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '学号',
|
|
|
dataIndex: 'stduynumber',
|
|
|
key: 'stduynumber',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center tabletd",
|
|
|
width: "175px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center", "width": "175px"}}> {record.stduynumber}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '分班',
|
|
|
key: 'classroom',
|
|
|
dataIndex: 'classroom',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center tabletd",
|
|
|
width: "120px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center", "width": "120px"}}>{record.classroom}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '提交状态',
|
|
|
dataIndex: 'submitstate',
|
|
|
key: 'submitstate',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center tabletd",
|
|
|
width: "175px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={record.submitstate === "未提交" ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center",
|
|
|
"width": "124px",
|
|
|
} : record.submitstate === "已提交" ? {"color": '#29BD8B', "text-align": "center", "width": "124px",} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
"width": "124px",
|
|
|
}}>{record.submitstate}</a>
|
|
|
</span>
|
|
|
)
|
|
|
|
|
|
},
|
|
|
{
|
|
|
title: '提交时间',
|
|
|
dataIndex: 'updatetime',
|
|
|
key: 'updatetime',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center tabletd",
|
|
|
width: "236.4px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center", "width": "236.4px",}}>{record.updatetime}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '最终成绩',
|
|
|
dataIndex: 'efficiencyscore',
|
|
|
key: 'efficiencyscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center tabletd",
|
|
|
width: "124px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#FF6800', "text-align": "center", "width": "124px",}}>{record.efficiencyscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
}
|
|
|
],
|
|
|
loadingstate:true,
|
|
|
})
|
|
|
}else{
|
|
|
thiss.setState({
|
|
|
columns: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
dataIndex: 'number',
|
|
|
key: 'number',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center ",
|
|
|
width: "84px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center", "width": "84px"}}>{record.number}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
align: 'center',
|
|
|
width: "110px",
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center", "width": "110px",}}>{record.name}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '学号',
|
|
|
dataIndex: 'stduynumber',
|
|
|
key: 'stduynumber',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width: "175px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center", "width": "175px"}}> {record.stduynumber}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '分班',
|
|
|
key: 'classroom',
|
|
|
dataIndex: 'classroom',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width: "120px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center", "width": "120px"}}>{record.classroom===""?"--":record.classroom===undefined?"--":record.classroom}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '提交状态',
|
|
|
dataIndex: 'submitstate',
|
|
|
key: 'submitstate',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width: "175px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={record.submitstate === "未提交" ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center",
|
|
|
"width": "124px",
|
|
|
} : record.submitstate === "已提交" ? {"color": '#29BD8B', "text-align": "center", "width": "124px",} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
"width": "124px",
|
|
|
}}>{record.submitstate}</a>
|
|
|
</span>
|
|
|
)
|
|
|
|
|
|
},
|
|
|
{
|
|
|
title: '提交时间',
|
|
|
dataIndex: 'updatetime',
|
|
|
key: 'updatetime',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width: "236.4px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center", "width": "236.4px",}}>{record.updatetime}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '最终成绩',
|
|
|
dataIndex: 'efficiencyscore',
|
|
|
key: 'efficiencyscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width: "124px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#FF6800', "text-align": "center", "width": "124px",}}>{record.efficiencyscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
}
|
|
|
],
|
|
|
columnstwo: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
dataIndex: 'number',
|
|
|
key: 'number',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center tabletd",
|
|
|
width: "84px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center", "width": "84px"}}>{record.number}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
align: 'center',
|
|
|
width: "110px",
|
|
|
className: "edu-txt-center tabletd",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center", "width": "110px",}}>{record.name}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '学号',
|
|
|
dataIndex: 'stduynumber',
|
|
|
key: 'stduynumber',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center tabletd",
|
|
|
width: "175px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center", "width": "175px"}}> {record.stduynumber}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '分班',
|
|
|
key: 'classroom',
|
|
|
dataIndex: 'classroom',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center tabletd",
|
|
|
width: "120px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center", "width": "120px"}}>{record.classroom}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '提交状态',
|
|
|
dataIndex: 'submitstate',
|
|
|
key: 'submitstate',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center tabletd",
|
|
|
width: "175px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={record.submitstate === "未提交" ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center",
|
|
|
"width": "124px",
|
|
|
} : record.submitstate === "已提交" ? {"color": '#29BD8B', "text-align": "center", "width": "124px",} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
"width": "124px",
|
|
|
}}>{record.submitstate}</a>
|
|
|
</span>
|
|
|
)
|
|
|
|
|
|
},
|
|
|
{
|
|
|
title: '提交时间',
|
|
|
dataIndex: 'updatetime',
|
|
|
key: 'updatetime',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center tabletd",
|
|
|
width: "236.4px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center", "width": "236.4px",}}>{record.updatetime}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '最终成绩',
|
|
|
dataIndex: 'efficiencyscore',
|
|
|
key: 'efficiencyscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center tabletd",
|
|
|
width: "124px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#FF6800', "text-align": "center", "width": "124px",}}>{record.efficiencyscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
}
|
|
|
],
|
|
|
})
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
thiss.Generatenewdata(response.data.exercise_users, response.data.current_answer_user);
|
|
|
}
|
|
|
}
|
|
|
//老师
|
|
|
else if (response.data.exercise_types.user_permission === 0) {
|
|
|
// console.log(response.data.exercise_users)
|
|
|
// console.log(response)
|
|
|
|
|
|
if(thiss.state.loadingstate===false){
|
|
|
thiss.setState({
|
|
|
loadingstate:true,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
thiss.Generatenewdatasy(response.data.exercise_users, response);
|
|
|
}
|
|
|
}).catch((error) => {
|
|
|
console.log(error)
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
Generatenewdata(exercise_users, current_answer_user) {
|
|
|
let {page,limit} = this.state;
|
|
|
let datalist = [];
|
|
|
let datalisttwo = [];
|
|
|
var teacherlist = undefined;
|
|
|
// console.log("开始数据了");
|
|
|
if (exercise_users !== undefined) {
|
|
|
// console.log("开始打印数据了");
|
|
|
for (var i = 0; i < exercise_users.length; i++) {
|
|
|
if (exercise_users[i].commit_status === 1) {
|
|
|
datalist.push({
|
|
|
myid: exercise_users[i].login,
|
|
|
user_group_id: exercise_users[i].user_group_id,
|
|
|
number:(parseInt(page)-1)*parseInt(limit)+(i+1),
|
|
|
name: exercise_users[i].user_name,
|
|
|
stduynumber: exercise_users[i].student_id === undefined ? "--" : exercise_users[i].student_id === null ? "--" : exercise_users[i].student_id === "" ? "--" : exercise_users[i].student_id,
|
|
|
classroom: exercise_users[i].user_group_name,
|
|
|
submitstate: exercise_users[i].commit_status === 1 ? "已提交" : "未提交",
|
|
|
updatetime: moment(exercise_users[i].end_at).format('YYYY-MM-DD HH:mm') === "Invalid date" ? "--" : moment(exercise_users[i].end_at).format('YYYY-MM-DD HH:mm'),
|
|
|
completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
|
|
|
levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
|
|
|
efficiencyscore: exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score,
|
|
|
operating: "评阅"
|
|
|
})
|
|
|
} else {
|
|
|
datalist.push({
|
|
|
myid: exercise_users[i].login,
|
|
|
user_group_id: exercise_users[i].user_group_id,
|
|
|
number: (parseInt(page)-1)*parseInt(limit)+(i+1),
|
|
|
name: exercise_users[i].user_name,
|
|
|
stduynumber: exercise_users[i].student_id === undefined ? "--" : exercise_users[i].student_id === null ? "--" : exercise_users[i].student_id === "" ? "--" : exercise_users[i].student_id,
|
|
|
classroom: exercise_users[i].user_group_name,
|
|
|
submitstate: exercise_users[i].commit_status === 1 ? "已提交" : "未提交",
|
|
|
updatetime: moment(exercise_users[i].end_at).format('YYYY-MM-DD HH:mm') === "Invalid date" ? "--" : moment(exercise_users[i].end_at).format('YYYY-MM-DD HH:mm'),
|
|
|
completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
|
|
|
levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
|
|
|
efficiencyscore: exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score,
|
|
|
operating: "--"
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
teacherlist = { //分页
|
|
|
total: exercise_users.length, //数据总数量
|
|
|
pageSize: 20, //一页显示几条
|
|
|
current: this.state.page,
|
|
|
}
|
|
|
}
|
|
|
if (current_answer_user !== undefined) {
|
|
|
datalisttwo.push({
|
|
|
myid: current_answer_user.login,
|
|
|
student_id: current_answer_user.student_id,
|
|
|
user_group_id: current_answer_user.user_group_id,
|
|
|
number: 1,
|
|
|
name: current_answer_user.user_name,
|
|
|
classroom: current_answer_user.user_group_name,
|
|
|
stduynumber: current_answer_user.student_id === undefined ? "--" : current_answer_user.student_id === null ? "--" : current_answer_user.student_id === "" ? "--" : current_answer_user.student_id,
|
|
|
submitstate: current_answer_user.commit_status === 1 ? "已提交" : "未提交",
|
|
|
updatetime: moment(current_answer_user.end_at).format('YYYY-MM-DD HH:mm') === "Invalid date" ? "--" : moment(current_answer_user.end_at).format('YYYY-MM-DD HH:mm'),
|
|
|
efficiencyscore: current_answer_user.score === undefined ? "--" : current_answer_user.score === null ? "--" : current_answer_user.score === "" ? "--" : current_answer_user.score,
|
|
|
review_status: current_answer_user.review_status,
|
|
|
completion: current_answer_user.objective_score === undefined ? "--" : current_answer_user.objective_score === null ? "--" : current_answer_user.objective_score === "" ? "--" : current_answer_user.objective_score,
|
|
|
levelscore: current_answer_user.subjective_score === undefined ? "--" : current_answer_user.subjective_score === null ? "--" : current_answer_user.subjective_score === "" ? "--" : current_answer_user.subjective_score,
|
|
|
})
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
data: datalisttwo,
|
|
|
datas: datalist,
|
|
|
teacherlist: teacherlist,
|
|
|
loadingstate:false,
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
Generatenewdatas(exercise_users) {
|
|
|
let{page,limit} = this.state;
|
|
|
let datalist = [];
|
|
|
var teacherlist = undefined;
|
|
|
var noclassroom = undefined;
|
|
|
// console.log("开始数据了");
|
|
|
if (exercise_users !== undefined) {
|
|
|
// console.log("开始打印数据了");
|
|
|
for (var i = 0; i < exercise_users.length; i++) {
|
|
|
datalist.push({
|
|
|
myid: exercise_users[i].login,
|
|
|
user_group_id: exercise_users[i].user_group_id,
|
|
|
number:(parseInt(page)-1)*parseInt(limit)+(i+1),
|
|
|
name: exercise_users[i].user_name,
|
|
|
stduynumber: exercise_users[i].student_id,
|
|
|
classroom: exercise_users[i].user_group_name,
|
|
|
submitstate: exercise_users[i].commit_status === 1 ? "已提交" : "未提交",
|
|
|
updatetime: moment(exercise_users[i].end_at).format('YYYY-MM-DD HH:mm') === "Invalid date" ? "--" : moment(exercise_users[i].end_at).format('YYYY-MM-DD HH:mm'),
|
|
|
completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
|
|
|
levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
|
|
|
efficiencyscore: exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score,
|
|
|
operating: "查看"
|
|
|
})
|
|
|
noclassroom = exercise_users[i].user_group_name;
|
|
|
}
|
|
|
teacherlist = { //分页
|
|
|
total: exercise_users.length, //数据总数量
|
|
|
pageSize: 20, //一页显示几条
|
|
|
current: this.state.page,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
this.setState({
|
|
|
datas: datalist,
|
|
|
teacherlist: teacherlist,
|
|
|
noclassroom: noclassroom,
|
|
|
loadingstate:false,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
TablePagination = (e) => {
|
|
|
// console.log(e.current);
|
|
|
var teacherlist = { //分页
|
|
|
total: this.state.exercise_users.length, //数据总数量
|
|
|
pageSize: 20, //一页显示几条
|
|
|
current: e.current,
|
|
|
}
|
|
|
this.setState({
|
|
|
page: e.current,
|
|
|
teacherlist: teacherlist
|
|
|
})
|
|
|
|
|
|
}
|
|
|
TablePaginations = (e) => {
|
|
|
// console.log(e.current);
|
|
|
var teacherlists = { //分页
|
|
|
total: this.state.exercise_users, //数据总数量
|
|
|
pageSize: 10, //一页显示几条
|
|
|
current: e.current,
|
|
|
}
|
|
|
this.setState({
|
|
|
page: e.current,
|
|
|
teacherlist: teacherlists
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
//排序
|
|
|
funorder = (e) => {
|
|
|
if (e === "end_at") {
|
|
|
// 时间
|
|
|
// 时间排序是从小到大
|
|
|
if(this.state.loadingstate===true){
|
|
|
this.setState({
|
|
|
order: "end_at",
|
|
|
})
|
|
|
}else{
|
|
|
this.setState({
|
|
|
order: "end_at",
|
|
|
loadingstate:true,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
this.Searchdata(e, null, null, null, null, this.state.page, this.state.limit)
|
|
|
}
|
|
|
|
|
|
if (e === "score") {
|
|
|
// 成绩
|
|
|
//成绩排序是从大到小
|
|
|
if(this.state.loadingstate===true) {
|
|
|
this.setState({
|
|
|
order: "score",
|
|
|
})
|
|
|
}else{
|
|
|
this.setState({
|
|
|
order: "score",
|
|
|
loadingstate:true,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
this.Searchdata(e, null, null, null, null, this.state.page, this.state.limit)
|
|
|
}
|
|
|
|
|
|
if (e === "student_id") {
|
|
|
//学号
|
|
|
//学号排序是从大到小
|
|
|
if(this.state.loadingstate===true) {
|
|
|
this.setState({
|
|
|
order: "student_id",
|
|
|
})
|
|
|
}else{
|
|
|
this.setState({
|
|
|
order: "student_id",
|
|
|
loadingstate:true
|
|
|
})
|
|
|
}
|
|
|
|
|
|
this.Searchdata(e, null, null, null, null, this.state.page, this.state.limit)
|
|
|
}
|
|
|
}
|
|
|
Searchdata = (order, commit_status, review, exercise_group_id, search, page, limit) => {
|
|
|
var exercise_id = this.props.match.params.Id;
|
|
|
// console.log(731); // 764 935
|
|
|
var url = `/exercises/${exercise_id}/exercise_lists.json`;
|
|
|
var params = {
|
|
|
order: order,
|
|
|
commit_status: null,
|
|
|
review: null,
|
|
|
exercise_group_id: null,
|
|
|
search: "",
|
|
|
page: page,
|
|
|
limit: limit,
|
|
|
}
|
|
|
axios.get(url, {
|
|
|
params: params
|
|
|
}).then((response) => {
|
|
|
// console.log(JSON.stringify(response));
|
|
|
this.setState({
|
|
|
Teacherliststudentlist: response.data,
|
|
|
review: response.data.review,
|
|
|
commit_status: response.data.commit_status,
|
|
|
exercise_users: response.data.exercise_users,
|
|
|
current_answer_user: response.data.current_answer_user,
|
|
|
})
|
|
|
if (response.data.exercise_types.subjective === 0) {
|
|
|
|
|
|
this.setState({
|
|
|
columns: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
dataIndex: 'number',
|
|
|
key: 'number',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center ",
|
|
|
width: "84px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center", "width": "84px",}}>{record.number}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width: "110px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center", "width": "110px",}}>{record.name}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '学号',
|
|
|
dataIndex: 'stduynumber',
|
|
|
key: 'stduynumber',
|
|
|
align: 'center',
|
|
|
width: "175px",
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center", "width": "175px",}}>{record.stduynumber}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '分班',
|
|
|
key: 'classroom',
|
|
|
dataIndex: 'classroom',
|
|
|
align: 'center',
|
|
|
width: "120px",
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center", "width": "120px",}}>{record.classroom===""?"--":record.classroom===undefined?"--":record.classroom}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '提交状态',
|
|
|
dataIndex: 'submitstate',
|
|
|
key: 'submitstate',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width: "124px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={record.submitstate === "未提交" ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center",
|
|
|
"width": "124px",
|
|
|
} : record.submitstate === "已提交" ? {"color": '#29BD8B', "text-align": "center", "width": "124px",} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
"width": "124px",
|
|
|
}}>{record.submitstate}</a>
|
|
|
</span>
|
|
|
)
|
|
|
|
|
|
},
|
|
|
{
|
|
|
title: '提交时间',
|
|
|
dataIndex: 'updatetime',
|
|
|
key: 'updatetime',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width: "236px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center", "width": "236px",}}>{record.updatetime}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '最终成绩',
|
|
|
dataIndex: 'efficiencyscore',
|
|
|
key: 'efficiencyscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width: "124px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#FF6800', "text-align": "center", "width": "124px"}}>{record.efficiencyscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
}
|
|
|
],
|
|
|
columnstwo: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
dataIndex: 'number',
|
|
|
key: 'number',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center tabletd",
|
|
|
width: "84px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center", "width": "84px",}}>{record.number}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center tabletd",
|
|
|
width: "110px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center", "width": "110px",}}>{record.name}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '学号',
|
|
|
dataIndex: 'stduynumber',
|
|
|
key: 'stduynumber',
|
|
|
align: 'center',
|
|
|
width: "175px",
|
|
|
className: "edu-txt-center tabletd",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center", "width": "175px",}}>{record.stduynumber}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '分班',
|
|
|
key: 'classroom',
|
|
|
dataIndex: 'classroom',
|
|
|
align: 'center',
|
|
|
width: "120px",
|
|
|
className: "edu-txt-center tabletd",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center", "width": "120px",}}>{record.classroom}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '提交状态',
|
|
|
dataIndex: 'submitstate',
|
|
|
key: 'submitstate',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center tabletd",
|
|
|
width: "124px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={record.submitstate === "未提交" ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center",
|
|
|
"width": "124px",
|
|
|
} : record.submitstate === "已提交" ? {"color": '#29BD8B', "text-align": "center", "width": "124px",} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
"width": "124px",
|
|
|
}}>{record.submitstate}</a>
|
|
|
</span>
|
|
|
)
|
|
|
|
|
|
},
|
|
|
{
|
|
|
title: '提交时间',
|
|
|
dataIndex: 'updatetime',
|
|
|
key: 'updatetime',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center tabletd",
|
|
|
width: "236px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center", "width": "236px",}}>{record.updatetime}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '最终成绩',
|
|
|
dataIndex: 'efficiencyscore',
|
|
|
key: 'efficiencyscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center tabletd",
|
|
|
width: "124px",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#FF6800', "text-align": "center", "width": "124px"}}>{record.efficiencyscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
}
|
|
|
],
|
|
|
loadingstate:false,
|
|
|
})
|
|
|
}
|
|
|
this.Generatenewdata(response.data.exercise_users, response.data.current_answer_user);
|
|
|
}).catch((error) => {
|
|
|
console.log(error)
|
|
|
this.setState({
|
|
|
loadingstate:false,
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
|
|
|
//////老师页面调用的
|
|
|
|
|
|
Generatenewdatasy(exercise_users, response) {
|
|
|
let{page,limit} = this.state;
|
|
|
var thiss = this;
|
|
|
let datalist = [];
|
|
|
var indexi = 0;
|
|
|
var teacherlist = undefined;
|
|
|
// console.log("开始数据了");
|
|
|
if (exercise_users !== undefined) {
|
|
|
// console.log("开始打印数据了");
|
|
|
for (var i = 0; i < exercise_users.length; i++) {
|
|
|
if (exercise_users[i].commit_status === 1) {
|
|
|
datalist.push({
|
|
|
myid: exercise_users[i].login,
|
|
|
user_group_id: exercise_users[i].user_group_id,
|
|
|
number: (parseInt(page)-1)*parseInt(limit)+(i+1),
|
|
|
name: exercise_users[i].user_name,
|
|
|
stduynumber: exercise_users[i].student_id === undefined ? "--" : exercise_users[i].student_id === null ? "--" : exercise_users[i].student_id === "" ? "--" : exercise_users[i].student_id,
|
|
|
classroom: exercise_users[i].user_group_name,
|
|
|
submitstate: exercise_users[i].commit_status === 1 ? "已提交" : "未提交",
|
|
|
updatetime: moment(exercise_users[i].end_at).format('YYYY-MM-DD HH:mm') === "Invalid date" ? "--" : moment(exercise_users[i].end_at).format('YYYY-MM-DD HH:mm'),
|
|
|
completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
|
|
|
levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
|
|
|
efficiencyscore: exercise_users[i].score === undefined ? "--" : exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score,
|
|
|
finalscore: "评阅"
|
|
|
})
|
|
|
} else {
|
|
|
datalist.push({
|
|
|
myid: exercise_users[i].login,
|
|
|
user_group_id: exercise_users[i].user_group_id,
|
|
|
number: (parseInt(page)-1)*parseInt(limit)+(i+1),
|
|
|
name: exercise_users[i].user_name,
|
|
|
stduynumber: exercise_users[i].student_id === undefined ? "--" : exercise_users[i].student_id === null ? "--" : exercise_users[i].student_id === "" ? "--" : exercise_users[i].student_id,
|
|
|
classroom: exercise_users[i].user_group_name,
|
|
|
submitstate: exercise_users[i].commit_status === 1 ? "已提交" : "未提交",
|
|
|
updatetime: moment(exercise_users[i].end_at).format('YYYY-MM-DD HH:mm') === "Invalid date" ? "--" : moment(exercise_users[i].end_at).format('YYYY-MM-DD HH:mm'),
|
|
|
completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
|
|
|
levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
|
|
|
efficiencyscore: exercise_users[i].score === undefined ? "--" : exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score,
|
|
|
finalscore: "--"
|
|
|
})
|
|
|
indexi++;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
// teacherlist = { //分页
|
|
|
// total: exercise_users.length, //数据总数量
|
|
|
// pageSize: 20, //一页显示几条
|
|
|
// current: this.state.page,
|
|
|
// }
|
|
|
}
|
|
|
|
|
|
|
|
|
if (response.data.exercise_types.subjective === 0) {
|
|
|
//===0 不包括主观题
|
|
|
if (indexi === exercise_users.length) {
|
|
|
//都没评论 不显示评论
|
|
|
if (response.data.exercise_types.groups_count > 0) {
|
|
|
// console.log("77771111111");
|
|
|
//分班大于0显示分班
|
|
|
//7ge
|
|
|
thiss.setState({
|
|
|
data: datalist,
|
|
|
teacherlist: teacherlist,
|
|
|
Teacherliststudentlist: response.data,
|
|
|
review: response.data.review,
|
|
|
commit_status: response.data.commit_status,
|
|
|
exercise_users: response.data.exercise_users,
|
|
|
course_groups: response.data.course_groups,
|
|
|
loadingstate: false,
|
|
|
columnsys: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
dataIndex: 'number',
|
|
|
key: 'number',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'110px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.number}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'183px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.name}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '学号',
|
|
|
dataIndex: 'stduynumber',
|
|
|
key: 'stduynumber',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'193px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.stduynumber}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '分班',
|
|
|
key: 'classroom',
|
|
|
dataIndex: 'classroom',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'193px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '提交状态',
|
|
|
dataIndex: 'submitstate',
|
|
|
key: 'submitstate',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'146px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={record.submitstate === "未提交" ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center"
|
|
|
} : record.submitstate === "已提交" ? {"color": '#29BD8B', "text-align": "center"} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center"
|
|
|
}}>{record.submitstate}</a>
|
|
|
</span>
|
|
|
)
|
|
|
|
|
|
},
|
|
|
{
|
|
|
title: '提交时间',
|
|
|
dataIndex: 'updatetime',
|
|
|
key: 'updatetime',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'228px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.updatetime}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '最终成绩',
|
|
|
dataIndex: 'efficiencyscore',
|
|
|
key: 'efficiencyscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'146px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={parseInt(record.efficiencyscore) > 90 ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center",
|
|
|
} : parseInt(record.efficiencyscore) <= 90 ? {
|
|
|
"color": '#FF6800',
|
|
|
"text-align": "center",
|
|
|
} : parseInt(record.efficiencyscore) <= 60 ? {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
}}>{record.efficiencyscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
}
|
|
|
]
|
|
|
})
|
|
|
} else {
|
|
|
//分班小于0不显示分班
|
|
|
//6ge
|
|
|
thiss.setState({
|
|
|
data: datalist,
|
|
|
teacherlist: teacherlist,
|
|
|
Teacherliststudentlist: response.data,
|
|
|
review: response.data.review,
|
|
|
loadingstate: false,
|
|
|
commit_status: response.data.commit_status,
|
|
|
exercise_users: response.data.exercise_users,
|
|
|
course_groups: response.data.course_groups,
|
|
|
columnsys: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
dataIndex: 'number',
|
|
|
key: 'number',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'76px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.number}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
align: 'center',
|
|
|
width:'149px',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.name}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '学号',
|
|
|
dataIndex: 'stduynumber',
|
|
|
key: 'stduynumber',
|
|
|
align: 'center',
|
|
|
width:'159px',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.stduynumber}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '提交状态',
|
|
|
dataIndex: 'submitstate',
|
|
|
key: 'submitstate',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'112px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={record.submitstate === "未提交" ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center"
|
|
|
} : record.submitstate === "已提交" ? {"color": '#29BD8B', "text-align": "center"} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center"
|
|
|
}}>{record.submitstate}</a>
|
|
|
</span>
|
|
|
)
|
|
|
|
|
|
},
|
|
|
{
|
|
|
title: '提交时间',
|
|
|
dataIndex: 'updatetime',
|
|
|
key: 'updatetime',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'194px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.updatetime}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '最终成绩',
|
|
|
dataIndex: 'efficiencyscore',
|
|
|
key: 'efficiencyscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'112px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={parseInt(record.efficiencyscore) > 90 ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center",
|
|
|
} : parseInt(record.efficiencyscore) <= 90 ? {
|
|
|
"color": '#FF6800',
|
|
|
"text-align": "center",
|
|
|
} : parseInt(record.efficiencyscore) <= 60 ? {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
}}>{record.efficiencyscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
}
|
|
|
]
|
|
|
})
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
//已经评论
|
|
|
// response.data.course_groups.length
|
|
|
if (response.data.exercise_types.groups_count > 0) {
|
|
|
//显示分班
|
|
|
//8ge
|
|
|
this.setState({
|
|
|
data: datalist,
|
|
|
teacherlist: teacherlist,
|
|
|
Teacherliststudentlist: response.data,
|
|
|
review: response.data.review,
|
|
|
commit_status: response.data.commit_status,
|
|
|
exercise_users: response.data.exercise_users,
|
|
|
course_groups: response.data.course_groups,
|
|
|
loadingstate: false,
|
|
|
columnsys: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
dataIndex: 'number',
|
|
|
key: 'number',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'96px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.number}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'169px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.name}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '学号',
|
|
|
dataIndex: 'stduynumber',
|
|
|
key: 'stduynumber',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'179px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.stduynumber}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '分班',
|
|
|
key: 'classroom',
|
|
|
dataIndex: 'classroom',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'179px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '提交状态',
|
|
|
dataIndex: 'submitstate',
|
|
|
key: 'submitstate',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'132px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={record.submitstate === "未提交" ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center"
|
|
|
} : record.submitstate === "已提交" ? {"color": '#29BD8B', "text-align": "center"} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center"
|
|
|
}}>{record.submitstate}</a>
|
|
|
</span>
|
|
|
)
|
|
|
|
|
|
},
|
|
|
{
|
|
|
title: '提交时间',
|
|
|
dataIndex: 'updatetime',
|
|
|
key: 'updatetime',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'214px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.updatetime}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '最终成绩',
|
|
|
dataIndex: 'efficiencyscore',
|
|
|
key: 'efficiencyscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'132px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={parseInt(record.efficiencyscore) > 90 ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center",
|
|
|
} : parseInt(record.efficiencyscore) <= 90 ? {
|
|
|
"color": '#FF6800',
|
|
|
"text-align": "center",
|
|
|
} : parseInt(record.efficiencyscore) <= 60 ? {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
}}>{record.efficiencyscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '操作',
|
|
|
dataIndex: 'finalscore',
|
|
|
key: 'finalscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'98px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"text-align": "center"}} className="color-blue"
|
|
|
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
]
|
|
|
})
|
|
|
} else {
|
|
|
//不显示分班
|
|
|
//7ge
|
|
|
this.setState({
|
|
|
data: datalist,
|
|
|
teacherlist: teacherlist,
|
|
|
Teacherliststudentlist: response.data,
|
|
|
review: response.data.review,
|
|
|
commit_status: response.data.commit_status,
|
|
|
exercise_users: response.data.exercise_users,
|
|
|
course_groups: response.data.course_groups,
|
|
|
loadingstate: false,
|
|
|
columnsys: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
dataIndex: 'number',
|
|
|
key: 'number',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'110px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.number}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'228px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.name}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '学号',
|
|
|
dataIndex: 'stduynumber',
|
|
|
key: 'stduynumber',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'193px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.stduynumber}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '提交状态',
|
|
|
dataIndex: 'submitstate',
|
|
|
key: 'submitstate',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'146px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={record.submitstate === "未提交" ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center"
|
|
|
} : record.submitstate === "已提交" ? {"color": '#29BD8B', "text-align": "center"} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center"
|
|
|
}}>{record.submitstate}</a>
|
|
|
</span>
|
|
|
)
|
|
|
|
|
|
},
|
|
|
{
|
|
|
title: '提交时间',
|
|
|
dataIndex: 'updatetime',
|
|
|
key: 'updatetime',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'193px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.updatetime}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '最终成绩',
|
|
|
dataIndex: 'efficiencyscore',
|
|
|
key: 'efficiencyscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'183px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={parseInt(record.efficiencyscore) > 90 ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center",
|
|
|
} : parseInt(record.efficiencyscore) <= 90 ? {
|
|
|
"color": '#FF6800',
|
|
|
"text-align": "center",
|
|
|
} : parseInt(record.efficiencyscore) <= 60 ? {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
}}>{record.efficiencyscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '操作',
|
|
|
dataIndex: 'finalscore',
|
|
|
key: 'finalscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'146px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"text-align": "center"}} className="color-blue"
|
|
|
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
]
|
|
|
})
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
//包括主观题
|
|
|
if (indexi === exercise_users.length) {
|
|
|
console.log("2548包含主观题不包含分班");
|
|
|
if (response.data.exercise_types.groups_count> 0){
|
|
|
this.setState({
|
|
|
data: datalist,
|
|
|
teacherlist: teacherlist,
|
|
|
Teacherliststudentlist: response.data,
|
|
|
review: response.data.review,
|
|
|
commit_status: response.data.commit_status,
|
|
|
exercise_users: response.data.exercise_users,
|
|
|
course_groups: response.data.course_groups,
|
|
|
columnsys: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
dataIndex: 'number',
|
|
|
key: 'number',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'76px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.number}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'149px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.name}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '学号',
|
|
|
dataIndex: 'stduynumber',
|
|
|
key: 'stduynumber',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'159px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.stduynumber}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '分班',
|
|
|
key: 'classroom',
|
|
|
dataIndex: 'classroom',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '提交状态',
|
|
|
dataIndex: 'submitstate',
|
|
|
key: 'submitstate',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'112px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={record.submitstate === "未提交" ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center"
|
|
|
} : record.submitstate === "已提交" ? {"color": '#29BD8B', "text-align": "center"} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center"
|
|
|
}}>{record.submitstate}</a>
|
|
|
</span>
|
|
|
)
|
|
|
|
|
|
},
|
|
|
{
|
|
|
title: '提交时间',
|
|
|
dataIndex: 'updatetime',
|
|
|
key: 'updatetime',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'194px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.updatetime}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '客观题分',
|
|
|
dataIndex: 'completion',
|
|
|
key: 'completion',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'112px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.completion}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '主观题得分',
|
|
|
dataIndex: 'levelscore',
|
|
|
key: 'levelscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'130px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#FF6800', "text-align": "center"}}>{record.levelscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '最终成绩',
|
|
|
dataIndex: 'efficiencyscore',
|
|
|
key: 'efficiencyscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'112px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={parseInt(record.efficiencyscore) > 90 ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center",
|
|
|
|
|
|
} : parseInt(record.efficiencyscore) <= 90 ? {
|
|
|
"color": '#FF6800',
|
|
|
"text-align": "center",
|
|
|
|
|
|
} : parseInt(record.efficiencyscore) <= 60 ? {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
|
|
|
} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
}}>{record.efficiencyscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
]
|
|
|
})
|
|
|
}else{
|
|
|
this.setState({
|
|
|
data: datalist,
|
|
|
teacherlist: teacherlist,
|
|
|
Teacherliststudentlist: response.data,
|
|
|
review: response.data.review,
|
|
|
commit_status: response.data.commit_status,
|
|
|
exercise_users: response.data.exercise_users,
|
|
|
course_groups: response.data.course_groups,
|
|
|
columnsys: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
dataIndex: 'number',
|
|
|
key: 'number',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'76px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.number}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'149px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.name}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '学号',
|
|
|
dataIndex: 'stduynumber',
|
|
|
key: 'stduynumber',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'159px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.stduynumber}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '提交状态',
|
|
|
dataIndex: 'submitstate',
|
|
|
key: 'submitstate',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'112px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={record.submitstate === "未提交" ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center"
|
|
|
} : record.submitstate === "已提交" ? {"color": '#29BD8B', "text-align": "center"} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center"
|
|
|
}}>{record.submitstate}</a>
|
|
|
</span>
|
|
|
)
|
|
|
|
|
|
},
|
|
|
{
|
|
|
title: '提交时间',
|
|
|
dataIndex: 'updatetime',
|
|
|
key: 'updatetime',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'194px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.updatetime}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '客观题分',
|
|
|
dataIndex: 'completion',
|
|
|
key: 'completion',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'112px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.completion}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '主观题得分',
|
|
|
dataIndex: 'levelscore',
|
|
|
key: 'levelscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'130px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#FF6800', "text-align": "center"}}>{record.levelscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '最终成绩',
|
|
|
dataIndex: 'efficiencyscore',
|
|
|
key: 'efficiencyscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'112px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={parseInt(record.efficiencyscore) > 90 ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center",
|
|
|
|
|
|
} : parseInt(record.efficiencyscore) <= 90 ? {
|
|
|
"color": '#FF6800',
|
|
|
"text-align": "center",
|
|
|
|
|
|
} : parseInt(record.efficiencyscore) <= 60 ? {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
|
|
|
} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
}}>{record.efficiencyscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
]
|
|
|
})
|
|
|
}
|
|
|
} else {
|
|
|
console.log("2699包含主观题包含分班");
|
|
|
if (response.data.exercise_types.groups_count> 0) {
|
|
|
this.setState({
|
|
|
data: datalist,
|
|
|
teacherlist: teacherlist,
|
|
|
Teacherliststudentlist: response.data,
|
|
|
review: response.data.review,
|
|
|
commit_status: response.data.commit_status,
|
|
|
exercise_users: response.data.exercise_users,
|
|
|
course_groups: response.data.course_groups,
|
|
|
loadingstate: false,
|
|
|
columnsys: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
dataIndex: 'number',
|
|
|
key: 'number',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'76px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.number}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'149px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.name}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '学号',
|
|
|
dataIndex: 'stduynumber',
|
|
|
key: 'stduynumber',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'159px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.stduynumber}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '分班',
|
|
|
key: 'classroom',
|
|
|
dataIndex: 'classroom',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '提交状态',
|
|
|
dataIndex: 'submitstate',
|
|
|
key: 'submitstate',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'112px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={record.submitstate === "未提交" ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center"
|
|
|
} : record.submitstate === "已提交" ? {"color": '#29BD8B', "text-align": "center"} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center"
|
|
|
}}>{record.submitstate}</a>
|
|
|
</span>
|
|
|
)
|
|
|
|
|
|
},
|
|
|
{
|
|
|
title: '提交时间',
|
|
|
dataIndex: 'updatetime',
|
|
|
key: 'updatetime',
|
|
|
align: 'center',
|
|
|
width:'194px',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.updatetime}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '客观题分',
|
|
|
dataIndex: 'completion',
|
|
|
key: 'completion',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'112px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.completion}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '主观题得分',
|
|
|
dataIndex: 'levelscore',
|
|
|
key: 'levelscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'130px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#FF6800', "text-align": "center"}}>{record.levelscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '最终成绩',
|
|
|
dataIndex: 'efficiencyscore',
|
|
|
key: 'efficiencyscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'112px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={parseInt(record.efficiencyscore) > 90 ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center",
|
|
|
} : parseInt(record.efficiencyscore) <= 90 ? {
|
|
|
"color": '#FF6800',
|
|
|
"text-align": "center",
|
|
|
} : parseInt(record.efficiencyscore) <= 60 ? {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
}}>{record.efficiencyscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '操作',
|
|
|
dataIndex: 'finalscore',
|
|
|
key: 'finalscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'78px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"text-align": "center"}} className="color-blue"
|
|
|
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
]
|
|
|
})
|
|
|
}else{
|
|
|
this.setState({
|
|
|
data: datalist,
|
|
|
teacherlist: teacherlist,
|
|
|
Teacherliststudentlist: response.data,
|
|
|
review: response.data.review,
|
|
|
commit_status: response.data.commit_status,
|
|
|
exercise_users: response.data.exercise_users,
|
|
|
course_groups: response.data.course_groups,
|
|
|
loadingstate: false,
|
|
|
columnsys: [
|
|
|
{
|
|
|
title: '序号',
|
|
|
dataIndex: 'number',
|
|
|
key: 'number',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'76px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.number}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '姓名',
|
|
|
dataIndex: 'name',
|
|
|
key: 'name',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'149px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.name}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '学号',
|
|
|
dataIndex: 'stduynumber',
|
|
|
key: 'stduynumber',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'159px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.stduynumber}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '提交状态',
|
|
|
dataIndex: 'submitstate',
|
|
|
key: 'submitstate',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'112px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={record.submitstate === "未提交" ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center"
|
|
|
} : record.submitstate === "已提交" ? {"color": '#29BD8B', "text-align": "center"} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center"
|
|
|
}}>{record.submitstate}</a>
|
|
|
</span>
|
|
|
)
|
|
|
|
|
|
},
|
|
|
{
|
|
|
title: '提交时间',
|
|
|
dataIndex: 'updatetime',
|
|
|
key: 'updatetime',
|
|
|
align: 'center',
|
|
|
width:'194px',
|
|
|
className: "edu-txt-center",
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.updatetime}</a>
|
|
|
</span>
|
|
|
),
|
|
|
},
|
|
|
{
|
|
|
title: '客观题分',
|
|
|
dataIndex: 'completion',
|
|
|
key: 'completion',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'112px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.completion}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '主观题得分',
|
|
|
dataIndex: 'levelscore',
|
|
|
key: 'levelscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'130px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"color": '#FF6800', "text-align": "center"}}>{record.levelscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '最终成绩',
|
|
|
dataIndex: 'efficiencyscore',
|
|
|
key: 'efficiencyscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'112px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={parseInt(record.efficiencyscore) > 90 ? {
|
|
|
"color": '#DD1717',
|
|
|
"text-align": "center",
|
|
|
} : parseInt(record.efficiencyscore) <= 90 ? {
|
|
|
"color": '#FF6800',
|
|
|
"text-align": "center",
|
|
|
} : parseInt(record.efficiencyscore) <= 60 ? {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
} : {
|
|
|
"color": '#747A7F',
|
|
|
"text-align": "center",
|
|
|
}}>{record.efficiencyscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
title: '操作',
|
|
|
dataIndex: 'finalscore',
|
|
|
key: 'finalscore',
|
|
|
align: 'center',
|
|
|
className: "edu-txt-center",
|
|
|
width:'78px',
|
|
|
render: (text, record) => (
|
|
|
<span>
|
|
|
<a style={{"text-align": "center"}} className="color-blue"
|
|
|
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a>
|
|
|
</span>
|
|
|
)
|
|
|
},
|
|
|
]
|
|
|
})
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
this.setState({
|
|
|
loadingstate:false
|
|
|
})
|
|
|
}
|
|
|
|
|
|
|
|
|
TablePaginationsy = (e) => {
|
|
|
// console.log(e.current);
|
|
|
var teacherlist = { //分页
|
|
|
total: this.state.exercise_users.length, //数据总数量
|
|
|
pageSize: 20, //一页显示几条
|
|
|
current: e.current,
|
|
|
}
|
|
|
this.setState({
|
|
|
page: e.current,
|
|
|
teacherlist: teacherlist
|
|
|
})
|
|
|
|
|
|
}
|
|
|
Searchdatasys = (order, commit_status, review, exercise_group_id, search, page, limit) => {
|
|
|
var exercise_id = this.props.match.params.Id;
|
|
|
var url = `/exercises/${exercise_id}/exercise_lists.json`;
|
|
|
axios.get((url), {
|
|
|
params: {
|
|
|
order: order,
|
|
|
commit_status: commit_status,
|
|
|
review: review,
|
|
|
exercise_group_id: exercise_group_id,
|
|
|
search: search,
|
|
|
page: page,
|
|
|
limit: limit,
|
|
|
}
|
|
|
}).then((response) => {
|
|
|
// console.log("528");
|
|
|
// console.log(JSON.stringify(response));
|
|
|
this.setState({
|
|
|
loadingstate: false,
|
|
|
})
|
|
|
this.Generatenewdatasy(response.data.exercise_users, response);
|
|
|
}).catch((error) => {
|
|
|
console.log(error)
|
|
|
this.setState({
|
|
|
loadingstate: false,
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
|
|
|
notlimited = () => {
|
|
|
if(this.state.loadingstate === false){
|
|
|
this.setState({
|
|
|
unlimited: 0,
|
|
|
course_groupyslsthree: undefined,
|
|
|
loadingstate:true,
|
|
|
})
|
|
|
}else{
|
|
|
this.setState({
|
|
|
unlimited: 0,
|
|
|
course_groupyslsthree: undefined,
|
|
|
})
|
|
|
}
|
|
|
this.Searchdatasys(this.state.order, this.state.commit_status, null, this.state.checkedValuesineinfo, this.state.searchtext, null, null);
|
|
|
}
|
|
|
// notlimiteds = () => {
|
|
|
// this.setState({
|
|
|
// unlimiteds: 0,
|
|
|
// commit_status: null,
|
|
|
// submitted: false,
|
|
|
// unsubmitted: false
|
|
|
// })
|
|
|
// this.Searchdatasys(this.state.order, null, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, null, null);
|
|
|
// }
|
|
|
notlimiteds = () => {
|
|
|
if(this.state.loadingstate === false) {
|
|
|
this.setState({
|
|
|
unlimiteds: 0,
|
|
|
course_groupyslstwo: undefined,
|
|
|
loadingstate: true,
|
|
|
})
|
|
|
}else{
|
|
|
this.setState({
|
|
|
unlimiteds: 0,
|
|
|
course_groupyslstwo: undefined,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
this.Searchdatasys(this.state.order, undefined, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, null, null);
|
|
|
}
|
|
|
checkeboxstwo = (checkedValues, data) => {
|
|
|
// console.log(checkedValues)
|
|
|
if (JSON.stringify(checkedValues) === "[]") {
|
|
|
// console.log(checkedValues);
|
|
|
if(this.state.loadingstate === false) {
|
|
|
this.setState({
|
|
|
loadingstate: true,
|
|
|
course_groupyslstwo: undefined,
|
|
|
unlimiteds: 0,
|
|
|
})
|
|
|
}else{
|
|
|
this.setState({
|
|
|
course_groupyslstwo: undefined,
|
|
|
unlimiteds: 0,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
this.Searchdatasys(this.state.order, checkedValues, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, null, null);
|
|
|
} else if (checkedValues.length === data.length) {
|
|
|
if(this.state.loadingstate === false) {
|
|
|
this.setState({
|
|
|
loadingstate: true,
|
|
|
course_groupyslstwo: undefined,
|
|
|
unlimiteds: 0,
|
|
|
})
|
|
|
}else{
|
|
|
this.setState({
|
|
|
course_groupyslstwo: undefined,
|
|
|
unlimiteds: 0,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
this.Searchdatasys(this.state.order, checkedValues, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, null, null);
|
|
|
} else {
|
|
|
// console.log(checkedValues);
|
|
|
this.Searchdatasys(this.state.order, checkedValues, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, null, null);
|
|
|
if(this.state.loadingstate === false) {
|
|
|
this.setState({
|
|
|
loadingstate: true,
|
|
|
course_groupyslstwo: checkedValues,
|
|
|
unlimiteds: 1
|
|
|
})
|
|
|
}else{
|
|
|
this.setState({
|
|
|
course_groupyslstwo: checkedValues,
|
|
|
unlimiteds: 1
|
|
|
})
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
notlimitedst = () => {
|
|
|
// console.log();
|
|
|
// var datas=this.state.course_groups;
|
|
|
// for(var ik=0;ik<datas.length;ik++){
|
|
|
// datas[ik].exercise_group_id=undefined;
|
|
|
// }
|
|
|
this.setState({
|
|
|
course_groups: null,
|
|
|
unlimitedtwo: 0
|
|
|
})
|
|
|
this.Searchdatasys(this.state.order, this.state.commit_status, this.state.review, undefined, this.state.searchtext, null, null)
|
|
|
|
|
|
}
|
|
|
checkeboxs = (checkedValues, data) => {
|
|
|
// if(JSON.stringify(v)==="[]"){
|
|
|
// this.setState({
|
|
|
// review:undefined
|
|
|
// })
|
|
|
// return
|
|
|
// }
|
|
|
|
|
|
|
|
|
if (JSON.stringify(checkedValues) === "[]") {
|
|
|
// console.log(checkedValues);
|
|
|
if(this.state.loadingstate === false) {
|
|
|
this.setState({
|
|
|
unlimited: 0,
|
|
|
course_groupyslsthree: undefined,
|
|
|
loadingstate:true,
|
|
|
})
|
|
|
}else{
|
|
|
this.setState({
|
|
|
unlimited: 0,
|
|
|
course_groupyslsthree: undefined,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
this.Searchdatasys(this.state.order, this.state.commit_status, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, null, null);
|
|
|
} else if (checkedValues.length === data.length) {
|
|
|
if(this.state.loadingstate === false) {
|
|
|
this.setState({
|
|
|
unlimited: 0,
|
|
|
course_groupyslsthree: undefined,
|
|
|
loadingstate:true,
|
|
|
})
|
|
|
}else{
|
|
|
this.setState({
|
|
|
unlimited: 0,
|
|
|
course_groupyslsthree: undefined,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
this.Searchdatasys(this.state.order, this.state.commit_status, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, null, null);
|
|
|
} else {
|
|
|
// console.log(checkedValues);
|
|
|
if(this.state.loadingstate === false) {
|
|
|
this.setState({
|
|
|
unlimited: 1,
|
|
|
loadingstate:true,
|
|
|
course_groupyslsthree: checkedValues,
|
|
|
})
|
|
|
}else {
|
|
|
this.setState({
|
|
|
unlimited: 1,
|
|
|
course_groupyslsthree: checkedValues,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
this.Searchdatasys(this.state.order, this.state.commit_status, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, null, null);
|
|
|
|
|
|
}
|
|
|
}
|
|
|
funtaskstatustwos = () => {
|
|
|
|
|
|
if(this.state.loadingstate === false) {
|
|
|
this.setState({
|
|
|
unlimitedtwo: 0,
|
|
|
checkedValuesineinfo: undefined,
|
|
|
course_groupysls: undefined,
|
|
|
loadingstate:true,
|
|
|
})
|
|
|
}else{
|
|
|
this.setState({
|
|
|
unlimitedtwo: 0,
|
|
|
checkedValuesineinfo: undefined,
|
|
|
course_groupysls: undefined,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
this.Searchdatasys(this.state.order, this.state.commit_status, this.state.review, undefined, this.state.searchtext, null, null)
|
|
|
}
|
|
|
|
|
|
funtaskstatustwo = (checkedValues, data) => {
|
|
|
debugger
|
|
|
// console.log(checkedValues);
|
|
|
if (JSON.stringify(checkedValues) === "[]") {
|
|
|
// console.log(checkedValues);
|
|
|
if(this.state.loadingstate === false) {
|
|
|
this.setState({
|
|
|
course_groupysls: undefined,
|
|
|
unlimitedtwo: 0,
|
|
|
loadingstate:true,
|
|
|
})
|
|
|
}else{
|
|
|
this.setState({
|
|
|
course_groupysls: undefined,
|
|
|
unlimitedtwo: 0,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
this.Searchdatasys(this.state.order, this.state.commit_status, this.state.review, checkedValues, this.state.searchtext, null, null)
|
|
|
} else if (checkedValues.length === data.length) {
|
|
|
if(this.state.loadingstate === false) {
|
|
|
this.setState({
|
|
|
course_groupysls: undefined,
|
|
|
unlimitedtwo: 0,
|
|
|
loadingstate:true,
|
|
|
})
|
|
|
}else{
|
|
|
this.setState({
|
|
|
course_groupysls: undefined,
|
|
|
unlimitedtwo: 0,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
this.Searchdatasys(this.state.order, this.state.commit_status, this.state.review, checkedValues, this.state.searchtext, null, null)
|
|
|
} else {
|
|
|
// console.log(checkedValues);
|
|
|
if(this.state.loadingstate === false) {
|
|
|
this.setState({
|
|
|
checkedValuesineinfo: checkedValues,
|
|
|
course_groupysls: checkedValues,
|
|
|
unlimitedtwo: 1,
|
|
|
loadingstate:true,
|
|
|
})
|
|
|
}else{
|
|
|
this.setState({
|
|
|
checkedValuesineinfo: checkedValues,
|
|
|
course_groupysls: checkedValues,
|
|
|
unlimitedtwo: 1,
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
this.Searchdatasys(this.state.order, this.state.commit_status, this.state.review, checkedValues, this.state.searchtext, null, null)
|
|
|
this.props.setcourse_groupysls(checkedValues)
|
|
|
}
|
|
|
|
|
|
}
|
|
|
// 输入关键字后按回车,自动提交
|
|
|
onSearchKeywordKeyUp = (e) => {
|
|
|
if (e.keyCode === 13) {
|
|
|
// this.onSearch();
|
|
|
// console.log("使用了回车键");
|
|
|
// if(this.state.searchtext === ""){
|
|
|
// message.error("请输入姓名或学号搜索");
|
|
|
// return
|
|
|
// }
|
|
|
if(this.state.loadingstate === false) {
|
|
|
this.setState({
|
|
|
loadingstate: true,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
this.Searchdatasys(this.state.order, this.state.commit_status, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, null, null);
|
|
|
}
|
|
|
}
|
|
|
//搜索学生 文字输入
|
|
|
inputSearchValues = (e) => {
|
|
|
// console.log(e.target.value)
|
|
|
if (e.target.value === "") {
|
|
|
this.setState({
|
|
|
searchtext: undefined
|
|
|
})
|
|
|
} else {
|
|
|
this.setState({
|
|
|
searchtext: e.target.value
|
|
|
})
|
|
|
}
|
|
|
|
|
|
}
|
|
|
//搜索学生按钮输入
|
|
|
searchValues = (value) => {
|
|
|
//点击直接搜索
|
|
|
// if(value === ""){
|
|
|
// message.error("请输入姓名或学号搜索");
|
|
|
// return
|
|
|
// }
|
|
|
if(this.state.loadingstate === false) {
|
|
|
this.setState({
|
|
|
loadingstate: true,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
this.Searchdatasys(this.state.order, this.state.commit_status, this.state.review, this.state.checkedValuesineinfo, value, null, null);
|
|
|
// this.Startsorting(this.state.order,this.state.checkedValuesine,this.state.checkedValuesineinfo,value);
|
|
|
// console.log(value)
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
//排序
|
|
|
funordersy = (e) => {
|
|
|
if (e === "end_at") {
|
|
|
// 时间
|
|
|
// 时间排序是从小到大
|
|
|
if(this.state.loadingstate === false) {
|
|
|
this.setState({
|
|
|
order: "end_at",
|
|
|
loadingstate:true,
|
|
|
})
|
|
|
}else{
|
|
|
this.setState({
|
|
|
order: "end_at",
|
|
|
})
|
|
|
}
|
|
|
|
|
|
this.Searchdatasys(e, this.state.commit_status, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, null, null)
|
|
|
}
|
|
|
|
|
|
if (e === "score") {
|
|
|
// 成绩
|
|
|
//成绩排序是从大到小
|
|
|
if(this.state.loadingstate === false) {
|
|
|
this.setState({
|
|
|
order: "score",
|
|
|
loadingstate:true,
|
|
|
})
|
|
|
}else{
|
|
|
this.setState({
|
|
|
order: "score",
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
this.Searchdatasys(e, this.state.commit_status, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, null, null)
|
|
|
}
|
|
|
|
|
|
if (e === "student_id") {
|
|
|
//学号
|
|
|
//学号排序是从大到小
|
|
|
if(this.state.loadingstate === false) {
|
|
|
this.setState({
|
|
|
order: "student_id",
|
|
|
loadingstate:true,
|
|
|
})
|
|
|
}else{
|
|
|
this.setState({
|
|
|
order: "student_id",
|
|
|
})
|
|
|
}
|
|
|
|
|
|
this.Searchdatasys(e, this.state.commit_status, this.state.review, this.state.checkedValuesineinfo, this.state.searchtext, null, null)
|
|
|
}
|
|
|
}
|
|
|
setExerciseReviewAndAnswer = () => {
|
|
|
|
|
|
}
|
|
|
|
|
|
render() {
|
|
|
const isAdmin = this.props.isAdmin();
|
|
|
|
|
|
let {data, datas, page, columns, course_groupyslsthree, columnstwo, styletable, course_groupyslstwodatas, limit, course_groupysls, course_groupyslstwodata, course_groupyslstwo, teacherlists, Teacherliststudentlist, order, columnss, course_groupsdatas, course_groups, Evaluationarray, unlimited, unlimiteds, unlimitedtwo, teacherlist, searchtext, loadingstate, review, nocomment, commented, unsubmitted, submitted, columnsys, exercise_users} = this.state;
|
|
|
// console.log("Studentshavecompletedthelist");
|
|
|
// console.log(this.props.current_status);
|
|
|
return (
|
|
|
isAdmin === true ?
|
|
|
(
|
|
|
<div style={{
|
|
|
"margin": "0 auto",
|
|
|
" min-width": " 1200px",
|
|
|
}}>
|
|
|
<div className="edu-back-white">
|
|
|
<ul className="clearfix" style={{padding: '10px 30px 10px 30px'}}>
|
|
|
|
|
|
{/*你的评阅:*/}
|
|
|
{
|
|
|
Teacherliststudentlist === undefined || Teacherliststudentlist.exercise_types.subjective === 0 ?
|
|
|
<li className="clearfix mt10">
|
|
|
<span className="fl mr10 color-grey-8 ">作品状态:</span>
|
|
|
<span className="fl "><a id="graduation_comment_no_limit"
|
|
|
className={unlimiteds === 0 ? "pl10 pr10 mr20 check_on" : "pl10 pr10 mr20 "}
|
|
|
onClick={() => this.notlimiteds()}>不限</a></span>
|
|
|
<CheckboxGroup value={course_groupyslstwo}
|
|
|
onChange={(e) => this.checkeboxstwo(e, course_groupyslstwodata && course_groupyslstwodata)}>
|
|
|
{
|
|
|
course_groupyslstwodata.map((item, key) => {
|
|
|
return (
|
|
|
<span key={key}><Checkbox className="fl mt5"
|
|
|
value={item.id}>{item.tu}<span>({Teacherliststudentlist === undefined ? "0" : key === 0 ? Teacherliststudentlist.exercise_types.unanswer_users : Teacherliststudentlist.exercise_types.answer_users})</span></Checkbox></span>
|
|
|
)
|
|
|
})
|
|
|
}
|
|
|
</CheckboxGroup>
|
|
|
<div className="fr mr5 search-new" style={{marginBottom: '1px'}}>
|
|
|
<Search
|
|
|
placeholder="请输入姓名或学号搜索"
|
|
|
id="subject_search_input"
|
|
|
autoComplete="off"
|
|
|
value={searchtext}
|
|
|
onKeyUp={(e) => this.onSearchKeywordKeyUp(e)}
|
|
|
onInput={this.inputSearchValues}
|
|
|
onSearch={this.searchValues}
|
|
|
></Search>
|
|
|
</div>
|
|
|
</li>
|
|
|
:
|
|
|
<div>
|
|
|
<li className="clearfix mt10">
|
|
|
<span className="fl mr10 color-grey-8 ">你的评阅:</span>
|
|
|
<span className="fl "><a id="graduation_comment_no_limit"
|
|
|
className={unlimited === 0 ? "pl10 pr10 mr20 check_on" : "pl10 pr10 mr20 "}
|
|
|
onClick={() => this.notlimited()}>不限</a></span>
|
|
|
|
|
|
<CheckboxGroup value={course_groupyslsthree}
|
|
|
onChange={(e) => this.checkeboxs(e, course_groupyslstwodata && course_groupyslstwodata)}>
|
|
|
{
|
|
|
course_groupyslstwodatas.map((item, key) => {
|
|
|
return (
|
|
|
<span key={key}><Checkbox className="fl mt5"
|
|
|
value={item.id}>{item.tu}<span>({Teacherliststudentlist === undefined ? "0" : key === 0 ? Teacherliststudentlist.exercise_types.unreview_counts : Teacherliststudentlist.exercise_types.review_counts})</span></Checkbox></span>
|
|
|
)
|
|
|
})
|
|
|
}
|
|
|
</CheckboxGroup>
|
|
|
<div className="fr mr5 search-new" style={{marginBottom: '1px'}}>
|
|
|
<Search
|
|
|
placeholder="请输入姓名或学号搜索"
|
|
|
id="subject_search_input"
|
|
|
autoComplete="off"
|
|
|
value={searchtext}
|
|
|
onKeyUp={(e) => this.onSearchKeywordKeyUp(e)}
|
|
|
onInput={this.inputSearchValues}
|
|
|
onSearch={this.searchValues}
|
|
|
></Search>
|
|
|
</div>
|
|
|
</li>
|
|
|
{/*作品状态*/}
|
|
|
<li className="clearfix mt10">
|
|
|
<span className="fl mr10 color-grey-8 ">作品状态:</span>
|
|
|
<span className="fl "><a id="graduation_comment_no_limit"
|
|
|
className={unlimiteds === 0 ? "pl10 pr10 mr20 check_on" : "pl10 pr10 mr20 "}
|
|
|
onClick={() => this.notlimiteds()}>不限</a></span>
|
|
|
<CheckboxGroup value={course_groupyslstwo}
|
|
|
onChange={(e) => this.checkeboxstwo(e, course_groupyslstwodata && course_groupyslstwodata)}>
|
|
|
{
|
|
|
course_groupyslstwodata.map((item, key) => {
|
|
|
return (
|
|
|
<span key={key}><Checkbox className="fl mt5"
|
|
|
value={item.id}>{item.tu}<span>({Teacherliststudentlist === undefined ? "0" : key === 0 ? Teacherliststudentlist.exercise_types.unanswer_users : Teacherliststudentlist.exercise_types.answer_users})</span></Checkbox></span>
|
|
|
)
|
|
|
})
|
|
|
}
|
|
|
</CheckboxGroup>
|
|
|
</li>
|
|
|
</div>
|
|
|
|
|
|
}
|
|
|
{/*分班情况*/}
|
|
|
{course_groups === undefined ? "" : course_groups === null ? "" : course_groups.length < 2 ? "" : JSON.stringify(course_groups) === "[]" ? "" :
|
|
|
<li className="clearfix mt10">
|
|
|
<tr>
|
|
|
<td className="w80" style={{"vertical-align": "top"}}><span
|
|
|
className=" mr10 color-grey-8 ">分班情况:</span></td>
|
|
|
<td className="w70" style={{"vertical-align": "top"}}><span><a
|
|
|
id="graduation_comment_no_limit"
|
|
|
className={unlimitedtwo === 0 ? "pl10 pr10 mr20 check_on" : "pl10 pr10 mr20 "}
|
|
|
onClick={() => this.funtaskstatustwos()}>不限</a></span>
|
|
|
</td>
|
|
|
<td>
|
|
|
<CheckboxGroup value={course_groupysls}
|
|
|
onChange={(e) => this.funtaskstatustwo(e, course_groups && course_groups)}
|
|
|
style={{paddingTop: '4px', display: "inline"}}>
|
|
|
{
|
|
|
course_groups.map((item, key) => {
|
|
|
return (
|
|
|
<span key={key}><Checkbox className="fl mt5"
|
|
|
value={item.exercise_group_id}>{item.exercise_group_name}<span>({item.exercise_group_students})</span></Checkbox></span>
|
|
|
)
|
|
|
})
|
|
|
}
|
|
|
</CheckboxGroup>
|
|
|
|
|
|
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
</li>
|
|
|
}
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
<div id="graduation_work_list" style={{padding: '0px 30px 10px 30px'}}>
|
|
|
<div className="clearfix">
|
|
|
<span
|
|
|
className="fl color-grey-6 font-12" ><span style={{"color": '#FF6800'}}>{Teacherliststudentlist === undefined ? "0" : Teacherliststudentlist.exercise_types.total_users}</span><span
|
|
|
className="color-orange-tip"></span>个检索结果({Teacherliststudentlist === undefined ? "0" : Teacherliststudentlist.exercise_types.exercise_all_users}学生) </span>
|
|
|
|
|
|
<div className="fr color-grey-6 edu-menu-panel">
|
|
|
<ul>
|
|
|
<li className="edu-position edu-position-hidebox">
|
|
|
<a className="font-12 color-grey-6">
|
|
|
{order === "end_at" ? "时间" : order === "score" ? "成绩" : order === "student_id" ? "学号" : ""}排序</a>
|
|
|
<i className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i>
|
|
|
<ul className="edu-position-hide undis mt10">
|
|
|
<li> <a onClick={(e) => this.funordersy("end_at")} data-remote="true" className="color-grey-6 font-12" style={{"text-align": "center "}}>提交时间</a></li>
|
|
|
<li> <a onClick={(e) => this.funordersy("score")} data-remote="true" className="color-grey-6 font-12" style={{"text-align": "center "}}>最终成绩</a></li>
|
|
|
<li> <a onClick={(e) => this.funordersy("student_id")} data-remote="true" className="color-grey-6 font-12" style={{"text-align": "center "}}>学生学号</a></li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
{JSON.stringify(data) !== "[]" ?
|
|
|
<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 ? "" : <Table
|
|
|
dataSource={data}
|
|
|
columns={columnsys}
|
|
|
pagination={false}
|
|
|
loading={loadingstate}
|
|
|
onChange={this.TablePaginationsy}
|
|
|
/>}
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
:
|
|
|
<div id="forum_list" className="forum_table">
|
|
|
<div className="minH-560 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>
|
|
|
{
|
|
|
Teacherliststudentlist && Teacherliststudentlist.exercise_types.total_users && Teacherliststudentlist.exercise_types.total_users > limit ?
|
|
|
<div className="edu-txt-center mt30 mb50">
|
|
|
<Pagination showQuickJumper current={page} onChange={this.paginationonChange}
|
|
|
pageSize={limit}
|
|
|
total={Teacherliststudentlist.exercise_types.total_users}></Pagination>
|
|
|
</div>
|
|
|
: ""
|
|
|
}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
)
|
|
|
:
|
|
|
(
|
|
|
// 学生只能看自己的
|
|
|
Teacherliststudentlist === undefined || Teacherliststudentlist.current_answer_user === undefined || Teacherliststudentlist.current_answer_user === null ?
|
|
|
<div>
|
|
|
<div className=" clearfix "
|
|
|
style={{"margin": "0 auto", "padding-bottom": "100px", " min-width": " 1200px"}}>
|
|
|
<div className={"educontent mb20"}>
|
|
|
|
|
|
<div className="edu-back-white" id="graduation_work_list"
|
|
|
style={{
|
|
|
padding: '0px 30px 10px 30px',
|
|
|
"height": "50px",
|
|
|
"margin-bottom": "10px"
|
|
|
}}>
|
|
|
|
|
|
<div className="clearfix ">
|
|
|
<span className="fl color-grey-6 font-12 mt10">
|
|
|
<span className="color-orange-tip"
|
|
|
style={{"color": '#FF6800'}}>{Teacherliststudentlist === undefined ? "0" : Teacherliststudentlist.exercise_types.answer_users}</span><span
|
|
|
style={{"color": "#666666"}}>已交</span>
|
|
|
<span
|
|
|
className="ml10"></span><span
|
|
|
style={{"color": "#666666"}}> {Teacherliststudentlist === undefined ? "0" : Teacherliststudentlist.exercise_types.unanswer_users}未交</span>
|
|
|
{ Teacherliststudentlist&&Teacherliststudentlist.exercise_types.exercise_end_time==="--"?"":<span className="ml20" style={{"color": "#9A9A9A"}}> 剩余提交时间:</span>}
|
|
|
{ Teacherliststudentlist&&Teacherliststudentlist.exercise_types.exercise_end_time==="--"?"":<span style={{"color": '#FF6800'}}>
|
|
|
{Teacherliststudentlist === undefined ? "0" : Teacherliststudentlist.exercise_types.exercise_end_time}
|
|
|
</span>}
|
|
|
</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
{JSON.stringify(datas) === "[]" ?
|
|
|
<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 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 minH-560">
|
|
|
{datas === undefined ? "" : <Table
|
|
|
dataSource={datas}
|
|
|
columns={columnss}
|
|
|
pagination={false}
|
|
|
loading={false}
|
|
|
onChange={this.TablePaginations}
|
|
|
/>}
|
|
|
</div>
|
|
|
</div>
|
|
|
}
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
:
|
|
|
// 学生能看别人的
|
|
|
<div>
|
|
|
<div className="clearfix" style={{
|
|
|
"margin": "0 auto",
|
|
|
"padding-bottom": "100px",
|
|
|
" min-width": " 1200px"
|
|
|
}}>
|
|
|
<div className={"educontent mb20 edu-back-white"}>
|
|
|
<div className={"justify break_full_word new_li edu-back-white"}
|
|
|
>
|
|
|
<style>{`
|
|
|
.ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
|
|
|
top: 72%;}
|
|
|
}
|
|
|
`}</style>
|
|
|
{data === undefined ? "" : <Table
|
|
|
dataSource={data}
|
|
|
columns={columnstwo}
|
|
|
showHeader={false}
|
|
|
pagination={false}
|
|
|
loading={false}
|
|
|
|
|
|
/>}
|
|
|
</div>
|
|
|
{JSON.stringify(datas) === "[]" ?
|
|
|
|
|
|
<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 className="edu-back-white">
|
|
|
< div id="graduation_work_list" style={{
|
|
|
padding: '0px 30px 10px 30px',
|
|
|
"margin-top": "20px",
|
|
|
"margin-bottom": "10px"
|
|
|
}}>
|
|
|
|
|
|
<div className="clearfix">
|
|
|
<span className="fl color-grey-6 font-12"><span
|
|
|
className="color-orange-tip"
|
|
|
style={{"color": '#FF6800'}}>{Teacherliststudentlist === undefined ? "0" : Teacherliststudentlist.exercise_types.answer_users}</span><span
|
|
|
style={{"color": "#666666"}}>已交</span><span
|
|
|
className="ml10"></span> <span
|
|
|
style={{"color": "#666666"}}>{Teacherliststudentlist === undefined ? "0" : Teacherliststudentlist.exercise_types.unanswer_users}未交</span>
|
|
|
{ Teacherliststudentlist&&Teacherliststudentlist.exercise_types.exercise_end_time==="--"?"":<span className="ml20" style={{"color": "#9A9A9A"}}> 剩余提交时间:</span>}
|
|
|
{ Teacherliststudentlist&&Teacherliststudentlist.exercise_types.exercise_end_time==="--"?"":<span style={{"color": '#FF6800'}}> {Teacherliststudentlist === undefined ? "0" : Teacherliststudentlist.exercise_types.exercise_end_time}</span>}
|
|
|
</span>
|
|
|
<div className="fr color-grey-6 edu-menu-panel">
|
|
|
<ul>
|
|
|
<li className="edu-position edu-position-hidebox">
|
|
|
<a className="font-12 color-grey-6">
|
|
|
{order === "end_at" ? "时间" : order === "score" ? "成绩" : order === "student_id" ? "学号" : ""}排序</a>
|
|
|
<i className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i>
|
|
|
<ul className="edu-position-hide undis mt10">
|
|
|
<li> <a onClick={(e) => this.funorder("end_at")} data-remote="true" className="color-grey-6 font-12" style={{"text-align": "center "}}>提交时间</a></li>
|
|
|
<li> <a onClick={(e) => this.funorder("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>
|
|
|
<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 minH-560">
|
|
|
{datas === undefined ? "" : <Table
|
|
|
dataSource={datas}
|
|
|
columns={columns}
|
|
|
pagination={false}
|
|
|
loading={loadingstate}
|
|
|
/>}</div>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
}
|
|
|
</div>
|
|
|
|
|
|
{
|
|
|
Teacherliststudentlist && Teacherliststudentlist.exercise_types.total_users && Teacherliststudentlist.exercise_types.total_users > limit ?
|
|
|
<div className="edu-txt-center mt30 mb20">
|
|
|
<Pagination showQuickJumper current={page}
|
|
|
onChange={this.paginationonChanges} pageSize={limit}
|
|
|
total={Teacherliststudentlist.exercise_types.total_users}></Pagination>
|
|
|
</div>
|
|
|
: ""
|
|
|
}
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
)
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
export default Studentshavecompletedthelist; |