import React,{Component} from "React";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Pagination, Table, Divider, Tag,Tooltip} from "antd";
import {Link} from 'react-router-dom';
import { getImageUrl,WordsBtn } from 'educoder';
import axios from 'axios';
import moment from 'moment';
import HomeworkModal from "../../coursesPublic/HomeworkModal";
import Modals from '../../../modals/Modals';
import CoursesListType from '../../coursesPublic/CoursesListType';
import DownloadMessageysl from "../../../modals/DownloadMessageysl";
import ModulationModal from "../../coursesPublic/ModulationModal";
import AllocationModal from "../../coursesPublic/AllocationModal";
import Associationmodel from '../../coursesPublic/Associationmodel';
import AccessoryModal from "../../coursesPublic/AccessoryModal";

const CheckboxGroup = Checkbox.Group;
const Search = Input.Search;
const qs = require('qs');



class GraduationTaskssettinglist extends Component{

	constructor(props){
		super(props)
		this.state={
			coursename:"",
			coursesearch:"",
			title_num:20,
			limit:20,
			title_value:"",
			fileList: [],
			contents: [{val:"",id:1}],
			type:true,
			taskslistdata:undefined,
			data:undefined,
			page:1,
			teacher_comment:null,
			task_status:undefined,
			cross_comment:null,
			search:null,
			order:"updated_at",
			b_order:"desc",
			course_group:undefined,
			loadingstate:true,
			operationId:null,
			Allocationtype:false,
			task_Id:"",
			user_id:"",
			visibles:false,
			DownloadType:false,
			DownloadMessageval:undefined,
		}
	}

	componentDidMount(){
		let{teacher_comment,task_status,course_group,cross_comment,order,b_order,search}=this.state;
		this.seacthdata(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,this.state.page);
	}

	goback=()=>{
		// window.history.back(-1)
		// let courseId=this.props.match.params.coursesId;
		// if(courseId===undefined){
		// 	this.props.history.push("/courses");
		// }else{
	  // this.props.history.push(this.props.current_user.first_category_url);
		// }
		// this.props.history.goBack()
		this.props.history.replace(`/courses/${this.state.taskslistdata.course_id}/graduation_tasks/${this.state.taskslistdata.graduation_id}`);
	}

	seacthdata=(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,pages)=>{
     let{page,limit}=this.state;
		// console.log(teacher_comment,task_status,course_group,cross_comment,order,b_order,search)
		let task_Id=this.props.match.params.task_Id;
		let url="/graduation_tasks/"+task_Id+"/tasks_list.json";
		// let user=this.props.user.user_id;
		//get 数组
		axios.get(url,{
			params: {
				teacher_comment:teacher_comment===null?undefined:teacher_comment,
				task_status:task_status===null?undefined:task_status,
				course_group:course_group===null?undefined:course_group,
				cross_comment:cross_comment===null?undefined:cross_comment,
				order:order===null?undefined:order,
				b_order:b_order===null?undefined:b_order,
				search:search===null?undefined:search,
				page:pages===null?undefined:pages,
				limit:20,
			},
			paramsSerializer: function(params) {
				return qs.stringify(params, {arrayFormat: 'brackets'})
			}
		}).then((result)=> {
			if(result.status===200){
				let datalist = [];
				let worklists = result.data.work_lists;
				if (worklists.length != 0) {

					for (var i = 0; i < worklists.length; i++) {
						datalist.push({
							name: worklists[i].name,
							number: (parseInt(pages)-1)*parseInt(limit)+(i+1),
							stduynumber: worklists[i].student_id,
							classroom: worklists[i].class_grouping_name,
							grouping: result.data.have_grouping === true ? worklists[i].grouping_name : null,
							submitstate: worklists[i].status === 0 ? "未提交" : worklists[i].status === 1 ? "按时提交" : worklists[i].status === 2 ? "延时提交" : "",
							turnovertime:worklists[i].update_time,
							associationitems:result.data.have_grouping==false?"": {name:worklists[i].project_info === undefined ?"--":  worklists[i].project_info.name,id:worklists[i].project_info===undefined?"":worklists[i].project_info.id},
							teacherrating: worklists[i].teacher_comment_score,
							crossrating: {cross_comment_score:worklists[i].cross_comment_score,cross_comment_num:worklists[i].cross_comment_num},
							finalscore: {work_score:worklists[i].final_score.work_score === null ? "--" : worklists[i].final_score.work_score,
								teacher_comment_score:worklists[i].teacher_comment_score,
								cross_comment_score:worklists[i].cross_comment_score,
								late_penalty:worklists[i].late_penalty,
								final_score:worklists[i].final_score,
								ultimate_score:worklists[i].ultimate_score
							},
							operation: this.props.isAdmin()?[{name: worklists[i].assign === true ? "分配" : "", id: worklists[i].id,status:worklists[i].status}, {
								name: "调分",
								id: worklists[i].id,
								status:worklists[i].status
							}, {name:"评阅", id: worklists[i].id,	status:worklists[i].status}]:[{name:"", id: worklists[i].id,
								status:worklists[i].status,view_work:worklists[i].view_work}],
						})
					}
				}
				this.setState({
					taskslistdata: result.data,
					data: datalist,
					loadingstate: false,
				})
			}
		}).catch((error)=>{
			console.log(error)
		})

	}
	TablePagination=(e)=>{

		this.setState({
			page:e.current
		})

	}

	funteachercomment=(list,key)=> {
		// console.log(e.target.value)
		let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search} = this.state;

		let listype =list instanceof Array;
    if(listype===false||list.length===key){
			this.setState({
				teacher_comment:null,
				loadingstate:true
			})
		}else{
			this.setState({
				teacher_comment:list,
				loadingstate:true
			})
		}


