From c05bf5db3ec9f45e8ce3d02d323741f1b397652c Mon Sep 17 00:00:00 2001 From: wangcl Date: Tue, 9 Nov 2021 16:33:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=92=8C=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=89=88=E6=9D=83=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 278 +- .../extensions/tree/bootstrap-table-tree.js | 1 - .../tree/bootstrap-table-tree.min.js | 7 +- .../ajax/libs/fullscreen/jquery.fullscreen.js | 361 ++- .../ajax/libs/layer/theme/moon/style.css | 1 - .../main/resources/static/ruoyi/css/ry-ui.css | 2357 ++++++++--------- .../src/main/resources/static/ruoyi/index.js | 1297 +++++---- .../main/resources/static/ruoyi/js/common.js | 1 - .../main/resources/static/ruoyi/js/ry-ui.js | 1 - .../resources/templates/index-topnav.html | 884 +++---- .../src/main/resources/templates/index.html | 754 +++--- .../src/main/resources/templates/login.html | 164 +- sql/busi_20211108.sql | 16 +- sql/ry_20210924.sql | 36 +- 14 files changed, 3075 insertions(+), 3083 deletions(-) diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index a29d55916..9b8538a8c 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -1,139 +1,139 @@ -# 项目相关配置 -ruoyi: - # 名称 - name: RuoYi - # 版本 - version: 4.7.0 - # 版权年份 - copyrightYear: 2021 - # 实例演示开关 - demoEnabled: true - # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) - profile: /Users/mac/WangCL/ruoyi_file - # 获取ip地址开关 - addressEnabled: false - -# 开发环境配置 -server: - # 服务器的HTTP端口,默认为80 - port: 80 - servlet: - # 应用的访问路径 - context-path: / - tomcat: - # tomcat的URI编码 - uri-encoding: UTF-8 - # tomcat最大线程数,默认为200 - max-threads: 800 - # Tomcat启动初始化的线程数,默认值25 - min-spare-threads: 30 - -# 日志配置 -logging: - level: - com.ruoyi: debug - org.springframework: warn - -# 用户配置 -user: - password: - # 密码错误{maxRetryCount}次锁定10分钟 - maxRetryCount: 5 - -# Spring配置 -spring: - # 模板引擎 - thymeleaf: - mode: HTML - encoding: utf-8 - # 禁用缓存 - cache: false - # 资源信息 - messages: - # 国际化资源文件路径 - basename: static/i18n/messages - jackson: - time-zone: GMT+8 - date-format: yyyy-MM-dd HH:mm:ss - profiles: - active: druid - # 文件上传 - servlet: - multipart: - # 单个文件大小 - max-file-size: 10MB - # 设置总上传的文件大小 - max-request-size: 20MB - # 服务模块 - devtools: - restart: - # 热部署开关 - enabled: true - -# MyBatis -mybatis: - # 搜索指定包别名 - typeAliasesPackage: com.ruoyi.**.domain - # 配置mapper的扫描,找到所有的mapper.xml映射文件 - mapperLocations: classpath*:mapper/**/*Mapper.xml - # 加载全局的配置文件 - configLocation: classpath:mybatis/mybatis-config.xml - -# PageHelper分页插件 -pagehelper: - helperDialect: mysql - supportMethodsArguments: true - params: count=countSql - -# Shiro -shiro: - user: - # 登录地址 - loginUrl: /login - # 权限认证失败地址 - unauthorizedUrl: /unauth - # 首页地址 - indexUrl: /index - # 验证码开关 - captchaEnabled: true - # 验证码类型 math 数组计算 char 字符 - captchaType: math - cookie: - # 设置Cookie的域名 默认空,即当前访问的域名 - domain: - # 设置cookie的有效访问路径 - path: / - # 设置HttpOnly属性 - httpOnly: true - # 设置Cookie的过期时间,天为单位 - maxAge: 30 - # 设置密钥,务必保持唯一性(生成方式,直接拷贝到main运行即可)Base64.encodeToString(CipherUtils.generateNewKey(128, "AES").getEncoded()) (默认启动生成随机秘钥,随机秘钥会导致之前客户端RememberMe Cookie无效,如设置固定秘钥RememberMe Cookie则有效) - cipherKey: - session: - # Session超时时间,-1代表永不过期(默认30分钟) - expireTime: 30 - # 同步session到数据库的周期(默认1分钟) - dbSyncPeriod: 1 - # 相隔多久检查一次session的有效性,默认就是10分钟 - validationInterval: 10 - # 同一个用户最大会话数,比如2的意思是同一个账号允许最多同时两个人登录(默认-1不限制) - maxSession: -1 - # 踢出之前登录的/之后登录的用户,默认踢出之前登录的用户 - kickoutAfter: false - rememberMe: - # 是否开启记住我 - enabled: true - -# 防止XSS攻击 -xss: - # 过滤开关 - enabled: true - # 排除链接(多个用逗号分隔) - excludes: /system/notice/* - # 匹配链接 - urlPatterns: /system/*,/monitor/*,/tool/* - -# Swagger配置 -swagger: - # 是否开启swagger - enabled: true +# 项目相关配置 +ruoyi: + # 名称 + name: YiYi + # 版本 + version: 1.0.0 + # 版权年份 + copyrightYear: 2021 + # 实例演示开关 + demoEnabled: true + # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) + profile: /Users/mac/WangCL/ruoyi_file + # 获取ip地址开关 + addressEnabled: false + +# 开发环境配置 +server: + # 服务器的HTTP端口,默认为80 + port: 80 + servlet: + # 应用的访问路径 + context-path: / + tomcat: + # tomcat的URI编码 + uri-encoding: UTF-8 + # tomcat最大线程数,默认为200 + max-threads: 800 + # Tomcat启动初始化的线程数,默认值25 + min-spare-threads: 30 + +# 日志配置 +logging: + level: + com.ruoyi: debug + org.springframework: warn + +# 用户配置 +user: + password: + # 密码错误{maxRetryCount}次锁定10分钟 + maxRetryCount: 5 + +# Spring配置 +spring: + # 模板引擎 + thymeleaf: + mode: HTML + encoding: utf-8 + # 禁用缓存 + cache: false + # 资源信息 + messages: + # 国际化资源文件路径 + basename: static/i18n/messages + jackson: + time-zone: GMT+8 + date-format: yyyy-MM-dd HH:mm:ss + profiles: + active: druid + # 文件上传 + servlet: + multipart: + # 单个文件大小 + max-file-size: 10MB + # 设置总上传的文件大小 + max-request-size: 20MB + # 服务模块 + devtools: + restart: + # 热部署开关 + enabled: true + +# MyBatis +mybatis: + # 搜索指定包别名 + typeAliasesPackage: com.ruoyi.**.domain + # 配置mapper的扫描,找到所有的mapper.xml映射文件 + mapperLocations: classpath*:mapper/**/*Mapper.xml + # 加载全局的配置文件 + configLocation: classpath:mybatis/mybatis-config.xml + +# PageHelper分页插件 +pagehelper: + helperDialect: mysql + supportMethodsArguments: true + params: count=countSql + +# Shiro +shiro: + user: + # 登录地址 + loginUrl: /login + # 权限认证失败地址 + unauthorizedUrl: /unauth + # 首页地址 + indexUrl: /index + # 验证码开关 + captchaEnabled: true + # 验证码类型 math 数组计算 char 字符 + captchaType: math + cookie: + # 设置Cookie的域名 默认空,即当前访问的域名 + domain: + # 设置cookie的有效访问路径 + path: / + # 设置HttpOnly属性 + httpOnly: true + # 设置Cookie的过期时间,天为单位 + maxAge: 30 + # 设置密钥,务必保持唯一性(生成方式,直接拷贝到main运行即可)Base64.encodeToString(CipherUtils.generateNewKey(128, "AES").getEncoded()) (默认启动生成随机秘钥,随机秘钥会导致之前客户端RememberMe Cookie无效,如设置固定秘钥RememberMe Cookie则有效) + cipherKey: + session: + # Session超时时间,-1代表永不过期(默认30分钟) + expireTime: 30 + # 同步session到数据库的周期(默认1分钟) + dbSyncPeriod: 1 + # 相隔多久检查一次session的有效性,默认就是10分钟 + validationInterval: 10 + # 同一个用户最大会话数,比如2的意思是同一个账号允许最多同时两个人登录(默认-1不限制) + maxSession: -1 + # 踢出之前登录的/之后登录的用户,默认踢出之前登录的用户 + kickoutAfter: false + rememberMe: + # 是否开启记住我 + enabled: true + +# 防止XSS攻击 +xss: + # 过滤开关 + enabled: true + # 排除链接(多个用逗号分隔) + excludes: /system/notice/* + # 匹配链接 + urlPatterns: /system/*,/monitor/*,/tool/* + +# Swagger配置 +swagger: + # 是否开启swagger + enabled: true diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/tree/bootstrap-table-tree.js b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/tree/bootstrap-table-tree.js index bb3002d1c..bb81a7520 100644 --- a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/tree/bootstrap-table-tree.js +++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/tree/bootstrap-table-tree.js @@ -1,6 +1,5 @@ /** * 基于bootstrapTreeTable/bootstrap-table-treegrid修改 - * Copyright (c) 2019 ruoyi */ (function($) { "use strict"; diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/tree/bootstrap-table-tree.min.js b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/tree/bootstrap-table-tree.min.js index 6055c243a..4f3991559 100644 --- a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/tree/bootstrap-table-tree.min.js +++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/tree/bootstrap-table-tree.min.js @@ -1,5 +1,4 @@ -/** - * 基于bootstrapTreeTable/bootstrap-table-treegrid修改 - * Copyright (c) 2019 ruoyi - */ +/** + * 基于bootstrapTreeTable/bootstrap-table-treegrid修改 + */ !function(e){e.fn.bootstrapTreeTable=function(t,a){var n=e(this).data("bootstrap.tree.table");if(n=n?n:e(this),"string"==typeof t){return e.fn.bootstrapTreeTable.methods[t](n,a)}t=e.extend({},e.fn.bootstrapTreeTable.defaults,t||{}),n.hasSelectItem=!1,n.data_list=null,n.data_obj=null,n.hiddenColumns=[],n.lastAjaxParams,n.isFixWidth=!1;var l=function(){d(),i(),o(),r(),c(),h(!0),n.data("bootstrap.tree.table",n)},d=function(){var a=e("
"),l=e("
");n.before(a),a.append(l),l.append(n),n.addClass("table"),t.striped&&n.addClass("table-striped"),t.bordered&&n.addClass("table-bordered"),t.hover&&n.addClass("table-hover"),t.condensed&&n.addClass("table-condensed"),n.html("")},i=function(){var a=e("
");t.toolbar&&(e(t.toolbar).addClass("tool-left"),a.append(e(t.toolbar)));var l=e('
');if(a.append(l),n.parent().before(a),t.showSearch){var d=e('');l.append(d),v(d)}if(t.showRefresh){var i=e('');l.append(i),C(i)}if(t.showColumns){var s=e('
'),o=e('');e.each(t.columns,function(t,a){if("selectItem"!=a.field){var l=null;void 0===a.visible||1==a.visible?l=e('
  • "):(l=e('
  • "),n.hiddenColumns.push(a.field)),o.append(l)}}),s.append(o),l.append(s),x()}else{e.each(t.columns,function(e,t){"selectItem"!=t.field&&void 0!==t.visible&&1!=t.visible&&n.hiddenColumns.push(t.field)})}},s=function(){e.each(n.hiddenColumns,function(e,t){n.find("."+t+"_cls").hide()})},o=function(){var a=e("");e.each(t.columns,function(t,l){var d=null;0==t&&"selectItem"==l.field?(n.hasSelectItem=!0,d=e('')):d=e(''),!n.isFixWidth&&l.width&&(n.isFixWidth=l.width.indexOf("px")>-1?!0:!1),d.html(l.title),a.append(d)});var l=e('');l.append(a),n.append(l)},r=function(){var a=e('');n.append(a),t.height&&a.css("height",t.height)},c=function(a){n.data_list={},n.data_obj={};var l=n.find("tbody"),d='
    正在努力地加载数据中,请稍候……
    ';l.html(d),t.url?e.ajax({type:t.type,url:t.url,data:a?a:t.ajaxParams,dataType:"JSON",success:function(e,a,n){e=y(t,t.responseHandler,[e],e),p(e),y(t,t.onLoadSuccess,[e],e)},error:function(e,a){var n='
    '+e.responseText+"
    ";l.html(n)}}):p(t.data)},p=function(a){var l=n.find("tbody");if(l.html(""),!a||a.length<=0){var d='
    没有找到匹配的记录
    ';return void l.html(d)}f(a);var i=n.data_list._root_;i&&e.each(i,function(e,t){var a="row_id_"+e;u(t,1,a,"row_root")}),e.each(a,function(e,t){if(!t.isShow){var a=b(t,!1,1,"","");l.append(a)}}),n.append(l),_(),m(),s(),h();var o=e(n).parent(".treetable-table"),r=o.outerWidth();if(e.common.isMobile()||769>r){var c="width: "+r+"px;overflow: auto;position: relative;";o.attr("style",c);var p=0;e.each(t.columns,function(e,t){p+=0==e&&"selectItem"==t.field?36:200}),e(n).attr("style","width:"+p+"px")}},h=function(a){if(t.height>0){var l=n.find("thead"),d=n.find("tbody"),i=parseInt(n.css("border-left-width"))+parseInt(n.css("border-right-width"));if(l.css("width",d.children(":first").width()),a){var s=!1;e(window).resize(function(){s||(s=!0,setTimeout(function(){n.isFixWidth||d.css("width",n.parent().width()-i),l.css("width",d.children(":first").width()),s=!1},300))})}}},f=function(a){var l=t.rootIdValue?t.rootIdValue:null,d=[],i=!1;e.each(a,function(a,n){-1==e.inArray(n[t.parentCode],d)&&d.push(n[t.parentCode])}),e.each(a,function(a,s){s.isShow=!1;var o="0"==s[t.parentCode]||0==s[t.parentCode]||null==s[t.parentCode]||""==s[t.parentCode]||e.inArray(s[t.code],d)>0&&!i;!s[t.parentCode]||(l?s[t.parentCode]==t.rootIdValue:o)?(i=!0,n.data_list._root_||(n.data_list._root_=[]),n.data_obj["id_"+s[t.code]]||n.data_list._root_.push(s)):(n.data_list["_n_"+s[t.parentCode]]||(n.data_list["_n_"+s[t.parentCode]]=[]),n.data_obj["id_"+s[t.code]]||n.data_list["_n_"+s[t.parentCode]].push(s)),n.data_obj["id_"+s[t.code]]=s})},u=function(a,l,d,i){var s=n.find("tbody"),o=n.data_list["_n_"+a[t.code]],r=b(a,o?!0:!1,l,d,i);s.append(r),o&&e.each(o,function(e,t){var a=d+"_"+e;u(t,l+1,a,d)})},b=function(a,l,d,i,s){a.isShow=!0,a.row_id=i,a.p_id=s,a.lv=d;var o=e(''),r=t.expanderCollapsedClass;return t.expandAll?(o.css("display","table"),r=t.expanderExpandedClass):1==d?(o.css("display","table"),r=t.expandFirst?t.expanderExpandedClass:t.expanderCollapsedClass):2==d?(t.expandFirst?o.css("display","table"):o.css("display","none"),r=t.expanderCollapsedClass):(o.css("display","none"),r=t.expanderCollapsedClass),e.each(t.columns,function(i,s){if("selectItem"==s.field){n.hasSelectItem=!0;var c=e('');if(s.radio){var p=e('');c.append(p)}if(s.checkbox){var p=e('');c.append(p)}o.append(c)}else{var c=e('');if(s.width&&c.css("width",s.width+(s.widthUnit?s.widthUnit:"px")),s.align&&c.css("text-align",s.align),t.expandColumn==i&&c.css("text-align","left"),s.valign&&c.css("vertical-align",s.valign),t.showTitle&&c.addClass("ellipsis"),s.formatter?c.html(s.formatter.call(this,w(a,s.field),a,i)):(t.showTitle&&c.attr("title",a[s.field]),c.text(w(a,s.field))),t.expandColumn==i){l?c.prepend(''):c.prepend('');for(var h=0;d-1>h;h++){c.prepend('')}}o.append(c)}}),o},v=function(t){e(t).off("click").on("click",function(){e(".search-collapse").slideToggle()})},C=function(t){e(t).off("click").on("click",function(){n.refresh()})},x=function(){e(".bootstrap-tree-table .treetable-bars .columns label input").off("click").on("click",function(){var t=e(this);t.prop("checked")?n.showColumn(e(this).val()):n.hideColumn(e(this).val())})},m=function(){n.find("tbody").find("tr").unbind(),n.find("tbody").find("tr").click(function(){if(n.hasSelectItem){var t=e(this).find("input[name='select_item']");"radio"==t.attr("type")?(t.prop("checked",!0),n.find("tbody").find("tr").removeClass("treetable-selected"),e(this).addClass("treetable-selected")):"checkbox"==t.attr("type")?t.prop("checked")?(t.prop("checked",!0),n.find("tbody").find("tr").removeClass("treetable-selected"),e(this).addClass("treetable-selected")):(t.prop("checked",!1),n.find("tbody").find("tr").removeClass("treetable-selected")):t.prop("checked")?(t.prop("checked",!1),e(this).removeClass("treetable-selected")):(t.prop("checked",!0),e(this).addClass("treetable-selected"))}})},_=function(){n.find("tbody").find("tr").find(".treetable-expander").unbind(),n.find("tbody").find("tr").find(".treetable-expander").click(function(){var a=e(this).hasClass(t.expanderExpandedClass),l=e(this).hasClass(t.expanderCollapsedClass);if(a||l){var d=e(this).parent().parent(),i=d.attr("id"),s=n.find("tbody").find("tr[id^='"+i+"_']");a?(e(this).removeClass(t.expanderExpandedClass),e(this).addClass(t.expanderCollapsedClass),s&&s.length>0&&e.each(s,function(t,a){e(a).css("display","none")})):(e(this).removeClass(t.expanderCollapsedClass),e(this).addClass(t.expanderExpandedClass),s&&s.length>0&&e.each(s,function(a,n){var l=e("#"+e(n).attr("pid")).children().eq(t.expandColumn).find(".treetable-expander");l.hasClass(t.expanderExpandedClass)&&e(n).css("display","table")}))}})};n.refresh=function(e){e&&(n.lastAjaxParams=e),c(n.lastAjaxParams)},n.appendData=function(a){e.each(a,function(a,l){var d,i=n.data_obj["id_"+l[t.code]],s=n.data_obj["id_"+l[t.parentCode]],o=n.data_list["_n_"+l[t.parentCode]],r="",c="",p=1;if(i&&i.row_id&&""!=i.row_id&&(r=i.row_id),s){if(c=s.row_id,""==r){var h=0;o&&o.length>0&&(h=o.length),r=s.row_id+"_"+h}p=s.lv+1,d=b(l,!1,p,r,c);var u=e("#"+s.row_id).children().eq(t.expandColumn).find(".treetable-expander"),v=u.hasClass(t.expanderExpandedClass),C=u.hasClass(t.expanderCollapsedClass);if(v||C?v&&d.css("display","table"):u.addClass(t.expanderCollapsedClass),i){e("#"+i.row_id).before(d),e("#"+i.row_id).remove()}else{var x=s.row_id.split("_"),m=s.row_id.substring(0,s.row_id.length-1)+(parseInt(x[x.length-1])+1);e("#"+m).before(d)}}else{if(d=b(l,!1,p,r,c),i){e("#"+i.row_id).before(d),e("#"+i.row_id).remove()}else{var _=n.find("tbody");_.append(d)}}l.isShow=!0,f([l])}),_(),m(),s()},n.toggleRow=function(t){var a=n.data_obj["id_"+t],l=e("#"+a.row_id).find(".treetable-expander");l.trigger("click")},n.expandRow=function(t){var a=n.data_obj["id_"+t],l=e("#"+a.row_id).find(".treetable-expander"),d=l.hasClass(n.options.expanderCollapsedClass);d&&l.trigger("click")},n.collapseRow=function(t){var a=n.data_obj["id_"+t],l=e("#"+a.row_id).find(".treetable-expander"),d=l.hasClass(n.options.expanderExpandedClass);d&&l.trigger("click")},n.expandAll=function(){n.find("tbody").find("tr").find(".treetable-expander").each(function(a,n){var l=e(n).hasClass(t.expanderCollapsedClass);l&&e(n).trigger("click")})},n.collapseAll=function(){n.find("tbody").find("tr").find(".treetable-expander").each(function(a,n){var l=e(n).hasClass(t.expanderExpandedClass);l&&e(n).trigger("click")})},n.showColumn=function(a,l){var d=e.inArray(a,n.hiddenColumns);if(d>-1&&n.hiddenColumns.splice(d,1),n.find("."+a+"_cls").show(),l&&t.showColumns){var i=e(".bootstrap-tree-table .treetable-bars .columns label").find("input[value='"+a+"']");i.prop("checked","checked")}},n.hideColumn=function(a,l){if(n.hiddenColumns.push(a),n.find("."+a+"_cls").hide(),l&&t.showColumns){var d=e(".bootstrap-tree-table .treetable-bars .columns label").find("input[value='"+a+"']");d.prop("checked","")}};var w=function(e,t){var a=e;if("string"!=typeof t||e.hasOwnProperty(t)){return e[t]}var n=t.split(".");for(var l in n){a=a&&a[n[l]]}return a},y=function(t,a,n,l){var d=a;if("string"==typeof a){var i=a.split(".");i.length>1?(d=window,e.each(i,function(e,t){d=d[t]})):d=window[a]}return"object"==typeof d?d:"function"==typeof d?d.apply(t,n):!d&&"string"==typeof a&&sprintf.apply(this,[a].concat(n))?sprintf.apply(this,[a].concat(n)):l};return l(),n},e.fn.bootstrapTreeTable.methods={getSelections:function(t,a){var n=t.find("tbody").find("tr").find("input[name='select_item']:checked"),l=[];if("radio"==n.attr("type")){var d=t.data_obj["id_"+n.val()];l.push(d)}else{n.each(function(a,n){var d=t.data_obj["id_"+e(n).val()];l.push(d)})}return l},refresh:function(e,t){t?e.refresh(t):e.refresh()},appendData:function(e,t){t&&e.appendData(t)},toggleRow:function(e,t){e.toggleRow(t)},expandRow:function(e,t){e.expandRow(t)},collapseRow:function(e,t){e.collapseRow(t)},expandAll:function(e){e.expandAll()},collapseAll:function(e){e.collapseAll()},showColumn:function(e,t){e.showColumn(t,!0)},hideColumn:function(e,t){e.hideColumn(t,!0)}},e.fn.bootstrapTreeTable.defaults={code:"code",parentCode:"parentCode",rootIdValue:null,data:null,type:"GET",url:null,ajaxParams:{},expandColumn:0,expandAll:!1,expandFirst:!0,striped:!1,bordered:!1,hover:!0,condensed:!1,columns:[],toolbar:null,height:0,showTitle:!0,showSearch:!0,showColumns:!0,showRefresh:!0,expanderExpandedClass:"glyphicon glyphicon-chevron-down",expanderCollapsedClass:"glyphicon glyphicon-chevron-right",responseHandler:function(e){return !1},onLoadSuccess:function(e){return !1}}}(jQuery); \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/fullscreen/jquery.fullscreen.js b/ruoyi-admin/src/main/resources/static/ajax/libs/fullscreen/jquery.fullscreen.js index cc7fd51c8..094f24505 100644 --- a/ruoyi-admin/src/main/resources/static/ajax/libs/fullscreen/jquery.fullscreen.js +++ b/ruoyi-admin/src/main/resources/static/ajax/libs/fullscreen/jquery.fullscreen.js @@ -1,182 +1,181 @@ -/** - * 基于jQuery FullScreen修改 - * 新增支持IE全屏显示 - * Copyright (c) 2019 ruoyi - */ -(function(jQuery) { - - /** - * Sets or gets the fullscreen state. - * - * @param {boolean=} state - * True to enable fullscreen mode, false to disable it. If not - * specified then the current fullscreen state is returned. - * @return {boolean|Element|jQuery|null} - * When querying the fullscreen state then the current fullscreen - * element (or true if browser doesn't support it) is returned - * when browser is currently in full screen mode. False is returned - * if browser is not in full screen mode. Null is returned if - * browser doesn't support fullscreen mode at all. When setting - * the fullscreen state then the current jQuery selection is - * returned for chaining. - * @this {jQuery} - */ - function fullScreen(state) - { - var e, func, doc; - - // Do nothing when nothing was selected - if (!this.length) return this; - - // We only use the first selected element because it doesn't make sense - // to fullscreen multiple elements. - e = (/** @type {Element} */ this[0]); - - // Find the real element and the document (Depends on whether the - // document itself or a HTML element was selected) - if (e.ownerDocument) - { - doc = e.ownerDocument; - } - else - { - doc = e; - e = doc.documentElement; - } - - // When no state was specified then return the current state. - if (state == null) - { - // When fullscreen mode is not supported then return null - if (!((/** @type {?Function} */ doc["exitFullscreen"]) - || (/** @type {?Function} */ doc["webkitExitFullscreen"]) - || (/** @type {?Function} */ doc["webkitCancelFullScreen"]) - || (/** @type {?Function} */ doc["msExitFullscreen"]) - || (/** @type {?Function} */ doc["mozCancelFullScreen"]))) - { - return null; - } - - // Check fullscreen state - state = !!doc["fullscreenElement"] - || !!doc["msFullscreenElement"] - || !!doc["webkitIsFullScreen"] - || !!doc["mozFullScreen"]; - if (!state) return state; - - // Return current fullscreen element or "true" if browser doesn't - // support this - return (/** @type {?Element} */ doc["fullscreenElement"]) - || (/** @type {?Element} */ doc["webkitFullscreenElement"]) - || (/** @type {?Element} */ doc["webkitCurrentFullScreenElement"]) - || (/** @type {?Element} */ doc["msFullscreenElement"]) - || (/** @type {?Element} */ doc["mozFullScreenElement"]) - || state; - } - - // When state was specified then enter or exit fullscreen mode. - if (state) - { - // Enter fullscreen - func = (/** @type {?Function} */ e["requestFullscreen"]) - || (/** @type {?Function} */ e["webkitRequestFullscreen"]) - || (/** @type {?Function} */ e["webkitRequestFullScreen"]) - || (/** @type {?Function} */ e["msRequestFullscreen"]) - || (/** @type {?Function} */ e["mozRequestFullScreen"]); - if (func) - { - func.call(e); - } - return this; - } - else - { - // Exit fullscreen - func = (/** @type {?Function} */ doc["exitFullscreen"]) - || (/** @type {?Function} */ doc["webkitExitFullscreen"]) - || (/** @type {?Function} */ doc["webkitCancelFullScreen"]) - || (/** @type {?Function} */ doc["msExitFullscreen"]) - || (/** @type {?Function} */ doc["mozCancelFullScreen"]); - if (func) func.call(doc); - return this; - } - } - - /** - * Toggles the fullscreen mode. - * - * @return {!jQuery} - * The jQuery selection for chaining. - * @this {jQuery} - */ - function toggleFullScreen() - { - return (/** @type {!jQuery} */ fullScreen.call(this, - !fullScreen.call(this))); - } - - /** - * Handles the browser-specific fullscreenchange event and triggers - * a jquery event for it. - * - * @param {?Event} event - * The fullscreenchange event. - */ - function fullScreenChangeHandler(event) - { - jQuery(document).trigger(new jQuery.Event("fullscreenchange")); - } - - /** - * Handles the browser-specific fullscreenerror event and triggers - * a jquery event for it. - * - * @param {?Event} event - * The fullscreenerror event. - */ - function fullScreenErrorHandler(event) - { - jQuery(document).trigger(new jQuery.Event("fullscreenerror")); - } - - /** - * Installs the fullscreenchange event handler. - */ - function installFullScreenHandlers() - { - var e, change, error; - - // Determine event name - e = document; - if (e["webkitCancelFullScreen"]) - { - change = "webkitfullscreenchange"; - error = "webkitfullscreenerror"; - } - else if (e["msExitFullscreen"]) - { - change = "MSFullscreenChange"; - error = "MSFullscreenError"; - } - else if (e["mozCancelFullScreen"]) - { - change = "mozfullscreenchange"; - error = "mozfullscreenerror"; - } - else - { - change = "fullscreenchange"; - error = "fullscreenerror"; - } - - // Install the event handlers - jQuery(document).bind(change, fullScreenChangeHandler); - jQuery(document).bind(error, fullScreenErrorHandler); - } - - jQuery.fn["fullScreen"] = fullScreen; - jQuery.fn["toggleFullScreen"] = toggleFullScreen; - installFullScreenHandlers(); - - })(jQuery); +/** + * 基于jQuery FullScreen修改 + * 新增支持IE全屏显示 + */ +(function(jQuery) { + + /** + * Sets or gets the fullscreen state. + * + * @param {boolean=} state + * True to enable fullscreen mode, false to disable it. If not + * specified then the current fullscreen state is returned. + * @return {boolean|Element|jQuery|null} + * When querying the fullscreen state then the current fullscreen + * element (or true if browser doesn't support it) is returned + * when browser is currently in full screen mode. False is returned + * if browser is not in full screen mode. Null is returned if + * browser doesn't support fullscreen mode at all. When setting + * the fullscreen state then the current jQuery selection is + * returned for chaining. + * @this {jQuery} + */ + function fullScreen(state) + { + var e, func, doc; + + // Do nothing when nothing was selected + if (!this.length) return this; + + // We only use the first selected element because it doesn't make sense + // to fullscreen multiple elements. + e = (/** @type {Element} */ this[0]); + + // Find the real element and the document (Depends on whether the + // document itself or a HTML element was selected) + if (e.ownerDocument) + { + doc = e.ownerDocument; + } + else + { + doc = e; + e = doc.documentElement; + } + + // When no state was specified then return the current state. + if (state == null) + { + // When fullscreen mode is not supported then return null + if (!((/** @type {?Function} */ doc["exitFullscreen"]) + || (/** @type {?Function} */ doc["webkitExitFullscreen"]) + || (/** @type {?Function} */ doc["webkitCancelFullScreen"]) + || (/** @type {?Function} */ doc["msExitFullscreen"]) + || (/** @type {?Function} */ doc["mozCancelFullScreen"]))) + { + return null; + } + + // Check fullscreen state + state = !!doc["fullscreenElement"] + || !!doc["msFullscreenElement"] + || !!doc["webkitIsFullScreen"] + || !!doc["mozFullScreen"]; + if (!state) return state; + + // Return current fullscreen element or "true" if browser doesn't + // support this + return (/** @type {?Element} */ doc["fullscreenElement"]) + || (/** @type {?Element} */ doc["webkitFullscreenElement"]) + || (/** @type {?Element} */ doc["webkitCurrentFullScreenElement"]) + || (/** @type {?Element} */ doc["msFullscreenElement"]) + || (/** @type {?Element} */ doc["mozFullScreenElement"]) + || state; + } + + // When state was specified then enter or exit fullscreen mode. + if (state) + { + // Enter fullscreen + func = (/** @type {?Function} */ e["requestFullscreen"]) + || (/** @type {?Function} */ e["webkitRequestFullscreen"]) + || (/** @type {?Function} */ e["webkitRequestFullScreen"]) + || (/** @type {?Function} */ e["msRequestFullscreen"]) + || (/** @type {?Function} */ e["mozRequestFullScreen"]); + if (func) + { + func.call(e); + } + return this; + } + else + { + // Exit fullscreen + func = (/** @type {?Function} */ doc["exitFullscreen"]) + || (/** @type {?Function} */ doc["webkitExitFullscreen"]) + || (/** @type {?Function} */ doc["webkitCancelFullScreen"]) + || (/** @type {?Function} */ doc["msExitFullscreen"]) + || (/** @type {?Function} */ doc["mozCancelFullScreen"]); + if (func) func.call(doc); + return this; + } + } + + /** + * Toggles the fullscreen mode. + * + * @return {!jQuery} + * The jQuery selection for chaining. + * @this {jQuery} + */ + function toggleFullScreen() + { + return (/** @type {!jQuery} */ fullScreen.call(this, + !fullScreen.call(this))); + } + + /** + * Handles the browser-specific fullscreenchange event and triggers + * a jquery event for it. + * + * @param {?Event} event + * The fullscreenchange event. + */ + function fullScreenChangeHandler(event) + { + jQuery(document).trigger(new jQuery.Event("fullscreenchange")); + } + + /** + * Handles the browser-specific fullscreenerror event and triggers + * a jquery event for it. + * + * @param {?Event} event + * The fullscreenerror event. + */ + function fullScreenErrorHandler(event) + { + jQuery(document).trigger(new jQuery.Event("fullscreenerror")); + } + + /** + * Installs the fullscreenchange event handler. + */ + function installFullScreenHandlers() + { + var e, change, error; + + // Determine event name + e = document; + if (e["webkitCancelFullScreen"]) + { + change = "webkitfullscreenchange"; + error = "webkitfullscreenerror"; + } + else if (e["msExitFullscreen"]) + { + change = "MSFullscreenChange"; + error = "MSFullscreenError"; + } + else if (e["mozCancelFullScreen"]) + { + change = "mozfullscreenchange"; + error = "mozfullscreenerror"; + } + else + { + change = "fullscreenchange"; + error = "fullscreenerror"; + } + + // Install the event handlers + jQuery(document).bind(change, fullScreenChangeHandler); + jQuery(document).bind(error, fullScreenErrorHandler); + } + + jQuery.fn["fullScreen"] = fullScreen; + jQuery.fn["toggleFullScreen"] = toggleFullScreen; + installFullScreenHandlers(); + + })(jQuery); \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/layer/theme/moon/style.css b/ruoyi-admin/src/main/resources/static/ajax/libs/layer/theme/moon/style.css index 4bb62e46d..85635c72c 100644 --- a/ruoyi-admin/src/main/resources/static/ajax/libs/layer/theme/moon/style.css +++ b/ruoyi-admin/src/main/resources/static/ajax/libs/layer/theme/moon/style.css @@ -1,6 +1,5 @@ /** * layer皮肤 - * Copyright (c) 2019 ruoyi */ html #layui_layer_skinmoonstylecss { display: none; diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css b/ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css index fafbf3c86..afde09e9a 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css +++ b/ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css @@ -1,1179 +1,1178 @@ -/** - * 通用css样式布局处理 - * Copyright (c) 2019 ruoyi - */ - -/** 基础通用 **/ -.pt5 { - padding-top: 5px; -} -.pr5 { - padding-right: 5px; -} -.pb5 { - padding-bottom: 5px; -} -.mt5 { - margin-top: 5px; -} -.mr5 { - margin-right: 5px; -} -.mb5 { - margin-bottom: 5px; -} -.ml5 { - margin-left: 5px; -} -.mt10 { - margin-top: 10px; -} -.mr10 { - margin-right: 10px; -} -.mb10 { - margin-bottom: 10px; -} -.ml0 { - margin-left: 10px; -} -.mt20 { - margin-top: 20px; -} -.mr20 { - margin-right: 20px; -} -.mb20 { - margin-bottom: 20px; -} -.m20 { - margin-left: 20px; -} -.m50 { - margin-left: 50px; -} -.img-xs { - width: 32px; - height: 32px; -} -.img-sm { - width: 64px; - height: 64px; -} -.img-md { - width: 96px; - height: 96px; -} -.img-lg { - width: 120px; - height: 120px; -} -.section-content { - min-height: 250px; - margin-right: auto; - margin-left: auto; - padding: 5px 5px 5px 5px; - width: 100%; - height: 100%; - position: absolute; -} - -.ibox { - margin-bottom: 25px; - background-color: #fff; - border: 1px solid #ddd; - border-radius: 4px; - height: 100%; - -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); -} - -.list-group-striped > .list-group-item { - border-left: 0; - border-right: 0; - border-radius: 0; - padding-left: 0; - padding-right: 0 -} - -.ibox-title-gray { - height: 41px; - background-color: #f0f3f4; - color: #333; - font-weight: 700; - border-radius: 2px 2px 0 0; - padding: 13px !important; - border-bottom: 1px solid #eee; - display: block; - clear: both; -} - -.dashboard-header h5 { - padding: 8px 0 0 0; - display: inline-block; - font-size: 14px; - text-overflow: ellipsis; - float: left; - font-weight: 400; -} - -.ibox-title-gray h5 { - display: inline-block; - font-size: 14px; - margin: 0 0 7px; - padding: 0; - text-overflow: ellipsis; - float: left; -} - -/* 导航页签 */ -.nav-tabs-custom { - margin-bottom: 20px; - background: #fff; - box-shadow: 0 1px 1px rgba(0,0,0,0.1); - border-radius: 3px -} - -.nav-tabs-custom>.nav-tabs { - margin: 0; - border-bottom-color: #f4f4f4; - border-top-right-radius: 3px; - border-top-left-radius: 3px -} - -.nav-tabs-custom>.nav-tabs>li { - border-top: 3px solid transparent; - margin-bottom: -2px; - margin-right: 5px -} - -.nav-tabs-custom>.nav-tabs>li.header { - padding-left: 5px; - font-size: 16px; - line-height: 30px; -} - -.nav-tabs-custom>.nav-tabs>li.disabled>a { - color: #777 -} - -.nav-tabs-custom>.nav-tabs>li>a { - color: #444; - font-weight: normal; - border-radius: 0 -} - -.nav-tabs-custom>.nav-tabs>li>a,.nav-tabs-custom>.nav-tabs>li>a:hover { - background: transparent; - margin: 0 -} - -.nav-tabs-custom>.nav-tabs>li>a:hover { - color: #999 -} - -.nav-tabs-custom>.nav-tabs>li:not(.active)>a:hover,.nav-tabs-custom>.nav-tabs>li:not(.active)>a:focus,.nav-tabs-custom>.nav-tabs>li:not(.active)>a:active { - border-color: transparent -} - -.nav-tabs-custom>.nav-tabs>li.active { - border-top-color: #1890ff -} - -.nav-tabs-custom>.nav-tabs>li.active>a,.nav-tabs-custom>.nav-tabs>li.active:hover>a { - background-color: #fff; - color: #444 -} - -.nav-tabs-custom>.nav-tabs>li.active>a { - border-top-color: transparent; - border-bottom-color: transparent; - border-left-color: #f4f4f4; - border-right-color: #f4f4f4 -} - -.nav-tabs-custom>.tab-content { - background: #fff; - padding: 10px; - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px -} - -/** 弹层组件 禁用样式 **/ -.layer-disabled { - border: 1px #dedede solid !important; - background-color: #f1f1f1 !important; - color: #333 !important; - pointer-events: none; -} - -/** 用户管理 样式布局 **/ -.box { - position: relative; - border-radius: 3px; - background: #ffffff; - border-top: 3px solid #d2d6de; - margin-bottom: 20px; - width: 100%; - box-shadow: 0 1px 1px rgba(0,0,0,0.1) -} - -.box-header:before,.box-body:before,.box-footer:before,.box-header:after,.box-body:after,.box-footer:after { - content: " "; - display: table -} - -.box-header:after,.box-body:after,.box-footer:after { - clear: both -} - -.btn-box-tool { - padding: 5px; - font-size: 12px; - background: transparent; - color: #97a0b3; -} - -.open .btn-box-tool, -.btn-box-tool:hover { - color: #606c84; -} - -.box-main { - margin: 0; - border: 0; - padding-top: 2px; - border-radius: 0; - box-shadow: none -} - -.box-main>.box-header { - border-bottom: 1px solid #eee; - padding: 12px 10px 2px 15px -} - -.box-header .box-title { - display: inline-block; - font-size: 18px; - margin: 0; - line-height: 1; -} - -.box-main>.box-header .box-title { - font-size: 16px; - margin-bottom: 13px; - float: left -} - -.box-main>.box-header .box-title .fa { - font-size: 14px; - padding-right: 3px; - margin-top: -2px -} - -.box-main>.box-header .box-tools { - position: relative; - top: -5px; - right: 0 -} - -.box-main>.box-header .box-tools .btn { - padding: 3px 10px 5px 10px; - font-size: 14px; - margin-bottom: 2px -} - -.box-main>.box-header .box-tools .btn-box-tool { - padding: 4px 2px -} - -.box-main form>.box-footer,.nav-main form>.box-footer { - background: #fafafa -} - -.box-main form>.box-footer .row,.nav-main form>.box-footer .row { - margin: 5px 0 5px -25px -} - -@media ( min-width : 768px) { - .section-content .about { - padding-left: 0px - } -} - -/** select2 样式修改 **/ -.select2-container--default .select2-selection--multiple .select2-selection__choice { - background-color: #1AB394; - border-color: #1AB394; - padding: 1px 10px; - color: #fff -} - -.select2-container--default .select2-selection--multiple .select2-selection__choice__remove { - margin-right: 5px; - color: rgba(255,255,255,0.7) -} - -.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover { - color: #fff -} - -.select2-container .select2-selection--single .select2-selection__rendered { - padding-right: 10px -} - -/** 表单验证 样式布局 **/ -.control-label.is-required:before { - content: '* '; - color: red; -} - -label.error { - position: absolute; - right: 18px; - top: 6px; - color: #ef392b; - font-size: 12px; - z-index:99; -} - -.input-group label.error { - z-index:99; - right: 42px -} - -.input-group input.error + label.error + .input-group-addon>i { - color: #ed5565; -} - -.input-group.date label.error { - z-index:99; - right: 3px -} - -.Validform_error,input.error,textarea.error,select.error { - background-color: #fbe2e2; - border-color: #c66161; - color: #c00 -} - -.Validform_wrong,.Validform_right,.Validform_warning { - display: inline-block; - height: 20px; - font-size: 12px; - vertical-align: middle; - padding-left: 25px -} - -.i-checks label.error, .check-box label.error, .radio-box label.error { - right: auto; - width: 150px; - left: 210px; - top: 1px; - max-width: none; -} - -/** 复选框&单选框 **/ -.check-box,.radio-box { - display: inline-block; - box-sizing: border-box; - cursor: pointer; - position: relative; - padding-left: 25px; - padding-right: 15px; - padding-top: 8px; -} - -.icheckbox, .icheckbox-blue, .iradio, .iradio-blue, .iradio-purple { - position: absolute; - top: 8px; - left: 0 -} - -/** iCheck **/ -.icheckbox-blue,.iradio-blue { - display: block; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: url(../../img/blue.png) no-repeat; - border: none; - cursor: pointer -} - -.icheckbox-blue,.icheckbox-blue.static:hover { - background-position: 0 0 -} - -.icheckbox-blue.hover,.icheckbox-blue:hover { - background-position: -20px 0 -} - -.icheckbox-blue.checked { - background-position: -40px 0 -} - -.icheckbox-blue.disabled { - background-position: -60px 0; - cursor: default -} - -.icheckbox-blue.checked.disabled { - background-position: -80px 0 -} - -.iradio-blue,.iradio-blue.static:hover { - background-position: -100px 0 -} - -.iradio-blue.hover,.iradio-blue:hover { - background-position: -120px 0 -} - -.iradio-blue.checked { - background-position: -140px 0 -} - -.iradio-blue.disabled { - background-position: -160px 0; - cursor: default -} - -.iradio-blue.checked.disabled { - background-position: -180px 0 -} - -/* ztree */ -div.ztree-border { - margin-top: 10px; - border: 1px solid #e5e6e7; - background: #FFFFFF none; - border-radius:4px; -} - -/* 切换开关 */ -.toggle-switch { - display: -webkit-inline-box; - display: -webkit-inline-flex; - display: -ms-inline-flexbox; - display: inline-flex; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - margin-bottom: 0; - padding-top: 8px; -} -.toggle-switch input { - height: 0; - width: 0; - position: absolute; - opacity: 0; -} -.toggle-switch span { - display: inline-block; - position: relative; - width: 40px; - height: 10px; - -webkit-border-radius: 10px; - border-radius: 10px; - background-color: #ebebeb; - border: 2px solid #ebebeb; - cursor: pointer; - -webkit-transition: all .1s ease; - -o-transition: all .1s ease; - transition: all .1s ease -} -.toggle-switch span:after { - content: ''; - height: 20px; - width: 20px; - -webkit-border-radius: 50%; - border-radius: 50%; - position: absolute; - left: 1px; - top: -7px; - color: #aaa; - -webkit-transition: all .1s ease; - -o-transition: all .1s ease; - transition: all .1s ease; - text-align: center; - font-size: 13px; - background-color: #fff; - -webkit-box-shadow: rgba(0,0,0,.12) 0 1px 6px,rgba(0,0,0,.12) 0 1px 4px; - box-shadow: rgba(0,0,0,.12) 0 1px 6px,rgba(0,0,0,.12) 0 1px 4px -} -.toggle-switch input:checked~span:after { - left: -webkit-calc(100% - 20px); - left: calc(100% - 20px); - background-color: #33cabb -} - -.toggle-switch.switch-solid span { - height: 20px; -} -.toggle-switch.switch-solid span:after { - top: -2px; -} -.switch-solid input:checked~span { - background-color: #33cabb; - border-color: #33cabb -} -.switch-solid input:checked~span:after { - background-color: #fff; - color: #33cabb -} - -/** 遮罩层 **/ -.loaderbox { - display: inline-block; - min-width: 125px; - padding: 10px; - margin: 0 auto; - color: #000 !important; - font-size: 13px; - font-weight: 400; - text-align: center; - vertical-align: middle; - border: 1px solid #ddd; - background-color: #eee; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - -ms-border-radius: 2px; - -o-border-radius: 2px; - border-radius: 2px; - -webkit-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1); - -moz-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1); - box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1); -} - -.loaderbox .loading-activity { - float: left; - width: 18px; - height: 18px; - border: solid 2px transparent; - border-top-color: #000; - border-left-color: #000; - border-radius: 10px; - -webkit-animation: pace-spinner 400ms linear infinite; - -moz-animation: pace-spinner 400ms linear infinite; - -ms-animation: pace-spinner 400ms linear infinite; - -o-animation: pace-spinner 400ms linear infinite; - animation: pace-spinner 400ms linear infinite; -} - -@media (max-width: 767px) { - .loading-activity { - width: 18px; - height: 18px; - } -} - -@-ms-keyframes pace-spinner { - 0% { - -ms-transform: rotate(0deg); - transform: rotate(0deg); - } - - 100% { - -ms-transform: rotate(360deg); - transform: rotate(360deg); - } -} - -@keyframes pace-spinner { - 0% { - transform: rotate(0deg); - } - - 100% { - transform: rotate(360deg); - } -} - -/** 表单查询条件 **/ -.select-list ul, .layui-layer-content ul { - margin: 0; - padding: 0; - -webkit-tap-highlight-color: rgba(0,0,0,0); -} - -.select-list li, .layui-layer-content li { - list-style: none; -} - -.select-time .time-input { - display: block; - width: 100%; - padding-left: 10px; -} - -label { - font-weight: normal; -} - -.container-div { - padding: 0px 28px; - height: 100%; -} - -.container-div .row { - height: 100%; -} - -.search-collapse,.select-table { - width: 100%; - background: #fff; - border-radius: 6px; - margin-top: 10px; - padding-top: 5px; - padding-bottom: 13px; - box-shadow: 1px 1px 3px rgba(0,0,0,.2); -} - -.search-collapse { - position: relative; -} - -.search-collapse .col-sm-6 .control-label { - color: #333; -} - -@media ( max-width : 768px) { - .search-collapse { - display: none; - } -} - -@media ( min-width : 768px) { - .select-list li { - float: left; - } -} - -.select-list li { - color: #333; - margin: 5px 15px 5px 0px; -} - -.select-list li p, .select-list li label:not(.radio-box){ - float: left; - width: 65px; - margin: 5px 0px 0px 0px; - text-align:right; -} - -.select-list li input { - border: 1px solid #ddd; - border-radius: 4px; - background: transparent; - outline: none; - height: 30px; - width: 200px; - padding-left: 5px; -} - -.select-list li .submit-btn { - border: 0px; - border-radius: 4px; - background: transparent; - outline: none; - width: 40px; - height: 23px; -} - -.select-list li select { - border: 1px solid #ddd; - border-radius: 4px; - background: transparent; - outline: none; - height: 30px; - width: 200px; -} - -.bootstrap-select.form-control .btn-default { - color: inherit; - padding: 4px 6px 4px; - border-radius: 4px; - border: 1px solid #e5e6e7; - outline: none; - height: 31px; - background: #FFFFFF none -} - -.file-input .btn-default { - color: inherit; - background: white; - border: 1px solid #e7eaec; -} - -.select-list .btn-default { - color: #555; - padding: 5px 5px; - border: 1px solid #ddd; - border-radius: 4px; - background: transparent; - outline: none; - height: 30px; - width: 200px; -} - -.select-list .btn-default:hover,.select-list .btn-default:focus,.select-list .btn-default:active,.select-list .btn-default.active,.open .dropdown-toggle.btn-default { - color: #555; - background-color: #e4e4e4; - border-color: #b2b2b2 -} - -.select-list .bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) { - height: 30px; - width: 200px; -} - -.select-list .bootstrap-select > .dropdown-toggle.bs-placeholder, -.select-list .bootstrap-select > .dropdown-toggle.bs-placeholder:hover, -.select-list .bootstrap-select > .dropdown-toggle.bs-placeholder:focus, -.select-list .bootstrap-select > .dropdown-toggle.bs-placeholder:active { - color: inherit; - font-size: 13px; -} - -.select-list .bootstrap-select .dropdown-toggle .caret { - position: inherit; -} - -.select-list .select-selectpicker li { - float: none; -} - -.select-list .dropdown-menu>li>a,.bootstrap-select.form-control .dropdown-menu>li>a { - line-height: inherit; -} - -.select-list .dropdown-menu li>a:hover,.dropdown-menu li>a:focus,.dropdown-submenu:hover>a,.bootstrap-select.form-control .dropdown-menu li>a:hover,.dropdown-menu li>a:focus,.dropdown-submenu:hover>a{ - color: #fff; - text-decoration: none; - background-color: #12889a -} - -.select-list .select2-container--bootstrap { - width: 200px!important; - display: inline-block; -} - -.select-list .select2-container--bootstrap .select2-selection { - border-radius: 6px; -} - -.select-list .select2-container--bootstrap .select2-selection--single { - height: 30px!important; - padding: 5px 10px; -} - -.select-list .select-time input { - width: 93px; -} - -.select-time label,.select-time span,.select-time input { - float: left; -} - -@media (max-width:767px) { - .select-time label,.select-time span,.select-time input { - float: none; - } - .select-list .select-time input { - width: 200px; - } -} - -.select-time label { - margin-top: 5px; -} - -.select-time span { - display: block; - margin: 5px 5px; -} - -.search-btn { - background-color: #1ab394; - border-color: #1ab394; - color: #FFF; - margin-bottom: 5px; - display: inline-block; - padding: 6px 12px; - margin-bottom: 0; - font-size: 14px; - font-weight: 400; - line-height: 1.42857143; - text-align: center; - white-space: nowrap; - border-radius: 3px; - vertical-align: middle; - cursor: pointer; -} - -.select-title{ - color:#3d5266; - font-size:15px; - padding:10px 0px; - font-weight: normal; -} - -/** 表格查询数据 **/ -.table-striped { - min-height: 75%; -} - -.table-striped .bootstrap-table, .table-striped .table-bordered { - border: 0px!important; -} - -.table-bordered .table>thead>tr>th, .table-bordered .table>tbody>tr>th { - font-weight: normal; - font-size: 13px -} - -.table-striped table>thead>tr>th, .table-striped table>tbody>tr>th, .table-striped table>tfoot>tr>th, .table-striped table>thead>tr>td, .table-striped table>tbody>tr>td, .table-striped table>tfoot>tr>td { - border-bottom: 1px solid #e7eaec!important; - background-color: transparent; - border: 0px; -} - -.table-bordered table>thead>tr>th:first-child, .table-bordered table>tbody>tr>td:first-child { - border-left: 1px solid #ddd; -} - -.table-bordered table>thead>tr>th:last-child, .table-bordered table>tbody>tr>td:last-child { - border-right: 1px solid #ddd; -} - -.table-bordered table>thead>tr>th, .table-bordered table>tbody>tr>td { - border-top: 1px solid #ddd!important; - border-bottom: 1px solid #ddd; -} - -.fixed-table-footer { - border-top: 0px solid #ddd; -} - -.fixed-table-container { - border: 0px solid #ddd; -} - -.table-striped .table>thead>tr>th, .table-striped .table>tbody>tr>th { - border-bottom: 1px solid #ccc!important; - border-top: 0px!important; - font-weight: normal; - font-size: 13px -} - -.table-striped table thead { - background-color: #eff3f8; -} - -.fixed-table-container thead th >.both{ - display: inline-block -} - -.editable-input .input-sm { - height: 32px!important; -} - -/** 表格列宽拖动样式 **/ -.rc-handle-container { - position: relative; -} -.rc-handle { - position: absolute; - width: 7px; - cursor: ew-resize; - margin-left: -3px; - z-index: 2; -} -table.rc-table-resizing { - cursor: ew-resize; -} -table.rc-table-resizing thead, -table.rc-table-resizing thead > th, -table.rc-table-resizing thead > th > a { - cursor: ew-resize; -} - -/** 表格冻结列样式 **/ -.fixed-columns, .fixed-columns-right { - position: absolute; - top: 0; - height: 100%; - background-color: #fff; - box-sizing: border-box; - z-index: 1; -} - -.fixed-columns { - left: 0; -} - -.fixed-columns .fixed-table-body { - overflow: hidden !important; -} - -.fixed-columns-right { - right: 0; -} - -.fixed-columns-right .fixed-table-body { - overflow-x: hidden !important; -} - -.bootstrap-table .table-hover > tbody > tr.hover > td { - background-color: #f5f5f5; -} - -/** 表格树样式 **/ -.bootstrap-tree-table .treetable-indent {width:16px; height: 16px; display: inline-block; position: relative;} -.bootstrap-tree-table .treetable-expander {width:16px; height: 16px; display: inline-block; position: relative; cursor: pointer;} -.bootstrap-tree-table .treetable-selected{background: #f5f5f5 !important;} -.bootstrap-tree-table .treetable-table{border:0 !important;margin-bottom:0} -.bootstrap-tree-table .treetable-table tbody {display:block;height:auto;overflow-y:auto;} -.bootstrap-tree-table .treetable-table thead, .treetable-table tbody tr {display:table;width:100%;table-layout:fixed;} -.bootstrap-tree-table .treetable-thead th{line-height:24px;border: 0 !important;border-radius: 4px;border-left:0px solid #e7eaec !important;border-bottom:1px solid #ccc!important;text-align: left;} -.bootstrap-tree-table .treetable-thead tr :first-child{border-left:0 !important} -.bootstrap-tree-table .treetable-tbody td{border: 0 !important;border-left:0px solid #e7eaec !important;border-bottom:1px solid #e7eaec!important;white-space: nowrap; text-overflow: ellipsis;} -.bootstrap-tree-table .treetable-tbody tr :first-child{border-left:0 !important} -.bootstrap-tree-table .treetable-bars .tool-left, .bootstrap-tree-table .treetable-bars .tool-right{margin-top: 10px; margin-bottom: 10px;} -.bootstrap-tree-table .treetable-bars .tool-left{float: left;} -.bootstrap-tree-table .treetable-bars .tool-right{float: right;} -.bootstrap-tree-table .treetable-bars .columns li label{display: block;padding: 3px 20px;clear: both;font-weight: 400;line-height: 1.428571429;max-width: 100%;margin-bottom: 5px;cursor:pointer;} -.bootstrap-tree-table .table{border-bottom: 0px solid #e7eaec!important;} -.bootstrap-tree-table .table-bordered .treetable-thead th {border-left: 1px solid #e7eaec!important;} -.bootstrap-tree-table .table-bordered .treetable-tbody td {border-right: 1px solid #e7eaec!important;} - -/** 首页样式 **/ -.ax_close_max { - position: fixed; - top: 5px; - left: 5px; - z-index: 9999; - display: none; - color: #ccc; -} -.navbar-right > .user-menu > .dropdown-menu { - border-top-right-radius:0; - border-top-left-radius:0; - padding:1px 0 0 0; - border-top-width:0; - width:138px; -} -.navbar-right > .user-menu .user-image { - float:left; - width:27px; - height:27px; - border-radius:50%; - margin-right:8px; - margin-top:-3px; -} -@media (max-width:767px) { - .navbar-right > .user-menu .user-image { - float:none; - margin-right:0; - margin-top:-8px; - line-height:10px; -} -}.dropdown-menu > li > a > .glyphicon,.dropdown-menu > li > a > .fa,.dropdown-menu > li > a > .ion { - margin-right:10px; -} -.dropdown-menu > li > a:hover { - background-color:#e1e3e9; - color:#333; -} -.dropdown-menu > .divider { - background-color:#eee; -} - -/** 表单布局 **/ -.form-header { - font-size:15px; - color:#6379bb; - border-bottom:1px solid #ddd; - margin:8px 10px 25px 10px; - padding-bottom:5px -} - -.main-content { - background-color: #ffffff; - color: inherit; - padding: 10px 15px 15px 15px; - border-color: #e7eaec; - -webkit-border-image: none; - -o-border-image: none; - border-image: none; - border-width: 1px 0px; -} - -/** 表格跳转样式 **/ -.pageGo input { - height: 32px; - width: 50px; - margin-left: 5px; - margin-right: 5px; - text-align: center; - display: block; - float:left; -} -.pageGo button { - height: 32px; - display: block; - float:left; -} - -/** 表格行拖拽样式 **/ -.reorder_rows_onDragClass td { - color:yellow!important; - background-color:#999!important; - text-shadow:0 0 10px black,0 0 10px black,0 0 8px black,0 0 6px black,0 0 6px black; - box-shadow:0 12px 14px -12px #111 inset,0 -2px 2px -1px #333 inset -} - -/** 表格列拖拽样式 **/ -.dragtable-sortable { - list-style-type: none; margin: 0; padding: 0; -moz-user-select: none; -} - -.dragtable-sortable li { - margin: 0; padding: 0; float: left; font-size: 1em; background: white; -} - -.dragtable-sortable th, .dragtable-sortable td{ - border-left: 0px; -} - -.dragtable-sortable li:first-child th, .dragtable-sortable li:first-child td { - border-left: 1px solid #CCC; -} - -.ui-sortable-helper { - opacity: 0.7;filter: alpha(opacity=70); -} - -.ui-sortable-placeholder { - -moz-box-shadow: 4px 5px 4px #C6C6C6 inset; - -webkit-box-shadow: 4px 5px 4px #C6C6C6 inset; - box-shadow: 4px 5px 4px #C6C6C6 inset; - border-bottom: 1px solid #CCCCCC; - border-top: 1px solid #CCCCCC; - visibility: visible !important; - background: #EFEFEF !important; - visibility: visible !important; -} - -.ui-sortable-placeholder * { - opacity: 0.0; visibility: hidden; -} - -/** 表格选中样式 **/ -.bootstrap-table .fixed-table-container .table tbody tr.selected td { - background-color: #E8F7FD; - color: #1890ff; -} - -/** 滚动条样式 **/ -::-webkit-scrollbar-track { - background-color: #F5F5F5; -} - -/** 气泡弹出框样式 **/ -.popover { - font-size: 13px; - max-width: unset; -} - -.popover-title { - padding: 8px 14px; - margin: 0 !important; - font-size: 14px; - background-color: #f7f7f7; - border-bottom: 1px solid #ebebeb; - border-radius: 5px 5px 0 0; -} - -.popover-content { - padding: 5px; -} - -/** 向上滚动样式 **/ -#scroll-up { - border-width: 0; - position: fixed; - right: 2px; - z-index: 99; - -webkit-transition-duration: .3s; - transition-duration: .3s; - opacity: 0; - filter: alpha(opacity=0); - bottom: -24px; - visibility: hidden; - background-color: #aaa; - color: #fff; - font-size: 14px; - display: none; -} - -#scroll-up.display { - opacity: .7; - filter: alpha(opacity=70); - bottom: 2px; - visibility: visible; -} - -/* 设置菜单样式 */ -.menu-content { - padding: 10px 10px 10px 25px !important; -} - -.tab-content > .tab-pane { - display: none; -} - -.tab-content > .active { - display: block; -} - -.height-full { - height: 100% !important; -} - -/* 设置滚动条样式 */ -::-webkit-scrollbar { - width:10px!important; - height:10px!important; - -webkit-appearance:none; - background:#f1f1f1 -} - -::-webkit-scrollbar-thumb { - height:5px; - border:1px solid transparent; - border-top:0; - border-bottom:0; - border-radius:6px; - background-color:#ccc; - background-clip:padding-box -} - -/* 设置placeholder样式 */ -::-webkit-input-placeholder { - color: #b3b3b3!important; -} - -:-moz-placeholder { - color: #b3b3b3!important; -} - -::-moz-placeholder { - color: #b3b3b3!important; -} - -:-ms-input-placeholder { - color: #b3b3b3!important; -} +/** + * 通用css样式布局处理 + */ + +/** 基础通用 **/ +.pt5 { + padding-top: 5px; +} +.pr5 { + padding-right: 5px; +} +.pb5 { + padding-bottom: 5px; +} +.mt5 { + margin-top: 5px; +} +.mr5 { + margin-right: 5px; +} +.mb5 { + margin-bottom: 5px; +} +.ml5 { + margin-left: 5px; +} +.mt10 { + margin-top: 10px; +} +.mr10 { + margin-right: 10px; +} +.mb10 { + margin-bottom: 10px; +} +.ml0 { + margin-left: 10px; +} +.mt20 { + margin-top: 20px; +} +.mr20 { + margin-right: 20px; +} +.mb20 { + margin-bottom: 20px; +} +.m20 { + margin-left: 20px; +} +.m50 { + margin-left: 50px; +} +.img-xs { + width: 32px; + height: 32px; +} +.img-sm { + width: 64px; + height: 64px; +} +.img-md { + width: 96px; + height: 96px; +} +.img-lg { + width: 120px; + height: 120px; +} +.section-content { + min-height: 250px; + margin-right: auto; + margin-left: auto; + padding: 5px 5px 5px 5px; + width: 100%; + height: 100%; + position: absolute; +} + +.ibox { + margin-bottom: 25px; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 4px; + height: 100%; + -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); +} + +.list-group-striped > .list-group-item { + border-left: 0; + border-right: 0; + border-radius: 0; + padding-left: 0; + padding-right: 0 +} + +.ibox-title-gray { + height: 41px; + background-color: #f0f3f4; + color: #333; + font-weight: 700; + border-radius: 2px 2px 0 0; + padding: 13px !important; + border-bottom: 1px solid #eee; + display: block; + clear: both; +} + +.dashboard-header h5 { + padding: 8px 0 0 0; + display: inline-block; + font-size: 14px; + text-overflow: ellipsis; + float: left; + font-weight: 400; +} + +.ibox-title-gray h5 { + display: inline-block; + font-size: 14px; + margin: 0 0 7px; + padding: 0; + text-overflow: ellipsis; + float: left; +} + +/* 导航页签 */ +.nav-tabs-custom { + margin-bottom: 20px; + background: #fff; + box-shadow: 0 1px 1px rgba(0,0,0,0.1); + border-radius: 3px +} + +.nav-tabs-custom>.nav-tabs { + margin: 0; + border-bottom-color: #f4f4f4; + border-top-right-radius: 3px; + border-top-left-radius: 3px +} + +.nav-tabs-custom>.nav-tabs>li { + border-top: 3px solid transparent; + margin-bottom: -2px; + margin-right: 5px +} + +.nav-tabs-custom>.nav-tabs>li.header { + padding-left: 5px; + font-size: 16px; + line-height: 30px; +} + +.nav-tabs-custom>.nav-tabs>li.disabled>a { + color: #777 +} + +.nav-tabs-custom>.nav-tabs>li>a { + color: #444; + font-weight: normal; + border-radius: 0 +} + +.nav-tabs-custom>.nav-tabs>li>a,.nav-tabs-custom>.nav-tabs>li>a:hover { + background: transparent; + margin: 0 +} + +.nav-tabs-custom>.nav-tabs>li>a:hover { + color: #999 +} + +.nav-tabs-custom>.nav-tabs>li:not(.active)>a:hover,.nav-tabs-custom>.nav-tabs>li:not(.active)>a:focus,.nav-tabs-custom>.nav-tabs>li:not(.active)>a:active { + border-color: transparent +} + +.nav-tabs-custom>.nav-tabs>li.active { + border-top-color: #1890ff +} + +.nav-tabs-custom>.nav-tabs>li.active>a,.nav-tabs-custom>.nav-tabs>li.active:hover>a { + background-color: #fff; + color: #444 +} + +.nav-tabs-custom>.nav-tabs>li.active>a { + border-top-color: transparent; + border-bottom-color: transparent; + border-left-color: #f4f4f4; + border-right-color: #f4f4f4 +} + +.nav-tabs-custom>.tab-content { + background: #fff; + padding: 10px; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px +} + +/** 弹层组件 禁用样式 **/ +.layer-disabled { + border: 1px #dedede solid !important; + background-color: #f1f1f1 !important; + color: #333 !important; + pointer-events: none; +} + +/** 用户管理 样式布局 **/ +.box { + position: relative; + border-radius: 3px; + background: #ffffff; + border-top: 3px solid #d2d6de; + margin-bottom: 20px; + width: 100%; + box-shadow: 0 1px 1px rgba(0,0,0,0.1) +} + +.box-header:before,.box-body:before,.box-footer:before,.box-header:after,.box-body:after,.box-footer:after { + content: " "; + display: table +} + +.box-header:after,.box-body:after,.box-footer:after { + clear: both +} + +.btn-box-tool { + padding: 5px; + font-size: 12px; + background: transparent; + color: #97a0b3; +} + +.open .btn-box-tool, +.btn-box-tool:hover { + color: #606c84; +} + +.box-main { + margin: 0; + border: 0; + padding-top: 2px; + border-radius: 0; + box-shadow: none +} + +.box-main>.box-header { + border-bottom: 1px solid #eee; + padding: 12px 10px 2px 15px +} + +.box-header .box-title { + display: inline-block; + font-size: 18px; + margin: 0; + line-height: 1; +} + +.box-main>.box-header .box-title { + font-size: 16px; + margin-bottom: 13px; + float: left +} + +.box-main>.box-header .box-title .fa { + font-size: 14px; + padding-right: 3px; + margin-top: -2px +} + +.box-main>.box-header .box-tools { + position: relative; + top: -5px; + right: 0 +} + +.box-main>.box-header .box-tools .btn { + padding: 3px 10px 5px 10px; + font-size: 14px; + margin-bottom: 2px +} + +.box-main>.box-header .box-tools .btn-box-tool { + padding: 4px 2px +} + +.box-main form>.box-footer,.nav-main form>.box-footer { + background: #fafafa +} + +.box-main form>.box-footer .row,.nav-main form>.box-footer .row { + margin: 5px 0 5px -25px +} + +@media ( min-width : 768px) { + .section-content .about { + padding-left: 0px + } +} + +/** select2 样式修改 **/ +.select2-container--default .select2-selection--multiple .select2-selection__choice { + background-color: #1AB394; + border-color: #1AB394; + padding: 1px 10px; + color: #fff +} + +.select2-container--default .select2-selection--multiple .select2-selection__choice__remove { + margin-right: 5px; + color: rgba(255,255,255,0.7) +} + +.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover { + color: #fff +} + +.select2-container .select2-selection--single .select2-selection__rendered { + padding-right: 10px +} + +/** 表单验证 样式布局 **/ +.control-label.is-required:before { + content: '* '; + color: red; +} + +label.error { + position: absolute; + right: 18px; + top: 6px; + color: #ef392b; + font-size: 12px; + z-index:99; +} + +.input-group label.error { + z-index:99; + right: 42px +} + +.input-group input.error + label.error + .input-group-addon>i { + color: #ed5565; +} + +.input-group.date label.error { + z-index:99; + right: 3px +} + +.Validform_error,input.error,textarea.error,select.error { + background-color: #fbe2e2; + border-color: #c66161; + color: #c00 +} + +.Validform_wrong,.Validform_right,.Validform_warning { + display: inline-block; + height: 20px; + font-size: 12px; + vertical-align: middle; + padding-left: 25px +} + +.i-checks label.error, .check-box label.error, .radio-box label.error { + right: auto; + width: 150px; + left: 210px; + top: 1px; + max-width: none; +} + +/** 复选框&单选框 **/ +.check-box,.radio-box { + display: inline-block; + box-sizing: border-box; + cursor: pointer; + position: relative; + padding-left: 25px; + padding-right: 15px; + padding-top: 8px; +} + +.icheckbox, .icheckbox-blue, .iradio, .iradio-blue, .iradio-purple { + position: absolute; + top: 8px; + left: 0 +} + +/** iCheck **/ +.icheckbox-blue,.iradio-blue { + display: block; + margin: 0; + padding: 0; + width: 18px; + height: 18px; + background: url(../../img/blue.png) no-repeat; + border: none; + cursor: pointer +} + +.icheckbox-blue,.icheckbox-blue.static:hover { + background-position: 0 0 +} + +.icheckbox-blue.hover,.icheckbox-blue:hover { + background-position: -20px 0 +} + +.icheckbox-blue.checked { + background-position: -40px 0 +} + +.icheckbox-blue.disabled { + background-position: -60px 0; + cursor: default +} + +.icheckbox-blue.checked.disabled { + background-position: -80px 0 +} + +.iradio-blue,.iradio-blue.static:hover { + background-position: -100px 0 +} + +.iradio-blue.hover,.iradio-blue:hover { + background-position: -120px 0 +} + +.iradio-blue.checked { + background-position: -140px 0 +} + +.iradio-blue.disabled { + background-position: -160px 0; + cursor: default +} + +.iradio-blue.checked.disabled { + background-position: -180px 0 +} + +/* ztree */ +div.ztree-border { + margin-top: 10px; + border: 1px solid #e5e6e7; + background: #FFFFFF none; + border-radius:4px; +} + +/* 切换开关 */ +.toggle-switch { + display: -webkit-inline-box; + display: -webkit-inline-flex; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-box-align: center; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + margin-bottom: 0; + padding-top: 8px; +} +.toggle-switch input { + height: 0; + width: 0; + position: absolute; + opacity: 0; +} +.toggle-switch span { + display: inline-block; + position: relative; + width: 40px; + height: 10px; + -webkit-border-radius: 10px; + border-radius: 10px; + background-color: #ebebeb; + border: 2px solid #ebebeb; + cursor: pointer; + -webkit-transition: all .1s ease; + -o-transition: all .1s ease; + transition: all .1s ease +} +.toggle-switch span:after { + content: ''; + height: 20px; + width: 20px; + -webkit-border-radius: 50%; + border-radius: 50%; + position: absolute; + left: 1px; + top: -7px; + color: #aaa; + -webkit-transition: all .1s ease; + -o-transition: all .1s ease; + transition: all .1s ease; + text-align: center; + font-size: 13px; + background-color: #fff; + -webkit-box-shadow: rgba(0,0,0,.12) 0 1px 6px,rgba(0,0,0,.12) 0 1px 4px; + box-shadow: rgba(0,0,0,.12) 0 1px 6px,rgba(0,0,0,.12) 0 1px 4px +} +.toggle-switch input:checked~span:after { + left: -webkit-calc(100% - 20px); + left: calc(100% - 20px); + background-color: #33cabb +} + +.toggle-switch.switch-solid span { + height: 20px; +} +.toggle-switch.switch-solid span:after { + top: -2px; +} +.switch-solid input:checked~span { + background-color: #33cabb; + border-color: #33cabb +} +.switch-solid input:checked~span:after { + background-color: #fff; + color: #33cabb +} + +/** 遮罩层 **/ +.loaderbox { + display: inline-block; + min-width: 125px; + padding: 10px; + margin: 0 auto; + color: #000 !important; + font-size: 13px; + font-weight: 400; + text-align: center; + vertical-align: middle; + border: 1px solid #ddd; + background-color: #eee; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + -webkit-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1); +} + +.loaderbox .loading-activity { + float: left; + width: 18px; + height: 18px; + border: solid 2px transparent; + border-top-color: #000; + border-left-color: #000; + border-radius: 10px; + -webkit-animation: pace-spinner 400ms linear infinite; + -moz-animation: pace-spinner 400ms linear infinite; + -ms-animation: pace-spinner 400ms linear infinite; + -o-animation: pace-spinner 400ms linear infinite; + animation: pace-spinner 400ms linear infinite; +} + +@media (max-width: 767px) { + .loading-activity { + width: 18px; + height: 18px; + } +} + +@-ms-keyframes pace-spinner { + 0% { + -ms-transform: rotate(0deg); + transform: rotate(0deg); + } + + 100% { + -ms-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +@keyframes pace-spinner { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +} + +/** 表单查询条件 **/ +.select-list ul, .layui-layer-content ul { + margin: 0; + padding: 0; + -webkit-tap-highlight-color: rgba(0,0,0,0); +} + +.select-list li, .layui-layer-content li { + list-style: none; +} + +.select-time .time-input { + display: block; + width: 100%; + padding-left: 10px; +} + +label { + font-weight: normal; +} + +.container-div { + padding: 0px 28px; + height: 100%; +} + +.container-div .row { + height: 100%; +} + +.search-collapse,.select-table { + width: 100%; + background: #fff; + border-radius: 6px; + margin-top: 10px; + padding-top: 5px; + padding-bottom: 13px; + box-shadow: 1px 1px 3px rgba(0,0,0,.2); +} + +.search-collapse { + position: relative; +} + +.search-collapse .col-sm-6 .control-label { + color: #333; +} + +@media ( max-width : 768px) { + .search-collapse { + display: none; + } +} + +@media ( min-width : 768px) { + .select-list li { + float: left; + } +} + +.select-list li { + color: #333; + margin: 5px 15px 5px 0px; +} + +.select-list li p, .select-list li label:not(.radio-box){ + float: left; + width: 65px; + margin: 5px 0px 0px 0px; + text-align:right; +} + +.select-list li input { + border: 1px solid #ddd; + border-radius: 4px; + background: transparent; + outline: none; + height: 30px; + width: 200px; + padding-left: 5px; +} + +.select-list li .submit-btn { + border: 0px; + border-radius: 4px; + background: transparent; + outline: none; + width: 40px; + height: 23px; +} + +.select-list li select { + border: 1px solid #ddd; + border-radius: 4px; + background: transparent; + outline: none; + height: 30px; + width: 200px; +} + +.bootstrap-select.form-control .btn-default { + color: inherit; + padding: 4px 6px 4px; + border-radius: 4px; + border: 1px solid #e5e6e7; + outline: none; + height: 31px; + background: #FFFFFF none +} + +.file-input .btn-default { + color: inherit; + background: white; + border: 1px solid #e7eaec; +} + +.select-list .btn-default { + color: #555; + padding: 5px 5px; + border: 1px solid #ddd; + border-radius: 4px; + background: transparent; + outline: none; + height: 30px; + width: 200px; +} + +.select-list .btn-default:hover,.select-list .btn-default:focus,.select-list .btn-default:active,.select-list .btn-default.active,.open .dropdown-toggle.btn-default { + color: #555; + background-color: #e4e4e4; + border-color: #b2b2b2 +} + +.select-list .bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) { + height: 30px; + width: 200px; +} + +.select-list .bootstrap-select > .dropdown-toggle.bs-placeholder, +.select-list .bootstrap-select > .dropdown-toggle.bs-placeholder:hover, +.select-list .bootstrap-select > .dropdown-toggle.bs-placeholder:focus, +.select-list .bootstrap-select > .dropdown-toggle.bs-placeholder:active { + color: inherit; + font-size: 13px; +} + +.select-list .bootstrap-select .dropdown-toggle .caret { + position: inherit; +} + +.select-list .select-selectpicker li { + float: none; +} + +.select-list .dropdown-menu>li>a,.bootstrap-select.form-control .dropdown-menu>li>a { + line-height: inherit; +} + +.select-list .dropdown-menu li>a:hover,.dropdown-menu li>a:focus,.dropdown-submenu:hover>a,.bootstrap-select.form-control .dropdown-menu li>a:hover,.dropdown-menu li>a:focus,.dropdown-submenu:hover>a{ + color: #fff; + text-decoration: none; + background-color: #12889a +} + +.select-list .select2-container--bootstrap { + width: 200px!important; + display: inline-block; +} + +.select-list .select2-container--bootstrap .select2-selection { + border-radius: 6px; +} + +.select-list .select2-container--bootstrap .select2-selection--single { + height: 30px!important; + padding: 5px 10px; +} + +.select-list .select-time input { + width: 93px; +} + +.select-time label,.select-time span,.select-time input { + float: left; +} + +@media (max-width:767px) { + .select-time label,.select-time span,.select-time input { + float: none; + } + .select-list .select-time input { + width: 200px; + } +} + +.select-time label { + margin-top: 5px; +} + +.select-time span { + display: block; + margin: 5px 5px; +} + +.search-btn { + background-color: #1ab394; + border-color: #1ab394; + color: #FFF; + margin-bottom: 5px; + display: inline-block; + padding: 6px 12px; + margin-bottom: 0; + font-size: 14px; + font-weight: 400; + line-height: 1.42857143; + text-align: center; + white-space: nowrap; + border-radius: 3px; + vertical-align: middle; + cursor: pointer; +} + +.select-title{ + color:#3d5266; + font-size:15px; + padding:10px 0px; + font-weight: normal; +} + +/** 表格查询数据 **/ +.table-striped { + min-height: 75%; +} + +.table-striped .bootstrap-table, .table-striped .table-bordered { + border: 0px!important; +} + +.table-bordered .table>thead>tr>th, .table-bordered .table>tbody>tr>th { + font-weight: normal; + font-size: 13px +} + +.table-striped table>thead>tr>th, .table-striped table>tbody>tr>th, .table-striped table>tfoot>tr>th, .table-striped table>thead>tr>td, .table-striped table>tbody>tr>td, .table-striped table>tfoot>tr>td { + border-bottom: 1px solid #e7eaec!important; + background-color: transparent; + border: 0px; +} + +.table-bordered table>thead>tr>th:first-child, .table-bordered table>tbody>tr>td:first-child { + border-left: 1px solid #ddd; +} + +.table-bordered table>thead>tr>th:last-child, .table-bordered table>tbody>tr>td:last-child { + border-right: 1px solid #ddd; +} + +.table-bordered table>thead>tr>th, .table-bordered table>tbody>tr>td { + border-top: 1px solid #ddd!important; + border-bottom: 1px solid #ddd; +} + +.fixed-table-footer { + border-top: 0px solid #ddd; +} + +.fixed-table-container { + border: 0px solid #ddd; +} + +.table-striped .table>thead>tr>th, .table-striped .table>tbody>tr>th { + border-bottom: 1px solid #ccc!important; + border-top: 0px!important; + font-weight: normal; + font-size: 13px +} + +.table-striped table thead { + background-color: #eff3f8; +} + +.fixed-table-container thead th >.both{ + display: inline-block +} + +.editable-input .input-sm { + height: 32px!important; +} + +/** 表格列宽拖动样式 **/ +.rc-handle-container { + position: relative; +} +.rc-handle { + position: absolute; + width: 7px; + cursor: ew-resize; + margin-left: -3px; + z-index: 2; +} +table.rc-table-resizing { + cursor: ew-resize; +} +table.rc-table-resizing thead, +table.rc-table-resizing thead > th, +table.rc-table-resizing thead > th > a { + cursor: ew-resize; +} + +/** 表格冻结列样式 **/ +.fixed-columns, .fixed-columns-right { + position: absolute; + top: 0; + height: 100%; + background-color: #fff; + box-sizing: border-box; + z-index: 1; +} + +.fixed-columns { + left: 0; +} + +.fixed-columns .fixed-table-body { + overflow: hidden !important; +} + +.fixed-columns-right { + right: 0; +} + +.fixed-columns-right .fixed-table-body { + overflow-x: hidden !important; +} + +.bootstrap-table .table-hover > tbody > tr.hover > td { + background-color: #f5f5f5; +} + +/** 表格树样式 **/ +.bootstrap-tree-table .treetable-indent {width:16px; height: 16px; display: inline-block; position: relative;} +.bootstrap-tree-table .treetable-expander {width:16px; height: 16px; display: inline-block; position: relative; cursor: pointer;} +.bootstrap-tree-table .treetable-selected{background: #f5f5f5 !important;} +.bootstrap-tree-table .treetable-table{border:0 !important;margin-bottom:0} +.bootstrap-tree-table .treetable-table tbody {display:block;height:auto;overflow-y:auto;} +.bootstrap-tree-table .treetable-table thead, .treetable-table tbody tr {display:table;width:100%;table-layout:fixed;} +.bootstrap-tree-table .treetable-thead th{line-height:24px;border: 0 !important;border-radius: 4px;border-left:0px solid #e7eaec !important;border-bottom:1px solid #ccc!important;text-align: left;} +.bootstrap-tree-table .treetable-thead tr :first-child{border-left:0 !important} +.bootstrap-tree-table .treetable-tbody td{border: 0 !important;border-left:0px solid #e7eaec !important;border-bottom:1px solid #e7eaec!important;white-space: nowrap; text-overflow: ellipsis;} +.bootstrap-tree-table .treetable-tbody tr :first-child{border-left:0 !important} +.bootstrap-tree-table .treetable-bars .tool-left, .bootstrap-tree-table .treetable-bars .tool-right{margin-top: 10px; margin-bottom: 10px;} +.bootstrap-tree-table .treetable-bars .tool-left{float: left;} +.bootstrap-tree-table .treetable-bars .tool-right{float: right;} +.bootstrap-tree-table .treetable-bars .columns li label{display: block;padding: 3px 20px;clear: both;font-weight: 400;line-height: 1.428571429;max-width: 100%;margin-bottom: 5px;cursor:pointer;} +.bootstrap-tree-table .table{border-bottom: 0px solid #e7eaec!important;} +.bootstrap-tree-table .table-bordered .treetable-thead th {border-left: 1px solid #e7eaec!important;} +.bootstrap-tree-table .table-bordered .treetable-tbody td {border-right: 1px solid #e7eaec!important;} + +/** 首页样式 **/ +.ax_close_max { + position: fixed; + top: 5px; + left: 5px; + z-index: 9999; + display: none; + color: #ccc; +} +.navbar-right > .user-menu > .dropdown-menu { + border-top-right-radius:0; + border-top-left-radius:0; + padding:1px 0 0 0; + border-top-width:0; + width:138px; +} +.navbar-right > .user-menu .user-image { + float:left; + width:27px; + height:27px; + border-radius:50%; + margin-right:8px; + margin-top:-3px; +} +@media (max-width:767px) { + .navbar-right > .user-menu .user-image { + float:none; + margin-right:0; + margin-top:-8px; + line-height:10px; +} +}.dropdown-menu > li > a > .glyphicon,.dropdown-menu > li > a > .fa,.dropdown-menu > li > a > .ion { + margin-right:10px; +} +.dropdown-menu > li > a:hover { + background-color:#e1e3e9; + color:#333; +} +.dropdown-menu > .divider { + background-color:#eee; +} + +/** 表单布局 **/ +.form-header { + font-size:15px; + color:#6379bb; + border-bottom:1px solid #ddd; + margin:8px 10px 25px 10px; + padding-bottom:5px +} + +.main-content { + background-color: #ffffff; + color: inherit; + padding: 10px 15px 15px 15px; + border-color: #e7eaec; + -webkit-border-image: none; + -o-border-image: none; + border-image: none; + border-width: 1px 0px; +} + +/** 表格跳转样式 **/ +.pageGo input { + height: 32px; + width: 50px; + margin-left: 5px; + margin-right: 5px; + text-align: center; + display: block; + float:left; +} +.pageGo button { + height: 32px; + display: block; + float:left; +} + +/** 表格行拖拽样式 **/ +.reorder_rows_onDragClass td { + color:yellow!important; + background-color:#999!important; + text-shadow:0 0 10px black,0 0 10px black,0 0 8px black,0 0 6px black,0 0 6px black; + box-shadow:0 12px 14px -12px #111 inset,0 -2px 2px -1px #333 inset +} + +/** 表格列拖拽样式 **/ +.dragtable-sortable { + list-style-type: none; margin: 0; padding: 0; -moz-user-select: none; +} + +.dragtable-sortable li { + margin: 0; padding: 0; float: left; font-size: 1em; background: white; +} + +.dragtable-sortable th, .dragtable-sortable td{ + border-left: 0px; +} + +.dragtable-sortable li:first-child th, .dragtable-sortable li:first-child td { + border-left: 1px solid #CCC; +} + +.ui-sortable-helper { + opacity: 0.7;filter: alpha(opacity=70); +} + +.ui-sortable-placeholder { + -moz-box-shadow: 4px 5px 4px #C6C6C6 inset; + -webkit-box-shadow: 4px 5px 4px #C6C6C6 inset; + box-shadow: 4px 5px 4px #C6C6C6 inset; + border-bottom: 1px solid #CCCCCC; + border-top: 1px solid #CCCCCC; + visibility: visible !important; + background: #EFEFEF !important; + visibility: visible !important; +} + +.ui-sortable-placeholder * { + opacity: 0.0; visibility: hidden; +} + +/** 表格选中样式 **/ +.bootstrap-table .fixed-table-container .table tbody tr.selected td { + background-color: #E8F7FD; + color: #1890ff; +} + +/** 滚动条样式 **/ +::-webkit-scrollbar-track { + background-color: #F5F5F5; +} + +/** 气泡弹出框样式 **/ +.popover { + font-size: 13px; + max-width: unset; +} + +.popover-title { + padding: 8px 14px; + margin: 0 !important; + font-size: 14px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + border-radius: 5px 5px 0 0; +} + +.popover-content { + padding: 5px; +} + +/** 向上滚动样式 **/ +#scroll-up { + border-width: 0; + position: fixed; + right: 2px; + z-index: 99; + -webkit-transition-duration: .3s; + transition-duration: .3s; + opacity: 0; + filter: alpha(opacity=0); + bottom: -24px; + visibility: hidden; + background-color: #aaa; + color: #fff; + font-size: 14px; + display: none; +} + +#scroll-up.display { + opacity: .7; + filter: alpha(opacity=70); + bottom: 2px; + visibility: visible; +} + +/* 设置菜单样式 */ +.menu-content { + padding: 10px 10px 10px 25px !important; +} + +.tab-content > .tab-pane { + display: none; +} + +.tab-content > .active { + display: block; +} + +.height-full { + height: 100% !important; +} + +/* 设置滚动条样式 */ +::-webkit-scrollbar { + width:10px!important; + height:10px!important; + -webkit-appearance:none; + background:#f1f1f1 +} + +::-webkit-scrollbar-thumb { + height:5px; + border:1px solid transparent; + border-top:0; + border-bottom:0; + border-radius:6px; + background-color:#ccc; + background-clip:padding-box +} + +/* 设置placeholder样式 */ +::-webkit-input-placeholder { + color: #b3b3b3!important; +} + +:-moz-placeholder { + color: #b3b3b3!important; +} + +::-moz-placeholder { + color: #b3b3b3!important; +} + +:-ms-input-placeholder { + color: #b3b3b3!important; +} diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/index.js b/ruoyi-admin/src/main/resources/static/ruoyi/index.js index aecd55d5a..90b4044ec 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/index.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/index.js @@ -1,649 +1,648 @@ -/** - * 首页方法封装处理 - * Copyright (c) 2019 ruoyi - */ -layer.config({ - extend: 'moon/style.css', - skin: 'layer-ext-moon' -}); - -var isMobile = false; -var sidebarHeight = isMobile ? '100%' : '96%'; - -$(function() { - // MetsiMenu - $('#side-menu').metisMenu(); - - // 固定菜单栏 - $('.sidebar-collapse').slimScroll({ - height: sidebarHeight, - railOpacity: 0.9, - alwaysVisible: false - }); - - // 菜单切换 - $('.navbar-minimalize').click(function() { - if (isMobile) { - $("body").toggleClass("canvas-menu"); - } else { - $("body").toggleClass("mini-navbar"); - } - SmoothlyMenu(); - }); - - $('#side-menu>li').click(function() { - if ($('body').hasClass('canvas-menu mini-navbar')) { - NavToggle(); - } - - }); - $('#side-menu>li li a:not(:has(span))').click(function() { - if ($(window).width() < 769) { - NavToggle(); - } - }); - - $('.nav-close').click(NavToggle); - - //ios浏览器兼容性处理 - if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) { - $('#content-main').css('overflow-y', 'auto'); - } - -}); - -$(window).bind("load resize", function() { - isMobile = $.common.isMobile() || $(window).width() < 769; - if (isMobile) { - $('body').addClass('canvas-menu'); - $("body").removeClass("mini-navbar"); - $("nav .logo").addClass("hide"); - $(".slimScrollDiv").css({ "overflow": "hidden" }); - $('.navbar-static-side').fadeOut(); - } else { - if($('body').hasClass('canvas-menu')) { - $('body').addClass('fixed-sidebar'); - $('body').removeClass('canvas-menu'); - $("body").removeClass("mini-navbar"); - $("nav .logo").removeClass("hide"); - $(".slimScrollDiv").css({ "overflow": "visible" }); - $('.navbar-static-side').fadeIn(); - } - } -}); - -function syncMenuTab(dataId) { - if(isLinkage) { - var $dataObj = $('a[href$="' + decodeURI(dataId) + '"]'); - if ($dataObj.attr("class") != null && !$dataObj.hasClass("noactive")) { - $('.nav ul').removeClass("in"); - $dataObj.parents("ul").addClass("in") - $dataObj.parents("li").addClass("active").siblings().removeClass("active").find('li').removeClass("active"); - $dataObj.parents("ul").css('height', 'auto').height(); - $(".nav ul li, .nav li").removeClass("selected"); - $dataObj.parent("li").addClass("selected"); - setIframeUrl(dataId); - - // 顶部菜单同步处理 - var tabStr = $dataObj.parents(".tab-pane").attr("id"); - if ($.common.isNotEmpty(tabStr)) { - var sepIndex = tabStr.lastIndexOf('_'); - var menuId = tabStr.substring(sepIndex + 1, tabStr.length); - $("#tab_" + menuId + " a").click(); - } - } - } -} - -function NavToggle() { - $('.navbar-minimalize').trigger('click'); -} - -function fixedSidebar() { - $('#side-menu').hide(); - $("nav .logo").addClass("hide"); - setTimeout(function() { - $('#side-menu').fadeIn(500); - }, 100); -} - -// 设置锚点 -function setIframeUrl(href) { - if($.common.equals("history", mode)) { - storage.set('publicPath', href); - } else { - var nowUrl = window.location.href; - var newUrl = nowUrl.substring(0, nowUrl.indexOf("#")); - window.location.href = newUrl + "#" + href; - } -} - -function SmoothlyMenu() { - if (isMobile && !$('body').hasClass('canvas-menu')) { - $('.navbar-static-side').fadeIn(); - fixedSidebar(); - } else if (!isMobile &&!$('body').hasClass('mini-navbar')) { - fixedSidebar(); - $("nav .logo").removeClass("hide"); - } else if (isMobile && $('body').hasClass('fixed-sidebar')) { - $('.navbar-static-side').fadeOut(); - fixedSidebar(); - } else if (!isMobile && $('body').hasClass('fixed-sidebar')) { - fixedSidebar(); - } else { - $('#side-menu').removeAttr('style'); - } -} - -/** - * iframe处理 - */ -$(function() { - //计算元素集合的总宽度 - function calSumWidth(elements) { - var width = 0; - $(elements).each(function() { - width += $(this).outerWidth(true); - }); - return width; - } - - // 激活指定选项卡 - function setActiveTab(element) { - if (!$(element).hasClass('active')) { - var currentId = $(element).data('id'); - syncMenuTab(currentId); - // 显示tab对应的内容区 - $('.RuoYi_iframe').each(function() { - if ($(this).data('id') == currentId) { - $(this).show().siblings('.RuoYi_iframe').hide(); - } - }); - $(element).addClass('active').siblings('.menuTab').removeClass('active'); - scrollToTab(element); - } - } - - //滚动到指定选项卡 - function scrollToTab(element) { - var marginLeftVal = calSumWidth($(element).prevAll()), - marginRightVal = calSumWidth($(element).nextAll()); - // 可视区域非tab宽度 - var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".menuTabs")); - //可视区域tab宽度 - var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth; - //实际滚动宽度 - var scrollVal = 0; - if ($(".page-tabs-content").outerWidth() < visibleWidth) { - scrollVal = 0; - } else if (marginRightVal <= (visibleWidth - $(element).outerWidth(true) - $(element).next().outerWidth(true))) { - if ((visibleWidth - $(element).next().outerWidth(true)) > marginRightVal) { - scrollVal = marginLeftVal; - var tabElement = element; - while ((scrollVal - $(tabElement).outerWidth()) > ($(".page-tabs-content").outerWidth() - visibleWidth)) { - scrollVal -= $(tabElement).prev().outerWidth(); - tabElement = $(tabElement).prev(); - } - } - } else if (marginLeftVal > (visibleWidth - $(element).outerWidth(true) - $(element).prev().outerWidth(true))) { - scrollVal = marginLeftVal - $(element).prev().outerWidth(true); - } - $('.page-tabs-content').animate({ marginLeft: 0 - scrollVal + 'px' }, "fast"); - } - - //查看左侧隐藏的选项卡 - function scrollTabLeft() { - var marginLeftVal = Math.abs(parseInt($('.page-tabs-content').css('margin-left'))); - // 可视区域非tab宽度 - var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".menuTabs")); - //可视区域tab宽度 - var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth; - //实际滚动宽度 - var scrollVal = 0; - if (($(".page-tabs-content").width()) < visibleWidth) { - return false; - } else { - var tabElement = $(".menuTab:first"); - var offsetVal = 0; - while ((offsetVal + $(tabElement).outerWidth(true)) <= marginLeftVal) { //找到离当前tab最近的元素 - offsetVal += $(tabElement).outerWidth(true); - tabElement = $(tabElement).next(); - } - offsetVal = 0; - if (calSumWidth($(tabElement).prevAll()) > visibleWidth) { - while ((offsetVal + $(tabElement).outerWidth(true)) < (visibleWidth) && tabElement.length > 0) { - offsetVal += $(tabElement).outerWidth(true); - tabElement = $(tabElement).prev(); - } - scrollVal = calSumWidth($(tabElement).prevAll()); - } - } - $('.page-tabs-content').animate({ marginLeft: 0 - scrollVal + 'px' }, "fast"); - } - - //查看右侧隐藏的选项卡 - function scrollTabRight() { - var marginLeftVal = Math.abs(parseInt($('.page-tabs-content').css('margin-left'))); - // 可视区域非tab宽度 - var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".menuTabs")); - //可视区域tab宽度 - var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth; - //实际滚动宽度 - var scrollVal = 0; - if ($(".page-tabs-content").width() < visibleWidth) { - return false; - } else { - var tabElement = $(".menuTab:first"); - var offsetVal = 0; - while ((offsetVal + $(tabElement).outerWidth(true)) <= marginLeftVal) { //找到离当前tab最近的元素 - offsetVal += $(tabElement).outerWidth(true); - tabElement = $(tabElement).next(); - } - offsetVal = 0; - while ((offsetVal + $(tabElement).outerWidth(true)) < (visibleWidth) && tabElement.length > 0) { - offsetVal += $(tabElement).outerWidth(true); - tabElement = $(tabElement).next(); - } - scrollVal = calSumWidth($(tabElement).prevAll()); - if (scrollVal > 0) { - $('.page-tabs-content').animate({ marginLeft: 0 - scrollVal + 'px' }, "fast"); - } - } - } - - //通过遍历给菜单项加上data-index属性 - $(".menuItem").each(function(index) { - if (!$(this).attr('data-index')) { - $(this).attr('data-index', index); - } - }); - - function menuItem() { - // 获取标识数据 - var dataUrl = $(this).attr('href'), - dataIndex = $(this).data('index'), - menuName = $.trim($(this).text()), - isRefresh = $(this).data("refresh"), - flag = true; - - var $dataObj = $('a[href$="' + decodeURI(dataUrl) + '"]'); - if (!$dataObj.hasClass("noactive")) { - $('.tab-pane li').removeClass("active"); - $('.nav ul').removeClass("in"); - $dataObj.parents("ul").addClass("in") - $dataObj.parents("li").addClass("active").siblings().removeClass("active").find('li').removeClass("active"); - $dataObj.parents("ul").css('height', 'auto').height(); - $(".nav ul li, .nav li").removeClass("selected"); - $(this).parent("li").addClass("selected"); - } - setIframeUrl(dataUrl); - if (dataUrl == undefined || $.trim(dataUrl).length == 0) return false; - - // 选项卡菜单已存在 - $('.menuTab').each(function() { - if ($(this).data('id') == dataUrl) { - if (!$(this).hasClass('active')) { - $(this).addClass('active').siblings('.menuTab').removeClass('active'); - scrollToTab(this); - // 显示tab对应的内容区 - $('.mainContent .RuoYi_iframe').each(function() { - if ($(this).data('id') == dataUrl) { - $(this).show().siblings('.RuoYi_iframe').hide(); - return false; - } - }); - } - if (isRefresh) { - refreshTab(); - } - flag = false; - return false; - } - }); - // 选项卡菜单不存在 - if (flag) { - var str = '' + menuName + ' '; - $('.menuTab').removeClass('active'); - - // 添加选项卡对应的iframe - var str1 = ''; - $('.mainContent').find('iframe.RuoYi_iframe').hide().parents('.mainContent').append(str1); - - $.modal.loading("数据加载中,请稍候..."); - - $('.mainContent iframe:visible').on('load', function() { - $.modal.closeLoading(); - }); - - // 添加选项卡 - $('.menuTabs .page-tabs-content').append(str); - scrollToTab($('.menuTab.active')); - } - return false; - } - - function menuBlank() { - // 新窗口打开外网以http://开头,如http://ruoyi.vip - var dataUrl = $(this).attr('href'); - window.open(dataUrl); - return false; - } - - $('.menuItem').on('click', menuItem); - - $('.menuBlank').on('click', menuBlank); - - // 关闭选项卡菜单 - function closeTab() { - var closeTabId = $(this).parents('.menuTab').data('id'); - var currentWidth = $(this).parents('.menuTab').width(); - var panelUrl = $(this).parents('.menuTab').data('panel'); - // 当前元素处于活动状态 - if ($(this).parents('.menuTab').hasClass('active')) { - - // 当前元素后面有同辈元素,使后面的一个元素处于活动状态 - if ($(this).parents('.menuTab').next('.menuTab').length) { - - var activeId = $(this).parents('.menuTab').next('.menuTab:eq(0)').data('id'); - $(this).parents('.menuTab').next('.menuTab:eq(0)').addClass('active'); - - $('.mainContent .RuoYi_iframe').each(function() { - if ($(this).data('id') == activeId) { - $(this).show().siblings('.RuoYi_iframe').hide(); - return false; - } - }); - - var marginLeftVal = parseInt($('.page-tabs-content').css('margin-left')); - if (marginLeftVal < 0) { - $('.page-tabs-content').animate({ marginLeft: (marginLeftVal + currentWidth) + 'px' }, "fast"); - } - - // 移除当前选项卡 - $(this).parents('.menuTab').remove(); - - // 移除tab对应的内容区 - $('.mainContent .RuoYi_iframe').each(function() { - if ($(this).data('id') == closeTabId) { - $(this).remove(); - return false; - } - }); - } - - // 当前元素后面没有同辈元素,使当前元素的上一个元素处于活动状态 - if ($(this).parents('.menuTab').prev('.menuTab').length) { - var activeId = $(this).parents('.menuTab').prev('.menuTab:last').data('id'); - $(this).parents('.menuTab').prev('.menuTab:last').addClass('active'); - $('.mainContent .RuoYi_iframe').each(function() { - if ($(this).data('id') == activeId) { - $(this).show().siblings('.RuoYi_iframe').hide(); - return false; - } - }); - - // 移除当前选项卡 - $(this).parents('.menuTab').remove(); - - // 移除tab对应的内容区 - $('.mainContent .RuoYi_iframe').each(function() { - if ($(this).data('id') == closeTabId) { - $(this).remove(); - return false; - } - }); - - if($.common.isNotEmpty(panelUrl)){ - $('.menuTab[data-id="' + panelUrl + '"]').addClass('active').siblings('.menuTab').removeClass('active'); - $('.mainContent .RuoYi_iframe').each(function() { - if ($(this).data('id') == panelUrl) { - $(this).show().siblings('.RuoYi_iframe').hide(); - return false; - } - }); - } - } - } - // 当前元素不处于活动状态 - else { - // 移除当前选项卡 - $(this).parents('.menuTab').remove(); - - // 移除相应tab对应的内容区 - $('.mainContent .RuoYi_iframe').each(function() { - if ($(this).data('id') == closeTabId) { - $(this).remove(); - return false; - } - }); - } - scrollToTab($('.menuTab.active')); - syncMenuTab($('.page-tabs-content').find('.active').attr('data-id')); - return false; - } - - $('.menuTabs').on('click', '.menuTab i', closeTab); - - //滚动到已激活的选项卡 - function showActiveTab() { - scrollToTab($('.menuTab.active')); - } - $('.tabShowActive').on('click', showActiveTab); - - // 点击选项卡菜单 - function activeTab() { - if (!$(this).hasClass('active')) { - var currentId = $(this).data('id'); - syncMenuTab(currentId); - // 显示tab对应的内容区 - $('.mainContent .RuoYi_iframe').each(function() { - if ($(this).data('id') == currentId) { - $(this).show().siblings('.RuoYi_iframe').hide(); - return false; - } - }); - $(this).addClass('active').siblings('.menuTab').removeClass('active'); - scrollToTab(this); - } - } - - // 点击选项卡菜单 - $('.menuTabs').on('click', '.menuTab', activeTab); - - // 刷新iframe - function refreshTab() { - var currentId = $('.page-tabs-content').find('.active').attr('data-id'); - var target = $('.RuoYi_iframe[data-id="' + currentId + '"]'); - var url = target.attr('src'); - target.attr('src', url).ready(); - } - - // 页签全屏 - function fullScreenTab() { - var currentId = $('.page-tabs-content').find('.active').attr('data-id'); - var target = $('.RuoYi_iframe[data-id="' + currentId + '"]'); - target.fullScreen(true); - } - - // 关闭当前选项卡 - function tabCloseCurrent() { - $('.page-tabs-content').find('.active i').trigger("click"); - } - - //关闭其他选项卡 - function tabCloseOther() { - $('.page-tabs-content').children("[data-id]").not(":first").not(".active").each(function() { - $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove(); - $(this).remove(); - }); - $('.page-tabs-content').animate({ marginLeft: '0px' }, "fast"); - } - - // 关闭全部选项卡 - function tabCloseAll() { - $('.page-tabs-content').children("[data-id]").not(":first").each(function() { - $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove(); - $(this).remove(); - }); - $('.page-tabs-content').children("[data-id]:first").each(function() { - $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').show(); - $(this).addClass("active"); - }); - $('.page-tabs-content').css("margin-left", "0"); - syncMenuTab($('.page-tabs-content').find('.active').attr('data-id')); - } - - - // 全屏显示 - $('#fullScreen').on('click', function () { - $(document).toggleFullScreen(); - }); - - // 锁定屏幕 - $('#lockScreen').on('click', function () { - storage.set('lockPath', $('.page-tabs-content').find('.active').attr('data-id')); - location.href = ctx + "lockscreen"; - }); - - // 页签刷新按钮 - $('.tabReload').on('click', refreshTab); - - // 页签全屏按钮 - $('.tabFullScreen').on('click', fullScreenTab); - - // 双击选项卡全屏显示 - $('.menuTabs').on('dblclick', '.menuTab', activeTabMax); - - // 左移按扭 - $('.tabLeft').on('click', scrollTabLeft); - - // 右移按扭 - $('.tabRight').on('click', scrollTabRight); - - // 关闭当前 - $('.tabCloseCurrent').on('click', tabCloseCurrent); - - // 关闭其他 - $('.tabCloseOther').on('click', tabCloseOther); - - // 关闭全部 - $('.tabCloseAll').on('click', tabCloseAll); - - // tab全屏显示 - $('.tabMaxCurrent').on('click', function () { - $('.page-tabs-content').find('.active').trigger("dblclick"); - }); - - // 关闭全屏 - $('#ax_close_max').click(function(){ - $('#content-main').toggleClass('max'); - $('#ax_close_max').hide(); - }) - - // 双击选项卡全屏显示 - function activeTabMax() { - $('#content-main').toggleClass('max'); - $('#ax_close_max').show(); - } - - $(window).keydown(function(event) { - if (event.keyCode == 27) { - $('#content-main').removeClass('max'); - $('#ax_close_max').hide(); - } - }); - - window.onhashchange = function() { - var hash = location.hash; - var url = hash.substring(1, hash.length); - $('a[href$="' + url + '"]').click(); - }; - - // 右键菜单实现 - $.contextMenu({ - selector: ".menuTab", - trigger: 'right', - autoHide: true, - items: { - "close_current": { - name: "关闭当前", - icon: "fa-close", - callback: function(key, opt) { - opt.$trigger.find('i').trigger("click"); - } - }, - "close_other": { - name: "关闭其他", - icon: "fa-window-close-o", - callback: function(key, opt) { - setActiveTab(this); - tabCloseOther(); - } - }, - "close_left": { - name: "关闭左侧", - icon: "fa-reply", - callback: function(key, opt) { - setActiveTab(this); - this.prevAll('.menuTab').not(":last").each(function() { - if ($(this).hasClass('active')) { - setActiveTab(this); - } - $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove(); - $(this).remove(); - }); - $('.page-tabs-content').animate({ marginLeft: '0px' }, "fast"); - } - }, - "close_right": { - name: "关闭右侧", - icon: "fa-share", - callback: function(key, opt) { - setActiveTab(this); - this.nextAll('.menuTab').each(function() { - $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove(); - $(this).remove(); - }); - } - }, - "close_all": { - name: "全部关闭", - icon: "fa-window-close", - callback: function(key, opt) { - tabCloseAll(); - } - }, - "step": "---------", - "full": { - name: "全屏显示", - icon: "fa-arrows-alt", - callback: function(key, opt) { - setActiveTab(this); - var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]'); - target.fullScreen(true); - } - }, - "refresh": { - name: "刷新页面", - icon: "fa-refresh", - callback: function(key, opt) { - setActiveTab(this); - var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]'); - var url = target.attr('src'); - $.modal.loading("数据加载中,请稍候..."); - target.attr('src', url).on('load', function() { - $.modal.closeLoading(); - }); - } - }, - "open": { - name: "新窗口打开", - icon: "fa-link", - callback: function(key, opt) { - var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]'); - window.open(target.attr('src')); - } - }, - } - }); -}); +/** + * 首页方法封装处理 + */ +layer.config({ + extend: 'moon/style.css', + skin: 'layer-ext-moon' +}); + +var isMobile = false; +var sidebarHeight = isMobile ? '100%' : '96%'; + +$(function() { + // MetsiMenu + $('#side-menu').metisMenu(); + + // 固定菜单栏 + $('.sidebar-collapse').slimScroll({ + height: sidebarHeight, + railOpacity: 0.9, + alwaysVisible: false + }); + + // 菜单切换 + $('.navbar-minimalize').click(function() { + if (isMobile) { + $("body").toggleClass("canvas-menu"); + } else { + $("body").toggleClass("mini-navbar"); + } + SmoothlyMenu(); + }); + + $('#side-menu>li').click(function() { + if ($('body').hasClass('canvas-menu mini-navbar')) { + NavToggle(); + } + + }); + $('#side-menu>li li a:not(:has(span))').click(function() { + if ($(window).width() < 769) { + NavToggle(); + } + }); + + $('.nav-close').click(NavToggle); + + //ios浏览器兼容性处理 + if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) { + $('#content-main').css('overflow-y', 'auto'); + } + +}); + +$(window).bind("load resize", function() { + isMobile = $.common.isMobile() || $(window).width() < 769; + if (isMobile) { + $('body').addClass('canvas-menu'); + $("body").removeClass("mini-navbar"); + $("nav .logo").addClass("hide"); + $(".slimScrollDiv").css({ "overflow": "hidden" }); + $('.navbar-static-side').fadeOut(); + } else { + if($('body').hasClass('canvas-menu')) { + $('body').addClass('fixed-sidebar'); + $('body').removeClass('canvas-menu'); + $("body").removeClass("mini-navbar"); + $("nav .logo").removeClass("hide"); + $(".slimScrollDiv").css({ "overflow": "visible" }); + $('.navbar-static-side').fadeIn(); + } + } +}); + +function syncMenuTab(dataId) { + if(isLinkage) { + var $dataObj = $('a[href$="' + decodeURI(dataId) + '"]'); + if ($dataObj.attr("class") != null && !$dataObj.hasClass("noactive")) { + $('.nav ul').removeClass("in"); + $dataObj.parents("ul").addClass("in") + $dataObj.parents("li").addClass("active").siblings().removeClass("active").find('li').removeClass("active"); + $dataObj.parents("ul").css('height', 'auto').height(); + $(".nav ul li, .nav li").removeClass("selected"); + $dataObj.parent("li").addClass("selected"); + setIframeUrl(dataId); + + // 顶部菜单同步处理 + var tabStr = $dataObj.parents(".tab-pane").attr("id"); + if ($.common.isNotEmpty(tabStr)) { + var sepIndex = tabStr.lastIndexOf('_'); + var menuId = tabStr.substring(sepIndex + 1, tabStr.length); + $("#tab_" + menuId + " a").click(); + } + } + } +} + +function NavToggle() { + $('.navbar-minimalize').trigger('click'); +} + +function fixedSidebar() { + $('#side-menu').hide(); + $("nav .logo").addClass("hide"); + setTimeout(function() { + $('#side-menu').fadeIn(500); + }, 100); +} + +// 设置锚点 +function setIframeUrl(href) { + if($.common.equals("history", mode)) { + storage.set('publicPath', href); + } else { + var nowUrl = window.location.href; + var newUrl = nowUrl.substring(0, nowUrl.indexOf("#")); + window.location.href = newUrl + "#" + href; + } +} + +function SmoothlyMenu() { + if (isMobile && !$('body').hasClass('canvas-menu')) { + $('.navbar-static-side').fadeIn(); + fixedSidebar(); + } else if (!isMobile &&!$('body').hasClass('mini-navbar')) { + fixedSidebar(); + $("nav .logo").removeClass("hide"); + } else if (isMobile && $('body').hasClass('fixed-sidebar')) { + $('.navbar-static-side').fadeOut(); + fixedSidebar(); + } else if (!isMobile && $('body').hasClass('fixed-sidebar')) { + fixedSidebar(); + } else { + $('#side-menu').removeAttr('style'); + } +} + +/** + * iframe处理 + */ +$(function() { + //计算元素集合的总宽度 + function calSumWidth(elements) { + var width = 0; + $(elements).each(function() { + width += $(this).outerWidth(true); + }); + return width; + } + + // 激活指定选项卡 + function setActiveTab(element) { + if (!$(element).hasClass('active')) { + var currentId = $(element).data('id'); + syncMenuTab(currentId); + // 显示tab对应的内容区 + $('.RuoYi_iframe').each(function() { + if ($(this).data('id') == currentId) { + $(this).show().siblings('.RuoYi_iframe').hide(); + } + }); + $(element).addClass('active').siblings('.menuTab').removeClass('active'); + scrollToTab(element); + } + } + + //滚动到指定选项卡 + function scrollToTab(element) { + var marginLeftVal = calSumWidth($(element).prevAll()), + marginRightVal = calSumWidth($(element).nextAll()); + // 可视区域非tab宽度 + var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".menuTabs")); + //可视区域tab宽度 + var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth; + //实际滚动宽度 + var scrollVal = 0; + if ($(".page-tabs-content").outerWidth() < visibleWidth) { + scrollVal = 0; + } else if (marginRightVal <= (visibleWidth - $(element).outerWidth(true) - $(element).next().outerWidth(true))) { + if ((visibleWidth - $(element).next().outerWidth(true)) > marginRightVal) { + scrollVal = marginLeftVal; + var tabElement = element; + while ((scrollVal - $(tabElement).outerWidth()) > ($(".page-tabs-content").outerWidth() - visibleWidth)) { + scrollVal -= $(tabElement).prev().outerWidth(); + tabElement = $(tabElement).prev(); + } + } + } else if (marginLeftVal > (visibleWidth - $(element).outerWidth(true) - $(element).prev().outerWidth(true))) { + scrollVal = marginLeftVal - $(element).prev().outerWidth(true); + } + $('.page-tabs-content').animate({ marginLeft: 0 - scrollVal + 'px' }, "fast"); + } + + //查看左侧隐藏的选项卡 + function scrollTabLeft() { + var marginLeftVal = Math.abs(parseInt($('.page-tabs-content').css('margin-left'))); + // 可视区域非tab宽度 + var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".menuTabs")); + //可视区域tab宽度 + var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth; + //实际滚动宽度 + var scrollVal = 0; + if (($(".page-tabs-content").width()) < visibleWidth) { + return false; + } else { + var tabElement = $(".menuTab:first"); + var offsetVal = 0; + while ((offsetVal + $(tabElement).outerWidth(true)) <= marginLeftVal) { //找到离当前tab最近的元素 + offsetVal += $(tabElement).outerWidth(true); + tabElement = $(tabElement).next(); + } + offsetVal = 0; + if (calSumWidth($(tabElement).prevAll()) > visibleWidth) { + while ((offsetVal + $(tabElement).outerWidth(true)) < (visibleWidth) && tabElement.length > 0) { + offsetVal += $(tabElement).outerWidth(true); + tabElement = $(tabElement).prev(); + } + scrollVal = calSumWidth($(tabElement).prevAll()); + } + } + $('.page-tabs-content').animate({ marginLeft: 0 - scrollVal + 'px' }, "fast"); + } + + //查看右侧隐藏的选项卡 + function scrollTabRight() { + var marginLeftVal = Math.abs(parseInt($('.page-tabs-content').css('margin-left'))); + // 可视区域非tab宽度 + var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".menuTabs")); + //可视区域tab宽度 + var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth; + //实际滚动宽度 + var scrollVal = 0; + if ($(".page-tabs-content").width() < visibleWidth) { + return false; + } else { + var tabElement = $(".menuTab:first"); + var offsetVal = 0; + while ((offsetVal + $(tabElement).outerWidth(true)) <= marginLeftVal) { //找到离当前tab最近的元素 + offsetVal += $(tabElement).outerWidth(true); + tabElement = $(tabElement).next(); + } + offsetVal = 0; + while ((offsetVal + $(tabElement).outerWidth(true)) < (visibleWidth) && tabElement.length > 0) { + offsetVal += $(tabElement).outerWidth(true); + tabElement = $(tabElement).next(); + } + scrollVal = calSumWidth($(tabElement).prevAll()); + if (scrollVal > 0) { + $('.page-tabs-content').animate({ marginLeft: 0 - scrollVal + 'px' }, "fast"); + } + } + } + + //通过遍历给菜单项加上data-index属性 + $(".menuItem").each(function(index) { + if (!$(this).attr('data-index')) { + $(this).attr('data-index', index); + } + }); + + function menuItem() { + // 获取标识数据 + var dataUrl = $(this).attr('href'), + dataIndex = $(this).data('index'), + menuName = $.trim($(this).text()), + isRefresh = $(this).data("refresh"), + flag = true; + + var $dataObj = $('a[href$="' + decodeURI(dataUrl) + '"]'); + if (!$dataObj.hasClass("noactive")) { + $('.tab-pane li').removeClass("active"); + $('.nav ul').removeClass("in"); + $dataObj.parents("ul").addClass("in") + $dataObj.parents("li").addClass("active").siblings().removeClass("active").find('li').removeClass("active"); + $dataObj.parents("ul").css('height', 'auto').height(); + $(".nav ul li, .nav li").removeClass("selected"); + $(this).parent("li").addClass("selected"); + } + setIframeUrl(dataUrl); + if (dataUrl == undefined || $.trim(dataUrl).length == 0) return false; + + // 选项卡菜单已存在 + $('.menuTab').each(function() { + if ($(this).data('id') == dataUrl) { + if (!$(this).hasClass('active')) { + $(this).addClass('active').siblings('.menuTab').removeClass('active'); + scrollToTab(this); + // 显示tab对应的内容区 + $('.mainContent .RuoYi_iframe').each(function() { + if ($(this).data('id') == dataUrl) { + $(this).show().siblings('.RuoYi_iframe').hide(); + return false; + } + }); + } + if (isRefresh) { + refreshTab(); + } + flag = false; + return false; + } + }); + // 选项卡菜单不存在 + if (flag) { + var str = '' + menuName + ' '; + $('.menuTab').removeClass('active'); + + // 添加选项卡对应的iframe + var str1 = ''; + $('.mainContent').find('iframe.RuoYi_iframe').hide().parents('.mainContent').append(str1); + + $.modal.loading("数据加载中,请稍候..."); + + $('.mainContent iframe:visible').on('load', function() { + $.modal.closeLoading(); + }); + + // 添加选项卡 + $('.menuTabs .page-tabs-content').append(str); + scrollToTab($('.menuTab.active')); + } + return false; + } + + function menuBlank() { + // 新窗口打开外网以http://开头,如http://ruoyi.vip + var dataUrl = $(this).attr('href'); + window.open(dataUrl); + return false; + } + + $('.menuItem').on('click', menuItem); + + $('.menuBlank').on('click', menuBlank); + + // 关闭选项卡菜单 + function closeTab() { + var closeTabId = $(this).parents('.menuTab').data('id'); + var currentWidth = $(this).parents('.menuTab').width(); + var panelUrl = $(this).parents('.menuTab').data('panel'); + // 当前元素处于活动状态 + if ($(this).parents('.menuTab').hasClass('active')) { + + // 当前元素后面有同辈元素,使后面的一个元素处于活动状态 + if ($(this).parents('.menuTab').next('.menuTab').length) { + + var activeId = $(this).parents('.menuTab').next('.menuTab:eq(0)').data('id'); + $(this).parents('.menuTab').next('.menuTab:eq(0)').addClass('active'); + + $('.mainContent .RuoYi_iframe').each(function() { + if ($(this).data('id') == activeId) { + $(this).show().siblings('.RuoYi_iframe').hide(); + return false; + } + }); + + var marginLeftVal = parseInt($('.page-tabs-content').css('margin-left')); + if (marginLeftVal < 0) { + $('.page-tabs-content').animate({ marginLeft: (marginLeftVal + currentWidth) + 'px' }, "fast"); + } + + // 移除当前选项卡 + $(this).parents('.menuTab').remove(); + + // 移除tab对应的内容区 + $('.mainContent .RuoYi_iframe').each(function() { + if ($(this).data('id') == closeTabId) { + $(this).remove(); + return false; + } + }); + } + + // 当前元素后面没有同辈元素,使当前元素的上一个元素处于活动状态 + if ($(this).parents('.menuTab').prev('.menuTab').length) { + var activeId = $(this).parents('.menuTab').prev('.menuTab:last').data('id'); + $(this).parents('.menuTab').prev('.menuTab:last').addClass('active'); + $('.mainContent .RuoYi_iframe').each(function() { + if ($(this).data('id') == activeId) { + $(this).show().siblings('.RuoYi_iframe').hide(); + return false; + } + }); + + // 移除当前选项卡 + $(this).parents('.menuTab').remove(); + + // 移除tab对应的内容区 + $('.mainContent .RuoYi_iframe').each(function() { + if ($(this).data('id') == closeTabId) { + $(this).remove(); + return false; + } + }); + + if($.common.isNotEmpty(panelUrl)){ + $('.menuTab[data-id="' + panelUrl + '"]').addClass('active').siblings('.menuTab').removeClass('active'); + $('.mainContent .RuoYi_iframe').each(function() { + if ($(this).data('id') == panelUrl) { + $(this).show().siblings('.RuoYi_iframe').hide(); + return false; + } + }); + } + } + } + // 当前元素不处于活动状态 + else { + // 移除当前选项卡 + $(this).parents('.menuTab').remove(); + + // 移除相应tab对应的内容区 + $('.mainContent .RuoYi_iframe').each(function() { + if ($(this).data('id') == closeTabId) { + $(this).remove(); + return false; + } + }); + } + scrollToTab($('.menuTab.active')); + syncMenuTab($('.page-tabs-content').find('.active').attr('data-id')); + return false; + } + + $('.menuTabs').on('click', '.menuTab i', closeTab); + + //滚动到已激活的选项卡 + function showActiveTab() { + scrollToTab($('.menuTab.active')); + } + $('.tabShowActive').on('click', showActiveTab); + + // 点击选项卡菜单 + function activeTab() { + if (!$(this).hasClass('active')) { + var currentId = $(this).data('id'); + syncMenuTab(currentId); + // 显示tab对应的内容区 + $('.mainContent .RuoYi_iframe').each(function() { + if ($(this).data('id') == currentId) { + $(this).show().siblings('.RuoYi_iframe').hide(); + return false; + } + }); + $(this).addClass('active').siblings('.menuTab').removeClass('active'); + scrollToTab(this); + } + } + + // 点击选项卡菜单 + $('.menuTabs').on('click', '.menuTab', activeTab); + + // 刷新iframe + function refreshTab() { + var currentId = $('.page-tabs-content').find('.active').attr('data-id'); + var target = $('.RuoYi_iframe[data-id="' + currentId + '"]'); + var url = target.attr('src'); + target.attr('src', url).ready(); + } + + // 页签全屏 + function fullScreenTab() { + var currentId = $('.page-tabs-content').find('.active').attr('data-id'); + var target = $('.RuoYi_iframe[data-id="' + currentId + '"]'); + target.fullScreen(true); + } + + // 关闭当前选项卡 + function tabCloseCurrent() { + $('.page-tabs-content').find('.active i').trigger("click"); + } + + //关闭其他选项卡 + function tabCloseOther() { + $('.page-tabs-content').children("[data-id]").not(":first").not(".active").each(function() { + $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove(); + $(this).remove(); + }); + $('.page-tabs-content').animate({ marginLeft: '0px' }, "fast"); + } + + // 关闭全部选项卡 + function tabCloseAll() { + $('.page-tabs-content').children("[data-id]").not(":first").each(function() { + $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove(); + $(this).remove(); + }); + $('.page-tabs-content').children("[data-id]:first").each(function() { + $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').show(); + $(this).addClass("active"); + }); + $('.page-tabs-content').css("margin-left", "0"); + syncMenuTab($('.page-tabs-content').find('.active').attr('data-id')); + } + + + // 全屏显示 + $('#fullScreen').on('click', function () { + $(document).toggleFullScreen(); + }); + + // 锁定屏幕 + $('#lockScreen').on('click', function () { + storage.set('lockPath', $('.page-tabs-content').find('.active').attr('data-id')); + location.href = ctx + "lockscreen"; + }); + + // 页签刷新按钮 + $('.tabReload').on('click', refreshTab); + + // 页签全屏按钮 + $('.tabFullScreen').on('click', fullScreenTab); + + // 双击选项卡全屏显示 + $('.menuTabs').on('dblclick', '.menuTab', activeTabMax); + + // 左移按扭 + $('.tabLeft').on('click', scrollTabLeft); + + // 右移按扭 + $('.tabRight').on('click', scrollTabRight); + + // 关闭当前 + $('.tabCloseCurrent').on('click', tabCloseCurrent); + + // 关闭其他 + $('.tabCloseOther').on('click', tabCloseOther); + + // 关闭全部 + $('.tabCloseAll').on('click', tabCloseAll); + + // tab全屏显示 + $('.tabMaxCurrent').on('click', function () { + $('.page-tabs-content').find('.active').trigger("dblclick"); + }); + + // 关闭全屏 + $('#ax_close_max').click(function(){ + $('#content-main').toggleClass('max'); + $('#ax_close_max').hide(); + }) + + // 双击选项卡全屏显示 + function activeTabMax() { + $('#content-main').toggleClass('max'); + $('#ax_close_max').show(); + } + + $(window).keydown(function(event) { + if (event.keyCode == 27) { + $('#content-main').removeClass('max'); + $('#ax_close_max').hide(); + } + }); + + window.onhashchange = function() { + var hash = location.hash; + var url = hash.substring(1, hash.length); + $('a[href$="' + url + '"]').click(); + }; + + // 右键菜单实现 + $.contextMenu({ + selector: ".menuTab", + trigger: 'right', + autoHide: true, + items: { + "close_current": { + name: "关闭当前", + icon: "fa-close", + callback: function(key, opt) { + opt.$trigger.find('i').trigger("click"); + } + }, + "close_other": { + name: "关闭其他", + icon: "fa-window-close-o", + callback: function(key, opt) { + setActiveTab(this); + tabCloseOther(); + } + }, + "close_left": { + name: "关闭左侧", + icon: "fa-reply", + callback: function(key, opt) { + setActiveTab(this); + this.prevAll('.menuTab').not(":last").each(function() { + if ($(this).hasClass('active')) { + setActiveTab(this); + } + $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove(); + $(this).remove(); + }); + $('.page-tabs-content').animate({ marginLeft: '0px' }, "fast"); + } + }, + "close_right": { + name: "关闭右侧", + icon: "fa-share", + callback: function(key, opt) { + setActiveTab(this); + this.nextAll('.menuTab').each(function() { + $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove(); + $(this).remove(); + }); + } + }, + "close_all": { + name: "全部关闭", + icon: "fa-window-close", + callback: function(key, opt) { + tabCloseAll(); + } + }, + "step": "---------", + "full": { + name: "全屏显示", + icon: "fa-arrows-alt", + callback: function(key, opt) { + setActiveTab(this); + var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]'); + target.fullScreen(true); + } + }, + "refresh": { + name: "刷新页面", + icon: "fa-refresh", + callback: function(key, opt) { + setActiveTab(this); + var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]'); + var url = target.attr('src'); + $.modal.loading("数据加载中,请稍候..."); + target.attr('src', url).on('load', function() { + $.modal.closeLoading(); + }); + } + }, + "open": { + name: "新窗口打开", + icon: "fa-link", + callback: function(key, opt) { + var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]'); + window.open(target.attr('src')); + } + }, + } + }); +}); diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js index aa431481f..54f78d34d 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js @@ -1,6 +1,5 @@ /** * 通用方法封装处理 - * Copyright (c) 2019 ruoyi */ var startLayDate; diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js index d2defe490..208739f87 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js @@ -1,6 +1,5 @@ /** * 通用js方法封装处理 - * Copyright (c) 2019 ruoyi */ // 当前table相关信息 diff --git a/ruoyi-admin/src/main/resources/templates/index-topnav.html b/ruoyi-admin/src/main/resources/templates/index-topnav.html index d3d52afc2..c468a7794 100644 --- a/ruoyi-admin/src/main/resources/templates/index-topnav.html +++ b/ruoyi-admin/src/main/resources/templates/index-topnav.html @@ -1,442 +1,442 @@ - - - - - - - 若依系统首页 - - - - - - - - - - - - -
    - - - - - - -
    - -
    - - - - 刷新 -
    - - - -
    - -
    - - -
    - -
    - - - - - - - - - - - - - - - - + + + + + + + 生产管理系统首页 + + + + + + + + + + + + +
    + + + + + + +
    + +
    + + + + 刷新 +
    + + + +
    + +
    + + +
    + +
    + + + + + + + + + + + + + + + + diff --git a/ruoyi-admin/src/main/resources/templates/index.html b/ruoyi-admin/src/main/resources/templates/index.html index 0e7159058..f95382eb4 100644 --- a/ruoyi-admin/src/main/resources/templates/index.html +++ b/ruoyi-admin/src/main/resources/templates/index.html @@ -1,377 +1,377 @@ - - - - - - - 若依系统首页 - - - - - - - - - - - - -
    - - - - - - -
    - -
    - - - - 刷新 -
    - - - -
    - -
    - - -
    - -
    - - - - - - - - - - - - - - - + + + + + + + 生产管理系统首页 + + + + + + + + + + + + +
    + + + + + + +
    + +
    + + + + 刷新 +
    + + + +
    + +
    + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/ruoyi-admin/src/main/resources/templates/login.html b/ruoyi-admin/src/main/resources/templates/login.html index 04ad28409..e7fde6f43 100644 --- a/ruoyi-admin/src/main/resources/templates/login.html +++ b/ruoyi-admin/src/main/resources/templates/login.html @@ -1,82 +1,82 @@ - - - - - - 登录若依系统 - - - - - - - - - - - - - - - -
    -
    -
    - -
    -
    -
    -

    登录:

    -

    你若不离不弃,我必生死相依

    - - -
    -
    - -
    -
    - - - -
    -
    -
    - -
    - -
    -
    -
    - -
    - - - - - - - - - - - + + + + + + 登录若依系统 + + + + + + + + + + + + + + + +
    +
    +
    + +
    +
    +
    +

    登录:

    +

    你若不离不弃,我必生死相依

    + + +
    +
    + +
    +
    + + + +
    +
    +
    + +
    + +
    +
    +
    + +
    + + + + + + + + + + + diff --git a/sql/busi_20211108.sql b/sql/busi_20211108.sql index 382bab120..e27ff6784 100644 --- a/sql/busi_20211108.sql +++ b/sql/busi_20211108.sql @@ -33,16 +33,14 @@ insert into sys_dict_data values (57, 13, '铁色', '13', 'busi_color', '', '', insert into sys_dict_data values (58, 14, '粉色', '14', 'busi_color', '', '', 'N', '0', 'admin', sysdate(), '', null, ''); -- 一级菜单 -insert into sys_menu -values ('5', '劳务生产管理', '0', '5', '#', '', 'M', '0', '1', '', 'fa fa-bars', 'admin', sysdate(), '', null, '劳务生产管理'); + +insert into sys_menu values ('117', '生产信息', '0', '1', '#', '', 'M', '0', '1', '', 'fa fa-wrench', 'admin', sysdate(), '', null, '生产信息菜单'); +insert into sys_menu values ('118', '物料信息', '0', '2', '#', '', 'M', '0', '1', '', 'fa fa-cubes', 'admin', sysdate(), '', null, '物料信息菜单'); +insert into sys_menu values ('119', '订单信息', '0', '3', '#', '', 'M', '0', '1', '', 'fa fa-tasks', 'admin', sysdate(), '', null, '订单信息菜单'); +insert into sys_menu values ('120', '成品管理', '0', '4', '#', '', 'M', '0', '1', '', 'fa fa-male', 'admin', sysdate(), '', null, '成品管理菜单'); +insert into sys_menu values ('121', '客户管理', '0', '5', '#', '', 'M', '0', '1', '', 'fa fa-address-book-o', 'admin', sysdate(), '', null, '客户管理菜单'); +insert into sys_menu values ('122', '财务管理', '0', '6', '#', '', 'M', '0', '1', '', 'fa fa-cny', 'admin', sysdate(), '', null, '财务管理菜单'); -- 二级菜单 -insert into sys_menu values ('117', '生产信息', '5', '1', '#', '', 'C', '0', '1', '', 'fa fa-bars', 'admin', sysdate(), '', null, '生产信息菜单'); -insert into sys_menu values ('118', '物料信息', '5', '2', '#', '', 'C', '0', '1', '', 'fa fa-bars', 'admin', sysdate(), '', null, '物料信息菜单'); -insert into sys_menu values ('119', '订单信息', '5', '3', '#', '', 'C', '0', '1', '', 'fa fa-bars', 'admin', sysdate(), '', null, '订单信息菜单'); -insert into sys_menu values ('120', '成品管理', '5', '4', '#', '', 'C', '0', '1', '', 'fa fa-bars', 'admin', sysdate(), '', null, '成品管理菜单'); -insert into sys_menu values ('121', '客户管理', '5', '5', '#', '', 'C', '0', '1', '', 'fa fa-bars', 'admin', sysdate(), '', null, '客户管理菜单'); -insert into sys_menu values ('122', '财务管理', '5', '6', '#', '', 'C', '0', '1', '', 'fa fa-bars', 'admin', sysdate(), '', null, '财务管理菜单'); --- 三级菜单 insert into sys_menu values ('502', '生产经营总览', '117', '1', '/monitor/operlog', '', 'C', '0', '1', 'monitor:operlog:view', 'fa fa-address-book', 'admin', sysdate(), '', null, '生产经营总览菜单'); insert into sys_menu values ('503', '生产线总产值', '117', '2', '/monitor/operlog', '', 'C', '0', '1', 'monitor:operlog:view', 'fa fa-address-book', 'admin', sysdate(), '', null, '生产经营总览菜单'); insert into sys_menu values ('504', '布料管理', '118', '1', '/monitor/operlog', '', 'C', '0', '1', 'monitor:operlog:view', 'fa fa-address-book', 'admin', sysdate(), '', null, '布料管理菜单'); diff --git a/sql/ry_20210924.sql b/sql/ry_20210924.sql index 8f6aa2fb8..24a38955f 100644 --- a/sql/ry_20210924.sql +++ b/sql/ry_20210924.sql @@ -23,16 +23,16 @@ create table sys_dept ( -- ---------------------------- -- 初始化-部门表数据 -- ---------------------------- -insert into sys_dept values(100, 0, '0', '若依科技', 0, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(101, 100, '0,100', '深圳总公司', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(102, 100, '0,100', '长沙分公司', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(103, 101, '0,100,101', '研发部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(104, 101, '0,100,101', '市场部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(105, 101, '0,100,101', '测试部门', 3, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(106, 101, '0,100,101', '财务部门', 4, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(107, 101, '0,100,101', '运维部门', 5, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(108, 102, '0,100,102', '市场部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(109, 102, '0,100,102', '财务部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); +insert into sys_dept values(100, 0, '0', '信息科技', 0, '', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); +insert into sys_dept values(101, 100, '0,100', '深圳总公司', 1, '', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); +insert into sys_dept values(102, 100, '0,100', '长沙分公司', 2, '', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); +insert into sys_dept values(103, 101, '0,100,101', '研发部门', 1, '', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); +insert into sys_dept values(104, 101, '0,100,101', '市场部门', 2, '', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); +insert into sys_dept values(105, 101, '0,100,101', '测试部门', 3, '', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); +insert into sys_dept values(106, 101, '0,100,101', '财务部门', 4, '', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); +insert into sys_dept values(107, 101, '0,100,101', '运维部门', 5, '', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); +insert into sys_dept values(108, 102, '0,100,102', '市场部门', 1, '', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); +insert into sys_dept values(109, 102, '0,100,102', '财务部门', 2, '', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -- ---------------------------- @@ -67,8 +67,8 @@ create table sys_user ( -- ---------------------------- -- 初始化-用户信息表数据 -- ---------------------------- -insert into sys_user values(1, 103, 'admin', '若依', '00', 'ry@163.com', '15888888888', '1', '', '29c67a30398638269fe600f73a054934', '111111', '0', '0', '127.0.0.1', sysdate(), sysdate(), 'admin', sysdate(), '', null, '管理员'); -insert into sys_user values(2, 105, 'ry', '若依', '00', 'ry@qq.com', '15666666666', '1', '', '8e6d98b90472783cc73c17047ddccf36', '222222', '0', '0', '127.0.0.1', sysdate(), sysdate(), 'admin', sysdate(), '', null, '测试员'); +insert into sys_user values(1, 103, 'admin', '管理员', '00', 'ry@163.com', '15888888888', '1', '', '29c67a30398638269fe600f73a054934', '111111', '0', '0', '127.0.0.1', sysdate(), sysdate(), 'admin', sysdate(), '', null, '管理员'); +insert into sys_user values(2, 105, 'ry', '管理员', '00', 'ry@qq.com', '15666666666', '1', '', '8e6d98b90472783cc73c17047ddccf36', '222222', '0', '0', '127.0.0.1', sysdate(), sysdate(), 'admin', sysdate(), '', null, '测试员'); -- ---------------------------- @@ -154,9 +154,11 @@ create table sys_menu ( -- 初始化-菜单信息表数据 -- ---------------------------- -- 一级菜单 -insert into sys_menu values('1', '系统管理', '0', '1', '#', '', 'M', '0', '1', '', 'fa fa-gear', 'admin', sysdate(), '', null, '系统管理目录'); -insert into sys_menu values('2', '系统监控', '0', '2', '#', '', 'M', '0', '1', '', 'fa fa-video-camera', 'admin', sysdate(), '', null, '系统监控目录'); -insert into sys_menu values('3', '系统工具', '0', '3', '#', '', 'M', '0', '1', '', 'fa fa-bars', 'admin', sysdate(), '', null, '系统工具目录'); +insert into sys_menu values('1', '系统管理', '0', '8', '#', '', 'M', '0', '1', '', 'fa fa-gear', 'admin', sysdate(), '', null, '系统管理目录'); +insert into sys_menu values('2', '系统监控', '4', '2', '#', '', 'M', '0', '1', '', 'fa fa-video-camera', 'admin', sysdate(), '', null, '系统监控目录'); +insert into sys_menu values('3', '系统工具', '4', '3', '#', '', 'M', '0', '1', '', 'fa fa-bars', 'admin', sysdate(), '', null, '系统工具目录'); +insert into sys_menu values('4', '后台工具', '0', '9', '#', '', 'M', '0', '1', '', 'fa fa-bars', 'admin', sysdate(), '', null, '后台工具目录'); + -- 二级菜单 insert into sys_menu values('100', '用户管理', '1', '1', '/system/user', '', 'C', '0', '1', 'system:user:view', 'fa fa-user-o', 'admin', sysdate(), '', null, '用户管理菜单'); insert into sys_menu values('101', '角色管理', '1', '2', '/system/role', '', 'C', '0', '1', 'system:role:view', 'fa fa-user-secret', 'admin', sysdate(), '', null, '角色管理菜单'); @@ -648,8 +650,8 @@ create table sys_notice ( -- ---------------------------- -- 初始化-公告信息表数据 -- ---------------------------- -insert into sys_notice values('1', '温馨提醒:2018-07-01 若依新版本发布啦', '2', '新版本内容', '0', 'admin', sysdate(), '', null, '管理员'); -insert into sys_notice values('2', '维护通知:2018-07-01 若依系统凌晨维护', '1', '维护内容', '0', 'admin', sysdate(), '', null, '管理员'); +insert into sys_notice values('1', '温馨提醒:2018-07-01 新版本发布啦', '2', '新版本内容', '0', 'admin', sysdate(), '', null, '管理员'); +insert into sys_notice values('2', '维护通知:2018-07-01 系统凌晨维护', '1', '维护内容', '0', 'admin', sysdate(), '', null, '管理员'); -- ----------------------------