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
c425abcd
Commit
c425abcd
authored
Jun 25, 2021
by
maolipeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:员工学员数显示不准修复
parent
abfd7bda
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
src/modules/college-manage/EmployeeManage.tsx
+13
-1
src/modules/college-manage/UserManagePage.tsx
+15
-1
No files found.
src/modules/college-manage/EmployeeManage.tsx
View file @
c425abcd
...
...
@@ -69,6 +69,7 @@ function EmployeeManage() {
});
const
[
total
,
setTotal
]
=
useState
(
0
);
const
[
realTotal
,
setRealTotal
]
=
useState
(
0
)
const
[
model
,
setModel
]
=
useState
<
React
.
ReactNode
>
(
null
);
const
[
employeeModal
,
setEmployeeModal
]
=
useState
(
false
);
const
[
choosedItem
,
setChooseItem
]
=
useState
<
ChoosedItemType
>
({
...
...
@@ -86,6 +87,17 @@ function EmployeeManage() {
if
(
!
User
.
getEnterpriseId
())
{
window
.
RCHistory
.
replace
(
'/employees-manage'
);
}
//获取员工数
const
_query
=
{
current
:
0
,
size
:
10
,
nickName
:
""
,
phone
:
""
,
roleCodes
:
[],
}
StoreService
.
getEmployeeList
(
_query
).
then
((
res
:
any
)
=>
{
setRealTotal
(
res
.
result
.
total
);
});
},
[])
useEffect
(()
=>
{
...
...
@@ -363,7 +375,7 @@ function EmployeeManage() {
</
Button
>
}
</
div
>
<
LimitTip
type=
"员工"
total=
{
t
otal
}
tip=
{
()
=>
{
return
(<
div
>
数据为当前学院的员工数,若员工存在多个学院,企业人数只统计为1人
</
div
>)}
}
/>
<
LimitTip
type=
"员工"
total=
{
realT
otal
}
tip=
{
()
=>
{
return
(<
div
>
数据为当前学院的员工数,若员工存在多个学院,企业人数只统计为1人
</
div
>)}
}
/>
<
div
className=
"box-body"
>
<
XMTable
renderEmpty=
{
{
...
...
src/modules/college-manage/UserManagePage.tsx
View file @
c425abcd
...
...
@@ -43,11 +43,25 @@ function UserManagePage() {
sourceEnum
:
undefined
,
});
const
[
total
,
setTotal
]
=
useState
(
0
);
const
[
realTotal
,
setRealTotal
]
=
useState
(
0
)
useEffect
(()
=>
{
if
(
!
User
.
getEnterpriseId
())
{
window
.
RCHistory
.
replace
(
'/user-manage'
);
}
//获取学员数
const
_query
=
{
current
:
0
,
size
:
10
,
nickName
:
""
,
phone
:
""
,
registerBegin
:
null
,
registerEnd
:
null
,
sourceEnum
:
undefined
,
}
StoreService
.
getUserList
(
_query
).
then
((
res
:
any
)
=>
{
setRealTotal
(
res
.
result
.
total
);
});
},
[])
useEffect
(()
=>
{
...
...
@@ -203,7 +217,7 @@ function UserManagePage() {
}
}
>
添加学员
</
Button
>
}
<
LimitTip
type=
"学员"
total=
{
t
otal
}
tip=
{
()
=>
{
return
(<
div
><
div
>
1、数据为当前学院的员工数,若学员存在多个学院,企业人数只统计为1人;
</
div
><
div
>
2、若一个学员既用「企业微信」登录学习又用「微信」登录学习,企业人数将统计为2人。
</
div
></
div
>)}
}
/>
<
LimitTip
type=
"学员"
total=
{
realT
otal
}
tip=
{
()
=>
{
return
(<
div
><
div
>
1、数据为当前学院的员工数,若学员存在多个学院,企业人数只统计为1人;
</
div
><
div
>
2、若一个学员既用「企业微信」登录学习又用「微信」登录学习,企业人数将统计为2人。
</
div
></
div
>)}
}
/>
<
div
className=
"box-body"
>
<
XMTable
renderEmpty=
{
{
...
...
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