|
|
|
@ -32,7 +32,9 @@ class ShixunWorkReport extends Component {
|
|
|
|
|
DownloadMessageval:undefined,
|
|
|
|
|
isspinning:false,
|
|
|
|
|
showAppraiseModaltype:false,
|
|
|
|
|
work_comment_hidden:false
|
|
|
|
|
work_comment_hidden:false,
|
|
|
|
|
showAppraiseModalsshow:true,
|
|
|
|
|
work_comment:null
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -104,6 +106,7 @@ class ShixunWorkReport extends Component {
|
|
|
|
|
this.setState({
|
|
|
|
|
data:result.data,
|
|
|
|
|
work_comment_hidden:result.data.work_comment_hidden,
|
|
|
|
|
work_comment:result.data.work_comment,
|
|
|
|
|
spinning:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
@ -151,25 +154,40 @@ class ShixunWorkReport extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
showAppraiseModal=()=>{
|
|
|
|
|
debugger
|
|
|
|
|
this.setState({
|
|
|
|
|
showAppraiseModaltype:true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hideAppraiseModal=()=>{
|
|
|
|
|
let{data}=this.state;
|
|
|
|
|
let{data,work_comment}=this.state;
|
|
|
|
|
this.setState({
|
|
|
|
|
showAppraiseModaltype:false,
|
|
|
|
|
work_comment_hidden:data&&data.work_comment_hidden===true?true:data&&data.work_description!=null?true:false,
|
|
|
|
|
work_comment_hidden:data&&data.work_comment_hidden===true?true:work_comment!=null?true:false,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
showAppraiseModals=(list,type)=>{
|
|
|
|
|
let{data,work_comment}=this.state;
|
|
|
|
|
this.setState({
|
|
|
|
|
showAppraiseModaltype:false,
|
|
|
|
|
work_comment_hidden:data&&data.work_comment_hidden===true?true:work_comment!=null?true:false,
|
|
|
|
|
work_comment:list,
|
|
|
|
|
work_type:type,
|
|
|
|
|
showAppraiseModals:true,
|
|
|
|
|
showAppraiseModalsshow:true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
isdeleteModal=()=>{
|
|
|
|
|
let url =`/student_works/${this.props.match.params.homeworkid}/destroy_work_comment.json`
|
|
|
|
|
axios.delete(url).then((response) => {
|
|
|
|
|
// const { status } = response.data;
|
|
|
|
|
if(response.data.status===0){
|
|
|
|
|
this.props.showNotification(response.data.message)
|
|
|
|
|
this.setState({
|
|
|
|
|
showAppraiseModalsshow:false,
|
|
|
|
|
work_comment_hidden:false
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.props.showNotification(response.data.message)
|
|
|
|
|
}
|
|
|
|
@ -179,14 +197,14 @@ class ShixunWorkReport extends Component {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
let{data,showAppraiseModaltype,work_comment_hidden} =this.state;
|
|
|
|
|
let{data,showAppraiseModaltype,work_comment_hidden,showAppraiseModalsshow,work_comment} =this.state;
|
|
|
|
|
|
|
|
|
|
let category_id=data===undefined?"":data.category===null?"":data.category.category_id;
|
|
|
|
|
let homework_common_id=data===undefined?"":data.homework_common_id;
|
|
|
|
|
let homeworkid=this.props.match.params.homeworkid;
|
|
|
|
|
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
|
|
|
|
|
|
|
|
|
|
let showAppraiseModals=this.props&&this.props.isAdminOrTeacher()===true?work_comment_hidden===true?true:false:data&&data.work_description===null?false:true;
|
|
|
|
|
let showAppraiseModals=this.props&&this.props.isAdminOrTeacher()===true?work_comment_hidden===true?true:false:work_comment===null?false:true;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
|
@ -197,6 +215,9 @@ class ShixunWorkReport extends Component {
|
|
|
|
|
{...this.state}
|
|
|
|
|
visible={showAppraiseModaltype}
|
|
|
|
|
Cancel={()=>this.hideAppraiseModal()}
|
|
|
|
|
showCancel={(list,type)=>this.showAppraiseModals(list,type)}
|
|
|
|
|
work_comment={this.state.work_comment}
|
|
|
|
|
work_type={this.state.work_type}
|
|
|
|
|
/>:""}
|
|
|
|
|
<div className="newMain clearfix ">
|
|
|
|
|
<div className={"educontent mb20" }>
|
|
|
|
@ -395,7 +416,7 @@ class ShixunWorkReport extends Component {
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{showAppraiseModals===true?<div className="stud-class-set mt17">
|
|
|
|
|
{showAppraiseModals===true&&showAppraiseModalsshow===true?<div className="stud-class-set mt17">
|
|
|
|
|
<div className="clearfix edu-back-white poll_list">
|
|
|
|
|
|
|
|
|
|
<div className="font-16 color-dark-21 shixunreporttitleboxtop pd20 color333">
|
|
|
|
@ -415,7 +436,7 @@ class ShixunWorkReport extends Component {
|
|
|
|
|
<div style={{minHeight:'50px'}}>
|
|
|
|
|
<div className={"personalsummary"}>
|
|
|
|
|
<div className={"markdown-body"}
|
|
|
|
|
dangerouslySetInnerHTML={{__html: markdownToHTML(data&&data.work_description).replace(/▁/g, "▁▁▁")}}></div>
|
|
|
|
|
dangerouslySetInnerHTML={{__html: markdownToHTML(work_comment).replace(/▁/g, "▁▁▁")}}></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|