dev_tj
杨树明 5 years ago
parent d248f79d66
commit be4a2102fc

@ -42,7 +42,7 @@ if (isDev) {
// 老师
//debugType="teacher";
// 学生
//debugType="student";
debugType="student";
function railsgettimes(proxy) {

@ -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{
`}</style>
{this.props.title && <span className="mainEditorTitle color-grey-6">{this.props.title}</span>}
<TPMMDEditor ref={this.mdRef} mdID={'appraiseEditor'} placeholder={placeholder || "请在此输入对本作品的评语最大限制2000个字符"}
watch={false} height={160} className={errorMessage ? 'editorInputError' : ''} imageExpand={true}></TPMMDEditor>
watch={false} height={160} className={errorMessage&&errorMessagetype!=true ? 'editorInputError' : ''} imageExpand={true}></TPMMDEditor>
{ showSameScore == true && <div>
<Checkbox checked={same_score} onChange={this.same_score_change}>整组同评</Checkbox>
<span className={"font-14 color-grey-9"}>(选中则本次评阅对象指小组全部成员否则仅评阅此成员1人 )</span>

@ -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 {
}
</style>
{/*this.state.enlarge===false?"":*/}
{this.state.isopentitletype==="Less"?"":this.state.opentitletype===true?<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}>
<a className={"font-14 color-grey-9"}>阅读全文 <i className={"iconfont icon-jiantou9 font-14"}></i></a>
</Divider>:<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}>
<a className={"font-14 color-grey-9"}>收起全文 <i className={"iconfont icon-changyongtubiao-xianxingdaochu-zhuanqu- font-14"}></i></a>
</Divider>}
{/*{this.state.isopentitletype==="Less"?"":this.state.opentitletype===true?<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}>*/}
{/* <a className={"font-14 color-grey-9"}>阅读全文 <i className={"iconfont icon-jiantou9 font-14"}></i></a>*/}
{/*</Divider>:<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}>*/}
{/* <a className={"font-14 color-grey-9"}>收起全文 <i className={"iconfont icon-changyongtubiao-xianxingdaochu-zhuanqu- font-14"}></i></a>*/}
{/*</Divider>}*/}
</div>
</p>

Loading…
Cancel
Save