Commit 03f80a51 authored by 皮倩雯's avatar 皮倩雯

fix: '修改角色管理图标'

parent b0fcfed1
Pipeline #46132 passed with stages
in 7 minutes 13 seconds
......@@ -4,7 +4,7 @@ import { Checkbox } from 'antd';
import classnames from 'classnames';
import styles from './itemCard.less';
import { checkChildrenByCondition, checkIsGroup, getId } from '.';
import { FolderOpenOutlined, FolderOutlined } from '@ant-design/icons';
import { FolderFilled, FileOutlined } from '@ant-design/icons';
const ListCardItem = props => {
const { searchWord, item, valueList, updateValueList, ouid, changedItem, flag } = props;
......@@ -126,12 +126,12 @@ const ListCardItem = props => {
>
{isGroup ? (
<>
<FolderOpenOutlined style={{ color: '#1890ff' }} />
<FolderFilled style={{ color: '#1890ff' }} />
<span style={{ marginLeft: '5px' }}>{item.text}</span>
</>
) : (
<>
<FolderOutlined style={{ color: '#1890ff' }} />
<FileOutlined style={{ color: '#1890ff' }} />
<span style={{ marginLeft: '5px' }}>{item.text}</span>
</>
)}
......
......@@ -55,8 +55,8 @@
align-items: center;
}
.cardBoxR {
min-height: calc(100vh - 144px);
max-height: calc(100vh - 144px);
min-height: calc(100vh - 140px);
max-height: calc(100vh - 140px);
min-width: 870px;
overflow-y: scroll;
}
......
......@@ -2,7 +2,7 @@
* @Description:
* @Author: leizhe
* @Date: 2022-01-13 17:26:14
* @LastEditTime: 2022-03-14 17:27:07
* @LastEditTime: 2022-03-18 10:18:57
* @LastEditors: leizhe
*/
import React, { useState } from 'react';
......@@ -67,6 +67,9 @@ const AddChildModal = props => {
style={{ top: 200, borderRadius: '20px' }}
width="600px"
destroyOnClose
afterClose={() => {
form.resetFields();
}}
maskClosable={false}
cancelText="取消"
okText="确认"
......
......@@ -2,7 +2,7 @@
* @Description:
* @Author: leizhe
* @Date: 2022-01-13 17:26:14
* @LastEditTime: 2022-03-14 17:26:53
* @LastEditTime: 2022-03-18 10:19:08
* @LastEditors: leizhe
*/
import React, { useState } from 'react';
......@@ -66,6 +66,9 @@ const AddModal = props => {
style={{ top: 200, borderRadius: '20px' }}
width="600px"
destroyOnClose
afterClose={() => {
form.resetFields();
}}
maskClosable={false}
cancelText="取消"
okText="确认"
......
......@@ -91,10 +91,10 @@ const AddUserModal = props => {
>
<Form form={addOrgForm} labelCol={{ span: 4 }}>
<Form.Item name="OUName" label="机构名称" rules={[{ required: true, message: '不能为空' }]}>
<Input placeholder="请输入机构名称" />
<Input placeholder="请输入机构名称" maxLength="32" />
</Form.Item>
<Form.Item name="description" label="描述">
<Input placeholder="请输入相关描述" />
<Input placeholder="请输入相关描述" maxLength="32" />
</Form.Item>
</Form>
</Modal>
......
import React, { useEffect, useState } from 'react'
import { Modal, Form, Input, notification, message, Radio, Checkbox, Space} from 'antd';
import { AddUserAuthSetting, GetUserAuthSet, } from '@/services/database/api'
/*
* @Description:
* @Author: leizhe
* @Date: 2021-12-23 17:51:09
* @LastEditTime: 2022-03-18 10:07:06
* @LastEditors: leizhe
*/
import React, { useEffect, useState } from 'react';
import { Modal, Form, Input, notification, message, Radio, Checkbox, Space } from 'antd';
import { AddUserAuthSetting, GetUserAuthSet } from '@/services/database/api';
import SiteModal from '@/components/Modal/SiteModa';
const AuthModal = props => {
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 [selectValue,setSelctValue] = useState(1)
useEffect(() => {
currentUser.userID && visible
GetUserAuthSet({
UserId: currentUser.userID
}).then(
res => {
if(res.code === 0){
setSelctValue(res.data)
}
}
)
}, [currentUser])
const onTypeChange = (value) => {
setSelctValue(value)
}
const onSubmit = () => {
AddUserAuthSetting({userId:currentUser.userID}).then(
res =>{
if(res.code === 0){
message.info("提交成功")
}
}
)
}
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 [selectValue, setSelctValue] = useState(1);
return (
<SiteModal
title={title}
visible={visible}
onCancel={onCancel}
onOk={onSubmit}
okText="确认"
cancelText="取消"
width="800px"
>
<div style={{ width: '800px' }}>
<Form form={form}>
<Item
label="数据权限"
name="operate_type"
>
<Radio.Group
defaultValue={selectValue}
options={plainOptions}
onChange={onTypeChange}
/>
</Item>
</Form>
</div>
</SiteModal>
useEffect(() => {
currentUser.userID && visible;
GetUserAuthSet({
UserId: currentUser.userID,
}).then(res => {
if (res.code === 0) {
setSelctValue(res.data);
}
});
}, [currentUser]);
const onTypeChange = value => {
setSelctValue(value);
};
const onSubmit = () => {
AddUserAuthSetting({ userId: currentUser.userID }).then(res => {
if (res.code === 0) {
message.info('提交成功');
}
});
};
)
}
export default AuthModal
\ No newline at end of file
return (
<SiteModal
title={title}
visible={visible}
onCancel={onCancel}
onOk={onSubmit}
okText="确认"
cancelText="取消"
width="800px"
>
<div style={{ width: '800px' }}>
<Form form={form}>
<Item label="数据权限" name="operate_type">
<Radio.Group
defaultValue={selectValue}
options={plainOptions}
onChange={onTypeChange}
/>
</Item>
</Form>
</div>
</SiteModal>
);
};
export default AuthModal;
......@@ -2,7 +2,7 @@
* @Description:
* @Author: leizhe
* @Date: 2022-01-13 17:26:14
* @LastEditTime: 2022-03-11 15:54:02
* @LastEditTime: 2022-03-18 10:06:38
* @LastEditors: leizhe
*/
import React, { useEffect } from 'react';
......@@ -71,10 +71,10 @@ const EditOrgModal = props => {
>
<Form form={editOrgForm} labelCol={{ span: 4 }}>
<Form.Item name="OUName" label="机构名称" rules={[{ required: true, message: '不能为空' }]}>
<Input placeholder="请输入机构名称" />
<Input placeholder="请输入机构名称" maxLength="32" />
</Form.Item>
<Form.Item name="description" label="描述">
<Input placeholder="请输入相关描述" />
<Input placeholder="请输入相关描述" maxLength="32" />
</Form.Item>
</Form>
</Modal>
......
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