Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
78c20d35
Commit
78c20d35
authored
Aug 11, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:处理搜索
parent
b664a146
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
src/domains/basic-domain/constants.ts
+1
-1
src/domains/course-domain/constants.ts
+1
-1
src/modules/college-manage/components/LeftStructureTree.jsx
+11
-2
No files found.
src/domains/basic-domain/constants.ts
View file @
78c20d35
/*
/*
* @Author: 陈剑宇
* @Author: 陈剑宇
* @Date: 2020-05-07 14:43:01
* @Date: 2020-05-07 14:43:01
* @LastEditTime: 2021-0
6-22 16:49:06
* @LastEditTime: 2021-0
8-11 22:52:04
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @Description:
* @Description:
* @FilePath: /wheat-web-demo/src/domains/basic-domain/constants.ts
* @FilePath: /wheat-web-demo/src/domains/basic-domain/constants.ts
...
...
src/domains/course-domain/constants.ts
View file @
78c20d35
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Author: 吴文洁
* @Date: 2020-08-20 09:21:40
* @Date: 2020-08-20 09:21:40
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-0
6-11 15:17:56
* @LastEditTime: 2021-0
8-11 22:50:48
* @Description:
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
*/
...
...
src/modules/college-manage/components/LeftStructureTree.jsx
View file @
78c20d35
import
React
,
{
useEffect
,
useState
}
from
"react"
;
import
React
,
{
useEffect
,
useState
,
useRef
}
from
"react"
;
import
{
withRouter
}
from
"react-router-dom"
;
import
{
withRouter
}
from
"react-router-dom"
;
import
{
Tree
,
Input
,
Dropdown
,
Menu
,
Button
,
Modal
,
message
,
AutoComplete
,
Tooltip
}
from
"antd"
;
import
{
Tree
,
Input
,
Dropdown
,
Menu
,
Button
,
Modal
,
message
,
AutoComplete
,
Tooltip
}
from
"antd"
;
import
AddOrEditPostGroupModal
from
"../modal/AddOrEditPostGroupModal"
;
import
AddOrEditPostGroupModal
from
"../modal/AddOrEditPostGroupModal"
;
...
@@ -28,6 +28,7 @@ function LeftStructureTree(props) {
...
@@ -28,6 +28,7 @@ function LeftStructureTree(props) {
const
[
selctQueryName
,
setSelctQueryName
]
=
useState
(
''
);
// 搜索出结果后最终选择的名字
const
[
selctQueryName
,
setSelctQueryName
]
=
useState
(
''
);
// 搜索出结果后最终选择的名字
const
[
postGroupTreeData
,
setPostGroupTreeData
]
=
useState
([]);
// 为了判定创建和编辑时的数据会不会重明
const
[
postGroupTreeData
,
setPostGroupTreeData
]
=
useState
([]);
// 为了判定创建和编辑时的数据会不会重明
const
[
open
,
setOpen
]
=
useState
(
false
);
const
[
open
,
setOpen
]
=
useState
(
false
);
const
timer
=
useRef
(
null
)
useEffect
(()
=>
{
useEffect
(()
=>
{
setQueryName
(
''
);
//切换tab时搜索置空
setQueryName
(
''
);
//切换tab时搜索置空
...
@@ -501,6 +502,14 @@ function LeftStructureTree(props) {
...
@@ -501,6 +502,14 @@ function LeftStructureTree(props) {
props
.
searchUserList
(
e
.
selectedNodes
[
0
],
treeType
,
1
);
props
.
searchUserList
(
e
.
selectedNodes
[
0
],
treeType
,
1
);
}
}
function
changeName
(
value
){
clearTimeout
(
timer
)
timer
.
current
=
setTimeout
(()
=>
{
setQueryName
(
value
);
setOpen
(
true
);
getCompleteOptionData
(
value
)
},
500
)
}
return
(
return
(
<
div
className=
"left-structure-tree"
>
<
div
className=
"left-structure-tree"
>
<
div
className=
"organization"
>
<
div
className=
"organization"
>
...
@@ -510,7 +519,7 @@ function LeftStructureTree(props) {
...
@@ -510,7 +519,7 @@ function LeftStructureTree(props) {
dropdownClassName=
"certain-category-search-dropdown"
dropdownClassName=
"certain-category-search-dropdown"
dropdownMatchSelectWidth=
{
250
}
dropdownMatchSelectWidth=
{
250
}
allowClear
allowClear
onChange=
{
(
value
)
=>
{
setQueryName
(
value
);
setOpen
(
true
);
getCompleteOptionData
(
value
)}
}
onChange=
{
changeName
}
// onSearch={(value)=>{getCompleteOptionData(value)}}
// onSearch={(value)=>{getCompleteOptionData(value)}}
notFoundContent=
{
notFoundContentNode
()
}
notFoundContent=
{
notFoundContentNode
()
}
value=
{
queryName
}
value=
{
queryName
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment