|
|
|
@ -12,13 +12,13 @@ const DiffObject = [
|
|
|
|
|
{ id: 3, text: '中高级' },
|
|
|
|
|
{ id: 4, text: '高级' }
|
|
|
|
|
]
|
|
|
|
|
export default ({ StatusEnquiry, allUpdatashixunlist, Updatasearchlist }) => {
|
|
|
|
|
export default ({ StatusEnquiry, allUpdatashixunlist, Updatasearchlist,parsedid,newpalce }) => {
|
|
|
|
|
const [data, setData] = useState({
|
|
|
|
|
diff: 0,
|
|
|
|
|
searchValue: 'a',
|
|
|
|
|
searchValue: newpalce || 'a',
|
|
|
|
|
navs: [],
|
|
|
|
|
searchKey: '',
|
|
|
|
|
childValue: ''
|
|
|
|
|
childValue:parsedid
|
|
|
|
|
})
|
|
|
|
|
const { diff, searchValue, navs, childValue, searchKey } = data
|
|
|
|
|
function diffSearch(diff) {
|
|
|
|
@ -28,6 +28,15 @@ export default ({ StatusEnquiry, allUpdatashixunlist, Updatasearchlist }) => {
|
|
|
|
|
})
|
|
|
|
|
StatusEnquiry([{ 'type': 2 }, { 'value': diff }])
|
|
|
|
|
}
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
setData({
|
|
|
|
|
...data,
|
|
|
|
|
searchValue: newpalce || 'a',
|
|
|
|
|
childValue: parsedid
|
|
|
|
|
})
|
|
|
|
|
},[
|
|
|
|
|
newpalce,navs,parsedid
|
|
|
|
|
])
|
|
|
|
|
function onSearchAll() {
|
|
|
|
|
if (searchValue !== 'a') {
|
|
|
|
|
setData({ ...data, searchValue: 'a', childValue: '' })
|
|
|
|
@ -61,12 +70,12 @@ export default ({ StatusEnquiry, allUpdatashixunlist, Updatasearchlist }) => {
|
|
|
|
|
function overlayMenu(item, id) {
|
|
|
|
|
return <Menu>
|
|
|
|
|
{
|
|
|
|
|
item.map((list, k) => <Menu.Item>
|
|
|
|
|
<div className="mt5 subshaicontent-part" key={k} >
|
|
|
|
|
item.map((list, k) => <Menu.Item key={list.id}>
|
|
|
|
|
<div className="mt5 subshaicontent-part" >
|
|
|
|
|
<a style={{ height: '20px' }} className={"mb15 shixun_repertoire color-dark"} name={list.id} id={id} onClick={getChildValue}>{list.name}</a>
|
|
|
|
|
<div className="sub-Item clearfix">
|
|
|
|
|
{
|
|
|
|
|
list.tags.map((tag, e) => <a className={childValue === tag.id ? "shixun_repertoire active" : "shixun_repertoire"} key={e} id={tag.id} name={id} rel="subshaicontent" onClick={getChildValues}>{tag.name}</a>
|
|
|
|
|
list.tags.map((tag, e) => <a className={childValue == tag.id ? "shixun_repertoire color-blue" : "shixun_repertoire"} key={e} id={tag.id} name={id} rel="subshaicontent" onClick={getChildValues}>{tag.name}</a>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
@ -84,7 +93,6 @@ export default ({ StatusEnquiry, allUpdatashixunlist, Updatasearchlist }) => {
|
|
|
|
|
}
|
|
|
|
|
init()
|
|
|
|
|
}, [])
|
|
|
|
|
// item.id < 4 ? "bottomRight" : item.id >= 8 ? "bottomLeft" : "bottomCenter"
|
|
|
|
|
return (
|
|
|
|
|
<div className="edu-back-white shixun-search-bar" >
|
|
|
|
|
<div className="educontent">
|
|
|
|
@ -111,7 +119,7 @@ export default ({ StatusEnquiry, allUpdatashixunlist, Updatasearchlist }) => {
|
|
|
|
|
<div className="clearfix">
|
|
|
|
|
<span className="shaiTitle fl">筛选:</span>
|
|
|
|
|
<div className="fl pr shaiAllItem mt1">
|
|
|
|
|
{DiffObject.map(item => <A {...item} callback={diffSearch} activeId={diff} />)}
|
|
|
|
|
{DiffObject.map(item => <A key={item.id} {...item} callback={diffSearch} activeId={diff} />)}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|