From 74455b3c86cf5d09ff3324e31000abb1b76f215a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 11 Nov 2019 11:06:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AE=9E=E8=AE=AD=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E5=AF=BC=E8=88=AA=20=E5=B0=8F=E5=B1=8F=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=9C=89=E6=97=A0=E6=B3=95=E4=BD=BF=E7=94=A8=E7=9A=84?= =?UTF-8?q?=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/tpm/shixuns/ShixunSearchBar.js | 209 +++++++----------- 1 file changed, 82 insertions(+), 127 deletions(-) diff --git a/public/react/src/modules/tpm/shixuns/ShixunSearchBar.js b/public/react/src/modules/tpm/shixuns/ShixunSearchBar.js index f9f56a90d..75930f1df 100644 --- a/public/react/src/modules/tpm/shixuns/ShixunSearchBar.js +++ b/public/react/src/modules/tpm/shixuns/ShixunSearchBar.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; -import { Select, Input } from 'antd'; +import { Select, Input,Menu, Dropdown } from 'antd'; import 'antd/lib/style/index.css'; @@ -115,6 +115,8 @@ shixunsearchAll = (e) => { //选择Tab页详情 getshixunchildValue = (e) => { + + debugger let id = e.target.name; let newid=e.target.id; let list=[{'tag_level':2},{'tag_id':id}]; @@ -155,79 +157,54 @@ componentDidMount() { }) } - - // componentWillReceiveProps(nextProps) { - // console.log(nextProps.parsedid) - // if(nextProps.newtag_level===1){ - // this.setState({ - // InputValue: this.props.keyword, - // shixunsearchAllvalue:nextProps.parsedid - // - // }) - // }else if(nextProps.newtag_level===2){ - // this.setState({ - // InputValue: this.props.keyword, - // shixunsearchAllvalue:nextProps.newpalce, - // shixunchildValues:nextProps.parsedid - // - // }) - // }else if(nextProps.newtag_level===3){ - // this.setState({ - // InputValue: this.props.keyword, - // shixunsearchAllvalue:nextProps.newpalce, - // shixunchildValues:nextProps.parsedid - // - // }) - // } - // - // - // } - openStatusOption=()=>{ - this.setState({ - openLevel:false, - openStatus:true - }) - } - openLevelOption=()=>{ - this.setState({ - openLevel:true, - openStatus:false - }) - } - openStatusOptions=()=>{ - this.setState({ - openLevel:false, - openStatus:false - }) - } - - Input_searchs = (e) => { - this.setState({ - InputValue: e.target.value - }) - } render() { let {shixunhoverData, shixunchildValues, shixunsearchAllvalue, InputValue,openStatus,openLevel} = this.state; let {typepvisible} = this.props; - //实训首页筛选的移入和点击事件 - $(".shaiItem").hover(function(){ - var hei=parseInt($(".shaiAllItem").height())-2; - $(this).find(".subshaicontent").css("top", '34px'); - $(this).find(".subshaicontent").show(); - },function(){ - $(this).find(".subshaicontent").hide(); - }); - - $(".shaiItem").live("click",function(){ - $(".shaiItem").removeClass("active"); - $(this).addClass("active"); - $(".subshaicontent").hide(); - }); - - $(".subshaicontent").live("click", function(event){ - $(".subshaicontent").hide(); - event.stopPropagation(); - }); + // //实训首页筛选的移入和点击事件 + // $(".shaiItem").hover(function(){ + // var hei=parseInt($(".shaiAllItem").height())-2; + // $(this).find(".subshaicontent").css("top", '34px'); + // $(this).find(".subshaicontent").show(); + // },function(){ + // $(this).find(".subshaicontent").hide(); + // }); + // + // $(".shaiItem").live("click",function(){ + // $(".shaiItem").removeClass("active"); + // $(this).addClass("active"); + // $(".subshaicontent").hide(); + // }); + // + // $(".subshaicontent").live("click", function(event){ + // $(".subshaicontent").hide(); + // event.stopPropagation(); + // }); + + let overlaymenu=(item,id)=>( + + { + item.map((list,k)=>{ + return( + +
+ {list.name} +
+ { + list.tags.map((tag,e)=>{ + return( + {tag.name} + ) + }) + } +
+
+
+ ) + }) + } +
+ ) + return (
@@ -236,36 +213,39 @@ render() { 方向:
  • 全部
  • - { - shixunhoverData.map((item,key)=>{ - - return( -
  • - {item.name} -
    - { - item.sub_repertoires.map((list,k)=>{ - return( -
    - {list.name} -
    - { - list.tags.map((tag,e)=>{ - return( - {tag.name} - ) - }) - } -
    -
    - ) - }) - } -
    -
  • - ) - }) - } + + { + shixunhoverData.map((item,key)=>{ + return( + +
  • + {item.name} +
  • +
    + ) + }) + } + +
    @@ -297,32 +277,7 @@ render() {
  • this.diff_search(3)}>高级学员
  • this.diff_search(4)}>顶级学员
  • - {/*
    */} - {/*/!**!/*/} - {/**/} - {/*
    */} - {/*
    */} - {/* this.Input_search(value)}*/} - {/*enterButton*/} - {/*/>*/} - {/*
    */} +