|
|
|
@ -15,8 +15,10 @@ class Headplugselection extends Component {
|
|
|
|
|
this.state = {
|
|
|
|
|
page:1,
|
|
|
|
|
titlestting:"全部",
|
|
|
|
|
titlesttingid:null,
|
|
|
|
|
titlesttings:null,
|
|
|
|
|
titlesttingss:null,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//初始化
|
|
|
|
@ -24,28 +26,57 @@ class Headplugselection extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
settitlestting=(name)=>{
|
|
|
|
|
//
|
|
|
|
|
// setdiscipline_id={(e)=>this.setdiscipline_id(e)}
|
|
|
|
|
// setsub_discipline_id={(e)=>this.setsub_discipline_id(e)}
|
|
|
|
|
// settag_discipline_id={(e)=>this.settag_discipline_id(e)}
|
|
|
|
|
settitlestting=(name,id)=>{
|
|
|
|
|
//如果全部其他的选项重置
|
|
|
|
|
this.setState({
|
|
|
|
|
titlestting:name,
|
|
|
|
|
titlesttingid:id,
|
|
|
|
|
titlesttings:null,
|
|
|
|
|
titlesttingss:null
|
|
|
|
|
titlesttingsid:null,
|
|
|
|
|
titlesttingss:null,
|
|
|
|
|
titlesttingssid:null
|
|
|
|
|
})
|
|
|
|
|
if(name==="全部"){
|
|
|
|
|
this.props.setdiscipline_id(null);
|
|
|
|
|
this.props.setsub_discipline_id(null);
|
|
|
|
|
this.props.settag_discipline_id(null);
|
|
|
|
|
}else{
|
|
|
|
|
this.props.setdiscipline_id(id);
|
|
|
|
|
this.props.setsub_discipline_id(null);
|
|
|
|
|
this.props.settag_discipline_id(null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
settitlesttings=(name)=>{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
settitlesttings=(name,id)=>{
|
|
|
|
|
//课程选项
|
|
|
|
|
this.setState({
|
|
|
|
|
titlesttings:name,
|
|
|
|
|
titlesttingsid:id,
|
|
|
|
|
titlesttingss:null,
|
|
|
|
|
})
|
|
|
|
|
this.props.setsub_discipline_id(id);
|
|
|
|
|
this.props.settag_discipline_id(null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
settitlesttingss=(name)=>{
|
|
|
|
|
settitlesttingss=(name,id)=>{
|
|
|
|
|
//知识点
|
|
|
|
|
if(this.state.titlesttings===null){
|
|
|
|
|
this.props.showNotification('请先选择课程');
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
titlesttingss:name
|
|
|
|
|
titlesttingss:name,
|
|
|
|
|
titlesttingssid:id
|
|
|
|
|
})
|
|
|
|
|
this.props.settag_discipline_id(id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
@ -53,22 +84,22 @@ class Headplugselection extends Component {
|
|
|
|
|
// console.log("Headplugselection");
|
|
|
|
|
// console.log(this.props.disciplinesdata);
|
|
|
|
|
return (
|
|
|
|
|
<div className=" clearfix mt10 mb20 ">
|
|
|
|
|
<div className=" clearfix mt21 ">
|
|
|
|
|
<div className="educontent w1200">
|
|
|
|
|
|
|
|
|
|
<div className="clearfix edu-back-white mt21 tophom">
|
|
|
|
|
<div className="clearfix edu-back-white tophoms">
|
|
|
|
|
{/*课程*/}
|
|
|
|
|
<div className=" sortinxdirection">
|
|
|
|
|
<div className="w60 tophomsembolds">
|
|
|
|
|
方向:
|
|
|
|
|
</div>
|
|
|
|
|
<div className="sortinxdirection minleng40">
|
|
|
|
|
<div className={titlestting==="全部"?" titlesttingcss xiaoshou":" titlesttingcssmy xiaoshou"} onClick={()=>this.settitlestting("全部")}>
|
|
|
|
|
<div className={titlestting==="全部"?" titlesttingcss xiaoshou":" titlesttingcssmy xiaoshou"} onClick={()=>this.settitlestting("全部",null)}>
|
|
|
|
|
全部
|
|
|
|
|
</div>
|
|
|
|
|
{this.props.disciplinesdata&&this.props.disciplinesdata.map((object, index) => {
|
|
|
|
|
return (
|
|
|
|
|
<div className={titlestting===object.name?" xiaoshou titlesttingcss":" titlesttingcssmy xiaoshou"} onClick={()=>this.settitlestting(object.name)}>
|
|
|
|
|
<div className={titlestting===object.name?" xiaoshou titlesttingcss":" titlesttingcssmy xiaoshou"} onClick={()=>this.settitlestting(object.name,object.id)}>
|
|
|
|
|
{object.name}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
@ -93,7 +124,7 @@ class Headplugselection extends Component {
|
|
|
|
|
return (
|
|
|
|
|
<div className={index===0&&indexs===0&&titlesttings===object.name?"titlesttingcss xiaoshou":index===0&&indexs===0&&titlesttings!==object.name?"titlesttingcssmy xiaoshou"
|
|
|
|
|
|
|
|
|
|
:titlesttings===object.name?" titlesttingcss xiaoshou":"titlesttingcssmy xiaoshou"} onClick={()=>this.settitlesttings(object.name)}>
|
|
|
|
|
:titlesttings===object.name?" titlesttingcss xiaoshou":"titlesttingcssmy xiaoshou"} onClick={()=>this.settitlesttings(object.name,object.id)}>
|
|
|
|
|
{object.name}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
@ -104,7 +135,7 @@ class Headplugselection extends Component {
|
|
|
|
|
return (
|
|
|
|
|
<div className={index===0&&indexs===0&&titlesttings===object.name?"titlesttingcss xiaoshou":index===0&&indexs===0&&titlesttings!==object.name?"titlesttingcssmy xiaoshou"
|
|
|
|
|
|
|
|
|
|
:titlesttings===object.name?" titlesttingcss xiaoshou":"titlesttingcssmy xiaoshou"} onClick={()=>this.settitlesttings(object.name)}>
|
|
|
|
|
:titlesttings===object.name?" titlesttingcss xiaoshou":"titlesttingcssmy xiaoshou"} onClick={()=>this.settitlesttings(object.name,object.id)}>
|
|
|
|
|
{object.name}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
@ -162,7 +193,8 @@ class Headplugselection extends Component {
|
|
|
|
|
}):""
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
:
|
|
|
|
|
: titlestting!=="全部"&&titlesttings!==null?
|
|
|
|
|
titlestting===objecta.name?
|
|
|
|
|
objecta.sub_disciplines&&objecta.sub_disciplines.map((objectb, indexs) => {
|
|
|
|
|
return (
|
|
|
|
|
titlesttings===objectb.name?
|
|
|
|
@ -174,10 +206,27 @@ class Headplugselection extends Component {
|
|
|
|
|
{object.name}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}):""
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
:""
|
|
|
|
|
: titlestting!=="全部"&&titlesttings===null?
|
|
|
|
|
titlestting===objecta.name?
|
|
|
|
|
objecta.sub_disciplines&&objecta.sub_disciplines.map((objectb, indexs) => {
|
|
|
|
|
return (
|
|
|
|
|
objectb.tag_disciplines&&objectb.tag_disciplines.map((object, indexss) => {
|
|
|
|
|
return (
|
|
|
|
|
<div className={index===0&&indexs===0&&indexss===0&&titlesttingss===object.name?"titlesttingcss xiaoshou":
|
|
|
|
|
index===0&&indexs===0&&indexss===0&&titlesttingss!==object.name?"titlesttingcssmy xiaoshou"
|
|
|
|
|
:titlesttingss===object.name?" titlesttingcss xiaoshou":" titlesttingcssmy xiaoshou"} onClick={()=>this.settitlesttingss(object.name)}>
|
|
|
|
|
{object.name}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
:""
|
|
|
|
|
:""
|
|
|
|
|
)
|
|
|
|
|
})}
|
|
|
|
|
|
|
|
|
|