Merge remote-tracking branch 'origin/master'

This commit is contained in:
wsy 2020-09-25 09:36:49 +08:00
commit be3f3dd55e
51 changed files with 2637 additions and 3348 deletions

View File

@ -84,4 +84,4 @@
## 若依交流群 ## 若依交流群
QQ群 [![加入QQ群](https://img.shields.io/badge/已满-1389287-blue.svg)](https://jq.qq.com/?_wv=1027&k=5HBAaYN) [![加入QQ群](https://img.shields.io/badge/已满-1679294-blue.svg)](https://jq.qq.com/?_wv=1027&k=5cHeRVW) [![加入QQ群](https://img.shields.io/badge/已满-1529866-blue.svg)](https://jq.qq.com/?_wv=1027&k=53R0L5Z) [![加入QQ群](https://img.shields.io/badge/已满-1772718-blue.svg)](https://jq.qq.com/?_wv=1027&k=5g75dCU) [![加入QQ群](https://img.shields.io/badge/已满-1366522-blue.svg)](https://jq.qq.com/?_wv=1027&k=58cPoHA) [![加入QQ群](https://img.shields.io/badge/已满-1382251-blue.svg)](https://jq.qq.com/?_wv=1027&k=5Ofd4Pb) [![加入QQ群](https://img.shields.io/badge/已满-1145125-blue.svg)](https://jq.qq.com/?_wv=1027&k=5yugASz) [![加入QQ群](https://img.shields.io/badge/已满-86752435-blue.svg)](https://jq.qq.com/?_wv=1027&k=5Rf3d2P) [![加入QQ群](https://img.shields.io/badge/已满-134072510-blue.svg)](https://jq.qq.com/?_wv=1027&k=5ZIjaeP) [![加入QQ群](https://img.shields.io/badge/已满-210336300-blue.svg)](https://jq.qq.com/?_wv=1027&k=5CJw1jY) [![加入QQ群](https://img.shields.io/badge/339522636-blue.svg)](https://jq.qq.com/?_wv=1027&k=5omzbKc) QQ群 [![加入QQ群](https://img.shields.io/badge/已满-1389287-blue.svg)](https://jq.qq.com/?_wv=1027&k=5HBAaYN) [![加入QQ群](https://img.shields.io/badge/已满-1679294-blue.svg)](https://jq.qq.com/?_wv=1027&k=5cHeRVW) [![加入QQ群](https://img.shields.io/badge/已满-1529866-blue.svg)](https://jq.qq.com/?_wv=1027&k=53R0L5Z) [![加入QQ群](https://img.shields.io/badge/已满-1772718-blue.svg)](https://jq.qq.com/?_wv=1027&k=5g75dCU) [![加入QQ群](https://img.shields.io/badge/已满-1366522-blue.svg)](https://jq.qq.com/?_wv=1027&k=58cPoHA) [![加入QQ群](https://img.shields.io/badge/已满-1382251-blue.svg)](https://jq.qq.com/?_wv=1027&k=5Ofd4Pb) [![加入QQ群](https://img.shields.io/badge/已满-1145125-blue.svg)](https://jq.qq.com/?_wv=1027&k=5yugASz) [![加入QQ群](https://img.shields.io/badge/已满-86752435-blue.svg)](https://jq.qq.com/?_wv=1027&k=5Rf3d2P) [![加入QQ群](https://img.shields.io/badge/已满-134072510-blue.svg)](https://jq.qq.com/?_wv=1027&k=5ZIjaeP) [![加入QQ群](https://img.shields.io/badge/已满-210336300-blue.svg)](https://jq.qq.com/?_wv=1027&k=5CJw1jY) [![加入QQ群](https://img.shields.io/badge/已满-339522636-blue.svg)](https://jq.qq.com/?_wv=1027&k=5omzbKc) [![加入QQ群](https://img.shields.io/badge/130035985-blue.svg)](https://jq.qq.com/?_wv=1027&k=qPIKBb7s)

18
pom.xml
View File

@ -16,16 +16,18 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
<shiro.version>1.6.0</shiro.version> <shiro.version>1.6.0</shiro.version>
<thymeleaf.extras.shiro.version>2.0.0</thymeleaf.extras.shiro.version> <thymeleaf.extras.shiro.version>2.0.0</thymeleaf.extras.shiro.version>
<mybatis.boot.version>1.3.2</mybatis.boot.version> <mybatis.boot.version>1.3.2</mybatis.boot.version>
<druid.version>1.1.14</druid.version> <druid.version>1.1.22</druid.version>
<bitwalker.version>1.19</bitwalker.version> <bitwalker.version>1.19</bitwalker.version>
<kaptcha.version>2.3.2</kaptcha.version> <kaptcha.version>2.3.2</kaptcha.version>
<swagger.version>2.9.2</swagger.version> <swagger.version>2.9.2</swagger.version>
<pagehelper.boot.version>1.2.5</pagehelper.boot.version> <pagehelper.boot.version>1.2.5</pagehelper.boot.version>
<fastjson.version>1.2.73</fastjson.version> <fastjson.version>1.2.73</fastjson.version>
<oshi.version>3.9.1</oshi.version> <oshi.version>5.2.5</oshi.version>
<jna.version>5.5.0</jna.version>
<commons.io.version>2.5</commons.io.version> <commons.io.version>2.5</commons.io.version>
<commons.fileupload.version>1.3.3</commons.fileupload.version> <commons.fileupload.version>1.3.3</commons.fileupload.version>
<poi.version>3.17</poi.version> <poi.version>3.17</poi.version>
@ -40,7 +42,7 @@
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId> <artifactId>spring-boot-dependencies</artifactId>
<version>2.1.1.RELEASE</version> <version>2.1.17.RELEASE</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
@ -108,6 +110,16 @@
<version>${oshi.version}</version> <version>${oshi.version}</version>
</dependency> </dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna-platform</artifactId>
</dependency>
<!-- swagger2--> <!-- swagger2-->
<dependency> <dependency>
<groupId>io.springfox</groupId> <groupId>io.springfox</groupId>

View File

@ -214,6 +214,15 @@ public class DemoTableController extends BaseController
return prefix + "/reorder"; return prefix + "/reorder";
} }
/**
* 表格列宽拖动
*/
@GetMapping("/resizable")
public String resizable()
{
return prefix + "/resizable";
}
/** /**
* 表格行内编辑操作 * 表格行内编辑操作
*/ */
@ -250,6 +259,15 @@ public class DemoTableController extends BaseController
return prefix + "/print"; return prefix + "/print";
} }
/**
* 表格标题格式化
*/
@GetMapping("/headerStyle")
public String headerStyle()
{
return prefix + "/headerStyle";
}
/** /**
* 表格其他操作 * 表格其他操作
*/ */

View File

@ -52,7 +52,7 @@ public class SysLogininforController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
@Log(title = "日志", businessType = BusinessType.EXPORT) @Log(title = "日志", businessType = BusinessType.EXPORT)
@RequiresPermissions("monitor:logininfor:export") @RequiresPermissions("monitor:logininfor:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
@ -60,11 +60,11 @@ public class SysLogininforController extends BaseController
{ {
List<SysLogininfor> list = logininforService.selectLogininforList(logininfor); List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
ExcelUtil<SysLogininfor> util = new ExcelUtil<SysLogininfor>(SysLogininfor.class); ExcelUtil<SysLogininfor> util = new ExcelUtil<SysLogininfor>(SysLogininfor.class);
return util.exportExcel(list, "日志"); return util.exportExcel(list, "日志");
} }
@RequiresPermissions("monitor:logininfor:remove") @RequiresPermissions("monitor:logininfor:remove")
@Log(title = "日志", businessType = BusinessType.DELETE) @Log(title = "日志", businessType = BusinessType.DELETE)
@PostMapping("/remove") @PostMapping("/remove")
@ResponseBody @ResponseBody
public AjaxResult remove(String ids) public AjaxResult remove(String ids)
@ -73,7 +73,7 @@ public class SysLogininforController extends BaseController
} }
@RequiresPermissions("monitor:logininfor:remove") @RequiresPermissions("monitor:logininfor:remove")
@Log(title = "日志", businessType = BusinessType.CLEAN) @Log(title = "日志", businessType = BusinessType.CLEAN)
@PostMapping("/clean") @PostMapping("/clean")
@ResponseBody @ResponseBody
public AjaxResult clean() public AjaxResult clean()
@ -88,7 +88,7 @@ public class SysLogininforController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult unlock(String loginName) public AjaxResult unlock(String loginName)
{ {
passwordService.unlock(loginName); passwordService.clearLoginRecordCache(loginName);
return success(); return success();
} }
} }

View File

@ -76,7 +76,7 @@ public class SysUserOnlineController extends BaseController
} }
if (sessionId.equals(ShiroUtils.getSessionId())) if (sessionId.equals(ShiroUtils.getSessionId()))
{ {
return error("当前登用户无法强退"); return error("当前登用户无法强退");
} }
onlineSessionDAO.delete(onlineSession); onlineSessionDAO.delete(onlineSession);
online.setStatus(OnlineStatus.off_line); online.setStatus(OnlineStatus.off_line);

View File

@ -1,12 +1,18 @@
package com.ruoyi.web.controller.system; package com.ruoyi.web.controller.system;
import java.util.List; import java.util.List;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import com.ruoyi.common.config.Global; import com.ruoyi.common.config.Global;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.utils.CookieUtils;
import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.util.ShiroUtils; import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.system.domain.SysMenu; import com.ruoyi.system.domain.SysMenu;
import com.ruoyi.system.domain.SysUser; import com.ruoyi.system.domain.SysUser;
@ -39,18 +45,43 @@ public class SysIndexController extends BaseController
mmap.put("user", user); mmap.put("user", user);
mmap.put("sideTheme", configService.selectConfigByKey("sys.index.sideTheme")); mmap.put("sideTheme", configService.selectConfigByKey("sys.index.sideTheme"));
mmap.put("skinName", configService.selectConfigByKey("sys.index.skinName")); mmap.put("skinName", configService.selectConfigByKey("sys.index.skinName"));
mmap.put("ignoreFooter", configService.selectConfigByKey("sys.index.ignoreFooter"));
mmap.put("copyrightYear", Global.getCopyrightYear()); mmap.put("copyrightYear", Global.getCopyrightYear());
mmap.put("demoEnabled", Global.isDemoEnabled()); mmap.put("demoEnabled", Global.isDemoEnabled());
return "index";
// 菜单导航显示风格
String menuStyle = configService.selectConfigByKey("sys.index.menuStyle");
// 移动端默认使左侧导航菜单否则取默认配置
String indexStyle = ServletUtils.checkAgentIsMobile(ServletUtils.getRequest().getHeader("User-Agent")) ? "index" : menuStyle;
// 优先Cookie配置导航菜单
Cookie[] cookies = ServletUtils.getRequest().getCookies();
for (Cookie cookie : cookies)
{
if (StringUtils.isNotEmpty(cookie.getName()) && "nav-style".equalsIgnoreCase(cookie.getName()))
{
indexStyle = cookie.getValue();
break;
}
}
String webIndex = "topnav".equalsIgnoreCase(indexStyle) ? "index-topnav" : "index";
return webIndex;
} }
// 切换主题 // 切换主题
@GetMapping("/system/switchSkin") @GetMapping("/system/switchSkin")
public String switchSkin(ModelMap mmap) public String switchSkin()
{ {
return "skin"; return "skin";
} }
// 切换菜单
@GetMapping("/system/menuStyle/{style}")
public void menuStyle(@PathVariable String style, HttpServletResponse response)
{
CookieUtils.setCookie(response, "nav-style", style);
}
// 系统介绍 // 系统介绍
@GetMapping("/system/main") @GetMapping("/system/main")
public String main(ModelMap mmap) public String main(ModelMap mmap)

View File

