Merge branches 'dev_aliyun' and 'develop' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

courseware
杨树林 5 years ago
commit 75c5075cc9

@ -213,17 +213,25 @@ class sendResources extends Component{
} }
// console.log("description");
// console.log(description);
if(description===undefined||description===null){
if(description===undefined){ }else {
if(description.length>100){
this.setState({
descriptiontype:true
})
return
}
}else if(description.length>100){
this.setState({
descriptiontype:true
})
return
} }
if(this.props.Exterchainname==="资源设置"){ if(this.props.Exterchainname==="资源设置"){
//设置 //设置
let coursesId=this.props.match.params.coursesId; let coursesId=this.props.match.params.coursesId;
@ -240,13 +248,17 @@ class sendResources extends Component{
description:description, description:description,
delay_publish:Radiovalue, delay_publish:Radiovalue,
}).then((result)=>{ }).then((result)=>{
if(result.data.status===0){ if(result){
this.ModalCancelModalCancel(); if(result.data){
this.props.updataleftNavfun(); if(result.data.status===0){
this.props.showNotification("设置资源成功"); this.ModalCancelModalCancel();
this.props.setupdate(1,false) this.props.updataleftNavfun();
}else{ this.props.showNotification("设置资源成功");
this.props.showNotification(result.data.message); this.props.setupdate(1,false)
}else{
this.props.showNotification(result.data.message);
}
}
} }
}) })
@ -266,22 +278,20 @@ class sendResources extends Component{
description:description, description:description,
delay_publish:Radiovalue, delay_publish:Radiovalue,
}).then((result)=>{ }).then((result)=>{
if(result){
if(result.data){
if(result.data.status===0){ if(result.data.status===0){
this.ModalCancelModalCancel(); this.ModalCancelModalCancel();
this.props.updataleftNavfun(); this.props.updataleftNavfun();
this.props.showNotification("上传资源成功"); this.props.showNotification("上传资源成功");
this.props.setupdate(1,false) this.props.setupdate(1,false)
}else{ }else{
this.props.showNotification(result.data.message); this.props.showNotification(result.data.message);
}
}
} }
}) })
} }
} }
settextarea=(e)=>{ settextarea=(e)=>{
@ -348,7 +358,7 @@ class sendResources extends Component{
} }
handleChangess=(e)=>{ handleChangess=(e)=>{
this.setState({ this.setState({
resourceurl:e.target.value, resourceurl:e.target.value,
resourceurlbool:false, resourceurlbool:false,
}) })

@ -38,6 +38,7 @@ class ShixunWorkReport extends Component {
work_comment_hidden:undefined, work_comment_hidden:undefined,
work_comment:undefined, work_comment:undefined,
has_commit: false, has_commit: false,
shixun_detail:[]
} }
} }
@ -113,7 +114,8 @@ class ShixunWorkReport extends Component {
work_comment_hidden:result.data.work_comment_hidden, work_comment_hidden:result.data.work_comment_hidden,
work_comment:result.data.work_comment, work_comment:result.data.work_comment,
spinning: false, spinning: false,
has_commit: result.data.has_commit has_commit: result.data.has_commit,
shixun_detail:result.data.shixun_detail
}) })
} }
@ -305,7 +307,7 @@ class ShixunWorkReport extends Component {
} }
render() { render() {
let {data, showAppraiseModaltype, work_comment_hidden, work_comment, has_commit} = this.state; let {data, showAppraiseModaltype, work_comment_hidden, work_comment, has_commit,shixun_detail} = this.state;
let category_id=data===undefined?"":data.category===null?"":data.category.category_id; let category_id=data===undefined?"":data.category===null?"":data.category.category_id;
let homework_common_id=data===undefined?"":data.homework_common_id; let homework_common_id=data===undefined?"":data.homework_common_id;
@ -454,7 +456,20 @@ class ShixunWorkReport extends Component {
<div className="stud-class-set"> <div className="stud-class-set">
<div className="clearfix edu-back-white poll_list"> <div className="clearfix edu-back-white poll_list">
<div className="font-16 color-dark-21 shixunreporttitleboxtop pd20">总体评价</div> <div className="font-16 color-dark-21 shixunreporttitleboxtop pd20">
<div className={"fl"}>总体评价</div>
<div className={"fr"}>
{
shixun_detail&&shixun_detail.map((item,key)=>{
if(key===0){
return(
<a className={"color-blue font-16"} href={/tasks/+item.game_identifier} target="_blank" >查看学员实训</a>
)
}
})
}
</div>
</div>
<div className="font-16 color-dark-21 shixunreporttitleboxbom pd20"> <div className="font-16 color-dark-21 shixunreporttitleboxbom pd20">
<div style={{clear:"both",height:'100px'}}> <div style={{clear:"both",height:'100px'}}>

Loading…
Cancel
Save