diff --git a/README.md b/README.md
index e47b8af25677996515317c318b48813908f22f34..9c8b8dbcd98972e6a1cdb36d1460ef867d851394 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,11 @@
-Dash-FastAPI-Admin v1.0.0
+Dash-FastAPI-Admin v1.0.2
基于Dash+FastAPI前后端分离的纯Python快速开发框架
-
+
@@ -74,6 +74,7 @@ Dash-FastAPI-Admin是一套全部开源的快速开发平台,毫无保留给
 |
+  |
@@ -126,8 +127,11 @@ python3 app.py
地址:http://127.0.0.1:8088
```
-## 交流
-如果有对本项目及FastAPI感兴趣的朋友,欢迎加入知识星球一起交流学习。
-
-
-
\ No newline at end of file
+## 交流与赞助
+如果有对本项目及FastAPI感兴趣的朋友,欢迎加入知识星球一起交流学习,让我们一起变得更强。如果你觉得这个项目帮助到了你,你可以请作者喝杯咖啡表示鼓励☕。
+
+
+  |
+  |
+
+
\ No newline at end of file
diff --git a/dash-fastapi-backend/sql/dash-fastapi.sql b/dash-fastapi-backend/sql/dash-fastapi.sql
index f6d12d489654e4799f368564a45bdefac54d00df..8b2657b730c0de3f5a3a4b4a6495956658330159 100644
--- a/dash-fastapi-backend/sql/dash-fastapi.sql
+++ b/dash-fastapi-backend/sql/dash-fastapi.sql
@@ -107,6 +107,7 @@ CREATE TABLE `sys_config` (
INSERT INTO `sys_config` VALUES (1, '主框架页-默认皮肤样式名称', 'sys.index.skinName', '#1890ff', 'Y', 'admin', '2023-05-23 16:13:34', 'admin', '2023-05-23 16:13:34', '蓝色 #1890ff');
INSERT INTO `sys_config` VALUES (2, '账号自助-验证码开关', 'sys.account.captchaEnabled', 'true', 'Y', 'admin', '2023-05-23 16:13:34', 'admin', '2023-05-23 16:13:34', '是否开启验证码功能(true开启,false关闭)');
INSERT INTO `sys_config` VALUES (3, '用户登录-黑名单列表', 'sys.login.blackIPList', '', 'Y', 'admin', '2023-05-23 16:13:34', '', NULL, '设置登录IP黑名单限制,多个匹配项以;分隔,支持匹配(*通配、网段)');
+INSERT INTO `sys_config` VALUES (4, '账号自助-是否开启忘记密码功能', 'sys.account.forgetUser', 'true', 'Y', 'admin', '2023-05-23 16:13:34', 'admin', '2023-05-23 16:13:34', '是否开启忘记密码功能(true开启,false关闭)');
-- ----------------------------
-- Table structure for sys_dept
diff --git a/dash-fastapi-frontend/callbacks/system_c/user_c/user_c.py b/dash-fastapi-frontend/callbacks/system_c/user_c/user_c.py
index 7bdd6cee1f72c2413069598fe8ea54ffa6e50031..9e3ebbcd6a820f7185e2783325a4796204c34fa8 100644
--- a/dash-fastapi-frontend/callbacks/system_c/user_c/user_c.py
+++ b/dash-fastapi-frontend/callbacks/system_c/user_c/user_c.py
@@ -271,8 +271,8 @@ def usr_add_confirm(add_confirm, nick_name, dept_id, phone_number, email, user_n
if all([nick_name, user_name, password]):
params = dict(nick_name=nick_name, dept_id=dept_id, phonenumber=phone_number,
email=email, user_name=user_name, password=password, sex=sex,
- status=status, post_id=','.join(map(str, post)), role_id=','.join(map(str, role)),
- remark=remark)
+ status=status, post_id=','.join(map(str, post)) if post else '',
+ role_id=','.join(map(str, role)) if role else '', remark=remark)
add_button_result = add_user_api(params)
if add_button_result['code'] == 200:
diff --git a/dash-fastapi-frontend/store/store.py b/dash-fastapi-frontend/store/store.py
index 0880078cae120528c58768a8cd8c8b6aacce5c3b..95f8e4d68bbcb6fd872d3e07be15dda9ade0b0fd 100644
--- a/dash-fastapi-frontend/store/store.py
+++ b/dash-fastapi-frontend/store/store.py
@@ -19,97 +19,5 @@ def render_store_container():
dcc.Store(id='menu-list-store-container'),
# 菜单current_key存储容器
dcc.Store(id='current-key-container'),
- # 用户管理模块操作类型存储容器
- dcc.Store(id='user-operations-store'),
- # 用户管理模块修改操作行key存储容器
- dcc.Store(id='user-edit-id-store'),
- # 用户管理模块删除操作行key存储容器
- dcc.Store(id='user-delete-ids-store'),
- # 角色管理模块操作类型存储容器
- dcc.Store(id='role-operations-store'),
- dcc.Store(id='role-operations-store-bk'),
- # 角色管理模块修改操作行key存储容器
- dcc.Store(id='role-edit-id-store'),
- # 角色管理模块删除操作行key存储容器
- dcc.Store(id='role-delete-ids-store'),
- # 角色管理模块菜单权限存储容器
- dcc.Store(id='role-menu-store'),
- dcc.Store(id='current-role-menu-store'),
- # 菜单管理模块操作类型存储容器
- dcc.Store(id='menu-operations-store'),
- dcc.Store(id='menu-operations-store-bk'),
- # modal菜单类型存储容器
- dcc.Store(id='menu-modal-menu-type-store'),
- # 不同菜单类型的触发器
- dcc.Store(id='menu-modal-M-trigger'),
- dcc.Store(id='menu-modal-C-trigger'),
- dcc.Store(id='menu-modal-F-trigger'),
- # 菜单管理模块修改操作行key存储容器
- dcc.Store(id='menu-edit-id-store'),
- # 菜单管理模块删除操作行key存储容器
- dcc.Store(id='menu-delete-ids-store'),
- # 部门管理模块操作类型存储容器
- dcc.Store(id='dept-operations-store'),
- dcc.Store(id='dept-operations-store-bk'),
- # 部门管理模块修改操作行key存储容器
- dcc.Store(id='dept-edit-id-store'),
- # 部门管理模块删除操作行key存储容器
- dcc.Store(id='dept-delete-ids-store'),
- # 岗位管理模块操作类型存储容器
- dcc.Store(id='post-operations-store'),
- dcc.Store(id='post-operations-store-bk'),
- # 岗位管理模块修改操作行key存储容器
- dcc.Store(id='post-edit-id-store'),
- # 岗位管理模块删除操作行key存储容器
- dcc.Store(id='post-delete-ids-store'),
- # 字典管理模块操作类型存储容器
- dcc.Store(id='dict_type-operations-store'),
- dcc.Store(id='dict_type-operations-store-bk'),
- dcc.Store(id='dict_data-operations-store'),
- dcc.Store(id='dict_data-operations-store-bk'),
- # 字典管理模块修改操作行key存储容器
- dcc.Store(id='dict_type-edit-id-store'),
- dcc.Store(id='dict_data-edit-id-store'),
- # 字典管理模块删除操作行key存储容器
- dcc.Store(id='dict_type-delete-ids-store'),
- dcc.Store(id='dict_data-delete-ids-store'),
- # 参数管理模块操作类型存储容器
- dcc.Store(id='config-operations-store'),
- dcc.Store(id='config-operations-store-bk'),
- # 参数管理模块修改操作行key存储容器
- dcc.Store(id='config-edit-id-store'),
- # 参数管理模块删除操作行key存储容器
- dcc.Store(id='config-delete-ids-store'),
- # 通知公告管理模块操作类型存储容器
- dcc.Store(id='notice-operations-store'),
- dcc.Store(id='notice-operations-store-bk'),
- # 通知公告管理模块修改操作行key存储容器
- dcc.Store(id='notice-edit-id-store'),
- # 通知公告管理模块删除操作行key存储容器
- dcc.Store(id='notice-delete-ids-store'),
- # 操作日志管理模块操作类型存储容器
- dcc.Store(id='operation_log-operations-store'),
- # 操作日志管理模块删除操作行key存储容器
- dcc.Store(id='operation_log-delete-ids-store'),
- # 登录日志管理模块操作类型存储容器
- dcc.Store(id='login_log-operations-store'),
- # 操作日志管理模块删除操作行key存储容器
- dcc.Store(id='login_log-delete-ids-store'),
- # 在线用户模块操作类型存储容器
- dcc.Store(id='online-operations-store'),
- dcc.Store(id='online-operations-store-bk'),
- # 在线用户模块删除操作行key存储容器
- dcc.Store(id='online-delete-ids-store'),
- # 定时任务模块操作类型存储容器
- dcc.Store(id='job-operations-store'),
- dcc.Store(id='job-operations-store-bk'),
- # 定时任务模块修改操作行key存储容器
- dcc.Store(id='job-edit-id-store'),
- # 定时任务模块删除操作行key存储容器
- dcc.Store(id='job-delete-ids-store'),
- # 定时任务日志管理模块操作类型存储容器
- dcc.Store(id='job_log-operations-store'),
- # 定时任务日志管理模块删除操作行key存储容器
- dcc.Store(id='job_log-delete-ids-store'),
]
)
diff --git a/dash-fastapi-frontend/views/login.py b/dash-fastapi-frontend/views/login.py
index 93d0ac514d099b4d509ec9756e39a830913722ed..65f6b1d9392f473399ca462ac78e9db246b89181 100644
--- a/dash-fastapi-frontend/views/login.py
+++ b/dash-fastapi-frontend/views/login.py
@@ -7,9 +7,13 @@ from api.config import query_config_list_api
def render_content():
captcha_enabled_info = query_config_list_api(config_key='sys.account.captchaEnabled')
+ forget_enabled_info = query_config_list_api(config_key='sys.account.forgetUser')
captcha_hidden = False
+ forget_show = True
if captcha_enabled_info.get('code') == 200:
captcha_hidden = False if captcha_enabled_info.get('data') == 'true' else True
+ if forget_enabled_info.get('code') == 200:
+ forget_show = False if forget_enabled_info.get('data') == 'false' else True
return html.Div(
[
@@ -139,7 +143,7 @@ def render_content():
],
align='center',
size=240
- ),
+ ) if forget_show else [],
fac.AntdFormItem(
fac.AntdButton(
'登录',
@@ -176,7 +180,7 @@ def render_content():
fac.AntdFooter(
html.Div(
fac.AntdText(
- '版权所有©2023 Dash-FastAPI',
+ '版权所有©2023 Dash-FastAPI-Admin',
style={
'margin': '0'
}
diff --git a/dash-fastapi-frontend/views/monitor/job/__init__.py b/dash-fastapi-frontend/views/monitor/job/__init__.py
index 05ccc92697f3359fb8256146c853a860a28a5a94..2ac8bf4a5dc2e72472d62f622389f203f562417a 100644
--- a/dash-fastapi-frontend/views/monitor/job/__init__.py
+++ b/dash-fastapi-frontend/views/monitor/job/__init__.py
@@ -72,6 +72,17 @@ def render(button_perms):
dcc.Store(id='job-export-complete-judge-container'),
# 绑定的导出组件
dcc.Download(id='job-export-container'),
+ # 定时任务模块操作类型存储容器
+ dcc.Store(id='job-operations-store'),
+ dcc.Store(id='job-operations-store-bk'),
+ # 定时任务模块修改操作行key存储容器
+ dcc.Store(id='job-edit-id-store'),
+ # 定时任务模块删除操作行key存储容器
+ dcc.Store(id='job-delete-ids-store'),
+ # 定时任务日志管理模块操作类型存储容器
+ dcc.Store(id='job_log-operations-store'),
+ # 定时任务日志管理模块删除操作行key存储容器
+ dcc.Store(id='job_log-delete-ids-store'),
fac.AntdRow(
[
fac.AntdCol(
diff --git a/dash-fastapi-frontend/views/monitor/logininfor/__init__.py b/dash-fastapi-frontend/views/monitor/logininfor/__init__.py
index 1ecc77001299d35686419c1babb0fd96643ed96d..bff7d37cd0273ec25f35d8c0965d6d5f418d7a03 100644
--- a/dash-fastapi-frontend/views/monitor/logininfor/__init__.py
+++ b/dash-fastapi-frontend/views/monitor/logininfor/__init__.py
@@ -31,6 +31,10 @@ def render(button_perms):
dcc.Store(id='login_log-export-complete-judge-container'),
# 绑定的导出组件
dcc.Download(id='login_log-export-container'),
+ # 登录日志管理模块操作类型存储容器
+ dcc.Store(id='login_log-operations-store'),
+ # 登录日志管理模块删除操作行key存储容器
+ dcc.Store(id='login_log-delete-ids-store'),
fac.AntdRow(
[
fac.AntdCol(
diff --git a/dash-fastapi-frontend/views/monitor/online/__init__.py b/dash-fastapi-frontend/views/monitor/online/__init__.py
index 03d97afae532cfd971cbad7d16011361ad131d03..9560c1b885f0ec671ea3523948ff027f63bd8ad4 100644
--- a/dash-fastapi-frontend/views/monitor/online/__init__.py
+++ b/dash-fastapi-frontend/views/monitor/online/__init__.py
@@ -30,6 +30,11 @@ def render(button_perms):
return [
dcc.Store(id='online-button-perms-container', data=button_perms),
+ # 在线用户模块操作类型存储容器
+ dcc.Store(id='online-operations-store'),
+ dcc.Store(id='online-operations-store-bk'),
+ # 在线用户模块删除操作行key存储容器
+ dcc.Store(id='online-delete-ids-store'),
fac.AntdRow(
[
fac.AntdCol(
diff --git a/dash-fastapi-frontend/views/monitor/operlog/__init__.py b/dash-fastapi-frontend/views/monitor/operlog/__init__.py
index 27fc2c4abe44dcf17ac8c05639186d3aec27b8f6..7e41ce51805de37f9c4900c002033ad46e864a99 100644
--- a/dash-fastapi-frontend/views/monitor/operlog/__init__.py
+++ b/dash-fastapi-frontend/views/monitor/operlog/__init__.py
@@ -57,6 +57,10 @@ def render(button_perms):
dcc.Store(id='operation_log-export-complete-judge-container'),
# 绑定的导出组件
dcc.Download(id='operation_log-export-container'),
+ # 操作日志管理模块操作类型存储容器
+ dcc.Store(id='operation_log-operations-store'),
+ # 操作日志管理模块删除操作行key存储容器
+ dcc.Store(id='operation_log-delete-ids-store'),
fac.AntdRow(
[
fac.AntdCol(
diff --git a/dash-fastapi-frontend/views/system/config/__init__.py b/dash-fastapi-frontend/views/system/config/__init__.py
index 25cbb5d7a0b39b2370c581c5bbf797a4948d42ec..c6aabb0c1f9216483da84ee925db0eeba18a26c5 100644
--- a/dash-fastapi-frontend/views/system/config/__init__.py
+++ b/dash-fastapi-frontend/views/system/config/__init__.py
@@ -43,6 +43,13 @@ def render(button_perms):
dcc.Store(id='config-export-complete-judge-container'),
# 绑定的导出组件
dcc.Download(id='config-export-container'),
+ # 参数管理模块操作类型存储容器
+ dcc.Store(id='config-operations-store'),
+ dcc.Store(id='config-operations-store-bk'),
+ # 参数管理模块修改操作行key存储容器
+ dcc.Store(id='config-edit-id-store'),
+ # 参数管理模块删除操作行key存储容器
+ dcc.Store(id='config-delete-ids-store'),
fac.AntdRow(
[
fac.AntdCol(
diff --git a/dash-fastapi-frontend/views/system/dept/__init__.py b/dash-fastapi-frontend/views/system/dept/__init__.py
index b144c07f8303da2a0a91e0d4d24d60e43cc8a5ee..b5d2a299111f1c27a06f91faee7da1719d4427c9 100644
--- a/dash-fastapi-frontend/views/system/dept/__init__.py
+++ b/dash-fastapi-frontend/views/system/dept/__init__.py
@@ -67,6 +67,13 @@ def render(button_perms):
return [
dcc.Store(id='dept-button-perms-container', data=button_perms),
+ # 部门管理模块操作类型存储容器
+ dcc.Store(id='dept-operations-store'),
+ dcc.Store(id='dept-operations-store-bk'),
+ # 部门管理模块修改操作行key存储容器
+ dcc.Store(id='dept-edit-id-store'),
+ # 部门管理模块删除操作行key存储容器
+ dcc.Store(id='dept-delete-ids-store'),
fac.AntdRow(
[
fac.AntdCol(
diff --git a/dash-fastapi-frontend/views/system/dict/__init__.py b/dash-fastapi-frontend/views/system/dict/__init__.py
index f3fd02c763a43534e88132845c6278c65c0222b8..a3b0a1f581cb085739d3c9377f7eb84e6299e5ae 100644
--- a/dash-fastapi-frontend/views/system/dict/__init__.py
+++ b/dash-fastapi-frontend/views/system/dict/__init__.py
@@ -48,6 +48,17 @@ def render(button_perms):
dcc.Store(id='dict_type-export-complete-judge-container'),
# 绑定的导出组件
dcc.Download(id='dict_type-export-container'),
+ # 字典管理模块操作类型存储容器
+ dcc.Store(id='dict_type-operations-store'),
+ dcc.Store(id='dict_type-operations-store-bk'),
+ dcc.Store(id='dict_data-operations-store'),
+ dcc.Store(id='dict_data-operations-store-bk'),
+ # 字典管理模块修改操作行key存储容器
+ dcc.Store(id='dict_type-edit-id-store'),
+ dcc.Store(id='dict_data-edit-id-store'),
+ # 字典管理模块删除操作行key存储容器
+ dcc.Store(id='dict_type-delete-ids-store'),
+ dcc.Store(id='dict_data-delete-ids-store'),
fac.AntdRow(
[
fac.AntdCol(
diff --git a/dash-fastapi-frontend/views/system/menu/__init__.py b/dash-fastapi-frontend/views/system/menu/__init__.py
index e6f9dd9c6f408f79202a495fb8205141ea0edad8..a8038a1bf3504b491c993f5bcbdf9ce18794ac46 100644
--- a/dash-fastapi-frontend/views/system/menu/__init__.py
+++ b/dash-fastapi-frontend/views/system/menu/__init__.py
@@ -63,6 +63,19 @@ def render(button_perms):
return [
dcc.Store(id='menu-button-perms-container', data=button_perms),
+ # 菜单管理模块操作类型存储容器
+ dcc.Store(id='menu-operations-store'),
+ dcc.Store(id='menu-operations-store-bk'),
+ # modal菜单类型存储容器
+ dcc.Store(id='menu-modal-menu-type-store'),
+ # 不同菜单类型的触发器
+ dcc.Store(id='menu-modal-M-trigger'),
+ dcc.Store(id='menu-modal-C-trigger'),
+ dcc.Store(id='menu-modal-F-trigger'),
+ # 菜单管理模块修改操作行key存储容器
+ dcc.Store(id='menu-edit-id-store'),
+ # 菜单管理模块删除操作行key存储容器
+ dcc.Store(id='menu-delete-ids-store'),
fac.AntdRow(
[
fac.AntdCol(
diff --git a/dash-fastapi-frontend/views/system/notice/__init__.py b/dash-fastapi-frontend/views/system/notice/__init__.py
index 29ccf7850931f8e61cfc982f067f4aab0b1f6e3b..260475bc076e39241a24cad18b9f77d925932446 100644
--- a/dash-fastapi-frontend/views/system/notice/__init__.py
+++ b/dash-fastapi-frontend/views/system/notice/__init__.py
@@ -58,6 +58,13 @@ def render(button_perms):
return [
dcc.Store(id='notice-button-perms-container', data=button_perms),
+ # 通知公告管理模块操作类型存储容器
+ dcc.Store(id='notice-operations-store'),
+ dcc.Store(id='notice-operations-store-bk'),
+ # 通知公告管理模块修改操作行key存储容器
+ dcc.Store(id='notice-edit-id-store'),
+ # 通知公告管理模块删除操作行key存储容器
+ dcc.Store(id='notice-delete-ids-store'),
fac.AntdRow(
[
fac.AntdCol(
diff --git a/dash-fastapi-frontend/views/system/post/__init__.py b/dash-fastapi-frontend/views/system/post/__init__.py
index af4395fdfaa1eb00e312497ad7131e9462adc0d9..a3110e890be5c7b2b44bf40c380353b7d65873ef 100644
--- a/dash-fastapi-frontend/views/system/post/__init__.py
+++ b/dash-fastapi-frontend/views/system/post/__init__.py
@@ -43,6 +43,13 @@ def render(button_perms):
dcc.Store(id='post-export-complete-judge-container'),
# 绑定的导出组件
dcc.Download(id='post-export-container'),
+ # 岗位管理模块操作类型存储容器
+ dcc.Store(id='post-operations-store'),
+ dcc.Store(id='post-operations-store-bk'),
+ # 岗位管理模块修改操作行key存储容器
+ dcc.Store(id='post-edit-id-store'),
+ # 岗位管理模块删除操作行key存储容器
+ dcc.Store(id='post-delete-ids-store'),
fac.AntdRow(
[
fac.AntdCol(
diff --git a/dash-fastapi-frontend/views/system/role/__init__.py b/dash-fastapi-frontend/views/system/role/__init__.py
index 1d42f81bc7f57f0d76db9a881de6d2e09bb6b5d2..073ff9b96526ff8d54cd470a2f2de4f9c1d810c3 100644
--- a/dash-fastapi-frontend/views/system/role/__init__.py
+++ b/dash-fastapi-frontend/views/system/role/__init__.py
@@ -119,6 +119,16 @@ def render(button_perms):
dcc.Store(id='role-export-complete-judge-container'),
# 绑定的导出组件
dcc.Download(id='role-export-container'),
+ # 角色管理模块操作类型存储容器
+ dcc.Store(id='role-operations-store'),
+ dcc.Store(id='role-operations-store-bk'),
+ # 角色管理模块修改操作行key存储容器
+ dcc.Store(id='role-edit-id-store'),
+ # 角色管理模块删除操作行key存储容器
+ dcc.Store(id='role-delete-ids-store'),
+ # 角色管理模块菜单权限存储容器
+ dcc.Store(id='role-menu-store'),
+ dcc.Store(id='current-role-menu-store'),
fac.AntdRow(
[
fac.AntdCol(
diff --git a/dash-fastapi-frontend/views/system/user/__init__.py b/dash-fastapi-frontend/views/system/user/__init__.py
index 6cfc0ffaa3423b5fd33f0ec1676f2da936c7a82a..fc81c65da071e13146d44f5978866a346be3c346 100644
--- a/dash-fastapi-frontend/views/system/user/__init__.py
+++ b/dash-fastapi-frontend/views/system/user/__init__.py
@@ -61,6 +61,12 @@ def render(button_perms):
dcc.Store(id='user-export-complete-judge-container'),
# 绑定的导出组件
dcc.Download(id='user-export-container'),
+ # 用户管理模块操作类型存储容器
+ dcc.Store(id='user-operations-store'),
+ # 用户管理模块修改操作行key存储容器
+ dcc.Store(id='user-edit-id-store'),
+ # 用户管理模块删除操作行key存储容器
+ dcc.Store(id='user-delete-ids-store'),
fac.AntdRow(
[
fac.AntdCol(
@@ -824,7 +830,7 @@ def render(button_perms):
'width': 200
}
),
- label='岗位',
+ label='角色',
id='user-edit-role-form-item',
labelCol={
'offset': 7
diff --git a/demo-pictures/zanzhu.jpg b/demo-pictures/zanzhu.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..fb6e349cfad942ed3ab5b07b186bb06a7b38d4ee
Binary files /dev/null and b/demo-pictures/zanzhu.jpg differ
diff --git "a/demo-pictures/\344\270\252\344\272\272\350\265\204\346\226\231.png" "b/demo-pictures/\344\270\252\344\272\272\350\265\204\346\226\231.png"
new file mode 100644
index 0000000000000000000000000000000000000000..505fec4b68b19abd3c1ca2fb9f61655262b0dfbd
Binary files /dev/null and "b/demo-pictures/\344\270\252\344\272\272\350\265\204\346\226\231.png" differ