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
2e4a7dad
Commit
2e4a7dad
authored
Jun 02, 2022
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: admin不开发数据库操作权限,修改用户管理样式,正常模式跟沙箱都可正常显示
parent
f5fef0a2
Pipeline
#51934
passed with stages
in 9 minutes 6 seconds
Changes
12
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
307 additions
and
101 deletions
+307
-101
index.less
src/components/BasePageContainer/index.less
+24
-5
itemCard.less
src/components/CheckGroup/itemCard.less
+9
-9
index.jsx
src/pages/user/login/index.jsx
+1
-1
RoleManage.jsx
src/pages/userCenter/roleManage/RoleManage.jsx
+1
-1
RoleManage.less
src/pages/userCenter/roleManage/RoleManage.less
+59
-8
NewSelectUser.jsx
src/pages/userCenter/roleManage/SelectUser/NewSelectUser.jsx
+4
-2
SelectUser.less
src/pages/userCenter/roleManage/SelectUser/SelectUser.less
+34
-6
SiteManage.jsx
src/pages/userCenter/siteManage/SiteManage.jsx
+3
-3
SiteManage.less
src/pages/userCenter/siteManage/SiteManage.less
+39
-13
UserManage.jsx
src/pages/userCenter/userManage/UserManage.jsx
+42
-37
UserManage.less
src/pages/userCenter/userManage/UserManage.less
+87
-12
config.js
src/routes/config.js
+4
-4
No files found.
src/components/BasePageContainer/index.less
View file @
2e4a7dad
.ant-pro-basicLayout-content .ant-pro-page-container{
.ant-pro-basicLayout-content .ant-pro-page-container
{
margin:0
margin:
0
}
}
.ant-pro-page-container-children-content{
margin:0
.ant-pro-page-container-children-content {
margin: 0
}
}
.ant-layout .ant-layout-content{
.ant-layout .ant-layout-content {
margin: 0px !important;
margin: 0px !important;
}
}
.ant-pro-page-container {
height: 100%;
}
.ant-pro-grid-content {
height: 100%;
.ant-pro-grid-content-children {
height: 100%;
.ant-pro-page-container-children-content {
height: 100%;
}
}
}
\ No newline at end of file
src/components/CheckGroup/itemCard.less
View file @
2e4a7dad
...
@@ -48,13 +48,13 @@
...
@@ -48,13 +48,13 @@
}
}
.btnBox {
.btnBox {
position: sticky;
position: sticky;
bottom: 0px;
//
bottom: 0px;
right: 0px;
//
right: 0px;
background-color: #fff;
//
background-color: #fff;
width: 100%;
//
width: 100%;
height: 40px;
//
height: 40px;
padding: 0 20px;
//
padding: 0 20px;
display: flex;
//
display: flex;
justify-content: flex-end;
//
justify-content: flex-end;
align-items: center;
//
align-items: center;
}
}
src/pages/user/login/index.jsx
View file @
2e4a7dad
...
@@ -51,7 +51,7 @@ const Login = props => {
...
@@ -51,7 +51,7 @@ const Login = props => {
if
(
userMode
===
USER_MODE
.
SUPER
)
{
if
(
userMode
===
USER_MODE
.
SUPER
)
{
history
.
push
(
`/solution`
);
history
.
push
(
`/solution`
);
}
else
{
}
else
{
history
.
push
(
`/
dbm/dbInit
`
);
history
.
push
(
`/
authority/user
`
);
}
}
}
}
if
(
userMode
===
USER_MODE
.
COMMON
)
{
if
(
userMode
===
USER_MODE
.
COMMON
)
{
...
...
src/pages/userCenter/roleManage/RoleManage.jsx
View file @
2e4a7dad
...
@@ -782,7 +782,7 @@ const SiteManage = () => {
...
@@ -782,7 +782,7 @@ const SiteManage = () => {
</
div
>
</
div
>
<
hr
style=
{
{
width
:
'95%'
,
color
:
'#eeecec'
,
marginLeft
:
'15px'
}
}
/>
<
hr
style=
{
{
width
:
'95%'
,
color
:
'#eeecec'
,
marginLeft
:
'15px'
}
}
/>
{
treeData
&&
treeData
.
length
>
0
&&
(
{
treeData
&&
treeData
.
length
>
0
&&
(
<
div
style=
{
{
height
:
'calc(100
vh - 13
0px)'
,
overflowY
:
'scroll'
}
}
>
<
div
style=
{
{
height
:
'calc(100
% - 4
0px)'
,
overflowY
:
'scroll'
}
}
>
<
Tree
<
Tree
showIcon
showIcon
onSelect=
{
handleTreeSelect
}
onSelect=
{
handleTreeSelect
}
...
...
src/pages/userCenter/roleManage/RoleManage.less
View file @
2e4a7dad
.ant-spin-container {
height: 100%;
}
.cardBox {
.cardBox {
min-height: calc(100vh - 74px);
// min-height: calc(100vh - 74px);
max-height: calc(100vh - 74px);
// max-height: calc(100vh - 74px);
overflow-y: scroll;
height: 100%;
// overflow-y: scroll;
// overflow: auto;
// overflow: auto;
overflow: hidden;
overflow: hidden;
width: 320px;
width: 320px;
...
@@ -13,15 +18,22 @@
...
@@ -13,15 +18,22 @@
transition-property: width, left;
transition-property: width, left;
transition-duration: 0.5s;
transition-duration: 0.5s;
white-space: nowrap;
white-space: nowrap;
.ant-card-body {
height: 100%;
}
.ant-tree-node-content-wrapper {
.ant-tree-node-content-wrapper {
display: flex;
display: flex;
align-items: center;
align-items: center;
.ant-tree-iconEle {
.ant-tree-iconEle {
display: flex;
display: flex;
align-items: center;
align-items: center;
width: 18px;
width: 18px;
}
}
}
}
.switcher {
.switcher {
display: block;
display: block;
position: absolute;
position: absolute;
...
@@ -33,11 +45,13 @@
...
@@ -33,11 +45,13 @@
z-index: 1;
z-index: 1;
}
}
}
}
.hideBox {
.hideBox {
left: 0px;
left: 0px;
top: 0;
top: 0;
width: 26px;
width: 26px;
}
}
.hideH {
.hideH {
width: 100%;
width: 100%;
}
}
...
@@ -46,45 +60,57 @@
...
@@ -46,45 +60,57 @@
display: flex;
display: flex;
align-items: center;
align-items: center;
}
}
.treeTitle {
.treeTitle {
display: flex;
display: flex;
span {
span {
display: none;
display: none;
}
}
}
}
.treeTitle:hover {
.treeTitle:hover {
span {
span {
margin-left: 20px;
margin-left: 20px;
display: block;
display: block;
}
}
}
}
.titleBox {
.titleBox {
display: flex;
display: flex;
// flex-wrap: wrap;
// flex-wrap: wrap;
justify-content: space-around;
justify-content: space-around;
align-items: center;
align-items: center;
}
}
.cardBoxR {
.cardBoxR {
height: calc(100vh - 192px);
height: calc(100% - 36px);
min-width: 870px;
min-width: 870px;
overflow-y: scroll;
overflow-y: scroll;
}
}
.cardBoxRNew {
.cardBoxRNew {
height: calc(100vh - 160px);
// height: calc(100vh - 160px);
min-width: 870px;
height: 100%;
overflow-y: scroll;
// min-width: 870px;
// overflow-y: scroll;
}
}
.cardBoxH {
.cardBoxH {
height: calc(100vh - 151px);
// height: calc(100vh - 151px);
height: 100%;
min-width: 870px;
min-width: 870px;
overflow-y: scroll;
overflow-y: scroll;
}
}
:global {
:global {
.ant-tree-switcher {
.ant-tree-switcher {
display: flex;
display: flex;
align-items: center;
align-items: center;
margin-right: -8px;
margin-right: -8px;
margin-left: 5px;
margin-left: 5px;
// color:#1890FF;
// color:#1890FF;
.ant-tree-switcher-line-icon {
.ant-tree-switcher-line-icon {
// margin-left: 5px;
// margin-left: 5px;
...
@@ -105,27 +131,50 @@
...
@@ -105,27 +131,50 @@
.boxR {
.boxR {
width: 100%;
width: 100%;
height: 100%;
position: relative;
position: relative;
transition: width 2s;
transition: width 2s;
.ant-card {
height: 100%;
}
.ant-card-body {
height: 100%;
}
.ant-tabs {
height: 100%;
}
.ant-tabs-content {
height: 100%;
}
}
}
// .anticon-unordered-list{
// .anticon-unordered-list{
// vertical-align: 0.125em;
// vertical-align: 0.125em;
// color:#1890FF;
// color:#1890FF;
// }
// }
.content {
.content {
width: 100%;
width: 100%;
height: 100%;
display: flex;
display: flex;
position: relative;
position: relative;
}
}
.title {
.title {
display: flex;
display: flex;
align-items: center;
align-items: center;
justify-content: space-between;
justify-content: space-between;
width: 100%;
width: 100%;
}
}
.tip {
.tip {
display: none;
display: none;
}
}
.title:hover {
.title:hover {
.tip {
.tip {
display: flex;
display: flex;
...
@@ -134,10 +183,12 @@
...
@@ -134,10 +183,12 @@
width: 60%;
width: 60%;
}
}
}
}
.fs {
.fs {
font-size: 18px;
font-size: 18px;
margin-left: 10px;
margin-left: 10px;
}
}
.titleTop {
.titleTop {
width: 20rem;
width: 20rem;
overflow: hidden;
overflow: hidden;
...
...
src/pages/userCenter/roleManage/SelectUser/NewSelectUser.jsx
View file @
2e4a7dad
...
@@ -259,6 +259,7 @@ const NewSelectUser = props => {
...
@@ -259,6 +259,7 @@ const NewSelectUser = props => {
</
Button
>
</
Button
>
</
div
>
</
div
>
{
/* 复选框模块 */
}
{
/* 复选框模块 */
}
<
div
className=
{
styles
.
checkScrollBox
}
>
<
Spin
spinning=
{
loading
}
>
<
Spin
spinning=
{
loading
}
>
<
div
className=
{
styles
.
checkContainer
}
>
<
div
className=
{
styles
.
checkContainer
}
>
{
allList
.
map
((
item
,
index
)
=>
(
{
allList
.
map
((
item
,
index
)
=>
(
...
@@ -276,16 +277,17 @@ const NewSelectUser = props => {
...
@@ -276,16 +277,17 @@ const NewSelectUser = props => {
</
div
>
</
div
>
</
Spin
>
</
Spin
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
tableRight
}
>
<
div
className=
{
styles
.
tableRight
}
>
<
Table
<
Table
bordered
bordered
style=
{
{
width
:
'400px'
,
overflowX
:
'hidden'
}
}
style=
{
{
width
:
'400px'
,
height
:
'100%'
,
overflowX
:
'hidden'
}
}
rowKey=
{
record
=>
record
.
value
}
rowKey=
{
record
=>
record
.
value
}
columns=
{
columns
}
columns=
{
columns
}
dataSource=
{
checkList
}
dataSource=
{
checkList
}
pagination=
{
false
}
pagination=
{
false
}
size=
"small"
size=
"small"
scroll=
{
{
y
:
'cal
a(100vh - 257
px)'
}
}
scroll=
{
{
y
:
'cal
c(100% - 40
px)'
}
}
/>
/>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
src/pages/userCenter/roleManage/SelectUser/SelectUser.less
View file @
2e4a7dad
.pushTestContent {
.pushTestContent {
display: flex;
display: flex;
height: calc(100% - 75px);
.searchHeader {
.searchHeader {
display: flex;
display: flex;
}
}
.checkContainer {
height: calc(100vh - 300px);
.checkScrollBox {
width: 100%;
overflow-y: scroll;
overflow-y: scroll;
height: calc(100% - 82px);
margin: 20px 0;
margin: 20px 0;
padding-right: 5px;
padding-right: 5px;
.checkContainer {
width: 100%;
.checkContent {
.checkContent {
display: flex;
display: flex;
width: 100%;
width: 100%;
...
@@ -18,23 +24,29 @@
...
@@ -18,23 +24,29 @@
margin-top: 20px;
margin-top: 20px;
min-height: 50px;
min-height: 50px;
padding: 0 10px 10px 20px;
padding: 0 10px 10px 20px;
.ant-checkbox-wrapper {
.ant-checkbox-wrapper {
background-color: #fff;
background-color: #fff;
}
}
.topCheckbox {
.topCheckbox {
height: 20px;
height: 20px;
margin: -10px 0 0 0px;
margin: -10px 0 0 0px;
line-height: 20px;
line-height: 20px;
}
}
.topCheckbox > label :hover {
.topCheckbox>label :hover {
font-weight: 600;
font-weight: 600;
}
}
.bottomCheckbox {
.bottomCheckbox {
margin-top: 10px;
margin-top: 10px;
.ant-checkbox-wrapper {
.ant-checkbox-wrapper {
min-width: 150px;
min-width: 150px;
margin-left: 0;
margin-left: 0;
}
}
// .ant-checkbox-group-item {
// .ant-checkbox-group-item {
// min-width: 150px !important;
// min-width: 150px !important;
// }
// }
...
@@ -42,19 +54,34 @@
...
@@ -42,19 +54,34 @@
// min-width: 150px !important;
// min-width: 150px !important;
// }
// }
}
}
.checkdiv {
.checkdiv {
display: flex;
display: flex;
flex-wrap: wrap;
flex-wrap: wrap;
}
}
}
}
}
}
}
.leftContent {
.leftContent {
width:
7
0%;
width:
10
0%;
}
}
.tableRight {
.tableRight {
margin-left: 10px;
margin-left: 10px;
height: 100%;
.ant-spin-nested-loading {
height: 100%;
.ant-table {
height: 100%;
.ant-table-container {
height: 100%;
}
}
}
}
}
.ant-table-body {
.ant-table-body {
height: calc(100vh - 290px);
//
height: calc(100vh - 290px);
}
}
}
}
\ No newline at end of file
src/pages/userCenter/siteManage/SiteManage.jsx
View file @
2e4a7dad
...
@@ -685,7 +685,7 @@ const SiteManageV2 = () => {
...
@@ -685,7 +685,7 @@ const SiteManageV2 = () => {
/>
/>
</
Tooltip
>
</
Tooltip
>
{
treeData
.
length
>
0
&&
(
{
treeData
.
length
>
0
&&
(
<
div
style=
{
{
height
:
'
calc(100vh - 120px)
'
,
overflowY
:
'scroll'
}
}
>
<
div
style=
{
{
height
:
'
100%
'
,
overflowY
:
'scroll'
}
}
>
<
Tree
<
Tree
showIcon=
"true"
showIcon=
"true"
showLine=
{
{
showLeafIcon
:
false
}
}
showLine=
{
{
showLeafIcon
:
false
}
}
...
@@ -770,7 +770,7 @@ const SiteManageV2 = () => {
...
@@ -770,7 +770,7 @@ const SiteManageV2 = () => {
<
Button
onClick=
{
restButton
}
>
重置
</
Button
>
<
Button
onClick=
{
restButton
}
>
重置
</
Button
>
</
Card
>
</
Card
>
<
div
style=
{
{
background
:
'#fff'
}
}
>
<
div
style=
{
{
background
:
'#fff'
,
height
:
'calc(100% - 64px)'
,
paddingBottom
:
'10px'
}
}
>
<
Spin
spinning=
{
checkLoading
}
tip=
"loading..."
>
<
Spin
spinning=
{
checkLoading
}
tip=
"loading..."
>
<
Card
<
Card
className=
{
classnames
({
className=
{
classnames
({
...
@@ -782,7 +782,7 @@ const SiteManageV2 = () => {
...
@@ -782,7 +782,7 @@ const SiteManageV2 = () => {
style=
{
{
style=
{
{
display
:
'flex'
,
display
:
'flex'
,
flexDirection
:
'column '
,
flexDirection
:
'column '
,
height
:
'
calc(100vh - 240px)
'
,
height
:
'
100%
'
,
}
}
}
}
>
>
{
/* <Checkbox className={styles.siteAll}>全选/反选</Checkbox> */
}
{
/* <Checkbox className={styles.siteAll}>全选/反选</Checkbox> */
}
...
...
src/pages/userCenter/siteManage/SiteManage.less
View file @
2e4a7dad
...
@@ -42,12 +42,12 @@
...
@@ -42,12 +42,12 @@
line-height: 1;
line-height: 1;
}
}
.ant-dropdown-menu-item
>
.anticon:first-child {
.ant-dropdown-menu-item
>
.anticon:first-child {
vertical-align: 0.15em !important;
vertical-align: 0.15em !important;
}
}
.ant-table-tbody {
.ant-table-tbody {
.ant-table-row:hover
>
td {
.ant-table-row:hover
>
td {
background: #aed8fa !important;
background: #aed8fa !important;
}
}
}
}
...
@@ -90,10 +90,12 @@
...
@@ -90,10 +90,12 @@
.ant-card-body {
.ant-card-body {
padding: 15px;
padding: 15px;
}
}
.ant-spin-container {
.ant-spin-container {
// overflow-y: scroll;
// overflow-y: scroll;
// height: calc(100vh - 410px);
// height: calc(100vh - 410px);
}
}
.ant-tree-treenode {
.ant-tree-treenode {
width: 100% !important;
width: 100% !important;
...
@@ -112,7 +114,7 @@
...
@@ -112,7 +114,7 @@
}
}
.ant-tree-treenode:hover {
.ant-tree-treenode:hover {
.iconWraper1
>
span {
.iconWraper1
>
span {
margin-left: 12px;
margin-left: 12px;
font-size: 18px;
font-size: 18px;
display: inline-block;
display: inline-block;
...
@@ -123,9 +125,11 @@
...
@@ -123,9 +125,11 @@
display: flex;
display: flex;
width: 100%;
width: 100%;
position: relative;
position: relative;
height: 100%;
.orgContainer {
.orgContainer {
height: calc(100vh - 74px);
// height: calc(100vh - 74px);
height: 100%;
width: 320px;
width: 320px;
padding-right: 10px;
padding-right: 10px;
left: 0;
left: 0;
...
@@ -136,6 +140,11 @@
...
@@ -136,6 +140,11 @@
transition-property: width, left;
transition-property: width, left;
transition-duration: 0.5s;
transition-duration: 0.5s;
white-space: nowrap;
white-space: nowrap;
padding-bottom: 10px;
.ant-card-body {
height: 100%;
}
.ant-tree {
.ant-tree {
padding-top: 6px;
padding-top: 6px;
...
@@ -171,7 +180,7 @@
...
@@ -171,7 +180,7 @@
}
}
.userContainer {
.userContainer {
height:
calc(100vh - 74px) !important
;
height:
100%
;
z-index: 999;
z-index: 999;
min-width: 800px;
min-width: 800px;
background: white;
background: white;
...
@@ -242,17 +251,27 @@
...
@@ -242,17 +251,27 @@
//机构编辑面板
//机构编辑面板
.boxR {
.boxR {
width: 100%;
width: 100%;
height: 100%;
position: relative;
position: relative;
transition: width 2s;
transition: width 2s;
.ant-spin-nested-loading {
height: calc(100% - 50px);
}
.ant-card-body {
height: 100%;
}
}
}
.cardBoxR {
.cardBoxR {
min-height: calc(100vh - 210px);
// min-height: calc(100vh - 210px);
max-height: calc(100vh - 210px);
// max-height: calc(100vh - 210px);
height: 100%;
min-width: 600px;
min-width: 600px;
}
}
.siteCheckbox .ant-collapse-content
>
.ant-collapse-content-box {
.siteCheckbox .ant-collapse-content
>
.ant-collapse-content-box {
padding: 16px 16px 0;
padding: 16px 16px 0;
}
}
...
@@ -264,6 +283,7 @@
...
@@ -264,6 +283,7 @@
white-space: nowrap;
white-space: nowrap;
text-overflow: ellipsis;
text-overflow: ellipsis;
}
}
.siteListTitle {
.siteListTitle {
width: 199px;
width: 199px;
// margin:0 0 15px 0;
// margin:0 0 15px 0;
...
@@ -272,6 +292,7 @@
...
@@ -272,6 +292,7 @@
white-space: nowrap;
white-space: nowrap;
text-overflow: ellipsis;
text-overflow: ellipsis;
}
}
.sitePanel {
.sitePanel {
margin: 0 0 10px 0;
margin: 0 0 10px 0;
}
}
...
@@ -299,7 +320,7 @@
...
@@ -299,7 +320,7 @@
overflow: auto;
overflow: auto;
}
}
.sitePanel .ant-checkbox-wrapper
+
.ant-checkbox-wrapper {
.sitePanel .ant-checkbox-wrapper
+
.ant-checkbox-wrapper {
margin: 0;
margin: 0;
}
}
...
@@ -324,6 +345,7 @@
...
@@ -324,6 +345,7 @@
border: 1px solid #f5f5f5;
border: 1px solid #f5f5f5;
overflow: auto;
overflow: auto;
.siteSelectUl {
.siteSelectUl {
margin: 0;
margin: 0;
padding: 15px;
padding: 15px;
...
@@ -334,8 +356,7 @@
...
@@ -334,8 +356,7 @@
li {
li {
height: 35px;
height: 35px;
line-height: 35px;
line-height: 35px;
background: rgba(24, 144, 255, 0.16) url('../../../assets/images/icons/close.png') no-repeat
background: rgba(24, 144, 255, 0.16) url('../../../assets/images/icons/close.png') no-repeat 170px;
170px;
background-size: 20px;
background-size: 20px;
background-position: center right;
background-position: center right;
margin: 0 10px 10px 0;
margin: 0 10px 10px 0;
...
@@ -348,8 +369,7 @@
...
@@ -348,8 +369,7 @@
}
}
}
}
.siteline {
.siteline {}
}
.siteBtn {
.siteBtn {
width: 100%;
width: 100%;
...
@@ -383,14 +403,17 @@
...
@@ -383,14 +403,17 @@
height: 50vh;
height: 50vh;
}
}
}
}
.title {
.title {
display: flex;
display: flex;
align-items: center;
align-items: center;
width: 100%;
width: 100%;
}
}
.tip {
.tip {
display: none;
display: none;
}
}
.title:hover {
.title:hover {
.tip {
.tip {
display: flex;
display: flex;
...
@@ -399,16 +422,19 @@
...
@@ -399,16 +422,19 @@
width: 40%;
width: 40%;
}
}
}
}
.titleText {
.titleText {
width: 12rem;
width: 12rem;
overflow: hidden;
overflow: hidden;
white-space: nowrap;
white-space: nowrap;
text-overflow: ellipsis;
text-overflow: ellipsis;
}
}
.fs {
.fs {
font-size: 18px;
font-size: 18px;
margin-left: 10px;
margin-left: 10px;
}
}
.titleTop {
.titleTop {
width: 12rem;
width: 12rem;
overflow: hidden;
overflow: hidden;
...
...
src/pages/userCenter/userManage/UserManage.jsx
View file @
2e4a7dad
/* eslint-disable eqeqeq */
/* eslint-disable eqeqeq */
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
import
{
// Tree,
// Tree,
Table
,
Table
,
...
@@ -164,6 +164,8 @@ const UserManage = () => {
...
@@ -164,6 +164,8 @@ const UserManage = () => {
const
[
menuID
,
setMenuID
]
=
useState
(
''
);
// 选中的树IDs
const
[
menuID
,
setMenuID
]
=
useState
(
''
);
// 选中的树IDs
const
[
keepId
,
setKeepId
]
=
useState
(
''
);
const
[
keepId
,
setKeepId
]
=
useState
(
''
);
const
[
flag
,
setFlag
]
=
useState
(
1
);
// 刷新标志
const
[
flag
,
setFlag
]
=
useState
(
1
);
// 刷新标志
const
userContainer
=
useRef
();
const
flagRef
=
useRef
(
1
);
const
setRowClassName
=
record
=>
const
setRowClassName
=
record
=>
record
.
userID
===
selectColor
.
userID
?
styles
.
clickRowStyle
:
''
;
record
.
userID
===
selectColor
.
userID
?
styles
.
clickRowStyle
:
''
;
// 用户表列名
// 用户表列名
...
@@ -367,6 +369,28 @@ const UserManage = () => {
...
@@ -367,6 +369,28 @@ const UserManage = () => {
setExpendKey
(
menuID
);
setExpendKey
(
menuID
);
console
.
log
(
expendKey
);
console
.
log
(
expendKey
);
},
[
menuID
]);
},
[
menuID
]);
// 获取用户机构树
useEffect
(()
=>
{
window
.
addEventListener
(
'resize'
,
resizeListener
);
updateTrees
();
return
()
=>
{
window
.
removeEventListener
(
'resize'
,
resizeListener
);
};
},
[]);
// 更新获取初始范围
useEffect
(()
=>
{
getOrgArea
().
then
(
res
=>
{
if
(
res
.
msg
===
'Ok'
)
{
console
.
log
(
res
);
setOrgAreas
(
res
.
Results
);
}
});
},
[
saveExtentFlag
]);
const
resizeListener
=
()
=>
{
flagRef
.
current
+=
1
;
setFlag
(
flagRef
.
current
);
};
// 模糊查询匹配的样式
// 模糊查询匹配的样式
const
searchStyle
=
val
=>
{
const
searchStyle
=
val
=>
{
let
n
;
let
n
;
...
@@ -570,20 +594,6 @@ const UserManage = () => {
...
@@ -570,20 +594,6 @@ const UserManage = () => {
});
});
};
};
// 获取用户机构树
useEffect
(()
=>
{
updateTrees
();
},
[]);
// 更新获取初始范围
useEffect
(()
=>
{
getOrgArea
().
then
(
res
=>
{
if
(
res
.
msg
===
'Ok'
)
{
console
.
log
(
res
);
setOrgAreas
(
res
.
Results
);
}
});
},
[
saveExtentFlag
]);
// 点击树节点,获取当前机构下所有用户
// 点击树节点,获取当前机构下所有用户
const
onSelect
=
(
props
,
e
)
=>
{
const
onSelect
=
(
props
,
e
)
=>
{
console
.
log
(
props
);
console
.
log
(
props
);
...
@@ -1242,13 +1252,13 @@ const UserManage = () => {
...
@@ -1242,13 +1252,13 @@ const UserManage = () => {
};
};
// 更改机构范围
// 更改机构范围
const
submitExtent
=
(
extent
,
areaName
,
flag
)
=>
{
const
submitExtent
=
(
extent
,
areaName
,
flag
s
)
=>
{
setTreeLoading
(
true
);
setTreeLoading
(
true
);
console
.
log
(
extent
);
console
.
log
(
extent
);
console
.
log
(
areaName
);
console
.
log
(
areaName
);
console
.
log
(
flag
);
console
.
log
(
flag
s
);
console
.
log
(
currentSelectOrg1
);
console
.
log
(
currentSelectOrg1
);
if
(
flag
===
0
)
{
if
(
flag
s
===
0
)
{
setTreeLoading
(
false
);
setTreeLoading
(
false
);
notification
.
warn
({
notification
.
warn
({
message
:
'提交失败'
,
message
:
'提交失败'
,
...
@@ -1400,19 +1410,21 @@ const UserManage = () => {
...
@@ -1400,19 +1410,21 @@ const UserManage = () => {
const
kee
=
()
=>
{
const
kee
=
()
=>
{
setUserVisible
(
false
);
setUserVisible
(
false
);
};
};
console
.
log
(
userContainer
.
current
?.
clientHeight
,
'userContainer.current.clientHeight'
);
return
(
return
(
<
PageContainer
className=
{
styles
.
userManageContainer
}
>
<
PageContainer
className=
{
styles
.
userManageContainer
}
>
<
div
className=
{
styles
.
contentContainer
}
>
<
div
className=
{
styles
.
contentContainer
}
>
{
/* 左侧机构树 */
}
{
/* 左侧机构树 */
}
<
Spin
spinning=
{
treeLoading
}
tip=
"loading..."
>
<
Spin
spinning=
{
treeLoading
}
tip=
"loading..."
>
<
Card
<
Card
style=
{
{
overflowY
:
'hidden'
}
}
style=
{
{
overflowY
:
'hidden'
,
height
:
'100%'
}
}
className=
{
classnames
({
className=
{
classnames
({
[
styles
.
orgContainer
]:
true
,
[
styles
.
orgContainer
]:
true
,
[
styles
.
orgContainerHide
]:
!
treeVisible
,
[
styles
.
orgContainerHide
]:
!
treeVisible
,
})
}
})
}
>
>
<
div
>
<
div
style=
{
{
display
:
'flex'
,
flexDirection
:
'column'
,
height
:
'100%'
}
}
>
<
div
style=
{
{
display
:
'flex'
}
}
>
<
span
<
span
style=
{
{
style=
{
{
fontSize
:
'15px '
,
fontSize
:
'15px '
,
...
@@ -1433,9 +1445,10 @@ const UserManage = () => {
...
@@ -1433,9 +1445,10 @@ const UserManage = () => {
}
}
}
}
/>
/>
</
Tooltip
>
</
Tooltip
>
</
div
>
<
hr
style=
{
{
width
:
'95%'
,
color
:
'#eeecec'
,
marginLeft
:
'15px'
}
}
/>
<
hr
style=
{
{
width
:
'95%'
,
color
:
'#eeecec'
,
marginLeft
:
'15px'
}
}
/>
{
treeData
.
length
>
0
&&
(
{
treeData
.
length
>
0
&&
(
<
div
style=
{
{
height
:
'
calc(100vh - 130px)
'
,
overflowY
:
'scroll'
}
}
>
<
div
style=
{
{
height
:
'
100%
'
,
overflowY
:
'scroll'
}
}
>
<
Tree
<
Tree
showIcon=
"true"
showIcon=
"true"
blockNode
blockNode
...
@@ -1468,6 +1481,7 @@ const UserManage = () => {
...
@@ -1468,6 +1481,7 @@ const UserManage = () => {
{
/* 右侧用户表 */
}
{
/* 右侧用户表 */
}
<
div
<
div
ref=
{
userContainer
}
className=
{
classnames
({
className=
{
classnames
({
[
styles
.
userContainer
]:
true
,
[
styles
.
userContainer
]:
true
,
})
}
})
}
...
@@ -1500,20 +1514,9 @@ const UserManage = () => {
...
@@ -1500,20 +1514,9 @@ const UserManage = () => {
</
Dropdown
>
</
Dropdown
>
</
span
>
</
span
>
</
div
>
</
div
>
{
/* <div
{
userContainer
.
current
&&
(
className={classnames({
[styles.boxR]: true,
[styles.boxH]: treeVisible,
})}
>
<div
className={classnames({
[styles.cardBoxR]: true,
[styles.boxH]: treeVisible,
})}
> */
}
<
Table
<
Table
// style={{ width: treeVisible ? '81%' : '100%
' }}
// style=
{{
height
:
'
calc
(100%
-50
px
)
'
}}
rowSelection=
{
{
rowSelection=
{
{
type
:
'checkbox'
,
type
:
'checkbox'
,
...
rowSelection
,
...
rowSelection
,
...
@@ -1526,7 +1529,10 @@ const UserManage = () => {
...
@@ -1526,7 +1529,10 @@ const UserManage = () => {
columns=
{
columns
}
columns=
{
columns
}
dataSource=
{
tableData
}
dataSource=
{
tableData
}
loading=
{
tableLoading
}
loading=
{
tableLoading
}
scroll=
{
{
x
:
'max-content'
,
y
:
'calc(100vh - 210px)'
}
}
scroll=
{
{
x
:
'max-content'
,
y
:
`calc(${userContainer.current.clientHeight}px - 150px)`
,
}
}
// scroll=
{{
x
:
'
max
-
content
'
}}
// scroll=
{{
x
:
'
max
-
content
'
}}
pagination=
{
{
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
...
@@ -1537,8 +1543,7 @@ const UserManage = () => {
...
@@ -1537,8 +1543,7 @@ const UserManage = () => {
}
}
}
}
onChange=
{
onChangeInput
}
onChange=
{
onChangeInput
}
/>
/>
{
/* </div>
)
}
</div> */
}
</
div
>
</
div
>
{
/* Modal弹框 */
}
{
/* Modal弹框 */
}
...
...
src/pages/userCenter/userManage/UserManage.less
View file @
2e4a7dad
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
background: rgba(74, 74, 75, 0.3);
background: rgba(74, 74, 75, 0.3);
margin-bottom: 10px;
margin-bottom: 10px;
}
}
//滚动条的轨道(里面装有thumb)滚动槽
//滚动条的轨道(里面装有thumb)滚动槽
::-webkit-scrollbar-track {
::-webkit-scrollbar-track {
box-shadow: 0;
box-shadow: 0;
...
@@ -22,6 +23,7 @@
...
@@ -22,6 +23,7 @@
.ant-tree-node-content-wrapper {
.ant-tree-node-content-wrapper {
width: 100%;
width: 100%;
// overflow: hidden !important;
// overflow: hidden !important;
.ant-tree-title {
.ant-tree-title {
overflow: hidden;
overflow: hidden;
...
@@ -31,50 +33,63 @@
...
@@ -31,50 +33,63 @@
justify-content: space-between;
justify-content: space-between;
}
}
}
}
.ant-pagination-prev,
.ant-pagination-prev,
.ant-pagination-next {
.ant-pagination-next {
line-height: 8px !important;
line-height: 8px !important;
}
}
.ant-input-search-button {
.ant-input-search-button {
line-height: 1;
line-height: 1;
}
}
.ant-dropdown-menu-item > .anticon:first-child {
.ant-dropdown-menu-item>.anticon:first-child {
vertical-align: 0.15em !important;
vertical-align: 0.15em !important;
}
}
.ant-table-tbody {
.ant-table-tbody {
.ant-table-row:hover
>
td {
.ant-table-row:hover
>
td {
background: #aed8fa !important;
background: #aed8fa !important;
}
}
}
}
.ant-modal-close-icon {
.ant-modal-close-icon {
vertical-align: 0.3em;
vertical-align: 0.3em;
}
}
.ant-notification-close-icon {
.ant-notification-close-icon {
vertical-align: 0.2em;
vertical-align: 0.2em;
}
}
.ant-tree-switcher-icon svg {
.ant-tree-switcher-icon svg {
font-size: 14px;
font-size: 14px;
color: #767777 !important;
color: #767777 !important;
}
}
.ant-card-body {
.ant-card-body {
padding: 12px 24px 24px 10px;
padding: 12px 24px 24px 10px;
}
}
}
}
.redText {
.redText {
color: red;
color: red;
cursor: pointer;
cursor: pointer;
}
}
.ant-layout {
.ant-layout {
overflow: auto;
overflow: auto;
.ant-layout-content {
.ant-layout-content {
margin: 12px !important;
margin: 12px !important;
}
}
}
}
.ant-btn > .anticon + span,
.ant-btn > span + .anticon {
.ant-btn>.anticon+span,
.ant-btn>span+.anticon {
margin-left: 8px;
margin-left: 8px;
vertical-align: middle;
vertical-align: middle;
}
}
.siteTitle {
.siteTitle {
font-size: 16px;
font-size: 16px;
margin: 0 0 6px 0;
margin: 0 0 6px 0;
...
@@ -82,25 +97,33 @@
...
@@ -82,25 +97,33 @@
padding: 3px;
padding: 3px;
border-bottom: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}
}
.userManageContainer {
.userManageContainer {
height: 100%;
.ant-modal-footer {
.ant-modal-footer {
border: none;
border: none;
padding: 28px 40px;
padding: 28px 40px;
height: 100%;
}
}
.ant-form-item {
.ant-form-item {
vertical-align: top;
vertical-align: top;
}
}
.ant-form-item-label > label {
.ant-form-item-label>label {
align-items: middle;
align-items: middle;
}
}
.ant-modal-body {
.ant-modal-body {
padding-bottom: 0px;
padding-bottom: 0px;
padding-right: 40px;
padding-right: 40px;
padding-left: 40px;
padding-left: 40px;
.ant-form {
.ant-form {
width: 90%;
width: 90%;
}
}
}
}
// .anticon svg {
// .anticon svg {
// margin-top: -3px;
// margin-top: -3px;
// }
// }
...
@@ -110,8 +133,10 @@
...
@@ -110,8 +133,10 @@
color: rgba(0, 0, 0, 0.85);
color: rgba(0, 0, 0, 0.85);
font-size: 14px;
font-size: 14px;
}
}
.ant-tree-treenode {
.ant-tree-treenode {
width: 100% !important;
width: 100% !important;
.ant-tree-node-content-wrapper {
.ant-tree-node-content-wrapper {
display: inline-block;
display: inline-block;
width: 100%;
width: 100%;
...
@@ -119,33 +144,45 @@
...
@@ -119,33 +144,45 @@
.iconWraper1 {
.iconWraper1 {
float: right;
float: right;
span {
span {
display: none;
display: none;
}
}
}
}
}
}
.ant-tree-treenode:hover {
.ant-tree-treenode:hover {
.iconWraper1
>
span {
.iconWraper1
>
span {
margin-left: 12px;
margin-left: 12px;
font-size: 18px;
font-size: 18px;
display: inline-block;
display: inline-block;
}
}
}
}
.ant-radio-group {
.ant-radio-group {
margin: 0px !important;
margin: 0px !important;
}
}
.contentContainer {
.contentContainer {
display: flex;
display: flex;
width: 100%;
width: 100%;
height: 100%;
position: relative;
position: relative;
// .ant-table.ant-table-bordered > .ant-table-container {
// .ant-table.ant-table-bordered > .ant-table-container {
// min-width: 81%;
// min-width: 81%;
// }
// }
.ant-tree-switcher_close .ant-tree-switcher-icon svg {
.ant-tree-switcher_close .ant-tree-switcher-icon svg {
margin: auto;
margin: auto;
}
}
.ant-spin-container {
height: 100%;
}
.orgContainer {
.orgContainer {
height: calc(100vh - 74px);
// height: calc(100vh - 74px);
height: 100%;
width: 320px;
width: 320px;
padding-right: 10px;
padding-right: 10px;
left: 0;
left: 0;
...
@@ -156,17 +193,23 @@
...
@@ -156,17 +193,23 @@
transition-property: width;
transition-property: width;
transition-duration: 0.5s;
transition-duration: 0.5s;
white-space: nowrap;
white-space: nowrap;
.ant-card-body {
height: 100%;
}
.ant-tree {
.ant-tree {
padding-top: 6px;
padding-top: 6px;
.ant-tree-switcher {
.ant-tree-switcher {
line-height: 1;
line-height: 1;
margin-right: 0px !important;
margin-right: 0px !important;
color: #1890ff;
color: #1890ff;
.ant-tree-switcher-line-icon {
.ant-tree-switcher-line-icon {
margin-left: 5px;
margin-left: 5px;
}
}
}
}
}
}
.switcher {
.switcher {
display: block;
display: block;
position: absolute;
position: absolute;
...
@@ -183,27 +226,33 @@
...
@@ -183,27 +226,33 @@
// transform: translateX(-230px);
// transform: translateX(-230px);
width: 26px;
width: 26px;
}
}
.ant-popover-message-title {
.ant-popover-message-title {
padding-left: 20px;
padding-left: 20px;
}
}
.title1 {
.title1 {
display: flex;
display: flex;
align-items: center;
align-items: center;
width: 100%;
width: 100%;
}
}
.tip1 {
.tip1 {
display: none;
display: none;
}
}
.fs1 {
.fs1 {
font-size: 18px;
font-size: 18px;
margin-left: 10px;
margin-left: 10px;
}
}
.listHover {
.listHover {
display: flex;
display: flex;
align-items: center;
align-items: center;
justify-content: flex-end;
justify-content: flex-end;
width: 25%;
width: 25%;
}
}
.title1:hover {
.title1:hover {
.tip1 {
.tip1 {
display: flex;
display: flex;
...
@@ -212,23 +261,28 @@
...
@@ -212,23 +261,28 @@
width: 25%;
width: 25%;
}
}
}
}
.titleText {
.titleText {
width: 20rem;
width: 20rem;
overflow: hidden;
overflow: hidden;
white-space: nowrap;
white-space: nowrap;
text-overflow: ellipsis;
text-overflow: ellipsis;
}
}
.userContainerHide {
.userContainerHide {
width: 100%;
width: 100%;
}
}
.userContainer {
.userContainer {
height: calc(100vh - 74px) !important;
// height: calc(100vh - 74px) !important;
height: 100%;
z-index: 999;
z-index: 999;
background: white;
background: white;
min-width: 800px;
min-width: 800px;
width: 100%;
width: 100%;
position: relative;
position: relative;
transition: width 0.5s;
transition: width 0.5s;
.title {
.title {
margin: 16px 0 10px 16px;
margin: 16px 0 10px 16px;
display: inline-block;
display: inline-block;
...
@@ -238,6 +292,7 @@
...
@@ -238,6 +292,7 @@
text-overflow: ellipsis;
text-overflow: ellipsis;
white-space: nowrap;
white-space: nowrap;
}
}
.ant-table-pagination {
.ant-table-pagination {
padding-right: 12px;
padding-right: 12px;
background: white;
background: white;
...
@@ -245,61 +300,76 @@
...
@@ -245,61 +300,76 @@
padding: 8px;
padding: 8px;
padding-right: 20px;
padding-right: 20px;
}
}
.ant-btn {
.ant-btn {
margin: 0px 10px;
margin: 0px 10px;
.ant-btn-primary {
.ant-btn-primary {
background: #50aefc;
background: #50aefc;
}
}
}
}
.ant-input-search-button {
.ant-input-search-button {
margin-left: 0px !important;
margin-left: 0px !important;
}
}
.ant-table-thead tr th {
.ant-table-thead tr th {
font-weight: 600;
font-weight: 600;
color: rgba(0, 0, 0, 0.85);
color: rgba(0, 0, 0, 0.85);
}
}
.ant-table-cell {
.ant-table-cell {
text-align: center;
text-align: center;
overflow: hidden;
overflow: hidden;
// text-overflow:ellipsis;
// text-overflow:ellipsis;
white-space: nowrap;
white-space: nowrap;
}
}
.ant-table-body {
.ant-table-body {
height: calc(100vh - 210px);
// height: calc(100vh - 210px);
// height: 100%;
border-right: white;
border-right: white;
overflow: auto !important;
//
overflow: auto !important;
}
}
.clickRowStyle {
.clickRowStyle {
background: #cfe7fd;
background: #cfe7fd;
}
}
.ant-pagination {
.ant-pagination {
z-index: 999;
z-index: 999;
border-top: 1px solid #f0eded;
border-top: 1px solid #f0eded;
}
}
}
}
}
}
.boxR {
.boxR {
width: 100%;
width: 100%;
position: relative;
position: relative;
transition: width 2s;
transition: width 2s;
}
}
.cardBoxR {
.cardBoxR {
min-width: 800px;
min-width: 800px;
}
}
.ant-modal-root {
.ant-modal-root {
.ant-tree-switcher {
.ant-tree-switcher {
line-height: 1;
line-height: 1;
color: #1890ff;
color: #1890ff;
}
}
.ant-checkbox-group .ant-checkbox-group-item {
.ant-checkbox-group .ant-checkbox-group-item {
margin-right: 0px !important;
margin-right: 0px !important;
min-width: 200px !important;
min-width: 200px !important;
}
}
.ant-tree-list-holder {
.ant-tree-list-holder {
overflow: auto;
overflow: auto;
overflow-x: hidden;
overflow-x: hidden;
height: 40vh;
height: 40vh;
}
}
.ant-tabs-content-holder {
.ant-tabs-content-holder {
overflow: auto;
overflow: auto;
height: 50vh;
height: 50vh;
...
@@ -310,19 +380,22 @@
...
@@ -310,19 +380,22 @@
.ant-modal-content {
.ant-modal-content {
border-radius: 5px;
border-radius: 5px;
}
}
.ant-modal-header {
.ant-modal-header {
border-radius: 5px 5px 0 0;
border-radius: 5px 5px 0 0;
padding: 28px 40px;
padding: 28px 40px;
}
}
.ant-modal-close {
.ant-modal-close {
top: 14px;
top: 14px;
right: 20px;
right: 20px;
}
}
.ant-modal-footer .ant-btn
+
.ant-btn:not(.ant-dropdown-trigger) {
.ant-modal-footer .ant-btn
+
.ant-btn:not(.ant-dropdown-trigger) {
margin-bottom: 0;
margin-bottom: 0;
margin-left: 15px;
margin-left: 15px;
}
}
// .ant-form-horizontal .ant-form-item-control {
// .ant-form-horizontal .ant-form-item-control {
// margin-left: 10px;
// margin-left: 10px;
// }
// }
...
@@ -331,13 +404,15 @@
...
@@ -331,13 +404,15 @@
border-radius: 10px;
border-radius: 10px;
background-color: rgba(255, 255, 255, 0.788);
background-color: rgba(255, 255, 255, 0.788);
}
}
.ant-popover-inner-content {
.ant-popover-inner-content {
padding: 10px 10px;
padding: 10px 10px;
}
}
.ant-popover-message
>
.anticon {
.ant-popover-message
>
.anticon {
top: 7.0005px;
top: 7.0005px;
}
}
// .ant-tree {
// .ant-tree {
// overflow-y: scroll;
// overflow-y: scroll;
// height: calc(100vh - 150px);
// height: calc(100vh - 150px);
...
...
src/routes/config.js
View file @
2e4a7dad
...
@@ -97,24 +97,24 @@ export default {
...
@@ -97,24 +97,24 @@ export default {
name
:
'数据库'
,
name
:
'数据库'
,
icon
:
<
DatabaseOutlined
style
=
{
iconStyle
}
/>
,
icon
:
<
DatabaseOutlined
style
=
{
iconStyle
}
/>
,
component
:
BlankLayout
,
component
:
BlankLayout
,
authority
:
admin
Authority
,
authority
:
super
Authority
,
routes
:
[
routes
:
[
{
{
path
:
'/dbm/dbInit'
,
path
:
'/dbm/dbInit'
,
name
:
'数据库连接'
,
name
:
'数据库连接'
,
authority
:
admin
Authority
,
authority
:
super
Authority
,
component
:
InitDataBase
,
component
:
InitDataBase
,
},
},
{
{
path
:
'/dbm/dbUpdate'
,
path
:
'/dbm/dbUpdate'
,
name
:
'数据库升级'
,
name
:
'数据库升级'
,
authority
:
admin
Authority
,
authority
:
super
Authority
,
component
:
ManagementDataBase
,
component
:
ManagementDataBase
,
},
},
{
{
path
:
'/dbm/dbSource'
,
path
:
'/dbm/dbSource'
,
name
:
'多数据源'
,
name
:
'多数据源'
,
authority
:
admin
Authority
,
authority
:
super
Authority
,
component
:
DatabaseConnectConfig
,
component
:
DatabaseConnectConfig
,
},
},
],
],
...
...
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