Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivManage
Commits
49b95372
Commit
49b95372
authored
Feb 15, 2023
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 优化机构站点树显示
parent
04344e81
Pipeline
#67485
passed with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
+17
-10
SiteManage.jsx
src/pages/userCenter/siteManage/SiteManage.jsx
+7
-4
UserManage.jsx
src/pages/userCenter/userManage/UserManage.jsx
+10
-6
No files found.
src/pages/userCenter/siteManage/SiteManage.jsx
View file @
49b95372
...
@@ -86,6 +86,7 @@ const SiteManageV2 = () => {
...
@@ -86,6 +86,7 @@ const SiteManageV2 = () => {
const
[
keepTree
,
setKeepTree
]
=
useState
([]);
// 保存所有一级id用于控制只展开一项一级菜单
const
[
keepTree
,
setKeepTree
]
=
useState
([]);
// 保存所有一级id用于控制只展开一项一级菜单
const
[
indeterminate
,
setIndeterminate
]
=
useState
(
new
Map
());
const
[
indeterminate
,
setIndeterminate
]
=
useState
(
new
Map
());
const
[
searchTreeValue
,
setSearchTreeValue
]
=
useState
(
''
);
const
[
searchTreeValue
,
setSearchTreeValue
]
=
useState
(
''
);
const
[
treeTotal
,
setTreeTotal
]
=
useState
();
let
a
=
[];
let
a
=
[];
...
@@ -164,7 +165,8 @@ const SiteManageV2 = () => {
...
@@ -164,7 +165,8 @@ const SiteManageV2 = () => {
getSiteTree
({
selectNode
:
-
1
,
keyword
:
value
}).
then
(
res
=>
{
getSiteTree
({
selectNode
:
-
1
,
keyword
:
value
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
setTreeLoading
(
false
);
setTreeLoading
(
false
);
setTreeData
(
res
.
data
);
setTreeData
(
res
.
data
.
list
);
setTreeTotal
(
res
.
data
.
count
);
let
aa
=
[];
let
aa
=
[];
if
(
res
.
data
.
length
>
0
)
{
if
(
res
.
data
.
length
>
0
)
{
res
.
data
.
forEach
(
i
=>
{
res
.
data
.
forEach
(
i
=>
{
...
@@ -749,9 +751,8 @@ const SiteManageV2 = () => {
...
@@ -749,9 +751,8 @@ const SiteManageV2 = () => {
[
styles
.
orgContainerHide
]:
!
treeVisible
,
[
styles
.
orgContainerHide
]:
!
treeVisible
,
})
}
})
}
>
>
<
span
style=
{
{
margin
:
'0 187px 0 7px'
,
fontSize
:
'15px '
,
fontWeight
:
'bold'
}
}
>
<
div
style=
{
{
width
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'space-between'
}
}
>
站点列表
<
span
style=
{
{
fontSize
:
'15px '
,
fontWeight
:
'bold'
}
}
>
站点列表(
{
treeTotal
}
个)
</
span
>
</
span
>
<
Tooltip
title=
"添加顶级站点"
>
<
Tooltip
title=
"添加顶级站点"
>
<
PlusSquareFilled
<
PlusSquareFilled
onClick=
{
()
=>
addTopStation
()
}
onClick=
{
()
=>
addTopStation
()
}
...
@@ -761,6 +762,8 @@ const SiteManageV2 = () => {
...
@@ -761,6 +762,8 @@ const SiteManageV2 = () => {
}
}
}
}
/>
/>
</
Tooltip
>
</
Tooltip
>
</
div
>
<
hr
style=
{
{
width
:
'97%'
,
color
:
'#eeecec'
,
marginLeft
:
'8px'
}
}
/>
<
hr
style=
{
{
width
:
'97%'
,
color
:
'#eeecec'
,
marginLeft
:
'8px'
}
}
/>
<
Search
<
Search
style=
{
{
style=
{
{
...
...
src/pages/userCenter/userManage/UserManage.jsx
View file @
49b95372
...
@@ -185,6 +185,7 @@ const UserManage = () => {
...
@@ -185,6 +185,7 @@ const UserManage = () => {
const
[
total
,
setTotal
]
=
useState
(
0
);
const
[
total
,
setTotal
]
=
useState
(
0
);
const
[
pageSize
,
setPageSize
]
=
useState
(
20
);
const
[
pageSize
,
setPageSize
]
=
useState
(
20
);
const
[
currentPage
,
setCurrentPage
]
=
useState
(
1
);
const
[
currentPage
,
setCurrentPage
]
=
useState
(
1
);
const
[
treeDataTotal
,
setTreeDataTotal
]
=
useState
();
// 用户表列名
// 用户表列名
const
columns
=
[
const
columns
=
[
{
{
...
@@ -664,7 +665,8 @@ const UserManage = () => {
...
@@ -664,7 +665,8 @@ const UserManage = () => {
.
then
(
newres
=>
{
.
then
(
newres
=>
{
setTreeLoading
(
false
);
setTreeLoading
(
false
);
if
(
newres
.
code
===
0
)
{
if
(
newres
.
code
===
0
)
{
let
res
=
newres
.
data
;
let
res
=
newres
.
data
.
list
;
setTreeDataTotal
(
newres
.
data
.
count
);
console
.
log
(
res
);
console
.
log
(
res
);
setTreeData
(
res
);
setTreeData
(
res
);
...
@@ -701,7 +703,8 @@ const UserManage = () => {
...
@@ -701,7 +703,8 @@ const UserManage = () => {
GetOUTreeNew
({
selectOU
:
-
1
})
GetOUTreeNew
({
selectOU
:
-
1
})
.
then
(
newres
=>
{
.
then
(
newres
=>
{
if
(
newres
.
code
===
0
)
{
if
(
newres
.
code
===
0
)
{
let
res
=
newres
.
data
;
let
res
=
newres
.
data
.
list
;
setTreeDataTotal
(
newres
.
data
.
count
);
console
.
log
(
res
);
console
.
log
(
res
);
setTreeLoading
(
false
);
setTreeLoading
(
false
);
setTreeData
(
res
);
setTreeData
(
res
);
...
@@ -1616,7 +1619,9 @@ const UserManage = () => {
...
@@ -1616,7 +1619,9 @@ const UserManage = () => {
})
}
})
}
>
>
<
div
style=
{
{
display
:
'flex'
,
flexDirection
:
'column'
,
height
:
'100%'
}
}
>
<
div
style=
{
{
display
:
'flex'
,
flexDirection
:
'column'
,
height
:
'100%'
}
}
>
<
div
style=
{
{
display
:
'flex'
}
}
>
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}
}
>
<
span
<
span
style=
{
{
style=
{
{
fontSize
:
'15px '
,
fontSize
:
'15px '
,
...
@@ -1624,7 +1629,7 @@ const UserManage = () => {
...
@@ -1624,7 +1629,7 @@ const UserManage = () => {
marginLeft
:
'7px'
,
marginLeft
:
'7px'
,
}
}
}
}
>
>
机构列表
机构列表
(
{
treeDataTotal
}
个)
</
span
>
</
span
>
<
Tooltip
title=
"添加顶级机构"
>
<
Tooltip
title=
"添加顶级机构"
>
<
PlusSquareFilled
<
PlusSquareFilled
...
@@ -1632,8 +1637,7 @@ const UserManage = () => {
...
@@ -1632,8 +1637,7 @@ const UserManage = () => {
style=
{
{
style=
{
{
color
:
'#1890FF'
,
color
:
'#1890FF'
,
fontSize
:
'25px'
,
fontSize
:
'25px'
,
marginTop
:
'4px'
,
// marginLeft: '51%',
marginLeft
:
'67%'
,
}
}
}
}
/>
/>
</
Tooltip
>
</
Tooltip
>
...
...
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