Skip to content

Commit e4b86c6

Browse files
committed
perf:将各模块store容器由全局缓存拆分至各模块页面
1 parent a99fcb0 commit e4b86c6

File tree

14 files changed

+95
-95
lines changed

14 files changed

+95
-95
lines changed

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/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(

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ def render(button_perms):
6767

6868
return [
6969
dcc.Store(id='dept-button-perms-container', data=button_perms),
70+
# 部门管理模块操作类型存储容器
71+
dcc.Store(id='dept-operations-store'),
72+
dcc.Store(id='dept-operations-store-bk'),
73+
# 部门管理模块修改操作行key存储容器
74+
dcc.Store(id='dept-edit-id-store'),
75+
# 部门管理模块删除操作行key存储容器
76+
dcc.Store(id='dept-delete-ids-store'),
7077
fac.AntdRow(
7178
[
7279
fac.AntdCol(

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,17 @@ def render(button_perms):
4848
dcc.Store(id='dict_type-export-complete-judge-container'),
4949
# 绑定的导出组件
5050
dcc.Download(id='dict_type-export-container'),
51+
# 字典管理模块操作类型存储容器
52+
dcc.Store(id='dict_type-operations-store'),
53+
dcc.Store(id='dict_type-operations-store-bk'),
54+
dcc.Store(id='dict_data-operations-store'),
55+
dcc.Store(id='dict_data-operations-store-bk'),
56+
# 字典管理模块修改操作行key存储容器
57+
dcc.Store(id='dict_type-edit-id-store'),
58+
dcc.Store(id='dict_data-edit-id-store'),
59+
# 字典管理模块删除操作行key存储容器
60+
dcc.Store(id='dict_type-delete-ids-store'),
61+
dcc.Store(id='dict_data-delete-ids-store'),
5162
fac.AntdRow(
5263
[
5364
fac.AntdCol(

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,19 @@ def render(button_perms):
6363

6464
return [
6565
dcc.Store(id='menu-button-perms-container', data=button_perms),
66+
# 菜单管理模块操作类型存储容器
67+
dcc.Store(id='menu-operations-store'),
68+
dcc.Store(id='menu-operations-store-bk'),
69+
# modal菜单类型存储容器
70+
dcc.Store(id='menu-modal-menu-type-store'),
71+
# 不同菜单类型的触发器
72+
dcc.Store(id='menu-modal-M-trigger'),
73+
dcc.Store(id='menu-modal-C-trigger'),
74+
dcc.Store(id='menu-modal-F-trigger'),
75+
# 菜单管理模块修改操作行key存储容器
76+
dcc.Store(id='menu-edit-id-store'),
77+
# 菜单管理模块删除操作行key存储容器
78+
dcc.Store(id='menu-delete-ids-store'),
6679
fac.AntdRow(
6780
[
6881
fac.AntdCol(

0 commit comments

Comments
 (0)