import React, {Component} from "react"; import {Link, NavLink} from 'react-router-dom'; import {WordsBtn, ActionBtn,SnackbarHOC,getImageUrl} from 'educoder'; import axios from 'axios'; import './../questioncss/questioncom.css'; import { Select, Input,Menu, Dropdown,notification, Spin, Table, 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); this.state = { page:1, titlestting:"全部", titlesttingid:null, titlesttings:null, titlesttingss:null, status: undefined, diff: null, InputValue: undefined, shixunhoverData: [], shixunchildValues:'', shixunsearchAllvalue:"a", openStatus:false, openLevel:false, tixing:null, } } //初始化 componentDidMount(){ } settitlestting=(name,id)=>{ //如果全部其他的选项重置 this.setState({ titlestting:name, titlesttingid:id, titlesttings:null, titlesttingsid:null, titlesttingss:null, titlesttingssid:null }) if(name==="全部"){ this.props.setdiscipline_id(null); }else{ this.props.setdiscipline_id(id); } } shixunsearchall=(id)=>{ this.setState({ shixunsearchAllvalue:id, shixunchildValues:"" }) try { this.props.setdiscipline_id(null); }catch (e) { } } shixunserdchAlls=(itme,id)=>{ if(id!=undefined){ this.setState({ shixunsearchAllvalue:id, }) try { this.props.setdiscipline_id(id); }catch (e) { } } // console.log(itme); // console.log(itme[0]); if(itme!=undefined){ try { this.props.setsub_discipline_id(id,itme[0].id); }catch (e) { } } } //获取方向 shixunsearchAll = (id) => { //大写A //console.log("获取方向"); //console.log(id); if(id!=undefined){ this.setState({ shixunsearchAllvalue:id, }) try { this.props.setdiscipline_id(id); }catch (e) { } } } //难度筛选 diff_search = (value) => { this.setState({ diff: value, openLevel:false }) try { this.props.setdifficulty(value); }catch (e) { } } //题型塞选 settixingtixing=(value)=>{ this.setState({ tixing: value, }) try { this.props.setitem_types(value); }catch (e) { } } getshixunchildValue = (id,ids) => { // //console.log("getshixunchildValue"); // console.log(id); // console.log(ids); // debugger if(id!=undefined ||ids!=undefined){ this.setState({ shixunsearchAllvalue:ids }) try { this.props.setsub_discipline_id(ids,id); }catch (e) { } } } render() { let {shixunhoverData, shixunchildValues, shixunsearchAllvalue, InputValue,openStatus,openLevel} = this.state; let {disciplinesdata} = this.props; let overlaymenu=(item,id)=>(
) return (