From e3e0a6873a44d21f89d8c3ac135223204c69c023 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 12 Jul 2019 09:20:11 +0800 Subject: [PATCH 01/18] =?UTF-8?q?=E6=89=80=E6=9C=89=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tasks/GraduationTaskssetting.js | 65 +++++++++---------- .../tasks/GraduationTaskssettingquestions.js | 55 ++++++++-------- .../modules/courses/poll/PollDetailIndex.js | 9 ++- .../courses/shixunHomework/Listofworks.js | 55 ++++++++-------- .../shixunHomework/ShixunStudentWork.js | 55 ++++++++-------- .../shixunHomework/ShixunWorkReport.js | 53 +++++++-------- .../shixunHomework/Trainingjobsetting.js | 53 ++++++++------- .../shixunHomework/Workquestionandanswer.js | 53 ++++++++------- 8 files changed, 198 insertions(+), 200 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index 27aa34e21..2ed3ebc84 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -891,37 +891,34 @@ class GraduationTaskssettingapp extends Component{ } /// 确认是否下载 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 - }) + + 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) + // }); } render(){ const { getFieldDecorator } = this.props.form; @@ -998,10 +995,8 @@ class GraduationTaskssettingapp extends Component{ {/*skipTop={this.skipTop}*/} {/*/>*/} { - 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({ @@ -256,9 +257,7 @@ class GraduationTasksquestions extends Component{ {/*/>*/} +

