import React,{ Component } from "react"; import { Modal,Checkbox,Upload,Button,Icon,message,Input,Radio} from "antd"; import { WordNumberTextarea } from 'educoder'; import axios from 'axios'; class AppraiseModal extends Component{ constructor(props){ super(props); this.state={ group_ids:[], fileList:[], textareaval:undefined, Inputsval:undefined, valuetype:0, textareavaltype:false } } componentDidMount() { this.setState({ valuetype:this.props.work_type===undefined?0:this.props.work_type, textareaval:this.props.work_comment, }) } onChanges=(e)=>{ this.setState({ valuetype:e.target.value }) } settextarea=(e)=>{ this.setState({ textareaval:e.target.value }) } Saves=()=>{ let{textareaval,valuetype}=this.state; if(textareaval===undefined||textareaval===null||textareaval===""){ this.setState({ textareavaltype:true }) return } let url=`/student_works/${this.props.match.params.homeworkid}/shixun_work_comment.json` axios.post(url, { comment:textareaval, is_hidden:valuetype }).then((response) => { if(response.data.status===0){ this.props.showNotification(response.data.message) this.props.showCancel(textareaval,valuetype) }else{ this.props.showNotification(response.data.message) } }).catch((error) => { console.log(error) }); } render(){ let {textareaval,Inputsval,textareavaltype,Inputsvaltype}=this.state; const radioStyle = { display: 'block', height: '30px', lineHeight: '30px', }; return(

权限:

可见 (学生查看老师的评阅内容) 不可见 (仅对课堂老师可见)

内容:

this.settextarea(e)} value={textareaval} maxlength={500} />
  • 评阅内容不能为空
  • this.props.Cancel()}>{this.props.Cancelname || '取消'} {this.props.Savesname || '确定'}
    ) } } export default AppraiseModal;