Commit 42e0676c authored by mayongxin's avatar mayongxin

用户数据鉴权

parent 4060c07f
Pipeline #28035 passed with stages
in 29 minutes 0 seconds
......@@ -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)
}
}
)
......
......@@ -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={{with:"200px"}} disabled={true}/>
<Button>生成编号</Button>
<Input value={currentSiteInfo} style={{width:"200px"}} />
<Button style={{marginLeft:"10px"}}>生成编号</Button>
</div>
}
</Descriptions.Item>
......
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}
/>
......
......@@ -247,11 +247,11 @@ export default {
name: '表/字段',
component: TableManager,
},
{
path: '/platformCenter/bsmanger/standbookmanager',
name: '台账配置',
component: TableManager,
}
// {
// path: '/platformCenter/bsmanger/standbookmanager',
// name: '台账配置',
// component: TableManager,
// }
],
},
],
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment