From 48a37f56a2cfc328d1ceceae301336d89a535a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 17 Mar 2020 17:22:33 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=AE=9E=E4=BD=9C=E4=B8=9A=E8=AE=AD?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9F=A5=E7=9C=8B=E5=AD=A6=E7=94=9Ftpi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixunHomework/ShixunWorkReport.js | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index 5e4842574..959ba9244 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -38,6 +38,7 @@ class ShixunWorkReport extends Component { work_comment_hidden:undefined, work_comment:undefined, has_commit: false, + shixun_detail:[] } } @@ -113,7 +114,8 @@ class ShixunWorkReport extends Component { work_comment_hidden:result.data.work_comment_hidden, work_comment:result.data.work_comment, spinning: false, - has_commit: result.data.has_commit + has_commit: result.data.has_commit, + shixun_detail:result.data.shixun_detail }) } @@ -305,7 +307,7 @@ class ShixunWorkReport extends Component { } render() { - let {data, showAppraiseModaltype, work_comment_hidden, work_comment, has_commit} = this.state; + let {data, showAppraiseModaltype, work_comment_hidden, work_comment, has_commit,shixun_detail} = this.state; let category_id=data===undefined?"":data.category===null?"":data.category.category_id; let homework_common_id=data===undefined?"":data.homework_common_id; @@ -454,7 +456,20 @@ class ShixunWorkReport extends Component {
-
总体评价
+
+
总体评价
+
+ { + shixun_detail&&shixun_detail.map((item,key)=>{ + if(key===0){ + return( + 查看学员实训 + ) + } + }) + } +
+
From a14c67aab42b87dd831d6af0c742f7d4fc8b1377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 17 Mar 2020 17:25:16 +0800 Subject: [PATCH 2/3] =?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/coursesPublic/sendResources.js | 64 +++++++++++-------- 1 file changed, 37 insertions(+), 27 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/sendResources.js b/public/react/src/modules/courses/coursesPublic/sendResources.js index 75726a51f..50c08bf66 100644 --- a/public/react/src/modules/courses/coursesPublic/sendResources.js +++ b/public/react/src/modules/courses/coursesPublic/sendResources.js @@ -213,17 +213,25 @@ class sendResources extends Component{ } + // console.log("description"); + // console.log(description); + if(description===undefined||description===null){ - if(description===undefined){ + }else { + if(description.length>100){ + + this.setState({ + descriptiontype:true + }) + return + } - }else if(description.length>100){ - this.setState({ - descriptiontype:true - }) - return } + + + if(this.props.Exterchainname==="资源设置"){ //设置 let coursesId=this.props.match.params.coursesId; @@ -240,13 +248,17 @@ class sendResources extends Component{ description:description, delay_publish:Radiovalue, }).then((result)=>{ - if(result.data.status===0){ - this.ModalCancelModalCancel(); - this.props.updataleftNavfun(); - this.props.showNotification("设置资源成功"); - this.props.setupdate(1,false) - }else{ - this.props.showNotification(result.data.message); + if(result){ + if(result.data){ + if(result.data.status===0){ + this.ModalCancelModalCancel(); + this.props.updataleftNavfun(); + this.props.showNotification("设置资源成功"); + this.props.setupdate(1,false) + }else{ + this.props.showNotification(result.data.message); + } + } } }) @@ -266,22 +278,20 @@ class sendResources extends Component{ description:description, delay_publish:Radiovalue, }).then((result)=>{ - - - if(result.data.status===0){ - this.ModalCancelModalCancel(); - this.props.updataleftNavfun(); - this.props.showNotification("上传资源成功"); - this.props.setupdate(1,false) - }else{ - this.props.showNotification(result.data.message); + if(result){ + if(result.data){ + if(result.data.status===0){ + this.ModalCancelModalCancel(); + this.props.updataleftNavfun(); + this.props.showNotification("上传资源成功"); + this.props.setupdate(1,false) + }else{ + this.props.showNotification(result.data.message); + } + } } }) - } - - - } settextarea=(e)=>{ @@ -348,7 +358,7 @@ class sendResources extends Component{ } handleChangess=(e)=>{ - this.setState({ + this.setState({ resourceurl:e.target.value, resourceurlbool:false, }) From fa8a8a4f4cce7ebd2e82426bc39d32c3f76472f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 17 Mar 2020 17:55:10 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/shixunHomework/ShixunWorkReport.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index 959ba9244..8834df1af 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -315,7 +315,8 @@ class ShixunWorkReport extends Component { const antIcon = ; // let showAppraiseModals=this.props&&this.props.isAdminOrTeacher()===true?work_comment===null||work_comment===undefined?false:true:work_comment===null||work_comment===undefined?false:true; - let showAppraiseModals=work_comment===null||work_comment===undefined?false:true; + // let showAppraiseModals=work_comment===null||work_comment===undefined?false:true; + // console.log(this.props.isAdmin()) document.title=data&&data.course_name; return ( @@ -460,13 +461,13 @@ class ShixunWorkReport extends Component {
总体评价
{ - shixun_detail&&shixun_detail.map((item,key)=>{ + this.props&&this.props.isAdmin()===true?shixun_detail&&shixun_detail.map((item,key)=>{ if(key===0){ return( 查看学员实训 ) } - }) + }):"" }