96 Commits
Author SHA1 Message Date
RuoYi 23bbd23032 若依 4.1 2019-10-22 10:18:36 +08:00
RuoYi 68f65cf77b 若依 4.1 2019-10-22 09:55:16 +08:00
RuoYi 9b93a151fb 支持多表格实例操作 2019-10-21 12:14:52 +08:00
RuoYi 3e18ca6613 支持多表格实例操作 2019-10-21 11:37:50 +08:00
RuoYi a3e946b57e 浮动提示方法tooltip支持弹窗 2019-10-18 17:59:54 +08:00
RuoYi 0ebd155be4 浮动提示方法tooltip支持弹窗 2019-10-18 17:20:57 +08:00
RuoYi 660fc42750 汉化select2插件 2019-10-18 15:02:04 +08:00
RuoYi 46b08d9474 字典数据支持模糊条件查询 2019-10-18 11:23:10 +08:00
RuoYi 9ac3ca79f8 代码生成支持模糊条件查询 2019-10-18 09:36:27 +08:00
RuoYi 7eade0d43c 添加页签全屏方法 2019-10-17 19:39:56 +08:00
RuoYi cf2ae2bccb 增加清除表单验证错误信息方法 2019-10-17 18:39:57 +08:00
RuoYi f9a2f9e0f4 支持iframe局部刷新页面 2019-10-17 10:45:19 +08:00
RuoYi 01f40d91ec 支持在线切换主题 2019-10-16 13:43:19 +08:00
RuoYi dd57a4fb1a 设置mybatis全局的配置文件 2019-10-15 15:39:15 +08:00
RuoYi 69cc7a4111 代码生成实体根据模板区分不同父字段 2019-10-15 12:45:55 +08:00
RuoYi 9f5067fbad 用户唯一校验参数属性名修正 2019-10-15 10:57:49 +08:00
若依andGitee c3a6f4af6a !140 添加用户时,用户名、手机号、邮箱唯一校验参数修正
Merge pull request !140 from BoazJun/master
2019-10-15 10:56:28 +08:00
dlnu_wqj ac9666db76 添加用户时,用户名、手机号、邮箱唯一校验参数修正 2019-10-14 15:51:14 +08:00
若依andGitee 2d064a9723 !138 修改注释中错误的方法形参名
Merge pull request !138 from lywjlong/master
2019-10-09 12:57:14 +08:00
wangjianlong 01de32cc58 修改注释 2019-10-09 12:42:22 +08:00
若依andGitee 39fdb02022 !137 fix: 预览图片设置的高宽参数颠倒
Merge pull request !137 from Dulk/fix_bug
2019-10-09 11:52:48 +08:00
deng-cc e0f091819b fix: 预览设置的高宽参数颠倒 2019-10-09 11:45:33 +08:00
RuoYi b2cbc3b28c 新增账户解锁操作 2019-10-08 16:17:23 +08:00
cain 3d10d26110 Merge remote-tracking branch 'origin/master' 2019-10-08 15:36:09 +08:00
cain f4ab77f80a 账户锁定新增解锁功能 2019-10-08 15:35:36 +08:00
RuoYi 9532ad5fcd 删除多余注解 2019-10-08 11:53:47 +08:00
cain d1c5ec58df Merge remote-tracking branch 'origin/master' 2019-10-08 09:12:16 +08:00
RuoYi 509032ff8b 修改项目扩展链接 2019-10-05 21:34:33 +08:00
RuoYi 1447fc413b 组件文档地址修改 2019-10-04 17:45:44 +08:00
RuoYi 661b6fe5d5 管理员用户&角色不允许操作 2019-10-03 09:45:41 +08:00
若依andGitee ac97d15a7f !136 optgroup标签下多选后表单值转json丢失
Merge pull request !136 from Dulk/fix-optgroup_value_jsonOverride_bug
2019-09-30 12:56:03 +08:00
若依andGitee 83ed5fc243 !135 mybatis别名类扫描通配符,无法支持多路径情况
Merge pull request !135 from Dulk/fix-mybatis_aliasScan_bug
2019-09-30 12:54:40 +08:00
RuoYi 39b063ff6a 去掉jsoup调用自定义转义工具 2019-09-30 12:43:56 +08:00
deng-cc 1166be1ea0 fix:修复optgroup标签多选后值转json后丢失的问题 2019-09-30 11:47:46 +08:00
deng-cc 4a44e097a2 fix:修复mybatis别名类扫描无法配置多目录的情况 2019-09-30 11:16:18 +08:00
RuoYi 2d07fcb4b4 选中/取消事件顺序调整 2019-09-30 11:07:11 +08:00
RuoYi 81ec67d4ea 分页记住选择指定列值数据问题修正 2019-09-29 15:53:10 +08:00
cain 3d9f48c365 Merge remote-tracking branch 'origin/master' 2019-09-28 14:37:42 +08:00
RuoYi f600cdf527 添加时间轴示例 2019-09-27 16:27:02 +08:00
cain d66b5811f7 Revert "解决翻页记住选择时获取指定列值的问题"
This reverts commit af6a313
2019-09-26 12:00:45 +08:00
cain af6a313d06 解决翻页记住选择时获取指定列值的问题 2019-09-26 11:49:31 +08:00
RuoYi cf211fa19c 默认配置表格支持移动端适配 2019-09-25 21:56:33 +08:00
RuoYi e1d2d72282 Merge branch 'master' of https://gitee.com/y_project/RuoYi 2019-09-25 19:48:40 +08:00
RuoYi ee8fb0e87b 添加表格父子视图示例 2019-09-25 19:48:29 +08:00
cain a6367e9453 Merge remote-tracking branch 'origin/master' 2019-09-25 19:07:12 +08:00
cain 65640603d1 代码生成sql脚本添加导出按钮 2019-09-25 19:06:50 +08:00
RuoYi 925d2b13d8 表格行内编辑示例添加校验及下拉选项 2019-09-25 18:54:22 +08:00
RuoYi c2e425aa12 添加表格行内编辑示例 2019-09-24 16:18:28 +08:00
RuoYi 538e7dcc29 调整查询条件文本宽度默认为65px 2019-09-23 17:11:22 +08:00
若依andGitee ad8e475bb7 !131 模板少了覆盖标签
Merge pull request !131 from wind/ruoyi
2019-09-23 16:52:44 +08:00
wind f5071e0c4d 模板少了覆盖标签 2019-09-23 16:51:21 +08:00
RuoYi c24758f451 指定 VFS 的实现 2019-09-23 16:14:54 +08:00
RuoYi f83a8ff4c0 升级fastjson到最新版1.2.60 阻止漏洞攻击 2019-09-20 21:10:00 +08:00
RuoYi e6bacada22 升级echarts到最新版4.2.1 2019-09-20 20:39:17 +08:00
RuoYi 16270ae869 操作日志新增返回参数 2019-09-20 19:07:22 +08:00
RuoYi 64f0e9d282 初始多表格demo修改 2019-09-20 18:22:34 +08:00
RuoYi d5d2ae1da8 支持通配符扫描任意多个包(无需配置多个包路径),以及防止出现类名重复异常 2019-09-17 20:13:04 +08:00
RuoYi 6dfc2a0a3d 表单构建日期选择元素调整 2019-09-14 09:05:05 +08:00
RuoYi 0f7952b9d5 添加isUser,便于校验用户是否已登录 2019-09-12 19:35:41 +08:00
RuoYi fcc889ca07 Shiro权限支持多种情况验证 2019-09-12 19:19:54 +08:00
RuoYi 362374d0b7 代码生成表前缀配置支持多个 2019-09-11 19:06:57 +08:00
若依andGitee c6c71a7e70 !128 修复代码生成Add、Edit页面多日期选择器只有第一个生效的bug
Merge pull request !128 from SnowFox/master
2019-09-11 18:57:55 +08:00
若依andGitee e1a38a3bd5 !127 自动生成代码 Tree型 add/edit 页面生成不正确
Merge pull request !127 from Dulk/fix-genTree
2019-09-11 18:40:47 +08:00
jingjie520 f169eaf6cc 修复代码生成Add、Edit页面多日期选择器只有第一个生效的bug 2019-09-06 15:10:26 +08:00
deng-cc c920d3ec5b fix:修复树形类型的代码生成的部分必要属性无法显示 2019-09-05 17:01:18 +08:00
deng-cc ac5f45d11a fix:修订代码自动生成中Tree型的Domain属性重复
GenTableColumn.java
public static boolean isSuperColumn(String javaField)
基类有两种,BaseEntity 和 TreeEntity,其中父类忽略的属性中只包含了 BaseEntity 的属性,而没有包含 TreeEntity 中的属性
如此生成的Tree型Domain中,父类已有属性会重复生成
另,为 TreeEntity 添加了 祖级列表属性 ancestors
2019-09-04 16:49:08 +08:00
RuoYi e4984b85f2 修复非表格插件情况下重置出现异常 2019-09-02 12:05:44 +08:00
RuoYi 1bd8dd00d1 修复富文本编辑器有序列表冲突 2019-09-02 11:45:38 +08:00
RuoYi 29ac3e21b2 上传完成回显完成高度调整 2019-09-01 21:49:17 +08:00
若依andGitee 7acd197389 !125 演示上传完成回显完成字样只显示一半
Merge pull request !125 from wind/ruoyi
2019-09-01 21:45:10 +08:00
wind 025d28d80d 演示上传完成回显 2019-08-30 17:49:55 +08:00
若依andGitee 7d26bfb247 !124 修改自动去除表前缀属性autoRemovePre注释
Merge pull request !124 from RACSU/master
2019-08-30 14:01:28 +08:00
racsu 2c0042c3df 修改自动去除表前缀属性autoRemovePre注释 2019-08-30 10:32:28 +08:00
若依andGitee 5a7fcde102 !123 头像裁剪超出预览框,修改高度为450
Merge pull request !123 from wind/ruoyi
2019-08-29 09:40:35 +08:00
wind 5be2aaae15 头像裁剪超出预览框,修改高度为450 2019-08-28 22:52:32 +08:00
RuoYi 1b302b9bde 修复自动去除表前缀配置无效问题 2019-08-28 17:54:05 +08:00
RuoYi 5c7f6b7c7d 按钮可见不显示(权限标识控制) 2019-08-27 09:45:29 +08:00
RuoYi a1d9354de7 修复expireTime会话超时时间无效问题 2019-08-25 22:16:58 +08:00
RuoYi 2a6761d47e Merge branch 'master' of https://gitee.com/y_project/RuoYi 2019-08-23 14:06:52 +08:00
gcii 18786fc669 删除多余提交的代码 2019-08-23 14:05:19 +08:00
gcii 67e6aa0067 修复添加用户页面使用搜索功能后不选择部门会默认选择根目录的bug 2019-08-23 11:55:05 +08:00
RuoYi 12e68fab27 新增本地资源通用下载方法 2019-08-23 10:36:03 +08:00
RuoYi 478520572c 操作日志记录新增请求方式 2019-08-22 21:54:35 +08:00
若依andGitee e7050f5a38 !119 代码生成单选按钮组bug修复
Merge pull request !119 from SnowFox/master
2019-08-22 21:45:14 +08:00
若依andGitee 79197b1977 !120 修复表格树bug
Merge pull request !120 from Lunaticf/master
2019-08-22 21:37:32 +08:00
center-liu bf68719e2e 修复表格树bug 2019-08-22 16:03:33 +08:00
jingjie520 9b45b78ba7 修复多组同类数据字典生成的单选按钮点击Label选择项的错误 2019-08-22 10:57:25 +08:00
RuoYi ca48d313a2 修改select2的下拉框的宽度不会随着浏览器的拖拉而改变 2019-08-18 11:01:21 +08:00
RuoYi d9fabe556c 生成模板默认值修改 2019-08-10 18:20:56 +08:00
RuoYi 12ef6d07cf 去掉多余字段 2019-08-10 11:09:41 +08:00
RuoYi bed647427b 修复代码生成树表异常 2019-08-10 11:00:14 +08:00
RuoYi d408e2bf54 主键标识换成大写,防止识别出现问题 2019-08-08 16:42:38 +08:00
RuoYi b5cef34426 未设置主键列默认首个字段为主键信息 2019-08-08 16:24:09 +08:00
若依andGitee 129cea08ce !116 代码生成文件名带空格
Merge pull request !116 from BreakLo0p/master
2019-08-08 14:14:48 +08:00
Rex cd10f48f53 代码生成文件名带空格问题 2019-08-08 13:47:19 +08:00
gcii a2c1bfef8f 修复代码生成模块查询条件忘记加where 2019-08-08 10:52:01 +08:00
140 changed files with 4135 additions and 2046 deletions
+3 -3
View File
@@ -6,7 +6,7 @@
若依参考后台模板。有需要可自行到群内下载。
> 如需单应用,请移步 [RuoYi-fast](https://gitee.com/y_project/RuoYi-fast) `(保持同步更新)`,如需其他版本,请移步 [项目扩展](http://doc.ruoyi.vip/#/standard/xmkz) `(不定时更新)`
> 如需单应用,请移步 [RuoYi-fast](https://gitee.com/y_project/RuoYi-fast) `(保持同步更新)`,如需其他版本,请移步 [项目扩展](http://doc.ruoyi.vip/ruoyi/document/xmkz.html) `(不定时更新)`
> 阿里云通用云产品1888优惠券 [点我领取](https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=brki8iof)    腾讯云通用云产品2860优惠券 [点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)  `(仅限新用户)`
@@ -26,7 +26,7 @@
10. 登录日志:系统登录日志记录查询包含登录异常。
11. 在线用户:当前系统中活跃用户状态监控。
12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。
13. 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。
13. 代码生成:前后端代码的生成(java、html、xml、sql支持CRUD下载 。
14. 系统接口:根据业务代码自动生成相关的api接口文档。
15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。
16. 在线构建器:拖动表单元素生成相应的HTML代码。
@@ -87,4 +87,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群: [![加入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) 点击按钮入群。
+4 -12
View File
@@ -6,18 +6,18 @@
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi</artifactId>
<version>4.0.0</version>
<version>4.1.0</version>
<name>ruoyi</name>
<url>http://www.ruoyi.vip</url>
<description>若依管理系统</description>
<properties>
<ruoyi.version>4.0.0</ruoyi.version>
<ruoyi.version>4.1.0</ruoyi.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<shiro.version>1.4.0</shiro.version>
<shiro.version>1.4.1</shiro.version>
<thymeleaf.extras.shiro.version>2.0.0</thymeleaf.extras.shiro.version>
<mybatis.boot.version>1.3.2</mybatis.boot.version>
<druid.version>1.1.14</druid.version>
@@ -25,11 +25,10 @@
<kaptcha.version>2.3.2</kaptcha.version>
<swagger.version>2.9.2</swagger.version>
<pagehelper.boot.version>1.2.5</pagehelper.boot.version>
<fastjson.version>1.2.47</fastjson.version>
<fastjson.version>1.2.60</fastjson.version>
<oshi.version>3.9.1</oshi.version>
<commons.io.version>2.5</commons.io.version>
<commons.fileupload.version>1.3.3</commons.fileupload.version>
<jsoup.version>1.11.3</jsoup.version>
<poi.version>3.17</poi.version>
<velocity.version>1.7</velocity.version>
</properties>
@@ -148,13 +147,6 @@
<version>${commons.fileupload.version}</version>
</dependency>
<!-- HTML解析器 -->
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>${jsoup.version}</version>
</dependency>
<!-- excel工具 -->
<dependency>
<groupId>org.apache.poi</groupId>
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>ruoyi</artifactId>
<groupId>com.ruoyi</groupId>
<version>4.0.0</version>
<version>4.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.config.Global;
import com.ruoyi.common.config.ServerConfig;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.file.FileUploadUtils;
@@ -88,4 +89,24 @@ public class CommonController
return AjaxResult.error(e.getMessage());
}
}
/**
* 本地资源通用下载
*/
@GetMapping("/common/download/resource")
public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
throws Exception
{
// 本地资源路径
String localPath = Global.getProfile();
// 数据库资源地址
String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX);
// 下载名称
String downloadName = StringUtils.substringAfterLast(downloadPath, "/");
response.setCharacterEncoding("utf-8");
response.setContentType("multipart/form-data");
response.setHeader("Content-Disposition",
"attachment;fileName=" + FileUtils.setFileDownloadHeader(request, downloadName));
FileUtils.writeBytes(downloadPath, response.getOutputStream());
}
}
@@ -46,6 +46,15 @@ public class DemoFormController
return prefix + "/select";
}
/**
* 时间轴
*/
@GetMapping("/timeline")
public String timeline()
{
return prefix + "/timeline";
}
/**
* 表单校验
*/
@@ -103,6 +103,17 @@ public class DemoOperateController extends BaseController
}
}
}
else if (StringUtils.isNotEmpty(userModel.getUserName()))
{
userList.clear();
for (Map.Entry<Integer, UserOperateModel> entry : users.entrySet())
{
if (entry.getValue().getUserName().equals(userModel.getUserName()))
{
userList.add(entry.getValue());
}
}
}
PageDomain pageDomain = TableSupport.buildPageRequest();
if (null == pageDomain.getPageNum() || null == pageDomain.getPageSize())
{
@@ -166,6 +166,15 @@ public class DemoTableController extends BaseController
{
return prefix + "/detail";
}
/**
* 表格父子视图
*/
@GetMapping("/child")
public String child()
{
return prefix + "/child";
}
/**
* 表格图片预览
@@ -194,6 +203,15 @@ public class DemoTableController extends BaseController
return prefix + "/reorder";
}
/**
* 表格行内编辑操作
*/
@GetMapping("/editable")
public String editable()
{
return prefix + "/editable";
}
/**
* 表格其他操作
*/
@@ -1,6 +1,7 @@
package com.ruoyi.web.controller.monitor;
import java.util.List;
import com.ruoyi.framework.shiro.service.SysPasswordService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@@ -31,6 +32,9 @@ public class SysLogininforController extends BaseController
@Autowired
private ISysLogininforService logininforService;
@Autowired
private SysPasswordService passwordService;
@RequiresPermissions("monitor:logininfor:view")
@GetMapping()
public String logininfor()
@@ -77,4 +81,14 @@ public class SysLogininforController extends BaseController
logininforService.cleanLogininfor();
return success();
}
@RequiresPermissions("monitor:logininfor:unlock")
@Log(title = "账户解锁", businessType = BusinessType.OTHER)
@PostMapping("/unlock")
@ResponseBody
public AjaxResult unlock(String loginName)
{
passwordService.unlock(loginName);
return success();
}
}
@@ -38,6 +38,13 @@ public class SysIndexController extends BaseController
return "index";
}
// 切换主题
@GetMapping("/system/switchSkin")
public String switchSkin(ModelMap mmap)
{
return "skin";
}
// 系统介绍
@GetMapping("/system/main")
public String main(ModelMap mmap)
@@ -121,6 +121,7 @@ public class SysRoleController extends BaseController
@ResponseBody
public AjaxResult editSave(@Validated SysRole role)
{
roleService.checkRoleAllowed(role);
if (UserConstants.ROLE_NAME_NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
{
return error("修改角色'" + role.getRoleName() + "'失败,角色名称已存在");
@@ -153,6 +154,7 @@ public class SysRoleController extends BaseController
@ResponseBody
public AjaxResult authDataScopeSave(SysRole role)
{
roleService.checkRoleAllowed(role);
role.setUpdateBy(ShiroUtils.getLoginName());
if (roleService.authDataScope(role) > 0)
{
@@ -216,6 +218,7 @@ public class SysRoleController extends BaseController
@ResponseBody
public AjaxResult changeStatus(SysRole role)
{
roleService.checkRoleAllowed(role);
return toAjax(roleService.changeStatus(role));
}
@@ -18,7 +18,6 @@ import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.shiro.service.SysPasswordService;
import com.ruoyi.framework.util.ShiroUtils;
@@ -159,11 +158,8 @@ public class SysUserController extends BaseController
@ResponseBody
public AjaxResult editSave(@Validated SysUser user)
{
if (StringUtils.isNotNull(user.getUserId()) && SysUser.isAdmin(user.getUserId()))
{
return error("不允许修改超级管理员用户");
}
else if (UserConstants.USER_PHONE_NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
userService.checkUserAllowed(user);
if (UserConstants.USER_PHONE_NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
{
return error("修改用户'" + user.getLoginName() + "'失败,手机号码已存在");
}
@@ -190,6 +186,7 @@ public class SysUserController extends BaseController
@ResponseBody
public AjaxResult resetPwdSave(SysUser user)
{
userService.checkUserAllowed(user);
user.setSalt(ShiroUtils.randomSalt());
user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt()));
if (userService.resetUserPwd(user) > 0)
@@ -258,6 +255,7 @@ public class SysUserController extends BaseController
@ResponseBody
public AjaxResult changeStatus(SysUser user)
{
userService.checkUserAllowed(user);
return toAjax(userService.changeStatus(user));
}
}
@@ -3,7 +3,7 @@ ruoyi:
# 名称
name: RuoYi
# 版本
version: 4.0.0
version: 4.1.0
# 版权年份
copyrightYear: 2019
# 实例演示开关
@@ -73,7 +73,7 @@ spring:
# MyBatis
mybatis:
# 搜索指定包别名
typeAliasesPackage: com.ruoyi
typeAliasesPackage: com.ruoyi.**.domain
# 配置mapper的扫描,找到所有的mapper.xml映射文件
mapperLocations: classpath*:mapper/**/*Mapper.xml
# 加载全局的配置文件
@@ -109,7 +109,7 @@ shiro:
# 设置Cookie的过期时间,天为单位
maxAge: 30
session:
# Session超时时间(默认30分钟)
# Session超时时间-1代表永不过期(默认30分钟)
expireTime: 30
# 同步session到数据库的周期(默认1分钟)
dbSyncPeriod: 1
@@ -3,7 +3,15 @@
<!-- 磁盘缓存位置 -->
<diskStore path="java.io.tmpdir"/>
<!-- maxEntriesLocalHeap:堆内存中最大缓存对象数,0没有限制 -->
<!-- maxElementsInMemory 在内存中缓存的element的最大数目。-->
<!-- eternal:elements是否永久有效,如果为truetimeouts将被忽略,element将永不过期 -->
<!-- timeToIdleSeconds:失效前的空闲秒数,当eternal为false时,这个属性才有效,0为不限制 -->
<!-- timeToLiveSeconds:失效前的存活秒数,创建时间到失效时间的间隔为存活时间,当eternal为false时,这个属性才有效,0为不限制 -->
<!-- overflowToDisk: 如果内存中数据超过内存限制,是否要缓存到磁盘上 -->
<!-- statistics:是否收集统计信息。如果需要监控缓存使用情况,应该打开这个选项。默认为关闭(统计会影响性能)。设置statistics="true"开启统计 -->
<!-- 默认缓存 -->
<defaultCache
maxEntriesLocalHeap="1000"
@@ -22,8 +30,8 @@
overflowToDisk="false"
statistics="true">
</cache>
<!-- 系统活跃用户缓存 -->
<!-- 系统活跃用户缓存 -->
<cache name="sys-userCache"
maxEntriesLocalHeap="10000"
overflowToDisk="false"
@@ -32,7 +40,18 @@
timeToLiveSeconds="0"
timeToIdleSeconds="0"
statistics="true">
</cache>
</cache>
<!-- 系统会话缓存 -->
<cache name="shiro-activeSessionCache"
maxElementsInMemory="10000"
overflowToDisk="true"
eternal="true"
timeToLiveSeconds="0"
timeToIdleSeconds="0"
diskPersistent="true"
diskExpiryThreadIntervalSeconds="600">
</cache>
</ehcache>
@@ -61,7 +61,7 @@
}
.krajee-default .file-thumb-progress .progress, .krajee-default .file-thumb-progress .progress-bar {
height: 11px;
height: 20px;
font-family: Verdana, Helvetica, sans-serif;
font-size: 9px;
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -233,7 +233,7 @@
});
});
$.btTable.on("check.bs.table uncheck.bs.table", function (e, rows, $element) {
$("#" + table.options.id).on("check.bs.table uncheck.bs.table", function (e, rows, $element) {
var index= $element.data('index');
$(this).find('.bs-checkbox').find('input[data-index="' + index + '"]').prop("checked", true);
var selectFixedItem = $('.left-fixed-body-columns input[name=btSelectItem]');
@@ -0,0 +1,663 @@
/*! X-editable - v1.5.1
* In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
* http://github.com/vitalets/x-editable
* Copyright (c) 2013 Vitaliy Potapov; Licensed MIT */
.editableform {
margin-bottom: 0; /* overwrites bootstrap margin */
}
.editableform .control-group {
margin-bottom: 0; /* overwrites bootstrap margin */
white-space: nowrap; /* prevent wrapping buttons on new line */
line-height: 20px; /* overwriting bootstrap line-height. See #133 */
}
/*
BS3 width:1005 for inputs breaks editable form in popup
See: https://github.com/vitalets/x-editable/issues/393
*/
.editableform .form-control {
width: auto;
}
.editable-buttons {
display: inline-block; /* should be inline to take effect of parent's white-space: nowrap */
vertical-align: top;
margin-left: 7px;
/* inline-block emulation for IE7*/
zoom: 1;
*display: inline;
}
.editable-buttons.editable-buttons-bottom {
display: block;
margin-top: 7px;
margin-left: 0;
}
.editable-input {
vertical-align: top;
display: inline-block; /* should be inline to take effect of parent's white-space: nowrap */
width: auto; /* bootstrap-responsive has width: 100% that breakes layout */
white-space: normal; /* reset white-space decalred in parent*/
/* display-inline emulation for IE7*/
zoom: 1;
*display: inline;
}
.editable-buttons .editable-cancel {
margin-left: 7px;
}
/*for jquery-ui buttons need set height to look more pretty*/
.editable-buttons button.ui-button-icon-only {
height: 24px;
width: 30px;
}
.editableform-loading {
background: url('loading.gif') center center no-repeat;
height: 25px;
width: auto;
min-width: 25px;
}
.editable-inline .editableform-loading {
background-position: left 5px;
}
.editable-error-block {
max-width: 300px;
margin: 5px 0 0 0;
width: auto;
white-space: normal;
}
/*add padding for jquery ui*/
.editable-error-block.ui-state-error {
padding: 3px;
}
.editable-error {
color: red;
}
/* ---- For specific types ---- */
.editableform .editable-date {
padding: 0;
margin: 0;
float: left;
}
/* move datepicker icon to center of add-on button. See https://github.com/vitalets/x-editable/issues/183 */
.editable-inline .add-on .icon-th {
margin-top: 3px;
margin-left: 1px;
}
/* checklist vertical alignment */
.editable-checklist label input[type="checkbox"],
.editable-checklist label span {
vertical-align: middle;
margin: 0;
}
.editable-checklist label {
white-space: nowrap;
}
/* set exact width of textarea to fit buttons toolbar */
.editable-wysihtml5 {
width: 566px;
height: 250px;
}
/* clear button shown as link in date inputs */
.editable-clear {
clear: both;
font-size: 0.9em;
text-decoration: none;
text-align: right;
}
/* IOS-style clear button for text inputs */
.editable-clear-x {
background: url('clear.png') center center no-repeat;
display: block;
width: 13px;
height: 13px;
position: absolute;
opacity: 0.6;
z-index: 100;
top: 50%;
right: 6px;
margin-top: -6px;
}
.editable-clear-x:hover {
opacity: 1;
}
.editable-pre-wrapped {
white-space: pre-wrap;
}
.editable-container.editable-popup {
max-width: none !important; /* without this rule poshytip/tooltip does not stretch */
}
.editable-container.popover {
width: auto; /* without this rule popover does not stretch */
}
.editable-container.editable-inline {
display: inline-block;
vertical-align: middle;
width: auto;
/* inline-block emulation for IE7*/
zoom: 1;
*display: inline;
}
.editable-container.ui-widget {
font-size: inherit; /* jqueryui widget font 1.1em too big, overwrite it */
z-index: 9990; /* should be less than select2 dropdown z-index to close dropdown first when click */
}
.editable-click,
a.editable-click,
a.editable-click:hover {
text-decoration: none;
border-bottom: dashed 1px #0088cc;
}
.editable-click.editable-disabled,
a.editable-click.editable-disabled,
a.editable-click.editable-disabled:hover {
color: #585858;
cursor: default;
border-bottom: none;
}
.editable-empty, .editable-empty:hover, .editable-empty:focus{
font-style: italic;
color: #DD1144;
/* border-bottom: none; */
text-decoration: none;
}
.editable-unsaved {
font-weight: bold;
}
.editable-unsaved:after {
/* content: '*'*/
}
.editable-bg-transition {
-webkit-transition: background-color 1400ms ease-out;
-moz-transition: background-color 1400ms ease-out;
-o-transition: background-color 1400ms ease-out;
-ms-transition: background-color 1400ms ease-out;
transition: background-color 1400ms ease-out;
}
/*see https://github.com/vitalets/x-editable/issues/139 */
.form-horizontal .editable
{
padding-top: 5px;
display:inline-block;
}
/*!
* Datepicker for Bootstrap
*
* Copyright 2012 Stefan Petre
* Improvements by Andrew Rowls
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
*/
.datepicker {
padding: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
direction: ltr;
/*.dow {
border-top: 1px solid #ddd !important;
}*/
}
.datepicker-inline {
width: 220px;
}
.datepicker.datepicker-rtl {
direction: rtl;
}
.datepicker.datepicker-rtl table tr td span {
float: right;
}
.datepicker-dropdown {
top: 0;
left: 0;
}
.datepicker-dropdown:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #ccc;
border-bottom-color: rgba(0, 0, 0, 0.2);
position: absolute;
top: -7px;
left: 6px;
}
.datepicker-dropdown:after {
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #ffffff;
position: absolute;
top: -6px;
left: 7px;
}
.datepicker > div {
display: none;
}
.datepicker.days div.datepicker-days {
display: block;
}
.datepicker.months div.datepicker-months {
display: block;
}
.datepicker.years div.datepicker-years {
display: block;
}
.datepicker table {
margin: 0;
}
.datepicker td,
.datepicker th {
text-align: center;
width: 20px;
height: 20px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
border: none;
}
.table-striped .datepicker table tr td,
.table-striped .datepicker table tr th {
background-color: transparent;
}
.datepicker table tr td.day:hover {
background: #eeeeee;
cursor: pointer;
}
.datepicker table tr td.old,
.datepicker table tr td.new {
color: #999999;
}
.datepicker table tr td.disabled,
.datepicker table tr td.disabled:hover {
background: none;
color: #999999;
cursor: default;
}
.datepicker table tr td.today,
.datepicker table tr td.today:hover,
.datepicker table tr td.today.disabled,
.datepicker table tr td.today.disabled:hover {
background-color: #fde19a;
background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a));
background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -o-linear-gradient(top, #fdd49a, #fdf59a);
background-image: linear-gradient(top, #fdd49a, #fdf59a);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0);
border-color: #fdf59a #fdf59a #fbed50;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #000;
}
.datepicker table tr td.today:hover,
.datepicker table tr td.today:hover:hover,
.datepicker table tr td.today.disabled:hover,
.datepicker table tr td.today.disabled:hover:hover,
.datepicker table tr td.today:active,
.datepicker table tr td.today:hover:active,
.datepicker table tr td.today.disabled:active,
.datepicker table tr td.today.disabled:hover:active,
.datepicker table tr td.today.active,
.datepicker table tr td.today:hover.active,
.datepicker table tr td.today.disabled.active,
.datepicker table tr td.today.disabled:hover.active,
.datepicker table tr td.today.disabled,
.datepicker table tr td.today:hover.disabled,
.datepicker table tr td.today.disabled.disabled,
.datepicker table tr td.today.disabled:hover.disabled,
.datepicker table tr td.today[disabled],
.datepicker table tr td.today:hover[disabled],
.datepicker table tr td.today.disabled[disabled],
.datepicker table tr td.today.disabled:hover[disabled] {
background-color: #fdf59a;
}
.datepicker table tr td.today:active,
.datepicker table tr td.today:hover:active,
.datepicker table tr td.today.disabled:active,
.datepicker table tr td.today.disabled:hover:active,
.datepicker table tr td.today.active,
.datepicker table tr td.today:hover.active,
.datepicker table tr td.today.disabled.active,
.datepicker table tr td.today.disabled:hover.active {
background-color: #fbf069 \9;
}
.datepicker table tr td.today:hover:hover {
color: #000;
}
.datepicker table tr td.today.active:hover {
color: #fff;
}
.datepicker table tr td.range,
.datepicker table tr td.range:hover,
.datepicker table tr td.range.disabled,
.datepicker table tr td.range.disabled:hover {
background: #eeeeee;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.datepicker table tr td.range.today,
.datepicker table tr td.range.today:hover,
.datepicker table tr td.range.today.disabled,
.datepicker table tr td.range.today.disabled:hover {
background-color: #f3d17a;
background-image: -moz-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -ms-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f3c17a), to(#f3e97a));
background-image: -webkit-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -o-linear-gradient(top, #f3c17a, #f3e97a);
background-image: linear-gradient(top, #f3c17a, #f3e97a);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3c17a', endColorstr='#f3e97a', GradientType=0);
border-color: #f3e97a #f3e97a #edde34;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.datepicker table tr td.range.today:hover,
.datepicker table tr td.range.today:hover:hover,
.datepicker table tr td.range.today.disabled:hover,
.datepicker table tr td.range.today.disabled:hover:hover,
.datepicker table tr td.range.today:active,
.datepicker table tr td.range.today:hover:active,
.datepicker table tr td.range.today.disabled:active,
.datepicker table tr td.range.today.disabled:hover:active,
.datepicker table tr td.range.today.active,
.datepicker table tr td.range.today:hover.active,
.datepicker table tr td.range.today.disabled.active,
.datepicker table tr td.range.today.disabled:hover.active,
.datepicker table tr td.range.today.disabled,
.datepicker table tr td.range.today:hover.disabled,
.datepicker table tr td.range.today.disabled.disabled,
.datepicker table tr td.range.today.disabled:hover.disabled,
.datepicker table tr td.range.today[disabled],
.datepicker table tr td.range.today:hover[disabled],
.datepicker table tr td.range.today.disabled[disabled],
.datepicker table tr td.range.today.disabled:hover[disabled] {
background-color: #f3e97a;
}
.datepicker table tr td.range.today:active,
.datepicker table tr td.range.today:hover:active,
.datepicker table tr td.range.today.disabled:active,
.datepicker table tr td.range.today.disabled:hover:active,
.datepicker table tr td.range.today.active,
.datepicker table tr td.range.today:hover.active,
.datepicker table tr td.range.today.disabled.active,
.datepicker table tr td.range.today.disabled:hover.active {
background-color: #efe24b \9;
}
.datepicker table tr td.selected,
.datepicker table tr td.selected:hover,
.datepicker table tr td.selected.disabled,
.datepicker table tr td.selected.disabled:hover {
background-color: #9e9e9e;
background-image: -moz-linear-gradient(top, #b3b3b3, #808080);
background-image: -ms-linear-gradient(top, #b3b3b3, #808080);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b3b3b3), to(#808080));
background-image: -webkit-linear-gradient(top, #b3b3b3, #808080);
background-image: -o-linear-gradient(top, #b3b3b3, #808080);
background-image: linear-gradient(top, #b3b3b3, #808080);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b3b3b3', endColorstr='#808080', GradientType=0);
border-color: #808080 #808080 #595959;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datepicker table tr td.selected:hover,
.datepicker table tr td.selected:hover:hover,
.datepicker table tr td.selected.disabled:hover,
.datepicker table tr td.selected.disabled:hover:hover,
.datepicker table tr td.selected:active,
.datepicker table tr td.selected:hover:active,
.datepicker table tr td.selected.disabled:active,
.datepicker table tr td.selected.disabled:hover:active,
.datepicker table tr td.selected.active,
.datepicker table tr td.selected:hover.active,
.datepicker table tr td.selected.disabled.active,
.datepicker table tr td.selected.disabled:hover.active,
.datepicker table tr td.selected.disabled,
.datepicker table tr td.selected:hover.disabled,
.datepicker table tr td.selected.disabled.disabled,
.datepicker table tr td.selected.disabled:hover.disabled,
.datepicker table tr td.selected[disabled],
.datepicker table tr td.selected:hover[disabled],
.datepicker table tr td.selected.disabled[disabled],
.datepicker table tr td.selected.disabled:hover[disabled] {
background-color: #808080;
}
.datepicker table tr td.selected:active,
.datepicker table tr td.selected:hover:active,
.datepicker table tr td.selected.disabled:active,
.datepicker table tr td.selected.disabled:hover:active,
.datepicker table tr td.selected.active,
.datepicker table tr td.selected:hover.active,
.datepicker table tr td.selected.disabled.active,
.datepicker table tr td.selected.disabled:hover.active {
background-color: #666666 \9;
}
.datepicker table tr td.active,
.datepicker table tr td.active:hover,
.datepicker table tr td.active.disabled,
.datepicker table tr td.active.disabled:hover {
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(top, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datepicker table tr td.active:hover,
.datepicker table tr td.active:hover:hover,
.datepicker table tr td.active.disabled:hover,
.datepicker table tr td.active.disabled:hover:hover,
.datepicker table tr td.active:active,
.datepicker table tr td.active:hover:active,
.datepicker table tr td.active.disabled:active,
.datepicker table tr td.active.disabled:hover:active,
.datepicker table tr td.active.active,
.datepicker table tr td.active:hover.active,
.datepicker table tr td.active.disabled.active,
.datepicker table tr td.active.disabled:hover.active,
.datepicker table tr td.active.disabled,
.datepicker table tr td.active:hover.disabled,
.datepicker table tr td.active.disabled.disabled,
.datepicker table tr td.active.disabled:hover.disabled,
.datepicker table tr td.active[disabled],
.datepicker table tr td.active:hover[disabled],
.datepicker table tr td.active.disabled[disabled],
.datepicker table tr td.active.disabled:hover[disabled] {
background-color: #0044cc;
}
.datepicker table tr td.active:active,
.datepicker table tr td.active:hover:active,
.datepicker table tr td.active.disabled:active,
.datepicker table tr td.active.disabled:hover:active,
.datepicker table tr td.active.active,
.datepicker table tr td.active:hover.active,
.datepicker table tr td.active.disabled.active,
.datepicker table tr td.active.disabled:hover.active {
background-color: #003399 \9;
}
.datepicker table tr td span {
display: block;
width: 23%;
height: 54px;
line-height: 54px;
float: left;
margin: 1%;
cursor: pointer;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.datepicker table tr td span:hover {
background: #eeeeee;
}
.datepicker table tr td span.disabled,
.datepicker table tr td span.disabled:hover {
background: none;
color: #999999;
cursor: default;
}
.datepicker table tr td span.active,
.datepicker table tr td span.active:hover,
.datepicker table tr td span.active.disabled,
.datepicker table tr td span.active.disabled:hover {
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(top, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datepicker table tr td span.active:hover,
.datepicker table tr td span.active:hover:hover,
.datepicker table tr td span.active.disabled:hover,
.datepicker table tr td span.active.disabled:hover:hover,
.datepicker table tr td span.active:active,
.datepicker table tr td span.active:hover:active,
.datepicker table tr td span.active.disabled:active,
.datepicker table tr td span.active.disabled:hover:active,
.datepicker table tr td span.active.active,
.datepicker table tr td span.active:hover.active,
.datepicker table tr td span.active.disabled.active,
.datepicker table tr td span.active.disabled:hover.active,
.datepicker table tr td span.active.disabled,
.datepicker table tr td span.active:hover.disabled,
.datepicker table tr td span.active.disabled.disabled,
.datepicker table tr td span.active.disabled:hover.disabled,
.datepicker table tr td span.active[disabled],
.datepicker table tr td span.active:hover[disabled],
.datepicker table tr td span.active.disabled[disabled],
.datepicker table tr td span.active.disabled:hover[disabled] {
background-color: #0044cc;
}
.datepicker table tr td span.active:active,
.datepicker table tr td span.active:hover:active,
.datepicker table tr td span.active.disabled:active,
.datepicker table tr td span.active.disabled:hover:active,
.datepicker table tr td span.active.active,
.datepicker table tr td span.active:hover.active,
.datepicker table tr td span.active.disabled.active,
.datepicker table tr td span.active.disabled:hover.active {
background-color: #003399 \9;
}
.datepicker table tr td span.old,
.datepicker table tr td span.new {
color: #999999;
}
.datepicker th.datepicker-switch {
width: 145px;
}
.datepicker thead tr:first-child th,
.datepicker tfoot tr th {
cursor: pointer;
}
.datepicker thead tr:first-child th:hover,
.datepicker tfoot tr th:hover {
background: #eeeeee;
}
.datepicker .cw {
font-size: 10px;
width: 12px;
padding: 0 2px 0 5px;
vertical-align: middle;
}
.datepicker thead tr:first-child th.cw {
cursor: default;
background-color: transparent;
}
.input-append.date .add-on i,
.input-prepend.date .add-on i {
display: block;
cursor: pointer;
width: 16px;
height: 16px;
}
.input-daterange input {
text-align: center;
}
.input-daterange input:first-child {
-webkit-border-radius: 3px 0 0 3px;
-moz-border-radius: 3px 0 0 3px;
border-radius: 3px 0 0 3px;
}
.input-daterange input:last-child {
-webkit-border-radius: 0 3px 3px 0;
-moz-border-radius: 0 3px 3px 0;
border-radius: 0 3px 3px 0;
}
.input-daterange .add-on {
display: inline-block;
width: auto;
min-width: 16px;
height: 18px;
padding: 4px 5px;
font-weight: normal;
line-height: 18px;
text-align: center;
text-shadow: 0 1px 0 #ffffff;
vertical-align: middle;
background-color: #eeeeee;
border: 1px solid #ccc;
margin-left: -5px;
margin-right: -5px;
}
File diff suppressed because one or more lines are too long
@@ -1,7 +0,0 @@
/*
* bootstrap-table - v1.11.0 - 2016-07-02
* https://github.com/wenzhixin/bootstrap-table
* Copyright (c) 2016 zhixin wen
* Licensed MIT License
*/
!function(a){"use strict";a.extend(a.fn.bootstrapTable.defaults,{editable:!0,onEditableInit:function(){return!1},onEditableSave:function(){return!1},onEditableShown:function(){return!1},onEditableHidden:function(){return!1}}),a.extend(a.fn.bootstrapTable.Constructor.EVENTS,{"editable-init.bs.table":"onEditableInit","editable-save.bs.table":"onEditableSave","editable-shown.bs.table":"onEditableShown","editable-hidden.bs.table":"onEditableHidden"});var b=a.fn.bootstrapTable.Constructor,c=b.prototype.initTable,d=b.prototype.initBody;b.prototype.initTable=function(){var b=this;c.apply(this,Array.prototype.slice.apply(arguments)),this.options.editable&&a.each(this.columns,function(c,d){if(d.editable){var e={},f=[],g="editable-",h=function(a,b){var c=a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()});if(c.slice(0,g.length)==g){var d=c.replace(g,"data-");e[d]=b}};a.each(b.options,h),d.formatter=d.formatter||function(a){return a},d._formatter=d._formatter?d._formatter:d.formatter,d.formatter=function(c,g,i){var j=d._formatter?d._formatter(c,g,i):c;a.each(d,h),a.each(e,function(a,b){f.push(" "+a+'="'+b+'"')});var k=!1;return d.editable.hasOwnProperty("noeditFormatter")&&(k=d.editable.noeditFormatter(c,g,i)),k===!1?['<a href="javascript:void(0)"',' data-name="'+d.field+'"',' data-pk="'+g[b.options.idField]+'"',' data-value="'+j+'"',f.join(""),"></a>"].join(""):k}}})},b.prototype.initBody=function(){var b=this;d.apply(this,Array.prototype.slice.apply(arguments)),this.options.editable&&(a.each(this.columns,function(c,d){d.editable&&(b.$body.find('a[data-name="'+d.field+'"]').editable(d.editable).off("save").on("save",function(c,e){var f=b.getData(),g=a(this).parents("tr[data-index]").data("index"),h=f[g],i=h[d.field];a(this).data("value",e.submitValue),h[d.field]=e.submitValue,b.trigger("editable-save",d.field,h,i,a(this)),b.resetFooter()}),b.$body.find('a[data-name="'+d.field+'"]').editable(d.editable).off("shown").on("shown",function(c,e){var f=b.getData(),g=a(this).parents("tr[data-index]").data("index"),h=f[g];b.trigger("editable-shown",d.field,h,a(this),e)}),b.$body.find('a[data-name="'+d.field+'"]').editable(d.editable).off("hidden").on("hidden",function(c,e){var f=b.getData(),g=a(this).parents("tr[data-index]").data("index"),h=f[g];b.trigger("editable-hidden",d.field,h,a(this),e)}))}),this.trigger("editable-init"))}}(jQuery);
Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

@@ -23,7 +23,7 @@
top: 0;
width: 200px;
border: 1px #ddd solid;
height: 440px;
height: 450px;
padding: 4px;
box-shadow: 0px 0px 12px #ddd;
text-align: center;
File diff suppressed because one or more lines are too long
@@ -4590,12 +4590,12 @@ S2.define('select2/i18n/en',[],function () {
// English
return {
errorLoading: function () {
return 'The results could not be loaded.';
return '无法载入结果';
},
inputTooLong: function (args) {
var overChars = args.input.length - args.maximum;
var message = 'Please delete ' + overChars + ' character';
var message = '请删除' + overChars + '个字符';
if (overChars != 1) {
message += 's';
@@ -4606,15 +4606,15 @@ S2.define('select2/i18n/en',[],function () {
inputTooShort: function (args) {
var remainingChars = args.minimum - args.input.length;
var message = 'Please enter ' + remainingChars + ' or more characters';
var message = '请再输入至少' + remainingChars + '个字符';
return message;
},
loadingMore: function () {
return 'Loading more results…';
return '载入更多结果…';
},
maximumSelected: function (args) {
var message = 'You can only select ' + args.maximum + ' item';
var message = '最多只能选择' + args.maximum + '个项目';
if (args.maximum != 1) {
message += 's';
@@ -4623,13 +4623,13 @@ S2.define('select2/i18n/en',[],function () {
return message;
},
noResults: function () {
return 'No results found';
return '未找到结果';
},
searching: function () {
return 'Searching…';
return '搜索中…';
},
removeAllItems: function () {
return 'Remove all items';
return '删除所有项目';
}
};
});
@@ -5012,7 +5012,7 @@ S2.define('select2/defaults',[
return selection.text;
},
theme: 'default',
width: 'resolve'
width: '100%'
};
};
File diff suppressed because one or more lines are too long
@@ -573,14 +573,14 @@ label.error {
}
}
/** 表单查询条件 **/
ul {
/** 表单查询条件 **/
.select-list ul, .layui-layer-content ul {
margin: 0;
padding: 0;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
li {
.select-list li, .layui-layer-content li {
list-style: none;
}
@@ -640,8 +640,8 @@ label {
.select-list li p{
float: left;
width: 80px;
margin: 5px 15px 5px 0px;
width: 65px;
margin: 5px 5px 5px 0px;
text-align:right;
}
@@ -737,6 +737,20 @@ label {
background-color: #12889a
}
.select-list .select2-container--bootstrap {
width: 200px!important;
display: inline-block;
}
.select-list .select2-container--bootstrap .select2-selection {
border-radius: 6px;
}
.select-list .select2-container--bootstrap .select2-selection--single {
height: 30px!important;
padding: 5px 10px;
}
.select-list .select-time input {
width: 93px;
}
@@ -799,7 +813,7 @@ label {
.table-striped .table, .table-striped .table, .table>thead>tr>th, .table>tbody>tr>th, .table>tfoot>tr>th, .table>thead>tr>td, .table>tbody>tr>td, .table>tfoot>tr>td {
border-bottom: 1px solid #e7eaec!important;
background-color: transparent!important;
background-color: transparent;
border: 0px;
}
@@ -832,6 +846,10 @@ label {
display: inline-block
}
.editable-input .input-sm {
height: 32px!important;
}
/** 表格冻结列样式 **/
.left-fixed-table-columns, .left-fixed-body-columns {
position: absolute;
@@ -219,6 +219,7 @@ $(function() {
flag = true;
$(".nav ul li, .nav li").removeClass("selected");
$(this).parent("li").addClass("selected");
setIframeUrl($(this).attr("href"));
if (dataUrl == undefined || $.trim(dataUrl).length == 0) return false;
// 选项卡菜单已存在
@@ -398,6 +399,13 @@ $(function() {
target.attr('src', url).ready();
}
// 页签全屏
function fullScreenTab() {
var currentId = $('.page-tabs-content').find('.active').attr('data-id');
var target = $('.RuoYi_iframe[data-id="' + currentId + '"]');
target.fullScreen(true);
}
// 关闭当前选项卡
function tabCloseCurrent() {
$('.page-tabs-content').find('.active i').trigger("click");
@@ -431,8 +439,11 @@ $(function() {
$(document).toggleFullScreen();
});
// 刷新按钮
// 页签刷新按钮
$('.tabReload').on('click', refreshTab);
// 页签全屏按钮
$('.tabFullScreen').on('click', fullScreenTab);
// 双击选项卡全屏显示
$('.menuTabs').on('dblclick', '.menuTab', activeTabMax);
@@ -469,6 +480,13 @@ $(function() {
$('#ax_close_max').show();
}
// 设置锚点
function setIframeUrl(href) {
var nowUrl = window.location.href;
var newUrl = nowUrl.substring(0, nowUrl.indexOf("#"));
window.location.href = newUrl + "#" + href;
}
$(window).keydown(function(event) {
if (event.keyCode == 27) {
$('#content-main').removeClass('max');
@@ -476,6 +494,12 @@ $(function() {
}
});
window.onhashchange = function() {
var hash = location.hash;
var url = hash.substring(1, hash.length);
$('a[href$="' + url + '"]').click();
};
// 右键菜单实现
$.contextMenu({
selector: ".menuTab",
@@ -3,6 +3,15 @@
* Copyright (c) 2019 ruoyi
*/
$(function() {
// layer扩展皮肤
if (window.layer !== undefined) {
layer.config({
extend: 'moon/style.css',
skin: 'layer-ext-moon'
});
}
// select2复选框事件绑定
if ($.fn.select2 !== undefined) {
$.fn.select2.defaults.set( "theme", "bootstrap" );
@@ -128,7 +137,7 @@ $(function() {
// tree表格树 展开/折叠
var expandFlag;
$("#expandAllBtn").click(function() {
var dataExpand = $.common.isEmpty($.table._option.expandAll) ? true : $.table._option.expandAll;
var dataExpand = $.common.isEmpty(table.options.expandAll) ? true : table.options.expandAll;
expandFlag = $.common.isEmpty(expandFlag) ? dataExpand : expandFlag;
if (!expandFlag) {
$.bttTable.bootstrapTreeTable('expandAll');
@@ -225,17 +234,33 @@ function createMenuItem(dataUrl, menuName) {
//日志打印封装处理
var log = {
log: function (msg) {
console.log(msg);
log: function(msg) {
console.log(msg);
},
info: function(msg) {
console.info(msg);
console.info(msg);
},
warn: function(msg) {
console.warn(msg);
console.warn(msg);
},
error: function(msg) {
console.error(msg);
console.error(msg);
}
};
//本地缓存处理
var storage = {
set: function(key, value) {
window.localStorage.setItem(key, value);
},
get: function(key) {
return window.localStorage.getItem(key);
},
remove: function(key) {
window.localStorage.removeItem(key);
},
clear: function() {
window.localStorage.clear();
}
};
@@ -253,7 +278,3 @@ $.ajaxSetup({
}
}
});
layer.config({
extend: 'moon/style.css',
skin: 'layer-ext-moon'
});
@@ -2,14 +2,37 @@
* 通用js方法封装处理
* Copyright (c) 2019 ruoyi
*/
// 当前table相关信息
var table = {
config: {},
// 当前实例配置
options: {},
// 设置实例配置
set: function(id) {
if($.common.getLength(table.config) > 1) {
var tableId = $.common.isEmpty(id) ? $(event.currentTarget).parents(".bootstrap-table").find(".table").attr("id") : id;
if ($.common.isNotEmpty(tableId)) {
table.options = table.get(tableId);
}
}
},
// 获取实例配置
get: function(id) {
return table.config[id];
},
// 记住选择实例组
rememberSelecteds: {},
// 记住选择ID组
rememberSelectedIds: {}
};
(function ($) {
$.extend({
_tree: {},
btTable: {},
bttTable: {},
// 表格封装处理
table: {
_option: {},
// 初始化表格参数
init: function(options) {
var defaults = {
@@ -35,6 +58,7 @@
showToggle: true,
showExport: false,
clickToSelect: false,
mobileResponsive: true,
rememberSelected: false,
fixedColumns: false,
fixedNumber: 0,
@@ -44,8 +68,8 @@
rowStyle: {},
};
var options = $.extend(defaults, options);
$.table._option = options;
$.btTable = $('#' + options.id);
table.options = options;
table.config[options.id] = options;
$.table.initEvent();
$('#' + options.id).bootstrapTable({
url: options.url, // 请求后台的URL*
@@ -78,11 +102,14 @@
showExport: options.showExport, // 是否支持导出文件
uniqueId: options.uniqueId, // 唯 一的标识符
clickToSelect: options.clickToSelect, // 是否启用点击选中行
mobileResponsive: options.mobileResponsive, // 是否支持移动端适配
detailView: options.detailView, // 是否启用显示细节视图
onClickRow: options.onClickRow, // 点击某行触发的事件
onDblClickRow: options.onDblClickRow, // 双击某行触发的事件
onClickCell: options.onClickCell, // 单击某格触发的事件
onDblClickCell: options.onDblClickCell, // 双击某格触发的事件
onEditableSave: options.onEditableSave, // 行内编辑保存的事件
onExpandRow: options.onExpandRow, // 点击详细视图的事件
rememberSelected: options.rememberSelected, // 启用翻页记住前面的选择
fixedColumns: options.fixedColumns, // 是否启用冻结列(左侧)
fixedNumber: options.fixedNumber, // 列冻结的个数(左侧)
@@ -98,6 +125,15 @@
detailFormatter: options.detailFormatter, // 在行下面展示其他数据列表
});
},
// 获取实例ID,如存在多个返回#id1,#id2 delimeter分隔符
getOptionsIds: function(separator) {
var _separator = $.common.isEmpty(separator) ? "," : separator;
var optionsIds = "";
$.each(table.config, function(key, value){
optionsIds += "#" + key + _separator;
});
return optionsIds.substring(0, optionsIds.length - 1);
},
// 查询条件
queryParams: function(params) {
var curParams = {
@@ -108,22 +144,22 @@
orderByColumn: params.sort,
isAsc: params.order
};
var currentId = $.common.isEmpty($.table._option.formId) ? $('form').attr('id') : $.table._option.formId;
var currentId = $.common.isEmpty(table.options.formId) ? $('form').attr('id') : table.options.formId;
return $.extend(curParams, $.common.formToJSON(currentId));
},
// 请求获取数据后处理回调函数
responseHandler: function(res) {
if (typeof $.table._option.responseHandler == "function") {
$.table._option.responseHandler(res);
if (typeof table.options.responseHandler == "function") {
table.options.responseHandler(res);
}
if (res.code == 0) {
if ($.common.isNotEmpty($.table._option.sidePagination) && $.table._option.sidePagination == 'client') {
if ($.common.isNotEmpty(table.options.sidePagination) && table.options.sidePagination == 'client') {
return res.rows;
} else {
if ($.common.isNotEmpty($.table._option.rememberSelected) && $.table._option.rememberSelected) {
var column = $.common.isEmpty($.table._option.uniqueId) ? $.table._option.columns[1].field : $.table._option.uniqueId;
if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) {
var column = $.common.isEmpty(table.options.uniqueId) ? table.options.columns[1].field : table.options.uniqueId;
$.each(res.rows, function(i, row) {
row.state = $.inArray(row[column], selectionIds) !== -1;
row.state = $.inArray(row[column], table.rememberSelectedIds[table.options.id]) !== -1;
})
}
return { rows: res.rows, total: res.total };
@@ -134,27 +170,46 @@
}
},
// 初始化事件
initEvent: function(data) {
// 触发行点击事件 加载成功事件
$.btTable.on("check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table load-success.bs.table", function () {
// 工具栏按钮控制
var rows = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
// 非多个禁用
$('#' + $.table._option.toolbar + ' .multiple').toggleClass('disabled', !rows.length);
// 非单个禁用
$('#' + $.table._option.toolbar + ' .single').toggleClass('disabled', rows.length!=1);
initEvent: function() {
// 实例ID信息
var optionsIds = $.table.getOptionsIds();
// 监听事件处理
$(optionsIds).on(TABLE_EVENTS, function () {
table.set($(this).attr("id"));
});
// 绑定选中事件、取消事件、全部选中、全部取消
$.btTable.on("check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table", function (e, rows) {
// 选中、取消、全部选中、全部取消(事件)
$(optionsIds).on("check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table", function (e, rows) {
// 复选框分页保留保存选中数组
var rowIds = $.table.affectedRowIds(rows);
if ($.common.isNotEmpty($.table._option.rememberSelected) && $.table._option.rememberSelected) {
if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) {
func = $.inArray(e.type, ['check', 'check-all']) > -1 ? 'union' : 'difference';
selectionIds = _[func](selectionIds, rowIds);
var selectedIds = table.rememberSelectedIds[table.options.id];
if($.common.isNotEmpty(selectedIds)) {
table.rememberSelectedIds[table.options.id] = _[func](selectedIds, rowIds);
} else {
table.rememberSelectedIds[table.options.id] = _[func]([], rowIds);
}
var selectedRows = table.rememberSelecteds[table.options.id];
if($.common.isNotEmpty(selectedRows)) {
table.rememberSelecteds[table.options.id] = _[func](selectedRows, rows);
} else {
table.rememberSelecteds[table.options.id] = _[func]([], rows);
}
}
});
// 加载成功、选中、取消、全部选中、全部取消(事件)
$(optionsIds).on("check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table load-success.bs.table", function () {
var toolbar = table.options.toolbar;
var uniqueId = table.options.uniqueId;
// 工具栏按钮控制
var rows = $.common.isEmpty(uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(uniqueId);
// 非多个禁用
$('#' + toolbar + ' .multiple').toggleClass('disabled', !rows.length);
// 非单个禁用
$('#' + toolbar + ' .single').toggleClass('disabled', rows.length!=1);
});
// 图片预览事件
$.btTable.on('click', '.img-circle', function() {
$(optionsIds).off("click").on("click", '.img-circle', function() {
var src = $(this).attr('src');
var target = $(this).data('target');
var height = $(this).data('height');
@@ -172,44 +227,56 @@
window.open(src);
}
});
// 单击tooltip复制文本
$.btTable.on('click', '.tooltip-show', function() {
// 单击tooltip事件
$(optionsIds).on("click", '.tooltip-show', function() {
var target = $(this).data('target');
var input = $(this).prev();
input.select();
document.execCommand("copy");
if ($.common.equals("copy", target)) {
input.select();
document.execCommand("copy");
} else if ($.common.equals("open", target)) {
parent.layer.alert(input.val(), {
title: "信息内容",
shadeClose: true,
btn: ['确认'],
btnclass: ['btn btn-primary'],
});
}
});
},
// 当所有数据被加载时触发
onLoadSuccess: function(data) {
if (typeof $.table._option.onLoadSuccess == "function") {
$.table._option.onLoadSuccess(data);
if (typeof table.options.onLoadSuccess == "function") {
table.options.onLoadSuccess(data);
}
// 浮动提示框特效
$("[data-toggle='tooltip']").tooltip();
},
// 表格销毁
destroy: function (tableId) {
var currentId = $.common.isEmpty(tableId) ? $.table._option.id : tableId;
var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId;
$("#" + currentId).bootstrapTable('destroy');
},
// 序列号生成
serialNumber: function (index) {
var table = $.btTable.bootstrapTable('getOptions');
var pageSize = table.pageSize;
var pageNumber = table.pageNumber;
serialNumber: function (index, tableId) {
var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId;
var tableParams = $("#" + currentId).bootstrapTable('getOptions');
var pageSize = tableParams.pageSize;
var pageNumber = tableParams.pageNumber;
return pageSize * (pageNumber - 1) + index + 1;
},
// 列超出指定长度浮动提示(单击文本复制
tooltip: function (value, length) {
// 列超出指定长度浮动提示 targetcopy单击复制文本 open弹窗打开文本
tooltip: function (value, length, target) {
var _length = $.common.isEmpty(length) ? 20 : length;
var _text = "";
var _value = $.common.nullToStr(value);
var _target = $.common.isEmpty(target) ? 'copy' : target;
if (_value.length > _length) {
_text = _value.substr(0, _length) + "...";
_value = _value.replace(/\'/g,"");
var actions = [];
actions.push($.common.sprintf('<input id="tooltip-show" style="opacity: 0;position: absolute;z-index:-1" type="text" value="%s"/>', _value));
actions.push($.common.sprintf("<a href='###' class='tooltip-show' data-toggle='tooltip' title='%s'>%s</a>", _value, _text));
actions.push($.common.sprintf("<a href='###' class='tooltip-show' data-toggle='tooltip' data-target='%s' title='%s'>%s</a>", _target, _value, _text));
return actions.join('');
} else {
_text = _value;
@@ -239,16 +306,17 @@
// blank or self
var _target = $.common.isEmpty(target) ? 'self' : target;
if ($.common.isNotEmpty(value)) {
return $.common.sprintf("<img class='img-circle img-xs' data-height='%s' data-width='%s' data-target='%s' src='%s'/>", width, height, _target, value);
return $.common.sprintf("<img class='img-circle img-xs' data-height='%s' data-width='%s' data-target='%s' src='%s'/>", height, width, _target, value);
} else {
return $.common.nullToStr(value);
}
},
// 搜索-默认第一个form
search: function(formId, data) {
search: function(formId, tableId, data) {
table.set(tableId);
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
var params = $.btTable.bootstrapTable('getOptions');
params.queryParams = function(params) {
var params = $.common.isEmpty(tableId) ? $("#" + table.options.id).bootstrapTable('getOptions') : $("#" + tableId).bootstrapTable('getOptions');
params.queryParams = function(params) {
var search = $.common.formToJSON(currentId);
if($.common.isNotEmpty(data)){
$.each(data, function(key) {
@@ -262,14 +330,19 @@
search.isAsc = params.order;
return search;
}
$.btTable.bootstrapTable('refresh', params);
if($.common.isNotEmpty(tableId)){
$("#" + tableId).bootstrapTable('refresh', params);
} else{
$("#" + table.options.id).bootstrapTable('refresh', params);
}
},
// 导出数据
exportExcel: function(formId) {
$.modal.confirm("确定导出所有" + $.table._option.modalName + "吗?", function() {
table.set();
$.modal.confirm("确定导出所有" + table.options.modalName + "吗?", function() {
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
$.modal.loading("正在导出数据,请稍后...");
$.post($.table._option.exportUrl, $("#" + currentId).serializeArray(), function(result) {
$.post(table.options.exportUrl, $("#" + currentId).serializeArray(), function(result) {
if (result.code == web_status.SUCCESS) {
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
} else if (result.code == web_status.WARNING) {
@@ -283,7 +356,8 @@
},
// 下载模板
importTemplate: function() {
$.get($.table._option.importTemplateUrl, function(result) {
table.set();
$.get(table.options.importTemplateUrl, function(result) {
if (result.code == web_status.SUCCESS) {
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
} else if (result.code == web_status.WARNING) {
@@ -295,6 +369,7 @@
},
// 导入数据
importExcel: function(formId) {
table.set();
var currentId = $.common.isEmpty(formId) ? 'importTpl' : formId;
layer.open({
type: 1,
@@ -303,7 +378,7 @@
//不固定
maxmin: true,
shade: 0.3,
title: '导入' + $.table._option.modalName + '数据',
title: '导入' + table.options.modalName + '数据',
content: $('#' + currentId).html(),
btn: ['<i class="fa fa-check"></i> 导入', '<i class="fa fa-remove"></i> 取消'],
// 弹层外区域关闭
@@ -320,7 +395,7 @@
formData.append("file", $('#file')[0].files[0]);
formData.append("updateSupport", $("input[name='updateSupport']").is(':checked'));
$.ajax({
url: $.table._option.importUrl,
url: table.options.importUrl,
data: formData,
cache: false,
contentType: false,
@@ -346,24 +421,30 @@
});
},
// 刷新表格
refresh: function() {
$.btTable.bootstrapTable('refresh', {
refresh: function(tableId) {
var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId;
$("#" + currentId).bootstrapTable('refresh', {
silent: true
});
},
// 查询表格指定列值
selectColumns: function(column) {
var rows = $.map($.btTable.bootstrapTable('getSelections'), function (row) {
var rows = $.map($("#" + table.options.id).bootstrapTable('getSelections'), function (row) {
return row[column];
});
if ($.common.isNotEmpty($.table._option.rememberSelected) && $.table._option.rememberSelected) {
rows = rows.concat(selectionIds);
if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) {
var selectedRows = table.rememberSelecteds[table.options.id];
if($.common.isNotEmpty(selectedRows)) {
rows = $.map(table.rememberSelecteds[table.options.id], function (row) {
return row[column];
});
}
}
return $.common.uniqueFn(rows);
},
// 获取当前页选中或者取消的行ID
affectedRowIds: function(rows) {
var column = $.common.isEmpty($.table._option.uniqueId) ? $.table._option.columns[1].field : $.table._option.uniqueId;
var column = $.common.isEmpty(table.options.uniqueId) ? table.options.columns[1].field : table.options.uniqueId;
var rowIds;
if ($.isArray(rows)) {
rowIds = $.map(rows, function(row) {
@@ -376,11 +457,16 @@
},
// 查询表格首列值
selectFirstColumns: function() {
var rows = $.map($.btTable.bootstrapTable('getSelections'), function (row) {
return row[$.table._option.columns[1].field];
var rows = $.map($("#" + table.options.id).bootstrapTable('getSelections'), function (row) {
return row[table.options.columns[1].field];
});
if ($.common.isNotEmpty($.table._option.rememberSelected) && $.table._option.rememberSelected) {
rows = rows.concat(selectionIds);
if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) {
var selectedRows = table.rememberSelecteds[table.options.id];
if($.common.isNotEmpty(selectedRows)) {
rows = $.map(selectedRows, function (row) {
return row[table.options.columns[1].field];
});
}
}
return $.common.uniqueFn(rows);
},
@@ -397,12 +483,14 @@
return actions.join('');
},
// 显示表格指定列
showColumn: function(column) {
$.btTable.bootstrapTable('showColumn', column);
showColumn: function(column, tableId) {
var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId;
$("#" + currentId).bootstrapTable('showColumn', column);
},
// 隐藏表格指定列
hideColumn: function(column) {
$.btTable.bootstrapTable('hideColumn', column);
hideColumn: function(column, tableId) {
var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId;
$("#" + currentId).bootstrapTable('hideColumn', column);
}
},
// 表格树封装处理
@@ -425,12 +513,14 @@
expandFirst: true
};
var options = $.extend(defaults, options);
$.table._option = options;
table.options = options;
table.config[options.id] = options;
$.bttTable = $('#' + options.id).bootstrapTreeTable({
code: options.code, // 用于设置父子关系
parentCode: options.parentCode, // 用于设置父子关系
type: 'post', // 请求方式(*
type: 'post', // 请求方式(*
url: options.url, // 请求后台的URL*
data: options.data, // 无url时用于渲染的数据
ajaxParams: options.ajaxParams, // 请求数据的ajax的data属性
rootIdValue: options.rootIdValue, // 设置指定根节点id值
height: options.height, // 表格树的高度
@@ -477,10 +567,17 @@
// 表单封装处理
form: {
// 表单重置
reset: function(formId) {
reset: function(formId, tableId) {
table.set(tableId);
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
$("#" + currentId)[0].reset();
$.btTable.bootstrapTable('refresh');
if (table.options.type == table_type.bootstrapTable) {
if($.common.isEmpty(tableId)){
$("#" + table.options.id).bootstrapTable('refresh');
} else{
$("#" + tableId).bootstrapTable('refresh');
}
}
},
// 获取选中复选框项
selectCheckeds: function(name) {
@@ -778,12 +875,20 @@
},
// 详细信息
detail: function(id, width, height) {
table.set();
var _url = $.operate.detailUrl(id);
var _width = $.common.isEmpty(width) ? "800" : width;
var _height = $.common.isEmpty(height) ? ($(window).height() - 50) : height;
//如果是移动端,就使用自适应大小弹窗
if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {
_width = 'auto';
_height = 'auto';
}
var options = {
title: $.table._option.modalName + "详细",
width: width,
height: height,
url: $.operate.detailUrl(id),
title: table.options.modalName + "详细",
width: _width,
height: _height,
url: _url,
skin: 'layui-layer-gray',
btn: ['关闭'],
yes: function (index, layero) {
@@ -796,22 +901,23 @@
detailUrl: function(id) {
var url = "/404.html";
if ($.common.isNotEmpty(id)) {
url = $.table._option.detailUrl.replace("{id}", id);
url = table.options.detailUrl.replace("{id}", id);
} else {
var id = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
var id = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
if (id.length == 0) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
url = $.table._option.detailUrl.replace("{id}", id);
url = table.options.detailUrl.replace("{id}", id);
}
return url;
},
// 删除信息
remove: function(id) {
$.modal.confirm("确定删除该条" + $.table._option.modalName + "信息吗?", function() {
var url = $.common.isEmpty(id) ? $.table._option.removeUrl : $.table._option.removeUrl.replace("{id}", id);
if($.table._option.type == table_type.bootstrapTreeTable) {
table.set();
$.modal.confirm("确定删除该条" + table.options.modalName + "信息吗?", function() {
var url = $.common.isEmpty(id) ? table.options.removeUrl : table.options.removeUrl.replace("{id}", id);
if(table.options.type == table_type.bootstrapTreeTable) {
$.operate.get(url);
} else {
var data = { "ids": id };
@@ -822,83 +928,91 @@
},
// 批量删除信息
removeAll: function() {
var rows = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
table.set();
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
if (rows.length == 0) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
$.modal.confirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
var url = $.table._option.removeUrl;
var url = table.options.removeUrl;
var data = { "ids": rows.join() };
$.operate.submit(url, "post", "json", data);
});
},
// 清空信息
clean: function() {
$.modal.confirm("确定清空所有" + $.table._option.modalName + "吗?", function() {
var url = $.table._option.cleanUrl;
table.set();
$.modal.confirm("确定清空所有" + table.options.modalName + "吗?", function() {
var url = table.options.cleanUrl;
$.operate.submit(url, "post", "json", "");
});
},
// 添加信息
add: function(id) {
$.modal.open("添加" + $.table._option.modalName, $.operate.addUrl(id));
table.set();
$.modal.open("添加" + table.options.modalName, $.operate.addUrl(id));
},
// 添加信息,以tab页展现
addTab: function (id) {
$.modal.openTab("添加" + $.table._option.modalName, $.operate.addUrl(id));
table.set();
$.modal.openTab("添加" + table.options.modalName, $.operate.addUrl(id));
},
// 添加信息 全屏
addFull: function(id) {
var url = $.common.isEmpty(id) ? $.table._option.createUrl : $.table._option.createUrl.replace("{id}", id);
$.modal.openFull("添加" + $.table._option.modalName, url);
table.set();
var url = $.common.isEmpty(id) ? table.options.createUrl : table.options.createUrl.replace("{id}", id);
$.modal.openFull("添加" + table.options.modalName, url);
},
// 添加访问地址
addUrl: function(id) {
var url = $.common.isEmpty(id) ? $.table._option.createUrl.replace("{id}", "") : $.table._option.createUrl.replace("{id}", id);
var url = $.common.isEmpty(id) ? table.options.createUrl.replace("{id}", "") : table.options.createUrl.replace("{id}", id);
return url;
},
// 修改信息
edit: function(id) {
if($.common.isEmpty(id) && $.table._option.type == table_type.bootstrapTreeTable) {
var row = $.bttTable.bootstrapTreeTable('getSelections')[0];
table.set();
if($.common.isEmpty(id) && table.options.type == table_type.bootstrapTreeTable) {
var row = $("#" + table.options.id).bootstrapTreeTable('getSelections')[0];
if ($.common.isEmpty(row)) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
var url = $.table._option.updateUrl.replace("{id}", row[$.table._option.uniqueId]);
$.modal.open("修改" + $.table._option.modalName, url);
var url = table.options.updateUrl.replace("{id}", row[table.options.uniqueId]);
$.modal.open("修改" + table.options.modalName, url);
} else {
$.modal.open("修改" + $.table._option.modalName, $.operate.editUrl(id));
$.modal.open("修改" + table.options.modalName, $.operate.editUrl(id));
}
},
// 修改信息,以tab页展现
editTab: function(id) {
$.modal.openTab("修改" + $.table._option.modalName, $.operate.editUrl(id));
table.set();
$.modal.openTab("修改" + table.options.modalName, $.operate.editUrl(id));
},
// 修改信息 全屏
editFull: function(id) {
table.set();
var url = "/404.html";
if ($.common.isNotEmpty(id)) {
url = $.table._option.updateUrl.replace("{id}", id);
url = table.options.updateUrl.replace("{id}", id);
} else {
var row = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
url = $.table._option.updateUrl.replace("{id}", row);
var row = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
url = table.options.updateUrl.replace("{id}", row);
}
$.modal.openFull("修改" + $.table._option.modalName, url);
$.modal.openFull("修改" + table.options.modalName, url);
},
// 修改访问地址
editUrl: function(id) {
var url = "/404.html";
if ($.common.isNotEmpty(id)) {
url = $.table._option.updateUrl.replace("{id}", id);
url = table.options.updateUrl.replace("{id}", id);
} else {
var id = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
var id = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
if (id.length == 0) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
url = $.table._option.updateUrl.replace("{id}", id);
url = table.options.updateUrl.replace("{id}", id);
}
return url;
},
@@ -969,10 +1083,10 @@
},
// 保存结果弹出msg刷新table表格
ajaxSuccess: function (result) {
if (result.code == web_status.SUCCESS && $.table._option.type == table_type.bootstrapTable) {
if (result.code == web_status.SUCCESS && table.options.type == table_type.bootstrapTable) {
$.modal.msgSuccess(result.msg);
$.table.refresh();
} else if (result.code == web_status.SUCCESS && $.table._option.type == table_type.bootstrapTreeTable) {
} else if (result.code == web_status.SUCCESS && table.options.type == table_type.bootstrapTreeTable) {
$.modal.msgSuccess(result.msg);
$.treeTable.refresh();
} else if (result.code == web_status.WARNING) {
@@ -997,11 +1111,11 @@
successCallback: function(result) {
if (result.code == web_status.SUCCESS) {
var parent = window.parent;
if (parent.$.table._option.type == table_type.bootstrapTable) {
if (parent.table.options.type == table_type.bootstrapTable) {
$.modal.close();
parent.$.modal.msgSuccess(result.msg);
parent.$.table.refresh();
} else if (parent.$.table._option.type == table_type.bootstrapTreeTable) {
} else if (parent.table.options.type == table_type.bootstrapTreeTable) {
$.modal.close();
parent.$.modal.msgSuccess(result.msg);
parent.$.treeTable.refresh();
@@ -1025,9 +1139,9 @@
$.modal.close();
$contentWindow.$.modal.msgSuccess(result.msg);
$contentWindow.$(".layui-layer-padding").removeAttr("style");
if ($contentWindow.$.table._option.type == table_type.bootstrapTable) {
if ($contentWindow.table.options.type == table_type.bootstrapTable) {
$contentWindow.$.table.refresh();
} else if ($contentWindow.$.table._option.type == table_type.bootstrapTreeTable) {
} else if ($contentWindow.table.options.type == table_type.bootstrapTreeTable) {
$contentWindow.$.treeTable.refresh();
}
$.modal.closeTab();
@@ -1052,6 +1166,11 @@
form: function (formId) {
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
return $("#" + currentId).validate().form();
},
// 重置表单验证(清除提示信息)
reset: function (formId) {
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
return $("#" + currentId).validate().resetForm();
}
},
// 树插件封装处理
@@ -1190,6 +1309,10 @@
// 不允许根父节点选择
notAllowParents: function(_tree) {
var nodes = _tree.getSelectedNodes();
if(nodes.length == 0){
$.modal.msgError("请选择节点后提交");
return false;
}
for (var i = 0; i < nodes.length; i++) {
if (nodes[i].level == 0) {
$.modal.msgError("不能选择根节点(" + nodes[i].name + "");
@@ -1329,9 +1452,23 @@
formToJSON: function(formId) {
var json = {};
$.each($("#" + formId).serializeArray(), function(i, field) {
json[field.name] = field.value;
if(json[field.name]) {
json[field.name] += ("," + field.value);
} else {
json[field.name] = field.value;
}
});
return json;
},
// 获取obj对象长度
getLength: function(obj) {
var count = 0;  
for (var i in obj) {
if (obj.hasOwnProperty(i)) {
count++;
}  
}
return count;
}
}
});
@@ -99,7 +99,7 @@
<hr>
<div class="form-group">
<label class="font-noraml">相关参数详细信息</label>
<div><a href="http://doc.ruoyi.vip/#/standard/zjwd?id=bootstrap-suggest" target="_blank">http://doc.ruoyi.vip/#/standard/zjwd?id=bootstrap-suggest</a></div>
<div><a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-suggest" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-suggest</a></div>
</div>
</div>
</div>
@@ -145,7 +145,7 @@
<hr>
<div class="form-group">
<label class="font-noraml">相关参数详细信息</label>
<div><a href="http://doc.ruoyi.vip/#/standard/zjwd?id=bootstrap-typeahead" target="_blank">http://doc.ruoyi.vip/#/standard/zjwd?id=bootstrap-typeahead</a></div>
<div><a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-typeahead" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-typeahead</a></div>
</div>
</div>
</div>
@@ -57,7 +57,7 @@
<hr>
<div class="form-group">
<label class="font-noraml">相关参数详细信息</label>
<div><a href="http://doc.ruoyi.vip/#/standard/zjwd?id=bootstrap-datetimepicker" target="_blank">http://doc.ruoyi.vip/#/standard/zjwd?id=bootstrap-datetimepicker</a></div>
<div><a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-datetimepicker" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-datetimepicker</a></div>
</div>
</div>
</div>
@@ -111,7 +111,7 @@
<hr>
<div class="form-group">
<label class="font-noraml">相关参数详细信息</label>
<div><a href="http://doc.ruoyi.vip/#/standard/zjwd?id=laydate" target="_blank">http://doc.ruoyi.vip/#/standard/zjwd?id=laydate</a></div>
<div><a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#laydate" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#laydate</a></div>
</div>
</div>
</div>
@@ -33,6 +33,11 @@
<option value="12">若依12</option>
</select>
</form>
<hr>
<div class="form-group">
<label class="font-noraml">相关参数详细信息</label>
<div><a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-duallistbox" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-duallistbox</a></div>
</div>
</div>
</div>
</div>
@@ -62,7 +62,7 @@
<hr>
<div class="form-group">
<label class="font-noraml">相关参数详细信息</label>
<div><a href="http://doc.ruoyi.vip/#/standard/zjwd?id=jasny-bootstrap" target="_blank">http://doc.ruoyi.vip/#/standard/zjwd?id=jasny-bootstrap</a></div>
<div><a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#jasny-bootstrap" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#jasny-bootstrap</a></div>
</div>
</div>
</div>
@@ -105,7 +105,7 @@
<hr>
<div class="form-group">
<label class="font-noraml">相关参数详细信息</label>
<div><a href="http://doc.ruoyi.vip/#/standard/zjwd?id=jasny-bootstrap" target="_blank">http://doc.ruoyi.vip/#/standard/zjwd?id=jasny-bootstrap</a></div>
<div><a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#jasny-bootstrap" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#jasny-bootstrap</a></div>
</div>
</div>
</div>
@@ -69,7 +69,7 @@
<hr>
<div class="form-group">
<label class="font-noraml">相关参数详细信息</label>
<div><a href="http://doc.ruoyi.vip/#/standard/zjwd?id=select2" target="_blank">http://doc.ruoyi.vip/#/standard/zjwd?id=select2</a></div>
<div><a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#select2" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#select2</a></div>
</div>
</div>
</div>
@@ -133,7 +133,7 @@
<hr>
<div class="form-group">
<label class="font-noraml">相关参数详细信息</label>
<div><a href="http://doc.ruoyi.vip/#/standard/zjwd?id=bootstrap-select" target="_blank">http://doc.ruoyi.vip/#/standard/zjwd?id=bootstrap-select</a></div>
<div><a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-select" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-select</a></div>
</div>
</div>
</div>
@@ -17,7 +17,7 @@
<h2>若依后台管理系统</h2>
<p>ruoyi是一个完全响应式,基于Bootstrap3.3.6最新版本开发的扁平化主题,她采用了主流的左右两栏式布局,使用了Html5+CSS3等现代技术,她提供了诸多的强大的可以重新组合的UI组件,并集成了最新的jQuery版本(v2.1.1),当然,也集成了很多功能强大,用途广泛的就jQuery插件,她可以用于所有的Web应用程序,如<b>网站管理后台</b><b>网站会员中心</b><b>CMS</b><b>CRM</b><b>OA</b>等等,当然,您也可以对她进行深度定制,以做出更强系统。</p>
<p>
<b>当前版本:</b>v4.0.0
<b>当前版本:</b>v4.1.0
</p>
<p>
<span class="label label-warning">免费开源</span>
@@ -56,7 +56,7 @@
<h3>你好,若依 </h3>
<p>H+是一个完全响应式,基于Bootstrap3.3.6最新版本开发的扁平化主题,她采用了主流的左右两栏式布局,使用了Html5+CSS3等现代技术,她提供了诸多的强大的可以重新组合的UI组件,并集成了最新的jQuery版本(v2.1.1),当然,也集成了很多功能强大,用途广泛的就jQuery插件,她可以用于所有的Web应用程序,如<b>网站管理后台</b><b>网站会员中心</b><b>CMS</b><b>CRM</b><b>OA</b>等等,当然,您也可以对她进行深度定制,以做出更强系统。</p>
<p>
<b>当前版本:</b>v4.0.0
<b>当前版本:</b>v4.1.0
</p>
<p>
<span class="label label-warning">开源免费</span>
@@ -0,0 +1,113 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>时间轴</title>
<link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
<link href="../static/css/main/animate.min.css" th:href="@{/css/main/animate.min.css}" rel="stylesheet"/>
<link th:href="@{/css/style.css}" rel="stylesheet"/>
</head>
<body class="gray-bg">
<div class="row animated fadeInRight">
<div class="ibox float-e-margins">
<div class="text-center float-e-margins p-md">
<span>打开/关闭颜色/背景或方向版本: </span>
<a href="#" class="btn btn-xs btn-primary" id="lightVersion">轻型版本 </a>
<a href="#" class="btn btn-xs btn-primary" id="darkVersion">黑色版本 </a>
</div>
<div id="ibox-content">
<div id="vertical-timeline" class="vertical-container light-timeline">
<div class="vertical-timeline-block">
<div class="vertical-timeline-icon navy-bg">
<i class="fa fa-briefcase"></i>
</div>
<div class="vertical-timeline-content">
<h2>会议</h2>
<p>上一年的销售业绩发布会。总结产品营销和销售趋势及销售的现状。
</p>
<a href="#" class="btn btn-sm btn-primary"> 更多信息</a>
<span class="vertical-date">
今天 <br>
<small>2月3日</small>
</span>
</div>
</div>
<div class="vertical-timeline-block">
<div class="vertical-timeline-icon blue-bg">
<i class="fa fa-file-text"></i>
</div>
<div class="vertical-timeline-content">
<h2>给张三发送文档</h2>
<p>发送上年度《销售业绩报告》</p>
<a href="#" class="btn btn-sm btn-success"> 下载文档 </a>
<span class="vertical-date">
今天 <br>
<small>2月3日</small>
</span>
</div>
</div>
<div class="vertical-timeline-block">
<div class="vertical-timeline-icon lazur-bg">
<i class="fa fa-coffee"></i>
</div>
<div class="vertical-timeline-content">
<h2>喝咖啡休息</h2>
<p>喝咖啡啦,啦啦啦~~</p>
<a href="#" class="btn btn-sm btn-info">更多</a>
<span class="vertical-date"> 昨天 <br><small>2月2日</small></span>
</div>
</div>
<div class="vertical-timeline-block">
<div class="vertical-timeline-icon yellow-bg">
<i class="fa fa-phone"></i>
</div>
<div class="vertical-timeline-content">
<h2>给李四打电话</h2>
<p>给李四打电话分配本月工作任务</p>
<span class="vertical-date">昨天 <br><small>2月2日</small></span>
</div>
</div>
<div class="vertical-timeline-block">
<div class="vertical-timeline-icon lazur-bg">
<i class="fa fa-user-md"></i>
</div>
<div class="vertical-timeline-content">
<h2>公司年会</h2>
<p>发年终奖啦,啦啦啦~~</p>
<span class="vertical-date">前天 <br><small>2月1日</small></span>
</div>
</div>
</div>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script>
$(document).ready(function(){
$('#lightVersion').click(function(event) {
event.preventDefault()
$('#ibox-content').removeClass('ibox-content');
$('#vertical-timeline').removeClass('dark-timeline');
$('#vertical-timeline').addClass('light-timeline');
});
$('#darkVersion').click(function(event) {
event.preventDefault()
$('#ibox-content').addClass('ibox-content');
$('#vertical-timeline').removeClass('light-timeline');
$('#vertical-timeline').addClass('dark-timeline');
});
});
</script>
</body>
</html>
@@ -29,7 +29,7 @@
<hr>
<div class="form-group">
<label class="font-noraml">相关参数详细信息</label>
<div><a href="http://doc.ruoyi.vip/#/standard/zjwd?id=jasny-bootstrap" target="_blank">http://doc.ruoyi.vip/#/standard/zjwd?id=jasny-bootstrap</a></div>
<div><a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-fileinput" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#bootstrap-fileinput</a></div>
</div>
</div>
</div>
@@ -71,7 +71,7 @@
<div class="ibox-content">
<p class="m-t">更多示例请访问官方示例页面:<a href="http://jqueryvalidation.org/files/demo/" target="_blank">查看</a>
</p>
<p>中文API可参考:<a href="http://doc.ruoyi.vip/#/standard/zjwd?id=jquery-validate" target="_blank">http://doc.ruoyi.vip/#/standard/zjwd?id=jquery-validate</a>
<p>中文API可参考:<a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#jquery-validate" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#jquery-validate</a>
</p>
</div>
</div>
@@ -7,7 +7,7 @@
<div class="container-div">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -7,7 +7,7 @@
<div class="container-div">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -7,7 +7,7 @@
<div class="container-div">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -30,7 +30,7 @@
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -180,33 +180,6 @@
</div>
</div>
</div>
<div class="col-sm-6">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>和弦图</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="graph_flot.html#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="graph_flot.html#">选项1</a>
</li>
<li><a href="graph_flot.html#">选项2</a>
</li>
</ul>
<a class="close-link">
<i class="fa fa-times"></i>
</a>
</div>
</div>
<div class="ibox-content">
<div class="echarts" id="echarts-chord-chart"></div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="ibox float-e-margins">
<div class="ibox-title">
@@ -261,33 +234,6 @@
</div>
</div>
</div>
<div class="col-sm-6">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>力导向布局图</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="graph_flot.html#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="graph_flot.html#">选项1</a>
</li>
<li><a href="graph_flot.html#">选项2</a>
</li>
</ul>
<a class="close-link">
<i class="fa fa-times"></i>
</a>
</div>
</div>
<div class="ibox-content">
<div class="echarts" id="echarts-force-chart"></div>
</div>
</div>
</div>
</div>
<div class="row">
@@ -1065,182 +1011,6 @@
mapChart.setOption(mapoption);
$(window).resize(mapChart.resize);
var chordChart = echarts.init(document.getElementById("echarts-chord-chart"));
var chordoption = {
title : {
text: '测试数据',
subtext: 'From d3.js',
x:'right',
y:'bottom'
},
tooltip : {
trigger: 'item',
formatter: function (params) {
if (params.indicator2) { // is edge
return params.value.weight;
} else {// is node
return params.name
}
}
},
toolbox: {
show : true,
feature : {
restore : {show: true},
magicType: {show: true, type: ['force', 'chord']},
saveAsImage : {show: true}
}
},
legend: {
x: 'left',
data:['group1','group2', 'group3', 'group4']
},
series : [
{
type:'chord',
sort : 'ascending',
sortSub : 'descending',
showScale : true,
showScaleText : true,
data : [
{name : 'group1'},
{name : 'group2'},
{name : 'group3'},
{name : 'group4'}
],
itemStyle : {
normal : {
label : {
show : false
}
}
},
matrix : [
[11975, 5871, 8916, 2868],
[ 1951, 10048, 2060, 6171],
[ 8010, 16145, 8090, 8045],
[ 1013, 990, 940, 6907]
]
}
]
};
chordChart.setOption(chordoption);
$(window).resize(chordChart.resize);
var forceChart = echarts.init(document.getElementById("echarts-force-chart"));
var forceoption ={
title : {
text: '人物关系:乔布斯',
subtext: '数据来自人立方',
x:'right',
y:'bottom'
},
tooltip : {
trigger: 'item',
formatter: '{a} : {b}'
},
toolbox: {
show : true,
feature : {
restore : {show: true},
magicType: {show: true, type: ['force', 'chord']},
saveAsImage : {show: true}
}
},
legend: {
x: 'left',
data:['家人','朋友']
},
series : [
{
type:'force',
name : "人物关系",
ribbonType: false,
categories : [
{
name: '人物'
},
{
name: '家人'
},
{
name:'朋友'
}
],
itemStyle: {
normal: {
label: {
show: true,
textStyle: {
color: '#333'
}
},
nodeStyle : {
brushType : 'both',
borderColor : 'rgba(255,215,0,0.4)',
borderWidth : 1
},
linkStyle: {
type: 'curve'
}
},
emphasis: {
label: {
show: false
// textStyle: null // 默认使用全局文本样式,详见TEXTSTYLE
},
nodeStyle : {
//r: 30
},
linkStyle : {}
}
},
useWorker: false,
minRadius : 15,
maxRadius : 25,
gravity: 1.1,
scaling: 1.1,
roam: 'move',
nodes:[
{category:0, name: '乔布斯', value : 10},
{category:1, name: '丽萨-乔布斯',value : 2},
{category:1, name: '保罗-乔布斯',value : 3},
{category:1, name: '克拉拉-乔布斯',value : 3},
{category:1, name: '劳伦-鲍威尔',value : 7},
{category:2, name: '史蒂夫-沃兹尼艾克',value : 5},
{category:2, name: '奥巴马',value : 8},
{category:2, name: '比尔-盖茨',value : 9},
{category:2, name: '乔纳森-艾夫',value : 4},
{category:2, name: '蒂姆-库克',value : 4},
{category:2, name: '龙-韦恩',value : 1},
],
links : [
{source : '丽萨-乔布斯', target : '乔布斯', weight : 1, name: '女儿'},
{source : '保罗-乔布斯', target : '乔布斯', weight : 2, name: '父亲'},
{source : '克拉拉-乔布斯', target : '乔布斯', weight : 1, name: '母亲'},
{source : '劳伦-鲍威尔', target : '乔布斯', weight : 2},
{source : '史蒂夫-沃兹尼艾克', target : '乔布斯', weight : 3, name: '合伙人'},
{source : '奥巴马', target : '乔布斯', weight : 1},
{source : '比尔-盖茨', target : '乔布斯', weight : 6, name: '竞争对手'},
{source : '乔纳森-艾夫', target : '乔布斯', weight : 1, name: '爱将'},
{source : '蒂姆-库克', target : '乔布斯', weight : 1},
{source : '龙-韦恩', target : '乔布斯', weight : 1},
{source : '克拉拉-乔布斯', target : '保罗-乔布斯', weight : 1},
{source : '奥巴马', target : '保罗-乔布斯', weight : 1},
{source : '奥巴马', target : '克拉拉-乔布斯', weight : 1},
{source : '奥巴马', target : '劳伦-鲍威尔', weight : 1},
{source : '奥巴马', target : '史蒂夫-沃兹尼艾克', weight : 1},
{source : '比尔-盖茨', target : '奥巴马', weight : 6},
{source : '比尔-盖茨', target : '克拉拉-乔布斯', weight : 1},
{source : '蒂姆-库克', target : '奥巴马', weight : 1}
]
}
]
};
forceChart.setOption(forceoption);
$(window).resize(forceChart.resize);
var gaugeChart = echarts.init(document.getElementById("echarts-gauge-chart"));
var gaugeoption = {
tooltip : {
@@ -23,7 +23,7 @@
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -0,0 +1,113 @@
<!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,
detailView: true,
onExpandRow : function(index, row, $detail) {
initChildTable(index, row, $detail);
},
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);
});
initChildTable = function(index, row, $detail) {
var cur_table = $detail.html('<table style="table-layout:fixed"></table>').find('table');
$(cur_table).bootstrapTable({
url: prefix + "/list",
method: 'post',
sidePagination: "server",
contentType: "application/x-www-form-urlencoded", // 编码类型
queryParams : {
userName: '测试8'
},
columns: [{
field : 'userId',
title : '子表ID'
},
{
field : 'userCode',
title : '子表编号'
},
{
field : 'userName',
title : '子表姓名'
},
{
field: 'status',
title: '子表状态',
align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(datas, value);
}
}]
});
};
</script>
</body>
</html>
@@ -15,7 +15,7 @@
<a class="btn btn-danger" onclick="removeRowByUniqueId()">
<i class="fa fa-remove"></i> 根据值删除行
</a>
<a class="btn btn-danger" onclick="removeRowAll()">
<a class="btn btn-danger" onclick="removeRowAll()">
<i class="fa fa-remove"></i> 删除所有行
</a>
<a class="btn btn-info" onclick="updateRow()">
@@ -36,7 +36,7 @@
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -88,7 +88,7 @@
/* 新增表格行 */
function insertRow(){
var randomId = 100 + ~~(Math.random() * 100)
$.btTable.bootstrapTable('insertRow', {
$("#" + table.options.id).bootstrapTable('insertRow', {
index: 0, // 你想插入到哪,0表示第一行
row: {
userId: randomId,
@@ -108,7 +108,7 @@
$.modal.alertWarning("请至少选择一条记录");
return;
}
$.btTable.bootstrapTable('remove', {
$("#" + table.options.id).bootstrapTable('remove', {
field: 'userId',
values: ids
})
@@ -116,18 +116,18 @@
/* 删除行ID值为1的数据 */
function removeRowByUniqueId(){
$.btTable.bootstrapTable('removeByUniqueId', 1)
$("#" + table.options.id).bootstrapTable('removeByUniqueId', 1)
}
/* 删除所有表格行 */
function removeRowAll(){
$.btTable.bootstrapTable('removeAll')
$("#" + table.options.id).bootstrapTable('removeAll')
}
/* 修改表格行 */
function updateRow(){
var randomId = 100 + ~~(Math.random() * 100)
$.btTable.bootstrapTable('updateRow', {
$("#" + table.options.id).bootstrapTable('updateRow', {
index: 0, // 你想修改哪行,0表示第一行
row: {
userId: randomId,
@@ -143,7 +143,7 @@
/* 修改行ID值为1的数据 */
function updateRowByUniqueId(){
var randomId = 100 + ~~(Math.random() * 100)
$.btTable.bootstrapTable('updateByUniqueId', {
$("#" + table.options.id).bootstrapTable('updateByUniqueId', {
id: 1,
row: {
userId: randomId,
@@ -158,19 +158,19 @@
/* 查询表格所有数据值 */
function getData(){
var data = $.btTable.bootstrapTable('getData');
var data = $("#" + table.options.id).bootstrapTable('getData');
alert(JSON.stringify(data))
}
/* 查询行ID值为1的数据 */
function getRowByUniqueId(){
var data = $.btTable.bootstrapTable('getRowByUniqueId', 1);
var data = $("#" + table.options.id).bootstrapTable('getRowByUniqueId', 1);
alert(JSON.stringify(data))
}
/* 查询表格选择行数据值 */
function getSelections(){
var data = $.btTable.bootstrapTable('getSelections');
var data = $("#" + table.options.id).bootstrapTable('getSelections');
alert(JSON.stringify(data))
}
</script>
@@ -1,13 +1,13 @@
<!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('跳转至指定页')" />
<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" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -0,0 +1,128 @@
<!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('表格行内编辑')" />
<th:block th:include="include :: bootstrap-editable-css" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-info" onclick="getSelections()">
<i class="fa fa-search"></i> 查询选择数据
</a>
<a class="btn btn-primary" onclick="getData()">
<i class="fa fa-search"></i> 获取所有数据
</a>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-table-editable-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,
showPageGo: true,
onEditableSave: onEditableSave,
columns: [{
checkbox: true
},
{
field : 'userId',
title : '用户ID'
},
{
field : 'userCode',
title : '用户编号',
editable: true
},
{
field : 'userName',
title : '用户姓名',
editable : {
type : 'text',
title : '名称',
emptytext : "【名称】为空",
validate : function(value) {
if (value.length > 30) {
return '名称不能超过30个字符';
}
if (value.length == 0) {
return '名称不能为空';
}
}
}
},
{
field : 'userPhone',
title : '用户手机'
},
{
field : 'userEmail',
title : '用户邮箱'
},
{
field : 'userBalance',
title : '用户余额'
},
{
field: 'status',
title: '用户状态',
align: 'center',
editable : {
type : 'select',
title : '状态',
source : [{
value : 0,
text : "正常"
}, {
value : 1,
text : "停用"
}]
}
},
{
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 onEditableSave (field, row, oldValue, $el) {
alert("字段名:" + field + ",当前值:" + row[field] + ",旧值:" + oldValue);
}
/* 查询表格所有数据值 */
function getData(){
var data = $("#" + table.options.id).bootstrapTable('getData');
alert(JSON.stringify(data))
}
/* 查询表格选择行数据值 */
function getSelections(){
var data = $("#" + table.options.id).bootstrapTable('getSelections');
alert(JSON.stringify(data))
}
</script>
</body>
</html>
@@ -8,7 +8,7 @@
<div class="row">
<div class="col-sm-12 select-table table-striped">
<p class="select-title">自定义触发事件(点击某行/双击某行/单击某格/双击某格/服务器发送数据前触发/数据被加载时触发)</p>
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -7,7 +7,7 @@
<div class="container-div">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -18,7 +18,7 @@
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -7,7 +7,7 @@
<div class="container-div">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -7,7 +7,7 @@
<div class="container-div">
<div class="row">
<div class="col-sm-12 select-table table-bordered">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -7,7 +7,7 @@
<div class="container-div">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -4,35 +4,94 @@
<th:block th:include="include :: header('初始多表格')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="form1">
<div class="select-list">
<ul>
<li>
用户名称:<input type="text" name="userName"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search('form1', 'bootstrap-table1')"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('form1', 'bootstrap-table1')"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar1" role="group">
<a class="btn btn-success" onclick="options1()">
<i class="fa fa-search"></i> options
</a>
<a class="btn btn-success" onclick="$.operate.add()">
<i class="fa fa-plus"></i> 新增
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
<i class="fa fa-remove"></i> 删除
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table-1" data-mobile-responsive="true"></table>
<table id="bootstrap-table1"></table>
</div>
</div>
<div class="row">
</div>
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="form2">
<div class="select-list">
<ul>
<li>
用户名称:<input type="text" name="userName"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search('form2', 'bootstrap-table2')"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('form2', 'bootstrap-table2')"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar2" role="group">
<a class="btn btn-success" onclick="options2()">
<i class="fa fa-search"></i> options
</a>
<a class="btn btn-success" onclick="$.operate.add()">
<i class="fa fa-plus"></i> 新增
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
<i class="fa fa-remove"></i> 删除
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table-2" data-mobile-responsive="true"></table>
<table id="bootstrap-table2"></table>
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
var prefix = ctx + "demo/table";
var prefix = ctx + "demo/operate";
var datas = [[${@dict.getType('sys_normal_disable')}]];
$(function() {
var options = {
id: "bootstrap-table-1",
id: "bootstrap-table1",
toolbar: "toolbar1",
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
updateUrl: prefix + "/edit/{id}",
modalName: "用户",
columns: [{
checkbox: true
},
@@ -73,8 +132,8 @@
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>');
actions.push('<a class="btn btn-success btn-xs" href="###" onclick="$.operate.edit(\'' + row.userId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs" href="###" onclick="$.operate.remove(\'' + row.userId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
@@ -82,21 +141,16 @@
$.table.init(options);
});
function queryParams(params) {
var search = $.table.queryParams(params);
search.userName = '测试1';
return search;
}
$(function() {
var options = {
id: "bootstrap-table-2",
id: "bootstrap-table2",
toolbar: "toolbar2",
url: prefix + "/list",
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
queryParams: queryParams,
createUrl: prefix + "/add",
removeUrl: prefix + "/remove",
updateUrl: prefix + "/edit/{id}",
modalName: "用户",
columns: [{
checkbox: true
},
@@ -137,14 +191,32 @@
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>');
actions.push('<a class="btn btn-success btn-xs" href="###" onclick="$.operate.edit(\'' + row.userId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs" href="###" onclick="$.operate.remove(\'' + row.userId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
function options1() {
var temp = "";
var obj = table.config['bootstrap-table1'];
for (var i in obj) {
temp += i + ":" + obj[i] + "<br/>";
}
$.modal.alert(temp);
}
function options2() {
var temp = "";
var obj = table.config['bootstrap-table2'];
for (var i in obj) {
temp += i + ":" + obj[i] + "<br/>";
}
$.modal.alert(temp);
}
</script>
</body>
</html>
@@ -27,7 +27,7 @@
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -7,7 +7,7 @@
<div class="container-div">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -8,7 +8,7 @@
<div class="row">
<div class="col-sm-12 select-table table-striped">
<p class="select-title">通过queryParams方法设置</p>
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
<div class="col-sm-12 search-collapse">
@@ -24,7 +24,7 @@
</div>
<div class="col-sm-12 select-table table-striped">
<p class="select-title">通过form自动填充</p>
<table id="bootstrap-table-form" data-mobile-responsive="true"></table>
<table id="bootstrap-table-form"></table>
</div>
</div>
</div>
@@ -12,7 +12,7 @@
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -24,10 +24,6 @@
$(function() {
var options = {
url: prefix + "/list",
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
rememberSelected: true,
columns: [{
field: 'state',
@@ -81,7 +77,8 @@
// 选中数据
function checkItem(){
var arrays = $.table.selectColumns("userId");
// var arrays = $.table.selectColumns("userId");
var arrays = $.table.selectColumns("userCode");
alert(arrays);
}
</script>
@@ -8,7 +8,7 @@
<div class="row">
<div class="col-sm-12 select-table table-striped">
<p class="select-title">按住表格拖拽</p>
<table id="bootstrap-table" data-mobile-responsive="true"
<table id="bootstrap-table"
data-use-row-attr-func="true"
data-reorderable-rows="true"></table>
</div>
@@ -97,19 +97,19 @@
<div class="select-list">
<ul>
<li>
<p>商户编号:</p>
<p style="width: 80px">商户编号:</p>
<input type="text" name="userId"/>
</li>
<li>
<p>订单号:</p>
<p style="width: 80px">订单号:</p>
<input type="text" name="orderNo"/>
</li>
<li>
<p>日期:</p>
<p style="width: 80px">日期:</p>
<input type="text" class="time-input" placeholder="日期"/>
</li>
<li class="select-selectpicker">
<p>状态:</p>
<p style="width: 80px">状态:</p>
<select class="selectpicker" data-none-selected-text="请选择" multiple>
<option value="">所有</option>
<option value="0">初始</option>
@@ -119,7 +119,7 @@
</select>
</li>
<li>
<p>供货商通道:</p>
<p style="width: 80px">供货商通道:</p>
<select>
<option value="">所有</option>
<option value="0">腾讯</option>
@@ -128,7 +128,7 @@
</select>
</li>
<li>
<p>来源:</p>
<p style="width: 80px">来源:</p>
<select>
<option value="">所有</option>
<option value="0">手机</option>
@@ -137,7 +137,7 @@
</select>
</li>
<li>
<p>运营商:</p>
<p style="width: 80px">运营商:</p>
<select>
<option value="">所有</option>
<option value="0">移动</option>
@@ -146,7 +146,7 @@
</select>
</li>
<li class="select-time">
<p>回调时间:</p>
<p style="width: 80px">回调时间:</p>
<input type="text" class="time-input" placeholder="开始时间"/>
<span>-</span>
<input type="text" class="time-input" placeholder="结束时间"/>
@@ -39,8 +39,8 @@
<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
<script th:src="@{/ajax/libs/layui/layui.js}"></script>
<script th:src="@{/ruoyi/js/common.js?v=4.0.0}"></script>
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.0.0}"></script>
<script th:src="@{/ruoyi/js/common.js?v=4.1.0}"></script>
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.1.0}"></script>
<script th:inline="javascript"> var ctx = [[@{/}]]; </script>
</div>
@@ -172,4 +172,13 @@
<div th:fragment="bootstrap-table-reorder-js">
<script th:src="@{/ajax/libs/bootstrap-table/extensions/reorder/bootstrap-table-reorder.js}"></script>
<script th:src="@{/ajax/libs/bootstrap-table/extensions/reorder/jquery.tablednd.js}"></script>
</div>
<!-- 表格行内编辑插件 -->
<div th:fragment="bootstrap-editable-css">
<link th:href="@{/ajax/libs/bootstrap-table/extensions/editable/bootstrap-editable.css}" rel="stylesheet"/>
</div>
<div th:fragment="bootstrap-table-editable-js">
<script th:src="@{/ajax/libs/bootstrap-table/extensions/editable/bootstrap-editable.min.js}"></script>
<script th:src="@{/ajax/libs/bootstrap-table/extensions/editable/bootstrap-table-editable.js}"></script>
</div>
@@ -15,9 +15,9 @@
<link th:href="@{/css/animate.css}" rel="stylesheet"/>
<link th:href="@{/css/style.css}" rel="stylesheet"/>
<link th:href="@{/css/skins.css}" rel="stylesheet"/>
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.0.0}" rel="stylesheet"/>
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.1.0}" rel="stylesheet"/>
</head>
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow: hidden" th:classappend="|${@config.getKey('sys.index.sideTheme')} ${@config.getKey('sys.index.skinName')}|">
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow: hidden">
<div id="wrapper">
<!--左侧导航开始-->
@@ -27,9 +27,11 @@
</div>
<div class="sidebar-collapse">
<ul class="nav" id="side-menu">
<li class="logo">
<span class="logo-lg">RuoYi</span>
</li>
<a th:href="@{/index}">
<li class="logo">
<span class="logo-lg" >RuoYi</span>
</li>
</a>
<li>
<div class="user-panel">
<a class="menuItem" title="个人中心" th:href="@{/system/user/profile}">
@@ -45,10 +47,10 @@
</div>
</div>
</li>
<li class="active">
<a href="index.html"><i class="fa fa-home"></i> <span class="nav-label">主页</span> <span class="fa arrow"></span></a>
<li>
<a href="#"><i class="fa fa-home"></i> <span class="nav-label">主页</span> <span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li class="active"><a class="menuItem" th:href="@{/system/main}">了解若依</a></li>
<li><a class="menuItem" th:href="@{/system/main}">了解若依</a></li>
</ul>
</li>
<li th:each="menu : ${menus}">
@@ -75,6 +77,7 @@
<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>
@@ -103,9 +106,11 @@
<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/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/editable}">表格行内编辑</a></li>
<li><a class="menuItem" th:href="@{/demo/table/other}">表格其他操作</a></li>
</ul>
</li>
@@ -170,7 +175,7 @@
</a>
</div>
<ul class="nav navbar-top-links navbar-right welcome-message">
<li><a title="视频教程" href="http://doc.ruoyi.vip/#/standard/spjc" target="_blank"><i class="fa fa-video-camera"></i> 视频教程</a></li>
<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">
@@ -184,9 +189,13 @@
<i class="fa fa-user"></i> 个人中心</a>
</li>
<li>
<a onclick="resetPwd()" class="menuItem">
<a onclick="resetPwd()">
<i class="fa fa-key"></i> 修改密码</a>
</li>
<li>
<a onclick="switchSkin()">
<i class="fa fa-dashboard"></i> 切换主题</a>
</li>
<li class="divider"></li>
<li>
<a th:href="@{logout}">
@@ -209,7 +218,7 @@
<button class="roll-nav roll-right tabRight">
<i class="fa fa-forward"></i>
</button>
<a href="#" class="roll-nav roll-right tabReload"><i class="fa fa-refresh"></i> 刷新</a>
<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>
@@ -232,16 +241,53 @@
<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.0.0}"></script>
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.1.0}"></script>
<script th:src="@{/ruoyi/js/common.js?v=4.1.0}"></script>
<script th:src="@{/ruoyi/index.js}"></script>
<script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script>
<script th:inline="javascript">
<script th:inline="javascript">
var ctx = [[@{/}]];
/*用户管理-重置密码*/
var skin = storage.get("skin");
// 本地主题优先,未设置取系统配置
if($.common.isNotEmpty(skin)){
$("body").addClass(skin.split('|')[0]);
$("body").addClass(skin.split('|')[1]);
} else {
var sideTheme = [[${@config.getKey('sys.index.sideTheme')}]];
var skinName = [[${@config.getKey('sys.index.skinName')}]];
$("body").addClass(sideTheme);
$("body").addClass(skinName);
}
/* 用户管理-重置密码 */
function resetPwd() {
var url = ctx + 'system/user/profile/resetPwd';
$.modal.open("重置密码", url, '800', '500');
$.modal.open("重置密码", url, '770', '380');
}
/* 切换主题 */
function switchSkin() {
layer.open({
type : 2,
shadeClose : true,
title : "切换主题",
area : ["530px", "386px"],
content : [ctx + "system/switchSkin", 'no']
})
}
// 排除非左侧菜单链接
var excludesUrl = ["/system/user/profile"];
$(function() {
var hash = location.hash;
if (hash !== '') {
var url = hash.substring(1, hash.length);
$('a[href$="' + url + '"]').click();
if($.inArray(url, excludesUrl)){
$('a[href$="' + url + '"]').parent("li").addClass("selected").parents("li").addClass("active").end().parents("ul").addClass("in");
}
}
});
</script>
</body>
</html>
@@ -10,7 +10,7 @@
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
<link href="../static/css/style.css" th:href="@{/css/style.css}" rel="stylesheet"/>
<link href="../static/css/login.min.css" th:href="@{/css/login.min.css}" rel="stylesheet"/>
<link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.0.0}" rel="stylesheet"/>
<link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.1.0}" rel="stylesheet"/>
<!--[if lt IE 9]>
<meta http-equiv="refresh" content="0;ie.html" />
<![endif]-->
@@ -80,7 +80,7 @@
<script src="../static/ajax/libs/validate/messages_zh.min.js" th:src="@{/ajax/libs/validate/messages_zh.min.js}"></script>
<script src="../static/ajax/libs/layer/layer.min.js" th:src="@{/ajax/libs/layer/layer.min.js}"></script>
<script src="../static/ajax/libs/blockUI/jquery.blockUI.js" th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.0.0}"></script>
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.1.0}"></script>
<script src="../static/ruoyi/login.js" th:src="@{/ruoyi/login.js}"></script>
</body>
</html>
@@ -81,7 +81,7 @@
<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>
<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> <a href="https://jq.qq.com/?_wv=1027&k=5fdQ1eG" target="_blank">1145125</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> <a href="https://jq.qq.com/?_wv=1027&k=5IdFWW8" target="_blank">86752435</a>
</p>
<p><i class="fa fa-weixin"></i> 微信:<a href="javascript:;">/ *若依</a>
</p>
@@ -98,13 +98,60 @@
<div class="ibox-content no-padding">
<div class="panel-body">
<div class="panel-group" id="version">
<div class="panel panel-default">
<div class="panel-heading">
<h5 class="panel-title">
<a data-toggle="collapse" data-parent="#version" href="#v41">v4.1.0</a><code class="pull-right">2019.10.22</code>
</h5>
</div>
<div id="v41" class="panel-collapse collapse in">
<div class="panel-body">
<ol>
<li>支持多表格实例操作</li>
<li>浮动提示方法tooltip支持弹窗</li>
<li>代码生成&字典数据支持模糊条件查询</li>
<li>增加页签全屏方法</li>
<li>增加清除表单验证错误信息方法</li>
<li>支持iframe局部刷新页面</li>
<li>支持在线切换主题</li>
<li>修改图片预览设置的高宽参数颠倒问题</li>
<li>操作日志新增解锁账户功能</li>
<li>管理员用户&角色不允许操作</li>
<li>去掉jsoup包调用自定义转义工具</li>
<li>添加时间轴示例</li>
<li>修复翻页记住选择时获取指定列值的问题</li>
<li>代码生成sql脚本添加导出按钮</li>
<li>添加表格父子视图示例</li>
<li>添加表格行内编辑示例</li>
<li>升级fastjson到最新版1.2.60 阻止漏洞攻击</li>
<li>升级echarts到最新版4.2.1</li>
<li>操作日志新增返回参数</li>
<li>支持mybatis通配符扫描任意多个包</li>
<li>权限验证多种情况处理</li>
<li>修复树形类型的代码生成的部分必要属性无法显示</li>
<li>修复非表格插件情况下重置出现异常</li>
<li>修复富文本编辑器有序列表冲突</li>
<li>代码生成表前缀配置支持多个</li>
<li>修复自动去除表前缀配置无效问题</li>
<li>菜单列表按钮数据可见不显示(权限标识控制)</li>
<li>修复设置会话超时时间无效问题</li>
<li>新增本地资源通用下载方法</li>
<li>操作日志记录新增请求方式</li>
<li>代码生成单选按钮属性重名修复</li>
<li>优化select2下拉框宽度不会随浏览器改变</li>
<li>修复代码生成树表异常</li>
<li>其他细节优化</li>
</ol>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h5 class="panel-title">
<a data-toggle="collapse" data-parent="#version" href="#v40">v4.0.0</a><code class="pull-right">2019.08.08</code>
</h5>
</div>
<div id="v40" class="panel-collapse collapse in">
<div id="v40" class="panel-collapse collapse">
<div class="panel-body">
<ol>
<li>代码生成支持预览、编辑,保存方案</li>
@@ -44,13 +44,16 @@
<a class="btn btn-danger" onclick="$.operate.clean()" shiro:hasPermission="monitor:logininfor:remove">
<i class="fa fa-trash"></i> 清空
</a>
<a class="btn btn-primary single disabled" onclick="unlock()" shiro:hasPermission="monitor:logininfor:unlock">
<i class="fa fa-unlock"></i> 解锁
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="monitor:logininfor:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -121,6 +124,10 @@
};
$.table.init(options);
});
function unlock() {
$.operate.post(prefix + "/unlock?loginName=" + $.table.selectColumns("loginName"));
}
</script>
</body>
</html>
@@ -14,7 +14,7 @@
登录地址:<input type="text" name="ipaddr"/>
</li>
<li>
操作人员<input type="text" name="loginName"/>
登录名称<input type="text" name="loginName"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
@@ -32,7 +32,7 @@
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -22,6 +22,11 @@
<div class="form-control-static" th:text="${operLog.operUrl}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">请求方式:</label>
<div class="form-control-static" th:text="${operLog.requestMethod}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">操作方法:</label>
<div class="form-control-static" th:text="${operLog.method}">
@@ -31,6 +36,10 @@
<label class="col-sm-2 control-label">请求参数:</label>
<div class="form-control-static"><pre id="operParam"></pre></div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">返回参数:</label>
<div class="form-control-static"><pre id="jsonResult"></pre></div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">状态:</label>
<div class="form-control-static" th:class="${operLog.status == 0 ? 'label label-primary' : 'label label-danger'}" th:text="${operLog.status == 0 ? '正常' : '异常'}">
@@ -47,11 +56,17 @@
<th:block th:include="include :: jsonview-js" />
<script th:inline="javascript">
$(function() {
var json = [[${operLog.operParam}]];
if ($.common.isNotEmpty(json) && json.length < 2000) {
$("#operParam").JSONView(json);
var operParam = [[${operLog.operParam}]];
if ($.common.isNotEmpty(operParam) && operParam.length < 2000) {
$("#operParam").JSONView(operParam);
} else {
$("#operParam").text(json);
$("#operParam").text(operParam);
}
var jsonResult = [[${operLog.jsonResult}]];
if ($.common.isNotEmpty(jsonResult) && jsonResult.length < 2000) {
$("#jsonResult").JSONView(jsonResult);
} else {
$("#jsonResult").text(jsonResult);
}
});
</script>
@@ -56,7 +56,7 @@
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -151,7 +151,7 @@
function searchPre() {
var data = {};
data.businessTypes = $.common.join($('#businessTypes').selectpicker('val'));
$.table.search('operlog-form', data);
$.table.search('operlog-form', 'bootstrap-table', data);
}
function resetPre() {
@@ -0,0 +1,146 @@
<!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>
<!--[if lt IE 9]>
<meta http-equiv="refresh" content="0;ie.html"/>
<![endif]-->
<link rel="shortcut icon" href="../static/favicon.ico" th:href="@{favicon.ico}"/>
<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
<link th:href="@{/css/style.css}" rel="stylesheet"/>
<style type="text/css">
.list-unstyled{margin:10px;}
.full-opacity-hover{opacity:1;filter:alpha(opacity=1);border:1px solid #fff}
.full-opacity-hover:hover{border:1px solid #f00;}
</style>
</head>
<body class="gray-bg">
<ul class="list-unstyled clearfix">
<li style="float:left; width: 33.33333%; padding: 5px;">
<a href="javascript:" data-skin="skin-blue|theme-dark" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
<span style="width: 20%; float: left; height: 13px; background: #367fa9"></span>
<span style="width: 80%; float: left; height: 13px; background: #3c8dbc"></span>
<span style="width: 20%; float: left; height: 30px; background: #2f4050"></span>
<span style="width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
</a>
<p class="text-center"></p>
</li>
<li style="float:left; width: 33.33333%; padding: 5px;">
<a href="javascript:" data-skin="skin-green|theme-dark" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
<span style="width: 20%; float: left; height: 13px; background: #008d4c"></span>
<span style="width: 80%; float: left; height: 13px; background: #00a65a"></span>
<span style="width: 20%; float: left; height: 30px; background: #222d32"></span>
<span style="width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
</a>
<p class="text-center">绿</p>
</li>
<li style="float:left; width: 33.33333%; padding: 5px;">
<a href="javascript:" data-skin="skin-purple|theme-dark" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
<span style="width: 20%; float: left; height: 13px; background: #555299"></span>
<span style="width: 80%; float: left; height: 13px; background: #605ca8"></span>
<span style="width: 20%; float: left; height: 30px; background: #222d32"></span>
<span style="width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
</a>
<p class="text-center"></p>
</li>
<li style="float:left; width: 33.33333%; padding: 5px;">
<a href="javascript:" data-skin="skin-red|theme-dark" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
<span style="width: 20%; float: left; height: 13px; background: #dd4b39"></span>
<span style="width: 80%; float: left; height: 13px; background: #d73925"></span>
<span style="width: 20%; float: left; height: 30px; background: #222d32"></span>
<span style="width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
</a>
<p class="text-center"></p>
</li>
<li style="float:left; width: 33.33333%; padding: 5px;">
<a href="javascript:" data-skin="skin-yellow|theme-dark" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
<span style="width: 20%; float: left; height: 13px; background: #f39c12"></span>
<span style="width: 80%; float: left; height: 13px; background: #e08e0b"></span>
<span style="width: 20%; float: left; height: 30px; background: #222d32"></span>
<span style="width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
</a>
<p class="text-center"></p>
</li>
<li style="float:left; width: 33.33333%; padding: 5px;">
<a href="javascript:" data-skin="skin-blue|theme-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
<span style="width: 20%; float: left; height: 13px; background: #367fa9"></span>
<span style="width: 80%; float: left; height: 13px; background: #3c8dbc"></span>
<span style="width: 20%; float: left; height: 30px; background: #f9fafc"></span>
<span style="width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
</a>
<p class="text-center">蓝灰</p>
</li>
<li style="float:left; width: 33.33333%; padding: 5px;">
<a href="javascript:" data-skin="skin-green|theme-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
<span style="width: 20%; float: left; height: 13px; background: #008d4c"></span>
<span style="width: 80%; float: left; height: 13px; background: #00a65a"></span>
<span style="width: 20%; float: left; height: 30px; background: #f9fafc"></span>
<span style="width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
</a>
<p class="text-center">绿灰</p>
</li>
<li style="float:left; width: 33.33333%; padding: 5px;">
<a href="javascript:" data-skin="skin-purple|theme-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
<span style="width: 20%; float: left; height: 13px; background: #555299"></span>
<span style="width: 80%; float: left; height: 13px; background: #605ca8"></span>
<span style="width: 20%; float: left; height: 30px; background: #f9fafc"></span>
<span style="width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
</a>
<p class="text-center">紫灰</p>
</li>
<li style="float:left; width: 33.33333%; padding: 5px;">
<a href="javascript:" data-skin="skin-red|theme-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
<span style="width: 20%; float: left; height: 13px; background: #dd4b39"></span>
<span style="width: 80%; float: left; height: 13px; background: #d73925"></span>
<span style="width: 20%; float: left; height: 30px; background: #f9fafc"></span>
<span style="width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
</a>
<p class="text-center">红灰</p>
</li>
<li style="float:left; width: 33.33333%; padding: 5px;">
<a href="javascript:" data-skin="skin-yellow|theme-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
<span style="width: 20%; float: left; height: 13px; background: #f39c12"></span>
<span style="width: 80%; float: left; height: 13px; background: #e08e0b"></span>
<span style="width: 20%; float: left; height: 30px; background: #f9fafc"></span>
<span style="width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
</a>
<p class="text-center">黄灰</p>
</li>
</ul>
</body>
<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/ruoyi/js/common.js?v=4.1.0}"></script>
<script type="text/javascript">
//皮肤样式列表
var skins = ["skin-blue", "skin-green", "skin-purple", "skin-red", "skin-yellow"];
// 主题样式列表
var themes = ["theme-dark", "theme-light"];
$("[data-skin]").on('click',
function(e) {
var skin = $(this).data('skin');
$.each(skins, function(i) {
parent.$("body").removeClass(skins[i]);
});
$.each(themes, function(i) {
parent.$("body").removeClass(themes[i]);
});
parent.$("body").addClass(skin.split('|')[0]);
parent.$("body").addClass(skin.split('|')[1]);
storage.set('skin', skin);
});
</script>
</html>
@@ -52,7 +52,7 @@
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -82,11 +82,17 @@
},
{
field: 'configName',
title: '参数名称'
title: '参数名称',
formatter: function(value, row, index) {
return $.table.tooltip(value);
}
},
{
field: 'configKey',
title: '参数键名'
title: '参数键名',
formatter: function(value, row, index) {
return $.table.tooltip(value);
}
},
{
field: 'configValue',
@@ -105,7 +111,7 @@
title: '备注',
align: 'center',
formatter: function(value, row, index) {
return $.table.tooltip(value);
return $.table.tooltip(value, 10, "open");
}
},
{
@@ -2,6 +2,7 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('字典数据列表')" />
<th:block th:include="include :: select2-css" />
</head>
<body class="gray-bg">
<div class="container-div">
@@ -11,9 +12,9 @@
<div class="select-list">
<ul>
<li>
字典名称:<select id="dictType" name="dictType">
<option th:each="dict : ${dictList}" th:text="${dict['dictName']}" th:value="${dict['dictType']}" th:field="*{dict.dictType}"></option>
</select>
字典名称:<select id="dictType" name="dictType" class="form-control">
<option th:each="dict : ${dictList}" th:text="${dict['dictName']}" th:value="${dict['dictType']}" th:field="*{dict.dictType}"></option>
</select>
</li>
<li>
字典标签:<input type="text" name="dictLabel"/>
@@ -26,7 +27,7 @@
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="resetPre()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
@@ -49,11 +50,12 @@
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:dict:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:dict:remove')}]];
@@ -132,6 +134,11 @@
var dictType = $("#dictType option:selected").val();
$.operate.add(dictType);
}
function resetPre() {
$.form.reset();
$("#dictType").val($("#dictType").val()).trigger("change");
}
</script>
</body>
</html>
@@ -53,7 +53,7 @@
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -116,6 +116,9 @@
width: '10%',
align: "left",
formatter: function(value, row, index) {
if (row.menuType == 'F') {
return '-';
}
return $.table.selectDictLabel(datas, row.visible);
}
},
@@ -44,7 +44,7 @@
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -47,7 +47,7 @@
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -39,7 +39,7 @@
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -53,7 +53,7 @@
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -28,7 +28,7 @@
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -35,7 +35,7 @@
<div class="form-group">
<label class="col-sm-4 control-label"><span style="color: red; ">*</span>手机号码:</label>
<div class="col-sm-8">
<input name="phonenumber" placeholder="请输入手机号码" class="form-control" type="text" maxlength="11" required>
<input id="phonenumber" name="phonenumber" placeholder="请输入手机号码" class="form-control" type="text" maxlength="11" required>
</div>
</div>
</div>
@@ -43,7 +43,7 @@
<div class="form-group">
<label class="col-sm-4 control-label"><span style="color: red; ">*</span>邮箱:</label>
<div class="col-sm-8">
<input name="email" class="form-control email" type="text" maxlength="50" placeholder="请输入邮箱" required>
<input id="email" name="email" class="form-control email" type="text" maxlength="50" placeholder="请输入邮箱" required>
</div>
</div>
</div>
@@ -53,7 +53,7 @@
<div class="form-group">
<label class="col-sm-4 control-label"><span style="color: red; ">*</span>登录账号:</label>
<div class="col-sm-8">
<input name="loginName" placeholder="请输入登录账号" class="form-control" type="text" maxlength="30" required>
<input id="loginName" name="loginName" placeholder="请输入登录账号" class="form-control" type="text" maxlength="30" required>
</div>
</div>
</div>
@@ -149,7 +149,7 @@
type: "post",
dataType: "json",
data: {
name : function() {
"loginName": function() {
return $.common.trim($("#loginName").val());
}
},
@@ -169,7 +169,7 @@
type: "post",
dataType: "json",
data: {
name: function () {
"email": function () {
return $.common.trim($("#email").val());
}
},
@@ -185,7 +185,7 @@
type: "post",
dataType: "json",
data: {
name: function () {
"phonenumber": function () {
return $.common.trim($("#phonenumber").val());
}
},
@@ -254,4 +254,4 @@
})
</script>
</body>
</html>
</html>
@@ -80,7 +80,7 @@
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
<table id="bootstrap-table"></table>
</div>
</div>
</div>
@@ -111,12 +111,10 @@
<label class="col-sm-3 control-label">日期选择:</label>
<div class="col-sm-9">
<div class="form-group">
<div class="input-group date">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input type="text" class="form-control" value="2018-04-20">
</div>
</div>
<div class="input-group date">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input type="text" class="form-control" value="2018-04-20">
</div>
</div>
</div>
<div class="hr-line-dashed"></div>
+1 -7
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>ruoyi</artifactId>
<groupId>com.ruoyi</groupId>
<version>4.0.0</version>
<version>4.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -77,12 +77,6 @@
<artifactId>commons-fileupload</artifactId>
</dependency>
<!-- HTML解析器 -->
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
</dependency>
<!-- excel工具 -->
<dependency>
<groupId>org.apache.poi</groupId>
@@ -81,7 +81,7 @@ public class Global
*/
public static String getVersion()
{
return StringUtils.nvl(getConfig("ruoyi.version"), "4.0.0");
return StringUtils.nvl(getConfig("ruoyi.version"), "4.1.0");
}
/**
@@ -129,7 +129,7 @@ public class Global
*/
public static String getDownloadPath()
{
return getProfile() + "/download";
return getProfile() + "/download/";
}
/**
@@ -61,4 +61,9 @@ public class Constants
* 排序的方向 "desc" 或者 "asc".
*/
public static final String IS_ASC = "isAsc";
/**
* 资源映射路径 前缀
*/
public static final String RESOURCE_PREFIX = "/profile";
}
@@ -44,6 +44,12 @@ public class GenConstants
public static final String[] COLUMNNAME_NOT_QUERY = { "id", "create_by", "create_time", "del_flag", "update_by",
"update_time", "remark" };
/** Entity基类字段 */
public static final String[] BASE_ENTITY = { "createBy", "createTime", "updateBy", "updateTime", "remark" };
/** Tree基类字段 */
public static final String[] TREE_ENTITY = { "parentName", "parentId", "orderNum", "ancestors" };
/** 文本框 */
public static final String HTML_INPUT = "input";
@@ -81,7 +87,7 @@ public class GenConstants
public static final String TYPE_DATE = "Date";
/** 模糊查询 */
public static final String QUERY_LIKE = "Like";
public static final String QUERY_LIKE = "LIKE";
/** 需要 */
public static final String REQUIRE = "1";
@@ -1,8 +1,6 @@
package com.ruoyi.common.core.domain;
import java.util.HashMap;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.utils.StringUtils;
/**
@@ -14,10 +12,13 @@ public class AjaxResult extends HashMap<String, Object>
{
private static final long serialVersionUID = 1L;
/** 状态码 */
public static final String CODE_TAG = "code";
/** 返回内容 */
public static final String MSG_TAG = "msg";
/** 数据对象 */
public static final String DATA_TAG = "data";
/**
@@ -44,18 +45,6 @@ public class AjaxResult extends HashMap<String, Object>
}
}
/** 状态类型 */
private Type type;
/** 状态码 */
private int code;
/** 返回内容 */
private String msg;
/** 数据对象 */
private Object data;
/**
* 初始化一个新创建的 AjaxResult 对象,使其表示一个空消息。
*/
@@ -190,53 +179,4 @@ public class AjaxResult extends HashMap<String, Object>
{
return new AjaxResult(Type.ERROR, msg, data);
}
public Type getType()
{
return type;
}
public void setType(Type type)
{
this.type = type;
}
public int getCode()
{
return code;
}
public void setCode(int code)
{
this.code = code;
}
public String getMsg()
{
return msg;
}
public void setMsg(String msg)
{
this.msg = msg;
}
public Object getData()
{
return data;
}
public void setData(Object data)
{
this.data = data;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("code", getCode())
.append("msg", getMsg())
.append("data", getData())
.toString();
}
}
@@ -18,6 +18,9 @@ public class TreeEntity extends BaseEntity
/** 显示顺序 */
private Integer orderNum;
/** 祖级列表 */
private String ancestors;
public String getParentName()
{
return parentName;
@@ -47,4 +50,14 @@ public class TreeEntity extends BaseEntity
{
this.orderNum = orderNum;
}
public String getAncestors()
{
return ancestors;
}
public void setAncestors(String ancestors)
{
this.ancestors = ancestors;
}
}
@@ -5,6 +5,7 @@ import java.io.IOException;
import org.apache.commons.io.FilenameUtils;
import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.config.Global;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.exception.file.FileNameLengthLimitExceededException;
import com.ruoyi.common.exception.file.FileSizeLimitExceededException;
import com.ruoyi.common.exception.file.InvalidExtensionException;
@@ -147,7 +148,7 @@ public class FileUploadUtils
{
int dirLastIndex = uploadDir.lastIndexOf("/") + 1;
String currentDir = StringUtils.substring(uploadDir, dirLastIndex);
String pathFileName = "/profile/" + currentDir + "/" + fileName;
String pathFileName = Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName;
return pathFileName;
}
@@ -0,0 +1,152 @@
package com.ruoyi.common.utils.html;
import com.ruoyi.common.utils.StringUtils;
/**
* 转义和反转义工具类
*
* @author ruoyi
*/
public class EscapeUtil
{
public static final String RE_HTML_MARK = "(<[^<]*?>)|(<[\\s]*?/[^<]*?>)|(<[^<]*?/[\\s]*?>)";
private static final char[][] TEXT = new char[64][];
static
{
for (int i = 0; i < 64; i++)
{
TEXT[i] = new char[] { (char) i };
}
// special HTML characters
TEXT['\''] = "&#039;".toCharArray(); // 单引号
TEXT['"'] = "&#34;".toCharArray(); // 单引号
TEXT['&'] = "&#38;".toCharArray(); // &符
TEXT['<'] = "&#60;".toCharArray(); // 小于号
TEXT['>'] = "&#62;".toCharArray(); // 大于号
}
/**
* 转义文本中的HTML字符为安全的字符
*
* @param text 被转义的文本
* @return 转义后的文本
*/
public static String escape(String text)
{
return encode(text);
}
/**
* 还原被转义的HTML特殊字符
*
* @param content 包含转义符的HTML内容
* @return 转换后的字符串
*/
public static String unescape(String content)
{
return decode(content);
}
/**
* 清除所有HTML标签,但是不删除标签内的内容
*
* @param content 文本
* @return 清除标签后的文本
*/
public static String clean(String content)
{
return content.replaceAll(RE_HTML_MARK, "");
}
/**
* Escape编码
*
* @param text 被编码的文本
* @return 编码后的字符
*/
private static String encode(String text)
{
int len;
if ((text == null) || ((len = text.length()) == 0))
{
return StringUtils.EMPTY;
}
StringBuilder buffer = new StringBuilder(len + (len >> 2));
char c;
for (int i = 0; i < len; i++)
{
c = text.charAt(i);
if (c < 64)
{
buffer.append(TEXT[c]);
}
else
{
buffer.append(c);
}
}
return buffer.toString();
}
/**
* Escape解码
*
* @param content 被转义的内容
* @return 解码后的字符串
*/
public static String decode(String content)
{
if (StringUtils.isEmpty(content))
{
return content;
}
StringBuilder tmp = new StringBuilder(content.length());
int lastPos = 0, pos = 0;
char ch;
while (lastPos < content.length())
{
pos = content.indexOf("%", lastPos);
if (pos == lastPos)
{
if (content.charAt(pos + 1) == 'u')
{
ch = (char) Integer.parseInt(content.substring(pos + 2, pos + 6), 16);
tmp.append(ch);
lastPos = pos + 6;
}
else
{
ch = (char) Integer.parseInt(content.substring(pos + 1, pos + 3), 16);
tmp.append(ch);
lastPos = pos + 3;
}
}
else
{
if (pos == -1)
{
tmp.append(content.substring(lastPos));
lastPos = content.length();
}
else
{
tmp.append(content.substring(lastPos, pos));
lastPos = pos;
}
}
}
return tmp.toString();
}
public static void main(String[] args)
{
String html = "<script>alert(1);</script>";
System.out.println(EscapeUtil.clean(html));
System.out.println(EscapeUtil.escape(html));
System.out.println(EscapeUtil.unescape(html));
}
}
File diff suppressed because it is too large Load Diff
@@ -2,8 +2,7 @@ package com.ruoyi.common.xss;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import org.jsoup.Jsoup;
import org.jsoup.safety.Whitelist;
import com.ruoyi.common.utils.html.EscapeUtil;
/**
* XSS过滤处理
@@ -31,7 +30,7 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper
for (int i = 0; i < length; i++)
{
// 防xss攻击和过滤前后空格
escapseValues[i] = Jsoup.clean(values[i], Whitelist.relaxed()).trim();
escapseValues[i] = EscapeUtil.clean(values[i]).trim();
}
return escapseValues;
}
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>ruoyi</artifactId>
<groupId>com.ruoyi</groupId>
<version>4.0.0</version>
<version>4.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -45,10 +45,10 @@ public class LogAspect
*
* @param joinPoint 切点
*/
@AfterReturning(pointcut = "logPointCut()")
public void doAfterReturning(JoinPoint joinPoint)
@AfterReturning(pointcut = "logPointCut()", returning = "jsonResult")
public void doAfterReturning(JoinPoint joinPoint, Object jsonResult)
{
handleLog(joinPoint, null);
handleLog(joinPoint, null, jsonResult);
}
/**
@@ -60,10 +60,10 @@ public class LogAspect
@AfterThrowing(value = "logPointCut()", throwing = "e")
public void doAfterThrowing(JoinPoint joinPoint, Exception e)
{
handleLog(joinPoint, e);
handleLog(joinPoint, e, null);
}
protected void handleLog(final JoinPoint joinPoint, final Exception e)
protected void handleLog(final JoinPoint joinPoint, final Exception e, Object jsonResult)
{
try
{
@@ -83,6 +83,8 @@ public class LogAspect
// 请求的地址
String ip = ShiroUtils.getIp();
operLog.setOperIp(ip);
// 返回参数
operLog.setJsonResult(JSON.marshal(jsonResult));
operLog.setOperUrl(ServletUtils.getRequest().getRequestURI());
if (currentUser != null)
@@ -104,6 +106,8 @@ public class LogAspect
String className = joinPoint.getTarget().getClass().getName();
String methodName = joinPoint.getSignature().getName();
operLog.setMethod(className + "." + methodName + "()");
// 设置请求方式
operLog.setRequestMethod(ServletUtils.getRequest().getMethod());
// 处理设置注解上的参数
getControllerMethodDescription(controllerLog, operLog);
// 保存数据库
@@ -13,7 +13,7 @@ import org.springframework.context.annotation.EnableAspectJAutoProxy;
// 表示通过aop框架暴露该代理对象,AopContext能够访问
@EnableAspectJAutoProxy(exposeProxy = true)
// 指定要扫描的Mapper类的包的路径
@MapperScan("com.ruoyi.*.mapper")
@MapperScan("com.ruoyi.**.mapper")
public class ApplicationConfig
{
@@ -0,0 +1,108 @@
package com.ruoyi.framework.config;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import javax.sql.DataSource;
import org.apache.ibatis.io.VFS;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.boot.autoconfigure.SpringBootVFS;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;
import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
import org.springframework.core.type.classreading.MetadataReader;
import org.springframework.core.type.classreading.MetadataReaderFactory;
import org.springframework.util.ClassUtils;
/**
* Mybatis支持*匹配扫描包
*
* @author ruoyi
*/
@Configuration
public class MyBatisConfig
{
@Autowired
private Environment env;
static final String DEFAULT_RESOURCE_PATTERN = "**/*.class";
public static String setTypeAliasesPackage(String typeAliasesPackage)
{
ResourcePatternResolver resolver = (ResourcePatternResolver) new PathMatchingResourcePatternResolver();
MetadataReaderFactory metadataReaderFactory = new CachingMetadataReaderFactory(resolver);
List<String> allResult = new ArrayList<String>();
try
{
for (String aliasesPackage : typeAliasesPackage.split(","))
{
List<String> result = new ArrayList<String>();
aliasesPackage = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX
+ ClassUtils.convertClassNameToResourcePath(aliasesPackage.trim()) + "/" + DEFAULT_RESOURCE_PATTERN;
Resource[] resources = resolver.getResources(aliasesPackage);
if (resources != null && resources.length > 0)
{
MetadataReader metadataReader = null;
for (Resource resource : resources)
{
if (resource.isReadable())
{
metadataReader = metadataReaderFactory.getMetadataReader(resource);
try
{
result.add(Class.forName(metadataReader.getClassMetadata().getClassName()).getPackage().getName());
}
catch (ClassNotFoundException e)
{
e.printStackTrace();
}
}
}
}
if (result.size() > 0)
{
HashSet<String> hashResult = new HashSet<String>(result);
allResult.addAll(hashResult);
}
}
if (allResult.size() > 0)
{
typeAliasesPackage = String.join(",", (String[]) allResult.toArray(new String[0]));
}
else
{
throw new RuntimeException("mybatis typeAliasesPackage 路径扫描错误,参数typeAliasesPackage:" + typeAliasesPackage + "未找到任何包");
}
}
catch (IOException e)
{
e.printStackTrace();
}
return typeAliasesPackage;
}
@Bean
public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception
{
String typeAliasesPackage = env.getProperty("mybatis.typeAliasesPackage");
String mapperLocations = env.getProperty("mybatis.mapperLocations");
String configLocation = env.getProperty("mybatis.configLocation");
typeAliasesPackage = setTypeAliasesPackage(typeAliasesPackage);
VFS.addImplClass(SpringBootVFS.class);
final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
sessionFactory.setDataSource(dataSource);
sessionFactory.setTypeAliasesPackage(typeAliasesPackage);
sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver().getResources(mapperLocations));
sessionFactory.setConfigLocation(new DefaultResourceLoader().getResource(configLocation));
return sessionFactory.getObject();
}
}
@@ -8,6 +8,7 @@ import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import com.ruoyi.common.config.Global;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.framework.interceptor.RepeatSubmitInterceptor;
/**
@@ -40,7 +41,7 @@ public class ResourcesConfig implements WebMvcConfigurer
public void addResourceHandlers(ResourceHandlerRegistry registry)
{
/** 本地文件上传路径 */
registry.addResourceHandler("/profile/**").addResourceLocations("file:" + Global.getProfile() + "/");
registry.addResourceHandler(Constants.RESOURCE_PREFIX + "/**").addResourceLocations("file:" + Global.getProfile() + "/");
/** swagger配置 */
registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/");
@@ -19,7 +19,6 @@ import org.apache.shiro.subject.PrincipalCollection;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import com.ruoyi.common.exception.user.CaptchaException;
import com.ruoyi.common.exception.user.RoleBlockedException;
import com.ruoyi.common.exception.user.UserBlockedException;

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