import React, {Component} from "react";
import CoursesListType from '../coursesPublic/CoursesListType';
import {WordsBtn, ActionBtn} from 'educoder';
import {
	Form,
	Select,
	Input,
	Button,
	Checkbox,
	Upload,
	Icon,
	message,
	Modal,
	Table,
	Pagination,
	Radio,
	Tooltip,
	notification,
	Spin,
} from "antd";
import './style.css';
import 'moment/locale/zh-cn';
import axios from 'axios';
import moment from 'moment';
import '../css/members.css'
import '../css/busyWork.css'
import '../poll/pollStyle.css'
import './Challenges.css'
import {getImageUrl} from 'educoder';
import TraineetraininginformationModal from "./TraineetraininginformationModal";
import DownloadMessageysl from '../../modals/DownloadMessageysl';
import Startshixuntask from "../coursesPublic/Startshixuntask";
import ModulationModal from "../coursesPublic/ModulationModal";
import HomeworkModal from "../coursesPublic/HomeworkModal";
import ShixunWorkModal from "./Shixunworkdetails/ShixunWorkModal";
const Search = Input.Search;
const RadioGroup = Radio.Group;
const CheckboxGroup = Checkbox.Group;
const {Option} = Select;
//GraduationTaskssetting.js

//作品列表(学生)
class Listofworksstudentone extends Component {
	//unifiedsetting 统一设置
	//allowreplenishment 允许补交
	//completionefficiencyscore 完成效率评分占比
	//level级别
	//proportion 比例
	constructor(props) {
		super(props);
		// course_group_info  老师身份显示的分班情况
		//task_status 老师身份显示的提交情况
		//要提交的作品状态checkedValuesine
		//要提交的分班状态checkedValuesineinfo
		//searchtext 输入的姓名和学号
		//order 排序时间
		this.state = {
			jobsettingsdata: undefined,
			endTime: "2018/11/10 17:10:00",
			type: "day",
			props: props,
			data: [],
			datas: [],
			view_report:false,
			computeTimetype:true,
			page: 1,
			pages: 1,
			limit: 20,
			loadingstate: true,
			order: "update_time",
			search: null,
			day: 0,
			hour: 0,
			minute: 0,
			second: 0,
			userids: 0,
			viewtrainingdata: {},
			teacherdata: undefined,
			task_status: [],
			visibles: false,
			course_group_info: [],
			styletable: {
				"display": "none"
			},
			student_works: [],
			startbtn: false,
			DownloadType:false,
			DownloadMessageval:undefined,
			columnsstu: [
				{
					title: '序号',
					dataIndex: 'number',
					key: 'number',
					align: "center",
					className:'font-14',
					render: (text, record) => (
						<span>
						{record.number === undefined ?
							<span style={{
								color: '#9A9A9A',
								textAlign: "center"
							}}> --</span>
							: record.number === "" ?
								<span style={{
									color: '#9A9A9A',
									textAlign: "center"
								}}>--</span>
								: record.number === "--" ?
									<span style={{
										color: '#9A9A9A',
										textAlign: "center"
									}}>--</span>
									:
									<span style={{
										color: '#07111B',
										textAlign: "center"
									}}>  {record.number}</span>
						}
        </span>
					),
				},
				{
					title: '姓名',
					dataIndex: 'name',
					key: 'name',
					align: "center",
					className:'font-14 maxnamewidth100',
					width:'100px',
					render: (text, record) => (
						<span className="maxnamewidth100">
						{record.name === undefined ?
							<span style={{
								"color": '#9A9A9A',
								"text-align": "center"
							}}>--</span>
							:
							record.name === "" ?
								<span style={{
									"color": '#9A9A9A',
									"text-align": "center"
								}}>--</span>
								:
								record.name === null ?
									<span style={{
										"color": '#9A9A9A',
										"text-align": "center"
									}}>--</span>
									:
									record.name === "--" ?
										<span style={{
											"color": '#9A9A9A',
											"text-align": "center"
										}}>--</span>
										:
										<a className="maxnamewidth100" title={record.name} style={{
											"color": '#07111B',
											"text-align": "center"
										}}>{record.name}</a>
						}

        </span>
					),
				},
				{
					title: '学号',
					dataIndex: 'stduynumber',
					key: 'stduynumber',
					align: "center",
					className:'font-14 maxnamewidth110',
					width:'110px',
					render: (text, record) => (
						<span className="maxnamewidth110">
							{record.stduynumber === undefined ?
								<span style={{
									"color": '#9A9A9A',
									"text-align": "center"
								}}>--
									</span>
								: record.stduynumber === null ?
									<span style={{
										"color": '#9A9A9A',
										"text-align": "center"
									}}>--
									</span>
									: record.stduynumber === "" ?
										<span style={{
											"color": '#9A9A9A',
											"text-align": "center"
										}}>--
									</span>
										:
										<a
											title={record.stduynumber}
											className="maxnamewidth110"
											style={{
											"color": '#9A9A9A',
											"text-align": "center"
										}}>{
											record.stduynumber
										}
									</a>

							}

        </span>
					),
				},
				{
					title: '分班',
					key: 'classroom',
					dataIndex: 'classroom',
					align: "center",
					className:'font-14',
					render: (text, record) => (
						<span>
             <span  className="ysltable" style={{
							 "color": '#9A9A9A',
							 "text-align": "center"
						 }}>{record.classroom === undefined ? "--" : record.classroom === "" ? "--" : record.classroom === null ? "--" : record.classroom}</span>
        </span>
					),
				},
				{
					title: '提交状态',
					dataIndex: 'submitstate',
					key: 'submitstate',
					align: "center",
					className:'font-14',
					render: (text, record) => (
						<span>
				 <span style={record.submitstate === "延时提交" ? {
					 "color": '#DD1717',
					 "text-align": "center"
				 } : record.submitstate === "按时提交" ? {"color": '#29BD8B', "text-align": "center"} : {
					 "color": '#747A7F',
					 "text-align": "center"
				 }}>{record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate}</span>

        </span>
					),
				},
				{
					title: '实战耗时',
					dataIndex: 'cost_time',
					key: 'cost_time',
					align: 'center',
					className:'font-14',
					render: (text, record) => (
						<span style={
							{
								"color": '#747A7F',
								"text-align": "center"
							}
						}>{record.cost_time === null ? "--":record.cost_time === undefined ?"--":record.cost_time }
        </span>
					)

				},
				{
					title: '更新时间',
					dataIndex: 'updatetime',
					key: 'updatetime',
					align: "center",
					className:'font-14',
					render: (text, record) => (
						<span>
             <span style={{
							 "color": '#9A9A9A',
							 "text-align": "center"
						 }}>{record.updatetime === undefined ? "--" : record.updatetime === "" ? "--" : record.updatetime}</span>
        </span>
					),
				},
				{
					title: '完成情况',
					dataIndex: 'completion',
					key: 'completion',
					align: "center",
					className:'font-14',
					render: (text, record) => (
						<span>
											<span style={{"color": '#07111B', "text-align": "center"}}>{record.completion+"/"+this.state.challenges_count}</span>
        </span>
					),
				},
				{
					title: '关卡得分',
					dataIndex: 'levelscore',
					key: 'levelscore',
					align: 'center',
					className:'font-14',
					render: (text, record) => (
						<span>
       	<span style={parseInt(record.levelscore) <= 60 ? {
					"color": '#747A7F',
					"text-align": "center"
				} : parseInt(record.levelscore) < 90 ? {
					"color": '#FF6800',
					"text-align": "center"
				} : parseInt(record.levelscore) >= 90 ? {"color": '#DD1717', "text-align": "center"} : {
					"color": '#747A7F',
					"text-align": "center"
				}}>{record.levelscore}</span>
        </span>
					)
				},
				{
					title: '效率分',
					dataIndex: 'efficiencyscore',
					key: 'efficiencyscore',
					align: 'center',
					className:'font-14',
					render: (text, record) => (
						<span>
            {
							record.efficiencyscore&& record.efficiencyscore=== "--"?(
									<span style={{color:"#9A9A9A"}}>
												--
											</span>
								)
								:
								<span style={parseInt(record.efficiencyscore) <= 60 ? {
									"color": '#747A7F',
									"text-align": "center"
								} : parseInt(record.efficiencyscore) < 90 ? {
									"color": '#FF6800',
									"text-align": "center"
								} : parseInt(record.efficiencyscore) >= 90 ? {
									"color": '#DD1717',
									"text-align": "center"
								} : {"color": '#747A7F', "text-align": "center"}}>{record.efficiencyscore}</span>
						}

        </span>
					)
				},
				{
					title: '最终成绩',
					dataIndex: 'levelscore',
					key: 'levelscore',
					align: "center",
					className:'font-14',
					render: (text, record) => (
						<span>
						{
							record.levelscore && record.levelscore === "--"?
								<span style={{"color": '#9A9A9A', "text-align": "center"}}>{record.levelscore}</span>
								:
								<span style={parseInt(record.levelscore) >=90 ? {
									"color": '#DD1717',
									"text-align": "center"
								} : parseInt(record.levelscore) <= 60?{
									"color": '#FF6800',
									"text-align": "center",
								}: {"color": '#747A7F', "text-align": "center"}}>{record.levelscore}</span>
						}

        </span>
					),
				},
				{
					title: '操作',
					dataIndex: 'operating',
					key: 'operating',
					align: "center",
					className:'font-14',
					render: (text, record) => (
						<span>
                        {
													record.submitstate === "未提交" ?<span style={{	color: '#9A9A9A'}}>--</span>
														:
														<a style={{textAlign: "center"}}
																	className="color-blue"
																	onClick={() => this.Viewstudenttraininginformation(record)}>{record.operating}</a>
												}

        </span>
					),
				},
			],

			orders: "update_time",
			b_order:"desc",
			allow_late:false,
			checkedValuesine: undefined,
			checkedValuesineinfo: [],
			work_efficiency: false,
			resultint: 0,
			teacherlist: undefined,
			searchtext: "",
			course_groupysls: undefined,
			course_groupyslstwo: [],
			visible: false,
			userid: 0,
			course_group: null,
			publish_immediately: undefined,
			end_immediately: undefined,
			mystyle: {"display": "block", "color": '#07111B', "text-align": "center"},
			mystyles: {"display": "none", "color": '#07111B', "text-align": "center"},
			mystyle1: {"display": "block"},
			mystyles1: {"display": "none"},
			unlimited: 0,
			unlimitedtwo: 1,
			code_review: false,
			boolgalist:true,
			challenges_count:0,
			experience:0,
			columns: [
				{
					title: '序号',
					dataIndex: 'number',
					key: 'number',
					align: 'center',
					className:'font-14',
					render: (text, record) => (
						<span style={{"color": '#07111B', "text-align": "center"}}>{record.number}
        </span>
					)
				},
				{
					title: '姓名',
					dataIndex: 'name',
					key: 'name',
					align: 'center',
					className:'font-14 maxnamewidth100',
					width:'100px',
					render: (text, record) => (
						<a  className="maxnamewidth100" title={record.name} style={{"color": '#07111B', "text-align": "center"}}>{record.name}</a>
					)
				},
				{
					title: '学号',
					dataIndex: 'stduynumber',
					key: 'stduynumber',
					align: "center",
					className:'font-14 maxnamewidth110',
					width:'110px',
					render: (text, record) => (
						<span className="maxnamewidth110">
							{record.stduynumber === undefined ?
								<span style={{
									"color": '#9A9A9A',
									"text-align": "center"
								}}>--
									</span>
								: record.stduynumber === null ?
									<span style={{
										"color": '#9A9A9A',
										"text-align": "center"
									}}>--
									</span>
									: record.stduynumber === "" ?
										<span style={{
											"color": '#9A9A9A',
											"text-align": "center"
										}}>--
									</span>
										:
										<a
											title={record.stduynumber}
											className="maxnamewidth110"
											style={{
												"color": '#9A9A9A',
												"text-align": "center"
											}}>{
											record.stduynumber
										}
										</a>

							}

        </span>
					),
				},
				{
					title: '分班',
					key: 'classroom',
					dataIndex: 'classroom',
					align: 'center',
					className:'font-14',
					render: (text, record) => (
						<span>
							{record.classroom === undefined ?<span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}> --</span> : record.classroom === "" ? <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>--</span>: record.classroom === null ? <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>--</span> : <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span>}
						</span>
					)
				},
				{
					title: '提交状态',
					dataIndex: 'submitstate',
					key: 'submitstate',
					align: 'center',
					className:'font-14',
					render: (text, record) => (
						<span style={record.submitstate === "延时提交" ? {
							"color": '#DD1717',
							"text-align": "center"
						} : record.submitstate === "按时提交" ? {"color": '#29BD8B', "text-align": "center"} : {
							"color": '#747A7F',
							"text-align": "center"
						}}>{record.submitstate}
        </span>
					)

				},
				{
					title: '实战耗时',
					dataIndex: 'cost_time',
					key: 'cost_time',
					align: 'center',
					className:'font-14',
					render: (text, record) => (
						<span style={
							{
								"color": '#747A7F',
								"text-align": "center"
							}
						}>{record.cost_time === null ? "--":record.cost_time === undefined ?"--":record.cost_time }
        </span>
					)

				},
				{
					title: '更新时间',
					dataIndex: 'updatetime',
					key: 'updatetime',
					align: 'center',
					className:'font-14',
					render: (text, record) => (
						<span style={{"color": '#9A9A9A', "text-align": "center"}}>{record.updatetime}</span>
					),
				},
				{
					title: '完成情况',
					dataIndex: 'completion',
					key: 'completion',
					align: 'center',
					className:'font-14',
					render: (text, record) => (
						<span>

										<Tooltip  placement="bottom" title={<div>
											<div>已通过{record.completion}关，共{this.state.challenges_count}关</div>
										</div>}>
											<span style={{"color": '#07111B', "text-align": "center"}}>{record.completion+"/"+this.state.challenges_count} </span>
										</Tooltip>

        </span>
					)
				},
				{
					title: '关卡得分',
					dataIndex: 'levelscore',
					key: 'levelscore',
					align: 'center',
					className:'font-14',
					render: (text, record) => (
						<span>
       	<span style={parseInt(record.levelscore) <= 60 ? {
					"color": '#747A7F',
					"text-align": "center"
				} : parseInt(record.levelscore) < 90 ? {
					"color": '#FF6800',
					"text-align": "center"
				} : parseInt(record.levelscore) >= 90 ? {"color": '#DD1717', "text-align": "center"} : {
					"color": '#747A7F',
					"text-align": "center"
				}}>{record.levelscore}</span>
        </span>
					)
				},
				{
					title: '效率分',
					dataIndex: 'efficiencyscore',
					key: 'efficiencyscore',
					align: 'center',
					className:'font-14',
					render: (text, record) => (
						<span>
            {
							record.efficiencyscore&& record.efficiencyscore=== "--"?(
									this.state.allow_late&&this.state.allow_late===false?
										<Tooltip placement="bottom" title={<div>
											<div>作业截止时，系统根据学生在课堂成员中的效率表现自动评分</div>
										</div>}>
											<span style={{color:"#9A9A9A"}}>
												--
											</span>
										</Tooltip>
										:
										this.state.allow_late&&this.state.allow_late===true?
											<Tooltip placement="bottom" title={<div>
												<div>补交结束时，系统根据学生在课堂成员中的效率表现自动评分</div>
											</div>}>
												<span style={{color:"#9A9A9A"}}>
													--
												</span>
											</Tooltip>
											:
											<span style={{color:"#9A9A9A"}}>
												--
											</span>
								)
								:
								<span style={parseInt(record.efficiencyscore) <= 60 ? {
									"color": '#747A7F',
									"text-align": "center"
								} : parseInt(record.efficiencyscore) < 90 ? {
									"color": '#FF6800',
									"text-align": "center"
								} : parseInt(record.efficiencyscore) >= 90 ? {
									"color": '#DD1717',
									"text-align": "center"
								} : {"color": '#747A7F', "text-align": "center"}}>{record.efficiencyscore}</span>
						}

        </span>
					)
				},
				{
					title: '最终成绩',
					dataIndex: 'finalscore',
					key: 'finalscore',
					align: 'center',
					className:'font-14',
					render: (text, record) => (
						<span>
									{
										record.ultimate_score=== true?
											<Tooltip placement="bottom" title={<div>
												<div>{record.user_name}{record.user_login}</div>
												<div>{record.finalscore === "--"?<span>最终调整成绩：0分</span> :<span>最终调整成绩：{record.finalscore}分</span>}</div>
											</div>}>
												{
													record.finalscore&&record.finalscore==="--"?
														<span style=
																		{{
																			"color": '#9A9A9A',
																			"text-align": "center"
																		}}>{record.finalscore}</span>
														:
														<span style={parseInt(record.finalscore) <= 60 ? {
															"color": '#747A7F',
															"text-align": "center"
														} : parseInt(record.finalscore) < 90 ? {
															"color": '#FF6800',
															"text-align": "center"
														} : parseInt(record.finalscore) >= 90 ? {"color": '#DD1717', "text-align": "center"} : {
															"color": '#747A7F',
															"text-align": "center"
														}}>{record.finalscore}</span>
												}
											</Tooltip>
											:
											<Tooltip placement="bottom" title={<div>
												<div>{record.user_name}{record.user_login}</div>
												<div>{record.levelscore === "--"?<span>关卡得分：0分</span> :<span>关卡得分：{record.levelscore}分</span>}</div>
												<div>{record.efficiencyscore === "--"?<span>效率评分：0分</span> :<span>效率评分：{record.efficiencyscore}分</span>}</div>
												<div>{record.late_penalty === "--"?<span>迟交扣分：0分</span> :<span>迟交扣分：{record.late_penalty}分</span>}</div>
												<div>{record.finalscore === "--"?<span>最终成绩：0分</span> :<span>最终成绩：{record.finalscore}分</span>}</div>
											</div>}>
												{
													record.finalscore&&record.finalscore==="--"?
														<span style=
																		{{
																			"color": '#9A9A9A',
																			"text-align": "center"
																		}}>{record.finalscore}</span>
														:
														<span style={parseInt(record.finalscore) <= 60 ? {
															"color": '#747A7F',
															"text-align": "center"
														} : parseInt(record.finalscore) < 90 ? {
															"color": '#FF6800',
															"text-align": "center"
														} : parseInt(record.finalscore) >= 90 ? {"color": '#DD1717', "text-align": "center"} : {
															"color": '#747A7F',
															"text-align": "center"
														}}>{record.finalscore}</span>
												}
											</Tooltip>

									}
               </span>
					)
				},
				{
					title: '操作',
					dataIndex: 'operating',
					key: 'operating',
					display: 'block',
					align: 'center',
					className:'font-14',
					render: (text, record) => (
						record.submitstate === "未提交" ? <span style={{	color: '#9A9A9A'}}>--</span> :
							<span>
                       <a style={{textAlign: "center"}} className="color-blue"
													onClick={() => this.Viewstudenttraininginformationt(record)}>{record.operating}</a>
        </span>
					)
				},
			],
			columnss: [
				{
					title: '序号',
					dataIndex: 'number',
					key: 'number',
					align: 'center',
					className:'font-14',
					render: (text, record) => (
						<span style={{"color": '#07111B', "text-align": "center"}}>{record.number}
        </span>
					)
				},
				{
					title: '姓名',
					dataIndex: 'name',
					key: 'name',
					align: 'center',
					className:'font-14 maxnamewidth100',
					width:'100px',
					render: (text, record) => (
						<a  className="maxnamewidth100" title={record.name}  style={{"color": '#07111B', "text-align": "center"}}>{record.name}</a>
					)
				},
				{
					title: '学号',
					dataIndex: 'stduynumber',
					key: 'stduynumber',
					align: "center",
					className:'font-14 maxnamewidth110',
					width:'110px',
					render: (text, record) => (
						<span className="maxnamewidth110">
							{record.stduynumber === undefined ?
								<span style={{
									"color": '#9A9A9A',
									"text-align": "center"
								}}>--
									</span>
								: record.stduynumber === null ?
									<span style={{
										"color": '#9A9A9A',
										"text-align": "center"
									}}>--
									</span>
									: record.stduynumber === "" ?
										<span style={{
											"color": '#9A9A9A',
											"text-align": "center"
										}}>--
									</span>
										:
										<a
											title={record.stduynumber}
											className="maxnamewidth110"
											style={{
												"color": '#9A9A9A',
												"text-align": "center"
											}}>{
											record.stduynumber
										}
										</a>

							}

        </span>
					),
				},
				{
					title: '分班',
					key: 'classroom',
					dataIndex: 'classroom',
					align: 'center',
					className:'font-14',
					render: (text, record) => (
						<span>
							{record.classroom === undefined ?<span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}> --</span> : record.classroom === "" ? <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>--</span>: record.classroom === null ? <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>--</span> : <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span>}
						</span>
					)
				},
				{
					title: '提交状态',
					dataIndex: 'submitstate',
					key: 'submitstate',
					align: 'center',
					className:'font-14',
					render: (text, record) => (
						<span style={record.submitstate === "延时提交" ? {
							"color": '#DD1717',
							"text-align": "center"
						} : record.submitstate === "按时提交" ? {"color": '#29BD8B', "text-align": "center"} : {
							"color": '#747A7F',
							"text-align": "center"
						}}>{record.submitstate}
        </span>
					)

				},
				{
					title: '更新时间',
					dataIndex: 'updatetime',
					key: 'updatetime',
					align: 'center',
					className:'font-14',
					render: (text, record) => (
						<span style={{"color": '#9A9A9A', "text-align": "center"}}>{record.updatetime}</span>
					),
				},
				{
					title: '实战耗时',
					dataIndex: 'cost_time',
					key: 'cost_time',
					align: 'center',
					className:'font-14',
					render: (text, record) => (
						<span style={
							{
								"color": '#747A7F',
								"text-align": "center"
							}
						}>{record.cost_time === null ? "--":record.cost_time === undefined ?"--":record.cost_time }
        </span>
					)

				},
				{
					title: '完成情况',
					dataIndex: 'completion',
					key: 'completion',
					align: 'center',
					className:'font-14',
					render: (text, record) => (
						<span>

										<Tooltip  placement="bottom" title={<div>
											<div>已通过{record.completion}关，共{this.state.challenges_count}关</div>
										</div>}>
											<span style={{"color": '#07111B', "text-align": "center"}}>{record.completion+"/"+this.state.challenges_count} </span>
										</Tooltip>

        </span>
					)
				},
				{
					title: '关卡得分',
					dataIndex: 'levelscore',
					key: 'levelscore',
					align: 'center',
					className:'font-14',
					render: (text, record) => (
						<span>
       	<span style={parseInt(record.levelscore) <= 60 ? {
					"color": '#747A7F',
					"text-align": "center"
				} : parseInt(record.levelscore) < 90 ? {
					"color": '#FF6800',
					"text-align": "center"
				} : parseInt(record.levelscore) >= 90 ? {"color": '#DD1717', "text-align": "center"} : {
					"color": '#747A7F',
					"text-align": "center"
				}}>{record.levelscore}</span>
        </span>
					)
				},
				{
					title: '效率分',
					dataIndex: 'efficiencyscore',
					key: 'efficiencyscore',
					align: 'center',
					className:'font-14',
					render: (text, record) => (
						<span>
            {
							record.efficiencyscore&& record.efficiencyscore=== "--"?(
									this.state.allow_late&&this.state.allow_late===false?
										<Tooltip placement="bottom" title={<div>
											<div>作业截止时，系统根据学生在课堂成员中的效率表现自动评分</div>
										</div>}>
											<span style={{color:"#9A9A9A"}}>
												--
											</span>
										</Tooltip>
										:
										this.state.allow_late&&this.state.allow_late===true?
											<Tooltip placement="bottom" title={<div>
												<div>补交结束时，系统根据学生在课堂成员中的效率表现自动评分</div>
											</div>}>
												<span style={{color:"#9A9A9A"}}>
													--
												</span>
											</Tooltip>
											:
											<span style={{color:"#9A9A9A"}}>
												--
											</span>
								)
								:
								<span style={parseInt(record.efficiencyscore) <= 60 ? {
									"color": '#747A7F',
									"text-align": "center"
								} : parseInt(record.efficiencyscore) < 90 ? {
									"color": '#FF6800',
									"text-align": "center"
								} : parseInt(record.efficiencyscore) >= 90 ? {
									"color": '#DD1717',
									"text-align": "center"
								} : {"color": '#747A7F', "text-align": "center"}}>{record.efficiencyscore}</span>
						}

        </span>
					)
				},
				{
					title: '最终成绩',
					dataIndex: 'finalscore',
					key: 'finalscore',
					align: 'center',
					className:'font-14',
					render: (text, record) => (
						<span>
									{
										record.ultimate_score=== true?
											<Tooltip placement="bottom" title={<div>
												<div>{record.user_name}{record.user_login}</div>
												<div>{record.finalscore === "--"?<span>最终调整成绩：0分</span> :<span>最终调整成绩：{record.finalscore}分</span>}</div>
											</div>}>
												{
													record.finalscore&&record.finalscore==="--"?
														<span style=
																		{{
																			"color": '#9A9A9A',
																			"text-align": "center"
																		}}>{record.finalscore}</span>
														:
														<span style={parseInt(record.finalscore) <= 60 ? {
															"color": '#747A7F',
															"text-align": "center"
														} : parseInt(record.finalscore) < 90 ? {
															"color": '#FF6800',
															"text-align": "center"
														} : parseInt(record.finalscore) >= 90 ? {"color": '#DD1717', "text-align": "center"} : {
															"color": '#747A7F',
															"text-align": "center"
														}}>{record.finalscore}</span>
												}
											</Tooltip>
											:
											<Tooltip placement="bottom" title={<div>
												<div>{record.user_name}{record.user_login}</div>
												<div>{record.levelscore === "--"?<span>关卡得分：0分</span> :<span>关卡得分：{record.levelscore}分</span>}</div>
												<div>{record.efficiencyscore === "--"?<span>效率评分：0分</span> :<span>效率评分：{record.efficiencyscore}分</span>}</div>
												<div>{record.late_penalty === "--"?<span>迟交扣分：0分</span> :<span>迟交扣分：{record.late_penalty}分</span>}</div>
												<div>{record.finalscore === "--"?<span>最终成绩：0分</span> :<span>最终成绩：{record.finalscore}分</span>}</div>
											</div>}>
												{
													record.finalscore&&record.finalscore==="--"?
														<span style=
																		{{
																			"color": '#9A9A9A',
																			"text-align": "center"
																		}}>{record.finalscore}</span>
														:
														<span style={parseInt(record.finalscore) <= 60 ? {
															"color": '#747A7F',
															"text-align": "center"
														} : parseInt(record.finalscore) < 90 ? {
															"color": '#FF6800',
															"text-align": "center"
														} : parseInt(record.finalscore) >= 90 ? {"color": '#DD1717', "text-align": "center"} : {
															"color": '#747A7F',
															"text-align": "center"
														}}>{record.finalscore}</span>
												}
											</Tooltip>

									}
               </span>
					)
				},
				{
					title: '操作',
					dataIndex: 'operating',
					key: 'operating',
					display: 'block',
					align: 'center',
					className:'font-14',
					render: (text, record) => (
						record.submitstate === "未提交" ? <span style={{	color: '#9A9A9A'}}>--</span> :
							<span>
                       <a style={{textAlign: "center"}} className="color-blue"
													onClick={() => this.Viewstudenttraininginformationt(record)}>{record.operating}</a>
        </span>
					)
				},
			],
			yslpros:false,
			datajs:[],

		}
		// console.log("902");
		// console.log("902");
		// console.log(this.props);

	}
	componentDidCatch(error, info){
		console.log("-----------------------------905错误信息");
		console.log(error);
		console.log(info);

	}
	// componentWillReceiveProps(nextProps) {
	// 	console.log("+++++++++916");
	// 	console.log(nextProps);
	// 	console.log(this.props)
	// 	// console.log(this.props.isAdmin());
	// 	if (nextProps.code_review != this.props.code_review) {
	// 		if (nextProps.code_review !== undefined) {
	// 			console.log("diaoyonglwangluo1");
	// 			if(this.props.isAdmin() === true){
	// 				this.tearchar();
	// 			}else{
	// 				this.student();
	// 			}
	// 		}
	// 		}
	//
	// }
	componentDidMount() {
		// console.log("componentDidMount ");
		// console.log("调用子组件 ");
		// console.log(this.props);
		// console.log(this.props.isAdmin())
		this.student();
	}
	isupdatas = () => {
		var homeworkid = this.props.match.params.homeworkid;
		// this.Gettitleinformation(homeworkid);
		this.Getalistofworks(homeworkid);
	}
	/////////老师操作
	// tearchar=()=>{
	// 	var homeworkid = this.props.match.params.homeworkid;
	// 	// console.log(homeworkid)
	// 	// this.Gettitleinformation(homeworkid);
	// 	this.Getalistofworkst(homeworkid);
	// 	let query = this.props.location.pathname;
	// 	const type = query.split('/');
	// 	this.setState({
	// 		shixuntypes: type[3]
	// 	})
	// 	this.props.triggerRef(this)
	// }
	student=()=>{
		// console.log("914");
		// debugger

		var homeworkid = this.props.match.params.homeworkid;
		this.Getalistofworks(homeworkid);
		let query = this.props.location.pathname;
		const type = query.split('/');
		this.setState({
			shixuntypes: type[3]
		})
		this.props.triggerRef(this);
	}


	//卸载组件取消倒计时
	componentWillUnmount() {
		// clearInterval(this.timer);
	}

	// 获取作品列表
	Getalistofworks = (homeworkid) => {
		// console.log("获取作品列表");
		// console.log("935");
		// debugger
		let urll = `/homework_commons/${homeworkid}/works_list.json`;
		var datasysl = {
			search: "",
			order: "",
			b_order: "desc",
			page: 1,
			limit: 20,
			work_status: "",
			course_group: "",
		}
		axios.post(urll, datasysl).then((result) => {
			console.log("980000000____________________");

			if(result === undefined){
				return
			}
			// if(result.data.message!==undefined){
			//
			// 	return;
			// }

			this.setState({
				teacherdata: result.data,
				task_status: result.data.task_status,
				course_group_info: result.data.course_group_info,
				student_works: result.data.student_works,
				jobsettingsdata: result,
				publish_immediately: result.data.publish_immediately,
				end_immediately: result.data.end_immediately,
				id: result.data.id,
				work_efficiency: result.data.work_efficiency,
				code_review: result.data.code_review,
				challenges_count: result.data.challenges_count,
				view_report: result.data.view_report,
				allow_late:result.data.allow_late,
				loadingstate: false,
				computeTimetype:true,
			})
			this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1);

			if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
				this.seacthdata(result.data);
			} else {
				this.seacthdatas(result.data, result.data.student_works);
			}
			this.props.Getdataback(result,result.data);

		}).catch((error) => {
			console.log(error);
		})
	}

