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