From 5df41988fd9548af7df807a9fa8405389e5c288e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 18 Jul 2019 18:02:42 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixunHomework/Listofworksstudentone.js | 459 +++++++++--------- 1 file changed, 232 insertions(+), 227 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index a832c5f7e..1ba8c85b7 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -911,8 +911,8 @@ class Listofworksstudentone extends Component { } } student=()=>{ - console.log("914"); - debugger + // console.log("914"); + // debugger this.props.triggerRef(this); var homeworkid = this.props.match.params.homeworkid; this.Getalistofworks(homeworkid); @@ -932,8 +932,8 @@ class Listofworksstudentone extends Component { // 获取作品列表 Getalistofworks = (homeworkid) => { // console.log("获取作品列表"); - console.log("935"); - debugger + // console.log("935"); + // debugger let urll = `/homework_commons/${homeworkid}/works_list.json`; var data = { search: "", @@ -948,9 +948,9 @@ class Listofworksstudentone extends Component { if(result === undefined){ return } - console.log("951"); - console.log(result); - debugger + // console.log("951"); + // console.log(result); + // debugger if (result.status === 200) { this.setState({ teacherdata: result.data, @@ -1109,11 +1109,11 @@ class Listofworksstudentone extends Component { }) // } - var teacherlist = { //分页 - total: teacherdata.student_works.length, //数据总数量 - pageSize: teacherdata.student_works.length, //一页显示几条 - current: this.state.page, - } + // var teacherlist = { //分页 + // total: teacherdata.student_works.length, //数据总数量 + // pageSize: teacherdata.student_works.length, //一页显示几条 + // current: this.state.page, + // } styletable = {"display": "block",} } else { // console.log("seacthdata设置数据2") @@ -1231,11 +1231,11 @@ class Listofworksstudentone extends Component { }) // } - var teacherlist = { //分页 - total: teacherdata.student_works.length, //数据总数量 - pageSize: teacherdata.student_works.length, //一页显示几条 - current: this.state.page, - } + // var teacherlist = { //分页 + // total: teacherdata.student_works.length, //数据总数量 + // pageSize: teacherdata.student_works.length, //一页显示几条 + // current: this.state.page, + // } } else { // console.log("seacthdata设置数据2") var teacherlist = undefined; @@ -1404,11 +1404,11 @@ class Listofworksstudentone extends Component { TablePagination = (e) => { // console.log(e.current); - var teacherlists = { //分页 - total: this.state.student_works.length, //数据总数量 - pageSize: 10, //一页显示几条 - current: e.current, - } + // var teacherlists = { //分页 + // total: this.state.student_works.length, //数据总数量 + // pageSize: 10, //一页显示几条 + // current: e.current, + // } this.setState({ page: e.current, teacherlists: teacherlists @@ -1468,7 +1468,7 @@ class Listofworksstudentone extends Component { // 获取作品列表 Getalistofworkst = (homeworkid) => { // console.log("获取作品列表");7009 - debugger + // debugger let urll = `/homework_commons/${homeworkid}/works_list.json`; // console.log(homeworkid); @@ -1488,7 +1488,7 @@ class Listofworksstudentone extends Component { limit:20, } axios.post(urll, data).then((result) => { - debugger + // debugger if (result !== undefined) { // console.log(url) // console.log("作品列表6789077") @@ -1583,7 +1583,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; @@ -1615,11 +1615,11 @@ class Listofworksstudentone extends Component { } - var teacherlist = { //分页 - total: student_works.length, //数据总数量 - pageSize: 20, //一页显示几条 - current: page, - } + // var teacherlist = { //分页 + // total: student_works.length, //数据总数量 + // pageSize: 20, //一页显示几条 + // current: page, + // } if (work_efficiency === false) { if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined||course_group_info === null){ //这里没有分班 没有 关卡得分 没有效率分 @@ -2198,9 +2198,12 @@ class Listofworksstudentone extends Component { // console.log(this.state.data); // console.log("841"); // console.log(this.state.columns); + // console.log(data); + // console.log("2202"); + // console.log(this.props.isAdmin()); + return ( - this.props.isAdmin === true ? - ( + this.props.isAdmin() === true ?
{visible === true ? { teacherdata && teacherdata.work_count && teacherdata.work_count > limit ? -
+
@@ -2498,13 +2501,14 @@ class Listofworksstudentone extends Component {
- ) :( - - teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ? - // 学生不能查看别人的 -
- - {visibles === true ? -
- - + {visibles === true ? +
+ + + this.cancelModulationModels()} + /> +
+ : "" } - - this.cancelModulationModels()} - /> -
- : "" - } -
-
+
+
- {computeTimetype===false?
  • + {computeTimetype===false?
  • 正在执行成绩计算,请稍后刷新页面查看结果 温馨提示:执行时间因作品数量而异 -
  • :""} + :""} - {JSON.stringify(data) !== "[]" ? -
    -
    + {JSON.stringify(data) !== "[]" ? +
    +
    -
    +
    {teacherdata === undefined ? "" : teacherdata.commit_count === undefined ? "" : teacherdata.commit_count}已交{teacherdata === undefined ? "" : teacherdata.commit_count === undefined ? "" : teacherdata.commit_count}已交{teacherdata === undefined ? "" : teacherdata.uncommit_count}未交 {teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" : {teacherdata.left_time.status} @@ -2613,16 +2617,16 @@ 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.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')} + {teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"": {computeTimetype===true? (this.props.isNotMember()===false? -
    - 计算成绩 -
    - :"") +
    + 计算成绩 +
    + :"") : (teacherdata&&teacherdata.homework_status[0]=== "未发布"? "": this.props.isNotMember()===false? @@ -2633,100 +2637,100 @@ class Listofworksstudentone extends Component { }
    } -
    +
    -
    +
    -
    -
    - -
    - {data === undefined ? "222222" : } - - - +
    + {data === undefined ? "222222" :
    } + + + + + : +
    +
    +
    + +

    没有数据可以显示!

    +
    +
    + +
    + } - : -
    -
    -
    - -

    没有数据可以显示!

    -
    - } - - - + + : + // 学生能查看别人的 +
    + -
    - : - // 学生能查看别人的 -
    - - - {visibles === true ? - this.cancelModulationModels()} - /> : "" - } -
    + {visibles === true ? + this.cancelModulationModels()} + /> : "" + } +
    -
    +
    - {computeTimetype===false?
  • + {computeTimetype===false?
  • 正在执行成绩计算,请稍后刷新页面查看结果 温馨提示:执行时间因作品数量而异 -
  • :""} - - -
    - {data === undefined ? "" :
    } - - {JSON.stringify(datas) !== "[]" ? -
    -
    -
    + :""} + + +
    + {data === undefined ? "" :
    } + + {JSON.stringify(datas) !== "[]" ? +
    +
    +
    {teacherdata === undefined ? "" : teacherdata.commit_count === undefined ? "" : teacherdata.commit_count} @@ -2739,8 +2743,8 @@ class Listofworksstudentone extends Component { style={{"color": '#FF6800'}}>{teacherdata.left_time.time}} - -
    + +
    - 计算成绩时间:{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.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')} + {teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"": {computeTimetype===true? (this.props.isNotMember()===false?
    - 计算成绩 -
    :""): - teacherdata&&teacherdata.homework_status[0]=== "未发布"? "": - (this.props.isNotMember()===false?
    - 计算成绩 -
    :"") + 计算成绩 +
    :""): + teacherdata&&teacherdata.homework_status[0]=== "未发布"? "": + (this.props.isNotMember()===false?
    + 计算成绩 +
    :"") } } -
    - {/*因为计算按钮占了和这个位置,和设计沟通学生视角取消这个按钮*/} - {/*
    */} - {/*
      */} - {/*
    • */} +
    + {/*因为计算按钮占了和这个位置,和设计沟通学生视角取消这个按钮*/} + {/*
    */} + {/**/} - {/**/} - {/**/} - {/*
    */} + {/*
    */} -
    +
    - + -
    - -
    - {datas === undefined ? "" :
    } - - { - teacherdata && teacherdata.work_count && teacherdata.work_count > limit ? -
    - +
    + {datas === undefined ? "" :
    } + + { + teacherdata && teacherdata.work_count && teacherdata.work_count > limit ? +
    + +
    + : "" + } + + + : +
    +
    +
    + +

    没有数据可以显示!

    +
    - : "" - } -
    - - : -
    -
    -
    - -

    没有数据可以显示!

    -
    -
    -
    - } + + } - {/*///*/} + {/*///*/} - + - + + + } - ) ) } From c96a9db7ab026ac8508b6c37482d859d03f98fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 18 Jul 2019 23:17:13 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tasks/GraduationTaskssetting.js | 80 +++++++++++-------- .../tasks/GraduationTaskssettinglist.js | 71 ++++++++++++---- .../tasks/GraduationTaskssettingquestions.js | 70 ++++++++-------- .../shixunHomework/ShixunHomeworkPage.js | 1 + .../react/src/modules/user/MyEduCoderModal.js | 51 ++++++++++++ public/react/src/modules/user/Notcompleted.js | 49 ++++++++++++ public/react/src/modules/user/ReadPassword.js | 42 ++++++++++ public/react/src/modules/user/common.css | 4 + 8 files changed, 288 insertions(+), 80 deletions(-) create mode 100644 public/react/src/modules/user/MyEduCoderModal.js create mode 100644 public/react/src/modules/user/Notcompleted.js create mode 100644 public/react/src/modules/user/ReadPassword.js diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index 0a45ccdcf..776e462b1 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -5,7 +5,8 @@ import locale from 'antd/lib/date-picker/locale/zh_CN'; import { WordsBtn,getUrl ,handleDateString} from 'educoder'; import axios from 'axios'; import Modals from '../../../modals/Modals'; -import DownloadMessage from '../../../modals/DownloadMessage'; +import DownloadMessageysl from "../../../modals/DownloadMessageysl"; + import CoursesListType from '../../coursesPublic/CoursesListType'; import HomeworkModal from "../../coursesPublic/HomeworkModal"; import moment from 'moment'; @@ -70,7 +71,9 @@ class GraduationTaskssettingapp extends Component{ endtimetype:false, flagPageEdit:false, visible:false, - starttime:undefined + starttime:undefined, + DownloadType:false, + DownloadMessageval:undefined, } } @@ -891,34 +894,41 @@ class GraduationTaskssettingapp extends Component{ } /// 确认是否下载 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) + }); + } - this.refs.DownloadMessage.confirmysl(url); - - // axios.get(url).then((response) => { - // 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(){ const { getFieldDecorator } = this.props.form; @@ -994,11 +1004,15 @@ class GraduationTaskssettingapp extends Component{ {/*course_groups={course_groups}*/} {/*skipTop={this.skipTop}*/} {/*/>*/} - - { + 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) + }); + } - 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, - } - this.refs.DownloadMessage.confirmysl(url,params); + Downloadcal=()=> { + this.setState({ + DownloadType: false, + DownloadMessageval: undefined + }) } render(){ @@ -1007,7 +1042,13 @@ class GraduationTaskssettinglist extends Component{ setupdate={this.setupdate} />:""} - + {taskslistdata&&taskslistdata? // 教师列表 diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js index b08ff6f78..dab3e10f6 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js @@ -4,7 +4,7 @@ import {Link} from 'react-router-dom'; import { WordsBtn,markdownToHTML} from 'educoder'; import axios from 'axios'; import Modals from '../../../modals/Modals'; -import DownloadMessage from '../../../modals/DownloadMessage'; +import DownloadMessageysl from "../../../modals/DownloadMessageysl"; import HomeworkModal from "../../coursesPublic/HomeworkModal"; import CoursesListType from '../../coursesPublic/CoursesListType'; import moment from 'moment'; @@ -192,37 +192,40 @@ class GraduationTasksquestions extends Component{ /// 确认是否下载 confirmysl(url){ - this.refs.DownloadMessage.confirmysl(url); - // axios.get(url).then((response) => { - // 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) - // }); + 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=()=>{ + + Downloadcal=()=> { this.setState({ - DownloadType:false, - DownloadMessageval:undefined + DownloadType: false, + DownloadMessageval: undefined }) } render(){ @@ -256,9 +259,12 @@ class GraduationTasksquestions extends Component{ {/*modalSave={ModalSave}*/} {/*loadtype={Loadtype}*/} {/*/>*/} - {parseInt(tab) === 0 && this.Getdataback(jobsettingsdata, teacherdata)}>} diff --git a/public/react/src/modules/user/MyEduCoderModal.js b/public/react/src/modules/user/MyEduCoderModal.js new file mode 100644 index 000000000..cca6de622 --- /dev/null +++ b/public/react/src/modules/user/MyEduCoderModal.js @@ -0,0 +1,51 @@ +import React, { Component } from 'react'; +import {getImageUrl} from 'educoder'; +import { Modal} from 'antd'; +import axios from 'axios'; +import 'common.css' +//立即申请试用 +class MyEduCoderModal extends Component { + + constructor(props) { + super(props); + this.state={ + + } + } + + modalCancel=()=>{ + //取消 + } + + setDownload=()=>{ + //立即联系 + } + + + render() { + + return( + +
    +

    欢迎使用EduCoder,您可以试用1天

    +

    超过期限,需要经过管理员的授权审核

    + +
    +
    + ) + } +} + +export default MyEduCoderModal; \ No newline at end of file diff --git a/public/react/src/modules/user/Notcompleted.js b/public/react/src/modules/user/Notcompleted.js new file mode 100644 index 000000000..99c85c543 --- /dev/null +++ b/public/react/src/modules/user/Notcompleted.js @@ -0,0 +1,49 @@ +import React, { Component } from 'react'; +import {getImageUrl} from 'educoder'; +import { Modal} from 'antd'; +import axios from 'axios'; +import 'common.css' +//完善个人资料 +class Notcompleted extends Component { + + constructor(props) { + super(props); + + } + + modalCancel=()=>{ + //取消 + } + + setDownload=()=>{ + //立即联系 + } + + + render() { + + return( + +
    +

    您尚未完善个人资料

    +

    请在完成资料后,提交试用申请

    + +
    +
    + ) + } +} + +export default Notcompleted; \ No newline at end of file diff --git a/public/react/src/modules/user/ReadPassword.js b/public/react/src/modules/user/ReadPassword.js new file mode 100644 index 000000000..ef09d794e --- /dev/null +++ b/public/react/src/modules/user/ReadPassword.js @@ -0,0 +1,42 @@ +import React, { Component } from 'react'; +import {getImageUrl} from 'educoder'; +import { Modal} from 'antd'; +import axios from 'axios'; +import 'common.css' +//密码已重置,请重新登录 +class ReadPassword extends Component { + + constructor(props) { + super(props); + + } + + + setDownload=()=>{ + //立即联系 + } + + + render() { + + return( + +
    +

    密码已重置,请重新登录

    + 知道啦 +
    +
    + ) + } +} + +export default ReadPassword; \ No newline at end of file diff --git a/public/react/src/modules/user/common.css b/public/react/src/modules/user/common.css index 77a3aee7d..0cbf13364 100644 --- a/public/react/src/modules/user/common.css +++ b/public/react/src/modules/user/common.css @@ -32,6 +32,10 @@ height: 45px; } + .educouddiv { + display: flex; + justify-content: center; + } .left_right { From 37153a92eef1b8b468859c9513567acee6c48b2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 18 Jul 2019 23:20:50 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/graduation/tasks/GraduationTaskssettinglist.js | 4 +++- .../graduation/tasks/GraduationTaskssettingquestions.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index d8ce037cd..a5b6ccaa6 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -47,7 +47,9 @@ class GraduationTaskssettinglist extends Component{ Allocationtype:false, task_Id:"", user_id:"", - visibles:false + visibles:false, + DownloadType:false, + DownloadMessageval:undefined, } } diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js index dab3e10f6..03be85d34 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js @@ -25,7 +25,9 @@ class GraduationTasksquestions extends Component{ fileList: [], contents: [{val:"",id:1}], type:true, - questionslist:undefined + questionslist:undefined, + DownloadType:false, + DownloadMessageval:undefined, } }