|
|
|
@ -899,10 +899,11 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
)
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
yslpros:false,
|
|
|
|
|
}
|
|
|
|
|
console.log("902");
|
|
|
|
|
console.log("902");
|
|
|
|
|
console.log(this.props);
|
|
|
|
|
// console.log("902");
|
|
|
|
|
// console.log("902");
|
|
|
|
|
// console.log(this.props);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
componentDidCatch(error, info){
|
|
|
|
@ -912,19 +913,32 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
componentWillReceiveProps(nextProps) {
|
|
|
|
|
console.log("+++++++++913");
|
|
|
|
|
console.log("+++++++++915");
|
|
|
|
|
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(this.props.isAdmin());
|
|
|
|
|
if(this.props.isAdmin() === true){
|
|
|
|
|
this.tearchar();
|
|
|
|
|
console.log("909");
|
|
|
|
|
// console.log("909");
|
|
|
|
|
}else{
|
|
|
|
|
this.student();
|
|
|
|
|
console.log("911");
|
|
|
|
|
// console.log("911");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1095,7 +1109,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
console.log(teacherdata)
|
|
|
|
|
// console.log(teacherdata)
|
|
|
|
|
if (teacherdata.id !== undefined || teacherdata.id !== null || teacherdata.id !== "") {
|
|
|
|
|
// console.log("seacthdata设置数据1")
|
|
|
|
|
// console.log(this.state.teacherdata )
|
|
|
|
@ -1165,8 +1179,8 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
console.log("554");
|
|
|
|
|
console.log(columns2);
|
|
|
|
|
// console.log("554");
|
|
|
|
|
// console.log(columns2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
@ -1591,13 +1605,13 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
|
|
|
|
|
// 设置数据
|
|
|
|
|
seacthdatat = (teacherdata,student_works,work_efficiency,course_group_info) => {
|
|
|
|
|
debugger
|
|
|
|
|
|
|
|
|
|
let {page, limit} = this.state;
|
|
|
|
|
let datalist = [];
|
|
|
|
|
let columns = this.state.columns;
|
|
|
|
|
var columns2=[];
|
|
|
|
|
if (teacherdata !== undefined) {
|
|
|
|
|
console.log("1588");
|
|
|
|
|
// 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');
|
|
|
|
|
datalist.push({
|
|
|
|
@ -1621,8 +1635,8 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
user_name: student_works[i].user_name,
|
|
|
|
|
user_login: student_works[i].user_login,
|
|
|
|
|
})
|
|
|
|
|
console.log(datalist);
|
|
|
|
|
console.log("1612");
|
|
|
|
|
// console.log(datalist);
|
|
|
|
|
// console.log("1612");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1719,9 +1733,9 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
console.log(datalist);
|
|
|
|
|
console.log("1712");
|
|
|
|
|
//
|
|
|
|
|
// console.log(datalist);
|
|
|
|
|
// console.log("1712");
|
|
|
|
|
this.setState({
|
|
|
|
|
data: datalist,
|
|
|
|
|
columns: columns2,
|
|
|
|
@ -2004,7 +2018,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
}
|
|
|
|
|
//立即截止
|
|
|
|
|
homeworkends = () => {
|
|
|
|
|
console.log("1160");
|
|
|
|
|
// console.log("1160");
|
|
|
|
|
let homeworkid = this.props.match.params.homeworkid;
|
|
|
|
|
let url = "/homework_commons/" + homeworkid + "/end_groups.json";
|
|
|
|
|
|
|
|
|
@ -2201,18 +2215,66 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
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).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.messages === "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,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;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// console.log(this.state.data);
|
|
|
|
|
// console.log("841");
|
|
|
|
|
console.log(this.state.columns);
|
|
|
|
|
console.log(data);
|
|
|
|
|
console.log("2202");
|
|
|
|
|
console.log(this.props.isAdmin());
|
|
|
|
|
// console.log(this.state.columns);
|
|
|
|
|
// console.log(data);
|
|
|
|
|
// console.log("2202");
|
|
|
|
|
// console.log(this.props.isAdmin());
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
this.props.isAdmin() === true ?
|
|
|
|
@ -2232,7 +2294,13 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
updatas={() => this.isupdatas()}
|
|
|
|
|
/> : ""}
|
|
|
|
|
|
|
|
|
|
<DownloadMessageysl
|
|
|
|
|
{...this.props}
|
|
|
|
|
value={this.state.DownloadMessageval}
|
|
|
|
|
modalCancel={this.Downloadcal}
|
|
|
|
|
modalsType={this.state.DownloadType}
|
|
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
{visibles === true ?
|
|
|
|
|
<div>
|
|
|
|
|
<style>
|
|
|
|
@ -2344,15 +2412,17 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
{teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
|
|
|
|
|
{teacherdata&&teacherdata.time_status!==undefined&&teacherdata.time_status=== 0? "":
|
|
|
|
|
computeTimetype===true&&this.props.isNotMember()===false? <div className={"computeTime font-13"} onClick={this.setComputeTime}>
|
|
|
|
|
<span>
|
|
|
|
|
{teacherdata&&teacherdata.publish_immediately===false&&computeTimetype===true?
|
|
|
|
|
(this.props.isNotMember()===false?<div className={"computeTime font-13"} onClick={this.setComputeTimet}>
|
|
|
|
|
计算成绩
|
|
|
|
|
</div>:<div className={"computeTimes font-13"}>
|
|
|
|
|
</div>:""):
|
|
|
|
|
teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
|
|
|
|
|
(this.props.isNotMember()===false?<div className={"computeTimes font-13"}>
|
|
|
|
|
计算成绩
|
|
|
|
|
</div>}
|
|
|
|
|
</span>}
|
|
|
|
|
</div>:"")
|
|
|
|
|
}
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
<div className="fr mr5 search-newysl" style={{marginBottom: '1px'}}>
|
|
|
|
|
<Search
|
|
|
|
@ -2381,6 +2451,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
return (
|
|
|
|
|
<span key={key}>
|
|
|
|
|
<Checkbox value={item.id}
|
|
|
|
|
key={item.id}
|
|
|
|
|
className="fl ">{item.name}
|
|
|
|
|
<span>({item.count})</span>
|
|
|
|
|
</Checkbox>
|
|
|
|
@ -2412,6 +2483,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
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>
|
|
|
|
@ -2466,7 +2538,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
<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>
|
|
|
|
|
<p className="edu-nodata-p mb30">没有数据可以显示!</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -2631,16 +2703,22 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
{teacherdata&&teacherdata.time_status!==undefined&&teacherdata.time_status=== 0? "":
|
|
|
|
|
computeTimetype===true&&this.props.isNotMember()===false? <div className={"computeTime font-13"} onClick={this.setComputeTime}>
|
|
|
|
|
{computeTimetype===true?
|
|
|
|
|
(this.props.isNotMember()===false?
|
|
|
|
|
<div className={"computeTime font-13"} onClick={this.setComputeTime}>
|
|
|
|
|
计算成绩
|
|
|
|
|
</div>:<div className={"computeTimes font-13"}>
|
|
|
|
|
</div>
|
|
|
|
|
:"")
|
|
|
|
|
:
|
|
|
|
|
(teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
|
|
|
|
|
this.props.isNotMember()===false?
|
|
|
|
|
<div className={"computeTimes font-13"}>
|
|
|
|
|
计算成绩
|
|
|
|
|
</div>}
|
|
|
|
|
</div>
|
|
|
|
|
:"")
|
|
|
|
|
}
|
|
|
|
|
</span>}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
@ -2792,16 +2870,17 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
<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>
|
|
|
|
|
{teacherdata&&teacherdata.time_status!==undefined&&teacherdata.time_status===0?"":
|
|
|
|
|
this.props.isNotMember()===false&&computeTimetype===true?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
|
|
|
|
|
{teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
|
|
|
|
|
{computeTimetype===true?
|
|
|
|
|
(this.props.isNotMember()===false?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
|
|
|
|
|
计算成绩
|
|
|
|
|
</div>:<div className={"computeTimes font-13"}>
|
|
|
|
|
</div>:""):
|
|
|
|
|
teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":
|
|
|
|
|
(this.props.isNotMember()===false?<div className={"computeTimes font-13"}>
|
|
|
|
|
计算成绩
|
|
|
|
|
</div>}
|
|
|
|
|
</span>
|
|
|
|
|
</div>:"")
|
|
|
|
|
}
|
|
|
|
|
</span>}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
{/*因为计算按钮占了和这个位置,和设计沟通学生视角取消这个按钮*/}
|
|
|
|
|