diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 1823f43bb..1c9b22602 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -284,7 +284,7 @@ class Listofworksstudentone extends Component { { record.efficiencyscore&& record.efficiencyscore=== "--"?( - + -- ) @@ -963,32 +963,32 @@ class Listofworksstudentone extends Component { course_group: "", } axios.post(urll, data).then((result) => { - if(result === undefined){ - return - } + if(result === undefined){ + return + } // console.log("951"); // console.log(result); // debugger - 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, - }) - this.props.Getdataback(result,result.data); - 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.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, + }) + this.props.Getdataback(result,result.data); + 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); + } }).catch((error) => { console.log(error); @@ -1070,13 +1070,13 @@ class Listofworksstudentone extends Component { for(var i=0;i { console.log(error) @@ -1433,7 +1433,7 @@ class Listofworksstudentone extends Component { }) this.Getalistofworkstwo(this.state.order, "", "", "", pageNumber, this.state.limit); } - //计算成绩 + //计算成绩 setComputeTime=()=>{ let {teacherdata}=this.state; this.setState({ @@ -1497,26 +1497,26 @@ class Listofworksstudentone extends Component { limit:20, } axios.post(urll, data).then((result) => { - if (result) { - // console.log(url) - // console.log("作品列表6789077") - // console.log(JSON.stringify(result)) - this.setState({ - teacherdata: result.data, - task_status: result.data.task_status, - allow_late:result.data.allow_late, - course_group_info: result.data.course_group_info, - 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, - }) - this.props.Getdataback(result,result.data); - this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1); - } + if (result) { + // console.log(url) + // console.log("作品列表6789077") + // console.log(JSON.stringify(result)) + this.setState({ + teacherdata: result.data, + task_status: result.data.task_status, + allow_late:result.data.allow_late, + course_group_info: result.data.course_group_info, + 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, + }) + this.props.Getdataback(result,result.data); + this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1); + } }).catch((error) => { console.log(error) this.setState({ @@ -1559,22 +1559,22 @@ class Listofworksstudentone extends Component { // console.log(url) // console.log("作品列表______________________") // console.log(JSON.stringify(result)) - if (result !== undefined) { - 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.props.Getdataback(result,result.data); - this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page); + if (result !== undefined) { + 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.props.Getdataback(result,result.data); + this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page); // } } }).catch((error) => { @@ -1591,7 +1591,7 @@ class Listofworksstudentone extends Component { // 设置数据 seacthdatat = (teacherdata,student_works,work_efficiency,course_group_info) => { - debugger + debugger let {page, limit} = this.state; let datalist = []; let columns = this.state.columns; @@ -2216,81 +2216,81 @@ class Listofworksstudentone extends Component { return ( this.props.isAdmin() === true ? -
- {visible === true ? this.saveModulationModal(value, num)} - /> : ""} - - {this.state.showmodel === true ? this.hideshowmodel()} - updatas={() => this.isupdatas()} - /> : ""} - - - {visibles === true ? -
- - this.cancelModulationModels()} - /> - -
- : "" - } - - {/*立即发布*/} - this.getcourse_groupslist(id)} - starttimes={this.state.starttimes} - typs={this.state.typs} - /> -
- - -
+ } + + this.cancelModulationModels()} + /> +
+ : "" + } - - {computeTimetype===false?
  • + + {computeTimetype===false?
  • 正在执行成绩计算,请稍后刷新页面查看结果 温馨提示:执行时间因作品数量而异 -
  • :""} - - {/*作品状态GraduationTaskssettinglist*/} -
      -
    • - 计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')} - - {teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"": - {teacherdata&&teacherdata.time_status!==undefined&&teacherdata.time_status=== 0? "": - computeTimetype===true&&this.props.isNotMember()===false?
      - 计算成绩 -
      :
      - 计算成绩 -
      } -
      } - -
      - this.onSearchKeywordKeyUpt(e)} - onInput={this.inputSearchValuest} - onSearch={this.searchValuest} - > -
      -
    • + :""} + + {/*作品状态GraduationTaskssettinglist*/} +
        +
      • + 计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')} + + {teacherdata&&teacherdata.publish_immediately===false&&computeTimetype===true? + (this.props.isNotMember()===false?
        + 计算成绩 +
        :""): + teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "": + (this.props.isNotMember()===false?
        + 计算成绩 +
        :"") + } +
        + +
        + this.onSearchKeywordKeyUpt(e)} + onInput={this.inputSearchValuest} + onSearch={this.searchValuest} + > +
        +
      • -
      • +
      • - 作品状态: - this.notlimiteds()}>不限 - this.funtaskstatust(e, task_status && task_status)} - style={{paddingTop: '4px'}}> + 作品状态: + this.notlimiteds()}>不限 + this.funtaskstatust(e, task_status && task_status)} + style={{paddingTop: '4px'}}> - {task_status === undefined ? "" : task_status.map((item, key) => { - return ( - + {task_status === undefined ? "" : task_status.map((item, key) => { + return ( + {item.name} ({item.count}) - ) - })} - - {/*请输入姓名或学号搜索*/} - - -
      • - - - {/*分班情况*/} - -
      • - {JSON.stringify(course_group_info) === "[]" ? "" : course_group_info === undefined ? "" : course_group_info.length < 2 ? "" : -
        - 分班情况: - this.notlimitedst()}>不限 - 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 ( - + ) + })} + + {/*请输入姓名或学号搜索*/} + + +
      • + + + {/*分班情况*/} + +
      • + {JSON.stringify(course_group_info) === "[]" ? "" : course_group_info === undefined ? "" : course_group_info.length < 2 ? "" : +
        + 分班情况: + this.notlimitedst()}>不限 + 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 ( + {item.group_group_name} ({item.count}) - ) - }) - } - -
        } -
      • + ) + }) + } + +
    } + - + -
    +
    -
    +
    {teacherdata === undefined ? "" : teacherdata.student_works.length}个检索结果({teacherdata === undefined ? "" : teacherdata.all_member_count}学生) - - - - + } + + +
    - { - JSON.stringify(data) === "[]" ? -
    -
    -
    - -

    没有数据可以显示.!

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

    没有数据可以显示.!

    +
    - : -
    - -
    - {data === undefined ? "" : } - +
    + {data === undefined ? "" :
    } - } - - - - { - teacherdata && teacherdata.work_count && teacherdata.work_count > limit ? -
    -
    - : "" } - + + + { + teacherdata && teacherdata.work_count && teacherdata.work_count > limit ? +
    + +
    + : "" + } - : + + + :
    { teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ? @@ -2631,15 +2633,21 @@ class Listofworksstudentone extends Component { 计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')} {teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"": - - {teacherdata&&teacherdata.time_status!==undefined&&teacherdata.time_status=== 0? "": - computeTimetype===true&&this.props.isNotMember()===false?
    - 计算成绩 -
    :
    - 计算成绩 -
    } -
    } - + {computeTimetype===true? + (this.props.isNotMember()===false? +
    + 计算成绩 +
    + :"") + : + (teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "": + this.props.isNotMember()===false? +
    + 计算成绩 +
    + :"") + } + }
    @@ -2792,16 +2800,17 @@ class Listofworksstudentone extends Component {
    计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')} - {teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"": - - {teacherdata&&teacherdata.time_status!==undefined&&teacherdata.time_status===0?"": - this.props.isNotMember()===false&&computeTimetype===true?
    - 计算成绩 -
    :
    - 计算成绩 -
    } -
    - } + {teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"": + {computeTimetype===true? + (this.props.isNotMember()===false?
    + 计算成绩 +
    :""): + teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "": + (this.props.isNotMember()===false?
    + 计算成绩 +
    :"") + } +
    }
    {/*因为计算按钮占了和这个位置,和设计沟通学生视角取消这个按钮*/}