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
f93fa131
Commit
f93fa131
authored
Nov 24, 2020
by
Maofei94
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: a perf
parent
9d4878eb
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
12 deletions
+40
-12
index.jsx
src/components/CheckGroup/index.jsx
+1
-1
MongDBTable.jsx
src/pages/database/databaseConfig/mongDB/MongDBTable.jsx
+1
-1
index.js
src/pages/mobileConfig/index.js
+12
-3
RoleManage.jsx
src/pages/userCenter/roleManage/RoleManage.jsx
+11
-5
RoleManage.less
src/pages/userCenter/roleManage/RoleManage.less
+9
-1
api.js
src/services/mobileConfig/api.js
+6
-1
No files found.
src/components/CheckGroup/index.jsx
View file @
f93fa131
...
...
@@ -44,7 +44,7 @@ const ListCard = props => {
useEffect
(()
=>
{
setValueList
(
checkList
);
},
[
dataList
,
loading
]);
},
[
dataList
,
loading
,
checkList
]);
const
updateValueList
=
(
checkedKeys
,
childrenKeys
,
sourceItem
)
=>
{
// eslint-disable-next-line no-console
...
...
src/pages/database/databaseConfig/mongDB/MongDBTable.jsx
View file @
f93fa131
...
...
@@ -139,7 +139,7 @@ const MongDBTable = props => {
title
:
'类型'
,
dataIndex
:
'type'
,
key
:
'type'
,
width
:
1
00
,
// width: 2
00,
ellipsis
:
true
,
},
{
...
...
src/pages/mobileConfig/index.js
View file @
f93fa131
...
...
@@ -2,16 +2,18 @@ import React, { useState, useEffect } from 'react';
import
{
Card
,
Tabs
}
from
'antd'
;
import
ProCard
from
'@ant-design/pro-card'
;
import
PageContainer
from
'@/components/BasePageContainer'
;
import
{
miniAppSiteTree
}
from
'@/services/mobileConfig/api'
;
import
{
miniAppSiteTree
,
getMiniAppModuleTree
,
}
from
'@/services/mobileConfig/api'
;
import
SiteConfig
from
'./SiteConfig'
;
import
MenuConfig
from
'./menuconfig/MenuConfig'
;
const
{
TabPane
}
=
Tabs
;
const
MobileConfigPage
=
props
=>
{
const
[
activeKey
,
setActiveKey
]
=
useState
(
'
0
'
);
// tabs活动页
const
[
activeKey
,
setActiveKey
]
=
useState
(
'
1
'
);
// tabs活动页
const
[
miniTitle
,
setMiniTitle
]
=
useState
(
''
);
const
[
flag
,
setFlag
]
=
useState
(
1
);
useEffect
(()
=>
{
console
.
log
(
33
,
'33'
);
miniAppSiteTree
({
userMode
:
'admin'
,
select
:
''
,
...
...
@@ -26,6 +28,13 @@ const MobileConfigPage = props => {
console
.
log
(
res
);
});
},
[
flag
]);
useEffect
(()
=>
{
getMiniAppModuleTree
({
userMode
:
'super'
,
}).
then
(
res
=>
{
console
.
log
(
res
);
});
},
[]);
// 修改选中的tab
const
handleChange
=
key
=>
{
setActiveKey
(
key
);
...
...
src/pages/userCenter/roleManage/RoleManage.jsx
View file @
f93fa131
...
...
@@ -15,7 +15,8 @@ import PageContainer from '@/components/BasePageContainer';
import
{
DoubleLeftOutlined
,
DoubleRightOutlined
,
UnorderedListOutlined
,
TeamOutlined
,
UserOutlined
,
}
from
'@ant-design/icons'
;
import
{
setMenuToRole
,
...
...
@@ -69,6 +70,7 @@ const SiteManage = () => {
if
(
id
)
{
setSaveTreeId
(
id
);
setRoleID
(
id
);
setValueList
([...
valueList
]);
}
else
{
setRoleID
(
saveTreeId
);
}
...
...
@@ -197,18 +199,20 @@ const SiteManage = () => {
let
arr3
=
arr2
.
map
(
item
=>
{
item
.
title
=
item
.
visibleTitle
||
''
;
item
.
key
=
item
.
visibleValue
||
''
;
item
.
icon
=
<
TeamOutlined
/>;
if
(
item
.
roleList
&&
item
.
roleList
.
length
>
0
)
{
item
.
roleList
.
map
((
itemRole
,
index
)
=>
{
if
(
itemRole
.
roleList
)
{
itemRole
.
title
=
itemRole
.
visibleTitle
||
''
;
itemRole
.
key
=
itemRole
.
visibleTitle
+
itemRole
.
visibleValue
||
''
;
itemRole
.
groupflag
=
itemRole
.
visibleTitle
;
// itemRole.icon = mulu ? <UnorderedListOutlined /> : ''
;
itemRole
.
icon
=
<
TeamOutlined
/>
;
itemRole
.
roleList
.
map
(
i
=>
{
i
.
title
=
i
.
roleName
;
i
.
key
=
i
.
roleID
;
i
.
subSystemValue
=
item
.
visibleValue
;
i
.
group
=
itemRole
.
visibleTitle
;
i
.
icon
=
<
UserOutlined
/>;
if
(
roleID
&&
roleID
===
i
.
roleID
)
{
setItemObj
(
i
);
}
...
...
@@ -219,6 +223,7 @@ const SiteManage = () => {
itemRole
.
title
=
itemRole
.
roleName
;
itemRole
.
key
=
itemRole
.
roleID
;
itemRole
.
subSystemValue
=
item
.
visibleValue
;
itemRole
.
icon
=
<
UserOutlined
/>;
if
(
roleID
&&
roleID
===
itemRole
.
roleID
)
{
setItemObj
(
itemRole
);
}
...
...
@@ -271,12 +276,12 @@ const SiteManage = () => {
const
handleHide
=
()
=>
{
setMulu
(
!
mulu
);
};
const
handleCommit
=
r
u
sults
=>
{
const
handleCommit
=
r
e
sults
=>
{
setBtnLoading
(
true
);
setMenuToRole
(
qs
.
stringify
({
roleID
,
menuNameList
:
String
(
r
u
sults
.
flat
()),
menuNameList
:
String
(
r
e
sults
.
flat
()),
}),
{
headers
:
{
...
...
@@ -287,6 +292,7 @@ const SiteManage = () => {
.
then
(
res
=>
{
setBtnLoading
(
false
);
if
(
res
.
success
)
{
setValueList
([...
results
.
flat
()]);
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
...
...
@@ -320,7 +326,7 @@ const SiteManage = () => {
</
div
>
{
treeData
&&
treeData
.
length
>
0
&&
(
<
Tree
showLine=
{
{
showLeafIcon
:
false
}
}
//
showLine=
{{
showLeafIcon
:
false
}}
showIcon
onSelect=
{
handleTreeSelect
}
autoExpandParent
...
...
src/pages/userCenter/roleManage/RoleManage.less
View file @
f93fa131
...
...
@@ -2,7 +2,15 @@
min-height: calc(100vh - 74px);
max-height: calc(100vh - 74px);
overflow-y: scroll;
margin-right: 10px;
margin-right: 20px;
.ant-tree-node-content-wrapper{
display: flex;
align-items: center;
.ant-tree-iconEle{
display: flex;
align-items: center;
}
}
}
.ant-tree-node-content-wrapper-open{
display: flex;
...
...
src/services/mobileConfig/api.js
View file @
f93fa131
import
{
get
,
post
}
from
'@/services/index'
;
import
{
get
,
post
,
PUBLISH_SERVICE
}
from
'@/services/index'
;
import
qs
from
'qs'
;
/**
...
...
@@ -40,4 +40,9 @@ export const editWebsite = (params, options) => {
/**
* @获取菜单配置
* {
* userMode:''
* } 必填 super 或 admin 或common
*/
export
const
getMiniAppModuleTree
=
params
=>
get
(
`
${
PUBLISH_SERVICE
}
/PlatformCenter/MiniAppModuleTree`
,
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