|
|
|
@ -32,7 +32,10 @@ class DetailTop extends Component{
|
|
|
|
|
getappointmenttype:false,
|
|
|
|
|
openpathss:false,
|
|
|
|
|
cancel_publics:false,
|
|
|
|
|
cancel_has_publics:false
|
|
|
|
|
cancel_has_publics:false,
|
|
|
|
|
applyissuePaths:false,
|
|
|
|
|
cancelText:undefined,
|
|
|
|
|
okText:undefined
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
componentDidMount(){
|
|
|
|
@ -110,21 +113,27 @@ class DetailTop extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
applyissuePath=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
loadtype:true,
|
|
|
|
|
Modalstype: true,
|
|
|
|
|
Modalstopval:` 课程需经过平台审核方可公开使用,公开的课程将对平台所`,
|
|
|
|
|
modalsMidval:"有人公开可见,若仅本人教学使用则无需申请公开,直接发",
|
|
|
|
|
Modalsbottomval:"送到课堂即可。",
|
|
|
|
|
applyissuePaths:true
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
showapplyissuePath=()=>{
|
|
|
|
|
let pathid=this.props.match.params.pathId;
|
|
|
|
|
let url ="/paths/"+pathid+"/publish.json";
|
|
|
|
|
axios.post(url).then((result)=>{
|
|
|
|
|
if(result.status===200){
|
|
|
|
|
if(result.data.status===0){
|
|
|
|
|
this.setState({
|
|
|
|
|
loadtype:true,
|
|
|
|
|
Modalstype: true,
|
|
|
|
|
Modalstopval: ` 课程需经过平台审核方可公开使用,公开的课程将对平台所`,
|
|
|
|
|
modalsMidval:"有人公开可见。若仅本人教学使用则无需申请公开, 直接发",
|
|
|
|
|
Modalsbottomval:"送到课堂即可.",
|
|
|
|
|
cardsModalsavetype: true,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.props.showNotification(result.data.message)
|
|
|
|
|
this.props.getlistdatas();
|
|
|
|
|
this.cardsModalcancel()
|
|
|
|
|
}else if(result.data.status===1){
|
|
|
|
|
// window.location.reload();
|
|
|
|
|
}
|
|
|
|
@ -132,9 +141,7 @@ class DetailTop extends Component{
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
console.log(error);
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
postcancelissuePath=()=>{
|
|
|
|
|
let pathId=this.props.match.params.pathId;
|
|
|
|
|
let url ="/paths/"+pathId+"/cancel_publish.json";
|
|
|
|
@ -180,12 +187,15 @@ class DetailTop extends Component{
|
|
|
|
|
modalsMidval:'',
|
|
|
|
|
modalstyles:'',
|
|
|
|
|
cardsModalsavetype:false,
|
|
|
|
|
applyissuePath:false,
|
|
|
|
|
applyissuePaths:false,
|
|
|
|
|
openpathss:false,
|
|
|
|
|
cancel_publics:false,
|
|
|
|
|
cancel_has_publics:false,
|
|
|
|
|
Modalstopval:``,
|
|
|
|
|
cancelText:undefined,
|
|
|
|
|
okText:undefined
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cardsModalsave=()=>{
|
|
|
|
@ -369,13 +379,13 @@ class DetailTop extends Component{
|
|
|
|
|
|
|
|
|
|
openpaths=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
loadtype:true,
|
|
|
|
|
Modalstype: true,
|
|
|
|
|
openpathss:true,
|
|
|
|
|
Modalstopval: "公开申请已提交,请等待管理员的审核",
|
|
|
|
|
modalsMidval:"• 我们将在1-2个工作日内完成审核",
|
|
|
|
|
Loadtype:true,
|
|
|
|
|
modalstyles:"848282"
|
|
|
|
|
Modalstopval: "公开课程需经过平台标准化审核,审核周期为1-2天,公开",
|
|
|
|
|
modalsMidval:"的课程将对平台所有人可见。若仅本人教学使用则无需",
|
|
|
|
|
Modalsbottomval:"申请公开,直接发送到课堂即可",
|
|
|
|
|
cancelText:"取消申请",
|
|
|
|
|
okText:"确定申请"
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -433,7 +443,7 @@ class DetailTop extends Component{
|
|
|
|
|
|
|
|
|
|
render(){
|
|
|
|
|
let{detailInfoList}=this.props;
|
|
|
|
|
let{Modalstype,Modalstopval,cardsModalcancel,putappointmenttype,Modalsbottomval,cardsModalsavetype,loadtype,getappointmenttype,openpathss,cancel_publics,cancel_has_publics}=this.state;
|
|
|
|
|
let{Modalstype,Modalstopval,cardsModalcancel,putappointmenttype,Modalsbottomval,cardsModalsavetype,loadtype,getappointmenttype,openpathss,cancel_publics,cancel_has_publics,applyissuePaths}=this.state;
|
|
|
|
|
const radioStyle = {
|
|
|
|
|
display: 'block',
|
|
|
|
|
height: '30px',
|
|
|
|
@ -470,8 +480,10 @@ class DetailTop extends Component{
|
|
|
|
|
modalsTopval={Modalstopval}
|
|
|
|
|
modalsBottomval={Modalsbottomval}
|
|
|
|
|
modalCancel={cardsModalcancel}
|
|
|
|
|
modalSave={loadtype===true&&openpathss===false?()=>this.cardsModalcancel():cardsModalsavetype===true?()=>this.postcancelissuePath():openpathss===true?()=>this.postopenpaths():cancel_publics===true?()=>this.postcancel_public():cancel_has_publics===true?()=>this.postcancel_has_public():putappointmenttype===true?()=>this.getappointment():()=>this.cardsModalsave()}
|
|
|
|
|
modalSave={applyissuePaths===true?()=>this.showapplyissuePath():loadtype===true&&openpathss===false?()=>this.cardsModalcancel():cardsModalsavetype===true?()=>this.postcancelissuePath():openpathss===true?()=>this.postopenpaths():cancel_publics===true?()=>this.postcancel_public():cancel_has_publics===true?()=>this.postcancel_has_public():putappointmenttype===true?()=>this.getappointment():()=>this.cardsModalsave()}
|
|
|
|
|
loadtype={loadtype}
|
|
|
|
|
cancelText={this.state.cancelText}
|
|
|
|
|
okText={this.state.okText}
|
|
|
|
|
modalsMidval={this.state.modalsMidval}
|
|
|
|
|
modalstyles={this.state.modalstyles}
|
|
|
|
|
>
|
|
|
|
@ -605,8 +617,8 @@ class DetailTop extends Component{
|
|
|
|
|
{
|
|
|
|
|
detailInfoList.publish_status===0&&detailInfoList.allow_add_member===true?
|
|
|
|
|
<a className="fr font-18 color-white kaike mr20 kkbths"
|
|
|
|
|
style={{'width':'65px'}}
|
|
|
|
|
onClick={this.applyissuePath}>发布</a>:""
|
|
|
|
|
style={{'width':'95px'}}
|
|
|
|
|
onClick={this.applyissuePath}>申请发布</a>:""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|