{this.props.coursedata.name} @@ -152,7 +159,7 @@ class PollDetailIndex extends Component{ :"" } */} - 导出统计 + this.confirmysl("/polls/"+this.props.match.params.pollId+"/commit_result.xlsx")} href="javascript:void(0);">导出统计 } { diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 26c175847..c8c77dfbd 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -1333,31 +1333,32 @@ class Listofworks extends Component { } /// 确认是否下载 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) - }); + 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=()=>{ @@ -1397,9 +1398,7 @@ class Listofworks extends Component { {visibles === true ? diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js index f288bd836..73e793532 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -473,31 +473,32 @@ class ShixunStudentWork extends Component { // 导出实习报告批量 /// 确认是否下载 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) - }); + 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=()=>{ @@ -601,9 +602,7 @@ class ShixunStudentWork extends Component { {/*立即发布*/} { - if(response.data.status&&response.data.status===-1){ - }else if(response.data.status&&response.data.status===-2){ - if(response.data.messages === "100"){ - // 已超出文件导出的上限数量(100 ),建议: + this.refs.DownloadMessage.confirmysl(url); + + // axios.get(url).then((response) => { + // if(response.data.status&&response.data.status===-1){ - 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) - }); + // }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) + // }); } @@ -124,9 +127,7 @@ class ShixunWorkReport extends Component {

{data&&data.shixun_name}

diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 91e199c2e..16adaaa1d 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1677,30 +1677,31 @@ class Trainingjobsetting extends Component { /// 确认是否下载 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) - }); + 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=()=>{ @@ -1767,9 +1768,7 @@ class Trainingjobsetting extends Component { {/*立即发布*/} diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index fc1b4ebd6..8ff9ef25a 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -317,30 +317,31 @@ class Workquestionandanswer extends Component { /// 确认是否下载 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) - }); + 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({ @@ -381,9 +382,7 @@ class Workquestionandanswer extends Component { /> : ""} {/*立即发布*/} Date: Fri, 12 Jul 2019 09:39:28 +0800 Subject: [PATCH 02/18] b --- .../courses/shixunHomework/Listofworksstudentone.js | 2 +- .../modules/courses/shixunHomework/Trainingjobsetting.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 73f94b23d..bc21e8b19 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -924,7 +924,7 @@ class Listofworksstudentone extends Component { }
-
+
this.ChangeTab(0)}>作品列表 diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index b5e14ce12..860a17c80 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1903,7 +1903,7 @@ class Trainingjobsetting extends Component { unifiedsetting === undefined ? "" : unifiedsetting=== true ?
- 发布时间: + 发布时间:
- (学生收到作业的时间) + (学生收到作业的时间)

{ @@ -1936,7 +1936,7 @@ class Trainingjobsetting extends Component { }

- 截止时间: + 截止时间:
- (学生“按时”提交作品的时间截点) + (学生“按时”提交作品的时间截点)

{ From f50faea37f8767915f240000d7efd64795153ee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 12 Jul 2019 10:19:13 +0800 Subject: [PATCH 03/18] =?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/coursesPublic/Startshixuntask.js | 4 ++-- .../courses/shixunHomework/Listofworksstudentone.js | 1 - .../courses/shixunHomework/ShixunHomeworkPage.js | 5 +++-- .../courses/shixunHomework/ShixunStudentWork.js | 13 ++++++++++++- .../courses/shixunHomework/Trainingjobsetting.js | 11 +++++++++++ .../courses/shixunHomework/Workquestionandanswer.js | 13 ++++++++++++- 6 files changed, 40 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/Startshixuntask.js b/public/react/src/modules/courses/coursesPublic/Startshixuntask.js index dfe56f945..d146b5ef4 100644 --- a/public/react/src/modules/courses/coursesPublic/Startshixuntask.js +++ b/public/react/src/modules/courses/coursesPublic/Startshixuntask.js @@ -159,8 +159,8 @@ class Startshixuntask extends Component{ {this.props.isStudent? - {this.props.data.task_operation&&this.props.data.task_operation?startbtn===false?this.taskoperationId( this.props.data.task_operation[1])}> - {this.props.data.task_operation[0]} + {this.props.data&&this.props.data.task_operation&&this.props.data.task_operation?startbtn===false?this.taskoperationId( this.props.data&&this.props.data.task_operation[1])}> + {this.props.data&&this.props.data.task_operation[0]} :"开启中":""} :"" } diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index bc21e8b19..daa36f86f 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -159,7 +159,6 @@ class Listofworksstudentone extends Component { dataIndex: 'classroom', align: "center", className:'font-14', - width:'260px', render: (text, record) => (

- this.ChangeTab(0)}>作品列表: + this.ChangeTab(0)}>作品列表 this.ChangeTab(1)}>作业问答 {this.props.isAdmin()?this.ChangeTab(2)}>代码查重:""} this.ChangeTab(3)}>设置 @@ -669,6 +670,16 @@ class ShixunStudentWork extends Component { {this.props.isAdmin()? data&&data.publish_immediately===true? 立即发布 : "": ""} + { + jobsettingsdata&& jobsettingsdata.data === undefined ? "" + : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" : + { jobsettingsdata&& jobsettingsdata.data.commit_des} + } + { jobsettingsdata&&jobsettingsdata.data === undefined ? "" : }
- {this.props.isAdmin()?
  • - 导出 - -
  • :""} - {this.props.isAdmin() ? - teacherdata && teacherdata.end_immediately === true ? - 立即截止 - : "" - : ""} - {this.props.isAdmin() ? - teacherdata && teacherdata.publish_immediately === true ? - 立即发布 - : "" - : ""} - {this.props.isAdmin() ? - teacherdata && teacherdata.code_review === true ? - 代码查重 - : "": ""} -
    -
    +// {this.props.isAdmin()?
  • +// 导出 +// +//
  • :""} +// {this.props.isAdmin() ? +// teacherdata && teacherdata.end_immediately === true ? +// 立即截止 +// : "" +// : ""} +// {this.props.isAdmin() ? +// teacherdata && teacherdata.publish_immediately === true ? +// 立即发布 +// : "" +// : ""} +// {this.props.isAdmin() ? +// teacherdata && teacherdata.code_review === true ? +// 代码查重 +// : "": ""} +{/*
    */} +{/*
    */} diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index daa36f86f..d93029025 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -922,32 +922,9 @@ class Listofworksstudentone extends Component { : "" } -
    +
    -
    -
    - this.ChangeTab(0)}>作品列表 - this.ChangeTab(1)}>作业问答 - this.ChangeTab(3)} - >设置 - {this.state.view_report===true? - 查看实训报告 - :""} - {/*查看实训报告*/} - { - teacherdata === undefined ? "" - : teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" : - {teacherdata.commit_des} - } - {teacherdata === undefined ? "" : } -
    -
    + {computeTimetype===false?
  • @@ -1076,27 +1053,7 @@ class Listofworksstudentone extends Component {
  • -
    -
    - this.ChangeTab(0)}>作品列表 - this.ChangeTab(1)}>作业问答 - this.ChangeTab(3)}>设置 - {this.state.view_report===true? - 查看实训报告 - :""} - { - teacherdata === undefined ? "" - : teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" : - {teacherdata.commit_des} - } - {teacherdata === undefined ? "" : } -
    -
    + {computeTimetype===false?
  • @@ -1267,4 +1224,49 @@ class Listofworksstudentone extends Component { } } -export default Listofworksstudentone; \ No newline at end of file +export default Listofworksstudentone; +{/*
    */} +{/*
    */} +{/* this.ChangeTab(0)}>作品列表*/} +{/* this.ChangeTab(1)}>作业问答*/} +{/* this.ChangeTab(3)}*/} +{/* >设置*/} +{/* {this.state.view_report===true?*/} +{/* 查看实训报告*/} +{/* :""}*/} +{/* /!*查看实训报告*!/*/} +{/* {*/} +{/* teacherdata === undefined ? ""*/} +{/* : teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" :*/} +{/* {teacherdata.commit_des}*/} +{/* }*/} +{/* {teacherdata === undefined ? "" : }*/} +{/*
    */} +{/*
    */} +{/*
    */} +{/*
    */} +{/* this.ChangeTab(0)}>作品列表*/} +{/* this.ChangeTab(1)}>作业问答*/} +{/* this.ChangeTab(3)}>设置*/} +{/* {this.state.view_report===true?*/} +{/* 查看实训报告*/} +{/* :""}*/} +{/* {*/} +{/* teacherdata === undefined ? ""*/} +{/* : teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" :*/} +{/* {teacherdata.commit_des}*/} +{/* }*/} +{/* {teacherdata === undefined ? "" : }*/} +{/*
    */} +{/*
    */} \ No newline at end of file diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index beba69898..621893141 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -1,6 +1,6 @@ -import React,{ Component } from "react"; -import {Link,NavLink} from 'react-router-dom'; -import { WordsBtn ,ActionBtn} from 'educoder'; +import React, {Component} from "react"; +import {Link, NavLink} from 'react-router-dom'; +import {WordsBtn, ActionBtn} from 'educoder'; import axios from 'axios'; import '../css/members.css'; import "../common/formCommon.css"; @@ -14,39 +14,55 @@ import Trainingjobsetting from './Trainingjobsetting' import Workquestionandanswer from './Workquestionandanswer' import CoursesListType from '../coursesPublic/CoursesListType'; import ShixunStudentWork from "./ShixunStudentWork"; +import Startshixuntask from "../coursesPublic/Startshixuntask"; class ShixunHomeworkPage extends Component { constructor(props) { super(props); - this.state={ - tab:["0"], - jobsettingsdata:undefined, - teacherdata:undefined, + this.state = { + tab: ["0"], + jobsettingsdata: undefined, + teacherdata: undefined, + code_review: false, + view_report: false, } } + //切换tab - ChangeTab=(e)=>{ - console.log(e); + ChangeTab = (e) => { + // console.log(e); this.setState({ - tab:e + tab: e }) + try { + var currenturl = window.location.href; + var newUrl = (currenturl.split("?"))[0]; + window.history.pushState('','',newUrl+'?tab='+e); + }catch (e) { + console.log(e); + console.log("44"); + } + } - Getdataback = (jobsettingsdata,teacherdata)=>{ - this.setState({ - jobsettingsdata:jobsettingsdata, - teacherdata:teacherdata, - }) + Getdataback = (jobsettingsdata, teacherdata) => { + this.setState({ + jobsettingsdata: jobsettingsdata, + teacherdata: teacherdata, + code_review: teacherdata.code_review, + view_report: teacherdata.view_report, + }) } + componentDidMount() { - const query =this.props.location.search; + const query = this.props.location.search; const type = query.split('?tab='); // let sum = [] // sum.push(type[1]) // console.log("componentDidMountcomponentDidMount"); console.log(type); this.setState({ - tab:type[1], + tab: type[1], }) let querys = this.props.location.pathname; const types = querys.split('/'); @@ -57,11 +73,11 @@ class ShixunHomeworkPage extends Component { } render() { - let {tab,jobsettingsdata,teacherdata}=this.state; - const isAdmin =this.props.isAdmin(); + let {tab, jobsettingsdata, teacherdata} = this.state; + const isAdmin = this.props.isAdmin(); return ( -
    -
    +
    +

    @@ -70,20 +86,20 @@ class ShixunHomeworkPage extends Component { > {jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name} + to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id === undefined ? "" : jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name} > 作业详情

    -

    +

    {teacherdata === undefined ? "" : teacherdata.homework_name}

    返回 + href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id === undefined ? "" : jobsettingsdata.data.category.category_id}`}>返回 实训详情 @@ -91,21 +107,126 @@ class ShixunHomeworkPage extends Component {
    +
    +
    +
    + this.ChangeTab(0)}>作品列表 + this.ChangeTab(1)}>作业问答 + {this.props.isAdmin() ? + this.state.code_review === true || jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0] === "未发布" ? "" : + this.ChangeTab(2)}> + 代码查重 : ""} + {parseInt(tab) === 3? + + :""} + this.ChangeTab(3)} + >设置 + {/*{this.props.isAdmin() ? 导出 : ""}*/} + + {this.props.isAdmin() ? +
  • + 导出 + +
  • : ""} + {this.props.isAdmin() ? + teacherdata && teacherdata.end_immediately === true ? + 立即截止 + : "" + : ""} + {this.props.isAdmin() ? + teacherdata && teacherdata.publish_immediately === true ? + 立即发布 + : "" + : ""} + {this.props.isAdmin() ? + teacherdata && teacherdata.code_review === true ? + 代码查重 + : "" : ""} + {this.state.view_report === true ? + 查看实训报告 + : ""} + { + teacherdata === undefined ? "" + : teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" : + {teacherdata.commit_des} + } + {teacherdata === undefined ? "" : } +
    +
    +
    + + + { + // 教师列表 + parseInt(tab) === 0 ? (isAdmin === true ? + this.ChangeTab(e)} + Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}> : - this.ChangeTab(e)} Getdataback={(jobsettingsdata,teacherdata)=>this.Getdataback(jobsettingsdata,teacherdata)} >) + this.ChangeTab(e)} + Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}>) : - parseInt(tab)===1 ?this.ChangeTab(e)} Getdataback={(jobsettingsdata,teacherdata)=>this.Getdataback(jobsettingsdata,teacherdata)} > + parseInt(tab) === 1 ? + this.ChangeTab(e)} + Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}> : - parseInt(tab)===2? this.ChangeTab(e)} Getdataback={(jobsettingsdata,teacherdata)=>this.Getdataback(jobsettingsdata,teacherdata)} > + parseInt(tab) === 2 ? + this.ChangeTab(e)} + Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}> : - this.ChangeTab(e)} Getdataback={(jobsettingsdata,teacherdata)=>this.Getdataback(jobsettingsdata,teacherdata)} > - } -
    + this.ChangeTab(e)} + Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}> + } +
    ) } @@ -135,9 +256,9 @@ export default ShixunHomeworkPage; // //
    // -{/* */} - - +{/* */ +} -{/**/} \ No newline at end of file +{/**/ +} \ No newline at end of file diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js index 5725df969..cbf963457 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -625,63 +625,10 @@ class ShixunStudentWork extends Component { starttimes={this.state.starttimes} typs={this.state.typs} /> -
    +
    -
    -
    - this.ChangeTab(0)}>作品列表 - this.ChangeTab(1)}>作业问答 - {this.props.isAdmin()?this.ChangeTab(2)}>代码查重:""} - this.ChangeTab(3)}>设置 - - {this.props.isAdmin() ?
  • - 导出 - -
  • : ""} - {this.props.isAdmin()? - data&&data.end_immediately===true? - 立即截止 - :"": ""} - {this.props.isAdmin()? - data&&data.publish_immediately===true? - 立即发布 : "": ""} - { - jobsettingsdata&& jobsettingsdata.data === undefined ? "" - : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" : - { jobsettingsdata&& jobsettingsdata.data.commit_des} - } - { jobsettingsdata&&jobsettingsdata.data === undefined ? "" : } -
    -
    + +// {this.props.isAdmin() ?
  • +// 导出 +// +//
  • : ""} +// {this.props.isAdmin()? +// data&&data.end_immediately===true? +// 立即截止 +// :"": ""} +// {this.props.isAdmin()? +// data&&data.publish_immediately===true? +// 立即发布 : "": ""} +// { +// jobsettingsdata&& jobsettingsdata.data === undefined ? "" +// : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" : +// { jobsettingsdata&& jobsettingsdata.data.commit_des} +// } +// { jobsettingsdata&&jobsettingsdata.data === undefined ? "" : } +{/*
    */} +{/*
    */} \ No newline at end of file diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index a05c5373b..07135d76b 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1807,87 +1807,17 @@ class Trainingjobsetting extends Component { loadtype={loadtype} modalSave={modalSave} > -
    -
    -
    -
    - this.ChangeTab(0)}>作品列表 - this.ChangeTab(1)}>作业问答 - {this.props.isAdmin()?this.state.code_review===true||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"?"": this.ChangeTab(2)}>代码查重 : ""} - - this.ChangeTab(3)} - >设置 - - {this.props.isAdmin() ?
  • - 导出 - -
  • : ""} - {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true? - 立即截止 - : "": ""} - {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.publish_immediately===true? - 立即发布: "" : ""} - {this.props.isAdmin()? - jobsettingsdata&&jobsettingsdata.data.code_review===true? - 代码查重: "":""} - { - jobsettingsdata&& jobsettingsdata&&jobsettingsdata.data === undefined ? "" - : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" : - { jobsettingsdata&& jobsettingsdata.data.commit_des} - } - { jobsettingsdata&&jobsettingsdata.data === undefined ? "" : } -
    -
    +
    +
    {/*发布设置*/}
    -
    +

    发布设置 { !flagPageEdit && this.props.isAdmin() === true ? - 编辑 + : "" }

    @@ -2233,4 +2163,74 @@ class Trainingjobsetting extends Component { } } -export default Trainingjobsetting; \ No newline at end of file +export default Trainingjobsetting; +//
    +//
    +// this.ChangeTab(0)}>作品列表 +// this.ChangeTab(1)}>作业问答 +// {this.props.isAdmin()?this.state.code_review===true||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"?"": this.ChangeTab(2)}>代码查重 : ""} +// +// this.ChangeTab(3)} +// >设置 +// +// {this.props.isAdmin() ?
  • +// 导出 +// +//
  • : ""} +// {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true? +// 立即截止 +// : "": ""} +// {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.publish_immediately===true? +// 立即发布: "" : ""} +// {this.props.isAdmin()? +// jobsettingsdata&&jobsettingsdata.data.code_review===true? +// 代码查重: "":""} +// { +// jobsettingsdata&& jobsettingsdata&&jobsettingsdata.data === undefined ? "" +// : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" : +// { jobsettingsdata&& jobsettingsdata.data.commit_des} +// } +// { jobsettingsdata&&jobsettingsdata.data === undefined ? "" : } +{/*
    */} +{/*
    */} diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index 0ac01e9dd..9602ad78c 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -405,83 +405,12 @@ class Workquestionandanswer extends Component { starttimes={this.state.starttimes} typs={this.state.typs} /> -
    -
    -
    -
    - this.ChangeTab(0)}>作品列表 - - this.ChangeTab(1)}>作业问答 - {this.props.isAdmin() ? - this.state.code_review === true || jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0] === "未发布" ? "" : - this.ChangeTab(2)}> - 代码查重 : ""} - - this.ChangeTab(3)} - >设置 - - {this.props.isAdmin() ? -
  • - 导出 - -
  • : ""} - - {this.props.isAdmin() ? jobsettingsdata && jobsettingsdata.data.end_immediately === true ? - 立即截止 - :"" - : ""} - {this.props.isAdmin() ? jobsettingsdata && jobsettingsdata.data.publish_immediately === true ? - 立即发布 - : "" - : ""} - - - {this.props.isAdmin() ? - jobsettingsdata && jobsettingsdata.data.code_review === true ? - 代码查重 - : "" : ""} - { - jobsettingsdata&& jobsettingsdata.data === undefined ? "" - : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" : - { jobsettingsdata&& jobsettingsdata.data.commit_des} - } - { jobsettingsdata&&jobsettingsdata.data === undefined ? "" : } -
    -
    +
    +
    + {jobsettingsdata === undefined || jobsettingsdata.data.description === null ? "无" : -
    +
    */} +{/* {this.props.isAdmin() ?*/} +{/*
  • */} +{/* 导出*/} +{/* */} +{/*
  • : ""}*/} + +{/* {this.props.isAdmin() ? jobsettingsdata && jobsettingsdata.data.end_immediately === true ?*/} +{/* 立即截止*/} +{/* :""*/} +{/* : ""}*/} +{/* {this.props.isAdmin() ? jobsettingsdata && jobsettingsdata.data.publish_immediately === true ?*/} +{/* 立即发布*/} +{/* : ""*/} +{/* : ""}*/} + + +{/* {this.props.isAdmin() ?*/} +{/* jobsettingsdata && jobsettingsdata.data.code_review === true ?*/} +{/* 代码查重*/} +{/* : "" : ""}*/} +{/* {*/} +{/* jobsettingsdata&& jobsettingsdata.data === undefined ? ""*/} +{/* : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" :*/} +{/* { jobsettingsdata&& jobsettingsdata.data.commit_des}*/} +{/* }*/} +{/* { jobsettingsdata&&jobsettingsdata.data === undefined ? "" : }*/} +{/*
    */} +{/*
    */} \ No newline at end of file From 8ca518c8731a787714e57678f5c519eea137e312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 12 Jul 2019 14:29:21 +0800 Subject: [PATCH 05/18] b --- .../react/src/modules/courses/shixunHomework/Listofworks.js | 2 -- .../modules/courses/shixunHomework/Listofworksstudentone.js | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index fa7ffe693..92cfa4d8b 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -140,7 +140,6 @@ class Listofworks extends Component { dataIndex: 'classroom', align: 'center', className:'font-14', - width:"260px", render: (text, record) => ( {record.classroom} ) @@ -386,7 +385,6 @@ class Listofworks extends Component { dataIndex: 'classroom', align: 'center', className:'font-14', - width:"260px", render: (text, record) => ( {record.classroom} ) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index d93029025..4cb5aecea 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -939,8 +939,7 @@ class Listofworksstudentone extends Component {
    @@ -1076,8 +1075,7 @@ class Listofworksstudentone extends Component { {JSON.stringify(datas) !== "[]" ?
    From 9e2fbd39af5c5939724585bd9a3360eb2c4acd73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 12 Jul 2019 15:33:17 +0800 Subject: [PATCH 06/18] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/poll/pollStyle.css | 1 + .../src/modules/courses/shixunHomework/CommitSummary.js | 2 +- .../modules/courses/shixunHomework/Trainingjobsetting.js | 7 ++++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/poll/pollStyle.css b/public/react/src/modules/courses/poll/pollStyle.css index 624ea6532..1b60b2c7c 100644 --- a/public/react/src/modules/courses/poll/pollStyle.css +++ b/public/react/src/modules/courses/poll/pollStyle.css @@ -38,6 +38,7 @@ .problemShow:last-child{ border-bottom: none; } +.invite-tipysls{position: absolute;top: -8px;right: 140px;color: #fff; box-sizing: border-box;width: 170px;text-align: center;border-radius: 2px;background-color: rgba(5,16,26,0.6)} .yslinvitetip{display: block;border-width: 8px;position: absolute;top: 10px;right: -16px;border-style: dashed solid dashed dashed;border-color: transparent transparent transparent rgba(5,16,26,0.6);font-size: 0;line-height: 0;} .right-black-trangle{border-width: 8px;position: absolute;top: 10px;left: -16px;border-style: dashed solid dashed dashed;border-color: transparent transparent transparent rgba(5,16,26,0.6);font-size: 0;line-height: 0;} .right-black-trangles{border-width: 8px;position: absolute;top: 10px;left: -16px;border-style: dashed solid dashed dashed;border-color: transparent rgba(5,16,26,0.6) transparent transparent;font-size: 0;line-height: 0;} diff --git a/public/react/src/modules/courses/shixunHomework/CommitSummary.js b/public/react/src/modules/courses/shixunHomework/CommitSummary.js index 8e3097497..702546191 100644 --- a/public/react/src/modules/courses/shixunHomework/CommitSummary.js +++ b/public/react/src/modules/courses/shixunHomework/CommitSummary.js @@ -155,7 +155,7 @@ class CommitSummary extends Component{ className="mdInForm"> {getFieldDecorator('description', { rules: [{ - required: true, message: '请输入帖子内容', + required: true, message: '请在此输入总结内容,最多5000个字符', }, { max: 5000, message: '最大限制为5000个字符', }], diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 07135d76b..3341889d8 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -2064,9 +2064,8 @@ class Trainingjobsetting extends Component { color:"#666666", }} disabled={!flagPageEdit} className="c_grey mt20 ml30" value={"自定义分值"} style={{"color":"#666666"}}>自定义分值 - this.testscripttip(0)}> {testscripttiptype===true? -
    +

    @@ -2087,7 +2086,9 @@ class Trainingjobsetting extends Component {

    :""} - + + this.testscripttip(0)}> +

    关卡名称(需要学生完成的任务请选中)

    From 1ea06b32406b2bca5358069cc45d838e7b4d1905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 12 Jul 2019 15:37:42 +0800 Subject: [PATCH 07/18] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 9a574b655..bde46ff4b 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -41,7 +41,7 @@ class GraduationTaskssettinglist extends Component{ cross_comment:null, search:null, order:"updated_at", - b_order:"asc", + b_order:"desc", course_group:undefined, loadingstate:true, operationId:null, From 0354f3eee2b0ee1eb3e9e34fce7f9054ee4de72d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 12 Jul 2019 15:57:56 +0800 Subject: [PATCH 08/18] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/shixunHomework/Trainingjobsetting.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 3341889d8..2bfe2091e 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -2087,7 +2087,7 @@ class Trainingjobsetting extends Component { :""} - this.testscripttip(0)}> + this.testscripttip(0)}>

    关卡名称 Date: Fri, 12 Jul 2019 16:05:28 +0800 Subject: [PATCH 09/18] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/shixunHomework/Homeworddescription.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/shixunHomework/Homeworddescription.js b/public/react/src/modules/courses/shixunHomework/Homeworddescription.js index 472d76d2c..df1f33ba8 100644 --- a/public/react/src/modules/courses/shixunHomework/Homeworddescription.js +++ b/public/react/src/modules/courses/shixunHomework/Homeworddescription.js @@ -89,7 +89,7 @@ class Homeworddescription extends Component { {/**/} -

    From b0e3bf1702bebe076dc5ccd9520f7bc250980aff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 12 Jul 2019 17:07:06 +0800 Subject: [PATCH 10/18] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/poll/pollStyle.css | 1 + public/react/src/modules/courses/shixunHomework/Listofworks.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/poll/pollStyle.css b/public/react/src/modules/courses/poll/pollStyle.css index 1b60b2c7c..360315e03 100644 --- a/public/react/src/modules/courses/poll/pollStyle.css +++ b/public/react/src/modules/courses/poll/pollStyle.css @@ -44,6 +44,7 @@ .right-black-trangles{border-width: 8px;position: absolute;top: 10px;left: -16px;border-style: dashed solid dashed dashed;border-color: transparent rgba(5,16,26,0.6) transparent transparent;font-size: 0;line-height: 0;} .top-black-trangle{border-width: 8px;position: absolute;top: -16px;right: 4px;border-style: dashed solid dashed dashed;border-color: transparent transparent rgba(5,16,26,0.6) transparent;font-size: 0;line-height: 0;} .invite-tipysl{color: #999999; box-sizing: border-box;text-align: center;border-radius: 2px;font-size: 14px} +.edu-position-hideysl li a:hover{ background:#F1F1F1; color:#05101A;} .to-back-left { width: 0; height: 0; diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 92cfa4d8b..0892db098 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -1601,7 +1601,7 @@ class Listofworks extends Component { {order === "update_time" ? "时间" : order === "work_score" ? "成绩" : order === "student_id" ? "学号" : ""}排序 -
      +
      • this.funorder("update_time")} data-remote="true" className=" font-12" style={{"text-align": "center "}}>更新时间
      • this.funorder("work_score")} data-remote="true" className=" font-12" style={{"text-align": "center "}}>最终成绩
      • this.funorder("student_id")} data-remote="true" className=" font-12" style={{"text-align": "center "}}>学生学号
      • From 9d86b2a2eb74a8882805278c99c2d7bf73cf32dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 13 Jul 2019 10:32:04 +0800 Subject: [PATCH 11/18] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/shixunHomework/Listofworks.js | 12 +++++++++++- .../courses/shixunHomework/ShixunHomeworkPage.js | 10 +++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 0892db098..d92848219 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -29,6 +29,7 @@ import Associationmodel from '../coursesPublic/Associationmodel'; import '../css/members.css' import '../css/busyWork.css' import '../poll/pollStyle.css' +import './style.css'; import moment from 'moment'; import 'moment/locale/zh-cn'; import {getImageUrl, toPath} from 'educoder'; @@ -1595,13 +1596,22 @@ class Listofworks extends Component {
        {teacherdata === undefined ? "" : teacherdata.student_works.length}个检索结果({teacherdata === undefined ? "" : teacherdata.all_member_count}学生) +
        From 265d2a2004b75915d36cad8646b63e7ad98acd1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 13 Jul 2019 10:40:30 +0800 Subject: [PATCH 12/18] b --- .../src/modules/courses/shixunHomework/Workquestionandanswer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index 9602ad78c..a63c25da5 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -409,7 +409,7 @@ class Workquestionandanswer extends Component {
        - {jobsettingsdata === undefined || jobsettingsdata.data.description === null ? "无" : + {jobsettingsdata === undefined || jobsettingsdata.data.description === null ?
        "无"
        :
        -
        +
        {/* /!*{}}>
        From 75bb78294a5e76b2521ede973e2b6b67c824cd6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 13 Jul 2019 15:07:25 +0800 Subject: [PATCH 16/18] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 335ab80fa..76497748c 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -145,7 +145,7 @@ export function initAxiosInterceptors(props) { } if (response.data.status === 402) { - locationurl(response.data.url); + locationurl('/account/basic'); } From ea6cfcc03cc2581f3a0d8b51446fc8e3b8a9d09d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 13 Jul 2019 15:10:17 +0800 Subject: [PATCH 17/18] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 76497748c..335ab80fa 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -145,7 +145,7 @@ export function initAxiosInterceptors(props) { } if (response.data.status === 402) { - locationurl('/account/basic'); + locationurl(response.data.url); } From 23dd85b8f6a6d52ae90381cc51f5641725a07a79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 13 Jul 2019 15:31:39 +0800 Subject: [PATCH 18/18] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/App.js | 2 +- public/react/src/modules/tpm/NewHeader.js | 2 +- public/react/src/modules/user/AccountPage.js | 236 ++++++++--------- .../src/modules/user/account/AccountBasic.js | 238 +++++++++--------- .../src/modules/user/account/AccountNav.js | 136 +++++----- 5 files changed, 307 insertions(+), 307 deletions(-) diff --git a/public/react/src/App.js b/public/react/src/App.js index dfb8c89d0..dbd8e2c4c 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -274,7 +274,7 @@ class App extends Component { {/**/} {/*认证*/} - + {/*403*/} diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index e31603f3c..6890eeb74 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -754,7 +754,7 @@ submittojoinclass=(value)=>{
      • 我的实训
      • 我的实践课程
      • 我的项目
      • -
      • 账号管理
      • +
      • 账号管理
      • {/*
      • this.educoderlogin()} >登入测试接口
      • */} {/*
      • this.trialapplications()} >试用申请
      • */} {/*
      • 兴趣页
      • */} diff --git a/public/react/src/modules/user/AccountPage.js b/public/react/src/modules/user/AccountPage.js index c61eed4c4..87a5b3a9e 100644 --- a/public/react/src/modules/user/AccountPage.js +++ b/public/react/src/modules/user/AccountPage.js @@ -1,118 +1,118 @@ -import React, { Component } from 'react'; - -import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom"; -import {CNotificationHOC} from '../courses/common/CNotificationHOC' -import Loading from '../../Loading'; - -import Loadable from 'react-loadable'; - -import { TPMIndexHOC } from '../tpm/TPMIndexHOC'; - -import { SnackbarHOC, getImageUrl } from 'educoder'; -import AccountNav from './account/AccountNav' -import axios from 'axios' - -const AccountBasic= Loadable({ - loader: () => import('./account/AccountBasic'), - loading: Loading, -}) -const AccountBasicEdit= Loadable({ - loader: () => import('./account/AccountBasicEdit'), - loading: Loading, -}) - -const AccountCertification= Loadable({ - loader: () => import('./account/AccountCertification'), - loading: Loading, -}) -const AccountSecure= Loadable({ - loader: () => import('./account/AccountSecure'), - loading: Loading, -}) - -class AccountPage extends Component { - constructor (props) { - super(props) - this.state = { - basicInfo:undefined - } - } - - componentDidUpdate =(prevState)=>{ - if(this.props.current_user && this.props.current_user != prevState.current_user){ - this.getBasicInfo(this.props.current_user.login); - } - } - - componentDidMount = () =>{ - if(this.props.current_user){ - this.getBasicInfo(this.props.current_user.login); - } - } - - getBasicInfo=(login)=>{ - let url=`/users/accounts/${login || this.props.current_user.login}.json`; - axios.get(url).then((result)=>{ - if(result.data){ - if(result.data && result.data.base_info_completed == false){ - this.props.history.push(`/account/basic/edit`); - } - this.setState({ - basicInfo: Object.assign({}, {...result.data}, { avatar_url: `${result.data.avatar_url}?t=${new Date().getTime()}`}) - }) - } - }).catch((error)=>{ - console.log(error); - }) - } - render() { - let { basicInfo }=this.state; - const common = { basicInfo, getBasicInfo : this.getBasicInfo } - return ( -
        -
        - - -
        - - () - } - > - () - } - > - - () - } - > - - () - } - > - - () - } - > - -
        -
        -
        - ); - } -} - -export default CNotificationHOC()(SnackbarHOC() ( TPMIndexHOC ( AccountPage ))); +import React, { Component } from 'react'; + +import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom"; +import {CNotificationHOC} from '../courses/common/CNotificationHOC' +import Loading from '../../Loading'; + +import Loadable from 'react-loadable'; + +import { TPMIndexHOC } from '../tpm/TPMIndexHOC'; + +import { SnackbarHOC, getImageUrl } from 'educoder'; +import AccountNav from './account/AccountNav' +import axios from 'axios' + +const AccountBasic= Loadable({ + loader: () => import('./account/AccountBasic'), + loading: Loading, +}) +const AccountBasicEdit= Loadable({ + loader: () => import('./account/AccountBasicEdit'), + loading: Loading, +}) + +const AccountCertification= Loadable({ + loader: () => import('./account/AccountCertification'), + loading: Loading, +}) +const AccountSecure= Loadable({ + loader: () => import('./account/AccountSecure'), + loading: Loading, +}) + +class AccountPage extends Component { + constructor (props) { + super(props) + this.state = { + basicInfo:undefined + } + } + + componentDidUpdate =(prevState)=>{ + if(this.props.current_user && this.props.current_user != prevState.current_user){ + this.getBasicInfo(this.props.current_user.login); + } + } + + componentDidMount = () =>{ + if(this.props.current_user){ + this.getBasicInfo(this.props.current_user.login); + } + } + + getBasicInfo=(login)=>{ + let url=`/users/accounts/${login || this.props.current_user.login}.json`; + axios.get(url).then((result)=>{ + if(result.data){ + if(result.data && result.data.base_info_completed == false){ + this.props.history.push(`/profile/basic/edit`); + } + this.setState({ + basicInfo: Object.assign({}, {...result.data}, { avatar_url: `${result.data.avatar_url}?t=${new Date().getTime()}`}) + }) + } + }).catch((error)=>{ + console.log(error); + }) + } + render() { + let { basicInfo }=this.state; + const common = { basicInfo, getBasicInfo : this.getBasicInfo } + return ( +
        +
        + + +
        + + () + } + > + () + } + > + + () + } + > + + () + } + > + + () + } + > + +
        +
        +
        + ); + } +} + +export default CNotificationHOC()(SnackbarHOC() ( TPMIndexHOC ( AccountPage ))); diff --git a/public/react/src/modules/user/account/AccountBasic.js b/public/react/src/modules/user/account/AccountBasic.js index 831fd39ca..7eaecc625 100644 --- a/public/react/src/modules/user/account/AccountBasic.js +++ b/public/react/src/modules/user/account/AccountBasic.js @@ -1,119 +1,119 @@ -import React, { Component } from 'react'; - -import { SnackbarHOC, getImageUrl, City } from 'educoder'; -import { Form, Button, Input, Radio, Select, Tooltip, Icon } from 'antd' -import './common.css' - - -const RadioGroup = Radio.Group; -const Option = Select.Option -const radioOptions = [ - { label: '男', value: 'boy' }, - { label: '女', value: 'girl' }, -]; -class AccountBasicEdit extends Component { - constructor(props){ - super(props); - - } - - render() { - const { getFieldDecorator } = this.props.form; - const {basicInfo} =this.props - const showRealName = false; - return ( -
        -
        - -
        -
        基本信息
        - -
        - -
        - - {basicInfo && basicInfo.nickname} - - - - {basicInfo && basicInfo.name} - - - - {basicInfo && basicInfo.gender == 0?"男":"女"} - - - - - {basicInfo && basicInfo.location} {basicInfo && basicInfo.location_city} - - - - {basicInfo && basicInfo.technical_title} - - - - {basicInfo && basicInfo.school_name} - - - - {basicInfo && basicInfo.department_name} - -
        -
        -
        * 我们确保你所提供的信息均处于严格保密状态,不会泄露
        -
        - ); - } -} -const WrappedAccountBasicEdit = Form.create({ name: 'AccountBasicEdit' })(AccountBasicEdit); - -export default WrappedAccountBasicEdit; +import React, { Component } from 'react'; + +import { SnackbarHOC, getImageUrl, City } from 'educoder'; +import { Form, Button, Input, Radio, Select, Tooltip, Icon } from 'antd' +import './common.css' + + +const RadioGroup = Radio.Group; +const Option = Select.Option +const radioOptions = [ + { label: '男', value: 'boy' }, + { label: '女', value: 'girl' }, +]; +class AccountBasicEdit extends Component { + constructor(props){ + super(props); + + } + + render() { + const { getFieldDecorator } = this.props.form; + const {basicInfo} =this.props + const showRealName = false; + return ( +
        +
        + +
        +
        基本信息
        + +
        + +
        + + {basicInfo && basicInfo.nickname} + + + + {basicInfo && basicInfo.name} + + + + {basicInfo && basicInfo.gender == 0?"男":"女"} + + + + + {basicInfo && basicInfo.location} {basicInfo && basicInfo.location_city} + + + + {basicInfo && basicInfo.technical_title} + + + + {basicInfo && basicInfo.school_name} + + + + {basicInfo && basicInfo.department_name} + +
        +
        +
        * 我们确保你所提供的信息均处于严格保密状态,不会泄露
        +
        + ); + } +} +const WrappedAccountBasicEdit = Form.create({ name: 'AccountBasicEdit' })(AccountBasicEdit); + +export default WrappedAccountBasicEdit; diff --git a/public/react/src/modules/user/account/AccountNav.js b/public/react/src/modules/user/account/AccountNav.js index 82aefa5d6..9aa29b699 100644 --- a/public/react/src/modules/user/account/AccountNav.js +++ b/public/react/src/modules/user/account/AccountNav.js @@ -1,68 +1,68 @@ -import React, { Component } from 'react'; - -import { SnackbarHOC, getImageUrl } from 'educoder'; -import AccountImg from './AccountImg' -class AccountNav extends Component { - toBasic = () => { - this.props.history.push(`/account/basic`) - } - toCertification = () => { - this.props.history.push(`/account/certification`) - } - toSecure = () => { - this.props.history.push(`/account/secure`) - } - render() { - let { basicInfo } = this.props - console.log(this.props); - const path = window.location.pathname - const isBasic = path.indexOf('basic') != -1 || path == "/account" - const isCertification = path.indexOf('certification') != -1 - const isSecure = path.indexOf('secure') != -1 - return ( -
        - { - basicInfo && - -
        - - {basicInfo.name} - {basicInfo.technical_title} -
        - -
        -
        账号管理
        -
          -
        • - - 基本信息 - { - (basicInfo.authentication == 'uncertified' || basicInfo.authentication == 'applying') && - - } - { - basicInfo.authentication == 'certified' && - - } -
        • -
        • - 认证信息 - { - basicInfo.professional_certification == 'certified' && basicInfo.authentication == 'certified' ? - : - - } -
        • -
        • - 安全设置 -
        • -
        -
        -
        - } -
        - ); - } -} - -export default AccountNav ; +import React, { Component } from 'react'; + +import { SnackbarHOC, getImageUrl } from 'educoder'; +import AccountImg from './AccountImg' +class AccountNav extends Component { + toBasic = () => { + this.props.history.push(`/profile/basic`) + } + toCertification = () => { + this.props.history.push(`/profile/certification`) + } + toSecure = () => { + this.props.history.push(`/profile/secure`) + } + render() { + let { basicInfo } = this.props + console.log(this.props); + const path = window.location.pathname + const isBasic = path.indexOf('basic') != -1 || path == "/profile" + const isCertification = path.indexOf('certification') != -1 + const isSecure = path.indexOf('secure') != -1 + return ( +
        + { + basicInfo && + +
        + + {basicInfo.name} + {basicInfo.technical_title} +
        + +
        +
        账号管理
        +
          +
        • + + 基本信息 + { + (basicInfo.authentication == 'uncertified' || basicInfo.authentication == 'applying') && + + } + { + basicInfo.authentication == 'certified' && + + } +
        • +
        • + 认证信息 + { + basicInfo.professional_certification == 'certified' && basicInfo.authentication == 'certified' ? + : + + } +
        • +
        • + 安全设置 +
        • +
        +
        +
        + } +
        + ); + } +} + +export default AccountNav ;