@ -1,19 +1,10 @@
import React , { Component } from "react" ;
import CoursesListType from '../coursesPublic/CoursesListType' ;
import { getRandomcode , publicSearchs , sortDirections } from 'educoder' ;
import {
Form ,
Select ,
Input ,
Button ,
Checkbox ,
Upload ,
Icon ,
message ,
Modal ,
Table ,
Pagination ,
Radio ,
Tooltip ,
notification ,
Spin ,
@ -30,18 +21,16 @@ 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 OneSelfOrderModal from "../coursesPublic/OneSelfOrderModal" ;
import ShixunWorkModal from "./Shixunworkdetails/ShixunWorkModal" ;
import NoneData from '../../../modules/courses/coursesPublic/NoneData' ;
import Chongzuomodel from "./Chongzuomodel" ;
import NoneDatas from "../signin/component/NoneDatas" ;
const Search = Input . Search ;
const RadioGroup = Radio . Group ;
const CheckboxGroup = Checkbox . Group ;
const { Option } = Select ;
//GraduationTaskssetting.js
//作品列表(学生)
let allow _lates = false ;
@ -65,6 +54,8 @@ class Listofworksstudentone extends Component {
//关卡得分final_score
this . state = {
Chongzuomodeltype : undefined ,
chongzuoId : undefined ,
searchtypes : false ,
jobsettingsdata : undefined ,
endTime : "2018/11/10 17:10:00" ,
@ -280,7 +271,11 @@ class Listofworksstudentone extends Component {
width : '98px' ,
render : ( text , record ) => (
< span style = { { width : '98px' , } } >
< span style = { record . submitstate === "迟交通关" ? {
< span style = { record . submitstate === "重做中" ? {
color : '#FF8432' ,
textAlign : "center" ,
width : '98px' ,
} : record . submitstate === "迟交通关" ? {
color : '#DD1717' ,
textAlign : "center" ,
width : '98px' ,
@ -510,7 +505,7 @@ class Listofworksstudentone extends Component {
) ,
} ,
] ,
orders : " update_tim e",
orders : " work_scor e",
columnsstu2 : [
{
title : '序号' ,
@ -675,7 +670,11 @@ class Listofworksstudentone extends Component {
width : '98px' ,
render : ( text , record ) => (
< span style = { { width : '98px' , } } >
< span style = { record . submitstate === "迟交通关" ? {
< span style = { record . submitstate === "重做中" ? {
color : '#FF8432' ,
textAlign : "center" ,
width : '98px' ,
} : record . submitstate === "迟交通关" ? {
color : '#DD1717' ,
textAlign : "center" ,
width : '98px' ,
@ -906,7 +905,7 @@ class Listofworksstudentone extends Component {
) ,
} ,
] ,
b _order : "desc" ,
// b_order: "desc",
myorders : "desc" ,
allow _late : false ,
checkedValuesine : undefined ,
@ -1029,7 +1028,11 @@ class Listofworksstudentone extends Component {
align : 'center' ,
className : 'font-14' ,
render : ( text , record ) => (
< span style = { record . submitstate === "迟交通关" ? {
< span style = { record . submitstate === "重做中" ? {
color : '#FF8432' ,
textAlign : "center" ,
width : '98px' ,
} : record . submitstate === "迟交通关" ? {
color : '#DD1717' ,
textAlign : "center"
} : record . submitstate === "按时通关" ? { color : '#29BD8B' , textAlign : "center" }
@ -1294,20 +1297,38 @@ class Listofworksstudentone extends Component {
display : 'block' ,
align : 'center' ,
className : 'font-14' ,
width : '40px' ,
width : '80px' ,
render : ( text , record ) => (
record . submitstate === "未开启" ?
< a style = { { textAlign : "center" , width : '40px' } } className = "color-blue"
onMouseDown = { ( e ) => this . Viewstudenttraininginformationtysl2 ( e , record ) }
// onClick={() => this.Viewstudenttraininginformationt(record)}
> { record . has _comment === true ? "详情" : "评阅 " } < / a > :
< span >
< a style = { { textAlign : "center" } } className = "color-blue"
onMouseDown = { ( e ) => this . Viewstudenttraininginformationtysl2 ( e , record ) }
// onClick={() => this.Viewstudenttraininginformationt(record)}
> { record . has _comment === true ? "详情" : "评阅 " } < / a >
< / s p a n >
< div >
< a style = { { textAlign : "center" , width : '40px' } } className = "color-blue"
onMouseDown = { ( e ) => this . Viewstudenttraininginformationtysl2 ( e , record ) }
> { record . has _comment === true ? "已评阅" : "评阅 " } < / a >
< / d i v >
{ this . props . teacherdatapage === undefined ? "" : this . props . teacherdatapage . homework _status [ 0 ] === "已截止" ? "" : record . myshixun _id === 0 ? "" : < div >
< a style = { { textAlign : "center" , width : '40px' } } className = "color32C090"
onMouseDown = { ( e ) => this . chongzuofun ( record . myshixun _identifier ) }
> 重做 < / a >
< / d i v > }
< / s p a n > :
< span >
< div >
< a style = { { textAlign : "center" } } className = "color-blue"
onMouseDown = { ( e ) => this . Viewstudenttraininginformationtysl2 ( e , record ) }
> { record . has _comment === true ? "已评阅" : "评阅 " } < / a >
< / d i v >
{ this . props . teacherdatapage === undefined ? "" : this . props . teacherdatapage . homework _status [ 0 ] === "已截止" ? "" : record . myshixun _id === 0 ? "" : < div >
< a style = { { textAlign : "center" , width : '40px' } } className = "color32C090"
onMouseDown = { ( e ) => this . chongzuofun ( record . myshixun _identifier ) }
> 重做 < / a >
< / d i v > }
< / s p a n >
)
} ,
] ,
@ -1408,7 +1429,11 @@ class Listofworksstudentone extends Component {
align : 'center' ,
className : 'font-14' ,
render : ( text , record ) => (
< span style = { record . submitstate === "迟交通关" ? {
< span style = { record . submitstate === "重做中" ? {
color : '#FF8432' ,
textAlign : "center" ,
width : '98px' ,
} : record . submitstate === "迟交通关" ? {
color : '#DD1717' ,
textAlign : "center"
} : record . submitstate === "按时通关" ? { color : '#29BD8B' , textAlign : "center" }
@ -1662,19 +1687,37 @@ class Listofworksstudentone extends Component {
display : 'block' ,
align : 'center' ,
className : 'font-14' ,
width : ' 4 0px',
width : ' 8 0px',
render : ( text , record ) => (
record . submitstate === "未开启" ?
< a style = { { textAlign : "center" , width : '40px' } } className = "color-blue"
onMouseDown = { ( e ) => this . Viewstudenttraininginformationtysl2 ( e , record ) }
// onClick={() => this.Viewstudenttraininginformationt(record)}
> { record . has _comment === true ? "详情" : "评阅" } < / a > :
< span >
< div >
< a style = { { textAlign : "center" , width : '40px' } } className = "color-blue"
onMouseDown = { ( e ) => this . Viewstudenttraininginformationtysl2 ( e , record ) }
// onClick={() => this.Viewstudenttraininginformationt(record)}
> { record . has _comment === true ? "已评阅" : "评阅" } < / a >
< / d i v >
{ this . props . teacherdatapage === undefined ? "" : this . props . teacherdatapage . homework _status [ 0 ] === "已截止" ? "" : record . myshixun _id === 0 ? "" : < div >
< a style = { { textAlign : "center" , width : '40px' } } className = "color32C090"
onMouseDown = { ( e ) => this . chongzuofun ( record . myshixun _identifier ) }
> 重做 < / a >
< / d i v > }
< / s p a n > :
< span >
< a style = { { textAlign : "center" } } className = "color-blue"
< div >
< a style = { { textAlign : "center" } } className = "color-blue"
onMouseDown = { ( e ) => this . Viewstudenttraininginformationtysl2 ( e , record ) }
// onClick={() => this.Viewstudenttraininginformationt(record)}
> { record . has _comment === true ? "详情" : "评阅" } < / a >
< / s p a n >
> { record . has _comment === true ? "已评阅" : "评阅" } < / a >
< / d i v >
{ this . props . teacherdatapage === undefined ? "" : this . props . teacherdatapage . homework _status [ 0 ] === "已截止" ? "" : record . myshixun _id === 0 ? "" : < div >
< a style = { { textAlign : "center" , width : '40px' } } className = "color32C090"
onMouseDown = { ( e ) => this . chongzuofun ( record . myshixun _identifier ) }
> 重做 < / a >
< / d i v > }
< / s p a n >
)
} ,
] ,
@ -1707,6 +1750,34 @@ class Listofworksstudentone extends Component {
this . Getalistofworks ( homeworkid , false ) ;
}
Updatetimedropdon = ( ) => {
let ooders = ""
if ( this . state . orders !== "update_time" ) {
ooders = "desc" ;
} else {
//不是更新时间
if ( this . state . myorders === "desc" ) {
//升序
ooders = "asc" ;
} else if ( this . state . myorders === "asc" ) {
//降序
ooders = "desc" ;
}
}
this . setState ( {
myorders : ooders ,
orders : "update_time" ,
datajs : undefined ,
loadingstate : true ,
} )
this . Startsortingt ( "update_time" , this . state . course _groupyslstwo , this . state . checkedValuesineinfo , this . state . searchtext , this . state . page , this . state . limit , ooders ) ;
}
//实训作业tbale 列表塞选数据
table1handleChange = ( pagination , filters , sorter ) => {
//"ascend" 升序
@ -2073,7 +2144,7 @@ class Listofworksstudentone extends Component {
classroom : teacherdata . group _name ,
cost _time : teacherdata . cost _time ,
has _comment : teacherdata . has _comment ,
submitstate : teacherdata . work _status === 0 ? "未开启" : teacherdata . work _status === 1 ? "未通关" : teacherdata . work _status === 2 ? "按时通关" : "迟交通关" ,
submitstate : teacherdata . work _status === - 1 ? "重做中" : 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 ,
@ -2119,7 +2190,9 @@ class Listofworksstudentone extends Component {
classroom : student _works [ i ] . group _name ,
cost _time : student _works [ i ] . cost _time ,
has _comment : student _works [ i ] . has _comment ,
submitstate : student _works [ i ] . work _status === 0 ? "未开启" : student _works [ i ] . work _status === 1 ? "未通关" : student _works [ i ] . work _status === 2 ? "按时通关" : "迟交通关" ,
myshixun _id : student _works [ i ] . myshixun _id ,
myshixun _identifier : student _works [ i ] . myshixun _identifier ,
submitstate : student _works [ i ] . work _status === - 1 ? "重做中" : 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 ,
@ -2281,7 +2354,7 @@ class Listofworksstudentone extends Component {
classroom : teacherdata . group _name ,
cost _time : teacherdata . cost _time ,
has _comment : teacherdata . has _comment ,
submitstate : teacherdata . work _status === 0 ? "未开启" : teacherdata . work _status === 1 ? "未通关" : teacherdata . work _status === 2 ? "按时通关" : "迟交通关" ,
submitstate : teacherdata . work _status === - 1 ? "重做中" : 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 ,
@ -2614,7 +2687,7 @@ class Listofworksstudentone extends Component {
} ) . catch ( ( error ) => {
console . log ( error )
this . setState ( {
loadingstate : false
loadingstate : false ,
} )
} )
@ -2646,7 +2719,9 @@ class Listofworksstudentone extends Component {
classroom : student _works [ i ] . group _name ,
cost _time : student _works [ i ] . cost _time ,
has _comment : student _works [ i ] . has _comment ,
submitstate : student _works [ i ] . work _status === 0 ? "未开启" : student _works [ i ] . work _status === 1 ? "未通关" : student _works [ i ] . work _status === 2 ? "按时通关" : "迟交通关" ,
myshixun _id : student _works [ i ] . myshixun _id ,
myshixun _identifier : student _works [ i ] . myshixun _identifier ,
submitstate : student _works [ i ] . work _status === - 1 ? "重做中" : 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 ,
@ -3442,6 +3517,19 @@ class Listofworksstudentone extends Component {
} )
}
chongzuofun = ( id ) => {
this . setState ( {
chongzuoId : id ,
Chongzuomodeltype : true
} )
}
hideChongzuomodeltype = ( ) => {
this . setState ( {
chongzuoId : undefined ,
Chongzuomodeltype : false
} )
}
render ( ) {
let { columns , columnss , course _groupysls , datajs , isAdmin , homework _status , course _groupyslstwo , unlimited , unlimitedtwo , course _group _info , orders , task _status , checkedValuesine , searchtext , teacherlist , visible , visibles , game _list , columnsstu , columnsstu2 , limit , experience , boolgalist , viewtrainingdata , teacherdata , page , data , jobsettingsdata , styletable , datas , order , loadingstate , computeTimetype } = this . state ;
@ -3479,10 +3567,39 @@ class Listofworksstudentone extends Component {
}
}
}
let Teachercolumns = columns ;
if ( this . state . orders && this . state . orders === "update_time" ) {
if ( Teachercolumns ) {
if ( Teachercolumns . length > 0 ) {
Teachercolumns . map ( ( item , key ) => {
if ( item . key ) {
if ( item . key === "work_score" ) {
//去掉成绩默认排序
item . defaultSortOrder = "" ;
}
}
} )
}
}
}
return (
this . props . isAdmin ( ) === true ?
< div className = " clearfix " style = { { margin : "auto" , minWidth : "1200px" } } >
{ this . state . Chongzuomodeltype === true ? < Chongzuomodel
{ ... this . props }
{ ... this . state }
hideChongzuomodeltype = { ( ) => this . hideChongzuomodeltype ( ) }
Isupdatass = { ( ) => this . Isupdatass ( ) }
/ > : " " }
{ visible === true ? < ModulationModal
visible = { visible }
Cancel = { ( ) => this . cancelModulationModel ( ) }
@ -3733,12 +3850,34 @@ class Listofworksstudentone extends Component {
< / u l >
< style >
{
`
. fiilssort {
position : absolute ;
top : - 9 px ;
}
. colorddd {
color : # b7b7b7 ;
}
`
}
< / s t y l e >
< 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 . work _count && teacherdata . work _count } < / s p a n > 个 检 索 结 果 ( { t e a c h e r d a t a = = = u n d e f i n e d ? " " : t e a c h e r d a t a . a l l _ m e m b e r _ c o u n t & & t e a c h e r d a t a . a l l _ m e m b e r _ c o u n t } 学 生 ) < / s p a n >
< div className = { "fr drop_down xiaoshou" } onClick = { ( ) => this . Updatetimedropdon ( ) } >
< span className = { "color-blue" } > 更新时间 < / s p a n >
< sapn className = "relativef ml5" style = { { "top" : "2px" } } >
< i className = { this . state . orders && this . state . orders === "update_time" && this . state . myorders === "asc" ?
"iconfont icon-sanjiaoxing-up font-12 color-blue fiilssort" : "iconfont icon-sanjiaoxing-up font-12 fiilssort colorddd" } > < / i >
< i className = { this . state . orders && this . state . orders === "update_time" && this . state . myorders === "desc" ?
"iconfont icon-sanjiaoxing-down font-12 yslbottomsj color-blue" : "iconfont icon-sanjiaoxing-down font-12 yslbottomsj colorddd" } > < / i >
< / s a p n >
< / d i v >
< style >
{
`
@ -3788,13 +3927,32 @@ class Listofworksstudentone extends Component {
` }</style>
< div className = "edu-table edu-back-white ant-tables ysltableo table1" >
< Spin tip = "正在加载..." spinning = { loadingstate } >
{ datajs === undefined ? "" : < Table
dataSource = { datajs }
columns = { columns }
pagination = { false }
onChange = { this . table1handleChange }
loading = { false }
/ > }
{ datajs === undefined ?
< div style = { {
minHeight : "400px" ,
width : "100%"
} } >
< / d i v >
:
(
this . state . orders && this . state . orders === "update_time" ?
< Table
dataSource = { datajs }
columns = { Teachercolumns }
pagination = { false }
onChange = { this . table1handleChange }
loading = { false }
/ >
:
< Table
dataSource = { datajs }
columns = { Teachercolumns }
pagination = { false }
onChange = { this . table1handleChange }
loading = { false }
/ >
)
}
< / S p i n >
< / d i v >