@ -1,11 +1,11 @@
/*! /*!
* bootstrap-fileinput v5.0.4 * bootstrap-fileinput v5.1.2
* http://plugins.krajee.com/file-input * http://plugins.krajee.com/file-input
* *
* Krajee default styling for bootstrap-fileinput. * Krajee default styling for bootstrap-fileinput.
* *
* Author: Kartik Visweswaran * Author: Kartik Visweswaran
* Copyright: 2014 - 2019, Kartik Visweswaran, Krajee.com * Copyright: 2014 - 2020, Kartik Visweswaran, Krajee.com
* *
* Licensed under the BSD-3-Clause * Licensed under the BSD-3-Clause
* https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
@ -60,10 +60,9 @@
height: 16px; height: 16px;
} }
.krajee-default .file-thumb-progress .progress, .krajee-default .file-thumb-progress .progress-bar { .file-thumb-progress .progress, .file-thumb-progress .progress-bar {
height: 20px;
font-family: Verdana, Helvetica, sans-serif; font-family: Verdana, Helvetica, sans-serif;
font-size: 9px; font-size: 0.7rem;
} }
.krajee-default .file-thumb-progress .progress, .kv-upload-progress .progress { .krajee-default .file-thumb-progress .progress, .kv-upload-progress .progress {
@ -292,7 +291,6 @@
} }
.krajee-default .file-thumb-progress { .krajee-default .file-thumb-progress {
height: 11px;
top: 37px; top: 37px;
left: 0; left: 0;
right: 0; right: 0;
@ -318,7 +316,7 @@
} }
.kv-upload-progress .progress-bar { .kv-upload-progress .progress-bar {
height: 20px; height: 11px;
font-family: Verdana, Helvetica, sans-serif; font-family: Verdana, Helvetica, sans-serif;
} }
@ -340,13 +338,13 @@
.file-zoom-dialog .btn-navigate { .file-zoom-dialog .btn-navigate {
padding: 0; padding: 0;
margin: 0; margin: -60px 0 0;
font-size: 60px;
background: transparent; background: transparent;
text-decoration: none; text-decoration: none;
outline: none; outline: none;
opacity: 0.7; opacity: 0.7;
top: 45%; top: 50%;
font-size: 4em;
color: #1c94c4; color: #1c94c4;
} }
@ -402,6 +400,7 @@
.file-drop-zone { .file-drop-zone {
border: 1px dashed #aaa; border: 1px dashed #aaa;
min-height: 260px;
border-radius: 4px; border-radius: 4px;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
@ -424,6 +423,7 @@
.file-drop-zone-title { .file-drop-zone-title {
color: #aaa; color: #aaa;
font-size: 1.6em; font-size: 1.6em;
text-align:center;
padding: 85px 10px; padding: 85px 10px;
cursor: default; cursor: default;
} }
@ -467,8 +467,8 @@
} }
.file-zoom-content { .file-zoom-content {
height: 480px;
text-align: center; text-align: center;
min-height: 300px;
} }
.file-zoom-content .file-preview-image { .file-zoom-content .file-preview-image {
@ -532,19 +532,29 @@
padding-right: 20px; padding-right: 20px;
} }
.file-sortable .file-drag-handle { .clickable .file-drop-zone-title {
cursor: move; cursor: pointer;
opacity: 1;
} }
.file-sortable .file-drag-handle:hover { .file-sortable .file-drag-handle:hover {
opacity: 0.7; opacity: 0.7;
} }
.clickable .file-drop-zone-title { .file-sortable .file-drag-handle {
cursor: pointer; cursor: grab;
opacity: 1;
} }
.file-preview-initial.sortable-chosen { .file-grabbing, .file-grabbing * {
background-color: #d9edf7; cursor: not-allowed !important;
}
.file-grabbing .file-preview-thumbnails * {
cursor: grabbing !important;
}
.file-preview-frame.sortable-chosen {
background-color: #d9edf7;
border-color: #17a2b8;
box-shadow: none !important;
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,381 +0,0 @@
/*
Common
*/
.wizard,
.tabcontrol
{
display: block;
width: 100%;
overflow: hidden;
}
.wizard a,
.tabcontrol a
{
outline: 0;
}
.wizard ul,
.tabcontrol ul
{
list-style: none !important;
padding: 0;
margin: 0;
}
.wizard ul > li,
.tabcontrol ul > li
{
display: block;
padding: 0;
}
/* Accessibility */
.wizard > .steps .current-info,
.tabcontrol > .steps .current-info
{
position: absolute;
left: -999em;
}
.wizard > .content > .title,
.tabcontrol > .content > .title
{
position: absolute;
left: -999em;
}
/*
Wizard
*/
.wizard > .steps
{
position: relative;
display: block;
width: 100%;
}
.wizard.vertical > .steps
{
display: inline;
float: left;
width: 30%;
}
.wizard > .steps > ul > li
{
width: 25%;
}
.wizard > .steps > ul > li,
.wizard > .actions > ul > li
{
float: left;
}
.wizard.vertical > .steps > ul > li
{
float: none;
width: 100%;
}
.wizard > .steps a,
.wizard > .steps a:hover,
.wizard > .steps a:active
{
display: block;
width: auto;
margin: 0 0.5em 0.5em;
padding: 8px;
text-decoration: none;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.wizard > .steps .disabled a,
.wizard > .steps .disabled a:hover,
.wizard > .steps .disabled a:active
{
background: #eee;
color: #aaa;
cursor: default;
}
.wizard > .steps .current a,
.wizard > .steps .current a:hover,
.wizard > .steps .current a:active
{
background: #1AB394;
color: #fff;
cursor: default;
}
.wizard > .steps .done a,
.wizard > .steps .done a:hover,
.wizard > .steps .done a:active
{
background: #6fd1bd;
color: #fff;
}
.wizard > .steps .error a,
.wizard > .steps .error a:hover,
.wizard > .steps .error a:active
{
background: #ED5565 ;
color: #fff;
}
.wizard > .content
{
background: #eee;
display: block;
margin: 5px 5px 10px 5px;
min-height: 120px;
overflow: hidden;
position: relative;
width: auto;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.wizard-big.wizard > .content {
min-height: 320px;
}
.wizard.vertical > .content
{
display: inline;
float: left;
margin: 0 2.5% 0.5em 2.5%;
width: 65%;
}
.wizard > .content > .body
{
float: left;
position: absolute;
width: 95%;
height: 95%;
padding: 2.5%;
}
.wizard > .content > .body ul
{
list-style: disc !important;
}
.wizard > .content > .body ul > li
{
display: list-item;
}
.wizard > .content > .body > iframe
{
border: 0 none;
width: 100%;
height: 100%;
}
.wizard > .content > .body input
{
display: block;
border: 1px solid #ccc;
}
.wizard > .content > .body input[type="checkbox"]
{
display: inline-block;
}
.wizard > .content > .body input.error
{
background: rgb(251, 227, 228);
border: 1px solid #fbc2c4;
color: #8a1f11;
}
.wizard > .content > .body label
{
display: inline-block;
margin-bottom: 0.5em;
}
.wizard > .content > .body label.error
{
color: #8a1f11;
display: inline-block;
margin-left: 1.5em;
}
.wizard > .actions
{
position: relative;
display: block;
text-align: right;
width: 100%;
}
.wizard.vertical > .actions
{
display: inline;
float: right;
margin: 0 2.5%;
width: 95%;
}
.wizard > .actions > ul
{
display: inline-block;
text-align: right;
}
.wizard > .actions > ul > li
{
margin: 0 0.5em;
}
.wizard.vertical > .actions > ul > li
{
margin: 0 0 0 1em;
}
.wizard > .actions a,
.wizard > .actions a:hover,
.wizard > .actions a:active
{
background: #1AB394;
color: #fff;
display: block;
padding: 0.5em 1em;
text-decoration: none;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.wizard > .actions .disabled a,
.wizard > .actions .disabled a:hover,
.wizard > .actions .disabled a:active
{
background: #eee;
color: #aaa;
}
.wizard > .loading
{
}
.wizard > .loading .spinner
{
}
/*
Tabcontrol
*/
.tabcontrol > .steps
{
position: relative;
display: block;
width: 100%;
}
.tabcontrol > .steps > ul
{
position: relative;
margin: 6px 0 0 0;
top: 1px;
z-index: 1;
}
.tabcontrol > .steps > ul > li
{
float: left;
margin: 5px 2px 0 0;
padding: 1px;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.tabcontrol > .steps > ul > li:hover
{
background: #edecec;
border: 1px solid #bbb;
padding: 0;
}
.tabcontrol > .steps > ul > li.current
{
background: #fff;
border: 1px solid #bbb;
border-bottom: 0 none;
padding: 0 0 1px 0;
margin-top: 0;
}
.tabcontrol > .steps > ul > li > a
{
color: #5f5f5f;
display: inline-block;
border: 0 none;
margin: 0;
padding: 10px 30px;
text-decoration: none;
}
.tabcontrol > .steps > ul > li > a:hover
{
text-decoration: none;
}
.tabcontrol > .steps > ul > li.current > a
{
padding: 15px 30px 10px 30px;
}
.tabcontrol > .content
{
position: relative;
display: inline-block;
width: 100%;
height: 35em;
overflow: hidden;
border-top: 1px solid #bbb;
padding-top: 20px;
}
.tabcontrol > .content > .body
{
float: left;
position: absolute;
width: 95%;
height: 95%;
padding: 2.5%;
}
.tabcontrol > .content > .body ul
{
list-style: disc !important;
}
.tabcontrol > .content > .body ul > li
{
display: list-item;
}
label.error { position:inherit; }

File diff suppressed because one or more lines are too long

View File

@ -4,6 +4,14 @@
* NAME - blue/green/purple/red/yellow * NAME - blue/green/purple/red/yellow
* *
*/ */
.nav-tabs {
border-bottom: 0px;
}
.navbar .navbar-toolbar>li>a {
border: none !important;
}
/** 蓝色主题 skin-blue **/ /** 蓝色主题 skin-blue **/
.navbar, .skin-blue .navbar { .navbar, .skin-blue .navbar {
background-color: #3c8dbc background-color: #3c8dbc
@ -93,7 +101,7 @@
background: #1a2226 background: #1a2226
} }
.skin-blue .nav>li.active { .skin-blue .nav:not(.navbar-toolbar)>li.active {
color: #fff; color: #fff;
background: #293846; background: #293846;
border-left: 3px solid #3c8dbc; border-left: 3px solid #3c8dbc;
@ -103,6 +111,13 @@
border-left: none; border-left: none;
} }
.skin-blue .dropdown-menu > .active > a, .skin-blue .dropdown-menu > .active > a:hover, .skin-blue .dropdown-menu > .active > a:focus {
color: #fff !important;
text-decoration: none;
outline: 0;
background-color: #3c8dbc;
}
.skin-blue .sidebar a { .skin-blue .sidebar a {
color: #b8c7ce color: #b8c7ce
} }
@ -268,7 +283,7 @@
background: #1a2226; background: #1a2226;
} }
.skin-green .nav>li.active { .skin-green .nav:not(.navbar-toolbar)>li.active {
color: #fff; color: #fff;
background: #293846; background: #293846;
border-left: 3px solid #00a65a; border-left: 3px solid #00a65a;
@ -278,6 +293,13 @@
border-left: none; border-left: none;
} }
.skin-green .dropdown-menu > .active > a, .skin-green .dropdown-menu > .active > a:hover, .skin-green .dropdown-menu > .active > a:focus {
color: #fff !important;
text-decoration: none;
outline: 0;
background-color: #00a65a;
}
.skin-green .sidebar a { .skin-green .sidebar a {
color: #b8c7ce color: #b8c7ce
} }
@ -415,7 +437,7 @@
background: #1a2226 background: #1a2226
} }
.skin-red .nav>li.active { .skin-red .nav:not(.navbar-toolbar)>li.active {
color: #fff; color: #fff;
border-left: 3px solid #dd4b39; border-left: 3px solid #dd4b39;
background: #293846; background: #293846;
@ -425,6 +447,13 @@
border-left: none; border-left: none;
} }
.skin-red .dropdown-menu > .active > a, .skin-red .dropdown-menu > .active > a:hover, .skin-red .dropdown-menu > .active > a:focus {
color: #fff !important;
text-decoration: none;
outline: 0;
background-color: #dd4b39;
}
.skin-red .content-tabs { .skin-red .content-tabs {
border-bottom: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5;
} }
@ -566,7 +595,7 @@
background: #1a2226 background: #1a2226
} }
.skin-yellow .nav>li.active { .skin-yellow .nav:not(.navbar-toolbar)>li.active {
color: #fff; color: #fff;
background: #293846; background: #293846;
border-left: 3px solid #f39c12; border-left: 3px solid #f39c12;
@ -576,6 +605,13 @@
border-left: none; border-left: none;
} }
.skin-yellow .dropdown-menu > .active > a, .skin-yellow .dropdown-menu > .active > a:hover, .skin-yellow .dropdown-menu > .active > a:focus {
color: #fff !important;
text-decoration: none;
outline: 0;
background-color: #f39c12;
}
.skin-yellow .content-tabs { .skin-yellow .content-tabs {
border-bottom: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5;
} }
@ -717,7 +753,7 @@
background: #1a2226 background: #1a2226
} }
.skin-purple .nav>li.active { .skin-purple .nav:not(.navbar-toolbar)>li.active {
color: #fff; color: #fff;
background: #293846; background: #293846;
border-left: 3px solid #605ca8; border-left: 3px solid #605ca8;
@ -727,6 +763,13 @@
border-left: none; border-left: none;
} }
.skin-purple .dropdown-menu > .active > a, .skin-purple .dropdown-menu > .active > a:hover, .skin-purple .dropdown-menu > .active > a:focus {
color: #fff !important;
text-decoration: none;
outline: 0;
background-color: #605ca8;
}
.skin-purple .content-tabs { .skin-purple .content-tabs {
border-bottom: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5;
} }
@ -790,7 +833,7 @@
color: #fff color: #fff
} }
.theme-dark .nav>li.active { .theme-dark .nav:not(.navbar-toolbar)>li.active {
background: #293846; background: #293846;
} }
@ -812,7 +855,7 @@
color: #555 color: #555
} }
.theme-light .nav>li.active{ .theme-light .nav:not(.navbar-toolbar)>li.active{
background: #f9fafc; background: #f9fafc;
} }
@ -903,7 +946,7 @@
color: #a3b1cc color: #a3b1cc
} }
.theme-blue .nav>li.active{ .theme-blue .nav:not(.navbar-toolbar)>li.active{
background-color: rgba(15,41,80,1); background-color: rgba(15,41,80,1);
} }

View File

