From 2c359d03284d1b83c268fdaf7701525f051637da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 18 Jul 2019 16:14:24 +0800 Subject: [PATCH] =?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/coursesDetail/CoursesLeftNav.js | 26 +- .../courses/coursesPublic/AccessoryModal2.js | 2 +- .../exercise/Exercisestatisticalresult.js | 14 +- .../graduation/tasks/GraduateTaskItem.js | 2 +- .../modules/courses/graduation/tasks/index.js | 2 +- .../graduation/topics/GraduateTopicDetail.js | 324 +++++++++--------- .../src/modules/courses/new/CoursesNew.js | 16 + .../courses/shixunHomework/CommitSummary.js | 2 +- .../shixunHomework/Trainingjobsetting.js | 4 +- .../src/modules/login/Trialapplication.js | 4 +- .../paths/PathDetail/DetailCardsTemp.js | 324 +++++++++--------- public/react/src/modules/tpm/TPMBanner.js | 4 +- .../tpm/challengesnew/TPMchallengesnew.js | 7 - .../tpm/challengesnew/TpmQuestionEdit.js | 15 +- .../tpm/challengesnew/TpmQuestionNew.js | 8 +- .../src/modules/user/FindPasswordComponent.js | 2 +- 16 files changed, 384 insertions(+), 372 deletions(-) diff --git a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js index 9d50426e8..2a395200c 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js @@ -358,6 +358,7 @@ class Coursesleftnav extends Component{ navid:undefined, sandiantype:undefined, twosandiantype:undefined, + ModalsType:false }) let url="/course_modules/"+id+"/hidden_module.json" @@ -379,12 +380,25 @@ class Coursesleftnav extends Component{ edithidden=(e,id)=>{ e.stopPropagation();//阻止冒泡 - this.setState({ - ModalsType:true, - Modalstopval:"隐藏后将不再显示此模块,", - ModalsBottomval:"后续可通过添加模块恢复显示", - ModalSave:()=>this.edithiddens(id), - }) + let {course_modules}=this.props; + + if(course_modules.length>1){ + this.setState({ + ModalsType:true, + Modalstopval:"隐藏后将不再显示此模块,", + ModalsBottomval:"后续可通过添加模块恢复显示", + ModalSave:()=>this.edithiddens(id), + }) + }else{ + this.setState({ + ModalsType:true, + Modalstopval:"您不能隐藏所有课堂模块,请至少保留", + ModalsBottomval:"其中一个模块。", + loadtype:true, + ModalSave:()=>this.cannerNavmoda(), + }) + } + } Navmodalnames=(e,id,type,setnavid,name)=>{ diff --git a/public/react/src/modules/courses/coursesPublic/AccessoryModal2.js b/public/react/src/modules/courses/coursesPublic/AccessoryModal2.js index 14b1f71e1..9019fe7a1 100644 --- a/public/react/src/modules/courses/coursesPublic/AccessoryModal2.js +++ b/public/react/src/modules/courses/coursesPublic/AccessoryModal2.js @@ -135,7 +135,7 @@ class AccessoryModal2 extends Component{ description:description, attachment_ids:newfileList }).then((result)=>{ - console.log(result) + // console.log(result) if(result.data.status===0){ this.props.setupdate() this.setState({ diff --git a/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js b/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js index 6a7f1c505..fb03835f6 100644 --- a/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js +++ b/public/react/src/modules/courses/exercise/Exercisestatisticalresult.js @@ -42,7 +42,7 @@ class Exercisestatisticalresult extends Component { limit:limit } }).then((result) => { - console.log(result) + // console.log(result) this.setState({ data:result.data @@ -85,6 +85,10 @@ class Exercisestatisticalresult extends Component { page:pageNumber }) + debugger + $('html').animate({ + scrollTop: 10 + }, 1000); this.updatefun(sort,exercise_group_id,pageNumber,limit) } @@ -109,10 +113,10 @@ class Exercisestatisticalresult extends Component {