		if(list.length===key){
			this.seacthdata(undefined, task_status, course_group, cross_comment, order, b_order, search,this.state.page);
		}else{
			this.seacthdata(list[0], task_status, course_group, cross_comment, order, b_order, search,this.state.page);

		}

	}




	funcross_comment=(e)=>{
		let {teacher_comment, task_status, course_group, order, b_order, search} = this.state;

		this.setState({
			cross_comment:e.target.value===undefined||e.target.value===false?null:e.target.value,
			loadingstate:true
		})
		this.seacthdata(teacher_comment, task_status, course_group, e.target.value===undefined||e.target.value===false?"":e.target.value, order, b_order, search,this.state.page);

	}

	inputSearchValue=(e)=>{

		if(e.target.value===""){
			this.setState({
				search:null
			})
		}else{
			this.setState({
				search:e.target.value
			})
		}


	}

	searchValue=()=>{

		let {teacher_comment, task_status, course_group, cross_comment, order, b_order,search} = this.state;
		this.setState({
			loadingstate:true
		})
		this.seacthdata(teacher_comment, task_status, course_group, cross_comment, order, b_order, search,this.state.page);

	}

	funorder=(value)=>{

		let {teacher_comment, task_status, course_group, cross_comment, b_order, search,order} = this.state;
		let newb_order;
		if(order===value){
			if(b_order==="desc"){

				this.setState({
					order:value,
					b_order:"asc"
				})
				newb_order="asc";
			}else{

				this.setState({
					order:value,
					b_order:"desc"
				})
				newb_order="desc";
			}
		}else{
			if(b_order==="desc"){

				this.setState({
					order:value,
					b_order:"desc"
				})
				newb_order="desc";
			}else{

				this.setState({
					order:value,
					b_order:"asc"
				})
				newb_order="asc";
			}
		}

    this.setState({
	    loadingstate:true
    })
		this.seacthdata(teacher_comment, task_status, course_group, cross_comment, value, newb_order, search,this.state.page);

	}



	funtaskstatus=(checkedValues,key)=>{
		// console.log(checkedValues)

		console.log(checkedValues);

		let {teacher_comment, course_group, cross_comment, order, b_order, search} = this.state;




		if(JSON.stringify(checkedValues)  === "[]"){
			// console.log(checkedValues);
			// 全部没选的时候是空数组
			this.setState({
				task_status:undefined,
				loadingstate:true
			})
			this.seacthdata(teacher_comment, null, course_group, cross_comment, order, b_order, search,this.state.page);
		}else if(checkedValues.length ===key){
			// 全部抖选中 自然就是查找全部 就是空
			this.setState({
				task_status:undefined,
				loadingstate:true
			})
			this.seacthdata(teacher_comment, null, course_group, cross_comment, order, b_order, search,this.state.page);
		}else {
			//选哪个就替换那个
			this.setState({
				task_status:checkedValues===key?null:checkedValues,
				loadingstate:true
			})
			this.seacthdata(teacher_comment, checkedValues===key?undefined:checkedValues, course_group, cross_comment, order, b_order, search,this.state.page);

		}


	}
	groupgroup=(checkedValues,key)=>{
		// console.log(checkedValues);
		// console.log(key);

		let {teacher_comment, task_status, cross_comment, order,b_order, search} = this.state;

		if(JSON.stringify(checkedValues)  === "[]"){
			// console.log(checkedValues);
			// 全部没选的时候是空数组
			this.setState({
				course_group:undefined,
				loadingstate:true
			})
			this.seacthdata(teacher_comment, task_status, null, cross_comment, order, b_order, search,this.state.page);
		}else if(checkedValues.length ===key){
			// 全部抖选中 自然就是查找全部 就是空
			this.setState({
				course_group:undefined,
				loadingstate:true
			})
			this.seacthdata(teacher_comment, task_status, null, cross_comment, order, b_order, search,this.state.page);

		}else {
			//选哪个就替换那个
			this.setState({
				course_group:checkedValues===key?null:checkedValues,
				loadingstate:true
			})
			this.seacthdata(teacher_comment, task_status, checkedValues===key?undefined:checkedValues, cross_comment, order, b_order, search,this.state.page);
		}



	}


	end=()=>{
		// this.homeworkstart()
		this.setState({
			modalname:"立即截止",
			visible:true,
			Topval:"学生将不能再提交作品",
			// Botvalleft:"暂不截止",
			// Botval:`本操作只对"提交中"的分班有效`,
			Cancelname:"暂不截止",
			Savesname:"立即截止",
			Cancel:this.cancelmodel,
			Saves:this.coursetaskend,
			typs:"end",
		})

	}
	//立即发布
	publish=()=>{
		let starttime= this.props.getNowFormatDates(1,1);
		let endtime=this.props.getNowFormatDates(2,1);
		// this.homeworkstart()
		this.setState({
			modalname:"立即发布",
			visible:true,
			Topval:"学生将立即收到毕设任务",
			// Botvalleft:"点击修改",
			// Botval:`本操作只对"未发布"的分班有效`,
			starttime:moment(moment(new Date())).format("YYYY-MM-DD HH:mm") ,
			starttimes:this.props.getNowFormatDates(1),
			typs:"start",
			endtime:endtime,
			Cancelname:"暂不发布",
			Savesname:"立即发布",
			Cancel:this.cancelmodel,
			Saves:this.homepublish,
		})
	}
	//立即发布
	homeworkstart=()=>{
		let coursesId=this.props.match.params.coursesId;
		let url="/courses/"+coursesId+"/all_course_groups.json";

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

			if(response.status===200){
				this.setState({
					modaltype:response.data.course_groups===null||response.data.course_groups.length===0?2:1,
					course_groups:response.data.course_groups,
				})
			}
		}).catch((error) => {
			console.log(error)
		});

	}


	homepublish=(ids,endtime)=>{
		let task_Id=this.props.match.params.task_Id;
		const cid = this.props.match.params.coursesId
		// let url = `/courses/${cid}/graduation_tasks/publish_task.json`;

		let url="/courses/"+cid+"/graduation_tasks/publish_task.json"
		axios.post(url,{
			task_ids:[task_Id],
			group_ids: this.state.course_groupslist,
			end_time:endtime,
		}).then((response)=>{
			if (response.data.status == 0) {
				this.props.showNotification(response.data.message);
				this.searchValue();
				this.cancelmodel();
				this.setState({
					// Modalstopval:response.data.message,
					// ModalSave:this.cancelmodel,
					// Loadtype:true,
					course_groupslist:[],
					checkAllValue:false
				})

			}
		}).catch((error)=>{

		})
	}

	cancelmodel=()=>{

		this.setState({
			Modalstype:false,
			Loadtype:false,
			visible:false,
			Modulationtype:false,
			Allocationtype:false,
			Modalstopval:"",
			ModalCancel:"",
			ModalSave:"",
		})

	}

	coursetaskend=()=>{

		const coursesId = this.props.match.params.coursesId;
		const task_Id = this.props.match.params.task_Id;

		let url = `/courses/${coursesId}/graduation_tasks/end_task.json`;
		axios.post(url,{
			task_ids:[task_Id],
			group_ids: this.state.course_groupslist,
		}).then((response)=>{
			if (response.data.status == 0) {
				this.props.showNotification(response.data.message);
				this.searchValue();
				this.cancelmodel();
				this.setState({
					// Modalstopval:response.data.message,
					// ModalSave:this.cancelmodel,
					// Loadtype:true,
					course_groupslist:[],
					checkAllValue:false
				})

			}

		}).catch((error)=>{

		})
	}


	handaccessory=()=>{
	  // let {taskslistdata}=this.state;
		// let courseId=this.props.match.params.coursesId;
		//
		// let url="/courses/"+courseId+"/graduation_tasks/"+taskslistdata.work_id+"/appraise"
		//
		// window.location.href=url;
		this.setState({
			avisible:true
		})
	}

	Cancelvisible=()=>{
		this.setState({
			avisible:false
		})
	}

	setupdate=()=>{
	  this.searchValue()
	}

	showModulationtype=(id)=>{
		// console.log(id)

		this.setState({
			Modulationtype:true,
			operationId:id
		})

	}

	showAllocationModal=(id)=>{
		this.setState({
			Allocationtype:true,
			operationId:id
		})
	}


	saveModulationModal=(value,num)=>{
		let{teacher_comment,task_status,course_group,cross_comment,order,b_order,search}=this.state;

		let {operationId}=this.state;
		// console.log(value,num)
		let url ="/graduation_works/"+operationId+"/adjust_score.json";
		axios.post(url,{
			score:num,
			comment:value
		}).then((result)=>{
			// console.log(result)
			if(result.data.status===0){
				this.seacthdata(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,this.state.page);
				this.setState({
					Modalstype:true,
					Allocationtype:false,
					Modalstopval:result.data.message,
					ModalSave:this.cancelmodel,
				})
			}

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

	}

	saveAllocationModal=(value)=>{
		let {operationId}=this.state;
		let userid=parseInt(value)
		let url = "/graduation_works/"+operationId+"/assign_teacher.json";
		axios.post(url,{
			user_id:userid
		}).then((result)=>{
			// console.log(result)
			if(result.data.status===0){
				this.setState({
					Modalstype:true,
					Allocationtype:false,
					Modalstopval:result.data.message,
					ModalSave:this.cancelmodel,
				})
			}

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

	cannelAssociation=()=>{

		this.setState({
			Modalstype:true,
			Modalstopval:"确定要取消该项目关联？",
			ModalCancel:this.cannerassocition,
			ModalSave:this.savetassociton
		})

	}

	cannerassocition=()=>{

		this.setState({
			Modalstype:false,
			Modalstopval:"",
			ModalCancel:"",
			ModalSave:"",
			loadtype:false,
			visibles:false
		})

	}

	savetassociton=()=>{
		this.cannerassocition();
		let {taskslistdata}=this.state;
		let url = "/graduation_tasks/"+taskslistdata.task_id+"/graduation_works/cancel_relate_project.json";
		console.log(url)
		axios.get(url).then((result)=>{

			if(result.data.status===0){
				this.searchValue()
				// this.setState({
				// 	Modalstype:true,
				// 	Modalstopval:result.data.message,
				// 	ModalSave:this.cannerassocition,
				// 	loadtype:true
				// })
			}

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

	}


	AssociationItems=()=>{

		this.setState({
			visibles:true
		})
	}

	Cancel=()=>{
		this.setState({
			visibles:false
		})
	}

	skipTop=()=>{
		this.scrollToAnchor("starttime")
		this.cancelmodel()
	}

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

	//教师下面分页搜索入口
	paginationonChanges=(pageNumber)=>{
		this.setState({
			page: pageNumber,
		})
		let{teacher_comment,task_status,course_group,cross_comment,order,b_order,search}=this.state;
		this.seacthdata(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,pageNumber);

	}

	/// 确认是否下载
	confirmysl(url){
		let  {teacher_comment, task_status, course_group, cross_comment, order, b_order, search,page} =this.state;

		let params ={
			teacher_comment:teacher_comment,
			task_status:task_status,
			course_group:course_group,
			cross_comment:cross_comment,
			order:order,
			b_order:b_order,
			search:search,
		}
		axios.get(url + '?export=true',{
			params
		}).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 {coursename,coursesearch,taskname,taskid,taskslistdata,data,page,limit,teacher_comment,task_status,cross_comment,search,loadingstate,
			order, course_group,Modalstype,Modalstopval,ModalCancel,ModalSave,modalname,Modulationtype,operationId,Allocationtype,visibles,
			visible,
			Topval,
			Topvalright,
			Botvalleft,
			Botval,
			starttime,
			endtime,
			Cancelname,
			Savesname,
			Cancel,
			Saves,
			course_groups
		} =this.state;

		  let columns = [{
			title: '序号',
			dataIndex: 'number',
			key: 'number',
			className:'edu-txt-center'
		}, {
			title: '姓名',
			dataIndex: 'name',
			key: 'name',
			className:'edu-txt-center',
			render: (text, record) => (
				<span>
				     <div style={{color:'#9A9A9A'}} className={"studentname"} title={record.name}>{record.name}</div>
		  	</span>
			),
		}, {
			title: '学号',
			dataIndex: 'stduynumber',
			key: 'stduynumber',
			className:'edu-txt-center',
			render: (text, record) => (
				<span>
             <div style={{color:'#9A9A9A'}} className={"studentnumber"} title={record.stduynumber}>{record.stduynumber}</div>
        </span>
			),
		}, {
			title: '分班',
			key: 'classroom',
			dataIndex: 'classroom',
			className:'edu-txt-center',
			render: (text, record) => (
				<span>
             <a style={{color:'#9A9A9A'}}>{record.classroom==="未分班"?"--":record.classroom}</a>
        </span>
			),
		}, {
			title: '分组',
			key: 'grouping',
			dataIndex: 'grouping',
			className:'edu-txt-center',
			render: (text, record) => (
				<span>
             <a  style={{color:'#676767'}}>{record.grouping}</a>
        </span>)
		},{
			title: '关联项目',
			dataIndex: 'associationitems',
			key: 'associationitems',
			className:'edu-txt-center',
			render: (text, record) => (
				<div>
					<a  style={{color:'#4CACFF'}} href={"/projects/"+record.associationitems.id} target={"_blank"}>
						<div className={"projectsdiv"} title={record.associationitems.name}>{record.associationitems.name}</div>
					</a>
				</div>
			),
		},{
			title: '提交状态',
			dataIndex: 'submitstate',
			key: 'submitstate',
			className:'edu-txt-center',
			render: (text, record) => (
				<span>
                <a style={{color:record.submitstate==="按时提交"?'#29BD8B':record.submitstate==="未提交"?"#9A9A9A":"#DD1717"}}>{record.submitstate}</a>
        </span>
			),
		}, {
			title: '更新时间',
			dataIndex: 'turnovertime',
			key: 'turnovertime',
			className:'edu-txt-center',
			render: (text, record) => (
				<span>
             <a style={{color:'#989898'}}>
	             {record.turnovertime===""?"--":moment(record.turnovertime).format('YYYY-MM-DD HH:mm')}
             </a>
        </span>
			),
		}, {
			title: '教师评分',
			key: 'teacherrating',
			dataIndex: 'teacherrating',
			className:'edu-txt-center',
			render: (text, record) => (
				<span>
						<Tooltip placement="bottom" title={record.teacherrating==="--"||record.teacherrating==="未批阅"?"未评阅":""}>
								 <a style={{color:parseInt(record.teacherrating)>90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":record.teacherrating}</a>
						</Tooltip>
				</span>
			),
		}, {
			title: '交叉评分',
			key: 'crossrating',
			dataIndex: 'crossrating',
			className:'edu-txt-center',
			render: (text, record) => (
				<span>
						<Tooltip placement="bottom" title={record.crossrating.cross_comment_score==="--"||record.crossrating.cross_comment_score==="未批阅"?"未评阅":
							<pre>
								{record.crossrating.cross_comment_num}名老师进行了交叉评阅<br/>
								有效平均分：{record.crossrating.cross_comment_score}分
							</pre>}>
							<a style={{color:parseInt(record.crossrating.cross_comment_score)>90?'#DD1717':parseInt(record.crossrating.cross_comment_score)>60&&parseInt(record.crossrating.cross_comment_score)<90?"#FF6800":'#747A7F'}}>{record.crossrating.cross_comment_score==="--"||record.crossrating.cross_comment_score==="未批阅"?"--":record.crossrating.cross_comment_score}</a>
						</Tooltip>
					</span>
			),
		}, {

			title: '最终成绩',
			key: 'finalscore',
			dataIndex: 'finalscore',
			className:'edu-txt-center',
			render: (text, record) => (
				<span>
			 <Tooltip placement="right" title={record.finalscore.work_score==="--"?"未评阅":	<pre>
								{record.finalscore.final_score.username}({record.finalscore.final_score.login})<br/>
							  {record.finalscore.ultimate_score===true?"":"教师评分："+record.finalscore.teacher_comment_score+"分"}<br/>
				        {record.finalscore.cross_comment_score===undefined||record.finalscore.cross_comment_score==="未批阅"?"交叉评分：--":"交叉评分："+record.finalscore.cross_comment_score+"分"}<br/>
				        {record.finalscore.late_penalty===undefined?"":"迟交扣分："+record.finalscore.late_penalty+"分"}<br/>
							  最终成绩：{record.finalscore.work_score}分<br/>
							</pre>}>
						<a style={{color:parseInt(record.finalscore.work_score)>90?'#DD1717':parseInt(record.finalscore.work_score)>60&&parseInt(record.finalscore.work_score)<90?"#FF6800":'#747A7F'}}>{record.finalscore.work_score==="--"?"--":record.finalscore.work_score}</a>
			 </Tooltip>
			 </span>
			),
		}, {
			title: '操作',
			key: 'operation',
		  width:'100px',
			dataIndex: 'operation',
			className:'edu-txt-center',
			render: operation => (
				<div>
					{this.props.isAdmin()?operation.map((tag,key) => {
						return(
							<div key={key}>
								{/*<Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>*/}
																					{/*其它历史评分将全部失效</pre>:""}>*/}

									{/*{tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >*/}
											{/*{tag.name}*/}
										{/*</a>*/}
										{/*:*/}
										{/*<a style={{color:tag.name==="调分"?"#000":'#4CACFF'}}*/}
											 {/*onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}>*/}
											{/*{tag.status===0?"":tag.name}*/}
										{/*</a>*/}
									{/*}*/}

								{/*</Tooltip>*/}
								<Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>
																					其它历史评分将全部失效</pre>:""}>

									{tag.name==="评阅"?<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
											{tag.name}
										</a>
										:
										<a style={{color:tag.name==="调分"?"#000":'#4CACFF'}}
											 onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}>
											{tag.name}
										</a>
									}

								</Tooltip>
							</div>
						)
					}):""}
					{
						this.props.isStudent()?
							operation.map((tag,key) => {
								return(
									<div key={key}>
										{tag.view_work===false?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >查看</a>}
									</div>
								)}
							):""
					}
				</div>

			),
		}];

		let courseId=this.props.match.params.coursesId;
		let position=this.props.match.params.position;
		let category_id=this.props.match.params.category_id;
		let task_Id = this.props.match.params.task_Id;

		if(this.props.isStudent()===true){

			columns.some((item,key)=> {
					if (item.title === "学号") {
					  columns.splice(key, 1)
						return true
					}
				}
			)

		}

		if(taskslistdata&&taskslistdata.course_group_count<=0){

			columns.some((item,key)=> {
					if (item.title === "分班") {
						columns.splice(key, 1)
						return true
					}
				}
			)

		}

     if(taskslistdata&&taskslistdata.cross_comment===false){

			 columns.some((item,key)=> {
					 if (item.title === "交叉评分") {
						 columns.splice(key, 1)
						 return true
					 }
				 }
			 )

		 }
		if(taskslistdata&&taskslistdata.have_project===false){

			columns.some((item,key)=> {
					if (item.title === "关联项目") {
						columns.splice(key, 1)
						return true
					}
				}
			)

		}


		if(taskslistdata&&taskslistdata.have_grouping===false){


			columns.some((item,key)=> {
					if (item.title === "分组") {
						columns.splice(key, 1)
						return true
					}
				}
			)

		}

		return(
			<React.Fragment>

				<div>
					<style>
						{
							`
				 		.projectsdiv{
	          width: 100px;
						overflow: hidden;
						text-overflow: ellipsis;
						white-space: nowrap;
						 }
						 .linbox{
								height: 26px;
						 }
						 .ant-table-tbody>tr>td, .ant-table-thead>tr>th{
						     padding: 16px 10px
						 }

						`
						}
					</style>

					{taskslistdata&&taskslistdata.have_grouping===true||
					taskslistdata&&taskslistdata.have_project===true||
					taskslistdata&&taskslistdata.cross_comment===true?<style>
						{
							`
						 .studentnumber{
						     text-overflow: ellipsis;
									white-space: nowrap;
									width: 105px;
									display: block;
									overflow: hidden;
									margin: 0px auto;
									cursor: default;
						 }
						 .studentname{
					    overflow: hidden;
							text-overflow: ellipsis;
							white-space: nowrap;
							width: 90px;
							margin: 0px auto;
						 }

					`
						}</style>:""}
					{/*提示*/}
					<Modals
						modalsType={Modalstype}
						modalsTopval={Modalstopval}
						modalCancel={ModalCancel}
						modalSave={ModalSave}
						closable={false}
						footer={null}
						destroyOnClose={true}
						centered={true}
					/>

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



					{Allocationtype===true?<AllocationModal
						modalname={"交叉评阅分配"}
						visible={Allocationtype}
						teacherlist={taskslistdata&&taskslistdata.teacher_list}
						Cancelname={"取消"}
						Savesname={"保存"}
						Cancel={this.cancelmodel}
						Saves={(value)=>this.saveAllocationModal(value)}
						closable={false}
						footer={null}
						destroyOnClose={true}
						centered={true}
					/>:""}

					{Modulationtype===true?<ModulationModal
						modalname={"调分"}
						visible={Modulationtype}
						Cancelname={"取消"}
						Savesname={"保存"}
						Cancel={this.cancelmodel}
						Saves={(value,num)=>this.saveModulationModal(value,num)}
						closable={false}
						footer={null}
						destroyOnClose={true}
						centered={true}
					/>:""}

					{/*关联项目*/}
					{visibles===true?
						<Associationmodel
						modalname={"关联项目"}
						visible={visibles}
						Cancel={()=>this.Cancel()}
						taskid={taskslistdata&&taskslistdata.task_id}
						funlist={()=>this.searchValue()}
					  />
					:""}

					{this.state.avisible===true?<AccessoryModal
						{...this.props}
						modalname={"补交附件"}
						visible={this.state.avisible}
						Cancelname={"取消"}
						Savesname={"确认"}
						Cancel={this.Cancelvisible}
						categoryid={taskslistdata.work_id}
						setupdate={this.setupdate}
					/>:""}

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

					/>

					{taskslistdata&&taskslistdata?
						// 教师列表
						this.props.isAdmin()?<div className="newMain clearfix">
								<div className={"educontent mb20"}>

									<p className="clearfix mt10">
										<a className="color-grey-9 fl" onClick={this.goback}>{taskslistdata.course_name}</a>
										<span className="color-grey-9 fl ml3 mr3">&gt;</span>
										<Link className="color-grey-9 fl" to={"/courses/"+courseId+"/graduation_tasks/"+taskslistdata.graduation_id}>{taskslistdata.graduation_name}</Link>
										<span className="color-grey-9 fl ml3 mr3">&gt;</span>
										<span className="color-grey-6 fl">任务详情</span>
									</p>

									<div className="clearfix lineh-25 mt20 mb20 linbox">
										<p className=" fl color-black summaryname lineh-25 "> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id} className="color-grey-3">{taskslistdata.task_name}</Link></p>
										<CoursesListType
											typelist={taskslistdata.task_status}
										/>
										<a className="color-grey-3 fr font-16 ml30 mr20" onClick={this.goback}>返回</a>
									</div>


									<div className="stud-class-set bor-bottom-greyE">
										<div className="mt10 clearfix edu-back-white poll_list pl20">
											{/*<a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xls"} className={"fr color-blue font-16"}>导出成绩</a>*/}
											{/*<a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} className={"fr color-blue font-16"}>导出作品附件</a>*/}
											<Link className="active"  to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>任务列表</Link>
											<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>任务问答</Link>
											<Link style={{paddingLeft:'38px'}}
											      to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting?tab=3"}>设置</Link>

											{/*<a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+task_Id+"/edit"}>编辑任务</a>*/}
											{/*<a className={"fr color-blue font-16"} onClick={this.end}>立即截止</a>*/}


											{/*<a className={"fr color-blue font-16"}>导出作品附件</a>*/}
											<style>
												{ `
													.drop_down_menu{
														height: 118px;
														left:0px;
														width: 121px;
													 }
													.drop_down_menu li {
														 overflow: visible;
															 width: 121px;
														 }
														.drop_down_menu li a{
																 padding:  0px;
																font-size: 14px;
														 }
														 .mt19{
															margin-top:19px;
														 }
														 .drop_down_menu, .drop_down_normal{
																padding-top: 10px;
																padding-bottom: 8px;
														 }
														 .drop_down_menu li .color-dark{
																	color: #666 !important;
															}
													`}
											</style>
											{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}>
												导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
												<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
													<li><a onClick={()=>this.confirmysl("/graduation_tasks/"+task_Id+"/tasks_list.xlsx")} className="color-dark">学生成绩</a></li>
													<li><a onClick={()=>this.confirmysl("/graduation_tasks/"+task_Id+"/tasks_list.zip")} className="color-dark">作品附件</a></li>
												</ul>
											</li>:""}

											{/*<a className={"fr color-blue font-16"}>项目在线质量检测</a>*/}
											{taskslistdata.status===1? <a className={"fr color-blue font-16 mr20"} onClick={() => { this.end()} }>立即截止</a>:""}
											{taskslistdata.status===0?<a className={"fr color-blue font-16 mr20"} onClick={() => { this.publish()} }>立即发布</a>:""}
											 <a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+task_Id+"/edit"}>编辑任务</a>

										</div>
									</div>



									<div className="stud-class-set">

										<div className="clearfix edu-back-white" >
											{/*提示*/}
											{/*<Modals*/}
											{/*modalsType={Modalstype}*/}
											{/*modalsTopval={Modalstopval}*/}
											{/*modalCancel={ModalCancel}*/}
											{/*modalSave={ModalSave}*/}
											{/*/>*/}

											<ul className="clearfix" style={{padding:'20px 40px 10px 40px'}}>

												<li className="clearfix">
													<span className="fl mr10 color-grey-8">教师评阅：</span>

													<span className="fl mr25">
													  <a  id="graduation_comment_no_limit"  alue={null} className={teacher_comment===null?"pl10 pr10 check_on":"pl10 pr10 "} onClick={this.funteachercomment}>不限</a>
												  </span>
													<CheckboxGroup value={teacher_comment} onChange={(e)=>this.funteachercomment(e,taskslistdata.search_assistants&&taskslistdata.search_assistants.teacher_comment.length)} style={{ paddingTop: '4px'}}>
													{taskslistdata.search_assistants && taskslistdata.search_assistants.teacher_comment && taskslistdata.search_assistants.teacher_comment.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>
													<div className="fr mr5 search-new" style={{marginBottom:'1px'}}>
														<Search
															placeholder="请输入姓名或学号搜索"
															id="subject_search_input"
															value={search}
															onInput={this.inputSearchValue}
															onSearch={this.searchValue}
															autoComplete="off"
														></Search>
													</div>

												</li>


												<li className="clearfix">
													<span className="fl mr10 color-grey-8">作品状态：</span>

													<span className="fl mr25">
                          <a  id="graduation_comment_no_limit" className={task_status===null||task_status===undefined?"pl10 pr10 check_on":"pl10 pr10 "}  onClick={()=>this.funtaskstatus([])}>不限</a>
                         </span>

													<CheckboxGroup value={task_status} onChange={(e)=>this.funtaskstatus(e,taskslistdata.search_assistants&&taskslistdata.search_assistants.task_status.length)} style={{ paddingTop: '4px'}}>
														{taskslistdata.search_assistants&&taskslistdata.search_assistants.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>


												{taskslistdata.search_assistants&&taskslistdata.search_assistants.course_group_info.length!=0?<li className="clearfix">
													<span className="fl mr10 color-grey-8">分班情况：</span>
														<div className="fl mr25">
														  <a  id="graduation_comment_no_limit" className={course_group===null||course_group===undefined?"pl10 pr10 check_on":"pl10 pr10 "} onClick={()=>this.groupgroup([])}>不限</a>
													  </div>
														<div className="fl groupList" style={{maxWidth: '945px'}}>
															<CheckboxGroup value={course_group} onChange={(e)=>this.groupgroup(e,taskslistdata.search_assistants&&taskslistdata.search_assistants.course_group_info.length)} style={{width: '1000px', paddingTop: '4px'}}>


																{taskslistdata.search_assistants&&taskslistdata.search_assistants.course_group_info.map((item,key)=>{
																	return(
																		<span key={key}  className={"mt10"}>
																	<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>:""}



												{taskslistdata.search_assistants&&taskslistdata.search_assistants.cross_comment.length===0?"":<li className="clearfix">
													<span className="fl mr10 color-grey-8">交叉评阅：</span>

													<span className="fl mr25">
                             <a  id="graduation_comment_no_limit" value={null} className={cross_comment==null?"pl10 pr10 check_on":"pl10 pr10"} onClick={this.funcross_comment}>不限</a>
                          </span>

													{taskslistdata.search_assistants&&taskslistdata.search_assistants.cross_comment.map((item,key)=>{
														return(
															<span key={key}>
                              <Checkbox value={item.id} className="fl" checked={parseInt(cross_comment)===item.id?true:false} onClick={this.funcross_comment}>{item.name}
	                              <span>({item.count})</span>
                              </Checkbox>
                          </span>
														)
													})}

												</li>}

											</ul>

											<div id="graduation_work_list" style={{padding:'0px 40px 10px 40px'}}>
												<style>
													{
														`
														.edu-menu-lists li:hover {
																	background: #f0f0f0  !important;
															}
															.edu-menu-lists li:hover a{
																			color: #666 !important;
																	}
														`
													}
												</style>
												<div className="clearfix">
													{this.props.isAdmin()===true?<span className="fl color-grey-6 font-12">
														<span className="color-orange-tip">{taskslistdata&&taskslistdata.work_count}</span>
														个检索结果（{taskslistdata&&taskslistdata.work_count} 学生） </span>:""}
													{this.props.isAdmin()===true?<div className="fr color-grey-6 edu-menu-panel">
														<p>
															<a data-remote="true" class="color-grey-6 font-12">
															{order==="updated_at"?"更新时间":order==="work_score"?"最终成绩":order==="student_id"?"学生学号":""}排序</a>
															<i className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i></p>
														<ul className="edu-menu-list edu-menu-lists" style={{width: '87px'}}>
															<li onClick={(e)=>this.funorder("updated_at")}><a data-remote="true">更新时间</a>
															</li>
															<li onClick={(e)=>this.funorder("work_score" )}><a  data-remote="true">最终成绩</a>
															</li>
															<li  onClick={(e)=>this.funorder("student_id" )}><a data-remote="true">学生学号</a>
															</li>
														</ul>
													</div>:""}
												</div>

												{this.props.isStudent()===true?
													<div className="clearfix">
																<span className="mr15 color-grey9">
																	<span className={"color-orange"}>{taskslistdata&&taskslistdata.commit_count}
																	</span> 已交</span>
														<span className="mr15 color-grey9">
																	<span className={"color-orange"}>{taskslistdata&&taskslistdata.uncommit_count}
																	</span> 未交</span>
														{taskslistdata&&taskslistdata.left_time.status===null?"":<Tooltip title={taskslistdata&&taskslistdata.left_time.status} placement="bottom">
																<span className="mr15 color-grey9">
																	{taskslistdata&&taskslistdata.left_time.status} :
																	<span className={"ml10 color-orange"}>
																	{taskslistdata&&taskslistdata.left_time.time}</span>
																</span>
														</Tooltip>}
													</div>
													:""}

											</div>

											{
												JSON.stringify(data)==="[]" ?

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

													</div>
													:
													<div className={"justify break_full_word new_li edu-back-white"} style={{minHeight: "480px"}}>
														<style>{`
              	          .ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
																			top: 72%;}
						                }
						              `}</style>
												<div className="edu-table edu-back-white ">
												{data===undefined?"":<Table
													dataSource={data}
													columns={columns}
													// pagination={{  //分页
													// 	total: taskslistdata&&taskslistdata.work_count, //数据总数量
													// 	pageSize: 20,  //显示几条一页
													// 	current:page,
													// }}
													pagination={false}
													loading={loadingstate}
													onChange={this.TablePagination}
													className="edu-txt-center"
												/>}
												</div>
											</div>
											}

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


								</div>
							</div>:
							// 学生列表
							this.props.isStudent()||this.props.isNotMember()?
								<div className="newMain clearfix">
									<div className={"educontent mb20"}>

										<p className="clearfix mt10">
											<WordsBtn style="grey" className="fl">  <Link to={"/courses/"+courseId+"/graduation_tasks/"+taskslistdata.graduation_id}>{taskslistdata.course_name}</Link></WordsBtn>
											<span className="color-grey-9 fl ml3 mr3">&gt;</span>
											<WordsBtn style="grey" className="fl"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+taskslistdata.graduation_id}className="color-grey-6">{taskslistdata.graduation_name}</Link></WordsBtn>
											<span className="color-grey-9 fl ml3 mr3">&gt;</span>
											<span>任务详情</span>
										</p>

										<div style={{ width:'100%',height:'75px'}} >
											<p className=" fl color-black mt25 summaryname"> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id} className="color-grey-6">{taskslistdata.task_name}</Link></p>
											<CoursesListType
												typelist={taskslistdata.task_status}
												typesylename={"mt22"}
											/>
											<a className="color-grey-6 fr font-16 ml30 mt10 mr20" onClick={this.goback}>返回</a>
										</div>

										<div className="stud-class-set bor-bottom-greyE">
											<div className="mt10 clearfix edu-back-white poll_list pl20">

												<Link className="active"  to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>任务列表</Link>
												<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>任务问答</Link>
												<Link style={{paddingLeft:'38px'}}
												      to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting"}>设置</Link>


												{taskslistdata.work_status===undefined||taskslistdata.work_status===null||taskslistdata.work_status.length===0?"":taskslistdata.work_status.map((item,key)=>{
													return(
														<span key={key}>
														  	{item==="提交作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+task_Id+"/works/new"}>提交作品</a>:""}
														  	{item==="补交作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+task_Id+"/works/new"}>补交作品</a>:""}
																{item==="修改作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+taskslistdata.work_id+"/works/edit"}>修改作品</a>:""}
																{item==="查看作品"?<a className={"fr color-blue font-16"} href={"/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+category_id+"/"+taskslistdata.work_id+"/works/edit"}>查看作品</a> :""}
													  		{item==="创建项目"?<a className={"fr color-blue font-16"} href={'/projects/new'} target="_blank">创建项目</a>:""}
															  {item==="关联项目"?<a className={"fr color-blue font-16"} onClick={this.AssociationItems}>关联项目</a>:""}
														  	{item==="取消关联"?<a className={"fr color-blue font-16"} onClick={this.cannelAssociation}>取消关联</a>:""}
														  	{item==="补交附件"?<a className={"fr color-blue font-16"} onClick={this.handaccessory}>补交附件</a>:""}
														</span>

													)
												})}

												{/*<a className={"fr color-blue font-16"} onClick={this.handaccessory}>补交附件</a>*/}
												{/*<a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation/graduation_tasks/"+task_Id+"/edit"}>编辑任务</a>*/}
												{/*<a className={"fr color-blue font-16"}>立即截止</a>*/}
												{/*<a className={"fr color-blue font-16"}>导出作品附件</a>*/}
												{/*<a className={"fr color-blue font-16"}>导出成绩</a>*/}

											</div>
										</div>



										<div className="stud-class-set ">

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

												{this.props.isNotMember()?<ul className="clearfix" style={{padding:'20px 40px 10px 40px'}}>

													<li className="clearfix">
														<span className="fl mr10 color-grey-8">教师评阅：</span>

														 <span className="fl mr25">
	                             <a  id="graduation_comment_no_limit"  alue={null} className={teacher_comment===null?"pl10 pr10 check_on":"pl10 pr10 "} onClick={this.funteachercomment}>不限</a>
	                           </span>

														<CheckboxGroup value={teacher_comment} onChange={(e)=>this.funteachercomment(e,taskslistdata.search_assistants&&taskslistdata.search_assistants.teacher_comment.length)} style={{ paddingTop: '4px'}}>
														{taskslistdata.search_assistants&&taskslistdata.search_assistants.teacher_comment.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>

														<div className="fr mr5 search-new" style={{marginBottom:'1px'}}>
															<Search
																placeholder="请输入姓名或学号搜索"
																id="subject_search_input"
																value={search}
																onInput={this.inputSearchValue}
																onSearch={this.searchValue}
																autoComplete="off"
															></Search>
														</div>

													</li>


													<li className="clearfix">
														<span className="fl mr10 color-grey-8">作品状态：</span>

														<span className="fl mr25">
                              <a  id="graduation_comment_no_limit" className={task_status===null|| task_status===undefined?"pl10 pr10 check_on":"pl10 pr10 "}  onClick={()=>this.funtaskstatus([])}>不限</a>
                            </span>

														<CheckboxGroup value={task_status} onChange={(e)=>this.funtaskstatus(e,taskslistdata.search_assistants&&taskslistdata.search_assistants.task_status.length)} style={{ paddingTop: '4px'}}>
														{taskslistdata.search_assistants&&taskslistdata.search_assistants.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>


													{taskslistdata.search_assistants&&taskslistdata.search_assistants.course_group_info.length!=0?<li className="clearfix">
														<span className="fl mr10 color-grey-8">分班情况：</span>

														<span className="fl mr25">
			                          <a  id="graduation_comment_no_limit" className={course_group===null||course_group===undefined?"pl10 pr10 check_on":"pl10 pr10 "} onClick={()=>this.groupgroup([])}>不限</a>
			                      </span>

														<CheckboxGroup value={course_group} onChange={(e)=>this.groupgroup(e,taskslistdata.search_assistants&&taskslistdata.search_assistants.course_group_info.length)} style={{ paddingTop: '4px'}}>
															{taskslistdata.search_assistants&&taskslistdata.search_assistants.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>
													</li>:""}



													{taskslistdata.search_assistants&&taskslistdata.search_assistants.cross_comment.length===0?"":<li className="clearfix">
														<span className="fl mr10 color-grey-8">交叉评阅：</span>

														<span className="fl mr25">
                             <a  id="graduation_comment_no_limit" value={null} className={cross_comment==null?"pl10 pr10 check_on":"pl10 pr10"} onClick={this.funcross_comment}>不限</a>
                          </span>

														{taskslistdata.search_assistants&&taskslistdata.search_assistants.cross_comment.map((item,key)=>{
															return(
																<span key={key}>
                              <Checkbox value={item.id} className="fl" checked={parseInt(cross_comment)===item.id?true:false} onClick={this.funcross_comment}>{item.name}
	                              <span>({item.count})</span>
                              </Checkbox>
                          </span>
															)
														})}

													</li>}

												</ul>:""}


												<div id="graduation_work_list" style={{ padding: '18px 40px 10px',height: '56px'}}>

														{this.props.isAdmin()===true?
															<div className="clearfix">
																	<span className="fl color-grey-6 font-12">
																		<span className="color-orange-tip">{taskslistdata&&taskslistdata.work_count}</span>
																		个检索结果（{taskslistdata&&taskslistdata.work_count} 学生）
																	</span>
																	 <div className="fr color-grey-6 edu-menu-panel">
																		<p><a data-remote="true">
																			{order==="updated_at"?"时间":order==="work_score"?"成绩":order==="student_id"?"学号":""}排序</a><i
																			className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i></p>
																		<ul className="edu-menu-list">
																			<li onClick={(e)=>this.funorder("updated_at")} className={order==="updated_at"?"none":""}><a data-remote="true">时间</a>
																			</li>
																			<li onClick={(e)=>this.funorder("work_score" )} className={order==="work_score"?"none":""}><a  data-remote="true">成绩</a>
																			</li>
																			<li  onClick={(e)=>this.funorder("student_id" )} className={order==="student_id"?"none":""}><a data-remote="true">学号</a>
																			</li>
																		</ul>
																	</div>
															</div>
															:""}


														{this.props.isStudent()===true?
															<div className="clearfix">
																<span className="mr15 color-grey9">
																	<span className={"color-orange"}>{taskslistdata&&taskslistdata.commit_count}
																	</span> 已交</span>
																<span className="mr15 color-grey9">
																	<span className={"color-orange"}>{taskslistdata&&taskslistdata.uncommit_count}
																	</span> 未交</span>
																{taskslistdata&&taskslistdata.left_time.status===null?"":<Tooltip title={taskslistdata&&taskslistdata.left_time.status} placement="bottom">
																<span className="mr15 color-grey9">
																	{taskslistdata&&taskslistdata.left_time.status} :
																	<span className={"ml10 color-orange"}>
																	{taskslistdata&&taskslistdata.left_time.time}</span>
																</span>
																</Tooltip>}
															</div>
															:""}



												</div>


												{
													JSON.stringify(data) === "[]" ?

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

														</div>
														:

														<div className={"justify break_full_word new_li edu-back-white"}
															 style={{minHeight: "480px"}}>
															<style>{`
              	          .ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
																 top: 72%;
																 }

						                .ant-table-thead > tr > th, .ant-table-tbody > tr > td{
                                 text-align: center;
						                }
						              `}</style>
															<div className="edu-table edu-back-white ">
																{data === undefined ? "" : <Table
																	dataSource={data}
																	columns={columns}
																	pagination={false}
																	loading={loadingstate}
																	onChange={this.TablePagination}
																	className="edu-txt-center"
																/>}
															</div>
														</div>

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


									</div>
								</div>


								:""
						:""}


				</div>

			</React.Fragment>

		)
	}
}

export default GraduationTaskssettinglist;