|
|
|
@ -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>
|
|
|
|
|