|
|
|
@ -9,10 +9,11 @@ class AppraiseModal extends Component{
|
|
|
|
|
this.state={
|
|
|
|
|
group_ids:[],
|
|
|
|
|
fileList:[],
|
|
|
|
|
textareaval:undefined,
|
|
|
|
|
Inputsval:undefined,
|
|
|
|
|
valuetype:0,
|
|
|
|
|
textareavaltype:false
|
|
|
|
|
textareavaltype:false,
|
|
|
|
|
comment:undefined,
|
|
|
|
|
hidden_comment:undefined
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -25,32 +26,40 @@ class AppraiseModal extends Component{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onChanges=(e)=>{
|
|
|
|
|
comment=(e)=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
valuetype:e.target.value
|
|
|
|
|
comment:e.target.value
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
settextarea=(e)=>{
|
|
|
|
|
hidden_comment=(e)=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
textareaval:e.target.value
|
|
|
|
|
hidden_comment:e.target.value
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Saves=()=>{
|
|
|
|
|
let{textareaval,valuetype}=this.state;
|
|
|
|
|
let{textareaval,valuetype,comment,hidden_comment}=this.state;
|
|
|
|
|
let commenttype=comment===undefined||comment===null||comment==="";
|
|
|
|
|
let hidden_commenttype=hidden_comment===undefined||hidden_comment===null||hidden_comment==="";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(textareaval===undefined||textareaval===null||textareaval===""){
|
|
|
|
|
if(commenttype===true&&hidden_commenttype===true){
|
|
|
|
|
this.setState({
|
|
|
|
|
textareavaltype:true
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//comment 是 text 可见的评阅内容
|
|
|
|
|
// hidden_comment 是 text 不可见的评阅内容
|
|
|
|
|
// challenge_id 否 int 关卡id(关卡评阅才需传关卡id)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let url=`/student_works/${this.props.match.params.homeworkid}/shixun_work_comment.json`
|
|
|
|
|
axios.post(url, {
|
|
|
|
|
comment:textareaval,
|
|
|
|
|
is_hidden:valuetype
|
|
|
|
|
hidden_comment:valuetype
|
|
|
|
|
}).then((response) => {
|
|
|
|
|
if(response.data.status===0){
|
|
|
|
|
this.props.showNotification(response.data.message)
|
|
|
|
@ -64,15 +73,41 @@ class AppraiseModal extends Component{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render(){
|
|
|
|
|
let {textareaval,Inputsval,textareavaltype,Inputsvaltype}=this.state;
|
|
|
|
|
const radioStyle = {
|
|
|
|
|
display: 'block',
|
|
|
|
|
height: '30px',
|
|
|
|
|
lineHeight: '30px',
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
let {textareavaltype,comment,hidden_comment}=this.state;
|
|
|
|
|
return(
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
@media (max-width: 2000px) {
|
|
|
|
|
.WordNumberTextarea{
|
|
|
|
|
height: 130px !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (max-width: 1350px) {
|
|
|
|
|
.HomeworkModal{
|
|
|
|
|
top:10px !important;
|
|
|
|
|
}
|
|
|
|
|
.WordNumberTextarea{
|
|
|
|
|
height: 80px !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (max-width: 1250px) {
|
|
|
|
|
.HomeworkModal{
|
|
|
|
|
top:0px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.WordNumberTextarea{
|
|
|
|
|
height: 40px !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<Modal
|
|
|
|
|
keyboard={false}
|
|
|
|
|
className={"HomeworkModal"}
|
|
|
|
@ -91,12 +126,9 @@ class AppraiseModal extends Component{
|
|
|
|
|
padding: 0px 15px 15px 15px;
|
|
|
|
|
}
|
|
|
|
|
.font{
|
|
|
|
|
|
|
|
|
|
height: 16px;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: rgba(5,16,26,1);
|
|
|
|
|
line-height: 16px;
|
|
|
|
|
}
|
|
|
|
|
.newfont{
|
|
|
|
|
height: 16px;
|
|
|
|
@ -110,7 +142,7 @@ class AppraiseModal extends Component{
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<div className="clearfix">
|
|
|
|
|
<p className={"font mt10 mb10"}>
|
|
|
|
|
<p className={"font mt10 mb10 ml10"}>
|
|
|
|
|
可见:(学生可查看老师的评阅内容)
|
|
|
|
|
</p>
|
|
|
|
|
{/*<Radio.Group onChange={this.onChanges} value={this.state.valuetype}>*/}
|
|
|
|
@ -119,22 +151,22 @@ class AppraiseModal extends Component{
|
|
|
|
|
{/*</Radio.Group>*/}
|
|
|
|
|
<WordNumberTextarea
|
|
|
|
|
placeholder={"请填写评阅内容"}
|
|
|
|
|
onInput={(e)=>this.settextarea(e)}
|
|
|
|
|
value={textareaval}
|
|
|
|
|
onInput={(e)=>this.comment(e)}
|
|
|
|
|
value={comment}
|
|
|
|
|
maxlength={500}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<p className={"font mt10 mb20"}>
|
|
|
|
|
<p className={"font mt10 mb10 ml10"}>
|
|
|
|
|
不可见:(仅对课堂老师可见)
|
|
|
|
|
</p>
|
|
|
|
|
<WordNumberTextarea
|
|
|
|
|
placeholder={"请填写评阅内容"}
|
|
|
|
|
onInput={(e)=>this.settextarea(e)}
|
|
|
|
|
value={textareaval}
|
|
|
|
|
onInput={(e)=>this.hidden_comment(e)}
|
|
|
|
|
value={hidden_comment}
|
|
|
|
|
maxlength={500}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<li style={{height:"20px",lineHeight:"20px"}} className={textareavaltype===true?"color-red mt20 mb10":"none"}><span>评阅内容不能为空</span></li>
|
|
|
|
|
<li style={{height:"20px",lineHeight:"20px"}} className={textareavaltype===true?"color-red mt20 mb10":"none"}><span>评阅内容至少有一个不为空</span></li>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className={textareavaltype===false?"mt20 clearfix edu-txt-center":"clearfix edu-txt-center"}>
|
|
|
|
|