@ -46,7 +46,7 @@ a:focus {
/*white-space: nowrap;*/ /*white-space: nowrap;*/
} }
.nav.navbar-right>li>a { .nav.navbar-right>li>a, .nav.navbar-left>li>a {
color: #fff; color: #fff;
font-size: 14px; font-size: 14px;
height: 50px; height: 50px;
@ -57,7 +57,7 @@ a:focus {
color: #ffffff; color: #ffffff;
} }
.nav.navbar-right>li>a>.label { .nav.navbar-right>li>a>.label, .nav.navbar-left>li>a>.label {
position: absolute; position: absolute;
top: 9px; top: 9px;
right: 5px; right: 5px;
@ -66,7 +66,7 @@ a:focus {
padding: 2px 4px; padding: 2px 4px;
line-height: .9; line-height: .9;
} }
.nav.navbar-right>li>a:hover { .nav.navbar-right>li>a:hover, .nav.navbar-left>li>a:hover {
background-color: #367fa9; background-color: #367fa9;
color: #fff; color: #fff;
} }
@ -280,6 +280,8 @@ body.body-small .navbar-top-links li:last-child {
.nav-second-level li, .nav-third-level li { .nav-second-level li, .nav-third-level li {
border-bottom: none !important; border-bottom: none !important;
padding-left: 2px;
padding-right: 2px;
} }
.nav-second-level li a { .nav-second-level li a {
@ -288,7 +290,7 @@ body.body-small .navbar-top-links li:last-child {
} }
.nav-third-level li a { .nav-third-level li a {
padding-left: 62px; padding-left: 70px;
} }
.nav-second-level li:last-child { .nav-second-level li:last-child {
@ -307,6 +309,10 @@ body.mini-navbar .navbar-default .nav>li>.nav-second-level li a {
border-radius: 0 2px 2px 0; border-radius: 0 2px 2px 0;
} }
body.mini-navbar .navbar-default .nav>li>.nav-third-level li a {
padding-left: 31px;
}
.fixed-nav .slimScrollDiv #side-menu { .fixed-nav .slimScrollDiv #side-menu {
padding-bottom: 60px; padding-bottom: 60px;
position: relative; position: relative;
@ -479,7 +485,6 @@ body.body-small.fixed-sidebar.mini-navbar .navbar-static-side {
padding: 10px 10px 10px 10px; padding: 10px 10px 10px 10px;
text-align: center; text-align: center;
background-color: #243747; background-color: #243747;
border-bottom: dashed 1px #fff;
} }
.fixed-sidebar.mini-navbar .nav li:hover>.nav-second-level { .fixed-sidebar.mini-navbar .nav li:hover>.nav-second-level {
@ -495,6 +500,15 @@ body.body-small.fixed-sidebar.mini-navbar .navbar-static-side {
min-width: 140px; min-width: 140px;
border-radius: 2px; border-radius: 2px;
} }
.fixed-sidebar.mini-navbar .nav li.active:hover>.nav-second-level, .fixed-sidebar.mini-navbar .nav li.active:hover>a> span.nav-label {
left: 67px;
}
.fixed-sidebar.mini-navbar .nav .nav-second-level a> span, .fixed-sidebar.mini-navbar .nav .nav-third-level a> span {
display: inline-block;
}
/*伸缩菜单结束*/ /*伸缩菜单结束*/
body.fixed-sidebar.mini-navbar .navbar-default .nav>li>.nav-second-level li a { body.fixed-sidebar.mini-navbar .navbar-default .nav>li>.nav-second-level li a {
@ -1161,6 +1175,8 @@ button.dim:active:before {
/* TOOLTIPS */ /* TOOLTIPS */
.tooltip-inner { .tooltip-inner {
background-color: #2F4050; background-color: #2F4050;
word-break: break-all;
overflow-wrap: break-word;
} }
.tooltip.top .tooltip-arrow { .tooltip.top .tooltip-arrow {
@ -3254,7 +3270,7 @@ body.body-small .footer.fixed {
position: relative; position: relative;
height: 39px; height: 39px;
background: #fafafa; background: #fafafa;
line-height: 38px; line-height: 39px;
} }
.content-tabs .roll-nav, .page-tabs-list { .content-tabs .roll-nav, .page-tabs-list {
@ -6873,7 +6889,7 @@ body.rtls .top-navigation .footer.fixed, body.rtls.top-navigation .footer.fixed
} }
.navbar-header { .navbar-header {
width: 10%; /* width: 10%; */
height: 50px; height: 50px;
} }

View File

@ -0,0 +1 @@
(function(c,a,e){var b,d="resizeTabs",f={navSelector:".nav-tabs",itemSelector:">li",dropdownSelector:">.dropdown",dropdownItemSelector:"li",tabParentSelector:"",tabSelector:".tab-pane",activeClassName:"active",noNavClassName:".no-menu",fnCallback:""};b=function(j,i){var h=this.$tabs=e(j),k=this.options=e.extend(true,{},f,i),g=this.$nav=h.find(k.navSelector),l=this.$dropdown=g.find(k.dropdownSelector);this.$items=g.find(k.itemSelector).filter(function(){return !e(this).is(l)});this.$dropdownItems=l.find(k.dropdownItemSelector);if(k.tabParentSelector!==""){this.$tabPanel=e(k.tabParentSelector).find(k.tabSelector)}else{this.$tabPanel=h.find(k.tabSelector)}this.init()};b.prototype={init:function(){var j=this.itemsLenth=this.$items.length,h;if(j===0){throw"There should be some tags here "}if(this.$dropdown.length===0){this.flag=true;this.$nav.append('<li class="dropdown" role="presentation">'+'<a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">'+'<i class="glyphicon glyphicon-align-justify"></i> <b class="caret"></b></a><ul class="dropdown-menu" role="menu"></ul></li>');this.$dropdown=this.$nav.find(this.options.dropdownSelector);this.$dropdown.css("opacity",0);h=this.$dropdown.width();h=h===0?90:h;this.$dropdown.addClass("hidden").css("opacity",1)}else{h=this.$dropdown.width()}this.breakpoints=[];for(var g=0;g<j+1;g++){var k=this.$items.eq(g).width(),l=0;switch(g){case 0:l=k+h;break;case j-1:l=this.breakpoints[g-1]+k-h;break;case j:l=this.breakpoints[g-1]+h;break;default:l=this.breakpoints[g-1]+k}this.breakpoints.push(l)}if(typeof this.options.fnCallback==="function"){this.options.fnCallback(this.$tabs)}this.bind();this.layout()},layout:function(){if(this.breakpoints.length<=0){return}var l=this.$tabs.width()-500,j=0,h=this,g=this.options.activeClassName,m=this.$tabPanel.filter("."+g).index(),k=function(p){var o=p;if(p===h.itemsLenth){o=p-1}for(;o<h.itemsLenth;o++){if(h.flag){h.$dropdown.find("ul").append(h.$items.eq(o).prop("outerHTML"))}else{h.$dropdown.find("ul>li"+h.options.noNavClassName+":first").before(h.$items.eq(o).prop("outerHTML"))}h.$items.eq(o).hide()}},n=function(p){for(var o=0;o<h.itemsLenth+1;o++){if(o<p){h.$items.eq(o).show()}else{k(p);h.$dropdown.find("ul>li").show();break}}h.$dropdownItems=h.$dropdown.find(h.options.dropdownItemSelector)};for(;j<this.breakpoints.length;j++){if(this.breakpoints[j]>l){break}}this.$items.removeClass(g);this.$dropdownItems.removeClass(g);this.$dropdown.removeClass(g);if(j===this.breakpoints.length){if(this.flag){this.$dropdown.addClass("hidden")}else{this.$dropdown.find("ul>li:not(li"+this.options.noNavClassName+")").remove()}this.$items.show();if(m!=-1){this.$items.eq(m-1).addClass(g)}}else{this.$dropdown.removeClass("hidden");if(this.flag){this.$dropdown.find("ul>li").remove()}else{this.$dropdown.find("ul>li:not(li"+this.options.noNavClassName+")").remove()}n(j);if(m<j){if(m!=-1){this.$items.eq(m-1).addClass(g)}}else{this.$dropdown.addClass(g);this.$dropdownItems.eq(m-j).addClass(g)}}},throttle:function(h,g){var k=h,j,i=true;return function(){var m=arguments,l=this;if(i){k.apply(l,m);i=false}if(j){return false}j=setInterval(function(){clearInterval(j);j=null;k.apply(l,m)},g||500)}},bind:function(){var g=this;e(c).resize(function(){g.throttle(function(){g.layout()},1000)()})}};e.fn[d]=function(g){if(typeof g==="string"){var i=g,h=Array.prototype.slice.call(arguments,1);if(/^_/.test(i)){console.error("No such method : "+g)}else{return this.each(function(){var j=e.data(this,d);if(j&&typeof j[i]==="function"){j[i].apply(j,h)}})}}else{return this.each(function(){if(!e.data(this,d)){e.data(this,d,new b(this,g))}else{e.data(this,d).init()}})}}})(window,document,jQuery);$("#navMenu").resizeTabs({tabParentSelector:"#side-menu"});

View File

@ -341,6 +341,10 @@ label.error {
right: 42px right: 42px
} }
.input-group input.error + label.error + .input-group-addon>i {
color: #ed5565;
}
.input-group.date label.error { .input-group.date label.error {
z-index:99; z-index:99;
right: 3px right: 3px
@ -439,6 +443,14 @@ label.error {
background-position: -180px 0 background-position: -180px 0
} }
/* ztree */
div.ztree-border {
margin-top: 10px;
border: 1px solid #e5e6e7;
background: #FFFFFF none;
border-radius:4px;
}
/* 切换开关 */ /* 切换开关 */
.toggle-switch { .toggle-switch {
display: -webkit-inline-box; display: -webkit-inline-box;
@ -868,6 +880,26 @@ label {
height: 32px!important; 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 { .fixed-columns, .fixed-columns-right {
position: absolute; position: absolute;
@ -1056,6 +1088,23 @@ label {
visibility: visible; 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 { ::-webkit-scrollbar {
width:10px!important; width:10px!important;

View File

@ -81,6 +81,13 @@ function syncMenuTab(dataId) {
$dataObj.parents("li").addClass("active").siblings().removeClass("active").find('li').removeClass("active"); $dataObj.parents("li").addClass("active").siblings().removeClass("active").find('li').removeClass("active");
$dataObj.parents("ul").css('height', 'auto').height(); $dataObj.parents("ul").css('height', 'auto').height();
$dataObj.click(); $dataObj.click();
// 顶部菜单同步处理
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();
}
} }
} }
} }
@ -256,6 +263,7 @@ $(function() {
var $dataObj = $('a[href$="' + decodeURI(dataUrl) + '"]'); var $dataObj = $('a[href$="' + decodeURI(dataUrl) + '"]');
if (!$dataObj.hasClass("noactive")) { if (!$dataObj.hasClass("noactive")) {
$('.tab-pane li').removeClass("active");
$('.nav ul').removeClass("in"); $('.nav ul').removeClass("in");
$dataObj.parents("ul").addClass("in") $dataObj.parents("ul").addClass("in")
$dataObj.parents("li").addClass("active").siblings().removeClass("active").find('li').removeClass("active"); $dataObj.parents("li").addClass("active").siblings().removeClass("active").find('li').removeClass("active");

View File

@ -131,6 +131,7 @@ var table = {
queryParams: options.queryParams, // 传递参数(* queryParams: options.queryParams, // 传递参数(*
rowStyle: options.rowStyle, // 通过自定义函数设置行样式 rowStyle: options.rowStyle, // 通过自定义函数设置行样式
footerStyle: options.footerStyle, // 通过自定义函数设置页脚样式 footerStyle: options.footerStyle, // 通过自定义函数设置页脚样式
headerStyle: options.headerStyle, // 通过自定义函数设置标题样式
columns: options.columns, // 显示列信息(* columns: options.columns, // 显示列信息(*
data: options.data, // 被加载的数据 data: options.data, // 被加载的数据
responseHandler: $.table.responseHandler, // 在加载服务器发送来的数据之前处理函数 responseHandler: $.table.responseHandler, // 在加载服务器发送来的数据之前处理函数
@ -191,6 +192,11 @@ var table = {
$(optionsIds).on(TABLE_EVENTS, function () { $(optionsIds).on(TABLE_EVENTS, function () {
table.set($(this).attr("id")); table.set($(this).attr("id"));
}); });
// 在表格体渲染完成,并在 DOM 中可见后触发(事件)
$(optionsIds).on("post-body.bs.table", function (e, args) {
// 浮动提示框特效
$(".table [data-toggle='tooltip']").tooltip();
});
// 选中、取消、全部选中、全部取消(事件) // 选中、取消、全部选中、全部取消(事件)
$(optionsIds).on("check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table", function (e, rowsAfter, rowsBefore) { $(optionsIds).on("check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table", function (e, rowsAfter, rowsBefore) {
// 复选框分页保留保存选中数组 // 复选框分页保留保存选中数组
@ -269,8 +275,6 @@ var table = {
if (typeof table.options.onLoadSuccess == "function") { if (typeof table.options.onLoadSuccess == "function") {
table.options.onLoadSuccess(data); table.options.onLoadSuccess(data);
} }
// 浮动提示框特效
$(".table [data-toggle='tooltip']").tooltip();
}, },
// 表格销毁 // 表格销毁
destroy: function (tableId) { destroy: function (tableId) {
@ -718,9 +722,13 @@ var table = {
$.modal.alert(content, modal_status.WARNING); $.modal.alert(content, modal_status.WARNING);
}, },
// 关闭窗体 // 关闭窗体
close: function () { close: function (index) {
if($.common.isEmpty(index)){
var index = parent.layer.getFrameIndex(window.name); var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index); parent.layer.close(index);
} else {
layer.close(index);
}
}, },
// 关闭全部窗体 // 关闭全部窗体
closeAll: function () { closeAll: function () {
@ -1257,6 +1265,7 @@ var table = {
check: { check: {
enable: false, // 置 zTree 的节点上是否显示 checkbox / radio enable: false, // 置 zTree 的节点上是否显示 checkbox / radio
nocheckInherit: true, // 设置子节点是否自动继承 nocheckInherit: true, // 设置子节点是否自动继承
chkboxType: { "Y": "ps", "N": "ps" } // 父子节点的关联关系
}, },
data: { data: {
key: { key: {
@ -1481,7 +1490,7 @@ var table = {
flag = false; flag = false;
return ''; return '';
} }
return arg; return arg == null ? '' : arg;
}); });
return flag ? str : ''; return flag ? str : '';
}, },

View File

@ -334,7 +334,7 @@
<div class="col-sm-6"> <div class="col-sm-6">
<div class="jumbotron"> <div class="jumbotron">
<h1>超大屏幕</h1> <h1>超大屏幕</h1>
<p>Bootstrap 支持的另一个特性超大屏幕Jumbotron。顾名思义该组件可以增加标题的大小并为登页面内容添加更多的外边距margin。使用超大屏幕Jumbotron的步骤如下</p> <p>Bootstrap 支持的另一个特性超大屏幕Jumbotron。顾名思义该组件可以增加标题的大小并为登页面内容添加更多的外边距margin。使用超大屏幕Jumbotron的步骤如下</p>
<div class="alert alert-warning"> <div class="alert alert-warning">
<ol> <ol>
<li>创建一个带有 class .jumbotron. 的容器</li> <li>创建一个带有 class .jumbotron. 的容器</li>

View File

@ -49,6 +49,14 @@
"/img/profile.jpg" "/img/profile.jpg"
] ]
}); });
$("#fileinput-demo-1").on("fileuploaded", function(event, data, proviewId, index) {
console.info(event);
console.info(data);
console.info(proviewId);
console.info(index);
});
}); });
</script> </script>
</body> </body>

View File

@ -1,191 +1,331 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh"> <html lang="zh">
<head> <head>
<th:block th:include="include :: header('基本表单')" /> <th:block th:include="include :: header('表单向导')" />
<th:block th:include="include :: jquery-steps-css" /> <th:block th:include="include :: jquery-smartwizard-css" />
<style type="text/css">
/* 如果要让工具栏固定在页面底部,使用下面的样式,不需要的可以注释 */
.sw>.toolbar-bottom{
z-index: 100;
bottom: 0px;
left: 0;
width: 100%;
position: fixed;
text-align: right;
background: #fff;
box-shadow: 0 -2px 6px 1px hsla(223,8%,83%,.5);
border-top: 1px solid #e3e4e8;
}
/* 如果设置了是否自动调节高度为false,需要加滚动条 */
.sw>.tab-content{
overflow-x: hidden;
overflow-y: auto;
}
</style>
</head> </head>
<body class="gray-bg"> <body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight"> <div class="wrapper wrapper-content animated fadeInRight" style="height: 100%;">
<div class="row">
<div class="col-sm-5">
<div class="jumbotron">
<h1>表单向导</h1>
<p>Smart UI 部件允许您快速创建表单向导接口。</p>
<p><a href="https://github.com/rstaib/jquery-steps" target="_blank" class="btn btn-primary btn-lg" role="button">了解 jQuery Steps</a>
</p>
</div>
</div>
<div class="col-sm-7">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>基础表单向导</h5>
</div>
<div class="ibox-content">
<p>
这是一个简单的表单向导示例
</p>
<div id="wizard">
<h1>第一步</h1>
<div class="step-content">
<div class="text-center m-t-md">
<h2>第一步</h2>
<p>
这是第一步的内容
</p>
</div>
</div>
<h1>第二步</h1>
<div class="step-content">
<div class="text-center m-t-md">
<h2>第二步</h2>
<p>
这是第二步的内容
</p>
</div>
</div>
<h1>第三步</h1>
<div class="step-content">
<div class="text-center m-t-md">
<h2>第三步</h2>
<p>
这是第三步的内容
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="ibox"> <div class="ibox">
<div class="ibox-title"> <div class="ibox-title">
<h5>带验证的表单向导</h5> <h5>
表单向导
<small>https://github.com/techlab/jquery-smartwizard</small>
</h5>
</div> </div>
<div class="ibox-content"> <div class="ibox-content">
<h2> <div class="row select-list" style="padding-left: 15px; margin-bottom: 10px;">
带验证的表单向导 <ul>
</h2> <li>
<p> 选择样式:
下面这个示例展示了如何在表单向导中使用 jQuery Validation 插件 <select id="theme-selector">
</p> <option value="default">Default</option>
<option value="arrows" selected>Arrows</option>
<option value="dots">Dots</option>
<option value="progress">Progress</option>
</select>
</li>
<!-- 快速操作栏按钮 -->
<li>
<div class="btn-group-sm" role="group">
<a class="btn btn-info" id="prev-btn"> 上一步 </a>
<a class="btn btn-success" id="next-btn"> 下一步 </a>
<a class="btn btn-danger" id="reset-btn"> 重置 </a>
</div>
</li>
</ul>
<form id="form" action="" class="wizard-big"> </div>
<h1>账户</h1> <div id="smartwizard">
<fieldset> <ul class="nav">
<h2>账户信息</h2> <li class="nav-item">
<div class="row"> <a class="nav-link" href="#step-1"> 第一步 </a>
</li>
<li class="nav-item">
<a class="nav-link" href="#step-2"> 第二步 </a>
</li>
<li class="nav-item">
<a class="nav-link" href="#step-3"> 第三步 </a>
</li>
<li class="nav-item">
<a class="nav-link" href="#step-4"> 第四步 </a>
</li>
</ul>
<div class="tab-content">
<div id="step-1" class="tab-pane" role="tabpanel" aria-labelledby="step-1">
<div>
<form class="form form-horizontal m-t">
<div class="form-group">
<label class="col-sm-3 control-label">姓氏:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="form-group"> <input id="firstname" name="firstname" class="form-control" type="text">
<label>用户名 *</label> <span class="help-block m-b-none">
<input id="userName" name="userName" type="text" class="form-control required"> <i class="fa fa-info-circle"></i>
这里写点提示的内容
</span>
</div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label>密码 *</label> <label class="col-sm-3 control-label is-required">名字:</label>
<input id="password" name="password" type="text" class="form-control required"> <div class="col-sm-8">
<input id="lastname" name="lastname" class="form-control" type="text" required>
</div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label>确认密码 *</label> <label class="col-sm-3 control-label is-required">用户名:</label>
<input id="confirm" name="confirm" type="text" class="form-control required"> <div class="col-sm-8">
<input id="username" name="username" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="col-sm-4">
<div class="text-center">
<div style="margin-top: 20px">
<i class="fa fa-sign-in" style="font-size: 180px;color: #e5e5e5 "></i>
</div>
</div>
</div>
</div>
</fieldset>
<h1>个人资料</h1>
<fieldset>
<h2>个人资料信息</h2>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label>姓名 *</label>
<input id="name" name="name" type="text" class="form-control required">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label>Email *</label>
<input id="email" name="email" type="text" class="form-control required email">
</div>
<div class="form-group"> <div class="form-group">
<label>地址 *</label> <label class="col-sm-3 control-label">密码:</label>
<input id="address" name="address" type="text" class="form-control"> <div class="col-sm-8">
<input id="password" name="password" class="form-control" type="password">
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">确认密码:</label>
<div class="col-sm-8">
<input id="confirm_password" name="confirm_password" class="form-control" type="password">
<span class="help-block m-b-none">
<i class="fa fa-info-circle"></i>
请再次输入您的密码
</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">E-mail</label>
<div class="col-sm-8">
<input id="email" name="email" class="form-control" type="email">
</div> </div>
</fieldset>
<h1>警告</h1>
<fieldset>
<div class="text-center" style="margin-top: 120px">
<h2>你是火星人 :-)</h2>
</div> </div>
</fieldset>
<h1>完成</h1>
<fieldset>
<h2>条款</h2>
<input id="acceptTerms" name="acceptTerms" type="checkbox" class="required">
<label for="acceptTerms">我同意注册条款</label>
</fieldset>
</form> </form>
</div> </div>
</div> </div>
<div id="step-2" class="tab-pane" role="tabpanel" aria-labelledby="step-2">
<div>
<form class="form form-horizontal m-t">
<div class="form-group">
<label class="col-sm-3 control-label">性别:</label>
<div class="col-sm-8">
<select name="sex" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">时间:</label>
<div class="col-sm-8">
<input id="time" name="time" class="form-control time-input" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">状态:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}">
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
</form>
</div>
</div>
<div id="step-3" class="tab-pane" role="tabpanel" aria-labelledby="step-3">
<div class="m-t-md">
<p>1、如果需要工具栏在页面底部显示, 将style中下面的部分取消注释<blockquote>.sw>.toolbar-bottom </blockquote></p>
<p>2、如果设置了自动调节高度为false, 将style中下面的部分取消注释<blockquote>.sw>.tab-content </blockquote></p>
<p>3、工具栏的按钮样式会被表单插件中.btn样式覆盖导致bootstrap中的按钮样式无效, 如果需要改变按钮样式可以自己定义并提高优先级</blockquote></p>
</div>
</div>
<div id="step-4" class="tab-pane" role="tabpanel" aria-labelledby="step-4">
<div class="m-t-md">
<h3>测试多行显示</h3>
<pre style="overflow-x: hidden;">
$('#smartwizard').smartWizard({
selected: 0, // Initial selected step, 0 = first step
theme: 'default', // theme for the wizard, related css need to include for other than default theme
justified: true, // Nav menu justification. true/false
darkMode:false, // Enable/disable Dark Mode if the theme supports. true/false
autoAdjustHeight: true, // Automatically adjust content height
cycleSteps: false, // Allows to cycle the navigation of steps
backButtonSupport: true, // Enable the back button support
enableURLhash: true, // Enable selection of the step based on url hash
transition: {
animation: 'none', // Effect on navigation, none/fade/slide-horizontal/slide-vertical/slide-swing
speed: '400', // Transion animation speed
easing:'' // Transition animation easing. Not supported without a jQuery easing plugin
},
toolbarSettings: {
toolbarPosition: 'bottom', // none, top, bottom, both
toolbarButtonPosition: 'right', // left, right, center
showNextButton: true, // show/hide a Next button
showPreviousButton: true, // show/hide a Previous button
toolbarExtraButtons: [] // Extra buttons to show on toolbar, array of jQuery input/buttons elements
},
anchorSettings: {
anchorClickable: true, // Enable/Disable anchor navigation
enableAllAnchors: false, // Activates all anchors clickable all times
markDoneStep: true, // Add done state on navigation
markAllPreviousStepsAsDone: true, // When a step selected by url hash, all previous steps are marked done
removeDoneStepOnNavigateBack: false, // While navigate back done step after active step will be cleared
enableAnchorOnDoneStep: true // Enable/Disable the done steps navigation
},
keyboardSettings: {
keyNavigation: true, // Enable/Disable keyboard navigation(left and right keys are used if enabled)
keyLeft: [37], // Left key code
keyRight: [39] // Right key code
},
lang: { // Language variables for button
next: 'Next',
previous: 'Previous'
},
disabledSteps: [], // Array Steps disabled
errorSteps: [], // Highlight step with errors
hiddenSteps: [] // Hidden steps
});
</pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<th:block th:include="include :: jquery-steps-js" /> <th:block th:include="include :: jquery-smartwizard-js" />
<script> <script>
$(document).ready(function() { $(document).ready(function() {
$("#wizard").steps(); // 工具栏按钮
$("#form").steps({ var btnFinish = $('<a id="btn-finish"></a>').text('完成')
bodyTag: "fieldset", onStepChanging: function (event, currentIndex, newIndex) { .addClass('btn btn-info')
if (currentIndex > newIndex) { .on('click', function(){ submit(); });
return true var btnCancel = $('<a id="btn-cancel"></a>').text('取消')
.addClass('btn btn-danger')
.on('click', function(){ $('#smartwizard').smartWizard("reset"); });
// 下面两个按钮是为了因为插件默认的是botton,这里换成<a>,也可以选择用样式替换,或者不替换
var btnNext = $('<a id="btn-next"></a>').text('下一步')
.addClass('btn btn-info')
.on('click', function(){ $('#smartwizard').smartWizard("next");});
var btnPrev = $('<a id="btn-prev"></a>').text('上一步')
.addClass('btn btn-success disabled')
.on('click', function(){ $('#smartwizard').smartWizard("prev"); });
// 初始化表单向导组件
$('#smartwizard').smartWizard({
theme: 'arrows', // default, arrows, dots, progress
autoAdjustHeight : false, // 自动调整高度, 默认true
enableURLhash:false, //开启URL hash,开启后点击浏览器前进后退按钮会执行下一步和上一步操作
transition: {
animation: 'slide-horizontal', // Effect on navigation, none/fade/slide-horizontal/slide-vertical/slide-swing
},
toolbarSettings: {
showNextButton: false,// 因为上面自定义了下一步按钮, 所以隐藏掉插件自带的按钮, 如果不使用自定义按钮, 需要改为true或者去掉该属性
showPreviousButton: false,// 因为上面自定义了上一步按钮, 所以隐藏掉插件自带的按钮, 如果不使用自定义按钮, 需要改为true或者去掉该属性
toolbarExtraButtons: [btnCancel,btnPrev,btnNext,btnFinish]// 扩展的按钮集合
} }
if (newIndex === 3 && Number($("#age").val()) < 18) { });
return false });
function submit(){
var data = {};
$('.form').each(function (index, form){
// 这里可以使用$.common.formToJSON(formId); 需要在form上加id
$.each($(form).serializeArray(), function(i, field) {
if(data[field.name]) {
data[field.name] += ("," + field.value);
} else {
data[field.name] = field.value;
} }
var form = $(this); });
if (currentIndex < newIndex) { });
$(".body:eq(" + newIndex + ") label.error", form).remove(); alert(JSON.stringify(data))
$(".body:eq(" + newIndex + ") .error", form).removeClass("error")
} }
form.validate().settings.ignore = ":disabled,:hidden"; // 显示步骤时将触发事件
return form.valid() $("#smartwizard").on("showStep", function(e, anchorObject, stepNumber, stepDirection, stepPosition) {
}, onStepChanged: function (event, currentIndex, priorIndex) { // 下面按钮是快速操作栏的
if (currentIndex === 2 && Number($("#age").val()) >= 18) { $("#prev-btn").removeClass('disabled');
$(this).steps("next") $("#next-btn").removeClass('disabled');
// 下面按钮是工具栏的
$("#btn-prev").removeClass('disabled');
$("#btn-next").removeClass('disabled');
$("#btn-finish").removeClass('disabled');
if(stepPosition === 'first') {
$("#prev-btn").addClass('disabled');// 快速操作栏(演示用)
$("#btn-prev").addClass('disabled');
$("#btn-finish").addClass('disabled');
} else if(stepPosition === 'last') {
$("#next-btn").addClass('disabled');// 快速操作栏(演示用)
$("#btn-next").addClass('disabled');
} else {
$("#prev-btn").removeClass('disabled');// 快速操作栏(演示用)
$("#next-btn").removeClass('disabled');// 快速操作栏(演示用)
$("#btn-prev").removeClass('disabled');
$("#btn-next").removeClass('disabled');
$("#btn-finish").addClass('disabled');
} }
if (currentIndex === 2 && priorIndex === 3) { });
$(this).steps("previous")
// 该事件在离开某个步骤之前触发
$("#smartwizard").on("leaveStep", function(e, anchorObject, currentStepNumber, nextStepNumber, stepDirection) {
if(stepDirection == 'forward'){
var form = $("#step-" + (currentStepNumber + 1)).find('.form');
if(form.length > 0){
return form.validate().form();
} }
}, onFinishing: function (event, currentIndex) { return true;
var form = $(this);
form.validate().settings.ignore = ":disabled";
return form.valid()
}, onFinished: function (event, currentIndex) {
var form = $(this);
form.submit()
} }
}).validate({ return true;
errorPlacement: function (error, element) { });
element.before(error)
}, rules: {confirm: {equalTo: "#password"}} $("#theme-selector").on("change", function() {
}) // Change theme
var options = {
theme : $(this).val()
};
$('#smartwizard').smartWizard("setOptions", options);
return true;
});
$("#reset-btn").on("click", function() {
// Reset wizard
$('#smartwizard').smartWizard("reset");
return true;
});
$("#prev-btn").on("click", function() {
// Navigate previous
$('#smartwizard').smartWizard("prev");
return true;
});
$("#next-btn").on("click", function() {
// Navigate next
$('#smartwizard').smartWizard("next");
return true;
}); });
</script> </script>
</body> </body>

View File

@ -0,0 +1,91 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('表格标题格式化')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
var prefix = ctx + "demo/table";
var datas = [[${@dict.getType('sys_normal_disable')}]];
$(function() {
var options = {
url: prefix + "/list",
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
headerStyle: headerStyle,
columns: [{
checkbox: true
},
{
field : 'userId',
title : '用户ID'
},
{
field : 'userCode',
title : '用户编号'
},
{
field : 'userName',
title : '用户姓名'
},
{
field : 'userPhone',
title : '用户手机'
},
{
field : 'userEmail',
title : '用户邮箱'
},
{
field : 'userBalance',
title : '用户余额'
},
{
field: 'status',
title: '用户状态',
align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(datas, value);
}
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="#"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs" href="#"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
function headerStyle(column) {
return {
userId: {
classes: 'uppercase'
},
userName: {
css: { background: 'yellow' }
},
userBalance: {
css: { color: 'red' }
}
} [column.field]
}
</script>
</body>
</html>

View File

@ -0,0 +1,78 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('表格列宽拖动')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 select-table table-bordered">
<table id="bootstrap-table" data-resizable="true"></table>
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<th:block th:include="include :: bootstrap-table-resizable-js" />
<script th:inline="javascript">
var prefix = ctx + "demo/table";
var datas = [[${@dict.getType('sys_normal_disable')}]];
$(function() {
var options = {
url: prefix + "/list",
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
columns: [{
checkbox: true
},
{
field : 'userId',
title : '用户ID'
},
{
field : 'userCode',
title : '用户编号'
},
{
field : 'userName',
title : '用户姓名'
},
{
field : 'userPhone',
title : '用户手机'
},
{
field : 'userEmail',
title : '用户邮箱'
},
{
field : 'userBalance',
title : '用户余额'
},
{
field: 'status',
title: '用户状态',
align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(datas, value);
}
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="#"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs" href="#"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

View File

@ -164,14 +164,6 @@
autoclose: true autoclose: true
}); });
function bindDatetimepicker() {
$("input[name$='date']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true,
pickerPosition:'top-right'
});
}
function addColumn() { function addColumn() {
var count = $("#" + table.options.id).bootstrapTable('getData').length; var count = $("#" + table.options.id).bootstrapTable('getData').length;
@ -188,9 +180,16 @@
type: "", type: "",
} }
}); });
bindDatetimepicker();
} }
$("#bootstrap-table").on("post-body.bs.table", function (e, args) {
$("input[name$='date']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true,
pickerPosition:'top-right'
});
});
</script> </script>
</body> </body>
</html> </html>

View File

@ -12,7 +12,7 @@
<!-- bootstrap-table 表格插件样式 --> <!-- bootstrap-table 表格插件样式 -->
<link th:href="@{/ajax/libs/bootstrap-table/bootstrap-table.min.css?v=20200727}" rel="stylesheet"/> <link th:href="@{/ajax/libs/bootstrap-table/bootstrap-table.min.css?v=20200727}" rel="stylesheet"/>
<link th:href="@{/css/animate.css}" rel="stylesheet"/> <link th:href="@{/css/animate.css}" rel="stylesheet"/>
<link th:href="@{/css/style.css?v=20200727}" rel="stylesheet"/> <link th:href="@{/css/style.css?v=20200903}" rel="stylesheet"/>
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.4.0}" rel="stylesheet"/> <link th:href="@{/ruoyi/css/ry-ui.css?v=4.4.0}" rel="stylesheet"/>
</head> </head>
@ -147,12 +147,12 @@
<script th:src="@{/ajax/libs/jsonview/jquery.jsonview.js}"></script> <script th:src="@{/ajax/libs/jsonview/jquery.jsonview.js}"></script>
</div> </div>
<!-- jquery.steps表单向导插件 --> <!-- jquery.smartwizard表单向导插件 -->
<div th:fragment="jquery-steps-css"> <div th:fragment="jquery-smartwizard-css">
<link th:href="@{/ajax/libs/staps/jquery.steps.css}" rel="stylesheet"/> <link th:href="@{/ajax/libs/smartwizard/smart_wizard_all.min.css}" rel="stylesheet"/>
</div> </div>
<div th:fragment="jquery-steps-js"> <div th:fragment="jquery-smartwizard-js">
<script th:src="@{/ajax/libs/staps/jquery.steps.min.js}"></script> <script th:src="@{/ajax/libs/smartwizard/jquery.smartWizard.min.js}"></script>
</div> </div>
<!-- ECharts百度统计图表插件 --> <!-- ECharts百度统计图表插件 -->
@ -176,6 +176,12 @@
<script th:src="@{/ajax/libs/bootstrap-table/extensions/reorder/jquery.tablednd.js}"></script> <script th:src="@{/ajax/libs/bootstrap-table/extensions/reorder/jquery.tablednd.js}"></script>
</div> </div>
<!-- 表格列宽拖动插件 -->
<div th:fragment="bootstrap-table-resizable-js">
<script th:src="@{/ajax/libs/bootstrap-table/extensions/resizable/jquery.resizableColumns.min.js}"></script>
<script th:src="@{/ajax/libs/bootstrap-table/extensions/resizable/bootstrap-table-resizable.min.js}"></script>
</div>
<!-- 表格行内编辑插件 --> <!-- 表格行内编辑插件 -->
<div th:fragment="bootstrap-editable-css"> <div th:fragment="bootstrap-editable-css">
<link th:href="@{/ajax/libs/bootstrap-table/extensions/editable/bootstrap-editable.css}" rel="stylesheet"/> <link th:href="@{/ajax/libs/bootstrap-table/extensions/editable/bootstrap-editable.css}" rel="stylesheet"/>

View File

@ -0,0 +1,397 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit">
<title>若依系统首页</title>
<!-- 避免IE使用兼容模式 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link th:href="@{favicon.ico}" rel="shortcut icon"/>
<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
<link th:href="@{/css/jquery.contextMenu.min.css}" rel="stylesheet"/>
<link th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
<link th:href="@{/css/animate.css}" rel="stylesheet"/>
<link th:href="@{/css/style.css}" rel="stylesheet"/>
<link th:href="@{/css/skins.css?v=20200902}" rel="stylesheet"/>
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.4.0}" rel="stylesheet"/>
</head>
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow: hidden">
<div id="wrapper">
<!--左侧导航开始-->
<nav class="navbar-default navbar-static-side" role="navigation">
<div class="nav-close">
<i class="fa fa-times-circle"></i>
</div>
<a th:href="@{/index}">
<li class="logo hidden-xs">
<span class="logo-lg">RuoYi</span>
</li>
</a>
<div class="sidebar-collapse tab-content" id="side-menu">
<div class="user-panel">
<a class="menuItem noactive" title="个人中心" th:href="@{/system/user/profile}">
<div class="hide" th:text="个人中心"></div>
<div class="pull-left image">
<img th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" th:onerror="this.src='img/profile.jpg'" class="img-circle" alt="User Image">
</div>
</a>
<div class="pull-left info">
<p>[[${user.loginName}]]</p>
<a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
<a th:href="@{logout}" style="padding-left:5px;"><i class="fa fa-sign-out text-danger"></i> 注销</a>
</div>
</div>
<!-- 左侧菜单 -->
<th:block th:each="menu : ${menus}">
<div class="tab-pane fade height-full" th:id="|menu_${menu.menuId}|">
<ul class="nav">
<li th:each="cmenu : ${menu.children}">
<a class="menu-content" th:if="${#lists.isEmpty(cmenu.children)}" th:href="@{${cmenu.url}}" th:classappend="${#strings.isEmpty(cmenu.target)} ? |menuItem| : ${cmenu.target}">
<i th:class="${cmenu.icon} + ' fa-fw'"></i> <span class="nav-label">[[${cmenu.menuName}]]</span>
</a>
<a class="menu-content" th:if="${not #lists.isEmpty(cmenu.children)}" href="#">
<i th:class="${cmenu.icon} + ' fa-fw'"></i>
<span class="nav-label">[[${cmenu.menuName}]]</span>
<span class="fa arrow"></span>
</a>
<ul th:if="${not #lists.isEmpty(cmenu.children)}" class="nav nav-second-level collapse">
<li th:each="emenu : ${cmenu.children}">
<a th:if="${#lists.isEmpty(emenu.children)}" th:href="@{${emenu.url}}" th:class="${#strings.isEmpty(emenu.target)} ? |menuItem| : ${emenu.target}">
<i th:class="${emenu.icon} + ' fa-fw'"></i>
[[${emenu.menuName}]]
</a>
<a th:if="${not #lists.isEmpty(emenu.children)}" href="#">
<i th:class="${emenu.icon} + ' fa-fw'"></i>
[[${emenu.menuName}]]
<span class="fa arrow"></span>
</a>
<ul th:if="${not #lists.isEmpty(emenu.children)}" class="nav nav-third-level collapse">
<li th:each="fmenu : ${emenu.children}"><a th:if="${#lists.isEmpty(fmenu.children)}" th:class="${#strings.isEmpty(fmenu.target)} ? |menuItem| : ${fmenu.target}" th:href="@{${fmenu.url}}">[[${fmenu.menuName}]]</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</th:block>
<!-- 首页菜单 -->
<div class="tab-pane fade height-full" id="index">
<ul class="nav">
<li>
<a class="menuItem" th:href="@{/system/main}">
<i class="fa fa-home"></i> <span class="nav-label">首页</span></a>
</li>
</ul>
</div>
<!-- 实例演示菜单 -->
<div class="tab-pane fade height-full" id="demo" th:if="${demoEnabled}">
<ul class="nav">
<li>
<a href="#"><i class="fa fa-edit"></i> <span class="nav-label">表单</span><span class="fa arrow"></span></a>
<ul class="nav nav-second-level collapse">
<li><a class="menuItem" th:href="@{/demo/form/button}">按钮</a></li>
<li><a class="menuItem" th:href="@{/demo/form/grid}">栅格</a></li>
<li><a class="menuItem" th:href="@{/demo/form/select}">下拉框</a></li>
<li><a class="menuItem" th:href="@{/demo/form/timeline}">时间轴</a></li>
<li><a class="menuItem" th:href="@{/demo/form/basic}">基本表单</a></li>
<li><a class="menuItem" th:href="@{/demo/form/cards}">卡片列表</a></li>
<li><a class="menuItem" th:href="@{/demo/form/jasny}">功能扩展</a></li>
<li><a class="menuItem" th:href="@{/demo/form/sortable}">拖动排序</a></li>
<li><a class="menuItem" th:href="@{/demo/form/tabs_panels}">选项卡 & 面板</a></li>
<li><a class="menuItem" th:href="@{/demo/form/validate}">表单校验</a></li>
<li><a class="menuItem" th:href="@{/demo/form/wizard}">表单向导</a></li>
<li><a class="menuItem" th:href="@{/demo/form/upload}">文件上传</a></li>
<li><a class="menuItem" th:href="@{/demo/form/datetime}">日期和时间</a></li>
<li><a class="menuItem" th:href="@{/demo/form/summernote}">富文本编辑器</a></li>
<li><a class="menuItem" th:href="@{/demo/form/duallistbox}">左右互选组件</a></li>
<li><a class="menuItem" th:href="@{/demo/form/autocomplete}">搜索自动补全</a></li>
<li><a class="menuItem" th:href="@{/demo/form/cxselect}">多级联动下拉</a></li>
<li><a class="menuItem" th:href="@{/demo/form/localrefresh}">Ajax局部刷新</a></li>
</ul>
</li>
<li>
<a href="#"><i class="fa fa-table"></i> <span class="nav-label">表格</span><span class="fa arrow"></span></a>
<ul class="nav nav-second-level collapse">
<li><a class="menuItem" th:href="@{/demo/table/search}">查询条件</a></li>
<li><a class="menuItem" th:href="@{/demo/table/footer}">数据汇总</a></li>
<li><a class="menuItem" th:href="@{/demo/table/groupHeader}">组合表头</a></li>
<li><a class="menuItem" th:href="@{/demo/table/export}">表格导出</a></li>
<li><a class="menuItem" th:href="@{/demo/table/remember}">翻页记住选择</a></li>
<li><a class="menuItem" th:href="@{/demo/table/pageGo}">跳转至指定页</a></li>
<li><a class="menuItem" th:href="@{/demo/table/params}">自定义查询参数</a></li>
<li><a class="menuItem" th:href="@{/demo/table/multi}">初始多表格</a></li>
<li><a class="menuItem" th:href="@{/demo/table/button}">点击按钮加载表格</a></li>
<li><a class="menuItem" th:href="@{/demo/table/data}">直接加载表格数据</a></li>
<li><a class="menuItem" th:href="@{/demo/table/fixedColumns}">表格冻结列</a></li>
<li><a class="menuItem" th:href="@{/demo/table/event}">自定义触发事件</a></li>
<li><a class="menuItem" th:href="@{/demo/table/headerStyle}">表格标题格式化</a></li>
<li><a class="menuItem" th:href="@{/demo/table/detail}">表格细节视图</a></li>
<li><a class="menuItem" th:href="@{/demo/table/child}">表格父子视图</a></li>
<li><a class="menuItem" th:href="@{/demo/table/image}">表格图片预览</a></li>
<li><a class="menuItem" th:href="@{/demo/table/curd}">动态增删改查</a></li>
<li><a class="menuItem" th:href="@{/demo/table/reorder}">表格拖拽操作</a></li>
<li><a class="menuItem" th:href="@{/demo/table/resizable}">表格列宽拖动</a></li>
<li><a class="menuItem" th:href="@{/demo/table/editable}">表格行内编辑</a></li>
<li><a class="menuItem" th:href="@{/demo/table/subdata}">主子表提交</a></li>
<li><a class="menuItem" th:href="@{/demo/table/refresh}">表格自动刷新</a></li>
<li><a class="menuItem" th:href="@{/demo/table/print}">表格打印配置</a></li>
<li><a class="menuItem" th:href="@{/demo/table/other}">表格其他操作</a></li>
</ul>
</li>
<li>
<a href="#"><i class="fa fa-flask"></i> <span class="nav-label">弹框</span><span class="fa arrow"></span></a>
<ul class="nav nav-second-level collapse">
<li><a class="menuItem" th:href="@{/demo/modal/dialog}">模态窗口</a></li>
<li><a class="menuItem" th:href="@{/demo/modal/layer}">弹层组件</a></li>
<li><a class="menuItem" th:href="@{/demo/modal/table}">弹层表格</a></li>
</ul>
</li>
<li>
<a href="#"><i class="fa fa-wpforms"></i> <span class="nav-label">操作</span><span class="fa arrow"></span></a>
<ul class="nav nav-second-level collapse">
<li><a class="menuItem" th:href="@{/demo/operate/table}">表格</a></li>
<li><a class="menuItem" th:href="@{/demo/operate/other}">其他</a></li>
</ul>
</li>
<li>
<a href="#"><i class="fa fa-bar-chart-o"></i> <span class="nav-label">报表</span><span class="fa arrow"></span></a>
<ul class="nav nav-second-level collapse">
<li><a class="menuItem" th:href="@{/demo/report/echarts}">百度ECharts</a></li>
<li><a class="menuItem" th:href="@{/demo/report/peity}">peity</a></li>
<li><a class="menuItem" th:href="@{/demo/report/sparkline}">sparkline</a></li>
<li><a class="menuItem" th:href="@{/demo/report/metrics}">图表组合</a></li>
</ul>
</li>
<li>
<a href="#"><i class="fa fa-book"></i> <span class="nav-label">图标</span><span class="fa arrow"></span></a>
<ul class="nav nav-second-level collapse">
<li><a class="menuItem" th:href="@{/demo/icon/fontawesome}">Font Awesome</a></li>
<li><a class="menuItem" th:href="@{/demo/icon/glyphicons}">Glyphicons</a></li>
</ul>
</li>
<li>
<a href="#"><i class="fa fa-navicon"></i> <span class="nav-label">四层菜单</span><span class="fa arrow"></span></a>
<ul class="nav nav-second-level collapse">
<li>
<a href="#" id="damian">三级菜单1<span class="fa arrow"></span></a>
<ul class="nav nav-third-level collapse">
<li>
<a href="#">四级菜单1</a>
</li>
<li>
<a href="#">四级菜单2</a>
</li>
</ul>
</li>
<li><a href="#">三级菜单2</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<!--左侧导航结束-->
<!--右侧部分开始-->
<div id="page-wrapper" class="gray-bg dashbard-1">
<div class="row border-bottom">
<nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
<div class="navbar-header">
<a class="navbar-minimalize minimalize-styl-2" style="color:#FFF;" href="#" title="收起菜单">
<i class="fa fa-bars"></i>
</a>
</div>
<!-- 顶部栏 -->
<div id="navMenu">
<ul class="nav navbar-toolbar nav-tabs navbar-left hidden-xs">
<!-- 顶部菜单列表 -->
<th:block th:each="menu : ${menus}">
<li role="presentation" th:id="|tab_${menu.menuId}|">
<a data-toggle="tab" th:class="@{${!#strings.isEmpty(menu.target) && menu.target == 'menuBlank'} ? 'menuBlank'}" th:href="@{${!#strings.isEmpty(menu.target) && menu.target == 'menuBlank'} ? ${menu.url} : |#menu_${menu.menuId}|}">
<i th:class="${menu.icon}"></i> <span>[[${menu.menuName}]]</span>
</a>
</li>
</th:block>
<li role="presentation" id="tab_index">
<a data-toggle="tab" href="#index">
<i class="fa fa-area-chart"></i> <span>统计报表</span>
</a>
</li>
<li role="presentation" id="tab_demo" th:if="${demoEnabled}">
<a data-toggle="tab" href="#demo">
<i class="fa fa-desktop"></i> <span>实例演示</span>
</a>
</li>
</ul>
</div>
<!-- 右侧栏 -->
<ul class="nav navbar-top-links navbar-right welcome-message">
<li><a title="视频教程" href="http://doc.ruoyi.vip/ruoyi/document/spjc.html" target="_blank"><i class="fa fa-video-camera"></i> 视频教程</a></li>
<li><a title="开发文档" href="http://doc.ruoyi.vip" target="_blank"><i class="fa fa-question-circle"></i> 开发文档</a></li>
<li><a title="全屏显示" href="javascript:void(0)" id="fullScreen"><i class="fa fa-arrows-alt"></i> 全屏显示</a></li>
<li class="dropdown user-menu">
<a href="javascript:void(0)" class="dropdown-toggle" data-hover="dropdown">
<img th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" th:onerror="this.src='img/profile.jpg'" class="user-image">
<span class="hidden-xs">[[${#strings.defaultString(user.userName, '-')}]]</span>
</a>
<ul class="dropdown-menu">
<li class="mt5">
<a th:href="@{/system/user/profile}" class="menuItem">
<i class="fa fa-user"></i> 个人中心</a>
</li>
<li>
<a onclick="resetPwd()">
<i class="fa fa-key"></i> 修改密码</a>
</li>
<li>
<a onclick="switchSkin()">
<i class="fa fa-dashboard"></i> 切换主题</a>
</li>
<li>
<a onclick="toggleMenu()">
<i class="fa fa-toggle-off"></i> 左侧菜单</a>
</li>
<li class="divider"></li>
<li>
<a th:href="@{logout}">
<i class="fa fa-sign-out"></i> 退出登录</a>
</li>
</ul>
</li>
</ul>
</nav>
</div>
<div class="row content-tabs">
<button class="roll-nav roll-left tabLeft">
<i class="fa fa-backward"></i>
</button>
<nav class="page-tabs menuTabs">
<div class="page-tabs-content">
<a href="javascript:;" class="active menuTab" th:data-id="@{/system/main}">首页</a>
</div>
</nav>
<button class="roll-nav roll-right tabRight">
<i class="fa fa-forward"></i>
</button>
<a href="javascript:void(0);" class="roll-nav roll-right tabReload"><i class="fa fa-refresh"></i> 刷新</a>
</div>
<a id="ax_close_max" class="ax_close_max" href="#" title="关闭全屏"> <i class="fa fa-times-circle-o"></i> </a>
<div class="row mainContent" id="content-main" th:style="${#bools.isFalse(ignoreFooter)} ? |height: calc(100% - 91px)|">
<iframe class="RuoYi_iframe" name="iframe0" width="100%" height="100%" th:data-id="@{/system/main}"
th:src="@{/system/main}" frameborder="0" seamless></iframe>
</div>
<div th:if="${ignoreFooter}" class="footer">
<div class="pull-right">© [[${copyrightYear}]] RuoYi Copyright </div>
</div>
</div>
<!--右侧部分结束-->
</div>
<!-- 全局js -->
<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/js/bootstrap.min.js}"></script>
<script th:src="@{/js/plugins/metisMenu/jquery.metisMenu.js}"></script>
<script th:src="@{/js/plugins/slimscroll/jquery.slimscroll.min.js}"></script>
<script th:src="@{/js/jquery.contextMenu.min.js}"></script>
<script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.4.0}"></script>
<script th:src="@{/ruoyi/js/common.js?v=4.4.0}"></script>
<script th:src="@{/ruoyi/index.js?v=20200902}"></script>
<script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script>
<script th:src="@{/js/resize-tabs.js}"></script>
<script th:inline="javascript">
var ctx = [[@{/}]];
// 皮肤缓存
var skin = storage.get("skin");
// history表示去掉地址的#)否则地址以"#"形式展示
var mode = "history";
// 历史访问路径缓存
var historyPath = storage.get("historyPath");
// 是否页签与菜单联动
var isLinkage = true;
// 本地主题优先,未设置取系统配置
if($.common.isNotEmpty(skin)){
$("body").addClass(skin.split('|')[0]);
$("body").addClass(skin.split('|')[1]);
} else {
$("body").addClass([[${sideTheme}]]);
$("body").addClass([[${skinName}]]);
}
/* 用户管理-重置密码 */
function resetPwd() {
var url = ctx + 'system/user/profile/resetPwd';
$.modal.open("重置密码", url, '770', '380');
}
/* 切换主题 */
function switchSkin() {
layer.open({
type : 2,
shadeClose : true,
title : "切换主题",
area : ["530px", "386px"],
content : [ctx + "system/switchSkin", 'no']
})
}
/* 切换菜单 */
function toggleMenu() {
$.modal.confirm("确认要切换成左侧菜单吗?", function() {
$.get(ctx + 'system/menuStyle/default', function(result) {
window.location.reload();
});
})
}
/** 刷新时访问路径页签 */
function applyPath(url) {
var $dataObj = $('a[href$="' + decodeURI(url) + '"]');
$dataObj.click();
if (!$dataObj.hasClass("noactive")) {
$dataObj.parent("li").addClass("selected").parents("li").addClass("active").end().parents("ul").addClass("in");
}
// 顶部菜单同步处理
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() {
if($.common.equals("history", mode) && window.performance.navigation.type == 1) {
var url = storage.get('publicPath');
if ($.common.isNotEmpty(url)) {
applyPath(url);
} else {
$(".navbar-toolbar li a").eq(0).click();
}
} else {
var hash = location.hash;
if ($.common.isNotEmpty(hash)) {
var url = hash.substring(1, hash.length);
applyPath(url);
} else {
if($.common.equals("history", mode)) {
storage.set('publicPath', "");
}
$(".navbar-toolbar li a").eq(0).click();
}
}
});
</script>
</body>
</html>

View File

@ -110,11 +110,13 @@
<li><a class="menuItem" th:href="@{/demo/table/data}">直接加载表格数据</a></li> <li><a class="menuItem" th:href="@{/demo/table/data}">直接加载表格数据</a></li>
<li><a class="menuItem" th:href="@{/demo/table/fixedColumns}">表格冻结列</a></li> <li><a class="menuItem" th:href="@{/demo/table/fixedColumns}">表格冻结列</a></li>
<li><a class="menuItem" th:href="@{/demo/table/event}">自定义触发事件</a></li> <li><a class="menuItem" th:href="@{/demo/table/event}">自定义触发事件</a></li>
<li><a class="menuItem" th:href="@{/demo/table/headerStyle}">表格标题格式化</a></li>
<li><a class="menuItem" th:href="@{/demo/table/detail}">表格细节视图</a></li> <li><a class="menuItem" th:href="@{/demo/table/detail}">表格细节视图</a></li>
<li><a class="menuItem" th:href="@{/demo/table/child}">表格父子视图</a></li> <li><a class="menuItem" th:href="@{/demo/table/child}">表格父子视图</a></li>
<li><a class="menuItem" th:href="@{/demo/table/image}">表格图片预览</a></li> <li><a class="menuItem" th:href="@{/demo/table/image}">表格图片预览</a></li>
<li><a class="menuItem" th:href="@{/demo/table/curd}">动态增删改查</a></li> <li><a class="menuItem" th:href="@{/demo/table/curd}">动态增删改查</a></li>
<li><a class="menuItem" th:href="@{/demo/table/reorder}">表格拖拽操作</a></li> <li><a class="menuItem" th:href="@{/demo/table/reorder}">表格拖拽操作</a></li>
<li><a class="menuItem" th:href="@{/demo/table/resizable}">表格列宽拖动</a></li>
<li><a class="menuItem" th:href="@{/demo/table/editable}">表格行内编辑</a></li> <li><a class="menuItem" th:href="@{/demo/table/editable}">表格行内编辑</a></li>
<li><a class="menuItem" th:href="@{/demo/table/subdata}">主子表提交</a></li> <li><a class="menuItem" th:href="@{/demo/table/subdata}">主子表提交</a></li>
<li><a class="menuItem" th:href="@{/demo/table/refresh}">表格自动刷新</a></li> <li><a class="menuItem" th:href="@{/demo/table/refresh}">表格自动刷新</a></li>
@ -204,6 +206,10 @@
<a onclick="switchSkin()"> <a onclick="switchSkin()">
<i class="fa fa-dashboard"></i> 切换主题</a> <i class="fa fa-dashboard"></i> 切换主题</a>
</li> </li>
<li>
<a onclick="toggleMenu()">
<i class="fa fa-toggle-off"></i> 横向菜单</a>
</li>
<li class="divider"></li> <li class="divider"></li>
<li> <li>
<a th:href="@{logout}"> <a th:href="@{logout}">
@ -231,11 +237,12 @@
<a id="ax_close_max" class="ax_close_max" href="#" title="关闭全屏"> <i class="fa fa-times-circle-o"></i> </a> <a id="ax_close_max" class="ax_close_max" href="#" title="关闭全屏"> <i class="fa fa-times-circle-o"></i> </a>
<div class="row mainContent" id="content-main"> <div class="row mainContent" id="content-main" th:style="${#bools.isFalse(ignoreFooter)} ? |height: calc(100% - 91px)|">
<iframe class="RuoYi_iframe" name="iframe0" width="100%" height="100%" th:data-id="@{/system/main}" <iframe class="RuoYi_iframe" name="iframe0" width="100%" height="100%" th:data-id="@{/system/main}"
th:src="@{/system/main}" frameborder="0" seamless></iframe> th:src="@{/system/main}" frameborder="0" seamless></iframe>
</div> </div>
<div class="footer">
<div th:if="${ignoreFooter}" class="footer">
<div class="pull-right">© [[${copyrightYear}]] RuoYi Copyright </div> <div class="pull-right">© [[${copyrightYear}]] RuoYi Copyright </div>
</div> </div>
</div> </div>
@ -278,6 +285,7 @@ function resetPwd() {
var url = ctx + 'system/user/profile/resetPwd'; var url = ctx + 'system/user/profile/resetPwd';
$.modal.open("重置密码", url, '770', '380'); $.modal.open("重置密码", url, '770', '380');
} }
/* 切换主题 */ /* 切换主题 */
function switchSkin() { function switchSkin() {
layer.open({ layer.open({
@ -289,6 +297,15 @@ function switchSkin() {
}) })
} }
/* 切换菜单 */
function toggleMenu() {
$.modal.confirm("确认要切换成横向菜单吗?", function() {
$.get(ctx + 'system/menuStyle/topnav', function(result) {
window.location.reload();
});
})
}
/** 刷新时访问路径页签 */ /** 刷新时访问路径页签 */
function applyPath(url) { function applyPath(url) {
$('a[href$="' + decodeURI(url) + '"]').click(); $('a[href$="' + decodeURI(url) + '"]').click();
@ -308,6 +325,10 @@ $(function() {
if ($.common.isNotEmpty(hash)) { if ($.common.isNotEmpty(hash)) {
var url = hash.substring(1, hash.length); var url = hash.substring(1, hash.length);
applyPath(url); applyPath(url);
} else {
if($.common.equals("history", mode)) {
storage.set('publicPath', "");
}
} }
} }
}); });

View File

@ -79,7 +79,7 @@
<div class="ibox-content"> <div class="ibox-content">
<p><i class="fa fa-send-o"></i> 官网:<a href="http://www.ruoyi.vip" target="_blank">http://www.ruoyi.vip</a> <p><i class="fa fa-send-o"></i> 官网:<a href="http://www.ruoyi.vip" target="_blank">http://www.ruoyi.vip</a>
</p> </p>
<p><i class="fa fa-qq"></i> QQ群<s>满1389287</s> <s>满1679294</s> <s>满1529866</s> <s>满1772718</s> <s>满1366522</s> <s>满1382251</s> <s>满1145125</s> <s>满86752435</s> <s>满134072510</s> <s>满210336300</s> <a href="https://jq.qq.com/?_wv=1027&k=5omzbKc" target="_blank">339522636</a> <p><i class="fa fa-qq"></i> QQ群<s>满1389287</s> <s>满1679294</s> <s>满1529866</s> <s>满1772718</s> <s>满1366522</s> <s>满1382251</s> <s>满1145125</s> <s>满86752435</s> <s>满134072510</s> <s>满210336300</s> <s>满339522636</s> <a href="https://jq.qq.com/?_wv=1027&k=qPIKBb7s" target="_blank">130035985</a>
</p> </p>
<p><i class="fa fa-weixin"></i> 微信:<a href="javascript:;">/ *若依</a> <p><i class="fa fa-weixin"></i> 微信:<a href="javascript:;">/ *若依</a>
</p> </p>
@ -707,7 +707,7 @@
<div id="v21" class="panel-collapse collapse"> <div id="v21" class="panel-collapse collapse">
<div class="panel-body"> <div class="panel-body">
<ol> <ol>
<li>新增登超时提醒</li> <li>新增登超时提醒</li>
<li>修复定时器热部署转换问题</li> <li>修复定时器热部署转换问题</li>
<li>修复登录验证码校验无效问题</li> <li>修复登录验证码校验无效问题</li>
<li>定时任务新增立即执行一次</li> <li>定时任务新增立即执行一次</li>
@ -778,7 +778,7 @@
<div class="panel-body"> <div class="panel-body">
<ol> <ol>
<li>优化登录失败刷新验证码</li> <li>优化登录失败刷新验证码</li>
<li>新增用户登地址时间</li> <li>新增用户登地址时间</li>
<li>修复ajax超时退出问题</li> <li>修复ajax超时退出问题</li>
<li>新增html调用数据字典(若依首创)</li> <li>新增html调用数据字典(若依首创)</li>
<li>调整系统部分样式</li> <li>调整系统部分样式</li>

View File

@ -42,9 +42,15 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">菜单权限</label> <label class="col-sm-3 control-label">菜单权限</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div id="menuTrees" class="ztree"></div> <label class="check-box">
<input type="checkbox" value="1">展开/折叠</label>
<label class="check-box">
<input type="checkbox" value="2">全选/全不选</label>
<label class="check-box">
<input type="checkbox" value="3" checked>父子联动</label>
<div id="menuTrees" class="ztree ztree-border"></div>
</div> </div>
</div> </div>
</form> </form>
@ -111,6 +117,30 @@
focusCleanup: true focusCleanup: true
}); });
$('input').on('ifChanged', function(obj){
var type = $(this).val();
var checked = obj.currentTarget.checked;
if (type == 1) {
if (checked) {
$._tree.expandAll(true);
} else {
$._tree.expandAll(false);
}
} else if (type == "2") {
if (checked) {
$._tree.checkAllNodes(true);
} else {
$._tree.checkAllNodes(false);
}
} else if (type == "3") {
if (checked) {
$._tree.setting.check.chkboxType = { "Y": "ps", "N": "ps" };
} else {
$._tree.setting.check.chkboxType = { "Y": "", "N": "" };
}
}
})
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
add(); add();

