From 443e427a7eead02d0086a5d6d36c7d32a1355a6b 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, 6 Sep 2019 10:34:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E8=AF=BE=E5=A0=82=E6=96=B0=E5=BC=80=E9=A1=B5=20goback=20?= =?UTF-8?q?=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/new/CoursesNew.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index ec73cc17d..a2cc45916 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -335,11 +335,19 @@ class CoursesNew extends Component { // this.props.history.push(this.props.current_user.first_category_url); // } // window.history.go(-1) - if(id===undefined){ - this.props.history.goBack() - }else{ - this.props.history.push(this.props.current_user.first_category_url); - } + try { + if(id===undefined){ + this.props.history.push("/"); + }else{ + if(this.props.current_user.first_category_url===undefined){ + this.props.history.push("/"); + }else{ + this.props.history.push(this.props.current_user.first_category_url); + } + } + }catch (e) { + this.props.history.push("/"); + } } From 82c8634821da00a1110f3c6ecce826a8de5f4ef0 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, 6 Sep 2019 10:34:53 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E6=8A=A5=E5=91=8A?= =?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/shixunHomework/ShixunWorkReport.js | 14 ++++++++------ .../shixunreport/ConclusionEvaluation.js | 2 +- .../shixunreport/OfficialAcademicTranscript.js | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index e74627c03..11a9b2f34 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -168,27 +168,29 @@ class ShixunWorkReport extends Component { // }) // // } + let{work_comment,work_comment_hidden}=this.state; this.setState({ showAppraiseModaltype:true, + work_comment_hidden:work_comment===null||work_comment===undefined?this.state.work_type?true:false:work_comment_hidden, }) } hideAppraiseModal=()=>{ - let{data,work_comment}=this.state; + let{work_comment,work_comment_hidden}=this.state; this.setState({ showAppraiseModaltype:false, - work_comment_hidden:data&&data.work_comment_hidden===true?true:work_comment!=null?true:false, + work_comment_hidden:work_comment===null||work_comment===undefined?this.state.work_type===1?true:false:work_comment_hidden, }) } showAppraiseModals=(list,type)=>{ - let{data,work_comment}=this.state; + this.setState({ showAppraiseModaltype:false, - work_comment_hidden:data&&data.work_comment_hidden===true?true:work_comment!=null?true:false, + work_comment_hidden:type===0?false:true, work_comment:list, work_type:type, showAppraiseModals:true, - showAppraiseModalsshow:true + showAppraiseModalsshow:true, }) } isdeleteModal=()=>{ @@ -258,7 +260,7 @@ class ShixunWorkReport extends Component { Cancel={()=>this.hideAppraiseModal()} showCancel={(list,type)=>this.showAppraiseModals(list,type)} work_comment={this.state.work_comment} - work_type={this.state.work_type} + work_type={work_comment===null||work_comment===undefined?this.state.work_type:work_comment_hidden===true?1:0} />:""}
diff --git a/public/react/src/modules/courses/shixunHomework/shixunreport/ConclusionEvaluation.js b/public/react/src/modules/courses/shixunHomework/shixunreport/ConclusionEvaluation.js index 3ae69dfaa..d5c8aa57f 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunreport/ConclusionEvaluation.js +++ b/public/react/src/modules/courses/shixunHomework/shixunreport/ConclusionEvaluation.js @@ -81,7 +81,7 @@ class ConclusionEvaluation extends Component { ), }, { - title: '耗时', + title: '实战耗时', key: 'elapsed', dataIndex: 'elapsed', diff --git a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js index 2195228e1..2a79ce829 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js +++ b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js @@ -150,7 +150,7 @@ class OfficialAcademicTranscript extends Component { ), }, { - title: '耗时', + title: '实战耗时', key: 'elapsedtime', dataIndex: 'elapsedtime',