|
|
|
@ -15,7 +15,6 @@ class sendPanel extends Component{
|
|
|
|
|
openSearch:false,
|
|
|
|
|
sendToCourseId:undefined,
|
|
|
|
|
sendToShixunArray:[],
|
|
|
|
|
shixunNum:0,
|
|
|
|
|
Modalstype:false,
|
|
|
|
|
cardsModalcancel:this.cardsModalcancel,
|
|
|
|
|
cardsModalsave:this.cardsModalsave,
|
|
|
|
@ -35,7 +34,9 @@ class sendPanel extends Component{
|
|
|
|
|
//隐藏发送至弹框
|
|
|
|
|
hideSenttothevalue =()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
sentShixunPath:false
|
|
|
|
|
sentShixunPath:false,
|
|
|
|
|
sendToShixunArray:[],
|
|
|
|
|
sendToCourseId:undefined,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
//打开课堂列表下拉框
|
|
|
|
@ -63,7 +64,7 @@ class sendPanel extends Component{
|
|
|
|
|
changeCheckBoxs=(list)=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
sendToShixunArray:list,
|
|
|
|
|
shixunNum:list.length
|
|
|
|
|
// shixunNum:list.length
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -86,7 +87,9 @@ class sendPanel extends Component{
|
|
|
|
|
Modalstype:true,
|
|
|
|
|
sentShixunPath:false,
|
|
|
|
|
Modalstopval:result.data.message,
|
|
|
|
|
courseurl:result.data.url
|
|
|
|
|
courseurl:result.data.url,
|
|
|
|
|
sendToShixunArray:[],
|
|
|
|
|
sendToCourseId:undefined,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
@ -118,8 +121,33 @@ class sendPanel extends Component{
|
|
|
|
|
let {courseurl}=this.state;
|
|
|
|
|
window.location.href =courseurl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
allChange = (e) => {
|
|
|
|
|
|
|
|
|
|
if(e.target.checked===false){
|
|
|
|
|
this.setState({
|
|
|
|
|
sendToShixunArray: [],
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
let { sendToCourseList} = this.state;
|
|
|
|
|
let newlist = [];
|
|
|
|
|
|
|
|
|
|
sendToCourseList.stages.map((item,key)=>{
|
|
|
|
|
item.shixuns.map((items,keys)=>{
|
|
|
|
|
newlist.push(items.shixun_id)
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
sendToShixunArray: newlist,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render(){
|
|
|
|
|
let{sentShixunPath,sendToCourseList,openSearch,shixunNum,Modalstype,Modalstopval,Modalsbottomval,cardsModalcancel,cardsModalsave}= this.state;
|
|
|
|
|
let{sentShixunPath,sendToCourseList,Modalstype,Modalstopval,Modalsbottomval,cardsModalcancel,cardsModalsave}= this.state;
|
|
|
|
|
return(
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
|
@ -178,7 +206,7 @@ class sendPanel extends Component{
|
|
|
|
|
</Select>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="edu-back-skyblue pl15 pr15 clearfix over280 pt5">
|
|
|
|
|
<CheckboxGroup onChange={this.changeCheckBoxs}>
|
|
|
|
|
<CheckboxGroup onChange={this.changeCheckBoxs} value={this.state.sendToShixunArray}>
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
sendToCourseList && sendToCourseList.stages.map((item,key)=>{
|
|
|
|
@ -197,7 +225,16 @@ class sendPanel extends Component{
|
|
|
|
|
|
|
|
|
|
</CheckboxGroup>
|
|
|
|
|
</div>
|
|
|
|
|
<p className="color-grey-9 pl15 font-12 mt10">已选择 {shixunNum} 个实训</p>
|
|
|
|
|
<div className="mt10 clearfix">
|
|
|
|
|
|
|
|
|
|
<span className="fl ml15">
|
|
|
|
|
<Checkbox className="fl"
|
|
|
|
|
onChange={(e)=>this.allChange(e)}
|
|
|
|
|
>全选</Checkbox>
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<p className="color-grey-9 pl15 font-12 mt10">已选择 {this.state.sendToShixunArray.length} 个实训</p>
|
|
|
|
|
<div className="mt20 clearfix edu-txt-center">
|
|
|
|
|
<a onClick={this.hideSenttothevalue} className="pop_close task-btn mr30">取消</a>
|
|
|
|
|
<a className="task-btn task-btn-orange" onClick={this.submitInfo}>确定</a>
|
|
|
|
|