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
42e0676c
Commit
42e0676c
authored
May 21, 2021
by
mayongxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户数据鉴权
parent
4060c07f
Pipeline
#28035
passed with stages
in 29 minutes 0 seconds
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
25 deletions
+39
-25
index.jsx
src/pages/authcontrol/index.jsx
+2
-3
BaseConfig.jsx
...ages/platformCenter/hostmanager/baseConfig/BaseConfig.jsx
+2
-2
AuthModal.jsx
src/pages/userCenter/userManage/AuthModal.jsx
+29
-14
config.js
src/routes/config.js
+5
-5
api.js
src/services/userCenter/userManage/api.js
+1
-1
No files found.
src/pages/authcontrol/index.jsx
View file @
42e0676c
...
...
@@ -3,7 +3,6 @@ import PageContainer from '@/components/BasePageContainer';
import
{
Card
,
Form
,
Input
,
Button
,
Switch
,
message
}
from
'antd'
import
{
GetAuthSet
,
AuthSetting
}
from
'@/services/database/api'
import
styles
from
'./index.less'
import
{
useTheme
}
from
'bizcharts'
;
const
AuthControl
=
()
=>
{
const
[
flag
,
setFlag
]
=
useState
(
0
)
...
...
@@ -14,8 +13,8 @@ const AuthControl = () => {
GetAuthSet
().
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
setAuChecked
(
res
.
IsOpenAuth
)
setCacheAuChecked
(
res
.
IsUseCache
)
setAuChecked
(
res
.
data
.
IsOpenAuth
)
setCacheAuChecked
(
res
.
data
.
IsUseCache
)
}
}
)
...
...
src/pages/platformCenter/hostmanager/baseConfig/BaseConfig.jsx
View file @
42e0676c
...
...
@@ -77,8 +77,8 @@ const BaseConfig = () => {
<
Descriptions
.
Item
label=
"站点编号"
span=
{
3
}
>
{
!
currentSiteInfo
?<
Input
value=
{
currentSiteInfo
}
disabled=
{
true
}
style=
{
{
with
:
"200px"
}
}
/>:<
div
>
<
Input
value=
{
currentSiteInfo
}
style=
{
{
wi
th
:
"200px"
}
}
disabled=
{
true
}
/>
<
Button
>
生成编号
</
Button
>
<
Input
value=
{
currentSiteInfo
}
style=
{
{
wi
dth
:
"200px"
}
}
/>
<
Button
style=
{
{
marginLeft
:
"10px"
}
}
>
生成编号
</
Button
>
</
div
>
}
</
Descriptions
.
Item
>
...
...
src/pages/userCenter/userManage/AuthModal.jsx
View file @
42e0676c
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
Modal
,
Form
,
Input
,
notification
,
message
,
Radio
,
Checkbox
}
from
'antd'
;
import
{
GetUserAuthSet
,
}
from
'@/services/database/api'
import
{
AddUserAuthSetting
,
GetUserAuthSet
,
}
from
'@/services/database/api'
import
SiteModal
from
'@/components/Modal/SiteModa'
;
const
AuthModal
=
props
=>
{
const
plainOptions
=
[
'访客'
,
'普通用户'
,
'管理员'
,
"超级管理员"
];
const
plainOptions
=
[
{
label
:
'访客'
,
value
:
0
},
{
label
:
'普通用户'
,
value
:
1
},
{
label
:
'管理员'
,
value
:
2
},
{
label
:
'超级管理员'
,
value
:
3
},
];
const
[
form
]
=
Form
.
useForm
();
const
{
Item
}
=
Form
;
const
{
title
,
visible
,
onCancel
,
onSelect
,
currentUser
}
=
props
;
const
{
title
,
visible
,
onCancel
,
onSelect
,
currentUser
}
=
props
;
const
[
selectValue
,
setSelctValue
]
=
useState
(
1
)
useEffect
(()
=>
{
currentUser
.
userID
&&
visible
useEffect
(()
=>
{
currentUser
.
userID
&&
visible
GetUserAuthSet
({
UserId
:
currentUser
.
userID
UserId
:
currentUser
.
userID
}).
then
(
res
=>
{
res
=>
{
if
(
res
.
code
==
0
){
setSelctValue
(
res
.
data
)
}
}
)
},[
currentUser
])
const
onTypeChange
=
()
=>
{
},
[
currentUser
])
const
onTypeChange
=
(
value
)
=>
{
setSelctValue
(
value
)
}
const
onSubmit
=
()
=>
{
AddUserAuthSetting
({
userId
:
currentUser
.
userID
}).
then
(
res
=>
{
if
(
res
.
code
==
0
){
message
.
info
(
"提交成功"
)
}
}
)
}
...
...
@@ -40,13 +54,14 @@ const AuthModal = props => {
cancelText=
"取消"
width=
"800px"
>
<
div
style=
{
{
width
:
'800px'
}
}
>
<
div
style=
{
{
width
:
'800px'
}
}
>
<
Form
form=
{
form
}
>
<
Item
label=
"数据权限"
name=
"operate_type"
>
<
Checkbox
.
Group
<
Radio
.
Group
defaultValue=
{
selectValue
}
options=
{
plainOptions
}
onChange=
{
onTypeChange
}
/>
...
...
src/routes/config.js
View file @
42e0676c
...
...
@@ -247,11 +247,11 @@ export default {
name
:
'表/字段'
,
component
:
TableManager
,
},
{
path
:
'/platformCenter/bsmanger/standbookmanager'
,
name
:
'台账配置'
,
component
:
TableManager
,
}
//
{
//
path: '/platformCenter/bsmanger/standbookmanager',
//
name: '台账配置',
//
component: TableManager,
//
}
],
},
],
...
...
src/services/userCenter/userManage/api.js
View file @
42e0676c
...
...
@@ -175,7 +175,7 @@ export const setOrgArea = params =>
export
const
getOrgArea
=
params
=>
get
(
`
${
CITY_SERVICE
}
/OMS.svc/GetOrgUserArea`
,
params
)
export
const
GetMapSetByGroupID
=
params
=>
get
(
`
${
PUBLISH_SERVICE
}
/GetMapSetByGroupID`
,
params
)
get
(
`
${
PUBLISH_SERVICE
}
/
Maplayer/
GetMapSetByGroupID`
,
params
)
export
const
GetOUTreeNew
=
params
=>
get
(
`
${
PUBLISH_SERVICE
}
/UserCenter/GetOUTree`
,
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