|
|
|
@ -73,68 +73,32 @@ class Headplugselections extends Component {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
settitlesttings=(name,id)=>{
|
|
|
|
|
//课程选项
|
|
|
|
|
shixunsearchall=(id)=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
titlesttings:name,
|
|
|
|
|
titlesttingsid:id,
|
|
|
|
|
titlesttingss:null,
|
|
|
|
|
})
|
|
|
|
|
this.props.setsub_discipline_id(id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
settitlesttingss=(name,id)=>{
|
|
|
|
|
//知识点
|
|
|
|
|
if(this.state.titlesttings===null){
|
|
|
|
|
this.props.showNotification('请先选择课程');
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
titlesttingss:name,
|
|
|
|
|
titlesttingssid:id
|
|
|
|
|
shixunsearchAllvalue:id,
|
|
|
|
|
shixunchildValues:""
|
|
|
|
|
})
|
|
|
|
|
this.props.settag_discipline_id(id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
shixunsearchall=(e)=>{
|
|
|
|
|
let{shixunsearchAllvalue}=this.state;
|
|
|
|
|
let id = "a";
|
|
|
|
|
try {
|
|
|
|
|
this.props.setdiscipline_id(null);
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
if(shixunsearchAllvalue===id){
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
shixunsearchAllvalue:"a",
|
|
|
|
|
shixunchildValues:""
|
|
|
|
|
})
|
|
|
|
|
// this.props.allUpdatashixunlist();
|
|
|
|
|
}
|
|
|
|
|
//查询
|
|
|
|
|
shixunsearchAll = (e) => {
|
|
|
|
|
let{shixunsearchAllvalue}=this.state;
|
|
|
|
|
let id = e.target.value;
|
|
|
|
|
|
|
|
|
|
if(shixunsearchAllvalue===id){
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if(id===0){
|
|
|
|
|
id=" "
|
|
|
|
|
this.setState({
|
|
|
|
|
InputValue: " "
|
|
|
|
|
})
|
|
|
|
|
// this.props.OnSearchInput("");
|
|
|
|
|
}
|
|
|
|
|
let list=[{'tag_level':1},{'tag_id':id}];
|
|
|
|
|
//获取方向
|
|
|
|
|
shixunsearchAll = (id) => {
|
|
|
|
|
console.log("获取方向");
|
|
|
|
|
console.log(id);
|
|
|
|
|
if(id!=undefined){
|
|
|
|
|
this.setState({
|
|
|
|
|
shixunsearchAllvalue:id,
|
|
|
|
|
shixunchildValues:""
|
|
|
|
|
})
|
|
|
|
|
// this.props.Updatasearchlist(list);
|
|
|
|
|
try {
|
|
|
|
|
this.props.setdiscipline_id(id);
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -153,6 +117,29 @@ class Headplugselections extends Component {
|
|
|
|
|
tixing: value,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
this.props.setitem_types(value);
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getshixunchildValue = (id,ids) => {
|
|
|
|
|
console.log("getshixunchildValue");
|
|
|
|
|
console.log(id);
|
|
|
|
|
debugger
|
|
|
|
|
if(id!=undefined ||ids!=undefined){
|
|
|
|
|
this.setState({
|
|
|
|
|
shixunsearchAllvalue:ids
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
this.props.setsub_discipline_id(id);
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
let {shixunhoverData, shixunchildValues, shixunsearchAllvalue, InputValue,openStatus,openLevel} = this.state;
|
|
|
|
@ -160,20 +147,11 @@ class Headplugselections extends Component {
|
|
|
|
|
let overlaymenu=(item,id)=>(
|
|
|
|
|
<Menu>
|
|
|
|
|
{
|
|
|
|
|
item.map((list,k)=>{
|
|
|
|
|
item&&item.map((list,k)=>{
|
|
|
|
|
return(
|
|
|
|
|
<Menu.Item >
|
|
|
|
|
<div className="mt5 subshaicontent-part" key={k}>
|
|
|
|
|
<a style={{ height: '20px' }} className={ "mb15 shixun_repertoire color-dark intermediatecenterysls textcen "} name={list.id} id={id} onClick={this.getshixunchildValue}>{list.name}</a>
|
|
|
|
|
{/*<div className="sub-Item clearfix">*/}
|
|
|
|
|
{/* {*/}
|
|
|
|
|
{/* list.tag_disciplines.map((tag,e)=>{*/}
|
|
|
|
|
{/* return(*/}
|
|
|
|
|
{/* <a className={parseInt(shixunchildValues)===tag.id?"shixun_repertoire active":"shixun_repertoire"} key={e} id={tag.id} name={id} rel="subshaicontent" onClick={this.getshixunchildValues}>{tag.name}</a>*/}
|
|
|
|
|
{/* )*/}
|
|
|
|
|
{/* })*/}
|
|
|
|
|
{/* }*/}
|
|
|
|
|
{/*</div>*/}
|
|
|
|
|
<a style={{ height: '20px' }} className={ "mb15 shixun_repertoire color-dark intermediatecenterysls textcen "} name={list.id} id={list.id} onClick={()=>this.getshixunchildValue(list.id,id)}>{list.name}</a>
|
|
|
|
|
</div>
|
|
|
|
|
</Menu.Item>
|
|
|
|
|
)
|
|
|
|
@ -195,7 +173,7 @@ class Headplugselections extends Component {
|
|
|
|
|
<div className="clearfix mb10 shaiContent">
|
|
|
|
|
<span className=" fl mt3">方向:</span>
|
|
|
|
|
<div className="fl pr shaiAllItem ">
|
|
|
|
|
<li className={shixunsearchAllvalue==="a"?"shaiItem shixun_repertoire active ":"shaiItem shixun_repertoire "} value= "a" onClick={this.shixunsearchall}>全部</li>
|
|
|
|
|
<li className={shixunsearchAllvalue==="a"?"shaiItem shixun_repertoire active ":"shaiItem shixun_repertoire "} value= "a" onClick={()=>this.shixunsearchall("a")}>全部</li>
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
@ -241,10 +219,10 @@ class Headplugselections extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
disciplinesdata.map((item,key)=>{
|
|
|
|
|
disciplinesdata&&disciplinesdata.map((item,key)=>{
|
|
|
|
|
return(
|
|
|
|
|
<Dropdown getPopupContainer={trigger => trigger.parentNode} overlay={overlaymenu(item.sub_disciplines,item.id)} key={key} placement={item.id<4?"bottomRight":item.id>=8?"bottomLeft":"bottomCenter"}>
|
|
|
|
|
<li key={key} className={parseInt(shixunsearchAllvalue)===item.id?"shaiItem shixun_repertoire active":"shaiItem shixun_repertoire"} value={item.id} onClick={this.shixunsearchAll}>
|
|
|
|
|
<li key={key} className={parseInt(shixunsearchAllvalue)===item.id?"shaiItem shixun_repertoire active":"shaiItem shixun_repertoire"} value={item.id} onClick={()=>this.shixunsearchAll(item.id)}>
|
|
|
|
|
{item.name}
|
|
|
|
|
</li>
|
|
|
|
|
</Dropdown>
|
|
|
|
@ -257,7 +235,8 @@ class Headplugselections extends Component {
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/*题型*/}
|
|
|
|
|
<div className="clearfix mb10">
|
|
|
|
|
|
|
|
|
|
<div className="clearfix">
|
|
|
|
|
<span className=" fl mt6">题型:</span>
|
|
|
|
|
{
|
|
|
|
|
<style>
|
|
|
|
@ -281,18 +260,16 @@ class Headplugselections extends Component {
|
|
|
|
|
}
|
|
|
|
|
<div className="fl pr shaiAllItem mt1">
|
|
|
|
|
<li className={this.state.tixing===null?"shaiItems shixun_repertoire active":"shaiItems shixun_repertoire"} onClick={()=>this.settixingtixing(null)}>全部</li>
|
|
|
|
|
<li className={this.state.tixing===1?"shaiItems shixun_repertoire active":"shaiItems shixun_repertoire"} onClick={()=>this.settixingtixing(1)}>简单</li>
|
|
|
|
|
<li className={this.state.tixing===2?"shaiItems shixun_repertoire active":"shaiItems shixun_repertoire"} onClick={()=>this.settixingtixing(2)}>适中</li>
|
|
|
|
|
<li className={this.state.tixing===3?"shaiItems shixun_repertoire active":"shaiItems shixun_repertoire"} onClick={()=>this.settixingtixing(3)}>困难</li>
|
|
|
|
|
<li className={this.state.tixing==="PROGRAM"?"shaiItems shixun_repertoire active":"shaiItems shixun_repertoire"} onClick={()=>this.settixingtixing("PROGRAM")}>编程题</li>
|
|
|
|
|
<li className={this.state.tixing==="SINGLE"?"shaiItems shixun_repertoire active":"shaiItems shixun_repertoire"} onClick={()=>this.settixingtixing("SINGLE")}>单选题</li>
|
|
|
|
|
<li className={this.state.tixing==="MULTIPLE"?"shaiItems shixun_repertoire active":"shaiItems shixun_repertoire"} onClick={()=>this.settixingtixing("MULTIPLE")}>多选题</li>
|
|
|
|
|
<li className={this.state.tixing==="JUDGMENT"?"shaiItems shixun_repertoire active":"shaiItems shixun_repertoire"} onClick={()=>this.settixingtixing("JUDGMENT")}>判断题</li>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/*题型结尾*/}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{/*难度*/}
|
|
|
|
|
<div className="clearfix">
|
|
|
|
|
<div className="clearfix mb10">
|
|
|
|
|
<span className=" fl mt6">难度:</span>
|
|
|
|
|
{
|
|
|
|
|
<style>
|
|
|
|
@ -316,18 +293,14 @@ class Headplugselections extends Component {
|
|
|
|
|
}
|
|
|
|
|
<div className="fl pr shaiAllItem mt1">
|
|
|
|
|
<li className={this.state.diff===null?"shaiItems shixun_repertoire active":"shaiItems shixun_repertoire"} onClick={()=>this.diff_search(null)}>全部</li>
|
|
|
|
|
<li className={this.state.diff==="PROGRAM"?"shaiItems shixun_repertoire active":"shaiItems shixun_repertoire"} onClick={()=>this.diff_search("PROGRAM")}>编程题</li>
|
|
|
|
|
<li className={this.state.diff==="SINGLE"?"shaiItems shixun_repertoire active":"shaiItems shixun_repertoire"} onClick={()=>this.diff_search("SINGLE")}>单选题</li>
|
|
|
|
|
<li className={this.state.diff==="MULTIPLE"?"shaiItems shixun_repertoire active":"shaiItems shixun_repertoire"} onClick={()=>this.diff_search("MULTIPLE")}>多选题</li>
|
|
|
|
|
<li className={this.state.diff==="JUDGMENT"?"shaiItems shixun_repertoire active":"shaiItems shixun_repertoire"} onClick={()=>this.diff_search("JUDGMENT")}>判断题</li>
|
|
|
|
|
<li className={this.state.diff===1?"shaiItems shixun_repertoire active":"shaiItems shixun_repertoire"} onClick={()=>this.diff_search(1)}>简单</li>
|
|
|
|
|
<li className={this.state.diff===2?"shaiItems shixun_repertoire active":"shaiItems shixun_repertoire"} onClick={()=>this.diff_search(2)}>适中</li>
|
|
|
|
|
<li className={this.state.diff===3?"shaiItems shixun_repertoire active":"shaiItems shixun_repertoire"} onClick={()=>this.diff_search(3)}>困难</li>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
{/*难度结尾*/}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|