diff --git a/migrations/versions/b2c3d4e5f6a7_fix_cookie_menu_open_type.py b/migrations/versions/b2c3d4e5f6a7_fix_cookie_menu_open_type.py new file mode 100644 index 0000000..451ec6f --- /dev/null +++ b/migrations/versions/b2c3d4e5f6a7_fix_cookie_menu_open_type.py @@ -0,0 +1,33 @@ +"""fix cookie menu open_type to _iframe + +Cookie 管理下的「登录用户」/「登录网站」菜单项在 admin_power 表中 +open_type 为 NULL,导致点击时没有被以 iframe 方式加载进内容区, +表格无法显示、页面被弹到独立窗口(表现为侧栏父菜单点不开子菜单)。 +修正为 _iframe 与框架其它页面保持一致。 + +Revision ID: b2c3d4e5f6a7 +Revises: 1230ff234df9 +""" +from alembic import op + + +# revision identifiers, used by Alembic. +revision = 'b2c3d4e5f6a7' +down_revision = '1230ff234df9' +branch_labels = None +depends_on = None + + +def upgrade(): + op.execute( + "UPDATE admin_power SET open_type='_iframe' " + "WHERE url IN ('/system/cookie-user/', '/system/cookie-site/') " + "AND (open_type IS NULL OR open_type='')" + ) + + +def downgrade(): + op.execute( + "UPDATE admin_power SET open_type=NULL " + "WHERE url IN ('/system/cookie-user/', '/system/cookie-site/')" + ) diff --git a/plugins/cookieManager/templates/system/cookie_user/main.html b/plugins/cookieManager/templates/system/cookie_user/main.html index 563da23..4298d42 100644 --- a/plugins/cookieManager/templates/system/cookie_user/main.html +++ b/plugins/cookieManager/templates/system/cookie_user/main.html @@ -1,37 +1,37 @@ - - + + 登录用户 {% include 'system/common/header.html' %} - + {# 查询表单 #} -
-
-
-
- -
- +
+
+ +
+ +
+
- -
- + +
+
- -
- + + +
- -
@@ -39,9 +39,9 @@
{# 用户表格 #} -
-
- +
+
+