Skip to content

Commit 853360d

Browse files
insistencegitee-org
authored andcommitted
!6 Dash-FastAPI-Admin v1.0.2
Merge pull request !6 from insistence/develop
2 parents 42f1884 + 95c0ff4 commit 853360d

File tree

19 files changed

+113
-104
lines changed

19 files changed

+113
-104
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<p align="center">
22
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-d3d0a9303e11d522a06cd263f3079027715.png">
33
</p>
4-
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">Dash-FastAPI-Admin v1.0.0</h1>
4+
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">Dash-FastAPI-Admin v1.0.2</h1>
55
<h4 align="center">基于Dash+FastAPI前后端分离的纯Python快速开发框架</h4>
66
<p align="center">
77
<a href="https://gitee.com/insistence2022/dash-fastapi-admin/stargazers"><img src="https://gitee.com/insistence2022/dash-fastapi-admin/badge/star.svg?theme=dark"></a>
8-
<a href="https://gitee.com/insistence2022/dash-fastapi-admin"><img src="https://img.shields.io/badge/DashFastAPIAdmin-v1.0.0-brightgreen.svg"></a>
8+
<a href="https://gitee.com/insistence2022/dash-fastapi-admin"><img src="https://img.shields.io/badge/DashFastAPIAdmin-v1.0.2-brightgreen.svg"></a>
99
<a href="https://gitee.com/insistence2022/dash-fastapi-admin/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
1010
</p>
1111

@@ -74,6 +74,7 @@ Dash-FastAPI-Admin是一套全部开源的快速开发平台,毫无保留给
7474
</tr>
7575
<tr>
7676
<td><img src="https://gitee.com/insistence2022/dash-fastapi-admin/raw/master/demo-pictures/%E7%B3%BB%E7%BB%9F%E6%8E%A5%E5%8F%A3.png"></td>
77+
<td><img src="https://gitee.com/insistence2022/dash-fastapi-admin/raw/master/demo-pictures/%E4%B8%AA%E4%BA%BA%E8%B5%84%E6%96%99.png"/></td>
7778
</tr>
7879
</table>
7980

