From 5437ff4b7a2a5d0b8e8733f2308031a7aa4c178e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 21 Jun 2019 10:13:05 +0800 Subject: [PATCH 1/2] =?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/graduation/tasks/GraduationTaskssetting.js | 2 +- .../courses/graduation/tasks/GraduationTaskssettinglist.js | 2 +- .../courses/graduation/tasks/GraduationTaskssettingquestions.js | 2 +- public/react/src/modules/courses/graduation/topics/index.js | 2 +- public/react/src/modules/courses/shixunHomework/Listofworks.js | 2 +- .../src/modules/courses/shixunHomework/ShixunStudentWork.js | 2 +- .../src/modules/courses/shixunHomework/Trainingjobsetting.js | 2 +- .../src/modules/courses/shixunHomework/Workquestionandanswer.js | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index 762fe1406..d19225743 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -1066,7 +1066,7 @@ class GraduationTaskssettingapp extends Component{ {this.props.isAdmin()?
  • 导出
  • :""} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index ecfd21257..29aa95385 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -1322,7 +1322,7 @@ class GraduationTaskssettinglist extends Component{ {this.props.isAdmin()?
  • 导出
  • :""} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js index f373af827..5732c03f1 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js @@ -308,7 +308,7 @@ class GraduationTasksquestions extends Component{ {this.props.isAdmin()?
  • 导出
  • :""} diff --git a/public/react/src/modules/courses/graduation/topics/index.js b/public/react/src/modules/courses/graduation/topics/index.js index d7d6852f2..efe15eccd 100644 --- a/public/react/src/modules/courses/graduation/topics/index.js +++ b/public/react/src/modules/courses/graduation/topics/index.js @@ -337,7 +337,7 @@ onBoardsNew=()=>{ {/* 参考普通作业 - 题库选用 */} {/* this.useFromBank()}>题库选用 正式版没有,先隐藏*/}

    - < a href={`/api/courses/${this.props.match.params.coursesId}/graduation_topics/export.xls`} className={"color-blue mr20 font-16"}>导出 + < a href={`/api/courses/${this.props.match.params.coursesId}/graduation_topics/export.xlsx`} className={"color-blue mr20 font-16"}>导出 this.onBoardsNew()}>新建 ):"" } diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index d346486d4..e38a0c453 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -1116,7 +1116,7 @@ class Listofworks extends Component { >设置 {this.props.isAdmin() ? 导出 : ""} {this.props.isAdmin() ? teacherdata && teacherdata.end_immediately === true ? diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js index 3fbdb2d3b..461c4d74d 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -590,7 +590,7 @@ class ShixunStudentWork extends Component { >设置 {this.props.isAdmin() ? 导出 : ""} {this.props.isAdmin()? data.end_immediately===true? diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 70a92aae6..919a744cf 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1592,7 +1592,7 @@ class Trainingjobsetting extends Component { {/**/} {this.props.isAdmin() ? 导出 : ""} {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true? 立即截止 : "": ""} diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index 419bca1b5..a06a5be32 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -411,7 +411,7 @@ class Workquestionandanswer extends Component { {/*导出成绩*/} {this.props.isAdmin() ? 导出 : ""} {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true? 立即截止:"" : ""} From 83937f4304e3ea505cdeb3561bc0603eb29b4d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 21 Jun 2019 10:38:37 +0800 Subject: [PATCH 2/2] =?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 | 58 +++++++++++-------- .../tasks/GraduationTaskssettinglist.js | 2 +- .../tasks/GraduationTaskssettingquestions.js | 2 +- 3 files changed, 35 insertions(+), 27 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index d19225743..c74f8a1d7 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -140,9 +140,11 @@ class GraduationTaskssettingapp extends Component{ componentDidMount(){ - + let query=this.props.location.search + const type = query.split('?tab='); + let id=parseInt(type[1]) this.getsettings(); - if(this.props.isAdmin()===true){ + if(this.props.isAdmin()===true&&isNaN(id)){ this.editSetting() } } @@ -484,6 +486,31 @@ class GraduationTaskssettingapp extends Component{ let {latepenalty,hascommit,minnums,max_nums,publish_time,end_time,crosscomment,latetime,starttimetype}=this.state; + + if(isNaN(parseInt(this.state.minnum))){ + this.setState({ + numtype:true + }) + this.scrollToAnchor("publishtimestart"); + return + }else{ + this.setState({ + numtype:false + }) + } + if(isNaN(parseInt(this.state.maxnum))){ + this.setState({ + numtype:true + }) + this.scrollToAnchor("publishtimestart"); + return + }else{ + this.setState({ + numtype:false + }) + } + + if(latepenalty===undefined){ this.setState({ latepenaltytype:true, @@ -611,26 +638,7 @@ class GraduationTaskssettingapp extends Component{ return } - if(isNaN(parseInt(this.state.minnum))){ - this.setState({ - numtype:true - }) - return - }else{ - this.setState({ - numtype:false - }) - } - if(isNaN(parseInt(this.state.maxnum))){ - this.setState({ - numtype:true - }) - return - }else{ - this.setState({ - numtype:false - }) - } + @@ -1036,7 +1044,7 @@ class GraduationTaskssettingapp extends Component{ 任务问答 设置 + to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting?tab=3"}>设置 {/*导出*/}