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
c7471eda
Commit
c7471eda
authored
Aug 01, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:处理列表更新次数
parent
306a9e02
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
249 additions
and
93 deletions
+249
-93
src/data-source/store/request-apis.ts
+8
-3
src/domains/store-domain/storeService.ts
+9
-2
src/modules/college-manage/EmployeeManage.less
+13
-0
src/modules/college-manage/EmployeeManage.tsx
+68
-9
src/modules/college-manage/components/DepartMentTabCon.jsx
+77
-29
src/modules/college-manage/components/LeftStructureTree.jsx
+69
-48
src/modules/college-manage/modal/NewChooseMembersModal.jsx
+5
-2
No files found.
src/data-source/store/request-apis.ts
View file @
c7471eda
...
...
@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-11-25 18:25:02
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-07-
29 19:57:1
6
* @LastEditTime: 2021-07-
30 17:00:0
6
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -101,4 +101,10 @@ export function getStoreCustomerAndDepNamePage(params: object) {
}
export
function
delDepartmentUser
(
params
:
object
)
{
return
Service
.
Hades
(
"public/hades/delDepartmentUser"
,
params
);
}
\ No newline at end of file
}
export
function
syncWorkWeChatDepartment
(
params
:
object
)
{
return
Service
.
Hades
(
"public/hades/syncWorkWeChatDepartment"
,
params
);
}
export
function
getSyncCount
(
params
:
object
)
{
return
Service
.
Hades
(
"public/hades/getSyncCount"
,
params
);
}
src/domains/store-domain/storeService.ts
View file @
c7471eda
...
...
@@ -2,14 +2,14 @@
* @Author: wufan
* @Date: 2020-11-25 18:25:02
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-0
7-29 19:57:52
* @LastEditTime: 2021-0
8-01 09:38:54
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
{
getEmployeeList
,
getUserList
,
getStoreDecorationList
,
getStoreRole
,
addEmployee
,
editEmployee
,
deleteEmployee
,
getCourseCatalogList
,
getAllSonCategory
,
addCourseCategory
,
delCourseCategory
,
editCourseCategory
,
deleteStoreDecorationList
,
addStoreBanner
,
editStoreBanner
,
moveBannerSequence
,
getStoreUserBasicPage
,
updateStoreMessage
,
getStoreDetail
,
getByDepartmentId
,
getDepartmentUser
,
getDepartmentUserNotPage
,
addDepartment
,
editDepartment
,
delDepartment
,
queryDepartmentTree
,
getStoreCustomerAndDepNamePage
,
delDepartmentUser
editDepartment
,
delDepartment
,
queryDepartmentTree
,
getStoreCustomerAndDepNamePage
,
delDepartmentUser
,
syncWorkWeChatDepartment
,
getSyncCount
}
from
'@/data-source/store/request-apis'
;
export
default
class
StoreService
{
...
...
@@ -118,4 +118,10 @@ export default class StoreService {
static
delDepartmentUser
(
params
:
any
){
return
delDepartmentUser
(
params
);
}
static
syncWorkWeChatDepartment
(
params
:
any
){
return
syncWorkWeChatDepartment
(
params
);
}
static
getSyncCount
(
params
:
any
){
return
getSyncCount
(
params
);
}
}
\ No newline at end of file
src/modules/college-manage/EmployeeManage.less
View file @
c7471eda
...
...
@@ -5,4 +5,16 @@
.add-show-btn{
margin-top:12px;
}
.update-user-btn{
margin-left:8px;
margin-right:8px;
}
.origin-text{
font-size:14px;
color:#999;
}
.view-text{
font-size:14px;
color:#5289FA;
}
}
\ No newline at end of file
src/modules/college-manage/EmployeeManage.tsx
View file @
c7471eda
...
...
@@ -277,6 +277,55 @@ function EmployeeManage() {
getEmployeeList
();
});
}
function
updateListData
(){
let
num
:
any
;
const
params
=
{
enterpriseId
:
User
.
getEnterpriseId
(),
storeId
:
User
.
getStoreId
(),
userType
:
'USER'
}
StoreService
.
getSyncCount
(
params
).
then
((
res
)
=>
{
num
=
res
.
result
;
if
(
num
<
3
){
return
confirm
({
title
:
"确定更新列表数据吗?"
,
content
:
`员工数据来源企微通讯录,一天只能更新3次,今日还能更新
${
3
-
num
}
次。`
,
icon
:
(
<
span
className=
"icon iconfont default-confirm-icon"
>

</
span
>
),
okText
:
"确定"
,
cancelText
:
"取消"
,
onOk
:
()
=>
{
confirmUpdateListData
()
},
});
}
else
{
Modal
.
warning
({
title
:
'提示'
,
okText
:
'我知道了'
,
content
:
'员工数据今日更新次数已达上限(3次),无法继续更新。'
,
icon
:
(
<
span
className=
'icon iconfont default-confirm-icon'
style=
{
{
color
:
'#FFBB54 !important'
}
}
>

</
span
>
),
});
}
});
}
function
confirmUpdateListData
(){
const
params
=
{
enterpriseId
:
User
.
getEnterpriseId
(),
storeId
:
User
.
getStoreId
(),
userType
:
'USER'
}
StoreService
.
syncWorkWeChatDepartment
(
params
).
then
((
res
)
=>
{
message
.
success
(
'已更新'
);
});
}
return
(
<
div
className=
"page employee-manage-page"
>
...
...
@@ -368,15 +417,25 @@ function EmployeeManage() {
</
div
>
</
div
>
{
(
User
.
getUserRole
()
===
'CloudManager'
||
User
.
getUserRole
()
===
'StoreManager'
)
&&
<
Button
onClick=
{
()
=>
{
handleToAddEmployee
();
}
}
type=
"primary"
className=
"add-show-btn"
>
添加员工
</
Button
>
<>
<
Button
onClick=
{
()
=>
{
handleToAddEmployee
();
}
}
type=
"primary"
className=
"add-show-btn"
>
添加员工
</
Button
>
<
Button
className=
"update-user-btn"
onClick=
{
()
=>
{
updateListData
()}
}
>
更新列表数据
</
Button
>
<
span
className=
"origin-text"
>
数据来源企业微信通讯录
</
span
>
<
a
href=
"https://www.yuque.com/wangzhong-zkqw0/qixue"
target=
"_blank"
>
<
span
className=
"view-text"
>
查看数据更新说明
</
span
>
</
a
>
</>
}
</
div
>
<
LimitTip
type=
"员工"
total=
{
realTotal
}
tip=
{
()
=>
{
return
(<
div
>
数据为当前学院的员工数,若员工存在多个学院,企业人数只统计为1人
</
div
>)}
}
/>
...
...
src/modules/college-manage/components/DepartMentTabCon.jsx
View file @
c7471eda
...
...
@@ -25,7 +25,8 @@ function DepartMentTabCon(props) {
const
[
query
,
setQuery
]
=
useState
(
DefaultQuery
);
const
[
total
,
setTotal
]
=
useState
(
0
);
const
[
userListdata
,
setUserListData
]
=
useState
([]);
const
[
selectUser
,
setSelectUser
]
=
useState
([]);
const
[
selectUser
,
setSelectUser
]
=
useState
([]);
// 设置选中的用户
const
[
selectDep
,
setSelectDep
]
=
useState
({})
const
columns
=
[
{
title
:
"学员"
,
...
...
@@ -99,9 +100,9 @@ function DepartMentTabCon(props) {
return
(
<
div
className=
"operate"
>
{
props
.
currentTab
===
'departMentTab'
?
<
div
className=
"operate__item"
onClick=
{
()
=>
delUser
(
'single'
,
item
.
i
d
)
}
>
删除
</
div
>
<
div
className=
"operate__item"
onClick=
{
()
=>
delUser
(
'single'
,
item
.
userI
d
)
}
>
删除
</
div
>
:
<
div
className=
"operate__item"
onClick=
{
()
=>
delUser
(
'single'
,
item
.
i
d
)
}
>
移出
</
div
>
<
div
className=
"operate__item"
onClick=
{
()
=>
delUser
(
'single'
,
item
.
userI
d
)
}
>
移出
</
div
>
}
</
div
>
);
...
...
@@ -112,20 +113,23 @@ function DepartMentTabCon(props) {
setChooseMembersModalVisible
(
false
);
}
function
getUserList
(
record
,
current
)
{
function
getUserList
(
record
,
treeType
,
current
)
{
const
params
=
{
...
query
,
depType
:
DepType
[
props
.
currentTab
],
departmentId
:
record
.
id
,
depType
:
DepType
[
treeType
]
||
DepType
[
props
.
currentTab
],
enterpriseId
:
User
.
getEnterpriseId
(),
source
:
0
,
storeId
:
User
.
getStoreId
(),
userId
:
User
.
getUserId
(),
};
if
(
record
){
params
.
departmentId
=
record
.
id
;
}
if
(
current
)
{
params
.
current
=
current
;
}
setQuery
(
params
);
console
.
log
(
'params ++++ '
,
params
);
StoreService
.
getStoreCustomerAndDepNamePage
(
params
).
then
((
res
)
=>
{
const
{
records
=
[],
total
}
=
res
.
result
;
setUserListData
(
records
);
...
...
@@ -134,16 +138,20 @@ function DepartMentTabCon(props) {
}
function
confirmAddCustomer
()
{
Bus
.
trigger
(
"addCustomer"
);
const
_query
=
{
...
DefaultQuery
,
id
:
query
.
departmentId
}
Bus
.
trigger
(
"addCustomer"
,{
treeType
:
props
.
currentTab
,
query
:
_query
});
}
function
delUser
(
type
,
i
d
){
function
delUser
(
type
,
userI
d
){
let
idList
=
[];
if
(
type
===
'single'
){
idList
.
push
(
i
d
);
idList
.
push
(
userI
d
);
}
if
(
type
===
'multiple'
){
idList
=
_
.
pluck
(
selectUser
,
'
i
d'
);
idList
=
_
.
pluck
(
selectUser
,
'
userI
d'
);
}
if
(
idList
.
length
===
0
){
message
.
warning
(
'请先选择要删除的学员'
)
...
...
@@ -172,7 +180,7 @@ function DepartMentTabCon(props) {
}
StoreService
.
delDepartmentUser
(
params
).
then
((
res
)
=>
{
message
.
success
(
`删除成功`
);
getUserList
(
query
);
getUserList
();
});
}
...
...
@@ -191,14 +199,50 @@ function DepartMentTabCon(props) {
setSelectUser
(
_list
);
};
function
updateListData
(){
let
num
=
1
;
if
(
num
<
3
){
return
confirm
({
title
:
"确定更新列表数据吗?"
,
content
:
`员工数据来源企微通讯录,一天只能更新3次,今日还能更新
${
3
-
num
}
次。`
,
icon
:
(
<
span
className=
"icon iconfont default-confirm-icon"
>

</
span
>
),
okText
:
"确定"
,
cancelText
:
"取消"
,
onOk
:
()
=>
{
confirmUpdateListData
()
},
});
}
else
{
Modal
.
warning
({
title
:
'提示'
,
okText
:
'我知道了'
,
content
:
'员工数据今日更新次数已达上限(3次),无法继续更新。'
,
icon
:
(
<
span
className=
'icon iconfont default-confirm-icon'
style=
{
{
color
:
'#FFBB54 !important'
}
}
>

</
span
>
),
});
}
}
function
confirmUpdateListData
(){
const
params
=
{
enterpriseId
:
User
.
getEnterpriseId
(),
}
StoreService
.
syncWorkWeChatDepartment
(
params
).
then
((
res
)
=>
{
message
.
success
(
'已更新'
);
});
}
return
(
<
div
className=
"department-tab-con"
>
{
props
.
currentTab
&&
(
<
LeftStructureTree
treeType=
{
props
.
currentTab
}
searchUserList=
{
(
params
)
=>
getUserList
(
params
)
}
/>
)
}
<
LeftStructureTree
treeType=
{
props
.
currentTab
}
searchUserList=
{
(
params
,
treeType
)
=>
getUserList
(
params
,
treeType
)
}
onChangeSelectDep=
{
(
record
)
=>
{
setSelectDep
(
record
)}
}
/>
<
div
className=
"table-con"
>
{
props
.
currentTab
===
"departMentTab"
&&
(
<
div
className=
"operate-area"
>
...
...
@@ -212,7 +256,7 @@ function DepartMentTabCon(props) {
添加学员
</
Button
>
<
Button
className=
"del-user-btn"
onClick=
{
()
=>
delUser
(
'multiple'
)
}
>
删除学员
</
Button
>
<
Button
className=
"update-user-btn"
>
更新列表数据
</
Button
>
<
Button
className=
"update-user-btn"
onClick=
{
()
=>
{
updateListData
()}
}
>
更新列表数据
</
Button
>
<
span
className=
"origin-text"
>
数据来源企业微信通讯录
</
span
>
<
a
href=
"https://www.yuque.com/wangzhong-zkqw0/qixue"
...
...
@@ -225,15 +269,18 @@ function DepartMentTabCon(props) {
{
(
props
.
currentTab
===
"postGrouptab"
||
props
.
currentTab
===
"customGroupTab"
)
&&
(
<
div
className=
"operate-area"
>
<
Button
type=
"primary"
className=
"add-user-btn"
onClick=
{
()
=>
{
setChooseMembersModalVisible
(
true
);
}
}
>
添加学员
</
Button
>
{
/* 岗位组和自定义分组只有岗位下和分组才展示添加学员*/
}
{
selectDep
.
depLevel
>
0
&&
<
Button
type=
"primary"
className=
"add-user-btn"
onClick=
{
()
=>
{
setChooseMembersModalVisible
(
true
);
}
}
>
添加学员
</
Button
>
}
<
Button
className=
"del-user-btn"
onClick=
{
()
=>
delUser
(
'multiple'
)
}
>
移出学员
</
Button
>
</
div
>
)
}
...
...
@@ -247,7 +294,7 @@ function DepartMentTabCon(props) {
size=
"middle"
pagination=
{
false
}
columns=
{
columns
}
scroll=
{
{
x
:
13
00
}
}
scroll=
{
{
x
:
8
00
}
}
dataSource=
{
userListdata
}
rowKey=
{
(
record
)
=>
record
.
userId
}
rowSelection=
{
{
...
...
@@ -281,8 +328,8 @@ function DepartMentTabCon(props) {
toPage=
{
(
page
)
=>
{
const
queryStates
=
_
.
clone
(
query
);
queryStates
.
current
=
page
;
getUserList
(
queryStates
);
setQuery
(
queryStates
);
getUserList
();
}
}
/>
</
div
>
...
...
@@ -292,6 +339,7 @@ function DepartMentTabCon(props) {
<
NewChooseMembersModal
visible=
{
chooseMembersModalVisible
}
type=
"CUSTOMER"
selectDep=
{
selectDep
}
treeDepType=
{
props
.
currentTab
===
"departMentTab"
?
"DEP_CHAT"
:
"DEP_ORG"
}
...
...
src/modules/college-manage/components/LeftStructureTree.jsx
View file @
c7471eda
...
...
@@ -20,8 +20,9 @@ function LeftStructureTree(props) {
const
[
postGroupModalLable
,
setPostGroupModalLable
]
=
useState
(
""
);
const
[
postGroupName
,
setPostGroupName
]
=
useState
(
""
);
const
[
currentGroupData
,
setCurrentGroupData
]
=
useState
({});
const
[
selectUserParams
,
setSelectUserParams
]
=
useState
({});
const
[
completeOptions
,
setCompleteOption
]
=
useState
([]);
const
[
selectDepParams
,
setSelectDepParams
]
=
useState
({});
// 设置选择的部门、岗位组、自定分组的参数
const
[
completeOptions
,
setCompleteOption
]
=
useState
([]);
const
[
selectedKeys
,
setSelectedKeys
]
=
useState
([]);
// 设置选中的部门key值
const
renderTitle
=
(
title
)
=>
(
<
span
>
...
...
@@ -72,9 +73,10 @@ function LeftStructureTree(props) {
</
AutoComplete
>
);
// 获取关键词的搜索结果
function
getCompleteOptionData
(
value
){
const
params
=
{
depType
:
DepType
[
treeType
],
depType
:
DepType
[
props
.
treeType
],
queryName
:
value
,
enterpriseId
:
User
.
getEnterpriseId
(),
source
:
0
,
//0代表来自企培
...
...
@@ -95,7 +97,7 @@ function LeftStructureTree(props) {
})
}
if
(
departmentVOList
.
length
>
0
){
switch
(
treeType
){
switch
(
props
.
treeType
){
case
'departMentTab'
:
departmentGroupObj
.
label
=
renderTitle
(
'部门'
);
break
;
...
...
@@ -124,22 +126,31 @@ function LeftStructureTree(props) {
}
useEffect
(()
=>
{
getTreeData
();
getTreeData
().
then
((
res
)
=>
{
const
_defaultSelectedKeys
=
[];
if
(
res
.
length
>
0
){
_defaultSelectedKeys
.
push
(
res
[
0
].
id
);
setSelectedKeys
(
_defaultSelectedKeys
);
setSelectDepParams
(
res
[
0
]);
props
.
onChangeSelectDep
(
res
[
0
])
props
.
searchUserList
(
res
[
0
]);
}
});
},[
props
.
treeType
]);
useEffect
(()
=>
{
Bus
.
bind
(
"addCustomer"
,
addCustomer
)
Bus
.
bind
(
"addCustomer"
,
(
record
)
=>
{
addCustomer
(
record
.
treeType
,
record
.
query
)}
)
},[]);
async
function
addCustomer
(){
await
getTreeData
();
props
.
searchUserList
(
setSelectUserParams
)
async
function
addCustomer
(
treeType
,
query
){
console
.
log
(
'quer +++ '
,
query
);
await
getTreeData
(
treeType
);
props
.
searchUserList
(
query
,
treeType
);
}
function
getTreeData
(){
function
getTreeData
(
treeType
){
return
new
Promise
((
resolve
,
reject
)
=>
{
const
params
=
{
departmentTypeEnum
:
DepType
[
treeType
],
departmentTypeEnum
:
DepType
[
treeType
]
||
DepType
[
props
.
treeType
]
,
enterpriseId
:
User
.
getEnterpriseId
(),
source
:
0
,
//0代表来自企培
storeId
:
User
.
getStoreId
(),
...
...
@@ -147,10 +158,11 @@ function LeftStructureTree(props) {
whetherCount
:
true
}
StoreService
.
queryDepartmentTree
(
params
).
then
((
res
)
=>
{
// let { departmentVOList=[]} = res.result;
let
_treeData
=
handleData
(
res
.
result
);
const
{
result
=
[]}
=
res
let
{
departmentVOList
=
[]
}
=
result
;
let
_treeData
=
handleData
(
result
);
setTreeData
(
_treeData
);
resolve
();
resolve
(
result
);
});
})
...
...
@@ -175,11 +187,11 @@ function LeftStructureTree(props) {
const
moreOpenGroupOperate
=
(
record
)
=>
(
<
Menu
>
<
Menu
.
Item
key=
"edit"
>
<
span
onClick=
{
()
=>
{
treeType
===
'postGrouptab'
?
editPostGroup
(
record
):
editCustomGroup
(
record
)}
}
>
编辑
</
span
>
<
span
onClick=
{
()
=>
{
props
.
treeType
===
'postGrouptab'
?
editPostGroup
(
record
):
editCustomGroup
(
record
)}
}
>
编辑
</
span
>
</
Menu
.
Item
>
{
record
.
depLevel
===
0
&&
<
Menu
.
Item
key=
"add"
>
<
span
onClick=
{
()
=>
{
treeType
===
'postGrouptab'
?
addPostGroup
(
1
,
record
):
addCustomGroup
(
1
,
record
)}
}
>
<
span
onClick=
{
()
=>
{
props
.
treeType
===
'postGrouptab'
?
addPostGroup
(
1
,
record
):
addCustomGroup
(
1
,
record
)}
}
>
{
props
.
treeType
===
'postGrouptab'
&&
<
span
>
新建岗位
</
span
>
}
...
...
@@ -190,7 +202,7 @@ function LeftStructureTree(props) {
</
Menu
.
Item
>
}
<
Menu
.
Item
key=
"del"
>
<
span
onClick=
{
()
=>
{
treeType
===
'postGrouptab'
?
delPostGroup
(
record
):
delCustomGroup
(
record
)}
}
>
删除
</
span
>
<
span
onClick=
{
()
=>
{
props
.
treeType
===
'postGrouptab'
?
delPostGroup
(
record
):
delCustomGroup
(
record
)}
}
>
删除
</
span
>
</
Menu
.
Item
>
</
Menu
>
);
...
...
@@ -332,7 +344,11 @@ function LeftStructureTree(props) {
}
function
selectUserList
(
record
,
e
){
console
.
log
(
'e'
,
e
);
const
_selectKeys
=
[];
_selectKeys
.
push
(
e
.
selectedNodes
[
0
].
id
)
setSelectedKeys
(
_selectKeys
);
setSelectDepParams
(
e
.
selectedNodes
[
0
]);
props
.
onChangeSelectDep
(
e
.
selectedNodes
[
0
]);
props
.
searchUserList
(
e
.
selectedNodes
[
0
]);
}
...
...
@@ -348,9 +364,9 @@ function LeftStructureTree(props) {
/> */
}
<
Complete
/>
</
div
>
{
(
treeType
===
'postGrouptab'
||
treeType
===
'customGroupTab'
)
&&
(
{
(
props
.
treeType
===
'postGrouptab'
||
props
.
treeType
===
'customGroupTab'
)
&&
(
<
div
className=
"operate"
>
{
treeType
===
'postGrouptab'
&&
{
props
.
treeType
===
'postGrouptab'
&&
<
Button
className=
"add-btn"
onClick=
{
()
=>
{
...
...
@@ -360,7 +376,7 @@ function LeftStructureTree(props) {
添加岗位组
</
Button
>
}
{
treeType
===
'customGroupTab'
&&
{
props
.
treeType
===
'customGroupTab'
&&
<
Button
className=
"add-btn"
onClick=
{
()
=>
{
...
...
@@ -377,39 +393,44 @@ function LeftStructureTree(props) {
defaultExpandAll
showIcon=
{
false
}
treeData=
{
treeData
}
selectedKeys=
{
selectedKeys
}
onSelect=
{
selectUserList
}
titleRender=
{
(
nodeData
)
=>
{
return
(
<
div
className=
"node-title-div"
onMouseOver=
{
(
e
)
=>
{
if
(
nodeData
.
key
===
"null"
)
return
;
let
moreDiv
=
e
.
currentTarget
.
getElementsByClassName
(
"item-more"
)[
0
];
let
countDiv
=
e
.
currentTarget
.
getElementsByClassName
(
"item-count"
)[
0
];
if
(
moreDiv
)
{
moreDiv
.
style
.
visibility
=
"visible"
;
}
if
(
countDiv
)
{
countDiv
.
style
.
visibility
=
"hidden"
;
if
((
props
.
treeType
===
'postGrouptab'
||
props
.
treeType
===
'customGroupTab'
)){
if
(
nodeData
.
key
===
"null"
)
return
;
let
moreDiv
=
e
.
currentTarget
.
getElementsByClassName
(
"item-more"
)[
0
];
let
countDiv
=
e
.
currentTarget
.
getElementsByClassName
(
"item-count"
)[
0
];
if
(
moreDiv
)
{
moreDiv
.
style
.
visibility
=
"visible"
;
}
if
(
countDiv
)
{
countDiv
.
style
.
visibility
=
"hidden"
;
}
}
}
}
onMouseOut=
{
(
e
)
=>
{
if
(
nodeData
.
key
===
"null"
)
return
;
let
moreDiv
=
e
.
currentTarget
.
getElementsByClassName
(
"item-more"
)[
0
];
let
countDiv
=
e
.
currentTarget
.
getElementsByClassName
(
"item-count"
)[
0
];
if
(
moreDiv
)
{
moreDiv
.
style
.
visibility
=
"hidden"
;
}
if
(
countDiv
)
{
countDiv
.
style
.
visibility
=
"visible"
;
if
((
props
.
treeType
===
'postGrouptab'
||
props
.
treeType
===
'customGroupTab'
)){
if
(
nodeData
.
key
===
"null"
)
return
;
let
moreDiv
=
e
.
currentTarget
.
getElementsByClassName
(
"item-more"
)[
0
];
let
countDiv
=
e
.
currentTarget
.
getElementsByClassName
(
"item-count"
)[
0
];
if
(
moreDiv
)
{
moreDiv
.
style
.
visibility
=
"hidden"
;
}
if
(
countDiv
)
{
countDiv
.
style
.
visibility
=
"visible"
;
}
}
}
}
>
...
...
@@ -430,7 +451,7 @@ function LeftStructureTree(props) {
<
span
>
{
nodeData
.
name
}
</
span
>
</
div
>
<
div
className=
"item-count"
>
(
{
nodeData
.
departmentCount
||
0
}
)
</
div
>
{
(
treeType
===
'postGrouptab'
||
treeType
===
'customGroupTab'
)
&&
(
{
(
props
.
treeType
===
'postGrouptab'
||
props
.
treeType
===
'customGroupTab'
)
&&
(
<
Dropdown
overlay=
{
moreOpenGroupOperate
(
nodeData
)
}
>
<
div
className=
"item-more icon iconfont"
>

</
div
>
</
Dropdown
>
...
...
@@ -455,7 +476,7 @@ function LeftStructureTree(props) {
postGroupName=
{
postGroupName
}
postGroupTreeData=
{
treeData
}
label=
{
postGroupModalLable
}
currentTab=
{
treeType
}
currentTab=
{
props
.
treeType
}
currentGroupData=
{
currentGroupData
}
/>
)
}
...
...
src/modules/college-manage/modal/NewChooseMembersModal.jsx
View file @
c7471eda
...
...
@@ -107,11 +107,14 @@ class NewChooseMembersModal extends React.Component {
const
_item
=
{}
if
(
addDepType
===
'DEP_ORG'
){
_item
.
depUserType
=
'VISIBLE_USER'
;
_item
.
departmentId
=
item
.
departmentId
;
_item
.
enterpriseVisibleUserId
=
item
.
userId
;
}
else
{
_item
.
depUserType
=
'STORE_USER'
;
_item
.
departmentId
=
this
.
props
.
selectDep
.
id
;
_item
.
enterpriseVisibleUserId
=
item
.
enterpriseUserId
;
}
_item
.
departmentId
=
item
.
departmentId
;
_item
.
enterpriseVisibleUserId
=
item
.
userId
;
return
_item
})
const
_params
=
{
...
...
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