@@ -126,8 +127,11 @@ python3 app.py
126127
地址:http://127.0.0.1:8088
127128
```
128129

129-
## 交流
130-
如果有对本项目及FastAPI感兴趣的朋友,欢迎加入知识星球一起交流学习。
131-
<p align="center">
132-
<img alt="zsxq" src="https://gitee.com/insistence2022/dash-fastapi-admin/raw/master/demo-pictures/zsxq.jpg">
133-
</p>
130+
## 交流与赞助
131+
如果有对本项目及FastAPI感兴趣的朋友,欢迎加入知识星球一起交流学习,让我们一起变得更强。如果你觉得这个项目帮助到了你,你可以请作者喝杯咖啡表示鼓励☕。
132+
<table>
133+
<tr>
134+
<td><img alt="zsxq" src="https://gitee.com/insistence2022/dash-fastapi-admin/raw/master/demo-pictures/zsxq.jpg"></td>
135+
<td><img alt="zanzhu" src="https://gitee.com/insistence2022/dash-fastapi-admin/raw/master/demo-pictures/zanzhu.jpg"></td>
136+
</tr>
137+
</table>

dash-fastapi-backend/sql/dash-fastapi.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ CREATE TABLE `sys_config` (
107107
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');
108108
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关闭)');
109109
INSERT INTO `sys_config` VALUES (3, '用户登录-黑名单列表', 'sys.login.blackIPList', '', 'Y', 'admin', '2023-05-23 16:13:34', '', NULL, '设置登录IP黑名单限制,多个匹配项以;分隔,支持匹配(*通配、网段)');
110+
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关闭)');
110111

111112
-- ----------------------------
112113
-- Table structure for sys_dept

dash-fastapi-frontend/callbacks/system_c/user_c/user_c.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ def usr_add_confirm(add_confirm, nick_name, dept_id, phone_number, email, user_n
271271
if all([nick_name, user_name, password]):
272272
params = dict(nick_name=nick_name, dept_id=dept_id, phonenumber=phone_number,
273273
email=email, user_name=user_name, password=password, sex=sex,
274-
status=status, post_id=','.join(map(str, post)), role_id=','.join(map(str, role)),
275-
remark=remark)
274+
status=status, post_id=','.join(map(str, post)) if post else '',
275+
role_id=','.join(map(str, role)) if role else '', remark=remark)
276276
add_button_result = add_user_api(params)
277277

278278
if add_button_result['code'] == 200:

dash-fastapi-frontend/store/store.py

Lines changed: 0 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -19,97 +19,5 @@ def render_store_container():
1919
dcc.Store(id='menu-list-store-container'),
2020
# 菜单current_key存储容器
2121
dcc.Store(id='current-key-container'),
22-
# 用户管理模块操作类型存储容器
23-
dcc.Store(id='user-operations-store'),
24-
# 用户管理模块修改操作行key存储容器
25-
dcc.Store(id='user-edit-id-store'),
26-
# 用户管理模块删除操作行key存储容器
27-
dcc.Store(id='user-delete-ids-store'),
28-
# 角色管理模块操作类型存储容器
29-
dcc.Store(id='role-operations-store'),
30-
dcc.Store(id='role-operations-store-bk'),
31-
# 角色管理模块修改操作行key存储容器
32-
dcc.Store(id='role-edit-id-store'),
33-
# 角色管理模块删除操作行key存储容器
34-
dcc.Store(id='role-delete-ids-store'),
35-
# 角色管理模块菜单权限存储容器
36-
dcc.Store(id='role-menu-store'),
37-
dcc.Store(id='current-role-menu-store'),
38-
# 菜单管理模块操作类型存储容器
39-
dcc.Store(id='menu-operations-store'),
40-
dcc.Store(id='menu-operations-store-bk'),
41-
# modal菜单类型存储容器
42-
dcc.Store(id='menu-modal-menu-type-store'),
43-
# 不同菜单类型的触发器
44-
dcc.Store(id='menu-modal-M-trigger'),
45-
dcc.Store(id='menu-modal-C-trigger'),
46-
dcc.Store(id='menu-modal-F-trigger'),
47-
# 菜单管理模块修改操作行key存储容器
48-
dcc.Store(id='menu-edit-id-store'),
49-
# 菜单管理模块删除操作行key存储容器
50-
dcc.Store(id='menu-delete-ids-store'),
51-
# 部门管理模块操作类型存储容器
52-
dcc.Store(id='dept-operations-store'),
53-
dcc.Store(id='dept-operations-store-bk'),
54-
# 部门管理模块修改操作行key存储容器
55-
dcc.Store(id='dept-edit-id-store'),
56-
# 部门管理模块删除操作行key存储容器
57-
dcc.Store(id='dept-delete-ids-store'),
58-
# 岗位管理模块操作类型存储容器
59-
dcc.Store(id='post-operations-store'),
60-
dcc.Store(id='post-operations-store-bk'),
61-
# 岗位管理模块修改操作行key存储容器
62-
dcc.Store(id='post-edit-id-store'),
63-
# 岗位管理模块删除操作行key存储容器
64-
dcc.Store(id='post-delete-ids-store'),
65-
# 字典管理模块操作类型存储容器
66-
dcc.Store(id='dict_type-operations-store'),
67-
dcc.Store(id='dict_type-operations-store-bk'),
68-
dcc.Store(id='dict_data-operations-store'),
69-
dcc.Store(id='dict_data-operations-store-bk'),
70-
# 字典管理模块修改操作行key存储容器
71-
dcc.Store(id='dict_type-edit-id-store'),
72-
dcc.Store(id='dict_data-edit-id-store'),
73-
# 字典管理模块删除操作行key存储容器
74-
dcc.Store(id='dict_type-delete-ids-store'),
75-
dcc.Store(id='dict_data-delete-ids-store'),
76-
# 参数管理模块操作类型存储容器
77-
dcc.Store(id='config-operations-store'),
78-
dcc.Store(id='config-operations-store-bk'),
79-
# 参数管理模块修改操作行key存储容器
80-
dcc.Store(id='config-edit-id-store'),
81-
# 参数管理模块删除操作行key存储容器
82-
dcc.Store(id='config-delete-ids-store'),
83-
# 通知公告管理模块操作类型存储容器
84-
dcc.Store(id='notice-operations-store'),
85-
dcc.Store(id='notice-operations-store-bk'),
86-
# 通知公告管理模块修改操作行key存储容器
87-
dcc.Store(id='notice-edit-id-store'),
88-
# 通知公告管理模块删除操作行key存储容器
89-
dcc.Store(id='notice-delete-ids-store'),
90-
# 操作日志管理模块操作类型存储容器
91-
dcc.Store(id='operation_log-operations-store'),
92-
# 操作日志管理模块删除操作行key存储容器
93-
dcc.Store(id='operation_log-delete-ids-store'),
94-
# 登录日志管理模块操作类型存储容器
95-
dcc.Store(id='login_log-operations-store'),
96-
# 操作日志管理模块删除操作行key存储容器
97-
dcc.Store(id='login_log-delete-ids-store'),
98-
# 在线用户模块操作类型存储容器
99-
dcc.Store(id='online-operations-store'),
100-
dcc.Store(id='online-operations-store-bk'),
101-
# 在线用户模块删除操作行key存储容器
102-
dcc.Store(id='online-delete-ids-store'),
103-
# 定时任务模块操作类型存储容器
104-
dcc.Store(id='job-operations-store'),
105-
dcc.Store(id='job-operations-store-bk'),
106-
# 定时任务模块修改操作行key存储容器
107-
dcc.Store(id='job-edit-id-store'),
108-
# 定时任务模块删除操作行key存储容器
109-
dcc.Store(id='job-delete-ids-store'),
110-
# 定时任务日志管理模块操作类型存储容器
111-
dcc.Store(id='job_log-operations-store'),
112-
# 定时任务日志管理模块删除操作行key存储容器
113-
dcc.Store(id='job_log-delete-ids-store'),
11422
]
11523
)

dash-fastapi-frontend/views/login.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@
77

88
def render_content():
99
captcha_enabled_info = query_config_list_api(config_key='sys.account.captchaEnabled')
10+
forget_enabled_info = query_config_list_api(config_key='sys.account.forgetUser')
1011
captcha_hidden = False
12+
forget_show = True
1113
if captcha_enabled_info.get('code') == 200:
1214
captcha_hidden = False if captcha_enabled_info.get('data') == 'true' else True
15+
if forget_enabled_info.get('code') == 200:
16+
forget_show = False if forget_enabled_info.get('data') == 'false' else True
1317

1418
return html.Div(
1519
[
@@ -139,7 +143,7 @@ def render_content():
139143
],
140144
align='center',
141145
size=240
142-
),
146+
) if forget_show else [],
143147
fac.AntdFormItem(
144148
fac.AntdButton(
145149
'登录',
@@ -176,7 +180,7 @@ def render_content():
176180
fac.AntdFooter(
177181
html.Div(
178182
fac.AntdText(
179-
'版权所有©2023 Dash-FastAPI',
183+
'版权所有©2023 Dash-FastAPI-Admin',
180184
style={
181185
'margin': '0'
182186
}

dash-fastapi-frontend/views/monitor/job/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,17 @@ def render(button_perms):
7272
dcc.Store(id='job-export-complete-judge-container'),
7373
# 绑定的导出组件
7474
dcc.Download(id='job-export-container'),
75+
# 定时任务模块操作类型存储容器
76+
dcc.Store(id='job-operations-store'),
77+
dcc.Store(id='job-operations-store-bk'),
78+
# 定时任务模块修改操作行key存储容器
79+
dcc.Store(id='job-edit-id-store'),
80+
# 定时任务模块删除操作行key存储容器
81+
dcc.Store(id='job-delete-ids-store'),
82+
# 定时任务日志管理模块操作类型存储容器
83+
dcc.Store(id='job_log-operations-store'),
84+
# 定时任务日志管理模块删除操作行key存储容器
85+
dcc.Store(id='job_log-delete-ids-store'),
7586
fac.AntdRow(
7687
[
7788
fac.AntdCol(

dash-fastapi-frontend/views/monitor/logininfor/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ def render(button_perms):
3131
dcc.Store(id='login_log-export-complete-judge-container'),
3232
# 绑定的导出组件
3333
dcc.Download(id='login_log-export-container'),
34+
# 登录日志管理模块操作类型存储容器
35+
dcc.Store(id='login_log-operations-store'),
36+
# 登录日志管理模块删除操作行key存储容器
37+
dcc.Store(id='login_log-delete-ids-store'),
3438
fac.AntdRow(
3539
[
3640
fac.AntdCol(

dash-fastapi-frontend/views/monitor/online/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ def render(button_perms):
3030

3131
return [
3232
dcc.Store(id='online-button-perms-container', data=button_perms),
33+
# 在线用户模块操作类型存储容器
34+
dcc.Store(id='online-operations-store'),
35+
dcc.Store(id='online-operations-store-bk'),
36+
# 在线用户模块删除操作行key存储容器
37+
dcc.Store(id='online-delete-ids-store'),
3338
fac.AntdRow(
3439
[
3540
fac.AntdCol(

dash-fastapi-frontend/views/monitor/operlog/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ def render(button_perms):
5757
dcc.Store(id='operation_log-export-complete-judge-container'),
5858
# 绑定的导出组件
5959
dcc.Download(id='operation_log-export-container'),
60+
# 操作日志管理模块操作类型存储容器
61+
dcc.Store(id='operation_log-operations-store'),
62+
# 操作日志管理模块删除操作行key存储容器
63+
dcc.Store(id='operation_log-delete-ids-store'),
6064
fac.AntdRow(
6165
[
6266
fac.AntdCol(

dash-fastapi-frontend/views/system/config/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ def render(button_perms):
4343
dcc.Store(id='config-export-complete-judge-container'),
4444
# 绑定的导出组件
4545
dcc.Download(id='config-export-container'),
46+
# 参数管理模块操作类型存储容器
47+
dcc.Store(id='config-operations-store'),
48+
dcc.Store(id='config-operations-store-bk'),
49+
# 参数管理模块修改操作行key存储容器
50+
dcc.Store(id='config-edit-id-store'),
51+
# 参数管理模块删除操作行key存储容器
52+
dcc.Store(id='config-delete-ids-store'),
4653
fac.AntdRow(
4754
[
4855
fac.AntdCol(

0 commit comments

Comments
 (0)