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] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E6=8A=A5=E5=91=8A=E8=B0=83?= =?UTF-8?q?=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} />:""}