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
7bc451a7
Commit
7bc451a7
authored
Aug 11, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:处理搜索的展示
parent
33d85cba
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
19 deletions
+60
-19
src/modules/college-manage/EmployeeManage.tsx
+1
-1
src/modules/college-manage/components/DepartMentTabCon.jsx
+3
-3
src/modules/college-manage/components/LeftStructureTree.jsx
+30
-13
src/modules/college-manage/components/LeftStructureTree.less
+25
-0
src/modules/college-manage/components/SearchUser.jsx
+0
-1
src/modules/college-manage/modal/NewChooseMembersModal.jsx
+1
-1
No files found.
src/modules/college-manage/EmployeeManage.tsx
View file @
7bc451a7
...
...
@@ -475,7 +475,7 @@ function EmployeeManage() {
<
Button
className=
"update-user-btn"
onClick=
{
()
=>
{
updateListData
()}
}
>
更新列表数据
</
Button
>
<
span
className=
"origin-text"
>
数据来源企业微信通讯录
</
span
>
<
a
href=
"https://www.yuque.com/wangzhong-zkqw0/qixue"
href=
"https://www.yuque.com/wangzhong-zkqw0/qixue
/nsfcbi
"
target=
"_blank"
>
<
span
className=
"view-text"
>
查看数据更新说明
</
span
>
...
...
src/modules/college-manage/components/DepartMentTabCon.jsx
View file @
7bc451a7
...
...
@@ -60,7 +60,7 @@ function DepartMentTabCon(props) {
{
title
:
"真实姓名"
,
dataIndex
:
"realName"
,
width
:
"15%"
,
width
:
180
,
render
:
(
val
,
record
)
=>
{
return
<
span
>
{
val
}
</
span
>;
},
...
...
@@ -204,7 +204,7 @@ function DepartMentTabCon(props) {
idList
=
_
.
pluck
(
selectUser
,
'userId'
);
}
if
(
idList
.
length
===
0
){
message
.
warning
(
'请先选择要
删除
的学员'
)
message
.
warning
(
'请先选择要
移出
的学员'
)
return
;
}
switch
(
props
.
currentTab
){
...
...
@@ -359,7 +359,7 @@ function DepartMentTabCon(props) {
<
Button
className=
"update-user-btn"
onClick=
{
()
=>
{
updateListData
()}
}
>
更新列表数据
</
Button
>
<
span
className=
"origin-text"
>
数据来源企业微信通讯录
</
span
>
<
a
href=
"https://www.yuque.com/wangzhong-zkqw0/qixue"
href=
"https://www.yuque.com/wangzhong-zkqw0/qixue
/nsfcbi
"
target=
"_blank"
>
<
span
className=
"view-text"
>
查看数据更新说明
</
span
>
...
...
src/modules/college-manage/components/LeftStructureTree.jsx
View file @
7bc451a7
import
React
,
{
useEffect
,
useState
}
from
"react"
;
import
{
withRouter
}
from
"react-router-dom"
;
import
{
Tree
,
Input
,
Dropdown
,
Menu
,
Button
,
Modal
,
message
,
AutoComplete
}
from
"antd"
;
import
{
Tree
,
Input
,
Dropdown
,
Menu
,
Button
,
Modal
,
message
,
AutoComplete
,
Tooltip
}
from
"antd"
;
import
AddOrEditPostGroupModal
from
"../modal/AddOrEditPostGroupModal"
;
import
User
from
'@/common/js/user'
import
StoreService
from
"@/domains/store-domain/storeService"
;
...
...
@@ -53,7 +53,7 @@ function LeftStructureTree(props) {
Bus
.
bind
(
"changeTreeData"
,(
record
)
=>
{
getTreeData
(
record
.
treeType
)})
},[]);
const
renderTitle
=
(
title
)
=>
(
<
span
>
<
span
className=
"catalog-title"
>
{
title
}
</
span
>
);
...
...
@@ -61,23 +61,32 @@ function LeftStructureTree(props) {
value
:
record
.
userName
||
record
.
name
,
label
:
(
<
div
className=
"search-result-item"
style=
{
{
display
:
'flex'
,
justifyContent
:
'space-between'
,
}
}
depId=
{
record
.
id
}
type=
{
type
}
>
{
type
===
'user'
?
<
div
><
WWOpenDataCom
type=
"userName"
openid=
{
record
.
userName
}
/></
div
>
<
div
className=
"search-result-item__left"
>
<
span
className=
"icon iconfont title-icon"
>

</
span
>
<
WWOpenDataCom
type=
"userName"
openid=
{
record
.
userName
}
/>
</
div
>
:
<
div
><
WWOpenDataCom
type=
"departmentName"
openid=
{
record
.
name
}
/></
div
>
}
{
type
===
'user'
&&
record
.
postDepNamesList
.
map
((
item
,
index
)
=>
{
return
<
span
><
WWOpenDataCom
type=
"departmentName"
openid=
{
item
}
/></
span
>
})
}
<
div
className=
"search-result-item__left"
><
WWOpenDataCom
type=
"departmentName"
openid=
{
record
.
name
}
/></
div
>
}
{
type
===
'user'
&&
(
<
div
className=
"search-result-item__right"
>
<
Tooltip
title=
{
<
div
>
{
handleDepName
(
record
.
depNamesList
)
}
</
div
>
}
placement=
'top'
arrowPointAtCenter
>
{
record
.
depNamesList
.
map
((
item
,
index
)
=>
{
return
<
span
><
WWOpenDataCom
type=
"departmentName"
openid=
{
item
}
/>
{
index
<
(
record
.
depNamesList
.
length
-
1
)?
';'
:
''
}
</
span
>
})
}
</
Tooltip
>
</
div
>
)
}
{
type
===
'post'
&&
<
span
type=
'post'
openid=
{
record
.
parentName
}
>
{
record
.
parentName
}
</
span
>
}
...
...
@@ -91,6 +100,12 @@ function LeftStructureTree(props) {
<
div
className=
"empty-text"
>
暂无数据
</
div
>
</
div
>
}
function
handleDepName
(
depArray
){
const
depArrayDom
=
depArray
.
map
((
item
,
index
)
=>
{
return
<
span
><
WWOpenDataCom
type=
"departmentName"
openid=
{
item
}
/>
;
</
span
>
});
return
depArrayDom
;
};
function
handlePlaceHolder
(){
let
placeholder
=
''
;
switch
(
props
.
treeType
){
...
...
@@ -124,7 +139,9 @@ function LeftStructureTree(props) {
function
getCompleteOptionData
(
value
){
// setQueryName(value);
setCompleteOption
([]);
console
.
log
(
"treeType"
,
props
.
treeType
);
if
(
!
value
){
return
}
const
params
=
{
depType
:
DepType
[
props
.
treeType
],
queryName
:
value
,
...
...
@@ -486,8 +503,8 @@ function LeftStructureTree(props) {
dropdownClassName=
"certain-category-search-dropdown"
dropdownMatchSelectWidth=
{
250
}
allowClear
onChange=
{
(
value
)
=>
setQueryName
(
value
)
}
onSearch=
{
(
value
)
=>
{
getCompleteOptionData
(
value
)}
}
onChange=
{
(
value
)
=>
{
setQueryName
(
value
);
setOpen
(
true
);
getCompleteOptionData
(
value
)}
}
//
onSearch={(value)=>{getCompleteOptionData(value)}}
notFoundContent=
{
notFoundContentNode
()
}
value=
{
queryName
}
open=
{
open
}
...
...
src/modules/college-manage/components/LeftStructureTree.less
View file @
7bc451a7
...
...
@@ -75,6 +75,31 @@
}
.certain-category-search-dropdown{
.catalog-title{
font-size:14px;
color:#666;
margin-bottom:14px;
}
.search-result-item{
padding:14px 0;
color:#333;
.title-icon{
color:#999;
margin-right:3px;
}
.search-result-item__left{
font-size:14px;
}
.search-result-item__right{
font-size:14px;
width:84px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color:#999;
text-align:right;
}
}
.empty-con{
text-align:center;
.empty-img{
...
...
src/modules/college-manage/components/SearchUser.jsx
View file @
7bc451a7
...
...
@@ -73,7 +73,6 @@ function SearchUser(props) {
<
div
className=
"drop-down__item__con__item"
>
<
div
className=
"drop-down__item__con__item__left"
>
<
span
className=
"icon iconfont title-icon"
>

</
span
>
<
WWOpenDataCom
type=
"userName"
openid=
{
item
.
userName
}
/>
</
div
>
<
div
className=
"drop-down__item__con__item__right"
>
...
...
src/modules/college-manage/modal/NewChooseMembersModal.jsx
View file @
7bc451a7
...
...
@@ -127,7 +127,6 @@ class NewChooseMembersModal extends React.Component {
}
_item
.
enterpriseVisibleUserId
=
item
.
enterpriseUserId
;
_item
.
departmentId
=
this
.
props
.
selectDep
.
id
;
}
return
_item
})
...
...
@@ -138,6 +137,7 @@ class NewChooseMembersModal extends React.Component {
}
Service
.
Hades
(
'public/hades/addBatchUserAndDepartmentStoreCustomer'
,
_params
).
then
((
res
)
=>
{
this
.
handleClose
();
message
.
success
(
'添加成功'
)
this
.
props
.
onConfirm
();
})
}
...
...
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