From be4a2102fcf720e62c83d228c03b4c916bbc9a25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 11 Jan 2020 19:19:23 +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 --- public/react/src/AppConfig.js | 2 +- .../tasks/GraduationTasksappraiseMainEditor.js | 18 ++++++++++++++---- .../Challenges/Challengesjupyter.js | 14 ++++++++------ 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 12e0043d5..02d554806 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -42,7 +42,7 @@ if (isDev) { // 老师 //debugType="teacher"; // 学生 -//debugType="student"; +debugType="student"; function railsgettimes(proxy) { diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseMainEditor.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseMainEditor.js index ec6979c19..376a45eb8 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseMainEditor.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksappraiseMainEditor.js @@ -20,7 +20,8 @@ class GraduationTasksappraiseMainEditor extends Component{ score: undefined, same_score: false, errorMessage: '', - numberErrorMessage: '' + numberErrorMessage: '', + errorMessagetype:false } } onSubmit = () => { @@ -37,7 +38,10 @@ class GraduationTasksappraiseMainEditor extends Component{ return; } if (!score && this.props.isAdmin()===false) { - this.setState( {errorMessage : '分数不能同时为空' }) + this.setState( { + errorMessage : '分数不能同时为空', + errorMessagetype:true + }) // this.props.showNotification('请先输入评阅说明') return; } @@ -142,6 +146,12 @@ class GraduationTasksappraiseMainEditor extends Component{ }); } onScoreChange = (val) => { + if(val){ + this.setState( { + errorMessage: '', + errorMessagetype:false + }) + } if (val > 100 ) { this.props.showNotification('不能大于100') this.setState({ score: 100 }) @@ -163,7 +173,7 @@ class GraduationTasksappraiseMainEditor extends Component{ this.setState({ same_score: e.target.checked }) //!this.state.same_score } render(){ - let { total_count, comments, pageCount, fileList, score, same_score, errorMessage, numberErrorMessage } = this.state + let { total_count, comments, errorMessagetype, fileList, score, same_score, errorMessage, numberErrorMessage } = this.state const { current_user, memo, showSameScore, placeholder } = this.props const isAdmin = this.props.isAdmin() const commentUploadProp = { @@ -215,7 +225,7 @@ class GraduationTasksappraiseMainEditor extends Component{ `} {this.props.title && {this.props.title}} + watch={false} height={160} className={errorMessage&&errorMessagetype!=true ? 'editorInputError' : ''} imageExpand={true}> { showSameScore == true &&
整组同评 (选中,则本次评阅对象指小组全部成员,否则仅评阅此成员1人 ) diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index 61782d69f..9e50e44d5 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -87,7 +87,7 @@ class Challengesjupyter extends Component { // // } this.setState({ - opentitletype:true, + opentitletype:false, isopentitletype:"greater", boxoffsetHeigh:boxoffsetHeigh }) @@ -646,11 +646,13 @@ class Challengesjupyter extends Component { } {/*this.state.enlarge===false?"":*/} - {this.state.isopentitletype==="Less"?"":this.state.opentitletype===true?this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}> - 阅读全文 - :this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}> - 收起全文 - } + {/*{this.state.isopentitletype==="Less"?"":this.state.opentitletype===true?this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}>*/} + {/* 阅读全文 */} + {/*:this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}>*/} + {/* 收起全文 */} + {/*}*/} + +