|
|
|
@ -2,13 +2,27 @@ import React, {Component} from "react";
|
|
|
|
|
import {Link, NavLink} from 'react-router-dom';
|
|
|
|
|
import {WordsBtn, ActionBtn,SnackbarHOC,getImageUrl} from 'educoder';
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
import {
|
|
|
|
|
notification,
|
|
|
|
|
import './../questioncss/questioncom.css';
|
|
|
|
|
import { Select, Input,Menu, Dropdown,notification,
|
|
|
|
|
Spin,
|
|
|
|
|
Table,
|
|
|
|
|
Pagination,
|
|
|
|
|
} from "antd";
|
|
|
|
|
import './../questioncss/questioncom.css';
|
|
|
|
|
Pagination} from 'antd';
|
|
|
|
|
|
|
|
|
|
import 'antd/lib/style/index.css';
|
|
|
|
|
|
|
|
|
|
import 'antd/lib/select/style/index.css';
|
|
|
|
|
|
|
|
|
|
import 'antd/lib/input/style/index.css';
|
|
|
|
|
|
|
|
|
|
import '../../tpm/shixuns/shixunCss/ShixunSearchBar.css';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const $ = window.$;
|
|
|
|
|
|
|
|
|
|
const Option = Select.Option;
|
|
|
|
|
|
|
|
|
|
const Search = Input.Search;
|
|
|
|
|
|
|
|
|
|
class Headplugselections extends Component {
|
|
|
|
|
constructor(props) {
|
|
|
|
|
super(props);
|
|
|
|
@ -18,6 +32,14 @@ class Headplugselections extends Component {
|
|
|
|
|
titlesttingid:null,
|
|
|
|
|
titlesttings:null,
|
|
|
|
|
titlesttingss:null,
|
|
|
|
|
status: undefined,
|
|
|
|
|
diff: 0,
|
|
|
|
|
InputValue: undefined,
|
|
|
|
|
shixunhoverData: [],
|
|
|
|
|
shixunchildValues:'',
|
|
|
|
|
shixunsearchAllvalue:"a",
|
|
|
|
|
openStatus:false,
|
|
|
|
|
openLevel:false
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -25,6 +47,10 @@ class Headplugselections extends Component {
|
|
|
|
|
componentDidMount(){
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//
|
|
|
|
|
// 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({
|
|
|
|
@ -71,191 +97,187 @@ class Headplugselections extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
let {page,titlestting,titlesttings,titlesttingss}=this.state;
|
|
|
|
|
var kc=0;
|
|
|
|
|
var zsd=0;
|
|
|
|
|
|
|
|
|
|
if(this.props.disciplinesdata){
|
|
|
|
|
const didata = this.props.disciplinesdata;
|
|
|
|
|
for (var i = 0; i < didata.length; i++) {
|
|
|
|
|
//方向
|
|
|
|
|
const fxdidata = didata[i].sub_disciplines;
|
|
|
|
|
|
|
|
|
|
if(titlestting===didata[i].name){
|
|
|
|
|
for (var j = 0; j < fxdidata.length; j++) {
|
|
|
|
|
kc=kc+1;
|
|
|
|
|
|
|
|
|
|
//课程
|
|
|
|
|
const zsddata = fxdidata[j].tag_disciplines;
|
|
|
|
|
for (var k = 0; k < zsddata.length; k++) {
|
|
|
|
|
//知识点
|
|
|
|
|
zsd=zsd+1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}else if(titlestting==="全部"){
|
|
|
|
|
kc=kc+1;
|
|
|
|
|
zsd=zsd+1;
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
shixunsearchall=(e)=>{
|
|
|
|
|
let{shixunsearchAllvalue}=this.state;
|
|
|
|
|
let id = "a";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
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}];
|
|
|
|
|
if(id!=undefined){
|
|
|
|
|
this.setState({
|
|
|
|
|
shixunsearchAllvalue:id,
|
|
|
|
|
shixunchildValues:""
|
|
|
|
|
})
|
|
|
|
|
// this.props.Updatasearchlist(list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let {shixunhoverData, shixunchildValues, shixunsearchAllvalue, InputValue,openStatus,openLevel} = this.state;
|
|
|
|
|
let {disciplinesdata} = this.props;
|
|
|
|
|
let overlaymenu=(item,id)=>(
|
|
|
|
|
<Menu>
|
|
|
|
|
{
|
|
|
|
|
item.map((list,k)=>{
|
|
|
|
|
return(
|
|
|
|
|
<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>
|
|
|
|
|
{/*<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>*/}
|
|
|
|
|
</div>
|
|
|
|
|
</Menu.Item>
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
</Menu>
|
|
|
|
|
)
|
|
|
|
|
return (
|
|
|
|
|
<div className=" clearfix mt21 ">
|
|
|
|
|
<div className="educontent w1200dbl">
|
|
|
|
|
|
|
|
|
|
<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("全部",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,object.id)}>
|
|
|
|
|
{object.name}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
.ant-dropdown{
|
|
|
|
|
width: 800px;
|
|
|
|
|
}
|
|
|
|
|
.shixun_repertoire{
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
float: left;
|
|
|
|
|
margin-right: 20px;
|
|
|
|
|
color: #999;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
.ant-dropdown-menu-item, .ant-dropdown-menu-submenu-title{
|
|
|
|
|
padding: 0px 12px;
|
|
|
|
|
}
|
|
|
|
|
.ant-dropdown-menu-item:hover, .ant-dropdown-menu-submenu-title:hover{
|
|
|
|
|
background:transparent !important;
|
|
|
|
|
}
|
|
|
|
|
.dingbus .ant-dropdown-menu ul{
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<div className="dingbus">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
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"}>
|
|
|
|
|
<li key={key} className={parseInt(shixunsearchAllvalue)===item.id?"shaiItem shixun_repertoire active":"shaiItem shixun_repertoire"} value={item.id} onClick={this.shixunsearchAll}>
|
|
|
|
|
{item.name}
|
|
|
|
|
</li>
|
|
|
|
|
</Dropdown>
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</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>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{/*课程*/}
|
|
|
|
|
{
|
|
|
|
|
kc===0?
|
|
|
|
|
""
|
|
|
|
|
:
|
|
|
|
|
<div className="mt30 sortinxdirection">
|
|
|
|
|
<div className="w60 tophomsembolds">
|
|
|
|
|
课程:
|
|
|
|
|
</div>
|
|
|
|
|
<div className="sortinxdirection minleng40">
|
|
|
|
|
|
|
|
|
|
{this.props.disciplinesdata&&this.props.disciplinesdata.map((objectn, index) => {
|
|
|
|
|
return (
|
|
|
|
|
titlestting==="全部"?
|
|
|
|
|
objectn.sub_disciplines&&objectn.sub_disciplines.map((object, indexs) => {
|
|
|
|
|
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,object.id)}>
|
|
|
|
|
{object.name}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
:
|
|
|
|
|
objectn.name===titlestting?
|
|
|
|
|
objectn.sub_disciplines&&objectn.sub_disciplines.map((object, indexs) => {
|
|
|
|
|
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,object.id)}>
|
|
|
|
|
{object.name}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
: ""
|
|
|
|
|
)
|
|
|
|
|
})}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
{/*知识点*/}
|
|
|
|
|
{
|
|
|
|
|
zsd===0?
|
|
|
|
|
""
|
|
|
|
|
:<div className="mt30 sortinxdirection">
|
|
|
|
|
<div className="w60 tophomsembolds">
|
|
|
|
|
知识点:
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div className="sortinxdirection minleng40">
|
|
|
|
|
|
|
|
|
|
{this.props.disciplinesdata&&this.props.disciplinesdata.map((objecta, index) => {
|
|
|
|
|
return (
|
|
|
|
|
titlestting==="全部"&&titlesttings===null?
|
|
|
|
|
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>
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
:titlestting==="全部"&&titlesttings!==null?
|
|
|
|
|
objecta.sub_disciplines&&objecta.sub_disciplines.map((objectb, indexs) => {
|
|
|
|
|
return (
|
|
|
|
|
titlesttings===objectb.name?
|
|
|
|
|
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>
|
|
|
|
|
)
|
|
|
|
|
}):""
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
: titlestting!=="全部"&&titlesttings!==null?
|
|
|
|
|
titlestting===objecta.name?
|
|
|
|
|
objecta.sub_disciplines&&objecta.sub_disciplines.map((objectb, indexs) => {
|
|
|
|
|
return (
|
|
|
|
|
titlesttings===objectb.name?
|
|
|
|
|
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>
|
|
|
|
|
)
|
|
|
|
|
}):""
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
:""
|
|
|
|
|
: 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>
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
:""
|
|
|
|
|
:""
|
|
|
|
|
)
|
|
|
|
|
})}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{/*课程尾巴*/}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|