From 7b5966b2e2c1235265f94580f0cfcc49cac76533 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 9 Sep 2019 20:00:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BC=A0=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/coursesPublic/AppraiseModal.js | 3 +- .../shixunHomework/ShixunWorkReport.js | 9 ++-- .../OfficialAcademicTranscript.js | 47 +++++++++---------- 3 files changed, 30 insertions(+), 29 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/AppraiseModal.js b/public/react/src/modules/courses/coursesPublic/AppraiseModal.js index 9d1efa5b0..a78e5be62 100644 --- a/public/react/src/modules/courses/coursesPublic/AppraiseModal.js +++ b/public/react/src/modules/courses/coursesPublic/AppraiseModal.js @@ -72,8 +72,9 @@ class AppraiseModal extends Component{ challenge_id:challenge_id }).then((response) => { if(response.data.status===0){ + debugger this.props.showNotification(response.data.message) - this.props.showCancel(comment,hidden_comment,challenge_id) + this.props.showCancel(comment,hidden_comment,response.data.comment_id) }else{ this.props.showNotification(response.data.message) } diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index 374aef8d4..e1b6590b5 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -157,7 +157,7 @@ class ShixunWorkReport extends Component { showAppraiseModal=(type,id,show,hidden)=>{ let{data}=this.state; - debugger + if(type==="child"){ data.stage_list.forEach((item,key)=>{ if(item.challenge_id===id){ @@ -192,12 +192,13 @@ class ShixunWorkReport extends Component { let{data,showAppraisetype}=this.state; - debugger + if(showAppraisetype==="child"){ data.stage_list.forEach((item,key)=>{ if(item.challenge_id===id){ item.challenge_comment=show; item.challenge_comment_hidden=hidden; + item.challenge_id=id; } }) this.setState({ @@ -205,10 +206,12 @@ class ShixunWorkReport extends Component { data:data }) }else{ + data.comment_id=id this.setState({ showAppraiseModaltype:false, work_comment:show, - work_comment_hidden:hidden + work_comment_hidden:hidden, + data:data }) } diff --git a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js index 0cb75dee3..be99c7035 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js +++ b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js @@ -15,31 +15,7 @@ class OfficialAcademicTranscript extends Component { } componentDidMount() { - let {data}=this.props; - - let datas=[]; - if(data!=undefined){ - data.stage_list===undefined?"":data.stage_list.forEach((item,key)=>{ - datas.push({ - customs: key+1, - taskname:{name:item.name,complete_status:item.complete_status}, - openingtime:item.open_time, - evaluating: item.evaluate_count, - finishtime:item.finished_time, - elapsedtime:item.time_consuming, - empvalue:{myself:item.myself_experience,experience:item.experience}, - game_scores:{game_score:item.game_score,game_score_full:item.game_score_full}, - challenge_id:{id:item.challenge_id}, - challenge_comment: item.challenge_comment, - challenge_comment_hidden: item.challenge_comment_hidden, - // adjustmentminute:asdasd - }) - }) - this.setState({ - datas:datas - }) - } } myjumptopic=(e)=>{ console.log("获取到值"); @@ -98,7 +74,28 @@ class OfficialAcademicTranscript extends Component { } render() { - let {datas,customsids}=this.state; + let {customsids}=this.state; + let {data}=this.props; + + let datas=[]; + if(data!=undefined){ + data.stage_list===undefined?"":data.stage_list.forEach((item,key)=>{ + datas.push({ + customs: key+1, + taskname:{name:item.name,complete_status:item.complete_status}, + openingtime:item.open_time, + evaluating: item.evaluate_count, + finishtime:item.finished_time, + elapsedtime:item.time_consuming, + empvalue:{myself:item.myself_experience,experience:item.experience}, + game_scores:{game_score:item.game_score,game_score_full:item.game_score_full}, + challenge_id:{id:item.challenge_id}, + challenge_comment: item.challenge_comment, + challenge_comment_hidden: item.challenge_comment_hidden, + // adjustmentminute:asdasd + }) + }) + } let columns=[{ title: '关卡',