View File

@ -34,9 +34,15 @@
</div> </div>
</div> </div>
<div class="form-group" id="authDataScope" th:style="'display:' + @{(*{dataScope=='2'} ? 'block' : 'none')} + ''"> <div class="form-group" id="authDataScope" th:style="'display:' + @{(*{dataScope=='2'} ? 'block' : 'none')} + ''">
<label class="col-sm-3 control-label">数据权限</label> <label class="col-sm-3 control-label">数据权限</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div id="deptTrees" class="ztree"></div> <label class="check-box">
<input type="checkbox" value="1" checked>展开/折叠</label>
<label class="check-box">
<input type="checkbox" value="2">全选/全不选</label>
<label class="check-box">
<input type="checkbox" value="3" checked>父子联动</label>
<div id="deptTrees" class="ztree ztree-border"></div>
</div> </div>
</div> </div>
</form> </form>
@ -56,6 +62,30 @@
$.tree.init(options); $.tree.init(options);
}); });
$('input').on('ifChanged', function(obj){
var type = $(this).val();
var checked = obj.currentTarget.checked;
if (type == 1) {
if (checked) {
$._tree.expandAll(true);
} else {
$._tree.expandAll(false);
}
} else if (type == "2") {
if (checked) {
$._tree.checkAllNodes(true);
} else {
$._tree.checkAllNodes(false);
}
} else if (type == "3") {
if (checked) {
$._tree.setting.check.chkboxType = { "Y": "ps", "N": "ps" };
} else {
$._tree.setting.check.chkboxType = { "Y": "", "N": "" };
}
}
})
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
edit(); edit();

