个人设置-头像
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Button, Form, Input, notification, Select } from 'antd';
|
||||
import { App, Button, Form, Input, Select } from 'antd';
|
||||
import TextArea from 'antd/lib/input/TextArea';
|
||||
import { stringify } from 'qs';
|
||||
import type React from 'react';
|
||||
@@ -22,11 +22,12 @@ export const AdminDepEditModal: React.FC<IProps> = (props) => {
|
||||
const [title, setTitle] = useState('');
|
||||
const [form] = Form.useForm();
|
||||
const [data, setData] = useState<any>(null);
|
||||
const { notification } = App.useApp();
|
||||
|
||||
// 请求成功回调
|
||||
const success = (res: any) => {
|
||||
if (res.err_code === 0) {
|
||||
notification.success({ message: '保存成功' });
|
||||
notification.success({ title: '保存成功' });
|
||||
props.onCallback?.();
|
||||
setOpen(false);
|
||||
form.resetFields(); // 提交成功重置表单
|
||||
|
||||
@@ -48,7 +48,7 @@ const DepListForm: React.FC = () => {
|
||||
const { request: deleteAdminDepartmentRequest } = useRequest(AdminDepartmentServices.del, {
|
||||
onSuccessCodeZero: (res) => {
|
||||
if (res.err_code == 0) {
|
||||
notification.success({ message: '删除成功' });
|
||||
notification.success({ title: '删除成功' });
|
||||
page(params.curr_page);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Button, Form, Input, notification, Select, Space, Tree } from 'antd';
|
||||
import { App, Button, Form, Input, Select, Space, Tree } from 'antd';
|
||||
import TextArea from 'antd/lib/input/TextArea';
|
||||
import { stringify } from 'qs';
|
||||
import type React from 'react';
|
||||
@@ -26,11 +26,12 @@ export const AdminGrpEditModal: React.FC<IProps> = (props) => {
|
||||
const [menuTree, setMenuTree] = useState<any[]>([]);
|
||||
const [checkedKeys, setCheckedKeys] = useState<React.Key[]>([]);
|
||||
const [expandedKeys, setExpandedKeys] = useState<React.Key[]>([]);
|
||||
const { notification } = App.useApp();
|
||||
|
||||
// 请求成功回调
|
||||
const success = (res: any) => {
|
||||
if (res.err_code === 0) {
|
||||
notification.success({ message: '保存成功' });
|
||||
notification.success({ title: '保存成功' });
|
||||
props.onCallback?.();
|
||||
setOpen(false);
|
||||
form.resetFields();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Button, DatePicker, Input, notification, Popconfirm, Select } from 'antd';
|
||||
import { App, Button, DatePicker, Input, Popconfirm, Select } from 'antd';
|
||||
import { stringify } from 'qs';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { FormItemPlugin, FormPlugin } from '@/components/FormPlugin';
|
||||
@@ -33,6 +33,7 @@ const GrpListForm: React.FC = () => {
|
||||
const [ajaxData, setAjaxData] = useState<IAjaxData>({ count: 0, data: [] });
|
||||
//const [showMoreSearch, setShowMoreSearch] = useState(false);
|
||||
const AdminGrpEditModalRef = useRef<IAdminGrpEditModalType>(null);
|
||||
const { notification } = App.useApp();
|
||||
|
||||
const { loading: listLoading, request: listRequest } = useRequest(AdminGroupServices.getAdminGroupList, {
|
||||
onSuccessCodeZero: (res) => {
|
||||
@@ -46,7 +47,7 @@ const GrpListForm: React.FC = () => {
|
||||
const { request: deleteAdminGroupRequest } = useRequest(AdminGroupServices.del, {
|
||||
onSuccessCodeZero: (res) => {
|
||||
if (res.err_code == 0) {
|
||||
notification.success({ message: '删除成功' });
|
||||
notification.success({ title: '删除成功' });
|
||||
page(params.curr_page);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Button, Form, Input, notification, Select } from 'antd';
|
||||
import { App, Button, Form, Input, Select } from 'antd';
|
||||
import { stringify } from 'qs';
|
||||
import type React from 'react';
|
||||
import { useImperativeHandle, useState } from 'react';
|
||||
@@ -26,6 +26,7 @@ export const AdminEditModal: React.FC<IProps> = (props) => {
|
||||
const [data, setData] = useState<any>(null);
|
||||
const [department, setDepartment] = useState<IOption[]>([]);
|
||||
const [group, setGroup] = useState<IOption[]>([]);
|
||||
const { notification } = App.useApp();
|
||||
|
||||
const { request: getAdminDepartmentAjaxListRequest } = useRequest(
|
||||
AdminDepartmentServices.getAdminDepartmentAjaxList,
|
||||
@@ -45,7 +46,7 @@ export const AdminEditModal: React.FC<IProps> = (props) => {
|
||||
// 请求成功回调
|
||||
const success = (res: any) => {
|
||||
if (res.err_code === 0) {
|
||||
notification.success({ message: '保存成功' });
|
||||
notification.success({ title: '保存成功' });
|
||||
props.onCallback?.();
|
||||
setOpen(false);
|
||||
form.resetFields(); // 提交成功重置表单
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Button, DatePicker, Input, notification, Popconfirm, Select } from 'antd';
|
||||
import { App, Button, DatePicker, Input, Popconfirm, Select } from 'antd';
|
||||
import { stringify } from 'qs';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { FormItemPlugin, FormPlugin } from '@/components/FormPlugin';
|
||||
@@ -39,6 +39,7 @@ const AdminListForm: React.FC = () => {
|
||||
const [ajaxData, setAjaxData] = useState<IAjaxData>({ count: 0, data: [] });
|
||||
const [showMoreSearch, setShowMoreSearch] = useState(false);
|
||||
const AdminEditModalRef = useRef<IAdminEditModalType>(null);
|
||||
const { notification } = App.useApp();
|
||||
|
||||
const { loading: listLoading, request: listRequest } = useRequest(AdminServices.getAdminList, {
|
||||
onSuccessCodeZero: (res) => {
|
||||
@@ -52,7 +53,7 @@ const AdminListForm: React.FC = () => {
|
||||
const { request: deleteAdminRequest } = useRequest(AdminServices.del, {
|
||||
onSuccessCodeZero: (res) => {
|
||||
if (res.err_code == 0) {
|
||||
notification.success({ message: '删除成功' });
|
||||
notification.success({ title: '删除成功' });
|
||||
page(params.curr_page);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user