// 获取作品列表
	Getalistofworkstwo = (ordervlue, checkedValuesine, checkedValuesineinfo, searchtext, page, limit) => {
		// console.log("获取作品列表");
		var homeworkid = this.props.match.params.homeworkid;
		let urll = `/homework_commons/${homeworkid}/works_list.json`;
		// console.log(homeworkid);

		// search:搜索关键字
		// order:排序方式：更新时间：update_time，最终成绩：work_score，学号：student_id
		// b_order:desc：倒序 ， asc：顺序
		// work_status:0:未提交， 1:按时提交， 2:延时提交，“”不限
		// course_group:分班情况 [232, 231]， []:不限（空数组）
		var order = "asc";
		if (ordervlue === "updated_at") {
			order = "desc";
		}
		var data = {
			search: "",
			order: ordervlue,
			b_order: order,
			work_status: "",
			course_group: "",
			page: page,
			limit: limit,
		}
		axios.post(urll, data).then((result) => {
			if (result) {
				// console.log("学生未截至未公开的作品列表")
				// console.log(JSON.stringify(result))
				this.setState({
					teacherdata: result.data,
					task_status: result.data.task_status,
					course_group_info: result.data.course_group_info,
					student_works: result.data.student_works,
					loadingstate: false,
					jobsettingsdata: result,
					publish_immediately: result.data.publish_immediately,
					work_efficiency: result.data.work_efficiency,
					end_immediately: result.data.end_immediately,
					code_review: result.data.code_review,
					challenges_count:result.data.challenges_count,
					view_report:result.data.view_report,
				})
				if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
					this.seacthdata(result.data);
				} else {
					this.seacthdatas(result.data,result.data.student_works);
				}
				this.props.Getdataback(result,result.data);

			}
		}).catch((error) => {
			console.log(error)
			this.setState({
				loadingstate: false
			})
		})
	}
	TablePagination = (e) => {
		// console.log(e.current);
		this.setState({
			page: e.current
		})

	}

	seacthdatas = (teacherdata,student_works) => {
		console.log("1197");
		console.log(this.props.isNotMember());
		let {page, limit,work_efficiency} = this.state;
		let datalist = [];
		let datalists = [];
		var styletable = {"display": "none"}
		var arr =[];
		for(var i=0;i<this.state.columnsstu.length;i++){
			var item = this.state.columnsstu[i];
			if(this.props.isNotMember()===true){
				if(item.title==="关卡得分") {
					continue
				}
				if(item.title==="效率分") {
					continue
				}
				if(item.title==="最终成绩") {
					continue
				}
				if(item.title==="学号") {
					continue
				}
				else{
					arr.push(item);
				}
			}
			else{
				if (work_efficiency === false) {
					if(item.title==="关卡得分"){
						continue
					}
					else if(item.title==="效率分"){
						continue

					}else{
						arr.push(item);
					}
				}else{
					arr.push(item);
				}

			}
		}
		let columns2=	arr;
		var teacherlists = undefined;
		if (teacherdata !== undefined) {
			// console.log("seacthdata设置数据")
			// console.log(this.state.teacherdata.id )
			if (teacherdata.id === undefined) {
				this.setState({
					data: [],
					loadingstate: false,
					styletable: styletable,
				})

			} else {
				// console.log(teacherdata)
				if (teacherdata.id !== undefined || teacherdata.id !== null || teacherdata.id !== "") {
					// console.log("seacthdata设置数据1")
					// console.log(this.state.teacherdata )
					var timedata = moment(teacherdata.update_time).format('YYYY-MM-DD HH:mm');
					datalist.push({
						myid: teacherdata.id,
						number: 1,
						name: teacherdata.user_name,
						stduynumber: teacherdata.student_id,
						classroom: teacherdata.group_name,
						cost_time: teacherdata.cost_time,
						submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "按时提交" : teacherdata.work_status === 2 ? "延时提交" : "未提交",
						// updatetime:this.state.teacherdata.student_works[i].update_time,
						// updatetime:"",
						updatetime: timedata === "Invalid date" ? "--" : timedata,
						completion: teacherdata.complete_count === null ? "0" :teacherdata.complete_count === undefined ? "0": teacherdata.complete_count,
						levelscore: teacherdata.final_score,
						efficiencyscore: teacherdata.eff_score,
						finalscore: teacherdata.work_score,
						operating: "查看",
						late_penalty: teacherdata.late_penalty=== null?"0":teacherdata.late_penalty === undefined?"0":teacherdata.late_penalty,
						ultimate_score:teacherdata.ultimate_score,
						user_name: teacherdata.user_name,
						user_login: teacherdata.user_login,
					})

					// }
					// var teacherlist = {  //分页
					// 	total: teacherdata.student_works.length, //数据总数量
					// 	pageSize: teacherdata.student_works.length,  //一页显示几条
					// 	current: this.state.page,
					// }
					styletable = {"display": "block",}
				}
			}

		}


		if (student_works !== undefined) {

			for (var i = 0; i <student_works.length; i++) {
				// console.log("11157==--=-=-=-=");
				// console.log(student_works);
				var timedata = moment(student_works[i].update_time).format('YYYY-MM-DD HH:mm');
				datalists.push({
					myid: student_works[i].id,
					number: (parseInt(page) - 1) * parseInt(limit) + (i + 1),
					name: student_works[i].user_name,
					stduynumber: student_works[i].student_id,
					classroom: student_works[i].group_name,
					cost_time: student_works[i].cost_time,
					submitstate: student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "按时提交" : student_works[i].work_status === 2 ? "延时提交" : "未提交",
					// updatetime:this.state.teacherdata.student_works[i].update_time,
					// updatetime:"",
					updatetime: timedata === "Invalid date" ? "--" : timedata,
					completion: student_works[i].complete_count === null ? "0" :student_works[i].complete_count === undefined ? "0":student_works[i].complete_count,
					levelscore: student_works[i].final_score,
					efficiencyscore: student_works[i].eff_score==="0.0"?"--":student_works[i].eff_score==="0"?"--":student_works[i].eff_score,
					finalscore:student_works[i].work_score,
					operating: "查看",
					late_penalty: student_works[i].late_penalty=== null?"0":student_works[i].late_penalty === undefined?"0":student_works[i].late_penalty,
					ultimate_score:student_works[i].ultimate_score,
					user_name: student_works[i].user_name,
					user_login: student_works[i].user_login,
				})

			}

		}
		// console.log("554");
		// console.log(columns2);
		// console.log(arr);
		this.setState({
			data: datalist,
			datas: datalists,
			teacherlists: teacherlists,
			loadingstate: false,
			styletable: styletable,
			columnsstu:columns2,
		})
	}
	// 设置数据
	seacthdata = (teacherdata) => {
		console.log("1326");
		console.log(this.props.isNotMember());
		let datalist = [];


		var arr =[];
		for(var i=0;i<this.state.columnsstu.length;i++){
			var item = this.state.columnsstu[i];

			if(this.props.isNotMember()===true){
				if(item.title==="关卡得分") {
					continue
				}
				if(item.title==="效率分") {
					continue
				}
				if(item.title==="最终成绩") {
					continue
				}
				if(item.title==="学号") {
					continue
				}else{
					arr.push(item);
				}
			}else{
				if (this.state.work_efficiency === false) {
					if (item.title === "关卡得分") {
						continue
					} else if (item.title === "效率分") {
						continue
					}else{
						arr.push(item);

					}
				}else{
					arr.push(item);
				}

			}
		}
		let columns2=	arr;

		if (teacherdata !== undefined) {
			// console.log("seacthdata设置数据")
			// console.log(this.state.teacherdata.id )
			if (teacherdata.id === undefined) {
				this.setState({
					data: [],
					teacherlist: undefined,
					loadingstate: false,
				})
				return
			}
			// console.log(this.state.teacherdata )
			if (teacherdata.id !== undefined || teacherdata.id !== null ||teacherdata.id !== "") {
				// console.log("seacthdata设置数据1")
				// console.log(this.state.teacherdata )
				var timedata = moment(teacherdata.update_time).format('YYYY-MM-DD HH:mm');
				datalist.push({
					myid: teacherdata.id,
					number: 1,
					name: teacherdata.user_name,
					stduynumber: teacherdata.student_id,
					classroom: teacherdata.group_name,
					cost_time: teacherdata.cost_time,
					submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "按时提交" : teacherdata.work_status === 2 ? "延时提交" : "未提交",
					// updatetime:this.state.teacherdata.student_works[i].update_time,
					// updatetime:"",
					updatetime: timedata === "Invalid date" ? "--" : timedata,
					completion: teacherdata.complete_count === null ? "0" :teacherdata.complete_count === undefined ? "0": teacherdata.complete_count,
					levelscore: teacherdata.final_score,
					efficiencyscore: teacherdata.eff_score,
					finalscore: teacherdata.work_score,
					operating: "查看",
					late_penalty: teacherdata.late_penalty=== null?"0":teacherdata.late_penalty === undefined?"0":teacherdata.late_penalty,
					ultimate_score:teacherdata.ultimate_score,
					user_name: teacherdata.user_name,
					user_login: teacherdata.user_login,
				})

				// }
				// var teacherlist = {  //分页
				// 	total: teacherdata.student_works.length, //数据总数量
				// 	pageSize: teacherdata.student_works.length,  //一页显示几条
				// 	current: this.state.page,
				// }
			} else {
				// console.log("seacthdata设置数据2")
				var teacherlist = undefined;

			}
		} else {
			// console.log("seacthdata设置数据3")

			var teacherlist = undefined;
		}
		// console.log("datalistdatalist文件");
		// console.log(datalist);
		// console.log("645");
		// console.log(columns2);
		this.setState({
			data: datalist,
			teacherlist: teacherlist,
			loadingstate: false,
			columnsstu:columns2,
		})
	}
	// 查看学员实训信息
	Viewstudenttraininginformation = (e) => {
		// console.log("Listofworksstudentone.js");
		// console.log(e);
		this.setState({
			userids: e.myid,
		})
		this.viewtraining(e.myid);
	}
	viewtraining = (userids) => {
		// console.log("viewtraining")
		// console.log(userids)
		// console.log(JSON.stringify(this.props.user))
		var url = `/student_works/${userids}/shixun_work.json`;
		axios.get(url).then((result) => {
			if (result) {
				if(result.data.message!==undefined){
					return;
				}
				// console.log("Listofworksstudentone.js")
				// console.log(JSON.stringify(result))
				let datalist = [];
				var game_list = result.data.game_list
				var boolgalist=true;
				var experience=0;
				for (var i = 0; i < game_list.length; i++) {

					datalist.push({
						number: "第" + game_list[i].position + "关",
						name: moment(game_list[i].end_time).format('YYYY-MM-DD HH:mm'),
						stduynumber: game_list[i].cost_time,
						classroom: game_list[i].score,
						complete_status: game_list[i].complete_status,
					})
					experience=game_list[i].score+experience;

					if(game_list[i].complete_status === 2 || game_list[i].complete_status===3){
						boolgalist=false;
					}
				}
				// console.log("viewtraining");
				// console.log(datalist);
				// console.log(JSON.stringify(datalist));
				this.setState({
					viewtrainingdata: result.data,
					visibles: true,
					game_list: datalist,
					experience:experience,
					boolgalist:boolgalist,
				})
			}
		}).catch((error) => {

		})
	}

	// 关闭调分
	cancelModulationModels = () => {
		this.setState({visibles: false})
	}
	//排序
	funorder = (e) => {
		if (e === "updated_at") {
			// 时间
			// 时间排序是从小到大
			this.setState({
				order: "updated_at",
				loadingstate: true,
			})
			this.Getalistofworkstwo(e, "", "", "", this.state.page, this.state.limit);
		}

		if (e === "work_score") {
			// 成绩
			//成绩排序是从大到小
			this.setState({
				order: "work_score",
				loadingstate: true,
			})
			this.Getalistofworkstwo(e, "", "", "", this.state.page, this.state.limit);
		}

		if (e === "student_id") {
			//学号
			//学号排序是从大到小
			this.setState({
				order: "student_id",
				loadingstate: true,
			})
			this.Getalistofworkstwo(e, "", "", "", this.state.page, this.state.limit);
		}
	}

	Startsorting = (ordervlue, checkedValuesine, checkedValuesineinfo, searchtext, page, limit) => {
		// console.log("获取作品列表Listofworksstudenttwo");
		var homeworkid = this.props.match.params.homeworkid;
		let urll = `/homework_commons/${homeworkid}/works_list.json`;
		// console.log(homeworkid);

		// search:搜索关键字
		// order:排序方式：更新时间：update_time，最终成绩：work_score，学号：student_id
		// b_order:desc：倒序 ， asc：顺序
		// work_status:0:未提交， 1:按时提交， 2:延时提交，“”不限
		// course_group:分班情况 [232, 231]， []:不限（空数组）
		var order = "asc";
		if (ordervlue === "updated_at") {
			order = "desc";
		}
		var data = {
			search: "",
			order: ordervlue,
			b_order: order,
			work_status: "",
			course_group: "",
			page: page,
			limit: limit,

		}
		axios.post(urll, data).then((result) => {
			if (result !== undefined) {
				if(result.data.message!==undefined){
					return;
				}
				// console.log("学生公开的作品列表")
				// console.log(JSON.stringify(result))
				this.setState({
					teacherdata: result.data,
					task_status: result.data.task_status,
					course_group_info: result.data.course_group_info,
					student_works: result.data.student_works,
					loadingstate: false,
					jobsettingsdata: result,
					publish_immediately: result.data.publish_immediately,
					work_efficiency: result.data.work_efficiency,
					end_immediately: result.data.end_immediately,
					code_review: result.data.code_review,
					challenges_count:result.data.challenges_count,
					view_report:result.data.view_report,
				})
				this.seacthdata(result.data);
				this.props.Getdataback(result,result.data);
			}
		}).catch((error) => {
			console.log(error)
			this.setState({
				loadingstate: false
			})
		})

	}

	TablePagination = (e) => {
		// console.log(e.current);
		// var teacherlists = {  //分页
		// 	total: this.state.student_works.length, //数据总数量
		// 	pageSize: 10,  //一页显示几条
		// 	current: e.current,
		// }
		this.setState({
			page: e.current,
			// teacherlists: teacherlists
		})

	}


	paginationonChangestwo = (pageNumber) => {
		this.setState({
			page: pageNumber,
			loadingstate: true,
		})
		this.Getalistofworkstwo(this.state.order, "", "", "", pageNumber, this.state.limit);
	}
	//计算成绩
	setComputeTime=()=>{
		let matchurl = this.props.match.url;
		let {teacherdata}=this.state;
		this.setState({
			computeTimetype:false
		})
		let homeworkid = this.props.match.params.homeworkid;
		let url = "/homework_commons/"+homeworkid+"/update_student_score.json?shixun_id="+teacherdata.shixun_id;

		axios.get(url).then((response) => {
			if(response){
				if(response.data.status===0) {
					this.props.showNotification(`${response.data.message}`);
					// var homeworkid = this.props.match.params.homeworkid;
					this.Getalistofworks(homeworkid);
					// this.props.history.replace(matchurl);
				}
			}
			// this.Getalistofworkstwo("", "", "", "", 1, 20);
		}).catch((error) => {
			console.log(error)
		});

	}


	//开始排序操作
	Startsortingt = (ordervlue, checkedValuesine, checkedValuesineinfo, searchtext, page, limit) => {
		//要提交的作品状态checkedValuesine
		//要提交的分班状态checkedValuesineinfo
		//searchtext 输入的姓名和学号
		//order 排序时间
		//debug=t 是老师的意思
		// console.log(ordervlue)7009

		var homeworkid = this.props.match.params.homeworkid;
		let urll = `/homework_commons/${homeworkid}/works_list.json?`;
		var order = "asc";
		if (ordervlue === "update_time") {
			order = "desc";
		}
		var checkedValuesines = checkedValuesine;
		var checkedValuesineinfos = checkedValuesineinfo;
		var searchtexts = searchtext
		var data = {
			search: searchtexts,
			order: ordervlue,
			b_order: order,
			work_status: checkedValuesines,
			course_group: checkedValuesineinfos,
			page: page,
			limit: limit,
		}
		// console.log("Startsorting");
		// console.log(data);
		axios.post(urll, data).then((result) => {
			// if (result.status === 200) {/]
			// console.log(url)
			// console.log("作品列表______________________")
			// console.log(JSON.stringify(result))

			if (result !== undefined) {
				if(result.data.message!==undefined){
					return;
				}
				this.setState({
					teacherdata: result.data,
					task_status: result.data.task_status,
					course_group_info: result.data.course_group_info,
					loadingstate: false,
					jobsettingsdata: result,
					allow_late:result.data.allow_late,
					publish_immediately: result.data.publish_immediately,
					work_efficiency: result.data.work_efficiency,
					end_immediately: result.data.end_immediately,
					code_review: result.data.code_review,
					challenges_count:result.data.challenges_count,
				})
				this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page);
				this.props.Getdataback(result,result.data);
				// }
			}
		}).catch((error) => {
			console.log(error)
			this.setState({
				loadingstate: false
			})
		})



	}


	// 设置数据
	seacthdatat = (teacherdata,student_works,work_efficiency,course_group_info) => {

		let {page, limit} = this.state;
		let datalistjs = [];
		let columns = this.state.columns;
		var  columns2js=[];
		// console.log("1614++++++++++++++++++++++=");
		// console.log(student_works);
		// console.log(teacherdata);
		if (student_works !== undefined) {
			// console.log("1618____________________");
			// console.log(student_works);
			// console.log("1588");
			for (var i = 0; i < student_works.length; i++) {
				var timedata = moment(student_works[i].update_time).format('YYYY-MM-DD HH:mm');
				datalistjs.push({
					myid: student_works[i].id,
					number: (parseInt(page) - 1) * parseInt(limit) + (i + 1),
					name: student_works[i].user_name,
					stduynumber: student_works[i].student_id,
					classroom: student_works[i].group_name,
					cost_time: student_works[i].cost_time,
					submitstate:student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "按时提交" :student_works[i].work_status === 2 ? "延时提交" : "未提交",
					// updatetime:this.state.teacherdata.student_works[i].update_time,
					// updatetime:"",
					updatetime: timedata === "Invalid date" ? "--" : timedata,
					completion: student_works[i].complete_count === null ? "0" :student_works[i].complete_count === undefined ? "0": student_works[i].complete_count,
					levelscore: student_works[i].final_score,
					efficiencyscore: student_works[i].eff_score==="0.0"?"--":student_works[i].eff_score==="0"?"--":student_works[i].eff_score,
					finalscore: student_works[i].work_score,
					operating: "查看",
					late_penalty: student_works[i].late_penalty=== null?"0":student_works[i].late_penalty === undefined?"0":student_works[i].late_penalty,
					ultimate_score:student_works[i].ultimate_score,
					user_name: student_works[i].user_name,
					user_login: student_works[i].user_login,
				})

			}

			// var teacherlist = {  //分页
			// 	total: student_works.length, //数据总数量
			// 	pageSize: 20,  //一页显示几条
			// 	current: page,
			// }
			if (work_efficiency === false) {
				if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined||course_group_info === null){
					//这里没有分班 没有 关卡得分 没有效率分
					console.log("1739");
					console.log(this.props.isNotMember());
					for(var i=0;i< this.state.columns.length;i++){
						var item =  this.state.columns[i];

						if(this.props.isNotMember()===true){
							if(item.title==="关卡得分") {
								continue
							}
							if(item.title==="效率分") {
								continue
							}
							if(item.title==="最终成绩") {
								continue
							}
							if(item.title==="学号") {
								continue
							}else{
								columns2js.push(item);
							}
						}else{
							if(item.title==="分班"){
								continue
							}
							if(item.title==="关卡得分"){
								continue
							}
							if(item.title==="效率分"){
								continue
							}else {
								columns2js.push(item);
							}
						}
					}


				}else{
					console.log("1767");
					console.log(this.props.isNotMember());
					if(course_group_info.length < 2){
						for(var i=0;i< this.state.columns.length;i++){
							var item =  this.state.columns[i];

							if(this.props.isNotMember()===true){
								if(item.title==="关卡得分") {
									continue
								}
								if(item.title==="效率分") {
									continue
								}
								if(item.title==="最终成绩") {
									continue
								}
								if(item.title==="学号") {
									continue
								}else{
									columns2js.push(item);
								}
							}else{
								if(item.title==="分班"){
									continue
								}
								if(item.title==="关卡得分"){
									continue
								}
								if(item.title==="效率分"){
									continue
								}
								else {
									columns2js.push(item);
								}
							}
						}

					}else {
						console.log("1795");
						console.log(this.props.isNotMember());
						for(var i=0;i< this.state.columns.length;i++){
							var item =  this.state.columns[i];

							if(this.props.isNotMember()===true){
								if(item.title==="关卡得分") {
									continue
								}
								if(item.title==="效率分") {
									continue
								}
								if(item.title==="最终成绩") {
									continue
								}
								if(item.title==="学号") {
									continue
								}else{
									columns2js.push(item);
								}
							}else{
								if(item.title==="关卡得分"){
									continue
								}
								if(item.title==="效率分"){
									continue
								}else {
								columns2js.push(item);
								}
							}
						}
					}
				}
			}else {
				console.log("1821");
				console.log(this.props.isNotMember());
				if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined || course_group_info === null){


					for(var i=0;i< this.state.columns.length;i++){
						var item =  this.state.columns[i];

						if(this.props.isNotMember()===true){
							if(item.title==="关卡得分") {
								continue
							}
							if(item.title==="效率分") {
								continue
							}
							if(item.title==="最终成绩") {
								continue
							}
							if(item.title==="学号") {
								continue
							}else{
								columns2js.push(item);
							}
						}else{
							if(item.title==="分班"){
								continue
							}else{
												columns2js.push(item);
							}
						}
					}




				}else {
					console.log("1849");
					console.log(this.props.isNotMember());
					if(course_group_info.length < 2) {
						for(var i=0;i< this.state.columns.length;i++){
							var item =  this.state.columns[i];

							if(this.props.isNotMember()===true){
								if(item.title==="关卡得分") {
									continue
								}
								if(item.title==="效率分") {
									continue
								}
								if(item.title==="最终成绩") {
									continue
								}
								if(item.title==="学号") {
									continue
								}else{
									columns2js.push(item);
								}
							}else{
								if(item.title==="分班"){
									continue
								}else{
									columns2js.push(item);
								}

							}
						}
					}
					columns2js=this.state.columnss;
				}
			}

		} else {
		}
		//
		// console.log(datalist);
		// console.log("1712");

		this.setState({
			datajs: datalistjs,
			columns: columns2js,
			loadingstate: false,
		})
	}
	//作品状态
	funtaskstatust = (checkedValues, data) => {

		if (JSON.stringify(checkedValues) === "[]") {
			// console.log(checkedValues);
			this.setState({
				unlimited: 0,
				course_groupyslstwo: [],
				loadingstate: true,
				page:1,
			})
			this.Startsortingt(this.state.orders, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
		} else if (checkedValues.length === data.length) {
			this.setState({
				unlimited: 0,
				course_groupyslstwo: [],
				loadingstate: true,
				page:1,
			})
			this.Startsortingt(this.state.orders, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
		} else {
			// console.log(checkedValues);
			this.setState({
				course_groupyslstwo: checkedValues,
				unlimited: 1,
				loadingstate: true,
				page:1,
			})
			this.Startsortingt(this.state.orders, checkedValues, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
		}

	}
	//作品状态2
	funtaskstatustwot = (checkedValues, data) => {
		// console.log("funtaskstatustwo");
		// console.log(checkedValues);
		if (JSON.stringify(checkedValues) === "[]") {
			// console.log(checkedValues);
			this.setState({
				unlimitedtwo: 1,
				course_groupysls: undefined,
				checkedValuesineinfo:[],
				loadingstate: true,
				page: 1,
			})
			this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, checkedValues, this.state.searchtext, 1, this.state.limit);
		} else if (checkedValues.length === data.length) {
			this.setState({
				unlimitedtwo: 1,
				course_groupysls: undefined,
				checkedValuesineinfo:[],
				loadingstate: true,
				page: 1,
			})
			this.Startsortingt(this.state.orders, this.state.checcourse_groupyslstwokedValuesine, checkedValues, this.state.searchtext, 1, this.state.limit);
		} else {
			this.setState({
				checkedValuesineinfo: checkedValues,
				course_groupysls: checkedValues,
				unlimitedtwo: 0,
				loadingstate: true,
				page: 1,
			})
			this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, checkedValues, this.state.searchtext, 1, this.state.limit);


		}

	}
	//搜索学生 文字输入
	inputSearchValuest = (e) => {
		// console.log(e.target.value)
		if (e.target.value === "") {
			this.setState({
				searchtext: undefined
			})
		} else {
			this.setState({
				searchtext: e.target.value
			})
		}

	}

	//搜索学生按钮输入
	searchValuest = (value) => {
		//点击直接搜索
		//    if(value === ""){
		//        message.error("请输入姓名或学号搜索");
		//        return
		//    }
		this.setState({
			loadingstate: true
		})
		this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, value, this.state.page, this.state.limit);
		// console.log(value)


	}

	// 输入关键字后按回车，自动提交
	onSearchKeywordKeyUpt = (e) => {
		if (e.keyCode === 13) {
			// this.onSearch();
			// console.log("使用了回车键");
			this.setState({
				loadingstate: true
			})
			this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit);
		}
	}
	//排序
	funordert = (e) => {
		if (e === "update_time") {
			// 时间
			// 时间排序是从小到大
			this.setState({
				orders: "update_time",
				loadingstate: true,
			})
			this.Startsortingt("update_time", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit);
		}

		if (e === "work_score") {
			// 成绩
			//成绩排序是从大到小
			this.setState({
				orders: "work_score",
				loadingstate: true,
			})
			this.Startsortingt("work_score", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit);
		}

		if (e === "student_id") {
			//学号
			//学号排序是从大到小
			this.setState({
				order: "student_id",
				loadingstate: true,
			})
			this.Startsortingt("student_id", this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit);
		}
	}


	// 调分

	// 查看学员实训信息
	Viewstudenttraininginformationt = (e) => {
		// console.log("Viewstudenttraininginformation");
		// console.log(e);
		this.setState({
			userids: e.myid,
		})
		this.viewtrainingt(e.myid);
	}
	// 关闭调分
	cancelModulationModels = () => {
		this.setState({visibles: false})
	}
	// 关闭查看
	cancelModulationModel = () => {
		this.setState({visible: false})
	}
	// 调分
	Viewstudenttraininginformations = (e) => {
		// console.log("Viewstudenttraininginformations2");
		// console.log(e.myid);
		this.setState({
			visible: true,
			userid: e.myid,
			// Tune：
		})
	}
	//确定
	saveModulationModal = (value, num) => {
		var userid = this.state.userid;
		const url = `/student_works/${userid}/adjust_score.json`;
		// console.log(url);
		axios.post(url, {
				score: num,
				comment: value
			})
			.then((response) => {
				if (response.data.status == '0') {
					this.setState({visible: false});
					this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit);
					this.props.showNotification(`调分成功`);
				}
			})
			.catch(function (error) {
				console.log(error);
			});
	}

	viewtrainingt = (userids) => {
		// console.log(JSON.stringify(this.props.user))
		var url = `/student_works/${userids}/shixun_work.json`;
		axios.get(url).then((result) => {
			if (result) {
				// console.log("TraineetraininginformationModal.js")
				// console.log(JSON.stringify(result))

				let datalist = [];
				var game_list = result.data.game_list
				var boolgalist=true;
				var experience=0;
				for (var i = 0; i < game_list.length; i++) {

					datalist.push({
						number: "第" + game_list[i].position + "关",
						name: moment(game_list[i].end_time).format('YYYY-MM-DD HH:mm'),
						stduynumber: game_list[i].cost_time,
						classroom: game_list[i].score,
						complete_status: game_list[i].complete_status,
					})
					experience=game_list[i].score+experience;

					if(game_list[i].complete_status === 2 || game_list[i].complete_status===3){
						boolgalist=false;
					}

				}
				// console.log("viewtraining");
				// console.log(datalist);
				// console.log(JSON.stringify(datalist));
				this.setState({
					viewtrainingdata: result.data,
					visibles: true,
					game_list: datalist,
					experience:experience,
					boolgalist:boolgalist,
				})
			}
		}).catch((error) => {

		})
	}


	//立即发布
	homeworkstart = () => {
		let homeworkid = this.props.match.params.homeworkid;
		let url = "/homework_commons/" + homeworkid + "/publish_groups.json";


		axios.get(url).then((response) => {

			if (response.status === 200) {
				let starttime = this.props.getNowFormatDates(1);
				let endtime = this.props.getNowFormatDates(2);
				this.setState({
					modalname: "立即发布",
					modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1,
					svisible: true,
					Topval:"学生将立即收到作业",
					// Botvalleft:"暂不发布",
					Botval:`本操作只对"未发布"的分班有效`,
					starttime: "发布时间：" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
					endtime: "截止时间：" + endtime,
					starttimes:starttime,
					typs:"start",
					Cancelname: "暂不发布",
					Savesname: "立即发布",
					Cancel: this.homeworkhide,
					Saves: this.homeworkstartend,
					course_groups: response.data.course_groups,
				})

			}
		}).catch((error) => {
			console.log(error)
		});

	}
	//立即截止
	homeworkends = () => {
		// console.log("1160");
		let homeworkid = this.props.match.params.homeworkid;
		let url = "/homework_commons/" + homeworkid + "/end_groups.json";

		axios.get(url).then((response) => {

			if (response.status === 200) {
				this.setState({})
				this.setState({
					modalname: "立即截止",
					modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1,
					svisible: true,
					Topval:"学生将不能再提交作业",
					// Botvalleft:"暂不截止",
					Botval:`本操作只对"提交中"的分班有效`,
					Cancelname: "暂不截止",
					Savesname: "立即截止",
					Cancel: this.homeworkhide,
					Saves: this.coursetaskend,
					starttime: undefined,
					endtime: undefined,
					course_groups: response.data.course_groups,
					typs:"end",
				})
			}
		}).catch((error) => {
			console.log(error)
		});
	}
