Browse Source

新增是否开启页签功能

RuoYi 3 years ago
parent
commit
ff3d2134a5

+ 23 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysIndexController.java

@@ -55,7 +55,11 @@ public class SysIndexController extends BaseController
         mmap.put("user", user);
         mmap.put("sideTheme", configService.selectConfigByKey("sys.index.sideTheme"));
         mmap.put("skinName", configService.selectConfigByKey("sys.index.skinName"));
-        mmap.put("ignoreFooter", configService.selectConfigByKey("sys.index.ignoreFooter"));
+        Boolean footer = Convert.toBool(configService.selectConfigByKey("sys.index.footer"));
+        Boolean tagsView = Convert.toBool(configService.selectConfigByKey("sys.index.tagsView"));
+        mmap.put("footer", footer);
+        mmap.put("tagsView", tagsView);
+        mmap.put("mainClass", contentMainClass(footer, tagsView));
         mmap.put("copyrightYear", RuoYiConfig.getCopyrightYear());
         mmap.put("demoEnabled", RuoYiConfig.isDemoEnabled());
         mmap.put("isDefaultModifyPwd", initPasswordIsModify(user.getPwdUpdateDate()));
@@ -130,6 +134,24 @@ public class SysIndexController extends BaseController
         return "main";
     }
 
+    // content-main class
+    public String contentMainClass(Boolean footer, Boolean tagsView)
+    {
+        if (!footer && !tagsView)
+        {
+            return "tagsview-footer-hide";
+        }
+        else if (!footer)
+        {
+            return "footer-hide";
+        }
+        else if (!tagsView)
+        {
+            return "tagsview-hide";
+        }
+        return StringUtils.EMPTY;
+    }
+
     // 检查初始密码是否提醒修改
     public boolean initPasswordIsModify(Date pwdUpdateDate)
     {

+ 15 - 0
ruoyi-admin/src/main/resources/static/css/style.css

@@ -3344,6 +3344,21 @@ nav.page-tabs .page-tabs-content {
     overflow: hidden;
 }
 
+.tagsview-hide#content-main {
+    height: calc(100% - 88px);
+    overflow: hidden;
+}
+
+.footer-hide#content-main {
+    height: calc(100% - 91px);
+    overflow: hidden;
+}
+
+.tagsview-footer-hide#content-main {
+    height: calc(100% - 52px);
+    overflow: hidden;
+}
+
 .fixed-nav #content-main {
     height: calc(100% - 80px);
     overflow: hidden;

File diff suppressed because it is too large
+ 0 - 0
ruoyi-admin/src/main/resources/static/css/style.min.css


+ 4 - 4
ruoyi-admin/src/main/resources/templates/index-topnav.html

@@ -279,7 +279,7 @@
                 </ul>
             </nav>
         </div>
-        <div class="row content-tabs">
+        <div class="row content-tabs" th:classappend="${#bools.isFalse(tagsView)} ? |hide|">
             <button class="roll-nav roll-left tabLeft">
                 <i class="fa fa-backward"></i>
             </button>
@@ -296,12 +296,12 @@
 
         <a id="ax_close_max" class="ax_close_max" href="#" title="关闭全屏"> <i class="fa fa-times-circle-o"></i> </a>
 
-        <div class="row mainContent" id="content-main" th:style="${#bools.isFalse(ignoreFooter)} ? |height: calc(100% - 91px)|">
+        <div class="row mainContent" id="content-main" th:classappend="${mainClass}">
             <iframe class="RuoYi_iframe" name="iframe0" width="100%" height="100%" th:data-id="@{/system/main}"
-                    th:src="@{/system/main}" frameborder="0" seamless></iframe>
+                th:src="@{/system/main}" frameborder="0" seamless></iframe>
         </div>
         
-        <div th:if="${ignoreFooter}" class="footer">
+        <div th:if="${footer}" class="footer">
             <div class="pull-right">© [[${copyrightYear}]] RuoYi Copyright </div>
         </div>
     </div>

+ 5 - 5
ruoyi-admin/src/main/resources/templates/index.html

@@ -226,7 +226,7 @@
                 </ul>
             </nav>
         </div>
-        <div class="row content-tabs">
+        <div class="row content-tabs" th:classappend="${#bools.isFalse(tagsView)} ? |hide|">
             <button class="roll-nav roll-left tabLeft">
                 <i class="fa fa-backward"></i>
             </button>
@@ -243,12 +243,12 @@
 
         <a id="ax_close_max" class="ax_close_max" href="#" title="关闭全屏"> <i class="fa fa-times-circle-o"></i> </a>
 
-        <div class="row mainContent" id="content-main" th:style="${#bools.isFalse(ignoreFooter)} ? |height: calc(100% - 91px)|">
+        <div class="row mainContent" id="content-main" th:classappend="${mainClass}">
             <iframe class="RuoYi_iframe" name="iframe0" width="100%" height="100%" th:data-id="@{/system/main}"
-                    th:src="@{/system/main}" frameborder="0" seamless></iframe>
+                th:src="@{/system/main}" frameborder="0" seamless></iframe>
         </div>
-        
-        <div th:if="${ignoreFooter}" class="footer">
+
+        <div th:if="${footer}" class="footer">
             <div class="pull-right">© [[${copyrightYear}]] RuoYi Copyright </div>
         </div>
     </div>

+ 10 - 9
sql/ry_20210210.sql → sql/ry_20210924.sql

