题库调整

dev_jupyter
杨树林 5 years ago
parent 201247ce6b
commit 1e245e7ecc

@ -39,7 +39,8 @@ class Headplugselections extends Component {
shixunchildValues:'',
shixunsearchAllvalue:"a",
openStatus:false,
openLevel:false
openLevel:false,
tixing:0,
}
}
@ -137,7 +138,22 @@ class Headplugselections extends Component {
}
}
//难度筛选
diff_search = (value) => {
this.setState({
diff: value,
openLevel:false
})
let list=[{'type':2},{'value':value}];
}
//题型塞选
settixingtixing=(value)=>{
this.setState({
tixing: value,
})
}
render() {
let {shixunhoverData, shixunchildValues, shixunsearchAllvalue, InputValue,openStatus,openLevel} = this.state;
let {disciplinesdata} = this.props;
@ -146,9 +162,9 @@ class Headplugselections extends Component {
{
item.map((list,k)=>{
return(
<Menu.Item>
<Menu.Item >
<div className="mt5 subshaicontent-part" key={k}>
<a style={{ height: '20px' }} className={ "mb15 shixun_repertoire color-dark"} name={list.id} id={id} onClick={this.getshixunchildValue}>{list.name}</a>
<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)=>{*/}
@ -169,17 +185,17 @@ class Headplugselections extends Component {
<div className=" clearfix mt21 ">
<div className="educontent w1200dbl">
<div className="clearfix edu-back-white tophoms">
<div className="clearfix edu-back-white tophomss">
{/*课程*/}
<div className="edu-back-white" >
<div className="educontent">
<div className="pt40 pb40">
<div className="clearfix mb30 shaiContent">
<span className="shaiTitle 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>
<div >
<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>
<style>
{
`
@ -187,9 +203,9 @@ class Headplugselections extends Component {
width: 800px;
}
.shixun_repertoire{
text-align: center;
cursor: pointer;
float: left;
margin-right: 20px;
color: #999;
cursor: pointer;
margin-bottom: 10px;
@ -200,11 +216,24 @@ class Headplugselections extends Component {
.ant-dropdown-menu-item:hover, .ant-dropdown-menu-submenu-title:hover{
background:transparent !important;
}
.dingbus .ant-dropdown-menu ul{
.dingbus .ant-dropdown ul{
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.shaiItem{
padding: 3px 14px;
}
.active{
border-radius:16px !important;
}
.shaiContent li.shaiItem:hover {
border-radius:16px !important;
}
`
}
</style>
@ -214,7 +243,7 @@ class Headplugselections extends Component {
{
disciplinesdata.map((item,key)=>{
return(
<Dropdown overlay={overlaymenu(item.sub_disciplines,item.id)} key={key} placement={item.id<4?"bottomRight":item.id>=8?"bottomLeft":"bottomCenter"}>
<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}>
{item.name}
</li>
@ -227,40 +256,74 @@ class Headplugselections extends Component {
</div>
</div>
{/*题型*/}
<div className="clearfix mb10">
<span className=" fl mt6">题型</span>
{
<style>
{`
.shaiItems{
padding: 3px 15px;
float: left;
border-radius: 4px;
color: #4C4C4C;
cursor: pointer;
margin-right: 15px;
display: block;
float:left;
}
.shaiItems.active {
background-color: #4CACFF!important;
color: #fff!important;
}
`}
</style>
}
<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>
</div>
</div>
{/*<div className="clearfix">*/}
{/* <span className="shaiTitle fl mt6">筛选:</span>*/}
{/* {*/}
{/* <style>*/}
{/* {`*/}
{/* .shaiItems{*/}
{/* padding: 3px 15px;*/}
{/* float: left;*/}
{/* border-radius: 4px;*/}
{/* color: #4C4C4C;*/}
{/* cursor: pointer;*/}
{/* margin-right: 15px;*/}
{/* display: block;*/}
{/* float:left;*/}
{/* }*/}
{/* .shaiItems.active {*/}
{/* background-color: #4CACFF!important;*/}
{/* color: #fff!important;*/}
{/* }*/}
{/* `}*/}
{/* </style>*/}
{/* }*/}
{/* <div className="fl pr shaiAllItem mt1">*/}
{/* <li className={this.state.diff===0?"shaiItems shixun_repertoire active":"shaiItems shixun_repertoire"} onClick={()=>this.diff_search(0)}>全部难度</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>*/}
{/* <li className={this.state.diff===4?"shaiItems shixun_repertoire active":"shaiItems shixun_repertoire"} onClick={()=>this.diff_search(4)}>高级</li>*/}
{/* </div>*/}
{/*题型结尾*/}
{/*</div>*/}
{/*难度*/}
<div className="clearfix">
<span className=" fl mt6">难度</span>
{
<style>
{`
.shaiItems{
padding: 3px 15px;
float: left;
border-radius: 4px;
color: #4C4C4C;
cursor: pointer;
margin-right: 15px;
display: block;
float:left;
}
.shaiItems.active {
background-color: #4CACFF!important;
color: #fff!important;
}
`}
</style>
}
<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>
</div>
</div>
{/*难度结尾*/}

@ -129,6 +129,11 @@
padding-left: 26px;
padding-right: 26px;
}
.tophomss{
padding-top: 15px;
padding-left: 15px;
padding-right: 15px;
}
.borderwd{
border: 1px solid #000000;
}
@ -822,3 +827,7 @@
height: 20px;
margin-top: 5px;
}
.textcen{
text-align: center;
}

Loading…
Cancel
Save