View File

@ -43,9 +43,15 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">菜单权限</label> <label class="col-sm-3 control-label">菜单权限</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div id="menuTrees" class="ztree"></div> <label class="check-box">
<input type="checkbox" value="1">展开/折叠</label>
<label class="check-box">
<input type="checkbox" value="2">全选/全不选</label>
<label class="check-box">
<input type="checkbox" value="3" checked>父子联动</label>
<div id="menuTrees" class="ztree ztree-border"></div>
</div> </div>
</div> </div>
</form> </form>
@ -118,6 +124,30 @@
focusCleanup: true focusCleanup: true
}); });
$('input').on('ifChanged', function(obj){
var type = $(this).val();
var checked = obj.currentTarget.checked;
if (type == 1) {
if (checked) {
$._tree.expandAll(true);
} else {
$._tree.expandAll(false);
}
} else if (type == "2") {
if (checked) {
$._tree.checkAllNodes(true);
} else {
$._tree.checkAllNodes(false);
}
} else if (type == "3") {
if (checked) {
$._tree.setting.check.chkboxType = { "Y": "ps", "N": "ps" };
} else {
$._tree.setting.check.chkboxType = { "Y": "", "N": "" };
}
}
})
function edit() { function edit() {
var roleId = $("input[name='roleId']").val(); var roleId = $("input[name='roleId']").val();
var roleName = $("input[name='roleName']").val(); var roleName = $("input[name='roleName']").val();

View File

@ -251,13 +251,11 @@
function doSubmit(index, layero){ function doSubmit(index, layero){
var tree = layero.find("iframe")[0].contentWindow.$._tree; var tree = layero.find("iframe")[0].contentWindow.$._tree;
if ($.tree.notAllowParents(tree)) {
var body = layer.getChildFrame('body', index); var body = layer.getChildFrame('body', index);
$("#treeId").val(body.find('#treeId').val()); $("#treeId").val(body.find('#treeId').val());
$("#treeName").val(body.find('#treeName').val()); $("#treeName").val(body.find('#treeName').val());
layer.close(index); layer.close(index);
} }
}
$(function() { $(function() {
$('#post').select2({ $('#post').select2({

View File

@ -215,13 +215,11 @@
function doSubmit(index, layero){ function doSubmit(index, layero){
var tree = layero.find("iframe")[0].contentWindow.$._tree; var tree = layero.find("iframe")[0].contentWindow.$._tree;
if ($.tree.notAllowParents(tree)) {
var body = layer.getChildFrame('body', index); var body = layer.getChildFrame('body', index);
$("#treeId").val(body.find('#treeId').val()); $("#treeId").val(body.find('#treeId').val());
$("#treeName").val(body.find('#treeName').val()); $("#treeName").val(body.find('#treeName').val());
layer.close(index); layer.close(index);
} }
}
$(function() { $(function() {
$('#post').select2({ $('#post').select2({

View File

@ -0,0 +1,138 @@
package com.ruoyi.common.utils;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Cookie工具类
*
* @author ruoyi
*/
public class CookieUtils
{
/**
* 设置 Cookie生成时间为1天
*
* @param name 名称
* @param value
*/
public static void setCookie(HttpServletResponse response, String name, String value)
{
setCookie(response, name, value, 60 * 60 * 24);
}
/**
* 设置 Cookie
*
* @param name 名称
* @param value
* @param maxAge 生存时间单位秒
* @param uri 路径
*/
public static void setCookie(HttpServletResponse response, String name, String value, String path)
{
setCookie(response, name, value, path, 60 * 60 * 24);
}
/**
* 设置 Cookie
*
* @param name 名称
* @param value
* @param maxAge 生存时间单位秒
* @param uri 路径
*/
public static void setCookie(HttpServletResponse response, String name, String value, int maxAge)
{
setCookie(response, name, value, "/", maxAge);
}
/**
* 设置 Cookie
*
* @param name 名称
* @param value
* @param maxAge 生存时间单位秒
* @param uri 路径
*/
public static void setCookie(HttpServletResponse response, String name, String value, String path, int maxAge)
{
Cookie cookie = new Cookie(name, null);
cookie.setPath(path);
cookie.setMaxAge(maxAge);
try
{
cookie.setValue(URLEncoder.encode(value, "utf-8"));
}
catch (UnsupportedEncodingException e)
{
e.printStackTrace();
}
response.addCookie(cookie);
}
/**
* 获得指定Cookie的值
*
* @param name 名称
* @return
*/
public static String getCookie(HttpServletRequest request, String name)
{
return getCookie(request, null, name, false);
}
/**
* 获得指定Cookie的值并删除
*
* @param name 名称
* @return
*/
public static String getCookie(HttpServletRequest request, HttpServletResponse response, String name)
{
return getCookie(request, response, name, true);
}
/**
* 获得指定Cookie的值
*
* @param request 请求对象
* @param response 响应对象
* @param name 名字
* @param isRemove 是否移除
* @return
*/
public static String getCookie(HttpServletRequest request, HttpServletResponse response, String name,
boolean isRemove)
{
String value = null;
Cookie[] cookies = request.getCookies();
if (cookies != null)
{
for (Cookie cookie : cookies)
{
if (cookie.getName().equals(name))
{
try
{
value = URLDecoder.decode(cookie.getValue(), "utf-8");
}
catch (UnsupportedEncodingException e)
{
e.printStackTrace();
}
if (isRemove)
{
cookie.setMaxAge(0);
response.addCookie(cookie);
}
}
}
}
return value;
}
}

View File

@ -16,6 +16,11 @@ import com.ruoyi.common.core.text.Convert;
*/ */
public class ServletUtils public class ServletUtils
{ {
/**
* 定义移动端请求的所有可能类型
*/
private final static String[] agent = { "Android", "iPhone", "iPod", "iPad", "Windows Phone", "MQQBrowser" };
/** /**
* 获取String参数 * 获取String参数
*/ */
@ -132,4 +137,28 @@ public class ServletUtils
} }
return false; return false;
} }
/**
* 判断User-Agent 是不是来自于手机
*/
public static boolean checkAgentIsMobile(String ua)
{
boolean flag = false;
if (!ua.contains("Windows NT") || (ua.contains("Windows NT") && ua.contains("compatible; MSIE 9.0;")))
{
// 排除 苹果桌面系统
if (!ua.contains("Windows NT") && !ua.contains("Macintosh"))
{
for (String item : agent)
{
if (ua.contains(item))
{
flag = true;
break;
}
}
}
}
return flag;
}
} }

View File

@ -249,19 +249,19 @@ public class ExcelUtil<T>
} }
} }
} }
else if ((Integer.TYPE == fieldType) || (Integer.class == fieldType)) else if ((Integer.TYPE == fieldType || Integer.class == fieldType) && StringUtils.isNumeric(Convert.toStr(val)))
{ {
val = Convert.toInt(val); val = Convert.toInt(val);
} }
else if ((Long.TYPE == fieldType) || (Long.class == fieldType)) else if (Long.TYPE == fieldType || Long.class == fieldType)
{ {
val = Convert.toLong(val); val = Convert.toLong(val);
} }
else if ((Double.TYPE == fieldType) || (Double.class == fieldType)) else if (Double.TYPE == fieldType || Double.class == fieldType)
{ {
val = Convert.toDouble(val); val = Convert.toDouble(val);
} }
else if ((Float.TYPE == fieldType) || (Float.class == fieldType)) else if (Float.TYPE == fieldType || Float.class == fieldType)
{ {
val = Convert.toFloat(val); val = Convert.toFloat(val);
} }
@ -509,7 +509,7 @@ public class ExcelUtil<T>
else if (ColumnType.NUMERIC == attr.cellType()) else if (ColumnType.NUMERIC == attr.cellType())
{ {
cell.setCellType(CellType.NUMERIC); cell.setCellType(CellType.NUMERIC);
cell.setCellValue(Integer.parseInt(value + "")); cell.setCellValue(StringUtils.contains(Convert.toStr(value), ".") ? Convert.toDouble(value) : Convert.toInt(value));
} }
} }

View File

@ -71,16 +71,6 @@
<artifactId>oshi-core</artifactId> <artifactId>oshi-core</artifactId>
</dependency> </dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna-platform</artifactId>
</dependency>
<!-- 系统模块--> <!-- 系统模块-->
<dependency> <dependency>
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>

View File

@ -81,7 +81,7 @@ public class AsyncFactory
} }
/** /**
* 记录登信息 * 记录登信息
* *
* @param username 用户名 * @param username 用户名
* @param status 状态 * @param status 状态

View File

@ -73,18 +73,13 @@ public class SysPasswordService
return user.getPassword().equals(encryptPassword(user.getLoginName(), newPassword, user.getSalt())); return user.getPassword().equals(encryptPassword(user.getLoginName(), newPassword, user.getSalt()));
} }
public void clearLoginRecordCache(String username) public void clearLoginRecordCache(String loginName)
{
loginRecordCache.remove(username);
}
public String encryptPassword(String username, String password, String salt)
{
return new Md5Hash(username + password + salt).toHex();
}
public void unlock(String loginName)
{ {
loginRecordCache.remove(loginName); loginRecordCache.remove(loginName);
} }
public String encryptPassword(String loginName, String password, String salt)
{
return new Md5Hash(loginName + password + salt).toHex();
}
} }

View File

@ -190,7 +190,7 @@ public class Server
private void setSysFiles(OperatingSystem os) private void setSysFiles(OperatingSystem os)
{ {
FileSystem fileSystem = os.getFileSystem(); FileSystem fileSystem = os.getFileSystem();
OSFileStore[] fsArray = fileSystem.getFileStores(); List<OSFileStore> fsArray = fileSystem.getFileStores();
for (OSFileStore fs : fsArray) for (OSFileStore fs : fsArray)
{ {
long free = fs.getUsableSpace(); long free = fs.getUsableSpace();

View File

@ -40,7 +40,7 @@
#set($dictType=$column.dictType) #set($dictType=$column.dictType)
#if("" != $treeParentCode && $column.javaField == $treeParentCode) #if("" != $treeParentCode && $column.javaField == $treeParentCode)
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">${comment}</label> <label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group"> <div class="input-group">
#set($BusinessName=$businessName.substring(0,1).toUpperCase() + ${businessName.substring(1)}) #set($BusinessName=$businessName.substring(0,1).toUpperCase() + ${businessName.substring(1)})
@ -78,7 +78,7 @@
</div> </div>
#elseif($column.htmlType == "select" && "" != $dictType) #elseif($column.htmlType == "select" && "" != $dictType)
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">${comment}</label> <label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select name="${field}" class="form-control m-b" th:with="type=${@dict.getType('${dictType}')}"#if($column.required) required#end> <select name="${field}" class="form-control m-b" th:with="type=${@dict.getType('${dictType}')}"#if($column.required) required#end>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
@ -87,7 +87,7 @@
</div> </div>
#elseif($column.htmlType == "select" && $dictType) #elseif($column.htmlType == "select" && $dictType)
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">${comment}</label> <label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select name="${field}" class="form-control m-b"#if($column.required) required#end> <select name="${field}" class="form-control m-b"#if($column.required) required#end>
<option value="">所有</option> <option value="">所有</option>
@ -97,7 +97,7 @@
</div> </div>
#elseif($column.htmlType == "checkbox" && "" != $dictType) #elseif($column.htmlType == "checkbox" && "" != $dictType)
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">${comment}</label> <label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}</label>
<div class="col-sm-8" th:with="type=${@dict.getType('${dictType}')}"> <div class="col-sm-8" th:with="type=${@dict.getType('${dictType}')}">
<label th:each="dict : ${type}" class="check-box"> <label th:each="dict : ${type}" class="check-box">
<input name="${field}" type="checkbox" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"#if($column.required) required#end> <input name="${field}" type="checkbox" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"#if($column.required) required#end>
@ -106,7 +106,7 @@
</div> </div>
#elseif($column.htmlType == "checkbox" && $dictType) #elseif($column.htmlType == "checkbox" && $dictType)
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">${comment}</label> <label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}</label>
<div class="col-sm-8"> <div class="col-sm-8">
<label class="check-box"> <label class="check-box">
<input name="${field}" type="checkbox"#if($column.required) required#end> 无 <input name="${field}" type="checkbox"#if($column.required) required#end> 无
@ -116,7 +116,7 @@
</div> </div>
#elseif($column.htmlType == "radio" && "" != $dictType) #elseif($column.htmlType == "radio" && "" != $dictType)
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">${comment}</label> <label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('${dictType}')}"> <div class="radio-box" th:each="dict : ${@dict.getType('${dictType}')}">
<input type="radio" th:id="${'${field}_' + dict.dictCode}" name="${field}" th:value="${dict.dictValue}" th:checked="${dict.default}"#if($column.required) required#end> <input type="radio" th:id="${'${field}_' + dict.dictCode}" name="${field}" th:value="${dict.dictValue}" th:checked="${dict.default}"#if($column.required) required#end>
@ -126,7 +126,7 @@
</div> </div>
#elseif($column.htmlType == "radio" && $dictType) #elseif($column.htmlType == "radio" && $dictType)
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">${comment}</label> <label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="radio-box"> <div class="radio-box">
<input type="radio" name="${field}" value=""#if($column.required) required#end> <input type="radio" name="${field}" value=""#if($column.required) required#end>
@ -137,7 +137,7 @@
</div> </div>
#elseif($column.htmlType == "datetime") #elseif($column.htmlType == "datetime")
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">${comment}</label> <label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group date"> <div class="input-group date">
<input name="${field}" class="form-control" placeholder="yyyy-MM-dd" type="text"#if($column.required) required#end> <input name="${field}" class="form-control" placeholder="yyyy-MM-dd" type="text"#if($column.required) required#end>
@ -147,7 +147,7 @@
</div> </div>
#elseif($column.htmlType == "textarea") #elseif($column.htmlType == "textarea")
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">${comment}</label> <label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}</label>
<div class="col-sm-8"> <div class="col-sm-8">
<textarea name="${field}" class="form-control"#if($column.required) required#end></textarea> <textarea name="${field}" class="form-control"#if($column.required) required#end></textarea>
</div> </div>

View File

@ -41,7 +41,7 @@
#set($dictType=$column.dictType) #set($dictType=$column.dictType)
#if("" != $treeParentCode && $column.javaField == $treeParentCode) #if("" != $treeParentCode && $column.javaField == $treeParentCode)
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">${comment}</label> <label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group"> <div class="input-group">
#set($BusinessName=$businessName.substring(0,1).toUpperCase() + ${businessName.substring(1)}) #set($BusinessName=$businessName.substring(0,1).toUpperCase() + ${businessName.substring(1)})
@ -78,7 +78,7 @@
</div> </div>
#elseif($column.htmlType == "select" && "" != $dictType) #elseif($column.htmlType == "select" && "" != $dictType)
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">${comment}</label> <label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select name="${field}" class="form-control m-b" th:with="type=${@dict.getType('${dictType}')}"#if($column.required) required#end> <select name="${field}" class="form-control m-b" th:with="type=${@dict.getType('${dictType}')}"#if($column.required) required#end>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{${field}}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{${field}}"></option>
@ -87,7 +87,7 @@
</div> </div>
#elseif($column.htmlType == "select" && $dictType) #elseif($column.htmlType == "select" && $dictType)
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">${comment}</label> <label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select name="${field}" class="form-control m-b"#if($column.required) required#end> <select name="${field}" class="form-control m-b"#if($column.required) required#end>
<option value="">所有</option> <option value="">所有</option>
@ -97,7 +97,7 @@
</div> </div>
#elseif($column.htmlType == "checkbox" && "" != $dictType) #elseif($column.htmlType == "checkbox" && "" != $dictType)
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">${comment}</label> <label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}</label>
<div class="col-sm-8" th:with="type=${@dict.getType('${dictType}')}"> <div class="col-sm-8" th:with="type=${@dict.getType('${dictType}')}">
<label th:each="dict : ${type}" class="check-box"> <label th:each="dict : ${type}" class="check-box">
<input name="${field}" type="checkbox" th:value="${dict.dictValue}" th:text="${dict.dictLabel}" th:attr="checked=${${className}.${field}.contains(dict.dictValue)?true:false}"#if($column.required) required#end> <input name="${field}" type="checkbox" th:value="${dict.dictValue}" th:text="${dict.dictLabel}" th:attr="checked=${${className}.${field}.contains(dict.dictValue)?true:false}"#if($column.required) required#end>
@ -106,7 +106,7 @@
</div> </div>
#elseif($column.htmlType == "checkbox" && $dictType) #elseif($column.htmlType == "checkbox" && $dictType)
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">${comment}</label> <label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}</label>
<div class="col-sm-8"> <div class="col-sm-8">
<label class="check-box"> <label class="check-box">
<input name="${field}" type="checkbox"#if($column.required) required#end> 无 <input name="${field}" type="checkbox"#if($column.required) required#end> 无
@ -116,7 +116,7 @@
</div> </div>
#elseif($column.htmlType == "radio" && "" != $dictType) #elseif($column.htmlType == "radio" && "" != $dictType)
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">${comment}</label> <label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('${dictType}')}"> <div class="radio-box" th:each="dict : ${@dict.getType('${dictType}')}">
<input type="radio" th:id="${'${field}_' + dict.dictCode}" name="${field}" th:value="${dict.dictValue}" th:field="*{${field}}"#if($column.required) required#end> <input type="radio" th:id="${'${field}_' + dict.dictCode}" name="${field}" th:value="${dict.dictValue}" th:field="*{${field}}"#if($column.required) required#end>
@ -126,7 +126,7 @@
</div> </div>
#elseif($column.htmlType == "radio" && $dictType) #elseif($column.htmlType == "radio" && $dictType)
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">${comment}</label> <label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="radio-box"> <div class="radio-box">
<input type="radio" name="${field}" value=""#if($column.required) required#end> <input type="radio" name="${field}" value=""#if($column.required) required#end>
@ -137,7 +137,7 @@
</div> </div>
#elseif($column.htmlType == "datetime") #elseif($column.htmlType == "datetime")
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">${comment}</label> <label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group date"> <div class="input-group date">
<input name="${field}" th:value="${#dates.format(${className}.${field}, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"#if($column.required) required#end> <input name="${field}" th:value="${#dates.format(${className}.${field}, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"#if($column.required) required#end>
@ -147,7 +147,7 @@
</div> </div>
#elseif($column.htmlType == "textarea") #elseif($column.htmlType == "textarea")
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">${comment}</label> <label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}</label>
<div class="col-sm-8"> <div class="col-sm-8">
<textarea name="${field}" class="form-control"#if($column.required) required#end>[[*{${field}}]]</textarea> <textarea name="${field}" class="form-control"#if($column.required) required#end>[[*{${field}}]]</textarea>
</div> </div>

View File

@ -73,12 +73,12 @@ public class SysUser extends BaseEntity
/** 删除标志0代表存在 2代表删除 */ /** 删除标志0代表存在 2代表删除 */
private String delFlag; private String delFlag;
/** 最后登IP */ /** 最后登IP */
@Excel(name = "最后登IP", type = Type.EXPORT) @Excel(name = "最后登IP", type = Type.EXPORT)
private String loginIp; private String loginIp;
/** 最后登时间 */ /** 最后登时间 */
@Excel(name = "最后登时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT) @Excel(name = "最后登时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT)
private Date loginDate; private Date loginDate;
/** 部门对象 */ /** 部门对象 */

View File

@ -7,6 +7,7 @@ import org.springframework.stereotype.Service;
import com.ruoyi.common.constant.Constants; import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.exception.BusinessException;
import com.ruoyi.common.utils.CacheUtils; import com.ruoyi.common.utils.CacheUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.SysConfig; import com.ruoyi.system.domain.SysConfig;
@ -131,6 +132,15 @@ public class SysConfigServiceImpl implements ISysConfigService
@Override @Override
public int deleteConfigByIds(String ids) public int deleteConfigByIds(String ids)
{ {
Long[] configIds = Convert.toLongArray(ids);
for (Long configId : configIds)
{
SysConfig config = selectConfigById(configId);
if (StringUtils.equals(UserConstants.YES, config.getConfigType()))
{
throw new BusinessException(String.format("内置参数【%1$s】不能删除 ", config.getConfigKey()));
}
}
int count = configMapper.deleteConfigByIds(Convert.toStrArray(ids)); int count = configMapper.deleteConfigByIds(Convert.toStrArray(ids));
if (count > 0) if (count > 0)
{ {

View File

@ -79,12 +79,12 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
public List<SysDictData> selectDictDataByType(String dictType) public List<SysDictData> selectDictDataByType(String dictType)
{ {
List<SysDictData> dictDatas = DictUtils.getDictCache(dictType); List<SysDictData> dictDatas = DictUtils.getDictCache(dictType);
if (StringUtils.isNotNull(dictDatas)) if (StringUtils.isNotEmpty(dictDatas))
{ {
return dictDatas; return dictDatas;
} }
dictDatas = dictDataMapper.selectDictDataByType(dictType); dictDatas = dictDataMapper.selectDictDataByType(dictType);
if (StringUtils.isNotNull(dictDatas)) if (StringUtils.isNotEmpty(dictDatas))
{ {
DictUtils.setDictCache(dictType, dictDatas); DictUtils.setDictCache(dictType, dictDatas);
return dictDatas; return dictDatas;

View File

@ -53,8 +53,8 @@ create table sys_user (
salt varchar(20) default '' comment '盐加密', salt varchar(20) default '' comment '盐加密',
status char(1) default '0' comment '帐号状态0正常 1停用', status char(1) default '0' comment '帐号状态0正常 1停用',
del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除', del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除',
login_ip varchar(50) default '' comment '最后登IP', login_ip varchar(50) default '' comment '最后登IP',
login_date datetime comment '最后登时间', login_date datetime comment '最后登时间',
create_by varchar(64) default '' comment '创建者', create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间', create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者', update_by varchar(64) default '' comment '更新者',
@ -157,25 +157,25 @@ insert into sys_menu values('2', '系统监控', '0', '2', '#', '
insert into sys_menu values('3', '系统工具', '0', '3', '#', '', 'M', '0', '', 'fa fa-bars', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统工具目录'); insert into sys_menu values('3', '系统工具', '0', '3', '#', '', 'M', '0', '', 'fa fa-bars', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统工具目录');
insert into sys_menu values('4', '若依官网', '0', '4', 'http://ruoyi.vip', 'menuBlank', 'C', '0', '', 'fa fa-location-arrow', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '若依官网地址'); insert into sys_menu values('4', '若依官网', '0', '4', 'http://ruoyi.vip', 'menuBlank', 'C', '0', '', 'fa fa-location-arrow', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '若依官网地址');
-- 二级菜单 -- 二级菜单
insert into sys_menu values('100', '用户管理', '1', '1', '/system/user', '', 'C', '0', 'system:user:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '用户管理菜单'); insert into sys_menu values('100', '用户管理', '1', '1', '/system/user', '', 'C', '0', 'system:user:view', 'fa fa-user-o', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '用户管理菜单');
insert into sys_menu values('101', '角色管理', '1', '2', '/system/role', '', 'C', '0', 'system:role:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '角色管理菜单'); insert into sys_menu values('101', '角色管理', '1', '2', '/system/role', '', 'C', '0', 'system:role:view', 'fa fa-user-secret', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '角色管理菜单');
insert into sys_menu values('102', '菜单管理', '1', '3', '/system/menu', '', 'C', '0', 'system:menu:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '菜单管理菜单'); insert into sys_menu values('102', '菜单管理', '1', '3', '/system/menu', '', 'C', '0', 'system:menu:view', 'fa fa-th-list', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '菜单管理菜单');
insert into sys_menu values('103', '部门管理', '1', '4', '/system/dept', '', 'C', '0', 'system:dept:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '部门管理菜单'); insert into sys_menu values('103', '部门管理', '1', '4', '/system/dept', '', 'C', '0', 'system:dept:view', 'fa fa-outdent', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '部门管理菜单');
insert into sys_menu values('104', '岗位管理', '1', '5', '/system/post', '', 'C', '0', 'system:post:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '岗位管理菜单'); insert into sys_menu values('104', '岗位管理', '1', '5', '/system/post', '', 'C', '0', 'system:post:view', 'fa fa-address-card-o', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '岗位管理菜单');
insert into sys_menu values('105', '字典管理', '1', '6', '/system/dict', '', 'C', '0', 'system:dict:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '字典管理菜单'); insert into sys_menu values('105', '字典管理', '1', '6', '/system/dict', '', 'C', '0', 'system:dict:view', 'fa fa-bookmark-o', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '字典管理菜单');
insert into sys_menu values('106', '参数设置', '1', '7', '/system/config', '', 'C', '0', 'system:config:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '参数设置菜单'); insert into sys_menu values('106', '参数设置', '1', '7', '/system/config', '', 'C', '0', 'system:config:view', 'fa fa-sun-o', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '参数设置菜单');
insert into sys_menu values('107', '通知公告', '1', '8', '/system/notice', '', 'C', '0', 'system:notice:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '通知公告菜单'); insert into sys_menu values('107', '通知公告', '1', '8', '/system/notice', '', 'C', '0', 'system:notice:view', 'fa fa-bullhorn', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '通知公告菜单');
insert into sys_menu values('108', '日志管理', '1', '9', '#', '', 'M', '0', '', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '日志管理菜单'); insert into sys_menu values('108', '日志管理', '1', '9', '#', '', 'M', '0', '', 'fa fa-pencil-square-o', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '日志管理菜单');
insert into sys_menu values('109', '在线用户', '2', '1', '/monitor/online', '', 'C', '0', 'monitor:online:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '在线用户菜单'); insert into sys_menu values('109', '在线用户', '2', '1', '/monitor/online', '', 'C', '0', 'monitor:online:view', 'fa fa-user-circle', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '在线用户菜单');
insert into sys_menu values('110', '定时任务', '2', '2', '/monitor/job', '', 'C', '0', 'monitor:job:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '定时任务菜单'); insert into sys_menu values('110', '定时任务', '2', '2', '/monitor/job', '', 'C', '0', 'monitor:job:view', 'fa fa-tasks', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '定时任务菜单');
insert into sys_menu values('111', '数据监控', '2', '3', '/monitor/data', '', 'C', '0', 'monitor:data:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '数据监控菜单'); insert into sys_menu values('111', '数据监控', '2', '3', '/monitor/data', '', 'C', '0', 'monitor:data:view', 'fa fa-bug', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '数据监控菜单');
insert into sys_menu values('112', '服务监控', '2', '3', '/monitor/server', '', 'C', '0', 'monitor:server:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '服务监控菜单'); insert into sys_menu values('112', '服务监控', '2', '3', '/monitor/server', '', 'C', '0', 'monitor:server:view', 'fa fa-server', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '服务监控菜单');
insert into sys_menu values('113', '表单构建', '3', '1', '/tool/build', '', 'C', '0', 'tool:build:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '表单构建菜单'); insert into sys_menu values('113', '表单构建', '3', '1', '/tool/build', '', 'C', '0', 'tool:build:view', 'fa fa-wpforms', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '表单构建菜单');
insert into sys_menu values('114', '代码生成', '3', '2', '/tool/gen', '', 'C', '0', 'tool:gen:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '代码生成菜单'); insert into sys_menu values('114', '代码生成', '3', '2', '/tool/gen', '', 'C', '0', 'tool:gen:view', 'fa fa-code', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '代码生成菜单');
insert into sys_menu values('115', '系统接口', '3', '3', '/tool/swagger', '', 'C', '0', 'tool:swagger:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统接口菜单'); insert into sys_menu values('115', '系统接口', '3', '3', '/tool/swagger', '', 'C', '0', 'tool:swagger:view', 'fa fa-gg', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统接口菜单');
-- 三级菜单 -- 三级菜单
insert into sys_menu values('500', '操作日志', '108', '1', '/monitor/operlog', '', 'C', '0', 'monitor:operlog:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '操作日志菜单'); insert into sys_menu values('500', '操作日志', '108', '1', '/monitor/operlog', '', 'C', '0', 'monitor:operlog:view', 'fa fa-address-book', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '操作日志菜单');
insert into sys_menu values('501', '登录日志', '108', '2', '/monitor/logininfor', '', 'C', '0', 'monitor:logininfor:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '登录日志菜单'); insert into sys_menu values('501', '登录日志', '108', '2', '/monitor/logininfor', '', 'C', '0', 'monitor:logininfor:view', 'fa fa-file-image-o', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '登录日志菜单');
-- 用户管理按钮 -- 用户管理按钮
insert into sys_menu values('1000', '用户查询', '100', '1', '#', '', 'F', '0', 'system:user:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); insert into sys_menu values('1000', '用户查询', '100', '1', '#', '', 'F', '0', 'system:user:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
insert into sys_menu values('1001', '用户新增', '100', '2', '#', '', 'F', '0', 'system:user:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); insert into sys_menu values('1001', '用户新增', '100', '2', '#', '', 'F', '0', 'system:user:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
@ -534,8 +534,10 @@ create table sys_config (
insert into sys_config values(1, '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow'); insert into sys_config values(1, '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow');
insert into sys_config values(2, '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '初始化密码 123456'); insert into sys_config values(2, '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '初始化密码 123456');
insert into sys_config values(3, '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '深黑主题theme-dark浅色主题theme-light深蓝主题theme-blue'); insert into sys_config values(3, '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '深黑主题theme-dark浅色主题theme-light深蓝主题theme-blue');
insert into sys_config values(4, '账号自助-是否开启用户注册功能', 'sys.account.registerUser', 'false', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '是否开启注册用户功能'); insert into sys_config values(4, '账号自助-是否开启用户注册功能', 'sys.account.registerUser', 'false', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '是否开启注册用户功能true开启false关闭');
insert into sys_config values(5, '用户管理-密码字符范围', 'sys.account.chrtype', '0', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '默认任意字符范围0任意密码可以输入任意字符1数字密码只能为0-9数字2英文字母密码只能为a-z和A-Z字母3字母和数字密码必须包含字母数字,4字母数组和特殊字符密码必须包含字母数字特殊字符-_'); insert into sys_config values(5, '用户管理-密码字符范围', 'sys.account.chrtype', '0', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '默认任意字符范围0任意密码可以输入任意字符1数字密码只能为0-9数字2英文字母密码只能为a-z和A-Z字母3字母和数字密码必须包含字母数字,4字母数组和特殊字符密码必须包含字母数字特殊字符-_');
insert into sys_config values(6, '主框架页-菜单导航显示风格', 'sys.index.menuStyle', 'default', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '菜单导航显示风格default为左侧导航菜单topnav为顶部导航菜单');
insert into sys_config values(7, '主框架页-是否开启页脚', 'sys.index.ignoreFooter', 'true', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '是否开启底部页脚显示true显示false隐藏');
-- ---------------------------- -- ----------------------------