@@ -535,15 +535,16 @@ create table sys_config (
   primary key (config_id)
 ) engine=innodb auto_increment=100 comment = '参数配置表';
 
-insert into sys_config values(1, '主框架页-默认皮肤样式名称',     'sys.index.skinName',               'skin-blue',     'Y', 'admin', sysdate(), '', null, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow');
-insert into sys_config values(2, '用户管理-账号初始密码',         'sys.user.initPassword',            '123456',        'Y', 'admin', sysdate(), '', null, '初始化密码 123456');
-insert into sys_config values(3, '主框架页-侧边栏主题',           'sys.index.sideTheme',              'theme-dark',    'Y', 'admin', sysdate(), '', null, '深黑主题theme-dark,浅色主题theme-light,深蓝主题theme-blue');
-insert into sys_config values(4, '账号自助-是否开启用户注册功能', 'sys.account.registerUser',         'false',         'Y', 'admin', sysdate(), '', null, '是否开启注册用户功能(true开启,false关闭)');
-insert into sys_config values(5, '用户管理-密码字符范围',         'sys.account.chrtype',              '0',             'Y', 'admin', sysdate(), '', null, '默认任意字符范围,0任意(密码可以输入任意字符),1数字(密码只能为0-9数字),2英文字母(密码只能为a-z和A-Z字母),3字母和数字(密码必须包含字母,数字),4字母数字和特殊字符(目前支持的特殊字符包括:~!@#$%^&*()-=_+)');
-insert into sys_config values(6, '用户管理-初始密码修改策略',     'sys.account.initPasswordModify',   '0',             'Y', 'admin', sysdate(), '', null, '0:初始密码修改策略关闭,没有任何提示,1:提醒用户,如果未修改初始密码,则在登录时就会提醒修改密码对话框');
-insert into sys_config values(7, '用户管理-账号密码更新周期',     'sys.account.passwordValidateDays', '0',             'Y', 'admin', sysdate(), '', null, '密码更新周期(填写数字,数据初始化值为0不限制,若修改必须为大于0小于365的正整数),如果超过这个周期登录系统时,则在登录时就会提醒修改密码对话框');
-insert into sys_config values(8, '主框架页-菜单导航显示风格',     'sys.index.menuStyle',              'default',       'Y', 'admin', sysdate(), '', null, '菜单导航显示风格(default为左侧导航菜单,topnav为顶部导航菜单)');
-insert into sys_config values(9, '主框架页-是否开启页脚',         'sys.index.ignoreFooter',           'true',          'Y', 'admin', sysdate(), '', null, '是否开启底部页脚显示(true显示,false隐藏)');
+insert into sys_config values(1,  '主框架页-默认皮肤样式名称',     'sys.index.skinName',               'skin-blue',     'Y', 'admin', sysdate(), '', null, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow');
+insert into sys_config values(2,  '用户管理-账号初始密码',         'sys.user.initPassword',            '123456',        'Y', 'admin', sysdate(), '', null, '初始化密码 123456');
+insert into sys_config values(3,  '主框架页-侧边栏主题',           'sys.index.sideTheme',              'theme-dark',    'Y', 'admin', sysdate(), '', null, '深黑主题theme-dark,浅色主题theme-light,深蓝主题theme-blue');
+insert into sys_config values(4,  '账号自助-是否开启用户注册功能', 'sys.account.registerUser',         'false',         'Y', 'admin', sysdate(), '', null, '是否开启注册用户功能(true开启,false关闭)');
+insert into sys_config values(5,  '用户管理-密码字符范围',         'sys.account.chrtype',              '0',             'Y', 'admin', sysdate(), '', null, '默认任意字符范围,0任意(密码可以输入任意字符),1数字(密码只能为0-9数字),2英文字母(密码只能为a-z和A-Z字母),3字母和数字(密码必须包含字母,数字),4字母数字和特殊字符(目前支持的特殊字符包括:~!@#$%^&*()-=_+)');
+insert into sys_config values(6,  '用户管理-初始密码修改策略',     'sys.account.initPasswordModify',   '0',             'Y', 'admin', sysdate(), '', null, '0:初始密码修改策略关闭,没有任何提示,1:提醒用户,如果未修改初始密码,则在登录时就会提醒修改密码对话框');
+insert into sys_config values(7,  '用户管理-账号密码更新周期',     'sys.account.passwordValidateDays', '0',             'Y', 'admin', sysdate(), '', null, '密码更新周期(填写数字,数据初始化值为0不限制,若修改必须为大于0小于365的正整数),如果超过这个周期登录系统时,则在登录时就会提醒修改密码对话框');
+insert into sys_config values(8,  '主框架页-菜单导航显示风格',     'sys.index.menuStyle',              'default',       'Y', 'admin', sysdate(), '', null, '菜单导航显示风格(default为左侧导航菜单,topnav为顶部导航菜单)');
+insert into sys_config values(9,  '主框架页-是否开启页脚',         'sys.index.footer',                 'true',          'Y', 'admin', sysdate(), '', null, '是否开启底部页脚显示(true显示,false隐藏)');
+insert into sys_config values(10, '主框架页-是否开启页签',         'sys.index.tagsView',               'true',          'Y', 'admin', sysdate(), '', null, '是否开启菜单多页签显示(true显示,false隐藏)');
 
 
 -- ----------------------------

Some files were not shown because too many files changed in this diff