// 立即发布
	homeworkstartend = (ds,endtime) => {
		var homeworkid = this.props.match.params.homeworkid;
		let {course_groupslist} = this.state;

		let coursesId = this.props.match.params.coursesId;
		let url = "/courses/" + coursesId + "/homework_commons/publish_homework.json";
		axios.post(url, {
			homework_ids: [homeworkid],
			group_ids: course_groupslist,
			end_time:endtime,
		}).then((result) => {
			if (result) {
				if (result.data.status === 0) {
					notification.open({
						message: "提示",
						description: result.data.message
					});
					this.homeworkhide()
				}

			}
		}).catch((error) => {
			console.log(error);
		})
	}
	notlimiteds = () => {
		this.setState({
			checkedValuesine: undefined,
			course_groupyslstwo: [],
			unlimited: 0,
			loadingstate: true,
			page:1,
		})
		this.Startsortingt(this.state.orders, [], this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);

	}
	notlimitedst = () => {
		// console.log(this.state.course_group_info);
		this.setState({
			unlimitedtwo: 1,
			checkedValuesineinfo: [],
			course_groupysls: undefined,
			loadingstate: true,
		})
		this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, [], this.state.searchtext, 1, this.state.limit);
	}
	//立即截止确定按钮
	coursetaskend = () => {
		var homeworkid = this.props.match.params.homeworkid;
		let {course_groupslist} = this.state;


		const cid = this.props.match.params.coursesId;
		let url = "/courses/" + cid + "/homework_commons/end_homework.json";
		axios.post(url, {
				group_ids: course_groupslist,
				homework_ids: [homeworkid],
			})
			.then((response) => {
				if (response.data.status == 0) {
					notification.open({
						message: "提示",
						description: response.data.message
					});
					this.homeworkhide()
				}
			})
			.catch(function (error) {
				console.log(error);
			});
	}

	getcourse_groupslist = (id) => {
		this.setState({
			course_groupslist: id
		})

	}

	homeworkhide = () => {
		this.isupdatas()
		this.setState({
			modalname: undefined,
			modaltype: undefined,
			svisible: false,
			Topval: undefined,
			Topvalright: undefined,
			Botvalleft: undefined,
			Botval: undefined,
			starttime: undefined,
			endtime: undefined,
			Cancelname: undefined,
			Savesname: undefined,
			Cancel: undefined,
			Saves: undefined,
			StudentList_value: undefined,
			addname: undefined,
			addnametype: false,
			addnametab: undefined,
			course_groupyslstwo: undefined,
			typs:undefined,
			starttimes:undefined,
		})
	}


	workshowmodel = () => {
		this.setState({
			showmodel: true
		})
	}

	hideshowmodel = () => {
		this.setState({
			showmodel: false
		})
	}

	paginationonChanges = (pageNumber) => {
		this.setState({
			page: pageNumber,
			loadingstate: true,
		})
		this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, pageNumber, this.state.limit);

	}

	setComputeTimet=()=>{

		let matchurl = this.props.match.url;

		this.setState({
			computeTimetype:false
		})
		let homeworkid = this.props.match.params.homeworkid;
		let url = "/homework_commons/"+homeworkid+"/update_score.json";

		axios.get(url).then((response) => {
       if(response){
       	if(response.data.status===0){
			// if(response.data.message!==undefined){
			// 	return;
			// }
			this.setState({
				loadingstate: true
			})
		  this.Getalistofworks(homeworkid);
			this.props.showNotification(`${response.data.message}`);
				}
		  // this.props.history.replace( matchurl );
			 }
		}).catch((error) => {
			console.log(error)
		});

	};
	//
	// setComputeTime=()=>{
	// 	this.setState({
	// 		computeTimetype:false
	// 	})
	// 	let homeworkid = this.props.match.params.homeworkid;
	// 	let url = "/homework_commons/"+homeworkid+"/update_score.json";
	//
	// 	axios.get(url).then((response) => {
	// 		if(response){
	// 			this.props.showNotification(response.data.message);
	// 			this.setState({
	// 				loadingstate: true
	// 			})
	// 			this.Startsortingt(this.state.order, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
	// 		}
	// 	}).catch((error) => {
	// 		console.log(error)
	// 	});
	//
	// }

	daochushixunbaogao=()=>{
    let url =`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}&work_status=${this.state.course_groupyslstwo===undefined ||this.state.course_groupyslstwo===null? "": this.state.course_groupyslstwo}&course_group=${this.state.checkedValuesineinfo===undefined||this.state.checkedValuesineinfo===null? "":this.state.checkedValuesineinfo}&search=${this.state.searchtext===undefined||this.state.searchtext===null?"":this.state.searchtext}`
    this.confirmysl(url);
	}

	daochuzuoye =() =>{
		let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx?group_id=${this.state.checkedValuesineinfo===undefined||this.state.checkedValuesineinfo===null?"":this.state.checkedValuesineinfo}&search=${this.state.searchtext===undefined||this.state.searchtext=== null?"":this.state.searchtext}`
		this.confirmysl(url);
	}



	confirmysl(url){
		axios.get(url + '&export=true').then((response) => {
			if(response === undefined){
				return
			}
			if(response.data.status&&response.data.status===-1){

			}else if(response.data.status&&response.data.status===-2){
				if(response.data.message === "100"){
					// 已超出文件导出的上限数量（100 ），建议：

					this.setState({
						DownloadType:true,
						DownloadMessageval:100
					})
				}else {
					//因附件资料超过500M
					this.setState({
						DownloadType:true,
						DownloadMessageval:500
					})
				}
			}else {
				this.props.showNotification(`正在下载中`);
				window.open("/api"+url, '_blank');
			}
		}).catch((error) => {
			console.log(error)
		});
	}


	Downloadcal=()=>{
		this.setState({
			DownloadType:false,
			DownloadMessageval:undefined
		})
	}
	render() {
		let {columns,course_groupysls,datajs,isAdmin, course_groupyslstwo, unlimited, unlimitedtwo, course_group_info, orders, task_status, checkedValuesine, searchtext, teacherlist, visible,visibles, game_list,columnsstu, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate,computeTimetype} = this.state;

		const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
		// console.log(this.state.student_works);
		// console.log("841");
		// console.log(this.state.columns);
		// console.log(datajs);
		// console.log("2202");
		// console.log(this.props.isAdmin());
	  // console.log("2498");
		// console.log(data);
		// console.log(datas);
		// console.log(this.props.isAdmin());
		return (
			this.props.isAdmin() === true ?
				(
				<div className=" clearfix " style={{margin:  "auto" , minWidth:"1200px"}}>
					{visible === true ? <ModulationModal
						visible={visible}
						Cancel={this.cancelModulationModel}
						Saves={(value, num) => this.saveModulationModal(value, num)}
					/> : ""}

					{this.state.showmodel === true ? <ShixunWorkModal
						{...this.props}
						visible={this.state.showmodel}
						modalname={"代码查重"}
						data={[]}
						issCancel={() => this.hideshowmodel()}
						updatas={() => this.isupdatas()}
					/> : ""}

					<DownloadMessageysl
						{...this.props}
						value={this.state.DownloadMessageval}
						modalCancel={this.Downloadcal}
						modalsType={this.state.DownloadType}

					/>
					{visibles === true ?
						<div>
							<style>
								{
									`
              body {
							 overflow: hidden !important;
						 }
              `
								}
							</style>
							<TraineetraininginformationModal
								{...this.props} {...this.state}
								homeworkid={this.props.match.params.homeworkid}
								coursesId={this.props.match.params.coursesId}
								workid={teacherdata.id}
								isAdmins={this.props.isAdmin()}
								userids={this.state.userids}
								viewtrainingdata={viewtrainingdata}
								game_list={game_list}
								visible={visibles}
								experience={experience}
								boolgalist={boolgalist}
								Cancel={() => this.cancelModulationModels()}
							/>

						</div>
						: ""
					}

					{/*立即发布*/}
					<HomeworkModal
						modaltype={this.state.modaltype}
						modalname={this.state.modalname}
						visible={this.state.svisible}
						Topval={this.state.Topval}
						Topvalright={this.state.Topvalright}
						Botvalleft={this.state.Botvalleft}
						Botval={this.state.Botval}
						starttime={this.state.starttime}
						endtime={this.state.endtime}
						Cancelname={this.state.Cancelname}
						Savesname={this.state.Savesname}
						Cancel={this.state.Cancel}
						Saves={this.state.Saves}
						course_groups={this.state.course_groups}
						getcourse_groupslist={(id) => this.getcourse_groupslist(id)}
						starttimes={this.state.starttimes}
						typs={this.state.typs}
					/>
					<div className={"educontent "}>


						<div className="edu-back-white">


							<style>
								{`
							.startbox{
					    height: 48px;
					    background: rgba(255,104,0,0.1);
					    line-height: 48px;

					    text-align: center;
							}

							.startfont{
							 font-size:14px;
							font-family:MicrosoftYaHei;
							font-weight:400;
							color:rgba(255,104,0,1);
							}

							.computeTime{
								width: 73px;
								height: 24px;
								display: inline-block;
								padding: 5px;
								text-align: center;
								line-height: 13px;
								color: #4CACFF;
								border: 1px solid #4CACFF;
							  cursor: pointer;
							}

							.computeTimes{
							  width: 73px;
								height: 24px;
								display: inline-block;
								padding: 5px;
								text-align: center;
								line-height: 13px;
								color: #C5C5C5;
								border: 1px solid #EDEDED;
								background:#EDEDED;
							  cursor: pointer;
							}
							.shixunSpin{
								color:#FF6801;
							  margin-right: 10px;
							}
							`}
							</style>
							{computeTimetype===false?<li className="clearfix startbox">
							 <Spin indicator={antIcon} spinning={!computeTimetype} className={"shixunSpin"}/>
							<span className={"startfont"}>
			         	正在执行成绩计算，完成后将为您自动刷新结果。温馨提示：执行时间因作品数量而异
							</span>
							</li>:""}

							{/*作品状态GraduationTaskssettinglist*/}
							<ul className="clearfix" style={{padding: '20px 15px 10px 20px'}}>
								<li className="clearfix ">
									<span className="fl  mr10 color-grey-6 ">计算成绩时间：{teacherdata&&teacherdata.calculation_time==null?"--":	moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
									<span>
									{teacherdata&&teacherdata.publish_immediately===false&&computeTimetype===true?
										(this.props.isNotMember()===false?<div className={"computeTime font-13"} onClick={this.setComputeTimet}>
											计算成绩
										</div>:""):
										teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
											(this.props.isNotMember()===false?<div className={"computeTimes font-13"}>
												计算成绩
											</div>:"")
									}
						  	</span>

									<div className="fr mr5 search-newysl" style={{marginBottom: '1px'}}>
										<Search
											placeholder="请输入姓名或学号搜索"
											id="subject_search_input"
											autoComplete="off"
											value={searchtext}
											onKeyUp={(e) => this.onSearchKeywordKeyUpt(e)}
											onInput={this.inputSearchValuest}
											onSearch={this.searchValuest}
										></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={unlimited === 0 ? "pl10 pr10 mr20 check_on" : "pl10 pr10 mr20 "}
																					 onClick={() => this.notlimiteds()}>不限</a></span>
									<CheckboxGroup value={course_groupyslstwo}
																 onChange={(e) => this.funtaskstatust(e, task_status && task_status)}
																 style={{paddingTop: '4px'}}>

										{task_status === undefined ? "" : task_status.map((item, key) => {
											return (
												<span key={key}>
                                <Checkbox value={item.id}
																					key={item.id}
																					className="fl ">{item.name}
																	<span>({item.count})</span>
                                </Checkbox>

                            </span>
											)
										})}
									</CheckboxGroup>
									{/*请输入姓名或学号搜索*/}


								</li>


								{/*分班情况*/}

								<li className="clearfix  mt10 ">
									{JSON.stringify(course_group_info) === "[]" ? "" : course_group_info === undefined ? "" : course_group_info.length < 2 ? "" :
										<div>
											<span className="fl mr10 color-grey-8">分班情况：</span>
											<span className="fl "><a id="graduation_comment_no_limit"
																							 className={unlimitedtwo === 0 ? "pl10 pr10 mr20 " : "pl10 pr10 mr20 check_on"}
																							 onClick={() => this.notlimitedst()}>不限</a></span>
											<CheckboxGroup  value={course_groupysls}
																			onChange={(e) => this.funtaskstatustwot(e, course_group_info && course_group_info)}
																			style={{paddingTop: '4px',width:'1017px'}}>
												{course_group_info === undefined ? "" :
													course_group_info.map((item, key) => {
														return (
															<span key={key}>
                                <Checkbox value={item.course_group_id}
																					key={item.course_group_id}
																					className="fl ">{item.group_group_name}
																	<span>({item.count})</span>
                                            </Checkbox>
                            </span>
														)
													})
												}
											</CheckboxGroup>
										</div>}
								</li>

							</ul>


							<div id="graduation_work_list" style={{padding: '0px 20px 10px 20px'}}>

								<div className="clearfix">
                                <span className="fl color-grey-6 font-12"><span
																	className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.all_member_count}</span>个检索结果（{teacherdata === undefined ? "" : teacherdata.all_member_count}学生） </span>
									<style>
										{
											`
										.edu-position-hide li a:hover {
										  background: #F0F0F0;
										}
										`
										}
									</style>
									<div className="fr  edu-menu-panel">
										<ul>
											<li className="edu-position edu-position-hidebox">
												<a className="font-12">
													{orders === "update_time" ? "时间" : orders === "work_score" ? "成绩" : orders === "student_id" ? "学号" : ""}排序</a>
												<i className="iconfont icon-xiajiantou ml5 font-12 "></i>
												<ul className="edu-position-hide undis mt10">
													<li> <a  onClick={(e) => this.funordert("update_time")} data-remote="true" className=" font-12" style={{textAlign: "center"}}>更新时间</a></li>
													<li> <a  onClick={(e) => this.funordert("work_score")} data-remote="true" className=" font-12" style={{textAlign: "center"}}>最终成绩</a></li>
													<li> <a  onClick={(e) => this.funordert("student_id")} data-remote="true" className=" font-12" style={{textAlign: "center"}}>学生学号</a></li>
												</ul>
											</li>
										</ul>
									</div>


								</div>

							</div>
							{
								JSON.stringify(datajs) === "[]" ?

									<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 "} style={{minHeight: "480px"}}>
										<style>{`
              	          .ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
																			top: 72%;}
						                }
						                .edu-table thead th,.edu-table tbody tr:last-child td{
															border-bottom: none!important;
															height: 58px;
														}
														.ant-tables .ant-table-tbody > tr > td {
														height: 58px;
															}
														.ysltableo .ant-table-thead > tr > th{
																 	height: 58px;
														 }
													 .ysltableo .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
													 padding: 9px;
															}
						              `}</style>
										<div className="edu-table edu-back-white ant-tables ysltableo table1">
											{datajs === undefined ? "" : <Table
												dataSource={datajs}
												columns={columns}
												pagination={false}
												loading={loadingstate}
											/>}
										</div>
									</div>
							}


						</div>
						{
							teacherdata && teacherdata.work_count && teacherdata.work_count > limit ?
								<div className="edu-txt-center mt30 ">
									<Pagination showQuickJumper current={page}
															onChange={this.paginationonChanges} pageSize={limit}
															total={teacherdata.work_count}></Pagination>
								</div>
								: ""
						}
					</div>

				</div>
					)
				:
				(
				<div>
					{
						teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ?
							// 学生不能查看别人的
							<div className=" clearfix "  style={{margin:  "auto" , minWidth:"1200px"}}>
								<style>
									{`
							.startbox{
					    height: 48px;
					    background: rgba(255,104,0,0.1);
					    line-height: 48px;

					    text-align: center;
							}

							.startfont{
							 font-size:14px;
							font-family:MicrosoftYaHei;
							font-weight:400;
							color:rgba(255,104,0,1);
							}
			     	.computeTime{
								width: 73px;
								height: 24px;
								display: inline-block;
								padding: 5px;
								text-align: center;
								line-height: 13px;
								color: #4CACFF;
								border: 1px solid #4CACFF;
							  cursor: pointer;
							}

							.computeTimes{
							  width: 73px;
								height: 24px;
								display: inline-block;
								padding: 5px;
								text-align: center;
								line-height: 13px;
								color: #C5C5C5;
								border: 1px solid #EDEDED;
								background:#EDEDED;
							  cursor: pointer;
							}
							`}
								</style>
								{visibles === true ?
									<div>
										<DownloadMessageysl
											{...this.props}
											value={this.state.DownloadMessageval}
											modalCancel={this.Downloadcal}
											modalsType={this.state.DownloadType}
										/>
										<style>
											{
												`
												body {
												 overflow: hidden !important;
											 }
												`
											}
										</style>
										<TraineetraininginformationModal
											homeworkid={this.props.match.params.homeworkid}
											coursesId={this.props.match.params.coursesId}
											userids={this.state.userids}
											viewtrainingdata={viewtrainingdata}
											game_list={game_list}
											visible={visibles}
											experience={experience}
											boolgalist={boolgalist}
											Cancel={() => this.cancelModulationModels()}
										/>
									</div>
									: ""
								}

								<div className={"educontent "}>
									<div className="edu-back-white" style={{width: "1200"}}>

										<style>
											{
												`
											.shixunSpin{
												color:#FF6801;
												margin-right: 10px;
												}
										`}
										</style>
										{computeTimetype===false?<li className="clearfix startbox mb20">
											<Spin indicator={antIcon} spinning={!computeTimetype} className={"shixunSpin"}/>
									<span className={"startfont"}>
					         	正在执行成绩计算，完成后将为您自动刷新结果。温馨提示：执行时间因作品数量而异
									</span>
										</li>:""}


										{JSON.stringify(data) !== "[]" ?
											<div>
												<div id="graduation_work_list"
														 style={{
															 padding: '20px 20px 10px 20px',
															 marginBottom: "10px"
														 }}>

													<div className="clearfix">

											<span className="fl color-grey-6 font-12">
												<span
													className="color-orange-tip">{teacherdata === undefined ? "0" : teacherdata.commit_count === undefined ? "0" : teacherdata.commit_count}</span>已交<span
												className="ml10">{teacherdata === undefined ? "0" : teacherdata.uncommit_count}</span><span>未交</span>
												{teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" :
													<span className="ml20">{teacherdata.left_time.status}</span>
												}
												{teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" :
													<span className="ml20"
																style={{color: '#FF6800'}}>{teacherdata.left_time.time}</span>
												}
											</span>

														<div className="fr">

															<span className="fl  mr10 color-grey-6 ">计算成绩时间：{teacherdata&&teacherdata.calculation_time==null?"--":	moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
															{teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
													{computeTimetype===true?
														(this.props.isNotMember()===false?
															<div className={"computeTime font-13"} onClick={this.setComputeTime}>
																计算成绩
															</div>
															:"")
														:
														(teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
															this.props.isNotMember()===false?
																<div className={"computeTimes font-13"}>
																	计算成绩
																</div>
																:"")
													}
												</span>}

														</div>

													</div>

												</div>
												<div className={"justify break_full_word new_li"}
														 style={{minHeight: "480px"}}>
													<style>{`
              	          .ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
																			top: 72%;}
						                }
						                .edu-table .ant-table-tbody > tr > td {
														height: 58px;
															}
														.edu-table .ant-table-thead > tr > th{
																 	height: 58px;
														 }
						                	.ysltableow .ant-table-thead > tr > th{
																 	height: 58px;
														 }
														 	.ysltableow .ant-table-tbody > tr > td{
																 	height: 58px;
														 }
						             .ysltableow   .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
													 padding: 9px;
															}
						              `}</style>
													<div className="edu-table edu-back-white  ysltableow table2">
														{data === undefined ? "" : <Table
															dataSource={data}
															columns={columnsstu}
															pagination={false}
															loading={false}
														/>}
													</div>
												</div>
											</div>

											:
											<div id="forum_list" className="forum_table">
												<div className="mh650 edu-back-white">
													<div className="edu-tab-con-box clearfix edu-txt-center">
														<img className="edu-nodata-img mb20"
																 src={getImageUrl("images/educoder/nodata.png")}/>
														<p className="edu-nodata-p mb30">暂时还没有相关数据哦！</p>
													</div>
												</div>

											</div>
										}

									</div>

								</div>

							</div>
							:
							// 学生能查看别人的
							<div className=" clearfix "  style={{margin:  "auto" , minWidth:"1200px"}}>
								<DownloadMessageysl
									{...this.props}
									value={this.state.DownloadMessageval}
									modalCancel={this.Downloadcal}
									modalsType={this.state.DownloadType}
								/>

								{visibles === true ?
									<TraineetraininginformationModal
										homeworkid={this.props.match.params.homeworkid}
										coursesId={this.props.match.params.coursesId}
										userids={this.state.userids}
										viewtrainingdata={viewtrainingdata}
										game_list={game_list}
										visible={visibles}
										experience={experience}
										boolgalist={boolgalist}
										Cancel={() => this.cancelModulationModels()}
									/> : ""
								}
								<div className={"educontent mb20"}>

									<div >
										<style>
											{
												`
											.shixunSpin{
												color:#FF6801;
												margin-right: 10px;
												}
										`}
										</style>

										{computeTimetype===false?<li className="clearfix startbox mb20">
											<Spin indicator={antIcon} spinning={!computeTimetype} className={"shixunSpin"}/>
									<span className={"startfont"}>
						         	正在执行成绩计算，完成后将为您自动刷新结果。温馨提示：执行时间因作品数量而异
									</span>
										</li>:""}

										<style>
											{
												`
												.edu-table .ant-table-tbody > tr > td {
														height: 58px;
															}
														.edu-table .ant-table-thead > tr > th{
																 	height: 58px;
														 }
													.ysltableows .ant-table-thead > tr > th{
																 	height: 58px;
														 }
														 	.ysltableows .ant-table-tbody > tr > td{
																 	height: 58px;
														 }
													 .ysltableows .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
													 padding: 9px;
															}
												`
											}
										</style>
										<div className="edu-table edu-back-white ysltableows table3">
											{data === undefined ? "" : <Table
												style={styletable}
												dataSource={data}
												columns={columnsstu}
												pagination={false}
												loading={false}
											/>}
										</div>
										{JSON.stringify(datas) !== "[]" ?
											<div>
												<div id="graduation_work_list" className="edu-back-white" style={{
													padding: '20px 20px 10px 20px',
													marginBottom: "10px"
												}}>
													<div className="clearfix">
											<span className="fl color-grey-6 font-12">
												<span className="color-orange-tip">
													{teacherdata === undefined ? "0" : teacherdata.commit_count === undefined ? "0" : teacherdata.commit_count}
												</span>已交
												<span className="ml10">{teacherdata === undefined ? "0" : teacherdata.uncommit_count}</span><span>未交</span>
												{teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" :
													<span className="ml20">{teacherdata.left_time.status}</span>}
												{teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" :
													<span className="ml20"
																style={{color: '#FF6800'}}>{teacherdata.left_time.time}</span>}

											</span>
														<style>
															{`
													.startbox{
													height: 48px;
													background: rgba(255,104,0,0.1);
													line-height: 48px;

													text-align: center;
													}

													.startfont{
													 font-size:14px;
													font-family:MicrosoftYaHei;
													font-weight:400;
													color:rgba(255,104,0,1);
													}
												.computeTime{
														width: 73px;
														height: 24px;
														display: inline-block;
														padding: 5px;
														text-align: center;
														line-height: 13px;
														color: #4CACFF;
														border: 1px solid #4CACFF;
														cursor: pointer;
													}

													.computeTimes{
														width: 73px;
														height: 24px;
														display: inline-block;
														padding: 5px;
														text-align: center;
														line-height: 13px;
														color: #C5C5C5;
														border: 1px solid #EDEDED;
														background:#EDEDED;
														cursor: pointer;
													}
													`}
														</style>
														<div className="fr">

															<span className="fl  mr10 color-grey-6 ">计算成绩时间：{teacherdata&&teacherdata.calculation_time==null?"--":	moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
															{teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
													{computeTimetype===true?
														(this.props.isNotMember()===false?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
															计算成绩
														</div>:""):
														teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
															(this.props.isNotMember()===false?<div className={"computeTimes font-13"}>
																计算成绩
															</div>:"")
													}
												 </span>}

														</div>
														{/*因为计算按钮占了和这个位置，和设计沟通学生视角取消这个按钮*/}
														{/*<div className="fr  edu-menu-panel">*/}
														{/*<ul>*/}
														{/*<li className="edu-position edu-position-hidebox">*/}
														{/*<a className="font-12 ">*/}
														{/*{order === "updated_at" ? "时间" : order === "work_score" ? "成绩" : order === "student_id" ? "学号" : ""}排序</a>*/}
														{/*<i className="iconfont icon-xiajiantou ml5 font-12 "></i>*/}
														{/*<ul className="edu-position-hide undis mt10">*/}
														{/*<li><a onClick={(e) => this.funorder("updated_at")} data-remote="true"*/}
														{/*className="color-grey-6 font-12" style={{"text-align": "center "}}>更新时间</a></li>*/}
														{/*<li><a onClick={(e) => this.funorder("work_score")} data-remote="true"*/}
														{/*className="color-grey-6 font-12" style={{"text-align": "center "}}>最终成绩</a></li>*/}
														{/*<li><a onClick={(e) => this.funorder("student_id")} data-remote="true"*/}
														{/*className="color-grey-6 font-12" style={{"text-align": "center "}}>学生学号</a></li>*/}
														{/*</ul>*/}
														{/*</li>*/}
														{/*</ul>*/}
														{/*</div>*/}

													</div>

												</div>

												<div className={"justify break_full_word new_li"}
														 style={{minHeight: "480px"}}>
													<style>{`
              	          .ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
																			top: 72%;}
						                }
						                .edu-table .ant-table-tbody > tr > td {
														height: 58px;
															}
														.edu-table .ant-table-thead > tr > th{
																 	height: 58px;
														 }
						                			.ysltableowss .ant-table-thead > tr > th{
																 	height: 58px;
														 }
														 	.ysltableowss .ant-table-tbody > tr > td{
																 	height: 58px;
														 }
														 .ysltableowss .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
													 padding: 9px;
															}
						              `}</style>
													<div className="edu-table edu-back-white ysltableowss table4">
														{datas === undefined ? "" : <Table
															dataSource={datas}
															columns={columnsstu}
															pagination={false}
															loading={loadingstate}
														/>}
													</div>

												</div>
												{
													teacherdata && teacherdata.work_count && teacherdata.work_count > limit ?
														<div className="edu-txt-center ysyslxh mt30">
															<Pagination showQuickJumper current={page}
																					onChange={this.paginationonChangestwo} pageSize={limit}
																					total={teacherdata.work_count}></Pagination>
														</div>
														: ""
												}
											</div>
											:
											<div id="forum_list" className="forum_table">
												<div className="mh650 edu-back-white">
													<div className="edu-tab-con-box clearfix edu-txt-center">
														<img className="edu-nodata-img mb20"
																 src={getImageUrl("images/educoder/nodata.png")}/>
														<p className="edu-nodata-p mb30">暂时还没有相关数据哦！</p>
													</div>
												</div>

											</div>
										}


										{/*///*/}


									</div>

								</div>

							</div>
					}
				</div>
				)

		)
	}
}

export default Listofworksstudentone;
{/*<div className="stud-class-set bor-bottom-greyE ">*/}
{/*	<div className=" clearfix edu-back-white poll_list">*/}
{/*		<a className="active" onClick={(e)=>this.ChangeTab(0)}>作品列表</a>*/}
{/*		<a onClick={(e)=>this.ChangeTab(1)}>作业问答</a>*/}
{/*		<a*/}
{/*			onClick={(e)=>this.ChangeTab(3)}*/}
{/*		>设置</a>*/}
{/*		{this.state.view_report===true?<a className="fr color-blue font-16" target={"_blank"}*/}
{/*																			href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/shixun_work_report`}>*/}
{/*			查看实训报告*/}
{/*		</a>:""}*/}
{/*		/!*<a className="fr color-blue font-16">查看实训报告</a>*!/*/}
{/*		{*/}
{/*			teacherdata === undefined ? ""*/}
{/*				: teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" :*/}
{/*				<a className="fr color-blue font-16"*/}
{/*					 href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{teacherdata.commit_des}</a>*/}
{/*		}*/}
{/*		{teacherdata === undefined ? "" : <Startshixuntask*/}
{/*			{...this.props}*/}
{/*			data={teacherdata}*/}
{/*		/>}*/}
{/*	</div>*/}
{/*</div>*/}
{/*<div className="stud-class-set bor-bottom-greyE ">*/}
{/*	<div className=" clearfix edu-back-white poll_list">*/}
{/*		<Link className="active" onClick={(e)=>this.ChangeTab(0)}>作品列表</Link>*/}
{/*		<Link onClick={(e)=>this.ChangeTab(1)}>作业问答</Link>*/}
{/*		<Link onClick={(e)=>this.ChangeTab(3)}>设置</Link>*/}
{/*		{this.state.view_report===true?<Link className="fr color-blue font-16" target={"_blank"}*/}
{/*																				 to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/shixun_work_report`}>*/}
{/*			查看实训报告*/}
{/*		</Link>:""}*/}
{/*		{*/}
{/*			teacherdata === undefined ? ""*/}
{/*				: teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" :*/}
{/*				<a className="fr color-blue font-16"*/}
{/*					 href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{teacherdata.commit_des}</a>*/}
{/*		}*/}
{/*		{teacherdata === undefined ? "" : <Startshixuntask*/}
{/*			{...this.props}*/}
{/*			data={teacherdata}*/}
{/*		/>}*/}
{/*	</div>*/}
{/*</div>*/}