88 Commits
Author SHA1 Message Date
RuoYi 7913796730 若依3.3 2019-04-01 08:34:44 +08:00
RuoYi 87b7e8665a 若依3.3 2019-03-31 12:56:04 +08:00
RuoYi 7e67c233dc 表单生成html多行文本不能识别问题 2019-03-25 20:02:12 +08:00
RuoYi 0cec24d90b 集成组件beanutils 2019-03-20 20:58:41 +08:00
RuoYi 6874736a20 增加rootIdValue配置项可指定根节点 2019-03-19 11:47:33 +08:00
RuoYi cd199be6aa 添加新群号 2019-03-18 11:55:21 +08:00
dhx920and若依 fc51f0ce80 !79 修正DynamicDataSourceContextHolder类中三处DataSource拼写错误
Merge pull request !79 from dhx920/master
2019-03-18 11:18:31 +08:00
dhx920 316b126c8f 修正DynamicDataSourceContextHolder类中三处DataSource拼写错误 2019-03-18 11:08:41 +08:00
RuoYi f7a9f33882 按下不触发校验,防止造成资源浪费 2019-03-17 22:27:44 +08:00
RuoYi a805d23afe 权限错误消息提醒添加注释,方便理解 2019-03-17 22:14:37 +08:00
RuoYi fb2887b3bf 修复菜单为“目录”,perms字段保存为NULL编辑角色权限问题 2019-03-17 21:26:01 +08:00
RuoYi 92d98a2a6e 修复IE浏览器导出功能报错 2019-03-17 20:52:45 +08:00
RuoYi d066bf022b 菜单表格树第一级默认不展开 2019-03-17 19:47:35 +08:00
RuoYi e26b65459e 线程异常打印方法移入工具类 2019-03-15 19:02:28 +08:00
RuoYi 00a661e325 捕获线程池执行任务抛出的异常 2019-03-15 18:19:23 +08:00
geekymvand若依 975829f2c0 !78 记录异常日志(默认情况下,线程池会捕获任务抛出的所有异常,但是不做任何处理)
Merge pull request !78 from geekymv/master
2019-03-15 18:14:26 +08:00
RuoYi 9bf809061e 权限校验失败 如果请求为ajax返回json,普通请求跳转页面 2019-03-14 19:41:26 +08:00
geekymv c9dad631df 记录异常日志(默认情况下,线程池会捕获任务抛出的所有异常,但是不做任何处理) 2019-03-13 22:14:03 +08:00
RuoYi 47f5d7a7b7 定时任务导出增加并发执行字段 2019-03-13 20:24:12 +08:00
RuoYi e34b4ea63d 定时任务支持并发控制 2019-03-13 19:45:12 +08:00
RuoYi 9fc42511c6 datetimepicker 汉化 2019-03-13 13:52:09 +08:00
RuoYi c9bd08c2de 修复定时任务执行失败后入库状态为成功 2019-03-13 13:41:40 +08:00
RuoYi 4b8d64f16f 启用点击选中行 2019-03-13 12:41:29 +08:00
RuoYi 32e2e212a7 事务由Controller迁移到Service 2019-03-09 22:21:09 +08:00
RuoYi aa478f2bd6 增加日期控件显示类型及回显格式扩展选项 2019-03-09 21:29:19 +08:00
RuoYi d27d739558 代码生成配置classpath引用文件 2019-03-09 21:14:55 +08:00
RuoYi 4f84560710 修复字典值为0/1时无法输出问题 2019-03-08 16:31:02 +08:00
RuoYi 29e20870fc 调整部分包路径 2019-03-08 16:11:24 +08:00
RuoYi a9f378218b 默认显示Sql监控 2019-03-08 15:25:24 +08:00
RuoYi 9531875401 调整部分包路径 2019-03-08 14:44:38 +08:00
RuoYi 1b193bcc65 关闭选项卡激活滚动 2019-03-07 13:48:40 +08:00
RuoYi 2d32b0d9c2 新增分页跳转到指定页码 2019-03-07 12:57:15 +08:00
RuoYi f1ba270a47 去除多余注释 2019-03-05 22:57:53 +08:00
RuoYi 8a2bba86eb 新增表格销毁方法 2019-03-05 15:51:15 +08:00
RuoYi 9ad6c1b998 更换prompt名称 2019-03-05 15:29:13 +08:00
流光and若依 eca0b9f89b !74 修复 @Excel 注解 prompt 属性使用报错
Merge pull request !74 from 流光/master
2019-03-05 14:52:18 +08:00
RuoYi 536ee476cb 修复在firefox浏览器显示高度问题 2019-03-05 14:42:23 +08:00
stickdream 67b5ff894e 修复@Excel注解 prompt 属性使用报错 2019-03-03 00:56:52 +08:00
RuoYi a469435499 数据被加载触发工具条按钮禁用/启用 2019-03-01 16:03:23 +08:00
RuoYi 1d01d20b49 Ztree树结构优化 2019-03-01 15:26:04 +08:00
RuoYi 161c0f1a67 更新readme 2019-02-28 23:06:00 +08:00
RuoYi b554c46825 手机端自适应优化 2019-02-28 20:52:07 +08:00
RuoYi 402fc9c4eb 文本框、下拉框、时间控件宽度调整 2019-02-28 20:05:12 +08:00
RuoYi a0f07f786a 新增下拉按钮切换 2019-02-28 16:23:09 +08:00
RuoYi 8a37d2ae24 检查字符,防止注入绕过 2019-02-28 13:03:02 +08:00
RuoYi 9c50dd8c2d 添加druid白名单 2019-02-28 12:12:21 +08:00
RuoYi 807b723116 修复界面存在的一些安全问题 2019-02-27 12:29:03 +08:00
RuoYi d399160a0b 表格ID自定义及默认值修改,合并editTree到edit 2019-02-26 16:10:49 +08:00
RuoYi dacf0bfe66 添加表格的高度 2019-02-25 20:02:01 +08:00
RuoYi cf1b00c409 添加表头样式 2019-02-25 15:55:42 +08:00
RuoYi b033c858b8 表单验证优化 2019-02-25 13:19:06 +08:00
RuoYi 6a3ba38b45 新增方法(addTab、editTab) 2019-02-24 14:51:43 +08:00
lsm121and若依 90131d1338 !71 强制退出用户时更新缓存
Merge pull request !71 from lsm121/master
2019-02-22 16:10:47 +08:00
okayliaoand若依 2d319a8d0c !73 fix:操作日志页面,权限码错误
Merge pull request !73 from okayliao/master
2019-02-21 12:41:02 +08:00
okayliao 84b39901af fix:操作日志页面,权限码错误 2019-02-18 23:48:38 +08:00
okayliaoand若依 877e8edb09 !72 fix:登录地点 字段名错误
Merge pull request !72 from okayliao/develop
2019-02-15 17:55:15 +08:00
RuoYi 2d588ed873 登录地点字段名错误 2019-02-15 17:49:34 +08:00
RuoYi f1f7d7e4fc 使用jsonview展示操作日志参数 2019-02-15 17:46:24 +08:00
okayliao f3ea70c32c fix:登录地点 字段名错误 2019-02-15 16:50:27 +08:00
RuoYi fe4677bcf5 验证码禁用自动记录 2019-02-15 16:07:25 +08:00
RuoYi c03613f317 弹出层增加回调事件 2019-02-15 15:27:41 +08:00
RuoYi cc67d57cef 新增表格客户端分页选项 2019-02-15 14:12:03 +08:00
RuoYi 742846b421 上传文件按日期存储及部分文件路径位置 2019-01-31 11:45:55 +08:00
RuoYi 4829163bab 导入导出支持父类字段 2019-01-31 09:33:02 +08:00
lsm121 3c92ab7463 踢出用户时更新ehcash缓存 2019-01-30 13:08:00 +08:00
RuoYi 2de9f07449 修复combo属性Excel兼容性问题 2019-01-29 17:15:01 +08:00
RuoYi 97260b02cb 个人头像为图片服务器跨域问题 2019-01-29 11:23:16 +08:00
RuoYi af64be2a31 避免ehcache配置文件一直被占用,无法完全销毁项目重新部署 2019-01-29 10:07:57 +08:00
okayliaoand若依 0a0a6982f7 !70 fix: 关闭验证码时,保持 "记住我" 间距
Merge pull request !70 from okayliao/master
2019-01-29 09:13:24 +08:00
okayliao 3270db75af fix: 关闭验证码时,保持 "记住我" 间距 2019-01-28 23:08:56 +08:00
okayliaoand若依 0d69164acd !69 fix:导入按钮图标错误
Merge pull request !69 from okayliao/master
2019-01-28 18:44:09 +08:00
okayliao a5507dace7 Merge branch 'master' into develop
* master:
  升级datepicker拓展
  修复全屏模式下,详情弹窗被遮盖
2019-01-28 15:20:54 +08:00
okayliao 0ced39f2d6 fix:导出按钮图标错误 2019-01-28 15:20:04 +08:00
RuoYi c5968b76ec 升级datepicker拓展 2019-01-28 13:59:59 +08:00
RuoYi d5014c754c 修复全屏模式下,详情弹窗被遮盖 2019-01-28 13:18:05 +08:00
RuoYi a8b7ba00ac 修改tip默认值20 2019-01-25 20:14:10 +08:00
RuoYi 894090c39f 新增表格浮动提示方法 2019-01-25 17:48:17 +08:00
RuoYi 6b74dcb95f 支持左右列冻结 2019-01-25 11:08:13 +08:00
RuoYi 170e736c44 新增支持冻结列 2019-01-25 10:26:22 +08:00
RuoYi 25d7c2c1f7 spring工具类移至common 2019-01-24 21:56:45 +08:00
RuoYi d5a89621a9 线程池统一管理 2019-01-24 16:31:50 +08:00
okayliaoand若依 c6bd84818a !68 fix: Mapper文件错误
Merge pull request !68 from okayliao/master
2019-01-24 11:51:26 +08:00
okayliao 262ee4eb5c fix: Mapper 文件错误 2019-01-22 15:44:47 +08:00
RuoYi 00a10ed8df 代码生成列extra属性 2019-01-21 15:25:12 +08:00
RuoYi c064115501 bootstrap-table-mobile.js 2019-01-21 14:46:09 +08:00
RuoYi eae8c660cf 部分字段设置可修改为空 2019-01-18 16:40:56 +08:00
RuoYi f5af4e8204 添加使用文档 2019-01-18 15:59:03 +08:00
RuoYi 2f535082f2 获取完整的服务地址 2019-01-17 15:05:44 +08:00
254 changed files with 7642 additions and 5138 deletions
+24 -16
View File
@@ -6,9 +6,9 @@
若依基于hplus和inspinia两套后台系统模板开发。有需要可自行到群内下载。
> RuoYi从3.0开始,进行模块拆分,将原先的单应用转变为多模块,如需单应用,请移步 [RuoYi-fast](https://gitee.com/y_project/RuoYi-fast)
> 如需单应用,请移步 [RuoYi-fast](https://gitee.com/y_project/RuoYi-fast) `(保持同步更新)`,如需Oracle版本,请移步 [RuoYi-oracle](http://doc.ruoyi.vip/#/standard/xmkz) `(不定时更新)`
> 推荐使用阿里云部署,通用云产品代金[点我领取](https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=brki8iof)
> 阿里云通用云产品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)  `(仅限新用户)`
## 内置功能
@@ -42,31 +42,39 @@
<table>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/25b5e333768d013d45a990c152dbe4d9d6e.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/dfadf4d864242745486aa0167110dfcbeb8.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/5ac52ccc07a59f12205948c9408791f5c5b.jpg"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/2e1ed87df9b476ed73ed650df20cf009b78.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/91bef110740ba9e36ff00804f8748a787fb.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/66f8b5b24720dabe0e11ae84bd1ad4b038e.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/a46f34786bc9fc400697b6f3677be5bb3f0.jpg"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/9a2851988f4e7433c9322154534865f57d7.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/396293f80b1e8cce8671f56c296bee78a3a.jpg"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/787b3b06430a403655b48b9bcd1fa829555.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/a51820009836276b778bc89d4d0e217e26d.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/6010201b078dbc9e1d8c09c6a3e53f4344c.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/058928ad3a6e6de67b43d62d42dbf071355.jpg"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/5fb138478adeda6825e206d21f67ecd0625.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/fa2f027a10707a4eb4fc47d5ea1c3d2b772.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/21acdcade5e306f2c5d7ae26993b4e6bd06.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/ad5ea3c4c2ea2e91d1f05f6cc384cbad2a1.jpg"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/6ca845cca1701fbf71881efe4f341c82f99.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/e3aeb8fff585594f6e947218e14f2806ea1.jpg"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/a714056081523b7dfa782cda866e8be4adc.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/ab4b5797dfb2bc68c4974ad5458bd5f5bcf.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/197ddc2fdffc27020f8624bd7ca1a971f61.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/a2dabea752d7d70aede20908dee0b419829.jpg"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/c5699c5726b5aebde71a37bb5163d840bc2.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/24740d59377e826d0d8664ebad66dc84abd.jpg"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/bbe7fe1048d29217ba73bd3ed88d6743b55.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/5f3d39a141f21f81b90536f391b8408f1fa.jpg"/></td>
</tr>
</table>
## 若依交流群
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/QQ群-1529866-blue.svg)](https://jq.qq.com/?_wv=1027&k=53R0L5Z) 点击按钮入群。
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) 点击按钮入群。
+14
View File
@@ -0,0 +1,14 @@
@echo off
echo.
echo [信息] 运行Web工程。
echo.
cd %~dp0
cd ../ruoyi-admin/target
set JAVA_OPTS=-Xms256m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
java -jar %JAVA_OPTS% ruoyi-admin.jar
cd bin
pause
+168 -32
View File
@@ -6,30 +6,39 @@
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi</artifactId>
<version>3.2</version>
<version>3.3</version>
<name>ruoyi</name>
<url>http://www.ruoyi.vip</url>
<description>若依管理系统</description>
<properties>
<ruoyi.version>3.2</ruoyi.version>
<ruoyi.version>3.3</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>
<thymeleaf.extras.shiro.version>2.0.0</thymeleaf.extras.shiro.version>
<mybatis.boot.version>1.3.2</mybatis.boot.version>
<druid.version>1.1.10</druid.version>
<druid.version>1.1.14</druid.version>
<bitwalker.version>1.19</bitwalker.version>
<kaptcha.version>2.3.2</kaptcha.version>
<swagger.version>2.7.0</swagger.version>
<pagehelper.boot.version>1.2.5</pagehelper.boot.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>
<commons.beanutils.version>1.9.3</commons.beanutils.version>
<jsoup.version>1.11.3</jsoup.version>
<poi.version>3.17</poi.version>
<velocity.version>1.7</velocity.version>
</properties>
<!-- 依赖声明 -->
<dependencyManagement>
<dependencies>
<!-- SpringBoot的依赖配置-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
@@ -37,6 +46,161 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<!--阿里数据库连接池 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>${druid.version}</version>
</dependency>
<!--验证码 -->
<dependency>
<groupId>com.github.penggle</groupId>
<artifactId>kaptcha</artifactId>
<version>${kaptcha.version}</version>
</dependency>
<!--Shiro核心框架 -->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId>
<version>${shiro.version}</version>
</dependency>
<!-- Shiro使用Srping框架 -->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId>
<version>${shiro.version}</version>
</dependency>
<!-- Shiro使用EhCache缓存框架 -->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-ehcache</artifactId>
<version>${shiro.version}</version>
</dependency>
<!-- thymeleaf模板引擎和shiro框架的整合 -->
<dependency>
<groupId>com.github.theborakompanioni</groupId>
<artifactId>thymeleaf-extras-shiro</artifactId>
<version>${thymeleaf.extras.shiro.version}</version>
</dependency>
<!-- 解析客户端操作系统、浏览器等 -->
<dependency>
<groupId>eu.bitwalker</groupId>
<artifactId>UserAgentUtils</artifactId>
<version>${bitwalker.version}</version>
</dependency>
<!-- pagehelper 分页插件 -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>${pagehelper.boot.version}</version>
</dependency>
<!-- 获取系统信息 -->
<dependency>
<groupId>com.github.oshi</groupId>
<artifactId>oshi-core</artifactId>
<version>${oshi.version}</version>
</dependency>
<!-- swagger2-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${swagger.version}</version>
</dependency>
<!-- swagger2-UI-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${swagger.version}</version>
</dependency>
<!--io常用工具类 -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
</dependency>
<!--文件上传工具类 -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${commons.fileupload.version}</version>
</dependency>
<!-- 简化反射封工具类 -->
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>${commons.beanutils.version}</version>
</dependency>
<!-- HTML解析器 -->
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>${jsoup.version}</version>
</dependency>
<!-- excel工具 -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${poi.version}</version>
</dependency>
<!--velocity代码生成使用模板 -->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>${velocity.version}</version>
</dependency>
<!-- 定时任务-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-quartz</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<!-- 代码生成-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-generator</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<!-- 核心模块-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-framework</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<!-- 系统模块-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-system</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<!-- 通用工具-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common</artifactId>
<version>${ruoyi.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
@@ -53,35 +217,7 @@
<dependencies>
<!--Spring框架基本的核心工具-->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
<!-- SpringBoot集成mybatis框架 -->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>${mybatis.boot.version}</version>
</dependency>
<!-- Mysql驱动包 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</dependency>
<!-- 日志工具类 -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
</dependencies>
+19 -5
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>ruoyi</artifactId>
<groupId>com.ruoyi</groupId>
<version>3.2</version>
<version>3.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
@@ -15,8 +15,13 @@
web服务入口
</description>
<dependencies>
<!-- SpringBoot集成thymeleaf模板 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<!-- spring-boot-devtools -->
<dependency>
@@ -29,21 +34,30 @@
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${swagger.version}</version>
</dependency>
<!-- swagger2-UI-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${swagger.version}</version>
</dependency>
<!-- 核心模块-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-framework</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<!-- 定时任务-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-quartz</artifactId>
</dependency>
<!-- 代码生成-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-generator</artifactId>
</dependency>
</dependencies>
@@ -12,11 +12,12 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.common.config.Global;
import com.ruoyi.common.config.ServerConfig;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.common.utils.file.FileUtils;
import com.ruoyi.framework.config.ServerConfig;
import com.ruoyi.framework.util.FileUploadUtils;
/**
* 通用请求处理
@@ -45,9 +46,13 @@ public class CommonController
@GetMapping("common/download")
public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request)
{
String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
try
{
if (!FileUtils.isValidFilename(fileName))
{
throw new Exception(StringUtils.format(" 文件名称({})非法,不允许下载。 ", fileName));
}
String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
String filePath = Global.getDownloadPath() + fileName;
response.setCharacterEncoding("utf-8");
@@ -4,7 +4,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import com.ruoyi.framework.web.base.BaseController;
import com.ruoyi.common.core.controller.BaseController;
/**
* druid 监控
@@ -5,7 +5,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import com.ruoyi.framework.web.base.BaseController;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.framework.web.domain.Server;
/**
@@ -9,13 +9,13 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.base.AjaxResult;
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.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.SysLogininfor;
import com.ruoyi.system.service.ISysLogininforService;
import com.ruoyi.framework.web.base.BaseController;
/**
* 系统访问记录
@@ -11,13 +11,13 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.base.AjaxResult;
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.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.SysOperLog;
import com.ruoyi.system.service.ISysOperLogService;
import com.ruoyi.framework.web.base.BaseController;
/**
* 操作日志记录
@@ -10,16 +10,16 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.base.AjaxResult;
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.enums.OnlineStatus;
import com.ruoyi.common.page.TableDataInfo;
import com.ruoyi.framework.shiro.session.OnlineSession;
import com.ruoyi.framework.shiro.session.OnlineSessionDAO;
import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.system.domain.SysUserOnline;
import com.ruoyi.system.service.ISysUserOnlineService;
import com.ruoyi.framework.web.base.BaseController;
/**
* 在线用户监控
@@ -78,6 +78,7 @@ public class SysUserOnlineController extends BaseController
return error("当前登陆用户无法强退");
}
onlineSession.setStatus(OnlineStatus.off_line);
onlineSessionDAO.update(onlineSession);
online.setStatus(OnlineStatus.off_line);
userOnlineService.saveOnline(online);
}
@@ -105,6 +106,7 @@ public class SysUserOnlineController extends BaseController
return error("用户已下线");
}
onlineSession.setStatus(OnlineStatus.off_line);
onlineSessionDAO.update(onlineSession);
online.setStatus(OnlineStatus.off_line);
userOnlineService.saveOnline(online);
return success();
@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.google.code.kaptcha.Constants;
import com.google.code.kaptcha.Producer;
import com.ruoyi.framework.web.base.BaseController;
import com.ruoyi.common.core.controller.BaseController;
/**
* 图片验证码(支持算术形式)
@@ -11,14 +11,14 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.base.AjaxResult;
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.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.system.domain.SysConfig;
import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.framework.web.base.BaseController;
/**
* 参数配置 信息操作处理
@@ -1,7 +1,6 @@
package com.ruoyi.web.controller.system;
import java.util.List;
import java.util.Map;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@@ -11,15 +10,16 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.Ztree;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.system.domain.SysDept;
import com.ruoyi.system.domain.SysRole;
import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.framework.web.base.BaseController;
/**
* 部门信息
@@ -107,17 +107,17 @@ public class SysDeptController extends BaseController
*/
@Log(title = "部门管理", businessType = BusinessType.DELETE)
@RequiresPermissions("system:dept:remove")
@PostMapping("/remove/{deptId}")
@GetMapping("/remove/{deptId}")
@ResponseBody
public AjaxResult remove(@PathVariable("deptId") Long deptId)
{
if (deptService.selectDeptCount(deptId) > 0)
{
return error(1, "存在下级部门,不允许删除");
return AjaxResult.warn("存在下级部门,不允许删除");
}
if (deptService.checkDeptExistUser(deptId))
{
return error(1, "部门存在用户,不允许删除");
return AjaxResult.warn("部门存在用户,不允许删除");
}
return toAjax(deptService.deleteDeptById(deptId));
}
@@ -147,10 +147,10 @@ public class SysDeptController extends BaseController
*/
@GetMapping("/treeData")
@ResponseBody
public List<Map<String, Object>> treeData()
public List<Ztree> treeData()
{
List<Map<String, Object>> tree = deptService.selectDeptTree(new SysDept());
return tree;
List<Ztree> ztrees = deptService.selectDeptTree(new SysDept());
return ztrees;
}
/**
@@ -158,9 +158,9 @@ public class SysDeptController extends BaseController
*/
@GetMapping("/roleDeptTreeData")
@ResponseBody
public List<Map<String, Object>> deptTreeData(SysRole role)
public List<Ztree> deptTreeData(SysRole role)
{
List<Map<String, Object>> tree = deptService.roleDeptTreeData(role);
return tree;
List<Ztree> ztrees = deptService.roleDeptTreeData(role);
return ztrees;
}
}
@@ -11,14 +11,14 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.base.AjaxResult;
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.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.system.domain.SysDictData;
import com.ruoyi.system.service.ISysDictDataService;
import com.ruoyi.framework.web.base.BaseController;
/**
* 数据字典信息
@@ -11,14 +11,14 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.base.AjaxResult;
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.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.system.domain.SysDictType;
import com.ruoyi.system.service.ISysDictTypeService;
import com.ruoyi.framework.web.base.BaseController;
/**
* 数据字典信息
@@ -6,10 +6,11 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import com.ruoyi.common.config.Global;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.system.domain.SysMenu;
import com.ruoyi.system.domain.SysUser;
import com.ruoyi.system.service.ISysMenuService;
import com.ruoyi.framework.web.base.BaseController;
/**
* 首页 业务处理
@@ -27,7 +28,7 @@ public class SysIndexController extends BaseController
public String index(ModelMap mmap)
{
// 取身份信息
SysUser user = getSysUser();
SysUser user = ShiroUtils.getSysUser();
// 根据用户id取出菜单
List<SysMenu> menus = menuService.selectMenusByUser(user);
mmap.put("menus", menus);
@@ -10,10 +10,10 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.util.ServletUtils;
import com.ruoyi.framework.web.base.BaseController;
/**
* 登录验证
@@ -1,7 +1,6 @@
package com.ruoyi.web.controller.system;
import java.util.List;
import java.util.Map;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@@ -12,13 +11,14 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.Ztree;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.system.domain.SysMenu;
import com.ruoyi.system.domain.SysRole;
import com.ruoyi.system.service.ISysMenuService;
import com.ruoyi.framework.web.base.BaseController;
/**
* 菜单信息
@@ -55,17 +55,17 @@ public class SysMenuController extends BaseController
*/
@Log(title = "菜单管理", businessType = BusinessType.DELETE)
@RequiresPermissions("system:menu:remove")
@PostMapping("/remove/{menuId}")
@GetMapping("/remove/{menuId}")
@ResponseBody
public AjaxResult remove(@PathVariable("menuId") Long menuId)
{
if (menuService.selectCountMenuByParentId(menuId) > 0)
{
return error(1, "存在子菜单,不允许删除");
return AjaxResult.warn("存在子菜单,不允许删除");
}
if (menuService.selectCountRoleMenuByMenuId(menuId) > 0)
{
return error(1, "菜单已分配,不允许删除");
return AjaxResult.warn("菜单已分配,不允许删除");
}
ShiroUtils.clearCachedAuthorizationInfo();
return toAjax(menuService.deleteMenuById(menuId));
@@ -154,10 +154,10 @@ public class SysMenuController extends BaseController
*/
@GetMapping("/roleMenuTreeData")
@ResponseBody
public List<Map<String, Object>> roleMenuTreeData(SysRole role)
public List<Ztree> roleMenuTreeData(SysRole role)
{
List<Map<String, Object>> tree = menuService.roleMenuTreeData(role);
return tree;
List<Ztree> ztrees = menuService.roleMenuTreeData(role);
return ztrees;
}
/**
@@ -165,10 +165,10 @@ public class SysMenuController extends BaseController
*/
@GetMapping("/menuTreeData")
@ResponseBody
public List<Map<String, Object>> menuTreeData(SysRole role)
public List<Ztree> menuTreeData(SysRole role)
{
List<Map<String, Object>> tree = menuService.menuTreeData();
return tree;
List<Ztree> ztrees = menuService.menuTreeData();
return ztrees;
}
/**
@@ -11,13 +11,13 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.base.AjaxResult;
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.page.TableDataInfo;
import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.system.domain.SysNotice;
import com.ruoyi.system.service.ISysNoticeService;
import com.ruoyi.framework.web.base.BaseController;
/**
* 公告 信息操作处理
@@ -11,14 +11,14 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.base.AjaxResult;
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.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.system.domain.SysPost;
import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.framework.web.base.BaseController;
/**
* 岗位信息操作处理
@@ -12,17 +12,16 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.common.config.Global;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.framework.shiro.service.SysPasswordService;
import com.ruoyi.framework.util.FileUploadUtils;
import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.system.domain.SysUser;
import com.ruoyi.system.service.ISysDictDataService;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.framework.web.base.BaseController;
/**
* 个人信息 业务处理
@@ -43,17 +42,13 @@ public class SysProfileController extends BaseController
@Autowired
private SysPasswordService passwordService;
@Autowired
private ISysDictDataService dictDataService;
/**
* 个人信息
*/
@GetMapping()
public String profile(ModelMap mmap)
{
SysUser user = getSysUser();
user.setSex(dictDataService.selectDictLabel("sys_user_sex", user.getSex()));
SysUser user = ShiroUtils.getSysUser();
mmap.put("user", user);
mmap.put("roleGroup", userService.selectUserRoleGroup(user.getUserId()));
mmap.put("postGroup", userService.selectUserPostGroup(user.getUserId()));
@@ -64,7 +59,7 @@ public class SysProfileController extends BaseController
@ResponseBody
public boolean checkPassword(String password)
{
SysUser user = getSysUser();
SysUser user = ShiroUtils.getSysUser();
if (passwordService.matches(user, password))
{
return true;
@@ -75,7 +70,7 @@ public class SysProfileController extends BaseController
@GetMapping("/resetPwd")
public String resetPwd(ModelMap mmap)
{
SysUser user = getSysUser();
SysUser user = ShiroUtils.getSysUser();
mmap.put("user", userService.selectUserById(user.getUserId()));
return prefix + "/resetPwd";
}
@@ -85,14 +80,14 @@ public class SysProfileController extends BaseController
@ResponseBody
public AjaxResult resetPwd(String oldPassword, String newPassword)
{
SysUser user = getSysUser();
SysUser user = ShiroUtils.getSysUser();
if (StringUtils.isNotEmpty(newPassword) && passwordService.matches(user, oldPassword))
{
user.setSalt(ShiroUtils.randomSalt());
user.setPassword(passwordService.encryptPassword(user.getLoginName(), newPassword, user.getSalt()));
if (userService.resetUserPwd(user) > 0)
{
setSysUser(userService.selectUserById(user.getUserId()));
ShiroUtils.setSysUser(userService.selectUserById(user.getUserId()));
return success();
}
return error();
@@ -109,7 +104,7 @@ public class SysProfileController extends BaseController
@GetMapping("/edit")
public String edit(ModelMap mmap)
{
SysUser user = getSysUser();
SysUser user = ShiroUtils.getSysUser();
mmap.put("user", userService.selectUserById(user.getUserId()));
return prefix + "/edit";
}
@@ -120,7 +115,7 @@ public class SysProfileController extends BaseController
@GetMapping("/avatar")
public String avatar(ModelMap mmap)
{
SysUser user = getSysUser();
SysUser user = ShiroUtils.getSysUser();
mmap.put("user", userService.selectUserById(user.getUserId()));
return prefix + "/avatar";
}
@@ -133,14 +128,14 @@ public class SysProfileController extends BaseController
@ResponseBody
public AjaxResult update(SysUser user)
{
SysUser currentUser = getSysUser();
SysUser currentUser = ShiroUtils.getSysUser();
currentUser.setUserName(user.getUserName());
currentUser.setEmail(user.getEmail());
currentUser.setPhonenumber(user.getPhonenumber());
currentUser.setSex(user.getSex());
if (userService.updateUserInfo(currentUser) > 0)
{
setSysUser(userService.selectUserById(currentUser.getUserId()));
ShiroUtils.setSysUser(userService.selectUserById(currentUser.getUserId()));
return success();
}
return error();
@@ -154,7 +149,7 @@ public class SysProfileController extends BaseController
@ResponseBody
public AjaxResult updateAvatar(@RequestParam("avatarfile") MultipartFile file)
{
SysUser currentUser = getSysUser();
SysUser currentUser = ShiroUtils.getSysUser();
try
{
if (!file.isEmpty())
@@ -163,7 +158,7 @@ public class SysProfileController extends BaseController
currentUser.setAvatar(avatar);
if (userService.updateUserInfo(currentUser) > 0)
{
setSysUser(userService.selectUserById(currentUser.getUserId()));
ShiroUtils.setSysUser(userService.selectUserById(currentUser.getUserId()));
return success();
}
}
@@ -4,7 +4,6 @@ import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
@@ -12,14 +11,17 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.base.AjaxResult;
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.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.system.domain.SysRole;
import com.ruoyi.system.domain.SysUser;
import com.ruoyi.system.domain.SysUserRole;
import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.framework.web.base.BaseController;
import com.ruoyi.system.service.ISysUserService;
/**
* 角色信息
@@ -35,6 +37,9 @@ public class SysRoleController extends BaseController
@Autowired
private ISysRoleService roleService;
@Autowired
private ISysUserService userService;
@RequiresPermissions("system:role:view")
@GetMapping()
public String role()
@@ -78,7 +83,6 @@ public class SysRoleController extends BaseController
@RequiresPermissions("system:role:add")
@Log(title = "角色管理", businessType = BusinessType.INSERT)
@PostMapping("/add")
@Transactional(rollbackFor = Exception.class)
@ResponseBody
public AjaxResult addSave(SysRole role)
{
@@ -104,7 +108,6 @@ public class SysRoleController extends BaseController
@RequiresPermissions("system:role:edit")
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@Transactional(rollbackFor = Exception.class)
@ResponseBody
public AjaxResult editSave(SysRole role)
{
@@ -114,27 +117,25 @@ public class SysRoleController extends BaseController
}
/**
* 新增数据权限
* 角色分配数据权限
*/
@GetMapping("/rule/{roleId}")
public String rule(@PathVariable("roleId") Long roleId, ModelMap mmap)
@GetMapping("/authDataScope/{roleId}")
public String authDataScope(@PathVariable("roleId") Long roleId, ModelMap mmap)
{
mmap.put("role", roleService.selectRoleById(roleId));
return prefix + "/rule";
return prefix + "/dataScope";
}
/**
* 修改保存数据权限
* 保存角色分配数据权限
*/
@RequiresPermissions("system:role:edit")
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
@PostMapping("/rule")
@Transactional(rollbackFor = Exception.class)
@PostMapping("/authDataScope")
@ResponseBody
public AjaxResult ruleSave(SysRole role)
public AjaxResult authDataScopeSave(SysRole role)
{
role.setUpdateBy(ShiroUtils.getLoginName());
return toAjax(roleService.updateRule(role));
return toAjax(roleService.authDataScope(role));
}
@RequiresPermissions("system:role:remove")
@@ -193,4 +194,84 @@ public class SysRoleController extends BaseController
{
return toAjax(roleService.changeStatus(role));
}
/**
* 分配用户
*/
@RequiresPermissions("system:role:edit")
@GetMapping("/authUser/{roleId}")
public String authUser(@PathVariable("roleId") Long roleId, ModelMap mmap)
{
mmap.put("role", roleService.selectRoleById(roleId));
return prefix + "/authUser";
}
/**
* 查询已分配用户角色列表
*/
@RequiresPermissions("system:role:list")
@PostMapping("/authUser/allocatedList")
@ResponseBody
public TableDataInfo allocatedList(SysUser user)
{
startPage();
List<SysUser> list = userService.selectAllocatedList(user);
return getDataTable(list);
}
/**
* 取消授权
*/
@Log(title = "角色管理", businessType = BusinessType.GRANT)
@PostMapping("/authUser/cancel")
@ResponseBody
public AjaxResult cancelAuthUser(SysUserRole userRole)
{
return toAjax(roleService.deleteAuthUser(userRole));
}
/**
* 批量取消授权
*/
@Log(title = "角色管理", businessType = BusinessType.GRANT)
@PostMapping("/authUser/cancelAll")
@ResponseBody
public AjaxResult cancelAuthUserAll(Long roleId, String userIds)
{
return toAjax(roleService.deleteAuthUsers(roleId, userIds));
}
/**
* 选择用户
*/
@GetMapping("/authUser/selectUser/{roleId}")
public String selectUser(@PathVariable("roleId") Long roleId, ModelMap mmap)
{
mmap.put("role", roleService.selectRoleById(roleId));
return prefix + "/selectUser";
}
/**
* 查询未分配用户角色列表
*/
@RequiresPermissions("system:role:list")
@PostMapping("/authUser/unallocatedList")
@ResponseBody
public TableDataInfo unallocatedList(SysUser user)
{
startPage();
List<SysUser> list = userService.selectUnallocatedList(user);
return getDataTable(list);
}
/**
* 批量选择用户授权
*/
@Log(title = "角色管理", businessType = BusinessType.GRANT)
@PostMapping("/authUser/selectAll")
@ResponseBody
public AjaxResult selectAuthUserAll(Long roleId, String userIds)
{
return toAjax(roleService.insertAuthUsers(roleId, userIds));
}
}
@@ -4,7 +4,6 @@ import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
@@ -13,14 +12,14 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.base.AjaxResult;
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.page.TableDataInfo;
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;
import com.ruoyi.framework.web.base.BaseController;
import com.ruoyi.system.domain.SysUser;
import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.system.service.ISysRoleService;
@@ -85,7 +84,7 @@ public class SysUserController extends BaseController
{
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
List<SysUser> userList = util.importExcel(file.getInputStream());
String operName = getSysUser().getLoginName();
String operName = ShiroUtils.getSysUser().getLoginName();
String message = userService.importUser(userList, updateSupport, operName);
return AjaxResult.success(message);
}
@@ -116,7 +115,6 @@ public class SysUserController extends BaseController
@RequiresPermissions("system:user:add")
@Log(title = "用户管理", businessType = BusinessType.INSERT)
@PostMapping("/add")
@Transactional(rollbackFor = Exception.class)
@ResponseBody
public AjaxResult addSave(SysUser user)
{
@@ -148,7 +146,6 @@ public class SysUserController extends BaseController
@RequiresPermissions("system:user:edit")
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@Transactional(rollbackFor = Exception.class)
@ResponseBody
public AjaxResult editSave(SysUser user)
{
@@ -4,7 +4,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import com.ruoyi.framework.web.base.BaseController;
import com.ruoyi.common.core.controller.BaseController;
/**
* build 表单构建
@@ -4,7 +4,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import com.ruoyi.framework.web.base.BaseController;
import com.ruoyi.common.core.controller.BaseController;
/**
* swagger 接口
@@ -2,17 +2,14 @@ package com.ruoyi.web.controller.tool;
import java.util.ArrayList;
import java.util.List;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.framework.web.base.BaseController;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
@@ -34,12 +34,17 @@ spring:
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
testOnReturn: false
webStatFilter:
enabled: true
statViewServlet:
enabled: true
# 设置白名单,不填则允许所有访问
allow:
url-pattern: /monitor/druid/*
filter:
stat:
enabled: true
# 慢SQL记录
log-slow-sql: true
slow-sql-millis: 1000
+2 -13
View File
@@ -3,10 +3,10 @@ ruoyi:
# 名称
name: RuoYi
# 版本
version: 3.2.0
version: 3.3.0
# 版权年份
copyrightYear: 2019
# 文件上传路径
# 文件上传
profile: D:/profile/
# 获取ip地址开关
addressEnabled: true
@@ -121,14 +121,3 @@ xss:
excludes: /system/notice/*
# 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/*
# 代码生成
gen:
# 作者
author: ruoyi
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
packageName: com.ruoyi.system
# 自动去除表前缀,默认是true
autoRemovePre: true
# 表前缀(类名不会包含表前缀)
tablePrefix: sys_
@@ -22,13 +22,10 @@ user.notfound=请重新登录
user.forcelogout=管理员强制退出,请重新登录
user.unknown.error=未知错误,请重新登录
#批量插入用户错误信
user.import.excel.null=Excel数据为空,请按照导入模板填写数据
user.import.excel.data.null=Excel数据为空,只有标题行,请按照导入模板填写数据
user.import.excel.filetype.error=文件不是Excel文件
user.import.excel.file.error=文件名为空,文件为空
user.import.excel.fileinput.error=获取Excel2003流错误
user.import.excel.fileinputx.error=获取Excel2007流错误
##文件上传消
upload.exceed.maxSize=上传的文件大小超出限制的文件大小!<br/>允许的文件最大大小是:{0}MB!
upload.filename.exceed.length=上传的文件名最长{0}个字符
##权限
no.permission=您没有数据的权限,请联系管理员添加权限 [{0}]
no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}]
File diff suppressed because one or more lines are too long
@@ -0,0 +1,27 @@
.fixed-table-header-columns,
.fixed-table-body-columns {
position: absolute;
background-color: #fff;
display: none;
box-sizing: border-box;
overflow: hidden;
}
.fixed-table-header-columns .table,
.fixed-table-body-columns .table {
border-right: 1px solid #ddd;
}
.fixed-table-header-columns .table.table-no-bordered,
.fixed-table-body-columns .table.table-no-bordered {
border-right: 1px solid transparent;
}
.fixed-table-body-columns table {
position: absolute;
animation: none;
}
.bootstrap-table .table-hover > tbody > tr.hover > td {
background-color: #f5f5f5;
}
@@ -0,0 +1,256 @@
/**
* 基于bootstrap-table-fixed-columns修改
* 支持左右列冻结
* Copyright (c) 2019 ruoyi
*/
(function ($) {
'use strict';
$.extend($.fn.bootstrapTable.defaults, {
fixedColumns: false,
fixedNumber: 1,
rightFixedColumns: false,
rightFixedNumber: 1
});
var BootstrapTable = $.fn.bootstrapTable.Constructor,
_initHeader = BootstrapTable.prototype.initHeader,
_initBody = BootstrapTable.prototype.initBody,
_resetView = BootstrapTable.prototype.resetView;
BootstrapTable.prototype.initFixedColumns = function () {
this.timeoutHeaderColumns_ = 0;
this.timeoutBodyColumns_ = 0;
if (this.options.fixedColumns) {
this.$fixedBody = $([
'<div class="fixed-table-column" style="position: absolute; background-color: #fff; border-right:1px solid #ddd;">',
'<table>',
'<thead></thead>',
'<tbody></tbody>',
'</table>',
'</div>'].join(''));
this.$fixedBody.find('table').attr('class', this.$el.attr('class'));
this.$fixedHeaderColumns = this.$fixedBody.find('thead');
this.$fixedBodyColumns = this.$fixedBody.find('tbody');
this.$tableBody.before(this.$fixedBody);
}
if (this.options.rightFixedColumns) {
this.$rightfixedBody = $([
'<div class="fixed-table-column" style="position: absolute;right:0px; background-color: #fff; border-right:1px solid #ddd;">',
'<table>',
'<thead></thead>',
'<tbody></tbody>',
'</table>',
'</div>'].join(''));
this.$rightfixedBody.find('table').attr('class', this.$el.attr('class'));
this.$rightfixedHeaderColumns = this.$rightfixedBody.find('thead');
this.$rightfixedBodyColumns = this.$rightfixedBody.find('tbody');
this.$tableBody.before(this.$rightfixedBody);
}
};
BootstrapTable.prototype.initHeader = function () {
_initHeader.apply(this, Array.prototype.slice.apply(arguments));
if (!this.options.fixedColumns && !this.options.rightFixedColumns){
return;
}
this.initFixedColumns();
var $ltr = this.$header.find('tr:eq(0)').clone(),
$rtr = this.$header.find('tr:eq(0)').clone(),
$lths = $ltr.clone().find('th'),
$rths = $rtr.clone().find('th');
$ltr.html('');
$rtr.html('');
//右边列冻结
if (this.options.rightFixedColumns) {
for (var i = 0; i < this.options.rightFixedNumber; i++) {
$rtr.append($rths.eq($rths.length - this.options.rightFixedNumber + i).clone());
}
this.$rightfixedHeaderColumns.html('').append($rtr);
}
//左边列冻结
if (this.options.fixedColumns) {
for (var i = 0; i < this.options.fixedNumber; i++) {
$ltr.append($lths.eq(i).clone());
}
this.$fixedHeaderColumns.html('').append($ltr);
}
};
BootstrapTable.prototype.initBody = function () {
_initBody.apply(this, Array.prototype.slice.apply(arguments));
if (!this.options.fixedColumns && !this.options.rightFixedColumns) {
return;
}
var that = this;
if (this.options.fixedColumns) {
this.$fixedBodyColumns.html('');
this.$body.find('> tr[data-index]').each(function () {
var $tr = $(this).clone(),
$tds = $tr.clone().find('td');
$tr.html('');
for (var i = 0; i < that.options.fixedNumber; i++) {
$tr.append($tds.eq(i).clone());
}
that.$fixedBodyColumns.append($tr);
});
}
if (this.options.rightFixedColumns) {
this.$rightfixedBodyColumns.html('');
this.$body.find('> tr[data-index]').each(function () {
var $tr = $(this).clone(),
$tds = $tr.clone().find('td');
$tr.html('');
for (var i = 0; i < that.options.rightFixedNumber; i++) {
var indexTd = $tds.length - that.options.rightFixedNumber + i;
var oldTd = $tds.eq(indexTd);
var fixTd = oldTd.clone();
var buttons = fixTd.find('button');
//事件转移:冻结列里面的事件转移到实际按钮的事件
buttons.each(function (key, item) {
$(item).click(function () {
that.$body.find("tr[data-index=" + $tr.attr('data-index') + "] td:eq(" + indexTd + ") button:eq(" + key + ")").click();
});
});
$tr.append(fixTd);
}
that.$rightfixedBodyColumns.append($tr);
});
}
};
BootstrapTable.prototype.resetView = function () {
_resetView.apply(this, Array.prototype.slice.apply(arguments));
if (!this.options.fixedColumns && !this.options.rightFixedColumns) {
return;
}
clearTimeout(this.timeoutHeaderColumns_);
this.timeoutHeaderColumns_ = setTimeout($.proxy(this.fitHeaderColumns, this), this.$el.is(':hidden') ? 100 : 0);
clearTimeout(this.timeoutBodyColumns_);
this.timeoutBodyColumns_ = setTimeout($.proxy(this.fitBodyColumns, this), this.$el.is(':hidden') ? 100 : 0);
};
BootstrapTable.prototype.fitHeaderColumns = function () {
var that = this,
visibleFields = this.getVisibleFields(),
headerWidth = 0;
if (that.options.fixedColumns) {
this.$body.find('tr:first-child:not(.no-records-found) > *').each(function (i) {
var $this = $(this),
index = i;
if (i >= that.options.fixedNumber) {
return false;
}
if (that.options.detailView && !that.options.cardView) {
index = i - 1;
}
that.$fixedBody.find('thead th[data-field="' + visibleFields[index] + '"]')
.find('.fht-cell').width($this.innerWidth() - 1);
headerWidth += $this.outerWidth();
});
this.$fixedBody.width(headerWidth - 1).show();
}
if (that.options.rightFixedColumns) {
this.$body.find('tr:first-child:not(.no-records-found) > *').each(function (i) {
var $this = $(this),
index = i;
if (i >= visibleFields.length - that.options.rightFixedNumber) {
return false;
if (that.options.detailView && !that.options.cardView) {
index = i - 1;
}
that.$rightfixedBody.find('thead th[data-field="' + visibleFields[index] + '"]')
.find('.fht-cell').width($this.innerWidth() - 1);
headerWidth += $this.outerWidth();
}
});
this.$rightfixedBody.width(headerWidth - 1).show();
}
};
BootstrapTable.prototype.fitBodyColumns = function () {
var that = this,
top = -(parseInt(this.$el.css('margin-top')) - 2),
height = this.$tableBody.height() - 2;
if (that.options.fixedColumns) {
if (!this.$body.find('> tr[data-index]').length) {
this.$fixedBody.hide();
return;
}
this.$body.find('> tr').each(function (i) {
that.$fixedBody.find('tbody tr:eq(' + i + ')').height($(this).height());
});
//// events
this.$tableBody.on('scroll', function () {
that.$fixedBody.find('table').css('top', -$(this).scrollTop());
});
this.$body.find('> tr[data-index]').off('hover').hover(function () {
var index = $(this).data('index');
that.$fixedBody.find('tr[data-index="' + index + '"]').addClass('hover');
}, function () {
var index = $(this).data('index');
that.$fixedBody.find('tr[data-index="' + index + '"]').removeClass('hover');
});
this.$fixedBody.find('tr[data-index]').off('hover').hover(function () {
var index = $(this).data('index');
that.$body.find('tr[data-index="' + index + '"]').addClass('hover');
}, function () {
var index = $(this).data('index');
that.$body.find('> tr[data-index="' + index + '"]').removeClass('hover');
});
}
if (that.options.rightFixedColumns) {
if (!this.$body.find('> tr[data-index]').length) {
this.$rightfixedBody.hide();
return;
}
this.$body.find('> tr').each(function (i) {
that.$rightfixedBody.find('tbody tr:eq(' + i + ')').height($(this).height());
});
//// events
this.$tableBody.on('scroll', function () {
that.$rightfixedBody.find('table').css('top', -$(this).scrollTop());
});
this.$body.find('> tr[data-index]').off('hover').hover(function () {
var index = $(this).data('index');
that.$rightfixedBody.find('tr[data-index="' + index + '"]').addClass('hover');
}, function () {
var index = $(this).data('index');
that.$rightfixedBody.find('tr[data-index="' + index + '"]').removeClass('hover');
});
this.$rightfixedBody.find('tr[data-index]').off('hover').hover(function () {
var index = $(this).data('index');
that.$body.find('tr[data-index="' + index + '"]').addClass('hover');
}, function () {
var index = $(this).data('index');
that.$body.find('> tr[data-index="' + index + '"]').removeClass('hover');
});
}
};
})(jQuery);
@@ -15,8 +15,8 @@
// 判断是否 iphone
var isIPhone = function () {
let browserName = navigator.userAgent.toLowerCase();
return /(iphone)/i.test(browserName);
var browserName = navigator.userAgent.toLowerCase();
return /(iPhone|iPad|iPod|iOS)/i.test(browserName);
};
var changeView = function (that, width, height) {
@@ -2,11 +2,11 @@
.bootstrap-tree-table .treetable-expander {width:16px; height: 16px; display: inline-block; position: relative; cursor: pointer;}
.bootstrap-tree-table .treetable-selected{background: #f5f5f5 !important;}
.bootstrap-tree-table .treetable-table{border:0 !important;margin-bottom:0}
.bootstrap-tree-table .treetable-table tbody {display:block;height:auto;overflow-y:auto;}
.bootstrap-tree-table .treetable-table tbody {display:block;height:auto;}
.bootstrap-tree-table .treetable-table thead, .treetable-table tbody tr {display:table;width:100%;table-layout:fixed;}
.bootstrap-tree-table .treetable-thead th{line-height:24px;border: 0 !important;border-radius: 4px;border-left:0px solid #e7eaec !important;border-bottom:1px solid #ccc!important;text-align: left;}
.bootstrap-tree-table .treetable-thead tr :first-child{border-left:0 !important}
.bootstrap-tree-table .treetable-tbody td{border: 0 !important;border-left:0px solid #e7eaec !important;border-bottom:1px solid #e7eaec!important;overflow: hidden; white-space: nowrap; text-overflow: ellipsis;}
.bootstrap-tree-table .treetable-tbody td{border: 0 !important;border-left:0px solid #e7eaec !important;border-bottom:1px solid #e7eaec!important;white-space: nowrap; text-overflow: ellipsis;}
.bootstrap-tree-table .treetable-tbody tr :first-child{border-left:0 !important}
.bootstrap-tree-table .treetable-bars .tool-left, .bootstrap-tree-table .treetable-bars .tool-right{margin-top: 10px; margin-bottom: 10px;}
.bootstrap-tree-table .treetable-bars .tool-left{float: left;}
@@ -123,6 +123,7 @@
$(window).bind('mouseup', imgMouseUp);
el.bind('mousewheel DOMMouseScroll', zoomImage);
};
obj.image.crossOrigin = 'Anonymous';
obj.image.src = options.imgSrc;
el.on('remove', function(){$(window).unbind('mouseup', imgMouseUp)});
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,418 @@
/*!
* Datetimepicker 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
*
*/
.datetimepicker {
padding: 4px;
margin-top: 1px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
direction: ltr;
}
.datetimepicker-inline {
width: 220px;
}
.datetimepicker.datetimepicker-rtl {
direction: rtl;
}
.datetimepicker.datetimepicker-rtl table tr td span {
float: right;
}
.datetimepicker-dropdown, .datetimepicker-dropdown-left {
top: 0;
left: 0;
}
[class*=" datetimepicker-dropdown"]:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #cccccc;
border-bottom-color: rgba(0, 0, 0, 0.2);
position: absolute;
}
[class*=" datetimepicker-dropdown"]:after {
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #ffffff;
position: absolute;
}
[class*=" datetimepicker-dropdown-top"]:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-top: 7px solid #cccccc;
border-top-color: rgba(0, 0, 0, 0.2);
border-bottom: 0;
}
[class*=" datetimepicker-dropdown-top"]:after {
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-top: 6px solid #ffffff;
border-bottom: 0;
}
.datetimepicker-dropdown-bottom-left:before {
top: -7px;
right: 6px;
}
.datetimepicker-dropdown-bottom-left:after {
top: -6px;
right: 7px;
}
.datetimepicker-dropdown-bottom-right:before {
top: -7px;
left: 6px;
}
.datetimepicker-dropdown-bottom-right:after {
top: -6px;
left: 7px;
}
.datetimepicker-dropdown-top-left:before {
bottom: -7px;
right: 6px;
}
.datetimepicker-dropdown-top-left:after {
bottom: -6px;
right: 7px;
}
.datetimepicker-dropdown-top-right:before {
bottom: -7px;
left: 6px;
}
.datetimepicker-dropdown-top-right:after {
bottom: -6px;
left: 7px;
}
.datetimepicker > div {
display: none;
}
.datetimepicker.minutes div.datetimepicker-minutes {
display: block;
}
.datetimepicker.hours div.datetimepicker-hours {
display: block;
}
.datetimepicker.days div.datetimepicker-days {
display: block;
}
.datetimepicker.months div.datetimepicker-months {
display: block;
}
.datetimepicker.years div.datetimepicker-years {
display: block;
}
.datetimepicker table {
margin: 0;
}
.datetimepicker td,
.datetimepicker th {
text-align: center;
width: 20px;
height: 20px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
border: none;
}
.table-striped .datetimepicker table tr td,
.table-striped .datetimepicker table tr th {
background-color: transparent;
}
.datetimepicker table tr td.minute:hover {
background: #eeeeee;
cursor: pointer;
}
.datetimepicker table tr td.hour:hover {
background: #eeeeee;
cursor: pointer;
}
.datetimepicker table tr td.day:hover {
background: #eeeeee;
cursor: pointer;
}
.datetimepicker table tr td.old,
.datetimepicker table tr td.new {
color: #999999;
}
.datetimepicker table tr td.disabled,
.datetimepicker table tr td.disabled:hover {
background: none;
color: #999999;
cursor: default;
}
.datetimepicker table tr td.today,
.datetimepicker table tr td.today:hover,
.datetimepicker table tr td.today.disabled,
.datetimepicker 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(to bottom, #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);
}
.datetimepicker table tr td.today:hover,
.datetimepicker table tr td.today:hover:hover,
.datetimepicker table tr td.today.disabled:hover,
.datetimepicker table tr td.today.disabled:hover:hover,
.datetimepicker table tr td.today:active,
.datetimepicker table tr td.today:hover:active,
.datetimepicker table tr td.today.disabled:active,
.datetimepicker table tr td.today.disabled:hover:active,
.datetimepicker table tr td.today.active,
.datetimepicker table tr td.today:hover.active,
.datetimepicker table tr td.today.disabled.active,
.datetimepicker table tr td.today.disabled:hover.active,
.datetimepicker table tr td.today.disabled,
.datetimepicker table tr td.today:hover.disabled,
.datetimepicker table tr td.today.disabled.disabled,
.datetimepicker table tr td.today.disabled:hover.disabled,
.datetimepicker table tr td.today[disabled],
.datetimepicker table tr td.today:hover[disabled],
.datetimepicker table tr td.today.disabled[disabled],
.datetimepicker table tr td.today.disabled:hover[disabled] {
background-color: #fdf59a;
}
.datetimepicker table tr td.today:active,
.datetimepicker table tr td.today:hover:active,
.datetimepicker table tr td.today.disabled:active,
.datetimepicker table tr td.today.disabled:hover:active,
.datetimepicker table tr td.today.active,
.datetimepicker table tr td.today:hover.active,
.datetimepicker table tr td.today.disabled.active,
.datetimepicker table tr td.today.disabled:hover.active {
background-color: #fbf069;
}
.datetimepicker table tr td.active,
.datetimepicker table tr td.active:hover,
.datetimepicker table tr td.active.disabled,
.datetimepicker 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(to bottom, #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: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datetimepicker table tr td.active:hover,
.datetimepicker table tr td.active:hover:hover,
.datetimepicker table tr td.active.disabled:hover,
.datetimepicker table tr td.active.disabled:hover:hover,
.datetimepicker table tr td.active:active,
.datetimepicker table tr td.active:hover:active,
.datetimepicker table tr td.active.disabled:active,
.datetimepicker table tr td.active.disabled:hover:active,
.datetimepicker table tr td.active.active,
.datetimepicker table tr td.active:hover.active,
.datetimepicker table tr td.active.disabled.active,
.datetimepicker table tr td.active.disabled:hover.active,
.datetimepicker table tr td.active.disabled,
.datetimepicker table tr td.active:hover.disabled,
.datetimepicker table tr td.active.disabled.disabled,
.datetimepicker table tr td.active.disabled:hover.disabled,
.datetimepicker table tr td.active[disabled],
.datetimepicker table tr td.active:hover[disabled],
.datetimepicker table tr td.active.disabled[disabled],
.datetimepicker table tr td.active.disabled:hover[disabled] {
background-color: #0044cc;
}
.datetimepicker table tr td.active:active,
.datetimepicker table tr td.active:hover:active,
.datetimepicker table tr td.active.disabled:active,
.datetimepicker table tr td.active.disabled:hover:active,
.datetimepicker table tr td.active.active,
.datetimepicker table tr td.active:hover.active,
.datetimepicker table tr td.active.disabled.active,
.datetimepicker table tr td.active.disabled:hover.active {
background-color: #003399;
}
.datetimepicker 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;
}
.datetimepicker .datetimepicker-hours span {
height: 26px;
line-height: 26px;
}
.datetimepicker .datetimepicker-hours table tr td span.hour_am,
.datetimepicker .datetimepicker-hours table tr td span.hour_pm {
width: 14.6%;
}
.datetimepicker .datetimepicker-hours fieldset legend,
.datetimepicker .datetimepicker-minutes fieldset legend {
margin-bottom: inherit;
line-height: 30px;
}
.datetimepicker .datetimepicker-minutes span {
height: 26px;
line-height: 26px;
}
.datetimepicker table tr td span:hover {
background: #eeeeee;
}
.datetimepicker table tr td span.disabled,
.datetimepicker table tr td span.disabled:hover {
background: none;
color: #999999;
cursor: default;
}
.datetimepicker table tr td span.active,
.datetimepicker table tr td span.active:hover,
.datetimepicker table tr td span.active.disabled,
.datetimepicker 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(to bottom, #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: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datetimepicker table tr td span.active:hover,
.datetimepicker table tr td span.active:hover:hover,
.datetimepicker table tr td span.active.disabled:hover,
.datetimepicker table tr td span.active.disabled:hover:hover,
.datetimepicker table tr td span.active:active,
.datetimepicker table tr td span.active:hover:active,
.datetimepicker table tr td span.active.disabled:active,
.datetimepicker table tr td span.active.disabled:hover:active,
.datetimepicker table tr td span.active.active,
.datetimepicker table tr td span.active:hover.active,
.datetimepicker table tr td span.active.disabled.active,
.datetimepicker table tr td span.active.disabled:hover.active,
.datetimepicker table tr td span.active.disabled,
.datetimepicker table tr td span.active:hover.disabled,
.datetimepicker table tr td span.active.disabled.disabled,
.datetimepicker table tr td span.active.disabled:hover.disabled,
.datetimepicker table tr td span.active[disabled],
.datetimepicker table tr td span.active:hover[disabled],
.datetimepicker table tr td span.active.disabled[disabled],
.datetimepicker table tr td span.active.disabled:hover[disabled] {
background-color: #0044cc;
}
.datetimepicker table tr td span.active:active,
.datetimepicker table tr td span.active:hover:active,
.datetimepicker table tr td span.active.disabled:active,
.datetimepicker table tr td span.active.disabled:hover:active,
.datetimepicker table tr td span.active.active,
.datetimepicker table tr td span.active:hover.active,
.datetimepicker table tr td span.active.disabled.active,
.datetimepicker table tr td span.active.disabled:hover.active {
background-color: #003399;
}
.datetimepicker table tr td span.old {
color: #999999;
}
.datetimepicker th.switch {
width: 145px;
}
.datetimepicker th span.glyphicon {
pointer-events: none;
}
.datetimepicker thead tr:first-child th,
.datetimepicker tfoot th {
cursor: pointer;
}
.datetimepicker thead tr:first-child th:hover,
.datetimepicker tfoot th:hover {
background: #eeeeee;
}
.input-append.date .add-on i,
.input-prepend.date .add-on i,
.input-group.date .input-group-addon span {
cursor: pointer;
width: 14px;
height: 14px;
}
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,789 +0,0 @@
/*!
* 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;
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-top: 0;
border-bottom-color: rgba(0, 0, 0, 0.2);
position: absolute;
}
.datepicker-dropdown:after {
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #fff;
border-top: 0;
position: absolute;
}
.datepicker-dropdown.datepicker-orient-left:before {
left: 6px;
}
.datepicker-dropdown.datepicker-orient-left:after {
left: 7px;
}
.datepicker-dropdown.datepicker-orient-right:before {
right: 6px;
}
.datepicker-dropdown.datepicker-orient-right:after {
right: 7px;
}
.datepicker-dropdown.datepicker-orient-top:before {
top: -7px;
}
.datepicker-dropdown.datepicker-orient-top:after {
top: -6px;
}
.datepicker-dropdown.datepicker-orient-bottom:before {
bottom: -7px;
border-bottom: 0;
border-top: 7px solid #999;
}
.datepicker-dropdown.datepicker-orient-bottom:after {
bottom: -6px;
border-bottom: 0;
border-top: 6px solid #fff;
}
.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;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.datepicker table tr td,
.datepicker table tr th {
text-align: center;
width: 30px;
height: 30px;
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,
.datepicker table tr td.day.focused {
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 {
color: #000000;
background-color: #ffdb99;
border-color: #ffb733;
}
.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:focus,
.datepicker table tr td.today:hover:focus,
.datepicker table tr td.today.disabled:focus,
.datepicker table tr td.today.disabled:hover:focus,
.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,
.open .dropdown-toggle.datepicker table tr td.today,
.open .dropdown-toggle.datepicker table tr td.today:hover,
.open .dropdown-toggle.datepicker table tr td.today.disabled,
.open .dropdown-toggle.datepicker table tr td.today.disabled:hover {
color: #000000;
background-color: #ffcd70;
border-color: #f59e00;
}
.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,
.open .dropdown-toggle.datepicker table tr td.today,
.open .dropdown-toggle.datepicker table tr td.today:hover,
.open .dropdown-toggle.datepicker table tr td.today.disabled,
.open .dropdown-toggle.datepicker table tr td.today.disabled:hover {
background-image: none;
}
.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],
fieldset[disabled] .datepicker table tr td.today,
fieldset[disabled] .datepicker table tr td.today:hover,
fieldset[disabled] .datepicker table tr td.today.disabled,
fieldset[disabled] .datepicker table tr td.today.disabled:hover,
.datepicker table tr td.today.disabled:hover,
.datepicker table tr td.today:hover.disabled:hover,
.datepicker table tr td.today.disabled.disabled:hover,
.datepicker table tr td.today.disabled:hover.disabled:hover,
.datepicker table tr td.today[disabled]:hover,
.datepicker table tr td.today:hover[disabled]:hover,
.datepicker table tr td.today.disabled[disabled]:hover,
.datepicker table tr td.today.disabled:hover[disabled]:hover,
fieldset[disabled] .datepicker table tr td.today:hover,
fieldset[disabled] .datepicker table tr td.today:hover:hover,
fieldset[disabled] .datepicker table tr td.today.disabled:hover,
fieldset[disabled] .datepicker table tr td.today.disabled:hover:hover,
.datepicker table tr td.today.disabled:focus,
.datepicker table tr td.today:hover.disabled:focus,
.datepicker table tr td.today.disabled.disabled:focus,
.datepicker table tr td.today.disabled:hover.disabled:focus,
.datepicker table tr td.today[disabled]:focus,
.datepicker table tr td.today:hover[disabled]:focus,
.datepicker table tr td.today.disabled[disabled]:focus,
.datepicker table tr td.today.disabled:hover[disabled]:focus,
fieldset[disabled] .datepicker table tr td.today:focus,
fieldset[disabled] .datepicker table tr td.today:hover:focus,
fieldset[disabled] .datepicker table tr td.today.disabled:focus,
fieldset[disabled] .datepicker table tr td.today.disabled:hover:focus,
.datepicker table tr td.today.disabled:active,
.datepicker table tr td.today:hover.disabled:active,
.datepicker table tr td.today.disabled.disabled:active,
.datepicker table tr td.today.disabled:hover.disabled:active,
.datepicker table tr td.today[disabled]:active,
.datepicker table tr td.today:hover[disabled]:active,
.datepicker table tr td.today.disabled[disabled]:active,
.datepicker table tr td.today.disabled:hover[disabled]:active,
fieldset[disabled] .datepicker table tr td.today:active,
fieldset[disabled] .datepicker table tr td.today:hover:active,
fieldset[disabled] .datepicker table tr td.today.disabled:active,
fieldset[disabled] .datepicker table tr td.today.disabled:hover:active,
.datepicker table tr td.today.disabled.active,
.datepicker table tr td.today:hover.disabled.active,
.datepicker table tr td.today.disabled.disabled.active,
.datepicker table tr td.today.disabled:hover.disabled.active,
.datepicker table tr td.today[disabled].active,
.datepicker table tr td.today:hover[disabled].active,
.datepicker table tr td.today.disabled[disabled].active,
.datepicker table tr td.today.disabled:hover[disabled].active,
fieldset[disabled] .datepicker table tr td.today.active,
fieldset[disabled] .datepicker table tr td.today:hover.active,
fieldset[disabled] .datepicker table tr td.today.disabled.active,
fieldset[disabled] .datepicker table tr td.today.disabled:hover.active {
background-color: #ffdb99;
border-color: #ffb733;
}
.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;
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 {
color: #000000;
background-color: #f7ca77;
border-color: #f1a417;
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:focus,
.datepicker table tr td.range.today:hover:focus,
.datepicker table tr td.range.today.disabled:focus,
.datepicker table tr td.range.today.disabled:hover:focus,
.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,
.open .dropdown-toggle.datepicker table tr td.range.today,
.open .dropdown-toggle.datepicker table tr td.range.today:hover,
.open .dropdown-toggle.datepicker table tr td.range.today.disabled,
.open .dropdown-toggle.datepicker table tr td.range.today.disabled:hover {
color: #000000;
background-color: #f4bb51;
border-color: #bf800c;
}
.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,
.open .dropdown-toggle.datepicker table tr td.range.today,
.open .dropdown-toggle.datepicker table tr td.range.today:hover,
.open .dropdown-toggle.datepicker table tr td.range.today.disabled,
.open .dropdown-toggle.datepicker table tr td.range.today.disabled:hover {
background-image: none;
}
.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],
fieldset[disabled] .datepicker table tr td.range.today,
fieldset[disabled] .datepicker table tr td.range.today:hover,
fieldset[disabled] .datepicker table tr td.range.today.disabled,
fieldset[disabled] .datepicker table tr td.range.today.disabled:hover,
.datepicker table tr td.range.today.disabled:hover,
.datepicker table tr td.range.today:hover.disabled:hover,
.datepicker table tr td.range.today.disabled.disabled:hover,
.datepicker table tr td.range.today.disabled:hover.disabled:hover,
.datepicker table tr td.range.today[disabled]:hover,
.datepicker table tr td.range.today:hover[disabled]:hover,
.datepicker table tr td.range.today.disabled[disabled]:hover,
.datepicker table tr td.range.today.disabled:hover[disabled]:hover,
fieldset[disabled] .datepicker table tr td.range.today:hover,
fieldset[disabled] .datepicker table tr td.range.today:hover:hover,
fieldset[disabled] .datepicker table tr td.range.today.disabled:hover,
fieldset[disabled] .datepicker table tr td.range.today.disabled:hover:hover,
.datepicker table tr td.range.today.disabled:focus,
.datepicker table tr td.range.today:hover.disabled:focus,
.datepicker table tr td.range.today.disabled.disabled:focus,
.datepicker table tr td.range.today.disabled:hover.disabled:focus,
.datepicker table tr td.range.today[disabled]:focus,
.datepicker table tr td.range.today:hover[disabled]:focus,
.datepicker table tr td.range.today.disabled[disabled]:focus,
.datepicker table tr td.range.today.disabled:hover[disabled]:focus,
fieldset[disabled] .datepicker table tr td.range.today:focus,
fieldset[disabled] .datepicker table tr td.range.today:hover:focus,
fieldset[disabled] .datepicker table tr td.range.today.disabled:focus,
fieldset[disabled] .datepicker table tr td.range.today.disabled:hover:focus,
.datepicker table tr td.range.today.disabled:active,
.datepicker table tr td.range.today:hover.disabled:active,
.datepicker table tr td.range.today.disabled.disabled:active,
.datepicker table tr td.range.today.disabled:hover.disabled:active,
.datepicker table tr td.range.today[disabled]:active,
.datepicker table tr td.range.today:hover[disabled]:active,
.datepicker table tr td.range.today.disabled[disabled]:active,
.datepicker table tr td.range.today.disabled:hover[disabled]:active,
fieldset[disabled] .datepicker table tr td.range.today:active,
fieldset[disabled] .datepicker table tr td.range.today:hover:active,
fieldset[disabled] .datepicker table tr td.range.today.disabled:active,
fieldset[disabled] .datepicker table tr td.range.today.disabled:hover:active,
.datepicker table tr td.range.today.disabled.active,
.datepicker table tr td.range.today:hover.disabled.active,
.datepicker table tr td.range.today.disabled.disabled.active,
.datepicker table tr td.range.today.disabled:hover.disabled.active,
.datepicker table tr td.range.today[disabled].active,
.datepicker table tr td.range.today:hover[disabled].active,
.datepicker table tr td.range.today.disabled[disabled].active,
.datepicker table tr td.range.today.disabled:hover[disabled].active,
fieldset[disabled] .datepicker table tr td.range.today.active,
fieldset[disabled] .datepicker table tr td.range.today:hover.active,
fieldset[disabled] .datepicker table tr td.range.today.disabled.active,
fieldset[disabled] .datepicker table tr td.range.today.disabled:hover.active {
background-color: #f7ca77;
border-color: #f1a417;
}
.datepicker table tr td.selected,
.datepicker table tr td.selected:hover,
.datepicker table tr td.selected.disabled,
.datepicker table tr td.selected.disabled:hover {
color: #ffffff;
background-color: #999999;
border-color: #555555;
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:focus,
.datepicker table tr td.selected:hover:focus,
.datepicker table tr td.selected.disabled:focus,
.datepicker table tr td.selected.disabled:hover:focus,
.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,
.open .dropdown-toggle.datepicker table tr td.selected,
.open .dropdown-toggle.datepicker table tr td.selected:hover,
.open .dropdown-toggle.datepicker table tr td.selected.disabled,
.open .dropdown-toggle.datepicker table tr td.selected.disabled:hover {
color: #ffffff;
background-color: #858585;
border-color: #373737;
}
.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,
.open .dropdown-toggle.datepicker table tr td.selected,
.open .dropdown-toggle.datepicker table tr td.selected:hover,
.open .dropdown-toggle.datepicker table tr td.selected.disabled,
.open .dropdown-toggle.datepicker table tr td.selected.disabled:hover {
background-image: none;
}
.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],
fieldset[disabled] .datepicker table tr td.selected,
fieldset[disabled] .datepicker table tr td.selected:hover,
fieldset[disabled] .datepicker table tr td.selected.disabled,
fieldset[disabled] .datepicker table tr td.selected.disabled:hover,
.datepicker table tr td.selected.disabled:hover,
.datepicker table tr td.selected:hover.disabled:hover,
.datepicker table tr td.selected.disabled.disabled:hover,
.datepicker table tr td.selected.disabled:hover.disabled:hover,
.datepicker table tr td.selected[disabled]:hover,
.datepicker table tr td.selected:hover[disabled]:hover,
.datepicker table tr td.selected.disabled[disabled]:hover,
.datepicker table tr td.selected.disabled:hover[disabled]:hover,
fieldset[disabled] .datepicker table tr td.selected:hover,
fieldset[disabled] .datepicker table tr td.selected:hover:hover,
fieldset[disabled] .datepicker table tr td.selected.disabled:hover,
fieldset[disabled] .datepicker table tr td.selected.disabled:hover:hover,
.datepicker table tr td.selected.disabled:focus,
.datepicker table tr td.selected:hover.disabled:focus,
.datepicker table tr td.selected.disabled.disabled:focus,
.datepicker table tr td.selected.disabled:hover.disabled:focus,
.datepicker table tr td.selected[disabled]:focus,
.datepicker table tr td.selected:hover[disabled]:focus,
.datepicker table tr td.selected.disabled[disabled]:focus,
.datepicker table tr td.selected.disabled:hover[disabled]:focus,
fieldset[disabled] .datepicker table tr td.selected:focus,
fieldset[disabled] .datepicker table tr td.selected:hover:focus,
fieldset[disabled] .datepicker table tr td.selected.disabled:focus,
fieldset[disabled] .datepicker table tr td.selected.disabled:hover:focus,
.datepicker table tr td.selected.disabled:active,
.datepicker table tr td.selected:hover.disabled:active,
.datepicker table tr td.selected.disabled.disabled:active,
.datepicker table tr td.selected.disabled:hover.disabled:active,
.datepicker table tr td.selected[disabled]:active,
.datepicker table tr td.selected:hover[disabled]:active,
.datepicker table tr td.selected.disabled[disabled]:active,
.datepicker table tr td.selected.disabled:hover[disabled]:active,
fieldset[disabled] .datepicker table tr td.selected:active,
fieldset[disabled] .datepicker table tr td.selected:hover:active,
fieldset[disabled] .datepicker table tr td.selected.disabled:active,
fieldset[disabled] .datepicker table tr td.selected.disabled:hover:active,
.datepicker table tr td.selected.disabled.active,
.datepicker table tr td.selected:hover.disabled.active,
.datepicker table tr td.selected.disabled.disabled.active,
.datepicker table tr td.selected.disabled:hover.disabled.active,
.datepicker table tr td.selected[disabled].active,
.datepicker table tr td.selected:hover[disabled].active,
.datepicker table tr td.selected.disabled[disabled].active,
.datepicker table tr td.selected.disabled:hover[disabled].active,
fieldset[disabled] .datepicker table tr td.selected.active,
fieldset[disabled] .datepicker table tr td.selected:hover.active,
fieldset[disabled] .datepicker table tr td.selected.disabled.active,
fieldset[disabled] .datepicker table tr td.selected.disabled:hover.active {
background-color: #999999;
border-color: #555555;
}
.datepicker table tr td.active,
.datepicker table tr td.active:hover,
.datepicker table tr td.active.disabled,
.datepicker table tr td.active.disabled:hover {
color: #ffffff;
background-color: #428bca;
border-color: #357ebd;
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:focus,
.datepicker table tr td.active:hover:focus,
.datepicker table tr td.active.disabled:focus,
.datepicker table tr td.active.disabled:hover:focus,
.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,
.open .dropdown-toggle.datepicker table tr td.active,
.open .dropdown-toggle.datepicker table tr td.active:hover,
.open .dropdown-toggle.datepicker table tr td.active.disabled,
.open .dropdown-toggle.datepicker table tr td.active.disabled:hover {
color: #ffffff;
background-color: #3276b1;
border-color: #285e8e;
}
.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,
.open .dropdown-toggle.datepicker table tr td.active,
.open .dropdown-toggle.datepicker table tr td.active:hover,
.open .dropdown-toggle.datepicker table tr td.active.disabled,
.open .dropdown-toggle.datepicker table tr td.active.disabled:hover {
background-image: none;
}
.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],
fieldset[disabled] .datepicker table tr td.active,
fieldset[disabled] .datepicker table tr td.active:hover,
fieldset[disabled] .datepicker table tr td.active.disabled,
fieldset[disabled] .datepicker table tr td.active.disabled:hover,
.datepicker table tr td.active.disabled:hover,
.datepicker table tr td.active:hover.disabled:hover,
.datepicker table tr td.active.disabled.disabled:hover,
.datepicker table tr td.active.disabled:hover.disabled:hover,
.datepicker table tr td.active[disabled]:hover,
.datepicker table tr td.active:hover[disabled]:hover,
.datepicker table tr td.active.disabled[disabled]:hover,
.datepicker table tr td.active.disabled:hover[disabled]:hover,
fieldset[disabled] .datepicker table tr td.active:hover,
fieldset[disabled] .datepicker table tr td.active:hover:hover,
fieldset[disabled] .datepicker table tr td.active.disabled:hover,
fieldset[disabled] .datepicker table tr td.active.disabled:hover:hover,
.datepicker table tr td.active.disabled:focus,
.datepicker table tr td.active:hover.disabled:focus,
.datepicker table tr td.active.disabled.disabled:focus,
.datepicker table tr td.active.disabled:hover.disabled:focus,
.datepicker table tr td.active[disabled]:focus,
.datepicker table tr td.active:hover[disabled]:focus,
.datepicker table tr td.active.disabled[disabled]:focus,
.datepicker table tr td.active.disabled:hover[disabled]:focus,
fieldset[disabled] .datepicker table tr td.active:focus,
fieldset[disabled] .datepicker table tr td.active:hover:focus,
fieldset[disabled] .datepicker table tr td.active.disabled:focus,
fieldset[disabled] .datepicker table tr td.active.disabled:hover:focus,
.datepicker table tr td.active.disabled:active,
.datepicker table tr td.active:hover.disabled:active,
.datepicker table tr td.active.disabled.disabled:active,
.datepicker table tr td.active.disabled:hover.disabled:active,
.datepicker table tr td.active[disabled]:active,
.datepicker table tr td.active:hover[disabled]:active,
.datepicker table tr td.active.disabled[disabled]:active,
.datepicker table tr td.active.disabled:hover[disabled]:active,
fieldset[disabled] .datepicker table tr td.active:active,
fieldset[disabled] .datepicker table tr td.active:hover:active,
fieldset[disabled] .datepicker table tr td.active.disabled:active,
fieldset[disabled] .datepicker table tr td.active.disabled:hover:active,
.datepicker table tr td.active.disabled.active,
.datepicker table tr td.active:hover.disabled.active,
.datepicker table tr td.active.disabled.disabled.active,
.datepicker table tr td.active.disabled:hover.disabled.active,
.datepicker table tr td.active[disabled].active,
.datepicker table tr td.active:hover[disabled].active,
.datepicker table tr td.active.disabled[disabled].active,
.datepicker table tr td.active.disabled:hover[disabled].active,
fieldset[disabled] .datepicker table tr td.active.active,
fieldset[disabled] .datepicker table tr td.active:hover.active,
fieldset[disabled] .datepicker table tr td.active.disabled.active,
fieldset[disabled] .datepicker table tr td.active.disabled:hover.active {
background-color: #428bca;
border-color: #357ebd;
}
.datepicker table tr td span {
display: block;
width: 23%;
height: 54px;
line-height: 54px;
float: left;
margin: 1%;
cursor: pointer;
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 {
color: #ffffff;
background-color: #428bca;
border-color: #357ebd;
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:focus,
.datepicker table tr td span.active:hover:focus,
.datepicker table tr td span.active.disabled:focus,
.datepicker table tr td span.active.disabled:hover:focus,
.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,
.open .dropdown-toggle.datepicker table tr td span.active,
.open .dropdown-toggle.datepicker table tr td span.active:hover,
.open .dropdown-toggle.datepicker table tr td span.active.disabled,
.open .dropdown-toggle.datepicker table tr td span.active.disabled:hover {
color: #ffffff;
background-color: #3276b1;
border-color: #285e8e;
}
.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,
.open .dropdown-toggle.datepicker table tr td span.active,
.open .dropdown-toggle.datepicker table tr td span.active:hover,
.open .dropdown-toggle.datepicker table tr td span.active.disabled,
.open .dropdown-toggle.datepicker table tr td span.active.disabled:hover {
background-image: none;
}
.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],
fieldset[disabled] .datepicker table tr td span.active,
fieldset[disabled] .datepicker table tr td span.active:hover,
fieldset[disabled] .datepicker table tr td span.active.disabled,
fieldset[disabled] .datepicker table tr td span.active.disabled:hover,
.datepicker table tr td span.active.disabled:hover,
.datepicker table tr td span.active:hover.disabled:hover,
.datepicker table tr td span.active.disabled.disabled:hover,
.datepicker table tr td span.active.disabled:hover.disabled:hover,
.datepicker table tr td span.active[disabled]:hover,
.datepicker table tr td span.active:hover[disabled]:hover,
.datepicker table tr td span.active.disabled[disabled]:hover,
.datepicker table tr td span.active.disabled:hover[disabled]:hover,
fieldset[disabled] .datepicker table tr td span.active:hover,
fieldset[disabled] .datepicker table tr td span.active:hover:hover,
fieldset[disabled] .datepicker table tr td span.active.disabled:hover,
fieldset[disabled] .datepicker table tr td span.active.disabled:hover:hover,
.datepicker table tr td span.active.disabled:focus,
.datepicker table tr td span.active:hover.disabled:focus,
.datepicker table tr td span.active.disabled.disabled:focus,
.datepicker table tr td span.active.disabled:hover.disabled:focus,
.datepicker table tr td span.active[disabled]:focus,
.datepicker table tr td span.active:hover[disabled]:focus,
.datepicker table tr td span.active.disabled[disabled]:focus,
.datepicker table tr td span.active.disabled:hover[disabled]:focus,
fieldset[disabled] .datepicker table tr td span.active:focus,
fieldset[disabled] .datepicker table tr td span.active:hover:focus,
fieldset[disabled] .datepicker table tr td span.active.disabled:focus,
fieldset[disabled] .datepicker table tr td span.active.disabled:hover:focus,
.datepicker table tr td span.active.disabled:active,
.datepicker table tr td span.active:hover.disabled:active,
.datepicker table tr td span.active.disabled.disabled:active,
.datepicker table tr td span.active.disabled:hover.disabled:active,
.datepicker table tr td span.active[disabled]:active,
.datepicker table tr td span.active:hover[disabled]:active,
.datepicker table tr td span.active.disabled[disabled]:active,
.datepicker table tr td span.active.disabled:hover[disabled]:active,
fieldset[disabled] .datepicker table tr td span.active:active,
fieldset[disabled] .datepicker table tr td span.active:hover:active,
fieldset[disabled] .datepicker table tr td span.active.disabled:active,
fieldset[disabled] .datepicker table tr td span.active.disabled:hover:active,
.datepicker table tr td span.active.disabled.active,
.datepicker table tr td span.active:hover.disabled.active,
.datepicker table tr td span.active.disabled.disabled.active,
.datepicker table tr td span.active.disabled:hover.disabled.active,
.datepicker table tr td span.active[disabled].active,
.datepicker table tr td span.active:hover[disabled].active,
.datepicker table tr td span.active.disabled[disabled].active,
.datepicker table tr td span.active.disabled:hover[disabled].active,
fieldset[disabled] .datepicker table tr td span.active.active,
fieldset[disabled] .datepicker table tr td span.active:hover.active,
fieldset[disabled] .datepicker table tr td span.active.disabled.active,
fieldset[disabled] .datepicker table tr td span.active.disabled:hover.active {
background-color: #428bca;
border-color: #357ebd;
}
.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-group.date .input-group-addon i {
cursor: pointer;
width: 16px;
height: 16px;
}
.input-daterange input {
text-align: center;
}
.input-daterange input:first-child {
border-radius: 3px 0 0 3px;
}
.input-daterange input:last-child {
border-radius: 0 3px 3px 0;
}
.input-daterange .input-group-addon {
width: auto;
min-width: 16px;
padding: 4px 5px;
font-weight: normal;
line-height: 1.428571429;
text-align: center;
text-shadow: 0 1px 0 #fff;
vertical-align: middle;
background-color: #eeeeee;
border-width: 1px 0;
margin-left: -5px;
margin-right: -5px;
}
.datepicker.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
float: left;
display: none;
min-width: 160px;
list-style: none;
background-color: #ffffff;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 5px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
*border-right-width: 2px;
*border-bottom-width: 2px;
color: #333333;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px;
line-height: 1.428571429;
}
.datepicker.dropdown-menu th,
.datepicker.dropdown-menu td {
padding: 4px 5px;
}
@@ -1,9 +1,7 @@
/**
* @name jQuery FullScreen Plugin
* @author Martin Angelov, Morten Sjøgren
* @version 1.2
* @url http://tutorialzine.com/2012/02/enhance-your-website-fullscreen-api/
* @license MIT License
* 基于jQuery FullScreen修改
* 新增支持IE全屏显示
* Copyright (c) 2019 ruoyi
*/
/*jshint browser: true, jquery: true */
@@ -15,6 +13,7 @@
var doc = document.documentElement;
return ('requestFullscreen' in doc) ||
('msRequestFullscreen' in doc) ||
('mozRequestFullScreen' in doc && document.mozFullScreenEnabled) ||
('webkitRequestFullScreen' in doc);
}
@@ -26,6 +25,8 @@
elem.mozRequestFullScreen();
} else if (elem.webkitRequestFullScreen) {
elem.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
} else if (elem.msRequestFullscreen) {
elem.msRequestFullscreen();
}
}
@@ -33,6 +34,7 @@
return document.fullscreen ||
document.mozFullScreen ||
document.webkitIsFullScreen ||
document.msFullscreenElement ||
false;
}
@@ -43,6 +45,8 @@
document.mozCancelFullScreen();
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
}
}
@@ -0,0 +1,50 @@
@charset "UTF-8";
.jsonview {
font-family: monospace;
font-size: 1.1em;
white-space: pre-wrap; }
.jsonview .prop {
font-weight: bold; }
.jsonview .null {
color: red; }
.jsonview .bool {
color: blue; }
.jsonview .num {
color: blue; }
.jsonview .string {
color: green;
white-space: pre-wrap; }
.jsonview .string.multiline {
display: inline-block;
vertical-align: text-top; }
.jsonview .collapser {
position: absolute;
left: -1em;
cursor: pointer; }
.jsonview .collapsible {
transition: height 1.2s;
transition: width 1.2s; }
.jsonview .collapsible.collapsed {
height: .8em;
width: 1em;
display: inline-block;
overflow: hidden;
margin: 0; }
.jsonview .collapsible.collapsed:before {
content: "…";
width: 1em;
margin-left: .2em; }
.jsonview .collapser.collapsed {
transform: rotate(0deg); }
.jsonview .q {
display: inline-block;
width: 0px;
color: transparent; }
.jsonview li {
position: relative; }
.jsonview ul {
list-style: none;
margin: 0 0 0 2em;
padding: 0; }
.jsonview h1 {
font-size: 1.2em; }
@@ -0,0 +1,250 @@
(function(jQuery) {
var $, Collapser, JSONFormatter, JSONView;
JSONFormatter = (function() {
function JSONFormatter(options) {
if (options == null) {
options = {};
}
this.options = options;
}
JSONFormatter.prototype.htmlEncode = function(html) {
if (html !== null) {
return html.toString().replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
} else {
return '';
}
};
JSONFormatter.prototype.jsString = function(s) {
s = JSON.stringify(s).slice(1, -1);
return this.htmlEncode(s);
};
JSONFormatter.prototype.decorateWithSpan = function(value, className) {
return "<span class=\"" + className + "\">" + (this.htmlEncode(value)) + "</span>";
};
JSONFormatter.prototype.valueToHTML = function(value, level) {
var valueType;
if (level == null) {
level = 0;
}
valueType = Object.prototype.toString.call(value).match(/\s(.+)]/)[1].toLowerCase();
return this["" + valueType + "ToHTML"].call(this, value, level);
};
JSONFormatter.prototype.nullToHTML = function(value) {
return this.decorateWithSpan('null', 'null');
};
JSONFormatter.prototype.numberToHTML = function(value) {
return this.decorateWithSpan(value, 'num');
};
JSONFormatter.prototype.stringToHTML = function(value) {
var multilineClass, newLinePattern;
if (/^(http|https|file):\/\/[^\s]+$/i.test(value)) {
return "<a href=\"" + (this.htmlEncode(value)) + "\"><span class=\"q\">\"</span>" + (this.jsString(value)) + "<span class=\"q\">\"</span></a>";
} else {
multilineClass = '';
value = this.jsString(value);
if (this.options.nl2br) {
newLinePattern = /([^>\\r\\n]?)(\\r\\n|\\n\\r|\\r|\\n)/g;
if (newLinePattern.test(value)) {
multilineClass = ' multiline';
value = (value + '').replace(newLinePattern, '$1' + '<br />');
}
}
return "<span class=\"string" + multilineClass + "\">\"" + value + "\"</span>";
}
};
JSONFormatter.prototype.booleanToHTML = function(value) {
return this.decorateWithSpan(value, 'bool');
};
JSONFormatter.prototype.arrayToHTML = function(array, level) {
var collapsible, hasContents, index, numProps, output, value, _i, _len;
if (level == null) {
level = 0;
}
hasContents = false;
output = '';
numProps = array.length;
for (index = _i = 0, _len = array.length; _i < _len; index = ++_i) {
value = array[index];
hasContents = true;
output += '<li>' + this.valueToHTML(value, level + 1);
if (numProps > 1) {
output += ',';
}
output += '</li>';
numProps--;
}
if (hasContents) {
collapsible = level === 0 ? '' : ' collapsible';
return "[<ul class=\"array level" + level + collapsible + "\">" + output + "</ul>]";
} else {
return '[ ]';
}
};
JSONFormatter.prototype.objectToHTML = function(object, level) {
var collapsible, hasContents, numProps, output, prop, value;
if (level == null) {
level = 0;
}
hasContents = false;
output = '';
numProps = 0;
for (prop in object) {
numProps++;
}
for (prop in object) {
value = object[prop];
hasContents = true;
output += "<li><span class=\"prop\"><span class=\"q\">\"</span>" + (this.jsString(prop)) + "<span class=\"q\">\"</span></span>: " + (this.valueToHTML(value, level + 1));
if (numProps > 1) {
output += ',';
}
output += '</li>';
numProps--;
}
if (hasContents) {
collapsible = level === 0 ? '' : ' collapsible';
return "{<ul class=\"obj level" + level + collapsible + "\">" + output + "</ul>}";
} else {
return '{ }';
}
};
JSONFormatter.prototype.jsonToHTML = function(json) {
return "<div class=\"jsonview\">" + (this.valueToHTML(json)) + "</div>";
};
return JSONFormatter;
})();
(typeof module !== "undefined" && module !== null) && (module.exports = JSONFormatter);
Collapser = {
bindEvent: function(item, collapsed) {
var collapser;
collapser = document.createElement('div');
collapser.className = 'collapser';
collapser.innerHTML = collapsed ? '+' : '-';
collapser.addEventListener('click', (function(_this) {
return function(event) {
return _this.toggle(event.target);
};
})(this));
item.insertBefore(collapser, item.firstChild);
if (collapsed) {
return this.collapse(collapser);
}
},
expand: function(collapser) {
var ellipsis, target;
target = this.collapseTarget(collapser);
ellipsis = target.parentNode.getElementsByClassName('ellipsis')[0];
target.parentNode.removeChild(ellipsis);
target.style.display = '';
return collapser.innerHTML = '-';
},
collapse: function(collapser) {
var ellipsis, target;
target = this.collapseTarget(collapser);
target.style.display = 'none';
ellipsis = document.createElement('span');
ellipsis.className = 'ellipsis';
ellipsis.innerHTML = ' &hellip; ';
target.parentNode.insertBefore(ellipsis, target);
return collapser.innerHTML = '+';
},
toggle: function(collapser) {
var target;
target = this.collapseTarget(collapser);
if (target.style.display === 'none') {
return this.expand(collapser);
} else {
return this.collapse(collapser);
}
},
collapseTarget: function(collapser) {
var target, targets;
targets = collapser.parentNode.getElementsByClassName('collapsible');
if (!targets.length) {
return;
}
return target = targets[0];
}
};
$ = jQuery;
JSONView = {
collapse: function(el) {
if (el.innerHTML === '-') {
return Collapser.collapse(el);
}
},
expand: function(el) {
if (el.innerHTML === '+') {
return Collapser.expand(el);
}
},
toggle: function(el) {
return Collapser.toggle(el);
}
};
return $.fn.JSONView = function() {
var args, defaultOptions, formatter, json, method, options, outputDoc;
args = arguments;
if (JSONView[args[0]] != null) {
method = args[0];
return this.each(function() {
var $this, level;
$this = $(this);
if (args[1] != null) {
level = args[1];
return $this.find(".jsonview .collapsible.level" + level).siblings('.collapser').each(function() {
return JSONView[method](this);
});
} else {
return $this.find('.jsonview > ul > li > .collapsible').siblings('.collapser').each(function() {
return JSONView[method](this);
});
}
});
} else {
json = args[0];
options = args[1] || {};
defaultOptions = {
collapsed: false,
nl2br: false
};
options = $.extend(defaultOptions, options);
formatter = new JSONFormatter({
nl2br: options.nl2br
});
if (Object.prototype.toString.call(json) === '[object String]') {
json = JSON.parse(json);
}
outputDoc = formatter.jsonToHTML(json);
return this.each(function() {
var $this, item, items, _i, _len, _results;
$this = $(this);
$this.html(outputDoc);
items = $this[0].getElementsByClassName('collapsible');
_results = [];
for (_i = 0, _len = items.length; _i < _len; _i++) {
item = items[_i];
if (item.parentNode.nodeName === 'LI') {
_results.push(Collapser.bindEvent(item.parentNode, options.collapsed));
} else {
_results.push(void 0);
}
}
return _results;
});
}
};
})(jQuery);
File diff suppressed because one or more lines are too long
@@ -85,20 +85,19 @@ body.signin {
}
}
/*
登录界面check样式
*/
登录界面check样式
*/
.checkbox-custom {
position: relative;
padding: 0 15px 0 25px;
margin-bottom: 7px;
margin-top: 0;
display: inline-block;
}
/*
将初始的checkbox的样式改变
将初始的checkbox的样式改变
*/
.checkbox-custom input[type="checkbox"] {
opacity: 0;/*将初始的checkbox隐藏起来*/
opacity: 0; /*将初始的checkbox隐藏起来*/
position: absolute;
cursor: pointer;
z-index: 2;
@@ -107,7 +106,7 @@ body.signin {
left: 3px;
}
/*
设计新的checkbox,位置
设计新的checkbox,位置
*/
.checkbox-custom label:before {
content: '';
@@ -123,7 +122,7 @@ body.signin {
background: #fff;
}
/*
点击初始的checkbox,将新的checkbox关联起来
点击初始的checkbox,将新的checkbox关联起来
*/
.checkbox-custom input[type="checkbox"]:checked +label:after {
position: absolute;
@@ -142,7 +141,7 @@ body.signin {
.checkbox-custom label {
cursor: pointer;
line-height: 1.2;
font-weight: normal;/*改变了rememberme的字体*/
font-weight: normal; /*改变了rememberme的字体*/
margin-bottom: 0;
text-align: left;
}
+1 -1
View File
@@ -1 +1 @@
html{height:100%}body.signin{height:auto;background:url(../img/login-background.jpg) no-repeat center fixed;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;color:rgba(255,255,255,.95)}.signinpanel{width:750px;margin:10% auto 0}.signinpanel .logopanel{float:none;width:auto;padding:0;background:0}.signinpanel .signin-info ul{list-style:none;padding:0;margin:20px 0}.signinpanel .form-control{display:block;margin-top:15px}.signinpanel .uname{background:#fff url(../img/user.png) no-repeat 95% center;color:#333}.signinpanel .pword{background:#fff url(../img/locked.png) no-repeat 95% center;color:#333}.signinpanel .code{background:#fff no-repeat 95% center;color:#333;margin:0 0 15px 0}.signinpanel .btn{margin-top:15px}.signinpanel form{background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.3);-moz-box-shadow:0 3px 0 rgba(12,12,12,.03);-webkit-box-shadow:0 3px 0 rgba(12,12,12,.03);box-shadow:0 3px 0 rgba(12,12,12,.03);-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:30px}.signup-footer{border-top:solid 1px rgba(255,255,255,.3);margin:20px 0;padding-top:15px}@media screen and (max-width:768px){.signinpanel,.signuppanel{margin:0 auto;width:420px!important;padding:20px}.signinpanel form{margin-top:20px}.signup-footer,.signuppanel .form-control{margin-bottom:10px}.signup-footer .pull-left,.signup-footer .pull-right{float:none!important;text-align:center}.signinpanel .signin-info ul{display:none}}@media screen and (max-width:320px){.signinpanel,.signuppanel{margin:0 20px;width:auto}}.checkbox-custom{position:relative;padding:0 15px 0 25px;margin-bottom:7px;margin-top:0;display:inline-block}.checkbox-custom input[type="checkbox"]{opacity:0;position:absolute;cursor:pointer;z-index:2;margin:-6px 0 0 0;top:50%;left:3px}.checkbox-custom label:before{content:'';position:absolute;top:50%;left:0;margin-top:-9px;width:18px;height:17px;display:inline-block;border-radius:2px;border:1px solid #bbb;background:#fff}.checkbox-custom input[type="checkbox"]:checked+label:after{position:absolute;display:inline-block;font-family:'Glyphicons Halflings';content:"\e013";top:42%;left:3px;margin-top:-5px;font-size:11px;line-height:1;width:16px;height:16px;color:#333}.checkbox-custom label{cursor:pointer;line-height:1.2;font-weight:normal;margin-bottom:0;text-align:left}
html{height:100%}body.signin{height:auto;background:url(../img/login-background.jpg) no-repeat center fixed;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;color:rgba(255,255,255,.95)}.signinpanel{width:750px;margin:10% auto 0}.signinpanel .logopanel{float:none;width:auto;padding:0;background:0}.signinpanel .signin-info ul{list-style:none;padding:0;margin:20px 0}.signinpanel .form-control{display:block;margin-top:15px}.signinpanel .uname{background:#fff url(../img/user.png) no-repeat 95% center;color:#333}.signinpanel .pword{background:#fff url(../img/locked.png) no-repeat 95% center;color:#333}.signinpanel .code{background:#fff no-repeat 95% center;color:#333;margin:0 0 15px 0}.signinpanel .btn{margin-top:15px}.signinpanel form{background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.3);-moz-box-shadow:0 3px 0 rgba(12,12,12,.03);-webkit-box-shadow:0 3px 0 rgba(12,12,12,.03);box-shadow:0 3px 0 rgba(12,12,12,.03);-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:30px}.signup-footer{border-top:solid 1px rgba(255,255,255,.3);margin:20px 0;padding-top:15px}@media screen and (max-width:768px){.signinpanel,.signuppanel{margin:0 auto;width:420px!important;padding:20px}.signinpanel form{margin-top:20px}.signup-footer,.signuppanel .form-control{margin-bottom:10px}.signup-footer .pull-left,.signup-footer .pull-right{float:none!important;text-align:center}.signinpanel .signin-info ul{display:none}}@media screen and (max-width:320px){.signinpanel,.signuppanel{margin:0 20px;width:auto}}.checkbox-custom{position:relative;padding:0 15px 0 25px;margin-bottom:7px;display:inline-block}.checkbox-custom input[type="checkbox"]{opacity:0;position:absolute;cursor:pointer;z-index:2;margin:-6px 0 0 0;top:50%;left:3px}.checkbox-custom label:before{content:'';position:absolute;top:50%;left:0;margin-top:-9px;width:18px;height:17px;display:inline-block;border-radius:2px;border:1px solid #bbb;background:#fff}.checkbox-custom input[type="checkbox"]:checked+label:after{position:absolute;display:inline-block;font-family:'Glyphicons Halflings';content:"\e013";top:42%;left:3px;margin-top:-5px;font-size:11px;line-height:1;width:16px;height:16px;color:#333}.checkbox-custom label{cursor:pointer;line-height:1.2;font-weight:normal;margin-bottom:0;text-align:left}
@@ -2318,16 +2318,6 @@ table.dataTable thead .sorting:after {
.google-map {
height: 300px;
}
/* Validation */
label.error {
color: #cc5965;
display: inline-block;
margin-left: 5px;
}
.form-control.error {
border: 1px dotted #cc5965;
}
/* ngGrid */
.gridStyle {
border: 1px solid #d4d4d4;
@@ -50,6 +50,130 @@
margin-left: 20px;
}
.section-content {
min-height: 250px;
margin-right: auto;
margin-left: auto;
padding: 5px 5px 5px 5px;
width: 100%;
height: 100%;
position: absolute;
}
.ibox {
margin-bottom: 25px;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 4px;
height: 100%;
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
}
.list-group-striped > .list-group-item {
border-left: 0;
border-right: 0;
border-radius: 0;
padding-left: 0;
padding-right: 0
}
.ibox-title-gray {
height: 41px;
background-color: #f0f3f4;
color: #333;
font-weight: 700;
border-radius: 2px 2px 0 0;
padding: 13px !important;
border-bottom: 1px solid #eee;
display: block;
clear: both;
}
.dashboard-header h5 {
padding: 8px 0 0 0;
display: inline-block;
font-size: 14px;
text-overflow: ellipsis;
float: left;
font-weight: 400;
}
.ibox-title-gray h5 {
display: inline-block;
font-size: 14px;
margin: 0 0 7px;
padding: 0;
text-overflow: ellipsis;
float: left;
}
/* 导航页签 */
.nav-tabs-custom {
margin-bottom: 20px;
background: #fff;
box-shadow: 0 1px 1px rgba(0,0,0,0.1);
border-radius: 3px
}
.nav-tabs-custom>.nav-tabs {
margin: 0;
border-bottom-color: #f4f4f4;
border-top-right-radius: 3px;
border-top-left-radius: 3px
}
.nav-tabs-custom>.nav-tabs>li {
border-top: 3px solid transparent;
margin-bottom: -2px;
margin-right: 5px
}
.nav-tabs-custom>.nav-tabs>li.disabled>a {
color: #777
}
.nav-tabs-custom>.nav-tabs>li>a {
color: #444;
font-weight: normal;
border-radius: 0
}
.nav-tabs-custom>.nav-tabs>li>a,.nav-tabs-custom>.nav-tabs>li>a:hover {
background: transparent;
margin: 0
}
.nav-tabs-custom>.nav-tabs>li>a:hover {
color: #999
}
.nav-tabs-custom>.nav-tabs>li:not(.active)>a:hover,.nav-tabs-custom>.nav-tabs>li:not(.active)>a:focus,.nav-tabs-custom>.nav-tabs>li:not(.active)>a:active {
border-color: transparent
}
.nav-tabs-custom>.nav-tabs>li.active {
border-top-color: #1890ff
}
.nav-tabs-custom>.nav-tabs>li.active>a,.nav-tabs-custom>.nav-tabs>li.active:hover>a {
background-color: #fff;
color: #444
}
.nav-tabs-custom>.nav-tabs>li.active>a {
border-top-color: transparent;
border-bottom-color: transparent;
border-left-color: #f4f4f4;
border-right-color: #f4f4f4
}
.nav-tabs-custom>.tab-content {
background: #fff;
padding: 10px;
border-bottom-right-radius: 3px;
border-bottom-left-radius: 3px
}
/** 弹层组件 禁用样式 **/
.layer-disabled {
border: 1px #dedede solid !important;
@@ -171,11 +295,16 @@
label.error {
position: absolute;
right: 18px;
top: 7px;
top: 10px;
color: #ef392b;
font-size: 12px
}
.input-group label.error {
z-index:99;
right: 42px
}
.Validform_error,input.error,select.error {
background-color: #fbe2e2;
border-color: #c66161;
@@ -407,7 +536,7 @@ label {
background: transparent;
outline: none;
height: 30px;
width: 280px;
width: 200px;
padding-left: 5px;
}
@@ -426,17 +555,26 @@ label {
background: transparent;
outline: none;
height: 30px;
width: 280px;
width: 200px;
}
.select-list .select-time input {
width: 133px;
width: 93px;
}
.select-time label,.select-time span,.select-time input {
float: left;
}
@media (max-width:767px) {
.select-time label,.select-time span,.select-time input {
float: none;
}
.select-list .select-time input {
width: 200px;
}
}
.select-time label {
margin-top: 5px;
}
@@ -485,13 +623,21 @@ label {
}
.table-striped .table>thead:first-child>tr:first-child>th {
color: #333;
font-weight: normal;
font-size: 13px
}
.table-striped table thead {
background-color: #eff3f8;
}
.table-bordered td,.table-bordered th {
border: 1px solid #ddd!important
}
.fixed-table-container thead th >.both{
display: inline-block
}
/** 首页样式 **/
.ax_close_max {
position: fixed;
@@ -533,3 +679,39 @@ label {
.dropdown-menu > .divider {
background-color:#eee;
}
/** 表单布局 **/
.form-header {
font-size:15px;
color:#6379bb;
border-bottom:1px solid #ddd;
margin:8px 10px 25px 10px;
padding-bottom:5px
}
.form-content {
background-color: #ffffff;
color: inherit;
padding: 10px 15px 15px 15px;
border-color: #e7eaec;
-webkit-border-image: none;
-o-border-image: none;
border-image: none;
border-width: 1px 0px;
}
/** 表格跳转样式 **/
.pageGo input {
height: 32px;
width: 50px;
margin-left: 5px;
margin-right: 5px;
text-align: center;
display: block;
float:left;
}
.pageGo button {
height: 32px;
display: block;
float:left;
}
@@ -124,14 +124,14 @@ $(function() {
//查看左侧隐藏的选项卡
function scrollTabLeft() {
var marginLeftVal = Math.abs(parseInt($('.page-tabs-content').css('margin-left')));
var marginLeftVal = Math.abs(parseInt($('.page-tabs-content').css('margin-left')) + 50);
// 可视区域非tab宽度
var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".menuTabs"));
//可视区域tab宽度
var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth;
//实际滚动宽度
var scrollVal = 0;
if ($(".page-tabs-content").width() < visibleWidth) {
if (($(".page-tabs-content").width() + 50) < visibleWidth) {
return false;
} else {
var tabElement = $(".menuTab:first");
@@ -249,7 +249,7 @@ $(function() {
function closeTab() {
var closeTabId = $(this).parents('.menuTab').data('id');
var currentWidth = $(this).parents('.menuTab').width();
var panelUrl = $(this).parents('.menuTab').data('panel');
// 当前元素处于活动状态
if ($(this).parents('.menuTab').hasClass('active')) {
@@ -307,6 +307,16 @@ $(function() {
return false;
}
});
if($.common.isNotEmpty(panelUrl)){
$('.menuTab[data-id="' + panelUrl + '"]').addClass('active').siblings('.menuTab').removeClass('active');
$('.mainContent .RuoYi_iframe').each(function() {
if ($(this).data('id') == panelUrl) {
$(this).show().siblings('.RuoYi_iframe').hide();
return false;
}
});
}
}
}
// 当前元素不处于活动状态
@@ -321,8 +331,8 @@ $(function() {
return false;
}
});
scrollToTab($('.menuTab.active'));
}
scrollToTab($('.menuTab.active'));
return false;
}
@@ -72,12 +72,18 @@ $(function() {
layui.use('laydate', function() {
var laydate = layui.laydate;
var times = $(".time-input");
// 控制控件外观
var type = times.attr("data-type") || 'date';
// 控制回显格式
var format = times.attr("data-format") || 'yyyy-MM-dd';
for (var i = 0; i < times.length; i++) {
var time = times[i];
laydate.render({
elem: time,
theme: 'molv',
trigger: 'click',
type: type,
format: format,
done: function(value, date) {}
});
}
@@ -96,19 +102,15 @@ $(function() {
$.tree.searchNode(e);
}).bind("input propertychange", $.tree.searchNode);
}
// 复选框后按钮样式状态变更
$("#bootstrap-table").on("check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table", function () {
var ids = $("#bootstrap-table").bootstrapTable("getSelections");
$('#toolbar .btn-del').toggleClass('disabled', !ids.length);
$('#toolbar .btn-edit').toggleClass('disabled', ids.length!=1);
});
// tree表格树 展开/折叠
var expandFlag = false;
var expandFlag;
$("#expandAllBtn").click(function() {
if (expandFlag) {
$('#bootstrap-tree-table').bootstrapTreeTable('expandAll');
var dataExpand = $.common.isEmpty($.table._option.expandAll) ? true : $.table._option.expandAll;
expandFlag = $.common.isEmpty(expandFlag) ? dataExpand : expandFlag;
if (!expandFlag) {
$('#' + $.table._option.id).bootstrapTreeTable('expandAll');
} else {
$('#bootstrap-tree-table').bootstrapTreeTable('collapseAll');
$('#' + $.table._option.id).bootstrapTreeTable('collapseAll');
}
expandFlag = expandFlag ? false: true;
})
@@ -123,8 +125,25 @@ var refreshItem = function(){
target.attr('src', url).ready();
}
/** 关闭选项卡 */
var closeItem = function(){
var topWindow = $(window.parent.document);
var panelUrl = window.frameElement.getAttribute('data-panel');
$('.page-tabs-content .active i', topWindow).click();
if($.common.isNotEmpty(panelUrl)){
$('.menuTab[data-id="' + panelUrl + '"]', topWindow).addClass('active').siblings('.menuTab').removeClass('active');
$('.mainContent .RuoYi_iframe', topWindow).each(function() {
if ($(this).data('id') == panelUrl) {
$(this).show().siblings('.RuoYi_iframe').hide();
return false;
}
});
}
}
/** 创建选项卡 */
function createMenuItem(dataUrl, menuName) {
var panelUrl = window.frameElement.getAttribute('data-id');
dataIndex = $.common.random(1,100),
flag = true;
if (dataUrl == undefined || $.trim(dataUrl).length == 0) return false;
@@ -149,12 +168,17 @@ function createMenuItem(dataUrl, menuName) {
});
// 选项卡菜单不存在
if (flag) {
var str = '<a href="javascript:;" class="active menuTab" data-id="' + dataUrl + '">' + menuName + ' <i class="fa fa-times-circle"></i></a>';
var str = '<a href="javascript:;" class="active menuTab" data-id="' + dataUrl + '" data-panel="' + panelUrl + '">' + menuName + ' <i class="fa fa-times-circle"></i></a>';
$('.menuTab', topWindow).removeClass('active');
// 添加选项卡对应的iframe
var str1 = '<iframe class="RuoYi_iframe" name="iframe' + dataIndex + '" width="100%" height="100%" src="' + dataUrl + '" frameborder="0" data-id="' + dataUrl + '" seamless></iframe>';
var str1 = '<iframe class="RuoYi_iframe" name="iframe' + dataIndex + '" width="100%" height="100%" src="' + dataUrl + '" frameborder="0" data-id="' + dataUrl + '" data-panel="' + panelUrl + '" seamless></iframe>';
$('.mainContent', topWindow).find('iframe.RuoYi_iframe').hide().parents('.mainContent').append(str1);
window.parent.$.modal.loading("数据加载中,请稍后...");
$('.mainContent iframe:visible', topWindow).load(function () {
window.parent.$.modal.closeLoading();
});
// 添加选项卡
$('.menuTabs .page-tabs-content', topWindow).append(str);
@@ -9,110 +9,201 @@
// 表格封装处理
table: {
_option: {},
_params: {},
// 初始化表格参数
init: function(options) {
var defaults = {
id: "bootstrap-table",
type: 0, // 0 代表bootstrapTable 1代表bootstrapTreeTable
height: undefined,
sidePagination: "server",
sortName: "",
sortOrder: "asc",
pagination: true,
pageSize: 10,
toolbar: "toolbar",
striped: false,
escape: false,
showFooter: false,
search: false,
showSearch: true,
showPageGo: false,
showRefresh: true,
showColumns: true,
showToggle: true,
showExport: false,
clickToSelect: false,
rememberSelected: false,
fixedColumns: false,
fixedNumber: 0,
rightFixedColumns: false,
rightFixedNumber: 0,
queryParams: $.table.queryParams,
};
var options = $.extend(defaults, options);
$.table._option = options;
$.table._params = $.common.isEmpty(options.queryParams) ? $.table.queryParams : options.queryParams;
_sortOrder = $.common.isEmpty(options.sortOrder) ? "asc" : options.sortOrder;
_sortName = $.common.isEmpty(options.sortName) ? "" : options.sortName;
_striped = $.common.isEmpty(options.striped) ? false : options.striped;
_escape = $.common.isEmpty(options.escape) ? false : options.escape;
_showFooter = $.common.isEmpty(options.showFooter) ? false : options.showFooter;
$('#bootstrap-table').bootstrapTable({
$('#' + options.id).bootstrapTable({
url: options.url, // 请求后台的URL*
contentType: "application/x-www-form-urlencoded", // 编码类型
method: 'post', // 请求方式(*
cache: false, // 是否使用缓存
striped: _striped, // 是否显示行间隔色
height: options.height, // 表格的高度
striped: options.striped, // 是否显示行间隔色
sortable: true, // 是否启用排序
sortStable: true, // 设置为 true 将获得稳定的排序
sortName: _sortName, // 排序列名称
sortOrder: _sortOrder, // 排序方式 asc 或者 desc
pagination: $.common.visible(options.pagination), // 是否显示分页(*
sortName: options.sortName, // 排序列名称
sortOrder: options.sortOrder, // 排序方式 asc 或者 desc
pagination: options.pagination, // 是否显示分页(*
pageNumber: 1, // 初始化加载第一页,默认第一页
pageSize: 10, // 每页的记录行数(*
pageSize: options.pageSize, // 每页的记录行数(*
pageList: [10, 25, 50], // 可供选择的每页的行数(*
escape: _escape, // 转义HTML字符串
showFooter: _showFooter, // 是否显示表尾
escape: options.escape, // 转义HTML字符串
showFooter: options.showFooter, // 是否显示表尾
iconSize: 'outline', // 图标大小:undefined默认的按钮尺寸 xs超小按钮sm小按钮lg大按钮
toolbar: '#toolbar', // 指定工作栏
sidePagination: "server", // 启用服务端分页
search: $.common.visible(options.search), // 是否显示搜索框功能
showSearch: $.common.visible(options.showSearch), // 是否显示检索信息
showRefresh: $.common.visible(options.showRefresh), // 是否显示刷新按钮
showColumns: $.common.visible(options.showColumns), // 是否显示隐藏某列下拉框
showToggle: $.common.visible(options.showToggle), // 是否显示详细视图和列表视图的切换按钮
showExport: $.common.visible(options.showExport), // 是否支持导出文件
queryParams: $.table._params, // 传递参数(*
toolbar: '#' + options.toolbar, // 指定工作栏
sidePagination: options.sidePagination, // server启用服务端分页client客户端分页
search: options.search, // 是否显示搜索框功能
showSearch: options.showSearch, // 是否显示检索信息
showPageGo: options.showPageGo, // 是否显示跳转页
showRefresh: options.showRefresh, // 是否显示刷新按钮
showColumns: options.showColumns, // 是否显示隐藏某列下拉框
showToggle: options.showToggle, // 是否显示详细视图和列表视图的切换按钮
showExport: options.showExport, // 是否支持导出文件
clickToSelect: options.clickToSelect, // 是否启用点击选中行
rememberSelected: options.rememberSelected, // 启用翻页记住前面的选择
fixedColumns: options.fixedColumns, // 是否启用冻结列(左侧)
fixedNumber: options.fixedNumber, // 列冻结的个数(左侧)
rightFixedColumns: options.rightFixedColumns, // 是否启用冻结列(右侧)
rightFixedNumber: options.rightFixedNumber, // 列冻结的个数(右侧)
queryParams: options.queryParams, // 传递参数(*
columns: options.columns, // 显示列信息(*
responseHandler: $.table.responseHandler // 回调函数
responseHandler: $.table.responseHandler, // 在加载服务器发送来的数据之前处理函数
onLoadSuccess: $.table.onLoadSuccess, // 当所有数据被加载时触发处理函数
});
},
// 查询条件
queryParams: function(params) {
return {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
searchValue: params.search,
orderByColumn: params.sort,
isAsc: params.order
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
searchValue: params.search,
orderByColumn: params.sort,
isAsc: params.order
};
},
// 请求获取数据后处理回调函数
responseHandler: function(res) {
if (res.code == 0) {
return { rows: res.rows, total: res.total };
if ($.common.isNotEmpty($.table._option.sidePagination) && $.table._option.sidePagination == 'client') {
return res.rows;
} else {
return { rows: res.rows, total: res.total };
}
} else {
$.modal.alertWarning(res.msg);
return { rows: [], total: 0 };
$.modal.alertWarning(res.msg);
return { rows: [], total: 0 };
}
},
// 当所有数据被加载时触发
onLoadSuccess: function(data) {
// 浮动提示框特效
$("[data-toggle='tooltip']").tooltip();
// 触发行点击事件 加载成功事件
$("#" + $.table._option.id).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 + ' .btn-del').toggleClass('disabled', !rows.length);
$('#' + $.table._option.toolbar + ' .btn-edit').toggleClass('disabled', rows.length!=1);
});
// 绑定选中事件、取消事件、全部选中、全部取消
$("#" + $.table._option.id).on("check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table", function (e, rows) {
// 复选框分页保留保存选中数组
var rows = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
if ($.common.isNotEmpty($.table._option.rememberSelected) && $.table._option.rememberSelected) {
func = $.inArray(e.type, ['check', 'check-all']) > -1 ? 'union' : 'difference';
selectionIds = _[func](selectionIds, rows);
}
});
},
// 表格销毁
destroy: function (tableId) {
var currentId = $.common.isEmpty(tableId) ? $.table._option.id : tableId;
$("#" + currentId).bootstrapTable('destroy');
},
// 序列号生成
serialNumber: function (index) {
var table = $('#bootstrap-table').bootstrapTable('getOptions');
var table = $('#' + $.table._option.id).bootstrapTable('getOptions');
var pageSize = table.pageSize;
var pageNumber = table.pageNumber;
return pageSize * (pageNumber - 1) + index + 1;
},
// 列超出指定长度浮动提示
tooltip: function (value, length) {
var _length = $.common.isEmpty(length) ? 20 : length;
var _text = "";
var _value = $.common.nullToStr(value);
if (_value.length > _length) {
_text = _value.substr(0, _length) + "...";
} else {
_text = _value;
}
return '<a href="#" class="tooltip-show" data-toggle="tooltip" title="' + _value + '">' + _text +'</a>';
},
// 下拉按钮切换
dropdownToggle: function (value) {
var actions = [];
actions.push('<div class="btn-group">');
actions.push('<button type="button" class="btn btn-xs dropdown-toggle" data-toggle="dropdown" aria-expanded="false">');
actions.push('<i class="fa fa-cog"></i>&nbsp;<span class="fa fa-chevron-down"></span></button>');
actions.push('<ul class="dropdown-menu">');
actions.push(value.replace(/<a/g,"<li><a").replace(/<\/a>/g,"</a></li>"));
actions.push('</ul>');
actions.push('</div>');
return actions.join('');
},
// 搜索-默认第一个form
search: function(formId) {
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
var params = $("#bootstrap-table").bootstrapTable('getOptions');
var params = $("#" + $.table._option.id).bootstrapTable('getOptions');
params.queryParams = function(params) {
var search = {};
$.each($("#" + currentId).serializeArray(), function(i, field) {
search[field.name] = field.value;
});
search.pageSize = params.limit;
search.pageNum = params.offset / params.limit + 1;
search.searchValue = params.search;
search.orderByColumn = params.sort;
search.isAsc = params.order;
var search = {};
$.each($("#" + currentId).serializeArray(), function(i, field) {
search[field.name] = field.value;
});
search.pageSize = params.limit;
search.pageNum = params.offset / params.limit + 1;
search.searchValue = params.search;
search.orderByColumn = params.sort;
search.isAsc = params.order;
return search;
}
$("#bootstrap-table").bootstrapTable('refresh', params);
$("#" + $.table._option.id).bootstrapTable('refresh', params);
},
// 导出数据
exportExcel: function(formId) {
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
$.modal.loading("正在导出数据,请稍后...");
$.post($.table._option.exportUrl, $("#" + currentId).serializeArray(), function(result) {
if (result.code == web_status.SUCCESS) {
window.location.href = ctx + "common/download?fileName=" + result.msg + "&delete=" + true;
} else {
$.modal.alertError(result.msg);
}
$.modal.closeLoading();
$.modal.confirm("确定导出所有" + $.table._option.modalName + "吗?", function() {
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
$.modal.loading("正在导出数据,请稍后...");
$.post($.table._option.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) {
$.modal.alertWarning(result.msg)
} else {
$.modal.alertError(result.msg);
}
$.modal.closeLoading();
});
});
},
// 下载模板
importTemplate: function() {
$.get($.table._option.importTemplateUrl, function(result) {
if (result.code == web_status.SUCCESS) {
window.location.href = ctx + "common/download?fileName=" + result.msg + "&delete=" + true;
} else {
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
} else if (result.code == web_status.WARNING) {
$.modal.alertWarning(result.msg)
} else {
$.modal.alertError(result.msg);
}
});
@@ -140,6 +231,7 @@
return false;
}
var index = layer.load(2, {shade: false});
$.modal.disable();
var formData = new FormData();
formData.append("file", $('#file')[0].files[0]);
formData.append("updateSupport", $("input[name='updateSupport']").is(':checked'));
@@ -155,8 +247,13 @@
$.modal.closeAll();
$.modal.alertSuccess(result.msg);
$.table.refresh();
} else {
} else if (result.code == web_status.WARNING) {
layer.close(index);
$.modal.enable();
$.modal.alertWarning(result.msg)
} else {
layer.close(index);
$.modal.enable();
$.modal.alertError(result.msg);
}
}
@@ -166,27 +263,35 @@
},
// 刷新表格
refresh: function() {
$("#bootstrap-table").bootstrapTable('refresh', {
$("#" + $.table._option.id).bootstrapTable('refresh', {
silent: true
});
},
// 查询表格指定列值
selectColumns: function(column) {
return $.map($('#bootstrap-table').bootstrapTable('getSelections'), function (row) {
var rows = $.map($('#' + $.table._option.id).bootstrapTable('getSelections'), function (row) {
return row[column];
});
if ($.common.isNotEmpty($.table._option.rememberSelected) && $.table._option.rememberSelected) {
rows = rows.concat(selectionIds);
}
return $.common.uniqueFn(rows);
},
// 查询表格首列值
selectFirstColumns: function() {
return $.map($('#bootstrap-table').bootstrapTable('getSelections'), function (row) {
var rows = $.map($('#' + $.table._option.id).bootstrapTable('getSelections'), function (row) {
return row[$.table._option.columns[1].field];
});
if ($.common.isNotEmpty($.table._option.rememberSelected) && $.table._option.rememberSelected) {
rows = rows.concat(selectionIds);
}
return $.common.uniqueFn(rows);
},
// 回显数据字典
selectDictLabel: function(datas, value) {
var actions = [];
$.each(datas, function(index, dict) {
if (dict.dictValue == value) {
if (dict.dictValue == ('' + value)) {
actions.push("<span class='badge badge-" + dict.listClass + "'>" + dict.dictLabel + "</span>");
return false;
}
@@ -195,35 +300,49 @@
},
// 显示表格指定列
showColumn: function(column) {
$("#bootstrap-table").bootstrapTable('showColumn', column);
$("#" + $.table._option.id).bootstrapTable('showColumn', column);
},
// 隐藏表格指定列
hideColumn: function(column) {
$("#bootstrap-table").bootstrapTable('hideColumn', column);
$("#" + $.table._option.id).bootstrapTable('hideColumn', column);
}
},
// 表格树封装处理
treeTable: {
_option: {},
// 初始化表格
init: function(options) {
var defaults = {
id: "bootstrap-tree-table",
type: 1, // 0 代表bootstrapTable 1代表bootstrapTreeTable
height: 0,
rootIdValue: null,
ajaxParams: {},
toolbar: "toolbar",
striped: false,
expandColumn: 1,
showRefresh: true,
showColumns: true,
expandAll: true,
expandFirst: true
};
var options = $.extend(defaults, options);
$.table._option = options;
_striped = $.common.isEmpty(options.striped) ? false : options.striped;
_expandColumn = $.common.isEmpty(options.expandColumn) ? '1' : options.expandColumn;
var treeTable = $('#bootstrap-tree-table').bootstrapTreeTable({
var treeTable = $('#' + options.id).bootstrapTreeTable({
code: options.code, // 用于设置父子关系
parentCode: options.parentCode, // 用于设置父子关系
type: 'get', // 请求方式(*
url: options.url, // 请求后台的URL*
ajaxParams: {}, // 请求数据的ajax的data属性
expandColumn: _expandColumn, // 在哪一列上面显示展开按钮
striped: _striped, // 是否显示行间隔色
ajaxParams: options.ajaxParams, // 请求数据的ajax的data属性
rootIdValue: options.rootIdValue, // 设置指定根节点id值
height: options.height, // 表格树的高度
expandColumn: options.expandColumn, // 在哪一列上面显示展开按钮
striped: options.striped, // 是否显示行间隔色
bordered: true, // 是否显示边框
toolbar: '#toolbar', // 指定工作栏
showRefresh: $.common.visible(options.showRefresh), // 是否显示刷新按钮
showColumns: $.common.visible(options.showColumns), // 是否显示隐藏某列下拉框
expandAll: $.common.visible(options.expandAll), // 是否全部展开
expandFirst: $.common.visible(options.expandFirst), // 是否默认第一级展开--expandAll为false时生效
toolbar: '#' + options.toolbar, // 指定工作栏
showRefresh: options.showRefresh, // 是否显示刷新按钮
showColumns: options.showColumns, // 是否显示隐藏某列下拉框
expandAll: options.expandAll, // 是否全部展开
expandFirst: options.expandFirst, // 是否默认第一级展开--expandAll为false时生效
columns: options.columns
});
$._treeTable = treeTable;
@@ -364,7 +483,7 @@
});
},
// 弹出层指定宽度
open: function (title, url, width, height) {
open: function (title, url, width, height, callback) {
//如果是移动端,就使用自适应大小弹窗
if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {
width = 'auto';
@@ -382,6 +501,12 @@
if ($.common.isEmpty(height)) {
height = ($(window).height() - 50);
};
if ($.common.isEmpty(callback)) {
callback = function(index, layero) {
var iframeWin = layero.find('iframe')[0];
iframeWin.contentWindow.submitHandler();
}
}
layer.open({
type: 2,
area: [width + 'px', height + 'px'],
@@ -394,10 +519,7 @@
btn: ['确定', '关闭'],
// 弹层外区域关闭
shadeClose: true,
yes: function(index, layero) {
var iframeWin = layero.find('iframe')[0];
iframeWin.contentWindow.submitHandler();
},
yes: callback,
cancel: function(index) {
return true;
}
@@ -467,13 +589,19 @@
});
layer.full(index);
},
// 选卡页方式打开
openTab: function (title, url) {
createMenuItem(url, title);
},
// 禁用按钮
disable: function() {
$("a[class*=layui-layer-btn]", window.parent.document).addClass("layer-disabled");
var doc = window.top == window.parent ? window.document : window.parent.document;
$("a[class*=layui-layer-btn]", doc).addClass("layer-disabled");
},
// 启用按钮
enable: function() {
$("a[class*=layui-layer-btn]", window.parent.document).removeClass("layer-disabled");
var doc = window.top == window.parent ? window.document : window.parent.document;
$("a[class*=layui-layer-btn]", doc).removeClass("layer-disabled");
},
// 打开遮罩层
loading: function (message) {
@@ -526,7 +654,7 @@
_width = 'auto';
_height = 'auto';
}
top.layer.open({
layer.open({
type: 2,
area: [_width + 'px', _height + 'px'],
fix: false,
@@ -546,10 +674,15 @@
// 删除信息
remove: function(id) {
$.modal.confirm("确定删除该条" + $.table._option.modalName + "信息吗?", function() {
var url = $.common.isEmpty(id) ? $.table._option.removeUrl : $.table._option.removeUrl.replace("{id}", id);
var data = { "ids": id };
$.operate.submit(url, "post", "json", data);
var url = $.common.isEmpty(id) ? $.table._option.removeUrl : $.table._option.removeUrl.replace("{id}", id);
if($.table._option.type == table_type.bootstrapTreeTable) {
$.operate.get(url);
} else {
var data = { "ids": id };
$.operate.submit(url, "post", "json", data);
}
});
},
// 批量删除信息
removeAll: function() {
@@ -573,39 +706,40 @@
},
// 添加信息
add: function(id) {
var url = $.common.isEmpty(id) ? $.table._option.createUrl : $.table._option.createUrl.replace("{id}", id);
$.modal.open("添加" + $.table._option.modalName, url);
$.modal.open("添加" + $.table._option.modalName, $.operate.addUrl(id));
},
// 修改信息
edit: function(id) {
var url = "/404.html";
if ($.common.isNotEmpty(id)) {
url = $.table._option.updateUrl.replace("{id}", id);
} else {
var id = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
if (id.length == 0) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
url = $.table._option.updateUrl.replace("{id}", id);
}
$.modal.open("修改" + $.table._option.modalName, url);
},
// 工具栏表格树修改
editTree: function() {
var row = $('#bootstrap-tree-table').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);
// 添加信息,以tab页展现
addTab: function (id) {
$.modal.openTab("添加" + $.table._option.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);
},
// 添加访问地址
addUrl: function(id) {
var url = $.common.isEmpty(id) ? $.table._option.createUrl : $.table._option.createUrl.replace("{id}", id);
return url;
},
// 修改信息
edit: function(id) {
if($.common.isEmpty(id) && $.table._option.type == table_type.bootstrapTreeTable) {
var row = $('#' + $.table._option.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);
} else {
$.modal.open("修改" + $.table._option.modalName, $.operate.editUrl(id));
}
},
// 修改信息,以tab页展现
editTab: function(id) {
$.modal.openTab("修改" + $.table._option.modalName, $.operate.editUrl(id));
},
// 修改信息 全屏
editFull: function(id) {
var url = "/404.html";
@@ -617,7 +751,22 @@
}
$.modal.openFull("修改" + $.table._option.modalName, url);
},
// 保存信息
// 修改访问地址
editUrl: function(id) {
var url = "/404.html";
if ($.common.isNotEmpty(id)) {
url = $.table._option.updateUrl.replace("{id}", id);
} else {
var id = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
if (id.length == 0) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
url = $.table._option.updateUrl.replace("{id}", id);
}
return url;
},
// 保存信息 刷新表格
save: function(url, data) {
var config = {
url: url,
@@ -634,12 +783,56 @@
};
$.ajax(config)
},
// 保存信息 弹出提示框
saveModal: function(url, data) {
var config = {
url: url,
type: "post",
dataType: "json",
data: data,
beforeSend: function () {
$.modal.loading("正在处理中,请稍后...");
},
success: function(result) {
if (result.code == web_status.SUCCESS) {
$.modal.alertSuccess(result.msg)
} else if (result.code == web_status.WARNING) {
$.modal.alertWarning(result.msg)
} else {
$.modal.alertError(result.msg);
}
$.modal.closeLoading();
}
};
$.ajax(config)
},
// 保存选项卡信息
saveTab: function(url, data) {
var config = {
url: url,
type: "post",
dataType: "json",
data: data,
beforeSend: function () {
$.modal.loading("正在处理中,请稍后...");
},
success: function(result) {
$.operate.successTabCallback(result);
}
};
$.ajax(config)
},
// 保存结果弹出msg刷新table表格
ajaxSuccess: function (result) {
if (result.code == web_status.SUCCESS) {
if (result.code == web_status.SUCCESS && $.table._option.type == table_type.bootstrapTable) {
$.modal.msgSuccess(result.msg);
$.table.refresh();
} else {
} else if (result.code == web_status.SUCCESS && $.table._option.type == table_type.bootstrapTreeTable) {
$.modal.msgSuccess(result.msg);
$.treeTable.refresh();
} else if (result.code == web_status.WARNING) {
$.modal.alertWarning(result.msg)
} else {
$.modal.alertError(result.msg);
}
$.modal.closeLoading();
@@ -648,7 +841,9 @@
saveSuccess: function (result) {
if (result.code == web_status.SUCCESS) {
$.modal.msgReload("保存成功,正在刷新数据请稍后……", modal_status.SUCCESS);
} else {
} else if (result.code == web_status.WARNING) {
$.modal.alertWarning(result.msg)
} else {
$.modal.alertError(result.msg);
}
$.modal.closeLoading();
@@ -656,22 +851,47 @@
// 成功回调执行事件(父窗体静默更新)
successCallback: function(result) {
if (result.code == web_status.SUCCESS) {
if (window.parent.$("#bootstrap-table").length > 0) {
var parent = window.parent;
if (parent.$.table._option.type == table_type.bootstrapTable) {
$.modal.close();
window.parent.$.modal.msgSuccess(result.msg);
window.parent.$.table.refresh();
} else if (window.parent.$("#bootstrap-tree-table").length > 0) {
parent.$.modal.msgSuccess(result.msg);
parent.$.table.refresh();
} else if (parent.$.table._option.type == table_type.bootstrapTreeTable) {
$.modal.close();
window.parent.$.modal.msgSuccess(result.msg);
window.parent.$.treeTable.refresh();
parent.$.modal.msgSuccess(result.msg);
parent.$.treeTable.refresh();
} else {
$.modal.msgReload("保存成功,正在刷新数据请稍后……", modal_status.SUCCESS);
}
} else {
} else if (result.code == web_status.WARNING) {
$.modal.alertWarning(result.msg)
} else {
$.modal.alertError(result.msg);
}
$.modal.closeLoading();
$.modal.enable();
},
// 选项卡成功回调执行事件(父窗体静默更新)
successTabCallback: function(result) {
if (result.code == web_status.SUCCESS) {
var topWindow = $(window.parent.document);
var currentId = $('.page-tabs-content', topWindow).find('.active').attr('data-panel');
var $contentWindow = $('.RuoYi_iframe[data-id="' + currentId + '"]', topWindow)[0].contentWindow;
$.modal.close();
$contentWindow.$.modal.msgSuccess(result.msg);
$contentWindow.$(".layui-layer-padding").removeAttr("style");
if ($contentWindow.$.table._option.type == table_type.bootstrapTable) {
$contentWindow.$.table.refresh();
} else if ($contentWindow.$.table._option.type == table_type.bootstrapTreeTable) {
$contentWindow.$.treeTable.refresh();
}
closeItem();
} else if (result.code == web_status.WARNING) {
$.modal.alertWarning(result.msg)
} else {
$.modal.alertError(result.msg);
}
$.modal.closeLoading();
}
},
// 校验封装处理
@@ -695,54 +915,56 @@
_lastValue: {},
// 初始化树结构
init: function(options) {
var defaults = {
id: "tree", // 属性ID
expandLevel: 0, // 展开等级节点
view: {
selectedMulti: false, // 设置是否允许同时选中多个节点
nameIsHTML: true // 设置 name 属性是否支持 HTML 脚本
},
check: {
enable: false, // 置 zTree 的节点上是否显示 checkbox / radio
nocheckInherit: true, // 设置子节点是否自动继承
},
data: {
key: {
title: "title" // 节点数据保存节点提示信息的属性名称
},
simpleData: {
enable: true // true / false 分别表示 使用 / 不使用 简单数据模式
}
},
};
var options = $.extend(defaults, options);
$.tree._option = options;
// 属性ID
var _id = $.common.isEmpty(options.id) ? "tree" : options.id;
// 展开等级节点
var _expandLevel = $.common.isEmpty(options.expandLevel) ? 0 : options.expandLevel;
// 树结构初始化加载
var setting = {
check: options.check,
view: { selectedMulti: false, nameIsHTML: true },
data: { key: { title: "title" }, simpleData: { enable: true } },
callback: { onClick: options.onClick }
};
var setting = {
callback: {
onClick: options.onClick, // 用于捕获节点被点击的事件回调函数
onCheck: options.onCheck, // 用于捕获 checkbox / radio 被勾选 或 取消勾选的事件回调函数
onDblClick: options.onDblClick // 用于捕获鼠标双击之后的事件回调函数
},
check: options.check,
view: options.view,
data: options.data
};
$.get(options.url, function(data) {
var treeName = $("#treeName").val();
var treeId = $("#treeId").val();
tree = $.fn.zTree.init($("#" + _id), setting, data);
tree = $.fn.zTree.init($("#" + options.id), setting, data);
$._tree = tree;
// 展开第一级节点
var nodes = tree.getNodesByParam("level", 0);
var nodes = tree.getNodesByParam("level", options.expandLevel - 1);
for (var i = 0; i < nodes.length; i++) {
if(_expandLevel > 0) {
tree.expandNode(nodes[i], true, false, false);
}
$.tree.selectByIdName(treeId, treeName, nodes[i]);
tree.expandNode(nodes[i], true, false, false);
}
// 展开第二级节点
nodes = tree.getNodesByParam("level", 1);
for (var i = 0; i < nodes.length; i++) {
if(_expandLevel > 1) {
tree.expandNode(nodes[i], true, false, false);
}
$.tree.selectByIdName(treeId, treeName, nodes[i]);
}
// 展开第三级节点
nodes = tree.getNodesByParam("level", 2);
for (var i = 0; i < nodes.length; i++) {
if(_expandLevel > 2) {
tree.expandNode(nodes[i], true, false, false);
}
$.tree.selectByIdName(treeId, treeName, nodes[i]);
}
}, null, null, "正在加载,请稍后...");
var node = tree.getNodesByParam("id", treeId, null)[0];
$.tree.selectByIdName(treeId, node);
});
},
// 搜索节点
searchNode: function() {
// 取得输入的关键字的值
var value = $.common.trim($("#keyword").val());
if ($.tree._lastValue === value) {
if ($.tree._lastValue == value) {
return;
}
// 保存最后一次搜索名称
@@ -758,11 +980,9 @@
$.tree.updateNodes($._tree.getNodesByParamFuzzy("name", value));
},
// 根据Id和Name选中指定节点
selectByIdName: function(treeId, treeName, node) {
if ($.common.isNotEmpty(treeName) && $.common.isNotEmpty(treeId)) {
if (treeId == node.id && treeName == node.name) {
$._tree.selectNode(node, true);
}
selectByIdName: function(treeId, node) {
if ($.common.isNotEmpty(treeId) && treeId == node.id) {
$._tree.selectNode(node, true);
}
},
// 显示所有节点
@@ -877,6 +1097,13 @@
isNotEmpty: function (value) {
return !$.common.isEmpty(value);
},
// 空对象转字符串
nullToStr: function(value) {
if ($.common.isEmpty(value)) {
return "-";
}
return value;
},
// 是否显示数据 为空默认为显示
visible: function (value) {
if ($.common.isEmpty(value) || value == true) {
@@ -891,26 +1118,60 @@
}
return value.toString().replace(/(^\s*)|(\s*$)|\r|\n/g, "");
},
// 字符串格式化(%s )
sprintf: function (str) {
var args = arguments, flag = true, i = 1;
str = str.replace(/%s/g, function () {
var arg = args[i++];
if (typeof arg === 'undefined') {
flag = false;
return '';
}
return arg;
});
return flag ? str : '';
},
// 指定随机数返回
random: function (min, max) {
return Math.floor((Math.random() * max) + min);
},
// 判断字符串是否是以start开头
startWith: function(value, start) {
var reg = new RegExp("^" + start);
return reg.test(value)
},
// 判断字符串是否是以end结尾
endWith: function(value, end) {
var reg = new RegExp(end + "$");
return reg.test(value)
},
// 数组去重
uniqueFn: function(array) {
var result = [];
var hashObj = {};
for (var i = 0; i < array.length; i++) {
if (!hashObj[array[i]]) {
hashObj[array[i]] = true;
result.push(array[i]);
}
}
return result;
}
}
});
})(jQuery);
/** 表格类型 */
table_type = {
bootstrapTable: 0,
bootstrapTreeTable: 1
};
/** 消息状态码 */
web_status = {
SUCCESS: 0,
FAIL: 500
FAIL: 500,
WARNING: 301
};
/** 弹窗状态码 */
@@ -14,8 +14,8 @@
<h3 class="font-bold">您没有访问权限!</h3>
<div class="error-desc">
对不起,您正在寻找的页面已经找到。尝试检查URL的错误,然后按浏览器上的刷新按钮或尝试在我们的应用程序中找到其他内容。
<a href="javascript:top.document.location.href='/'" class="btn btn-primary m-t">主页</a>
对不起,您没有访问权限,请不要进行非法操作!您可以返回主页面
<a href="javascript:top.document.location.href='/'" class="btn btn-outline btn-primary btn-xs">返回主页</a>
</div>
</div>
<script src="/js/jquery.min.js?v=2.1.4"></script>
@@ -1,29 +1,32 @@
<head th:fragment="header">
<!-- 通用CSS -->
<head th:fragment=header(title)>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<meta name="keywords" content="">
<meta name="description" content="">
<title th:text="${title}"></title>
<link rel="shortcut icon" href="favicon.ico">
<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
<link th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
<!-- bootstrap-table 表格插件样式 -->
<link th:href="@{/ajax/libs/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet"/>
<link th:href="@{/ajax/libs/bootstrap-treetable/bootstrap-treetable.css}" rel="stylesheet"/>
<link th:href="@{/ajax/libs/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.css}" rel="stylesheet"/>
<link th:href="@{/css/animate.css}" rel="stylesheet"/>
<link th:href="@{/css/style.css}" rel="stylesheet"/>
<link th:href="@{/ajax/libs/select/select2.css}" rel="stylesheet"/>
<link th:href="@{/ruoyi/css/ry-ui.css}" rel="stylesheet"/>
</head>
<!-- 通用JS -->
<div th:fragment="footer">
<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/js/bootstrap.min.js}"></script>
<!-- bootstrap-table 表格插件 -->
<script th:src="@{/ajax/libs/bootstrap-table/bootstrap-table.min.js}"></script>
<script th:src="@{/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js}"></script>
<script th:src="@{/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js}"></script>
<script th:src="@{/ajax/libs/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js}"></script>
<script th:src="@{/ajax/libs/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js}"></script>
<!-- jquery-validate 表单验证插件 -->
<script th:src="@{/ajax/libs/validate/jquery.validate.min.js}"></script>
<script th:src="@{/ajax/libs/validate/messages_zh.min.js}"></script>
@@ -35,11 +38,69 @@
<script th:src="@{/ajax/libs/bootstrap-table/extensions/export/tableExport.js}"></script>
<!-- 遮罩层 -->
<script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
<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=3.2.0}"></script>
<script th:src="@{/ruoyi/js/ry-ui.js?v=3.2.0}"></script>
<script th:src="@{/ruoyi/js/common.js?v=3.3.0}"></script>
<script th:src="@{/ruoyi/js/ry-ui.js?v=3.3.0}"></script>
<script src="http://tajs.qq.com/stats?sId=62048022"></script>
<script th:inline="javascript"> var ctx = [[@{/}]]; </script>
</div>
<!-- ztree树插件 -->
<div th:fragment="ztree-css">
<link th:href="@{/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css}" rel="stylesheet"/>
</div>
<div th:fragment="ztree-js">
<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
</div>
<!-- select下拉框插件 -->
<div th:fragment="select2-css">
<link th:href="@{/ajax/libs/select/select2.css}" rel="stylesheet"/>
</div>
<div th:fragment="select2-js">
<script th:src="@{/ajax/libs/select/select2.js}"></script>
</div>
<!-- datetimepicker日期和时间插件 -->
<div th:fragment="datetimepicker-css">
<link th:href="@{/ajax/libs/datapicker/bootstrap-datetimepicker.min.css}" rel="stylesheet"/>
</div>
<div th:fragment="datetimepicker-js">
<script th:src="@{/ajax/libs//datapicker/bootstrap-datetimepicker.min.js}"></script>
</div>
<!-- ui布局插件 -->
<div th:fragment="layout-latest-css">
<link th:href="@{/ajax/libs/jquery-layout/jquery.layout-latest.css}" rel="stylesheet"/>
</div>
<div th:fragment="layout-latest-js">
<script th:src="@{/ajax/libs/jquery-layout/jquery.layout-latest.js}"></script>
</div>
<!-- summernote富文本编辑器插件 -->
<div th:fragment="summernote-css">
<link th:href="@{/ajax/libs/summernote/summernote.css}" rel="stylesheet"/>
<link th:href="@{/ajax/libs/summernote/summernote-bs3.css}" rel="stylesheet"/>
</div>
<div th:fragment="summernote-js">
<script th:src="@{/ajax/libs/summernote/summernote.min.js}"></script>
<script th:src="@{/ajax/libs/summernote/summernote-zh-CN.js}"></script>
</div>
<!-- cropbox图像裁剪插件 -->
<div th:fragment="cropbox-css">
<link th:href="@{/ajax/libs/cropbox/cropbox.css}" rel="stylesheet"/>
</div>
<div th:fragment="cropbox-js">
<script th:src="@{/ajax/libs/cropbox/cropbox.js}"></script>
</div>
<!-- jsonview格式化和语法高亮JSON格式数据查看插件 -->
<div th:fragment="jsonview-css">
<link th:href="@{/ajax/libs/jsonview/jquery.jsonview.css}" rel="stylesheet"/>
</div>
<div th:fragment="jsonview-js">
<script th:src="@{/ajax/libs/jsonview/jquery.jsonview.js}"></script>
</div>
@@ -16,7 +16,7 @@
<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=3.2.0}" rel="stylesheet"/>
<link th:href="@{/ruoyi/css/ry-ui.css?v=3.3.0}" rel="stylesheet"/>
<style type="text/css">
.nav > li:hover .dropdown-menu {display: block;}
#content-main.max { height: calc(100% - 110px); overflow: hidden; width: 100%; height: 100%; left: 0px; position: absolute; top: 0px; z-index: 9998; margin: 0; }
@@ -87,6 +87,7 @@
</a>
</div>
<ul class="nav navbar-top-links navbar-right welcome-message">
<li><a title="使用文档" href="http://doc.ruoyi.vip" target="_blank"><i class="fa fa-question-circle"></i> 使用文档</a></li>
<li><a title="全屏显示" id="fullScreen"><i class="fa fa-arrows-alt"></i> 全屏显示</a></li>
<li class="dropdown user-menu">
<a href="javascript:" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown">
@@ -158,7 +159,7 @@
<script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
<script src="http://tajs.qq.com/stats?sId=62048022"></script>
<script th:src="@{/ruoyi/js/ry-ui.js?v=3.2.0}"></script>
<script th:src="@{/ruoyi/js/ry-ui.js?v=3.3.0}"></script>
<script th:src="@{/ruoyi/index.js}"></script>
<script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script>
<script th:inline="javascript">
@@ -7,11 +7,11 @@
<title>若依管理系统</title>
<meta name="keywords" content="若依,若依开源,若依框架,若依系统,ruoyi">
<meta name="description" content="若依基于SpringBoot2.0的权限管理系统 易读易懂、界面简洁美观。 核心技术采用Spring、MyBatis、Shiro没有任何其它重度依赖">
<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/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=3.2.0}" rel="stylesheet"/>
<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/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=3.3.0}" rel="stylesheet"/>
<!--[if lt IE 9]>
<meta http-equiv="refresh" content="0;ie.html" />
<![endif]-->
@@ -51,7 +51,7 @@
<input type="password" name="password" class="form-control pword" placeholder="密码" value="admin123" />
<div class="row m-t" th:if="${captchaEnabled==true}">
<div class="col-xs-6">
<input type="text" name="validateCode" class="form-control code" placeholder="验证码" maxlength="5">
<input type="text" name="validateCode" class="form-control code" placeholder="验证码" maxlength="5" autocomplete="off">
</div>
<div class="col-xs-6">
<a href="javascript:void(0);" title="点击更换验证码">
@@ -59,7 +59,7 @@
</a>
</div>
</div>
<div class="checkbox-custom">
<div class="checkbox-custom" th:classappend="${captchaEnabled==false} ? 'm-t'">
<input type="checkbox" id="rememberme" name="rememberme"> <label for="rememberme">记住我</label>
</div>
<button class="btn btn-success btn-block" id="btnSubmit" data-loading="正在验证登录,请稍后...">登录</button>
@@ -68,7 +68,7 @@
</div>
<div class="signup-footer">
<div class="pull-left">
&copy; 2018 All Rights Reserved. RuoYi <br>
&copy; 2019 All Rights Reserved. RuoYi <br>
<a href="http://www.miitbeian.gov.cn/" target="_blank" rel="nofollow">粤ICP备18046899号</a><br>
</div>
</div>
@@ -83,7 +83,7 @@
<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="http://tajs.qq.com/stats?sId=62048022"></script>
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=3.2.0}"></script>
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=3.3.0}"></script>
<script src="../static/ruoyi/login.js" th:src="@{/ruoyi/login.js}"></script>
</body>
</html>
@@ -16,9 +16,11 @@
<div class="row border-bottom white-bg dashboard-header">
<div class="col-sm-12">
<blockquote class="text-warning" style="font-size:14px">
领取阿里云1888通用代金券(新老客户均可用)
<br><a target="_blank" href="https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=brki8iof">https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=brki8iof</a>
<h4 class="text-danger">云产品通用红包,可叠加官网常规优惠使用。</h4>
领取阿里云通用云产品1888优惠券
<br><a target="_blank" href="https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=brki8iof">https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=brki8iof</a><br>
领取腾讯云通用云产品2860优惠券
<br><a target="_blank" href="https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console">https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console</a>
<h4 class="text-danger">云产品通用红包,可叠加官网常规优惠使用。(仅限新用户)</h4>
</blockquote>
<hr>
@@ -77,7 +79,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> <a href="https://jq.qq.com/?_wv=1027&k=5YW0wjE" target="_blank">1529866</a>
<p><i class="fa fa-qq"></i> QQ群:<s>满1389287</s> <s>满1679294</s> <s>满1529866</s> <a href="https://jq.qq.com/?_wv=1027&k=5g75dCU" target="_blank">1772718</a>
</p>
<p><i class="fa fa-weixin"></i> 微信:<a href="javascript:;">/ *若依</a>
</p>
@@ -94,13 +96,59 @@
<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="#v33">v3.3.0</a><code class="pull-right">2019.04.01</code>
</h5>
</div>
<div id="v33" class="panel-collapse collapse in">
<div class="panel-body">
<ol>
<li>新增线程池统一管理</li>
<li>新增支持左右冻结列</li>
<li>新增表格字符超长浮动提示</li>
<li>升级datepicker拓展并汉化</li>
<li>升级druid到最新版本v1.1.14</li>
<li>修复个人头像为图片服务器跨域问题</li>
<li>修改上传文件按日期存储</li>
<li>新增表格客户端分页选项</li>
<li>新增表格的高度参数</li>
<li>新增表格销毁方法</li>
<li>新增表格下拉按钮切换方法</li>
<li>新增表格分页跳转到指定页码</li>
<li>新增表格启用点击选中行参数</li>
<li>修复表格数据重新加载未触发部分按钮禁用</li>
<li>使用jsonview展示操作日志参数</li>
<li>新增方法(addTab、editTab</li>
<li>修改用户管理界面为Tab打开方式</li>
<li>表单验证代码优化</li>
<li>修复@Excel注解 prompt 属性使用报错</li>
<li>修复combo属性Excel兼容性问题</li>
<li>新增@Excel导入导出支持父类字段</li>
<li>修复关闭最后选项卡无法激活滚动问题</li>
<li>增加日期控件显示类型及回显格式扩展选项</li>
<li>修复定时任务执行失败后入库状态为成功状态</li>
<li>支持定时任务并发开关控制</li>
<li>优化权限校验失败普通请求跳转页面</li>
<li>捕获线程池执行任务抛出的异常</li>
<li>修复IE浏览器导出功能报错</li>
<li>新增角色管理分配用户功能</li>
<li>新增表格翻页记住前面的选择</li>
<li>调整用户个人中心页面</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="#v32">v3.2.0</a><code class="pull-right">2019.01.18</code>
</h5>
</div>
<div id="v32" class="panel-collapse collapse in">
<div id="v32" class="panel-collapse collapse">
<div class="panel-body">
<ol>
<li>部门修改时不允许选择最后节点</li>
@@ -1,10 +1,9 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<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 search-collapse">
@@ -38,7 +37,7 @@
</form>
</div>
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:logininfor:remove">
<i class="fa fa-remove"></i> 删除
</a>
@@ -56,7 +55,7 @@
</div>
</div>
<div th:include="include :: footer"></div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var datas = [[${@dict.getType('sys_common_status')}]];
var prefix = ctx + "monitor/logininfor";
@@ -70,9 +69,9 @@
sortName: "loginTime",
sortOrder: "desc",
modalName: "登录日志",
search: false,
showExport: false,
escape: true,
showPageGo: true,
rememberSelected: true,
columns: [{
checkbox: true
},
@@ -1,10 +1,9 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<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 search-collapse">
@@ -26,7 +25,7 @@
</form>
</div>
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-danger btn-del disabled" onclick="javascript:batchForceLogout()" shiro:hasPermission="monitor:online:batchForceLogout">
<i class="fa fa-sign-out"></i> 强退
</a>
@@ -37,7 +36,7 @@
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var forceFlag = [[${@permission.hasPermi('monitor:online:forceLogout')}]];
var prefix = ctx + "monitor/online";
@@ -48,7 +47,7 @@
exportUrl: prefix + "/export",
sortName: "lastAccessTime",
sortOrder: "desc",
search: false,
showExport: true,
escape: true,
columns: [{
checkbox: true
@@ -77,7 +76,7 @@
title: '主机'
},
{
field: 'longinLocation',
field: 'loginLocation',
title: '登录地点'
},
{
@@ -1,8 +1,9 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('操作日志详细')" />
<th:block th:include="include :: jsonview-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m-t" id="signupForm">
@@ -42,13 +43,16 @@
</div>
</form>
</div>
<div th:include="include :: footer"></div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: jsonview-js" />
<script th:inline="javascript">
$(function() {
var text = [[${operLog.operParam}]];
var result = JSON.stringify(JSON.parse(text), null, 2);
$("#operParam").html(result);
var json = [[${operLog.operParam}]];
if ($.common.isNotEmpty(json) && json.length < 2000) {
$("#operParam").JSONView(json);
} else {
$("#operParam").text(json);
}
});
</script>
</body>
@@ -1,10 +1,9 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<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 search-collapse">
@@ -38,14 +37,14 @@
</form>
</div>
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:logininfor:remove">
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:operlog:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-danger" onclick="$.operate.clean()" shiro:hasPermission="monitor:logininfor:remove">
<a class="btn btn-danger" onclick="$.operate.clean()" shiro:hasPermission="monitor:operlog:remove">
<i class="fa fa-trash"></i> 清空
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="monitor:logininfor:export">
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="monitor:operlog:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
@@ -56,7 +55,7 @@
</div>
</div>
<div th:include="include :: footer"></div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var detailFlag = [[${@permission.hasPermi('monitor:operlog:detail')}]];
var datas = [[${@dict.getType('sys_oper_type')}]];
@@ -72,9 +71,9 @@
sortName: "operTime",
sortOrder: "desc",
modalName: "操作日志",
search: false,
showExport: false,
escape: true,
showPageGo: true,
rememberSelected: true,
columns: [{
checkbox: true
},
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg" id="test">
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('服务器监控')" />
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content">
<div class="col-sm-12">
<div class="row">
@@ -234,7 +234,7 @@
</div>
</div>
</body>
<div th:include="include :: footer"></div>
<th:block th:include="include :: footer" />
<script>
$(".modal").appendTo("body"), $("[data-toggle=popover]").popover(), $(".collapse-link").click(function() {
var div_ibox = $(this).closest("div.ibox"),
@@ -1,26 +1,27 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('新增参数')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-config-add" name="form-config-add">
<div class="form-group">
<label class="col-sm-3 control-label">参数名称:</label>
<div class="col-sm-8">
<input id="configName" name="configName" class="form-control" type="text">
<input id="configName" name="configName" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">参数键名:</label>
<div class="col-sm-8">
<input id="configKey" name="configKey" class="form-control" type="text">
<input id="configKey" name="configKey" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">参数键值:</label>
<div class="col-sm-8">
<input id="configValue" name="configValue" class="form-control" type="text">
<input id="configValue" name="configValue" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
@@ -40,14 +41,14 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "system/config";
$("#form-config-add").validate({
onkeyup: false,
rules: {
configKey: {
required: true,
remote: {
url: prefix + "/checkConfigKeyUnique",
type: "post",
@@ -62,18 +63,13 @@
}
}
},
configName: {
required: true
},
configValue: {
required: true
},
},
messages: {
"configKey": {
remote: "参数键名已经存在"
}
}
},
focusCleanup: true
});
function submitHandler() {
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('参数列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
@@ -37,7 +37,7 @@
</form>
</div>
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:config:add">
<i class="fa fa-plus"></i> 新增
</a>
@@ -56,7 +56,7 @@
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:config:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:config:remove')}]];
@@ -73,8 +73,6 @@
sortName: "createTime",
sortOrder: "desc",
modalName: "参数",
search: false,
showExport: false,
columns: [{
checkbox: true
},
@@ -102,6 +100,14 @@
return $.table.selectDictLabel(datas, value);
}
},
{
field: 'remark',
title: '备注',
align: 'center',
formatter: function(value, row, index) {
return $.table.tooltip(value);
}
},
{
field: 'createTime',
title: '创建时间'
@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('修改参数')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-config-edit" th:object="${config}">
@@ -9,19 +10,19 @@
<div class="form-group">
<label class="col-sm-3 control-label">参数名称:</label>
<div class="col-sm-8">
<input id="configName" name="configName" th:field="*{configName}" class="form-control" type="text">
<input id="configName" name="configName" th:field="*{configName}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">参数键名:</label>
<div class="col-sm-8">
<input id="configKey" name="configKey" th:field="*{configKey}" class="form-control" type="text">
<input id="configKey" name="configKey" th:field="*{configKey}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">参数键值:</label>
<div class="col-sm-8">
<input id="configValue" name="configValue" th:field="*{configValue}" class="form-control" type="text">
<input id="configValue" name="configValue" th:field="*{configValue}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
@@ -41,14 +42,14 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "system/config";
$("#form-config-edit").validate({
onkeyup: false,
rules: {
configKey: {
required: true,
remote: {
url: prefix + "/checkConfigKeyUnique",
type: "post",
@@ -66,18 +67,13 @@
}
}
},
configName: {
required: true
},
configValue: {
required: true
},
},
messages: {
"configKey": {
remote: "参数键名已经存在"
}
}
},
focusCleanup: true
});
function submitHandler() {
@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('新增部门')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-dept-add">
@@ -9,19 +10,22 @@
<div class="form-group">
<label class="col-sm-3 control-label ">上级部门:</label>
<div class="col-sm-8">
<input class="form-control" type="text" onclick="selectDeptTree()" id="treeName" readonly="true" th:value="${dept.deptName}"/>
<div class="input-group">
<input class="form-control" type="text" onclick="selectDeptTree()" id="treeName" readonly="true" th:value="${dept.deptName}">
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">部门名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="deptName" id="deptName">
<input class="form-control" type="text" name="deptName" id="deptName" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">显示排序:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="orderNum">
<input class="form-control" type="text" name="orderNum" required>
</div>
</div>
<div class="form-group">
@@ -53,14 +57,14 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "system/dept";
$("#form-dept-add").validate({
onkeyup: false,
rules:{
deptName:{
required:true,
remote: {
url: prefix + "/checkDeptNameUnique",
type: "post",
@@ -79,7 +83,6 @@
}
},
orderNum:{
required:true,
digits:true
},
email:{
@@ -93,7 +96,8 @@
"deptName": {
remote: "部门已经存在"
}
}
},
focusCleanup: true
});
function submitHandler() {
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<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">
@@ -28,11 +28,11 @@
</form>
</div>
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add(100)" shiro:hasPermission="system:dept:add">
<i class="fa fa-plus"></i> 新增
</a>
<a class="btn btn-primary" onclick="$.operate.editTree()" shiro:hasPermission="system:dept:edit">
<a class="btn btn-primary" onclick="$.operate.edit()" shiro:hasPermission="system:dept:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-info" id="expandAllBtn">
@@ -44,7 +44,7 @@
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var addFlag = [[${@permission.hasPermi('system:dept:add')}]];
var editFlag = [[${@permission.hasPermi('system:dept:edit')}]];
@@ -95,10 +95,10 @@
formatter: function(value, row, index) {
if (row.parentId != 0) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.deptId + '\')"><i class="fa fa-edit">编辑</i></a> ');
actions.push('<a class="btn btn-info btn-xs ' + addFlag + '" href="#" onclick="$.operate.add(\'' + row.deptId + '\')"><i class="fa fa-plus">新增</i></a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="remove(\'' + row.deptId + '\')"><i class="fa fa-remove">删除</i></a>');
return actions.join('');
actions.push('<a class="' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.deptId + '\')"><i class="fa fa-edit"></i>编辑</a>');
actions.push('<a class="' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.deptId + '\')"><i class="fa fa-trash"></i>删除</a>');
actions.push('<a class="' + addFlag + '" href="#" onclick="$.operate.add(\'' + row.deptId + '\')"><i class="fa fa-plus"></i>添加下级部门</a>');
return $.table.dropdownToggle(actions.join(''));
} else {
return "";
}
@@ -107,23 +107,6 @@
};
$.treeTable.init(options);
});
function remove(id) {
$.modal.confirm("确定删除该条" + $.table._option.modalName + "信息吗?", function() {
$.ajax({
type : 'post',
url: prefix + "/remove/" + id,
success : function(result) {
if (result.code == web_status.SUCCESS) {
$.modal.msgSuccess(result.msg);
$.treeTable.refresh();
} else {
$.modal.msgError(result.msg);
}
}
});
});
}
</script>
</body>
</html>
@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('修改部门')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-dept-edit" th:object="${dept}">
@@ -10,19 +11,22 @@
<div class="form-group">
<label class="col-sm-3 control-label ">上级部门:</label>
<div class="col-sm-8">
<input class="form-control" type="text" id="treeName" onclick="selectDeptTree()" readonly="true" th:field="*{parentName}"/>
<div class="input-group">
<input class="form-control" type="text" id="treeName" onclick="selectDeptTree()" readonly="true" th:field="*{parentName}">
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">部门名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="deptName" th:field="*{deptName}" id="deptName">
<input class="form-control" type="text" name="deptName" th:field="*{deptName}" id="deptName" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">显示排序:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="orderNum" th:field="*{orderNum}">
<input class="form-control" type="text" name="orderNum" th:field="*{orderNum}" required>
</div>
</div>
<div class="form-group">
@@ -54,14 +58,14 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "system/dept";
$("#form-dept-edit").validate({
onkeyup: false,
rules:{
deptName:{
required:true,
remote: {
url: prefix + "/checkDeptNameUnique",
type: "post",
@@ -83,7 +87,6 @@
}
},
orderNum:{
required:true,
digits:true
},
email:{
@@ -97,7 +100,8 @@
"deptName": {
remote: "部门已经存在"
}
}
},
focusCleanup: true
});
function submitHandler() {
@@ -1,11 +1,12 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link th:href="@{/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css}" rel="stylesheet"/>
<head>
<th:block th:include="include :: header('部门树选择')" />
<th:block th:include="include :: ztree-css" />
</head>
<style>
body{height:auto;font-family: "Microsoft YaHei";}
button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
body{height:auto;font-family: "Microsoft YaHei";}
button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
</style>
<body class="hold-transition box box-main">
<input id="treeId" name="treeId" type="hidden" th:value="${dept.deptId}"/>
@@ -24,8 +25,8 @@ button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
</div>
<div id="tree" class="ztree treeselect"></div>
</div>
<div th:include="include::footer"></div>
<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script th:inline="javascript">
$(function() {
var url = ctx + "system/dept/treeData";
@@ -1,20 +1,21 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('新增字典数据')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-dict-add">
<div class="form-group">
<label class="col-sm-3 control-label ">字典标签:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="dictLabel" id="dictLabel"/>
<input class="form-control" type="text" name="dictLabel" id="dictLabel" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">字典键值:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="dictValue" id="dictValue"/>
<input class="form-control" type="text" name="dictValue" id="dictValue" required>
</div>
</div>
<div class="form-group">
@@ -32,7 +33,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">字典排序:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="dictSort">
<input class="form-control" type="text" name="dictSort" required>
</div>
</div>
<div class="form-group">
@@ -76,23 +77,17 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "system/dict/data";
$("#form-dict-add").validate({
rules:{
dictLabel:{
required:true,
},
dictValue:{
required:true,
},
dictSort:{
required:true,
digits:true
},
}
},
focusCleanup: true
});
function submitHandler() {
@@ -1,10 +1,9 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<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 search-collapse">
@@ -34,7 +33,7 @@
</form>
</div>
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="add()" shiro:hasPermission="system:dict:add">
<i class="fa fa-plus"></i> 新增
</a>
@@ -54,8 +53,7 @@
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<script th:src="@{/ajax/libs/select/select2.js}"></script>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:dict:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:dict:remove')}]];
@@ -73,8 +71,6 @@
sortName: "createTime",
sortOrder: "desc",
modalName: "数据",
search: false,
showExport: false,
columns: [{
checkbox: true
},
@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('修改字典数据')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-dict-edit" th:object="${dict}">
@@ -9,13 +10,13 @@
<div class="form-group">
<label class="col-sm-3 control-label ">字典标签:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="dictLabel" id="dictLabel" th:field="*{dictLabel}"/>
<input class="form-control" type="text" name="dictLabel" id="dictLabel" th:field="*{dictLabel}" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">字典键值:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="dictValue" id="dictValue" th:field="*{dictValue}"/>
<input class="form-control" type="text" name="dictValue" id="dictValue" th:field="*{dictValue}" required>
</div>
</div>
<div class="form-group">
@@ -33,7 +34,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">字典排序:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="dictSort" th:field="*{dictSort}">
<input class="form-control" type="text" name="dictSort" th:field="*{dictSort}" required>
</div>
</div>
<div class="form-group">
@@ -77,23 +78,17 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "system/dict/data";
$("#form-dict-edit").validate({
rules:{
dictLabel:{
required:true,
},
dictValue:{
required:true,
},
dictSort:{
required:true,
digits:true
},
}
},
focusCleanup: true
});
function submitHandler() {
@@ -1,20 +1,21 @@
<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增字典类型')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-dict-add">
<div class="form-group">
<label class="col-sm-3 control-label ">字典名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="dictName" id="dictName"/>
<input class="form-control" type="text" name="dictName" id="dictName" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">字典类型:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="dictType" id="dictType">
<input class="form-control" type="text" name="dictType" id="dictType" required>
</div>
</div>
<div class="form-group">
@@ -34,17 +35,14 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "system/dict";
$("#form-dict-add").validate({
onkeyup: false,
rules:{
dictName:{
required:true,
},
dictType:{
required:true,
minlength: 5,
remote: {
url: prefix + "/checkDictTypeUnique",
@@ -65,7 +63,8 @@
"dictType": {
remote: "该字典类型已经存在"
}
}
},
focusCleanup: true
});
function submitHandler() {
@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改字典类型')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-dict-edit" th:object="${dict}">
@@ -9,13 +10,13 @@
<div class="form-group">
<label class="col-sm-3 control-label ">字典名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="dictName" id="dictName" th:field="*{dictName}"/>
<input class="form-control" type="text" name="dictName" id="dictName" th:field="*{dictName}" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">字典类型:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="dictType" id="dictType" th:field="*{dictType}">
<input class="form-control" type="text" name="dictType" id="dictType" th:field="*{dictType}" required>
</div>
</div>
<div class="form-group">
@@ -35,17 +36,14 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "system/dict";
$("#form-dict-edit").validate({
onkeyup: false,
rules:{
dictName:{
required:true,
},
dictType:{
required:true,
minlength: 5,
remote: {
url: prefix + "/checkDictTypeUnique",
@@ -69,7 +67,8 @@
"dictType": {
remote: "该字典类型已经存在"
}
}
},
focusCleanup: true
});
function submitHandler() {
@@ -1,10 +1,9 @@
<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<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 search-collapse">
@@ -38,7 +37,7 @@
</form>
</div>
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:dict:add">
<i class="fa fa-plus"></i> 新增
</a>
@@ -58,7 +57,7 @@
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:dict:edit')}]];
var listFlag = [[${@permission.hasPermi('system:dict:list')}]];
@@ -76,8 +75,6 @@
sortName: "createTime",
sortOrder: "desc",
modalName: "类型",
search: false,
showExport: false,
columns: [{
checkbox: true
},
@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('新增菜单')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-menu-add">
@@ -9,7 +10,10 @@
<div class="form-group">
<label class="col-sm-3 control-label ">上级菜单:</label>
<div class="col-sm-8">
<input class="form-control" type="text" onclick="selectMenuTree()" id="treeName" readonly="true" th:value="${menu.menuName}"/>
<div class="input-group">
<input class="form-control" type="text" onclick="selectMenuTree()" id="treeName" readonly="true" th:value="${menu.menuName}">
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
</div>
</div>
<div class="form-group">
@@ -23,7 +27,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">菜单名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="menuName" id="menuName">
<input class="form-control" type="text" name="menuName" id="menuName" required>
</div>
</div>
<div class="form-group">
@@ -41,7 +45,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">显示排序:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="orderNum">
<input class="form-control" type="text" name="orderNum" required>
</div>
</div>
<div class="form-group">
@@ -66,17 +70,17 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script>
var prefix = ctx + "system/menu";
$("#form-menu-add").validate({
onkeyup: false,
rules:{
menuType:{
required:true,
},
menuName:{
required:true,
remote: {
url: prefix + "/checkMenuNameUnique",
type: "post",
@@ -95,7 +99,6 @@
}
},
orderNum:{
required:true,
digits:true
},
},
@@ -103,7 +106,8 @@
"menuName": {
remote: "菜单已经存在"
}
}
},
focusCleanup: true
});
function submitHandler() {
@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('修改菜单')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-menu-edit" th:object="${menu}">
@@ -10,7 +11,10 @@
<div class="form-group">
<label class="col-sm-3 control-label ">上级菜单:</label>
<div class="col-sm-8">
<input class="form-control" type="text" onclick="selectMenuTree()" id="treeName" readonly="true" th:value="${menu.parentName == null ? '无' : menu.parentName}"/>
<div class="input-group">
<input class="form-control" type="text" onclick="selectMenuTree()" id="treeName" readonly="true" th:value="${menu.parentName == null ? '无' : menu.parentName}">
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
</div>
</div>
<div class="form-group">
@@ -24,7 +28,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">菜单名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="menuName" id="menuName" th:field="*{menuName}">
<input class="form-control" type="text" name="menuName" id="menuName" th:field="*{menuName}" required>
</div>
</div>
<div class="form-group">
@@ -42,7 +46,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">显示排序:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="orderNum" th:field="*{orderNum}">
<input class="form-control" type="text" name="orderNum" th:field="*{orderNum}" required>
</div>
</div>
<div class="form-group">
@@ -67,7 +71,7 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script>
var prefix = ctx + "system/menu";
@@ -77,12 +81,12 @@
});
$("#form-menu-edit").validate({
onkeyup: false,
rules:{
menuType:{
required:true,
},
menuName:{
required:true,
remote: {
url: prefix + "/checkMenuNameUnique",
type: "post",
@@ -104,7 +108,6 @@
}
},
orderNum:{
required:true,
digits:true
},
},
@@ -112,7 +115,8 @@
"menuName": {
remote: "菜单已经存在"
}
}
},
focusCleanup: true
});
function submitHandler() {
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<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 search-collapse">
@@ -28,11 +28,11 @@
</form>
</div>
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add(0)" shiro:hasPermission="system:menu:add">
<i class="fa fa-plus"></i> 新增
</a>
<a class="btn btn-primary" onclick="$.operate.editTree()" shiro:hasPermission="system:menu:edit">
<a class="btn btn-primary" onclick="$.operate.edit()" shiro:hasPermission="system:menu:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-info" id="expandAllBtn">
@@ -45,7 +45,7 @@
</div>
</div>
<div th:include="include :: footer"></div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var addFlag = [[${@permission.hasPermi('system:menu:add')}]];
var editFlag = [[${@permission.hasPermi('system:menu:edit')}]];
@@ -59,7 +59,7 @@
parentCode: "parentId",
uniqueId: "menuId",
expandAll: false,
expandFirst: true,
expandFirst: false,
url: prefix + "/list",
createUrl: prefix + "/add/{id}",
updateUrl: prefix + "/edit/{id}",
@@ -131,32 +131,15 @@
align: "left",
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.menuId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-info btn-xs ' + addFlag + '" href="#" onclick="$.operate.add(\'' + row.menuId + '\')"><i class="fa fa-plus"></i>新增</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="remove(\'' + row.menuId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
actions.push('<a class="' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.menuId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.menuId + '\')"><i class="fa fa-trash"></i>删除</a>');
actions.push('<a class="' + addFlag + '" href="#" onclick="$.operate.add(\'' + row.menuId + '\')"><i class="fa fa-plus"></i>添加下级菜单</a> ');
return $.table.dropdownToggle(actions.join(''));
}
}]
};
$.treeTable.init(options);
});
function remove(id) {
$.modal.confirm("确定删除该条" + $.table._option.modalName + "信息吗?", function() {
$.ajax({
type : 'post',
url: prefix + "/remove/" + id,
success : function(result) {
if (result.code == web_status.SUCCESS) {
$.modal.msgSuccess(result.msg);
$.treeTable.refresh();
} else {
$.modal.msgError(result.msg);
}
}
});
});
}
</script>
</body>
</html>
@@ -1,11 +1,12 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link th:href="@{/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css}" rel="stylesheet"/>
<head>
<th:block th:include="include :: header('菜单树选择')" />
<th:block th:include="include :: ztree-css" />
</head>
<style>
body{height:auto;font-family: "Microsoft YaHei";}
button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
body{height:auto;font-family: "Microsoft YaHei";}
button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
</style>
<body class="hold-transition box box-main">
<input id="treeId" name="treeId" type="hidden" th:value="${menu.menuId}"/>
@@ -24,8 +25,8 @@ button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
</div>
<div id="tree" class="ztree treeselect"></div>
</div>
<div th:include="include::footer"></div>
<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script th:inline="javascript">
$(function() {
var url = ctx + "system/menu/menuTreeData";
@@ -1,16 +1,16 @@
<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link th:href="@{/ajax/libs/summernote/summernote.css}" rel="stylesheet"/>
<link th:href="@{/ajax/libs/summernote/summernote-bs3.css}" rel="stylesheet"/>
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增通知公告')" />
<th:block th:include="include :: summernote-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-notice-add">
<div class="form-group">
<label class="col-sm-3 control-label">公告标题:</label>
<div class="col-sm-8">
<input id="noticeTitle" name="noticeTitle" class="form-control" type="text">
<input id="noticeTitle" name="noticeTitle" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
@@ -39,9 +39,8 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<script th:src="@{/ajax/libs/summernote/summernote.min.js}"></script>
<script th:src="@{/ajax/libs/summernote/summernote-zh-CN.js}"></script>
<th:block th:include="include :: footer" />
<th:block th:include="include :: summernote-js" />
<script type="text/javascript">
var prefix = ctx + "system/notice";
@@ -81,11 +80,7 @@
}
$("#form-notice-add").validate({
rules:{
noticeTitle:{
required:true,
}
}
focusCleanup: true
});
function submitHandler() {
@@ -1,9 +1,9 @@
<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link th:href="@{/ajax/libs/summernote/summernote.css}" rel="stylesheet"/>
<link th:href="@{/ajax/libs/summernote/summernote-bs3.css}" rel="stylesheet"/>
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改通知公告')" />
<th:block th:include="include :: summernote-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-notice-edit" th:object="${notice}">
@@ -11,7 +11,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">公告标题:</label>
<div class="col-sm-8">
<input id="noticeTitle" name="noticeTitle" th:field="*{noticeTitle}" class="form-control" type="text">
<input id="noticeTitle" name="noticeTitle" th:field="*{noticeTitle}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
@@ -40,9 +40,8 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<script th:src="@{/ajax/libs/summernote/summernote.min.js}"></script>
<script th:src="@{/ajax/libs/summernote/summernote-zh-CN.js}"></script>
<th:block th:include="include :: footer" />
<th:block th:include="include :: summernote-js" />
<script type="text/javascript">
var prefix = ctx + "system/notice";
@@ -86,11 +85,7 @@
}
$("#form-notice-edit").validate({
rules:{
noticeTitle:{
required:true,
}
}
focusCleanup: true
});
function submitHandler() {
@@ -1,9 +1,9 @@
<!DOCTYPE HTML>
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('通知公告列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
@@ -31,7 +31,7 @@
</form>
</div>
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.addFull()" shiro:hasPermission="system:notice:add">
<i class="fa fa-plus"></i> 新增
</a>
@@ -48,7 +48,7 @@
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:notice:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:notice:remove')}]];
@@ -63,7 +63,6 @@
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
modalName: "公告",
search: false,
columns: [{
checkbox: true
},
@@ -1,26 +1,27 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('新增岗位')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-post-add">
<div class="form-group">
<label class="col-sm-3 control-label">岗位名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="postName" id="postName">
<input class="form-control" type="text" name="postName" id="postName" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">岗位编码:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="postCode" id="postCode"/>
<input class="form-control" type="text" name="postCode" id="postCode" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">显示顺序:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="postSort" id="postSort">
<input class="form-control" type="text" name="postSort" id="postSort" required>
</div>
</div>
<div class="form-group">
@@ -40,14 +41,14 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "system/post";
$("#form-post-add").validate({
onkeyup: false,
rules:{
postName:{
required:true,
remote: {
url: ctx + "system/post/checkPostNameUnique",
type: "post",
@@ -63,7 +64,6 @@
}
},
postCode:{
required:true,
remote: {
url: ctx + "system/post/checkPostCodeUnique",
type: "post",
@@ -79,7 +79,6 @@
}
},
postSort:{
required:true,
digits:true
},
},
@@ -90,7 +89,8 @@
"postName": {
remote: "岗位名称已经存在"
}
}
},
focusCleanup: true
});
function submitHandler() {
@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('修改岗位')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-post-edit" th:object="${post}">
@@ -9,19 +10,19 @@
<div class="form-group">
<label class="col-sm-3 control-label">岗位名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="postName" id="postName" th:field="*{postName}">
<input class="form-control" type="text" name="postName" id="postName" th:field="*{postName}" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">岗位编码:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="postCode" id="postCode" th:field="*{postCode}"/>
<input class="form-control" type="text" name="postCode" id="postCode" th:field="*{postCode}" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">显示顺序:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="postSort" id="postSort" th:field="*{postSort}">
<input class="form-control" type="text" name="postSort" id="postSort" th:field="*{postSort}" required>
</div>
</div>
<div class="form-group">
@@ -41,14 +42,14 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
var prefix = ctx + "system/post";
$("#form-post-edit").validate({
onkeyup: false,
rules:{
postName:{
required:true,
remote: {
url: ctx + "system/post/checkPostNameUnique",
type: "post",
@@ -67,7 +68,6 @@
}
},
postCode:{
required:true,
remote: {
url: ctx + "system/post/checkPostCodeUnique",
type: "post",
@@ -86,7 +86,6 @@
}
},
postSort:{
required:true,
digits:true
},
},
@@ -97,7 +96,8 @@
"postName": {
remote: "岗位名称已经存在"
}
}
},
focusCleanup: true
});
function submitHandler() {
@@ -1,10 +1,9 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<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 search-collapse">
@@ -32,7 +31,7 @@
</form>
</div>
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:post:add">
<i class="fa fa-plus"></i> 新增
</a>
@@ -52,7 +51,7 @@
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:post:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:post:remove')}]];
@@ -68,8 +67,6 @@
exportUrl: prefix + "/export",
sortName: "postSort",
modalName: "岗位",
search: false,
showExport: false,
columns: [{
checkbox: true
},
@@ -1,27 +1,28 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link th:href="@{/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css}" rel="stylesheet"/>
<head>
<th:block th:include="include :: header('新增角色')" />
<th:block th:include="include :: ztree-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-role-add">
<div class="form-group">
<label class="col-sm-3 control-label ">角色名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="roleName" id="roleName"/>
<input class="form-control" type="text" name="roleName" id="roleName" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">权限字符:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="roleKey" id="roleKey">
<input class="form-control" type="text" name="roleKey" id="roleKey" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">显示顺序:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="roleSort" id="roleSort">
<input class="form-control" type="text" name="roleSort" id="roleSort" required>
</div>
</div>
<div class="form-group">
@@ -50,15 +51,15 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script type="text/javascript">
$(function() {
var url = ctx + "system/menu/roleMenuTreeData";
var options = {
id: "menuTrees",
url: url,
check: { enable: true, nocheckInherit: true, chkboxType: { "Y": "ps", "N": "ps" } },
check: { enable: true },
expandLevel: 0
};
$.tree.init(options);
@@ -66,8 +67,8 @@
$("#form-role-add").validate({
rules:{
onkeyup: false,
roleName:{
required:true,
remote: {
url: ctx + "system/role/checkRoleNameUnique",
type: "post",
@@ -83,7 +84,6 @@
}
},
roleKey:{
required:true,
remote: {
url: ctx + "system/role/checkRoleKeyUnique",
type: "post",
@@ -99,7 +99,6 @@
}
},
roleSort:{
required:true,
digits:true
},
},
@@ -110,7 +109,8 @@
"roleKey": {
remote: "角色权限已经存在"
}
}
},
focusCleanup: true
});
function submitHandler() {
@@ -0,0 +1,154 @@
<!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 search-collapse">
<form id="role-form">
<input type="hidden" id="roleId" name="roleId" th:value="${role.roleId}">
<div class="select-list">
<ul>
<li>
登录名称:<input type="text" name="loginName"/>
</li>
<li>
手机号码:<input type="text" name="phonenumber"/>
</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>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="selectUser()" shiro:hasPermission="system:role:add">
<i class="fa fa-plus"></i> 分配用户
</a>
<a class="btn btn-danger btn-del disabled" onclick="cancelAuthUserAll()" shiro:hasPermission="system:role:remove">
<i class="fa fa-remove"></i> 批量取消授权
</a>
<a class="btn btn-warning" onclick="closeItem()">
<i class="fa fa-reply-all"></i> 关闭
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var removeFlag = [[${@permission.hasPermi('system:role:remove')}]];
var datas = [[${@dict.getType('sys_normal_disable')}]];
var prefix = ctx + "system/role/authUser";
$(function() {
var options = {
url: prefix + "/allocatedList",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
importUrl: prefix + "/importData",
importTemplateUrl: prefix + "/importTemplate",
queryParams: queryParams,
sortName: "createTime",
sortOrder: "desc",
modalName: "用户",
columns: [{
checkbox: true
},
{
field: 'userId',
title: '用户ID',
visible: false,
},
{
field: 'loginName',
title: '登录名称',
sortable: true
},
{
field: 'userName',
title: '用户名称'
},
{
field: 'email',
title: '邮箱'
},
{
field: 'phonenumber',
title: '手机'
},
{
field: 'status',
title: '用户状态',
align: 'center',
formatter: function (value, row, index) {
return $.table.selectDictLabel(datas, value);
}
},
{
field: 'createTime',
title: '创建时间',
sortable: true
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="cancelAuthUser(\'' + row.userId + '\')"><i class="fa fa-remove"></i>取消授权</a> ');
return actions.join('');
}
}]
};
$.table.init(options);
});
function queryParams(params) {
return {
roleId: $("#roleId").val(),
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
searchValue: params.search,
orderByColumn: params.sort,
isAsc: params.order
};
}
/* 分配用户-选择用户 */
function selectUser() {
var url = prefix + '/selectUser/' + $("#roleId").val();
$.modal.open("选择用户", url);
}
/* 分配用户-批量取消授权 */
function cancelAuthUserAll(userId) {
var rows = $.table.selectFirstColumns();
if (rows.length == 0) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
$.modal.confirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
var data = { "roleId": $("#roleId").val(), "userIds": rows.join() };
$.operate.submit(prefix + "/cancelAll", "post", "json", data);
});
}
/* 分配用户-取消授权 */
function cancelAuthUser(userId) {
$.modal.confirm("确认要取消该用户角色吗?", function() {
$.operate.post(prefix + "/cancel", { "roleId": $("#roleId").val(), "userId": userId });
})
}
</script>
</body>
</html>
@@ -1,8 +1,9 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link th:href="@{/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css}" rel="stylesheet"/>
<head>
<th:block th:include="include :: header('角色数据权限')" />
<th:block th:include="include :: ztree-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-role-edit" th:object="${role}">
@@ -29,7 +30,7 @@
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 特殊情况下,设置为“自定数据权限”</span>
</div>
</div>
<div class="form-group" id="roleRule" th:style="'display:' + @{(*{dataScope=='1'} ? 'none' : 'block')} + ''">
<div class="form-group" id="authDataScope" th:style="'display:' + @{(*{dataScope=='1'} ? 'none' : 'block')} + ''">
<label class="col-sm-3 control-label">数据权限</label>
<div class="col-sm-8">
<div id="deptTrees" class="ztree"></div>
@@ -37,8 +38,8 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script type="text/javascript">
$(function() {
@@ -67,7 +68,7 @@
$.ajax({
cache : true,
type : "POST",
url : ctx + "system/role/rule",
url : ctx + "system/role/authDataScope",
data : {
"roleId": roleId,
"roleName": roleName,
@@ -92,10 +93,10 @@
function dataScopeVisible(dataScope) {
if (dataScope == 2) {
$("#roleRule").show();
$("#authDataScope").show();
} else {
$._tree.checkAllNodes(false);
$("#roleRule").hide();
$("#authDataScope").hide();
}
}
</script>
@@ -1,8 +1,9 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link th:href="@{/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css}" rel="stylesheet"/>
<head>
<th:block th:include="include :: header('修改角色')" />
<th:block th:include="include :: ztree-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-role-edit" th:object="${role}">
@@ -10,19 +11,19 @@
<div class="form-group">
<label class="col-sm-3 control-label ">角色名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="roleName" id="roleName" th:field="*{roleName}"/>
<input class="form-control" type="text" name="roleName" id="roleName" th:field="*{roleName}" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">权限字符:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="roleKey" id="roleKey" th:field="*{roleKey}">
<input class="form-control" type="text" name="roleKey" id="roleKey" th:field="*{roleKey}" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">显示顺序:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="roleSort" id="roleSort" th:field="*{roleSort}">
<input class="form-control" type="text" name="roleSort" id="roleSort" th:field="*{roleSort}" required>
</div>
</div>
<div class="form-group">
@@ -51,24 +52,24 @@
</div>
</form>
</div>
<div th:include="include::footer"></div>
<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
<th:block th:include="include :: footer" />
<th:block th:include="include :: ztree-js" />
<script type="text/javascript">
$(function() {
var url = ctx + "system/menu/roleMenuTreeData?roleId=" + $("#roleId").val();
var options = {
id: "menuTrees",
url: url,
check: { enable: true, nocheckInherit: true, chkboxType: { "Y": "ps", "N": "ps" } },
check: { enable: true },
expandLevel: 0
};
$.tree.init(options);
});
$("#form-role-edit").validate({
onkeyup: false,
rules:{
roleName:{
required:true,
remote: {
url: ctx + "system/role/checkRoleNameUnique",
type: "post",
@@ -87,7 +88,6 @@
}
},
roleKey:{
required:true,
remote: {
url: ctx + "system/role/checkRoleKeyUnique",
type: "post",
@@ -106,7 +106,6 @@
}
},
roleSort:{
required:true,
digits:true
},
},
@@ -117,7 +116,8 @@
"roleKey": {
remote: "角色权限已经存在"
}
}
},
focusCleanup: true
});
function edit() {
@@ -1,10 +1,9 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<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 search-collapse">
@@ -38,7 +37,7 @@
</form>
</div>
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:role:add">
<i class="fa fa-plus"></i> 新增
</a>
@@ -58,7 +57,7 @@
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:role:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:role:remove')}]];
@@ -75,8 +74,6 @@
exportUrl: prefix + "/export",
sortName: "roleSort",
modalName: "角色",
search: false,
showExport: false,
columns: [{
checkbox: true
},
@@ -118,8 +115,9 @@
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.roleId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-primary btn-xs ' + editFlag + '" href="#" onclick="rule(\'' + row.roleId + '\')"><i class="fa fa-check-square-o"></i>数据权限</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.roleId + '\')"><i class="fa fa-remove"></i>删除</a>');
actions.push('<a class="btn btn-primary btn-xs ' + editFlag + '" href="#" onclick="authDataScope(\'' + row.roleId + '\')"><i class="fa fa-check-square-o"></i>数据权限</a> ');
actions.push('<a class="btn btn-info btn-xs ' + editFlag + '" href="#" onclick="authUser(\'' + row.roleId + '\')"><i class="fa fa-user"></i>分配用户</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.roleId + '\')"><i class="fa fa-remove"></i>删除</a> ');
return actions.join('');
}
}]
@@ -128,11 +126,17 @@
});
/* 角色管理-分配数据权限 */
function rule(roleId) {
var url = prefix + '/rule/' + roleId;
function authDataScope(roleId) {
var url = prefix + '/authDataScope/' + roleId;
$.modal.open("分配数据权限", url);
}
/* 角色管理-分配用户 */
function authUser(roleId) {
var url = prefix + '/authUser/' + roleId;
$.modal.openTab("分配用户", url);
}
/* 角色状态显示 */
function statusTools(row) {
if (row.status == 1) {
@@ -0,0 +1,124 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('分配角色选择用户')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="role-form">
<input type="hidden" id="roleId" name="roleId" th:value="${role.roleId}">
<div class="select-list">
<ul>
<li>
登录名称:<input type="text" name="loginName"/>
</li>
<li>
手机号码:<input type="text" name="phonenumber"/>
</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>
</li>
</ul>
</div>
</form>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table" data-mobile-responsive="true"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var datas = [[${@dict.getType('sys_normal_disable')}]];
var prefix = ctx + "system/role/authUser";
$(function() {
var options = {
url: prefix + "/unallocatedList",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
importUrl: prefix + "/importData",
importTemplateUrl: prefix + "/importTemplate",
queryParams: queryParams,
sortName: "createTime",
sortOrder: "desc",
modalName: "用户",
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
clickToSelect: true,
rememberSelected: true,
columns: [{
checkbox: true
},
{
field: 'userId',
title: '用户ID',
visible: false,
},
{
field: 'loginName',
title: '登录名称',
sortable: true
},
{
field: 'userName',
title: '用户名称'
},
{
field: 'email',
title: '邮箱'
},
{
field: 'phonenumber',
title: '手机'
},
{
field: 'status',
title: '用户状态',
align: 'center',
formatter: function (value, row, index) {
return $.table.selectDictLabel(datas, value);
}
},
{
field: 'createTime',
title: '创建时间',
sortable: true
}]
};
$.table.init(options);
});
function queryParams(params) {
return {
roleId: $("#roleId").val(),
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
searchValue: params.search,
orderByColumn: params.sort,
isAsc: params.order
};
}
/* 分配用户-选择用户-提交 */
function submitHandler() {
var rows = $.table.selectFirstColumns();
if (rows.length == 0) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
var data = { "roleId": $("#roleId").val(), "userIds": rows.join() };
$.operate.save(prefix + "/selectAll", data);
}
</script>
</body>
</html>
@@ -1,97 +1,155 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-user-add">
<input name="deptId" type="hidden" id="treeId"/>
<div class="form-group">
<label class="col-sm-3 control-label ">登录名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" id="loginName" name="loginName"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">部门名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="deptName" onclick="selectDeptTree()" readonly="true" id="treeName">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">用户名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="userName" id="userName">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">密码:</label>
<div class="col-sm-8">
<input class="form-control" type="password" name="password" id="password" th:value="${@config.getKey('sys.user.initPassword')}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">邮箱:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="email" id="email">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">手机:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="phonenumber" id="phonenumber">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">性别:</label>
<div class="col-sm-8">
<select id="sex" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">状态</label>
<div class="col-sm-8">
<div class="onoffswitch">
<input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="status" name="status">
<label class="onoffswitch-label" for="status">
<span class="onoffswitch-inner"></span>
<span class="onoffswitch-switch"></span>
</label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">岗位:</label>
<div class="col-sm-8">
<select id="post" name="post" class="form-control select2-hidden-accessible" multiple="">
<option th:each="post:${posts}" th:value="${post.postId}" th:text="${post.postName}" th:disabled="${post.status == '1'}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">角色:</label>
<div class="col-sm-8">
<label th:each="role:${roles}" class="check-box">
<input name="role" type="checkbox" th:value="${role.roleId}" th:text="${role.roleName}" th:disabled="${role.status == '1'}">
</label>
</div>
</div>
</form>
</div>
<div th:include="include::footer"></div>
<script th:src="@{/ajax/libs/select/select2.js}"></script>
<head>
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: header('新增用户')" />
</head>
<body>
<div class="form-content">
<form id="form-user-add" class="form-horizontal">
<input name="deptId" type="hidden" id="treeId"/>
<h4 class="form-header h4">基本信息</h4>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label"><span style="color: red; ">*</span>用户名称:</label>
<div class="col-sm-8">
<input name="userName" autocomplete="off" placeholder="请输入用户名称" class="form-control" type="text" maxlength="30" required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label"><span style="color: red; ">*</span>归属部门:</label>
<div class="col-sm-8">
<div class="input-group">
<input name="deptName" onclick="selectDeptTree()" id="treeName" type="text" placeholder="请选择归属部门" class="form-control" required>
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<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" autocomplete="off" placeholder="请输入手机号码" class="form-control" type="text" maxlength="11" required>
</div>
</div>
</div>
<div class="col-sm-6">
<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" autocomplete="off" class="form-control email" type="text" maxlength="50" placeholder="请输入邮箱" required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<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="请输入登录账号" autocomplete="off" class="form-control required" type="text" maxlength="30" required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label"><span style="color: red; ">*</span>登录密码:</label>
<div class="col-sm-8">
<input name="password" placeholder="请输入登录密码" autocomplete="off" class="form-control" type="password" th:value="${@config.getKey('sys.user.initPassword')}" required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">用户性别:</label>
<div class="col-sm-8">
<div class="input-group" style="width: 100%">
<select name="sex" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">用户状态:</label>
<div class="col-sm-8">
<div class="onoffswitch">
<input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="status">
<label class="onoffswitch-label" for="status">
<span class="onoffswitch-inner"></span>
<span class="onoffswitch-switch"></span>
</label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="form-group">
<label class="col-xs-2 control-label">岗位:</label>
<div class="col-xs-4">
<select id="post" class="form-control select2-hidden-accessible" multiple="">
<option th:each="post:${posts}" th:value="${post.postId}" th:text="${post.postName}" th:disabled="${post.status == '1'}"></option>
</select>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="form-group">
<label class="col-xs-2 control-label">角色:</label>
<div class="col-xs-10">
<label th:each="role:${roles}" class="check-box">
<input name="role" type="checkbox" th:value="${role.roleId}" th:text="${role.roleName}" th:disabled="${role.status == '1'}">
</label>
</div>
</div>
</div>
</div>
<h4 class="form-header h4">其他信息</h4>
<div class="row">
<div class="col-sm-12">
<div class="form-group">
<label class="col-xs-2 control-label">备注:</label>
<div class="col-xs-10">
<textarea name="remark" autocomplete="off" maxlength="500" class="form-control" rows="3"></textarea>
</div>
</div>
</div>
</div>
</form>
</div>
<div class="row">
<div class="col-sm-offset-5 col-sm-10">
<button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
<button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<script>
var prefix = ctx + "system/user";
$("#form-user-add").validate({
onkeyup: false,
rules:{
loginName:{
required:true,
minlength: 2,
maxlength: 20,
remote: {
url: ctx + "system/user/checkLoginNameUnique",
url: prefix + "/checkLoginNameUnique",
type: "post",
dataType: "json",
data: {
@@ -104,22 +162,14 @@
}
}
},
userName:{
required:true,
},
deptName:{
required:true,
},
password:{
required:true,
minlength: 5,
maxlength: 20
},
email:{
required:true,
email:true,
remote: {
url: ctx + "system/user/checkEmailUnique",
url: prefix + "/checkEmailUnique",
type: "post",
dataType: "json",
data: {
@@ -133,10 +183,9 @@
}
},
phonenumber:{
required:true,
isPhone:true,
remote: {
url: ctx + "system/user/checkPhoneUnique",
url: prefix + "/checkPhoneUnique",
type: "post",
dataType: "json",
data: {
@@ -160,54 +209,23 @@
"phonenumber":{
remote: "手机号码已经存在"
}
}
},
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
add();
var data = $("#form-user-add").serializeArray();
var status = $("input[id='status']").is(':checked') == true ? 0 : 1;
var roleIds = $.form.selectCheckeds("role");
var postIds = $.form.selectSelects("post");
data.push({"name": "status", "value": status});
data.push({"name": "roleIds", "value": roleIds});
data.push({"name": "postIds", "value": postIds});
$.operate.saveTab(prefix + "/add", data);
}
}
function add() {
var userId = $("input[name='userId']").val();
var deptId = $("input[name='deptId']").val();
var loginName = $("input[name='loginName']").val();
var userName = $("input[name='userName']").val();
var password = $("input[name='password']").val();
var email = $("input[name='email']").val();
var phonenumber = $("input[name='phonenumber']").val();
var sex = $("#sex option:selected").val();
var status = $("input[name='status']").is(':checked') == true ? 0 : 1;
var roleIds = $.form.selectCheckeds("role");
var postIds = $.form.selectSelects("post");
$.ajax({
cache : true,
type : "POST",
url : ctx + "system/user/add",
data : {
"userId": userId,
"deptId": deptId,
"loginName": loginName,
"userName": userName,
"password": password,
"email": email,
"phonenumber": phonenumber,
"sex": sex,
"status": status,
"roleIds": roleIds,
"postIds": postIds
},
async : false,
error : function(request) {
$.modal.alertError("系统错误");
},
success : function(data) {
$.operate.successCallback(data);
}
});
}
/*用户管理-新增-选择部门树*/
function selectDeptTree() {
var treeId = $("#treeId").val();
@@ -1,97 +1,145 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-user-edit" th:object="${user}">
<input name="userId" type="hidden" th:field="*{userId}" />
<head>
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: header('修改用户')" />
</head>
<body>
<div class="form-content">
<form class="form-horizontal" id="form-user-edit" th:object="${user}">
<input name="userId" type="hidden" th:field="*{userId}" />
<input name="deptId" type="hidden" th:field="*{deptId}" id="treeId"/>
<div class="form-group">
<label class="col-sm-3 control-label ">登录名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" readonly="true" th:field="*{loginName}"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">部门名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="deptName" onclick="selectDeptTree()" readonly="true" id="treeName" th:field="*{dept.deptName}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">用户名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="userName" id="userName" th:field="*{userName}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">邮箱:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="email" id="email" th:field="*{email}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">手机</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="phonenumber" id="phonenumber" th:field="*{phonenumber}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">性别:</label>
<div class="col-sm-8">
<select id="sex" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{sex}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">状态:</label>
<div class="col-sm-8">
<div class="onoffswitch">
<input type="checkbox" th:checked="${user.status == '0' ? true : false}" class="onoffswitch-checkbox" id="status" name="status">
<label class="onoffswitch-label" for="status">
<span class="onoffswitch-inner"></span>
<span class="onoffswitch-switch"></span>
</label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">岗位</label>
<div class="col-sm-8">
<select id="post" name="post" class="form-control select2-hidden-accessible" multiple="">
<option th:each="post:${posts}" th:value="${post.postId}" th:text="${post.postName}" th:selected="${post.flag}" th:disabled="${post.status == '1'}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">角色:</label>
<div class="col-sm-8">
<label th:each="role:${roles}" class="check-box">
<input name="role" type="checkbox" th:value="${role.roleId}" th:text="${role.roleName}" th:checked="${role.flag}" th:disabled="${role.status == '1'}">
</label>
</div>
</div>
</form>
</div>
<div th:include="include::footer"></div>
<script th:src="@{/ajax/libs/select/select2.js}"></script>
<script>
<h4 class="form-header h4">基本信息</h4>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label"><span style="color: red; ">*</span>用户名称:</label>
<div class="col-sm-8">
<input name="userName" autocomplete="off" placeholder="请输入用户名称" class="form-control" type="text" maxlength="30" th:field="*{userName}" required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label"><span style="color: red; ">*</span>归属部门:</label>
<div class="col-sm-8">
<div class="input-group">
<input class="form-control" type="text" name="deptName" onclick="selectDeptTree()" id="treeName" th:field="*{dept.deptName}" required>
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<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" autocomplete="off" placeholder="请输入手机号码" class="form-control" type="text" maxlength="11" th:field="*{phonenumber}" required>
</div>
</div>
</div>
<div class="col-sm-6">
<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" autocomplete="off" class="form-control email" type="text" maxlength="50" placeholder="请输入邮箱" th:field="*{email}" required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label"><span style="color: red; ">*</span>登录账号:</label>
<div class="col-sm-8">
<input class="form-control" type="text" readonly="true" th:field="*{loginName}"/>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">用户状态</label>
<div class="col-sm-8">
<div class="onoffswitch">
<input type="checkbox" th:checked="${user.status == '0' ? true : false}" class="onoffswitch-checkbox" id="status">
<label class="onoffswitch-label" for="status">
<span class="onoffswitch-inner"></span>
<span class="onoffswitch-switch"></span>
</label>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">岗位:</label>
<div class="col-sm-8">
<select id="post" class="form-control select2-hidden-accessible" multiple="">
<option th:each="post:${posts}" th:value="${post.postId}" th:text="${post.postName}" th:selected="${post.flag}" th:disabled="${post.status == '1'}"></option>
</select>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">用户性别:</label>
<div class="col-sm-8">
<div class="input-group" style="width: 100%">
<select name="sex" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{sex}"></option>
</select>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="form-group">
<label class="col-xs-2 control-label">角色:</label>
<div class="col-xs-10">
<label th:each="role:${roles}" class="check-box">
<input name="role" type="checkbox" th:value="${role.roleId}" th:text="${role.roleName}" th:checked="${role.flag}" th:disabled="${role.status == '1'}">
</label>
</div>
</div>
</div>
</div>
<h4 class="form-header h4">其他信息</h4>
<div class="row">
<div class="col-sm-12">
<div class="form-group">
<label class="col-xs-2 control-label">备注:</label>
<div class="col-xs-10">
<textarea name="remark" autocomplete="off" maxlength="500" class="form-control" rows="3">[[*{remark}]]</textarea>
</div>
</div>
</div>
</div>
</form>
</div>
<div class="row">
<div class="col-sm-offset-5 col-sm-10">
<button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
<button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<script type="text/javascript">
var prefix = ctx + "system/user";
$("#form-user-edit").validate({
onkeyup: false,
rules:{
userName:{
required:true,
},
deptName:{
required:true,
},
email:{
required:true,
email:true,
remote: {
url: ctx + "system/user/checkEmailUnique",
url: prefix + "/checkEmailUnique",
type: "post",
dataType: "json",
data: {
@@ -108,10 +156,9 @@
}
},
phonenumber:{
required:true,
isPhone:true,
remote: {
url: ctx + "system/user/checkPhoneUnique",
url: prefix + "/checkPhoneUnique",
type: "post",
dataType: "json",
data: {
@@ -136,52 +183,22 @@
remote: "手机号码已经存在"
}
},
submitHandler:function(form){
edit();
}
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
edit();
var data = $("#form-user-edit").serializeArray();
var status = $("input[id='status']").is(':checked') == true ? 0 : 1;
var roleIds = $.form.selectCheckeds("role");
var postIds = $.form.selectSelects("post");
data.push({"name": "status", "value": status});
data.push({"name": "roleIds", "value": roleIds});
data.push({"name": "postIds", "value": postIds});
$.operate.saveTab(prefix + "/edit", data);
}
}
function edit() {
var userId = $("input[name='userId']").val();
var deptId = $("input[name='deptId']").val();
var userName = $("input[name='userName']").val();
var email = $("input[name='email']").val();
var phonenumber = $("input[name='phonenumber']").val();
var sex = $("#sex option:selected").val();
var status = $("input[name='status']").is(':checked') == true ? 0 : 1;
var roleIds = $.form.selectCheckeds("role");
var postIds = $.form.selectSelects("post");
$.ajax({
cache : true,
type : "POST",
url : ctx + "system/user/edit",
data : {
"userId": userId,
"deptId": deptId,
"userName": userName,
"email": email,
"phonenumber": phonenumber,
"sex": sex,
"status": status,
"roleIds": roleIds,
"postIds": postIds
},
async : false,
error : function(request) {
$.modal.alertError("系统错误");
},
success : function(data) {
$.operate.successCallback(data);
}
});
}
/*用户管理-修改-选择部门树*/
function selectDeptTree() {
var deptId = $.common.isEmpty($("#treeId").val()) ? "100" : $("#treeId").val();
@@ -206,4 +223,4 @@
}
</script>
</body>
</html>
</html>
@@ -1,8 +1,9 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<title>用户头像修改</title>
<link th:href="@{/ajax/libs/cropbox/cropbox.css}" rel="stylesheet"/>
<head>
<th:block th:include="include :: header('修改用户头像')" />
<th:block th:include="include :: cropbox-css" />
</head>
<body class="white-bg">
<div class="container">
<div class="imageBox">
@@ -20,8 +21,8 @@
</div>
<div class="cropped"></div>
</div>
<div th:include="include::footer"></div>
<script th:src="@{/ajax/libs/cropbox/cropbox.js}"></script>
<th:block th:include="include :: footer" />
<th:block th:include="include :: cropbox-js" />
<script type="text/javascript">
var cropper;
$(window).load(function() {
@@ -38,7 +39,7 @@ $(window).load(function() {
options.imgSrc = e.target.result;
//根据MIME判断上传的文件是不是图片类型
if((options.imgSrc).indexOf("image/")==-1){
$.modal.alertWarning("文件格式错误,请上传图片类型,如:JPG,JEPGPNG后缀的文件。");
$.modal.alertWarning("文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。");
} else {
cropper = $('.imageBox').cropbox(options);
}
@@ -1,120 +0,0 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-user-edit" th:object="${user}">
<input name="userId" type="hidden" th:field="*{userId}" />
<div class="form-group">
<label class="col-sm-3 control-label ">登录名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" readonly="true" th:field="*{loginName}"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">部门名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" readonly="true" th:field="*{dept.deptName}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">用户名称:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="userName" id="userName" th:field="*{userName}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">邮箱:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="email" th:field="*{email}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">手机:</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="phonenumber" id="phonenumber" th:field="*{phonenumber}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">性别:</label>
<div class="col-sm-8">
<div class="radio-box">
<input type="radio" id="radio1" th:field="*{sex}" name="sex" value="0">
<label for="radio1"></label>
</div>
<div class="radio-box">
<input type="radio" id="radio2" th:field="*{sex}" name="sex" value="1">
<label for="radio2"></label>
</div>
</div>
</div>
</form>
</div>
<div th:include="include::footer"></div>
<script>
$("#form-user-edit").validate({
rules:{
userName:{
required:true,
},
email:{
required:true,
email:true,
remote: {
url: ctx + "system/user/checkEmailUnique",
type: "post",
dataType: "json",
data: {
"userId": function() {
return $("#userId").val();
},
"email": function() {
return $.common.trim($("#email").val());
}
},
dataFilter: function (data, type) {
return $.validate.unique(data);
}
}
},
phonenumber:{
required:true,
isPhone:true,
remote: {
url: ctx + "system/user/checkPhoneUnique",
type: "post",
dataType: "json",
data: {
"userId": function() {
return $("#userId").val();
},
"phonenumber": function() {
return $.common.trim($("#phonenumber").val());
}
},
dataFilter: function (data, type) {
return $.validate.unique(data);
}
}
},
},
messages: {
"email": {
remote: "Email已经存在"
},
"phonenumber":{
remote: "手机号码已经存在"
}
}
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(ctx + "system/user/profile/update", $('#form-user-edit').serialize());
}
}
</script>
</body>
</html>
@@ -1,78 +1,277 @@
<!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">
<!--360浏览器优先以webkit内核解析-->
<title>个人信息</title>
<link rel="shortcut icon" href="favicon.ico">
<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
<link th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
<link th:href="@{/css/main/animate.min.css}" rel="stylesheet"/>
<link th:href="@{/css/main/style.min862f.css}" rel="stylesheet"/>
<th:block th:include="include :: header('用户个人信息')" />
<style type="text/css">
</style>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content">
<div class="row animated fadeInRight">
<div class="col-sm-6">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>个人信息</h5>
<div class="ibox-tools">
<a class="dropdown-toggle" data-toggle="dropdown" href="profile.html#">
<i class="fa fa-edit"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="javascript:edit()">修改信息</a></li>
<li><a href="javascript:resetPwd()">修改密码</a></li>
<li><a href="javascript:avatar()">修改头像</a></li>
<body class="gray-bg" style="font: 14px Helvetica Neue, Helvetica, PingFang SC, 微软雅黑, Tahoma, Arial, sans-serif !important;">
<input id="userId" name="userId" type="hidden" th:value="${user.userId}" />
<section class="section-content">
<div class="row">
<div class="col-xs-3 pr5">
<div class="ibox float-e-margins">
<div class="ibox-title ibox-title-gray dashboard-header gray-bg">
<h5>个人资料</h5>
</div>
<div class="ibox-content">
<div class="text-center">
<p><img width="120" height="120" th:src="(${user.avatar} == '') ? @{/img/profile.jpg} : @{/profile/avatar/} + ${user.avatar}"></p>
<p><a href="javascript:avatar()">修改头像</a></p>
</div>
<ul class="list-group list-group-striped">
<li class="list-group-item"><i class="fa fa-user"></i>
<b class="font-noraml">登录名称:</b>
<p class="pull-right">[[${user.loginName}]]</p>
</li>
<li class="list-group-item"><i class="fa fa-phone"></i>
<b class="font-noraml">手机号码:</b>
<p class="pull-right">[[${user.phonenumber}]]</p>
</li>
<li class="list-group-item"><i class="fa fa-group"></i>
<b class="font-noraml">所属部门:</b>
<p class="pull-right" >[[${user.dept?.deptName}]] / [[${#strings.defaultString(postGroup,'无岗位')}]]</p>
</li>
<li class="list-group-item"><i class="fa fa-envelope-o"></i>
<b class="font-noraml">邮箱地址:</b>
<p class="pull-right" >[[${user.email}]]</p>
</li>
<li class="list-group-item"><i class="fa fa-calendar"></i>
<b class="font-noraml">创建时间:</b>
<p class="pull-right" >[[${#dates.format(user.createTime, 'yyyy-MM-dd')}]]</p>
</li>
</ul>
</div>
</div>
</div>
<div class="col-xs-9" style="padding-left: 0px">
<div class="ibox float-e-margins">
<div class="ibox-title ibox-title-gray dashboard-header">
<h5>基本资料</h5>
</div>
<div class="ibox-content">
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active"><a href="#user_info" data-toggle="tab" aria-expanded="true">基本资料</a></li>
<li><a href="#modify_password" data-toggle="tab" aria-expanded="false">修改密码</a></li>
</ul>
</div>
</div>
<div class="contact-box">
<div class="col-sm-4">
<div class="text-center">
<img alt="image" class="img-circle m-t-xs img-responsive" th:src="(${user.avatar} == '') ? @{/img/profile.jpg} : @{/profile/avatar/} + ${user.avatar}">
<div class="m-t-xs font-bold">[[${user.loginIp}]]</div>
</div>
</div>
<div class="col-sm-8">
<h3><strong>[[${user.loginName}]]</strong></h3>
<p><i class="fa fa-user"></i> [[${user.userName}]] / [[${#strings.defaultString(roleGroup,'无角色')}]]
<p><i class="fa fa-phone"></i> [[${user.phonenumber}]]</p>
<p><i class="fa fa-group"></i> [[${user.dept?.deptName}]] / [[${#strings.defaultString(postGroup,'无岗位')}]]</p>
<p><i class="fa fa-transgender"></i> 性别:[[${user.sex}]]</p>
<p><i class="fa fa-envelope-o"></i> [[${user.email}]]</p>
<p><i class="fa fa-calendar"></i> [[${#dates.format(user.createTime, 'yyyy-MM-dd HH:mm:ss')}]]</p>
</div>
<div class="clearfix"></div>
</a>
<div class="tab-content">
<!--用户信息-->
<div class="tab-pane active" id="user_info" th:object="${user}">
<form class="form-horizontal" id="form-user-edit">
<!--隐藏ID-->
<input name="id" id="id" type="hidden">
<div class="form-group">
<label class="col-sm-2 control-label">用户名称:</label>
<div class="col-sm-10">
<input type="text" autocomplete="off" class="form-control" name="userName" th:field="*{userName}" placeholder="请输入用户名称">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">手机号码:</label>
<div class="col-sm-10">
<input type="text" autocomplete="off" class="form-control" name="phonenumber" maxlength="11" th:field="*{phonenumber}" placeholder="请输入手机号码">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">邮箱:</label>
<div class="col-sm-10">
<input type="text" autocomplete="off" class="form-control" name="email" th:field="*{email}" placeholder="请输入邮箱">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">性别:</label>
<div class="col-sm-10">
<div class="radio-box">
<input type="radio" id="radio1" th:field="*{sex}" name="sex" value="0">
<label for="radio1"></label>
</div>
<div class="radio-box">
<input type="radio" id="radio2" th:field="*{sex}" name="sex" value="1">
<label for="radio2"></label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="button" class="btn btn-sm btn-primary" onclick="submitUserInfo()"><i class="fa fa-check"></i>保 存</button>&nbsp;
<button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
</div>
</div>
</form>
</div>
<!--修改密码-->
<div class="tab-pane" id="modify_password">
<form class="form-horizontal" id="form-user-resetPwd">
<div class="form-group">
<label class="col-sm-2 control-label">旧密码:</label>
<div class="col-sm-10">
<input type="password" class="form-control" name="oldPassword" placeholder="请输入旧密码">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">新密码:</label>
<div class="col-sm-10">
<input type="password" class="form-control" name="newPassword" id="newPassword" placeholder="请输入新密码">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">确认密码:</label>
<div class="col-sm-10">
<input type="password" class="form-control" name="confirmPassword" placeholder="请确认密码">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="button" class="btn btn-sm btn-primary" onclick="submitChangPassword()"><i class="fa fa-check"></i>保 存</button>&nbsp;
<button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<div th:include="include::footer"></div>
<th:block th:include="include :: footer" />
<script>
/*用户信息-修改*/
function edit() {
var url = ctx + 'system/user/profile/edit';
$.modal.open("修改用户", url);
}
/*用户管理-重置密码*/
function resetPwd() {
var url = ctx + 'system/user/profile/resetPwd';
$.modal.open("重置密码", url, '800', '500');
}
/*用户管理-头像*/
function avatar() {
var url = ctx + 'system/user/profile/avatar';
$.modal.open("修改头像", url);
}
/*用户信息-修改*/
$("#form-user-edit").validate({
onkeyup: false,
rules:{
userName:{
required:true,
},
email:{
required:true,
email:true,
remote: {
url: ctx + "system/user/checkEmailUnique",
type: "post",
dataType: "json",
data: {
"userId": function() {
return $("#userId").val();
},
"email": function() {
return $.common.trim($("#email").val());
}
},
dataFilter: function (data, type) {
return $.validate.unique(data);
}
}
},
phonenumber:{
required:true,
isPhone:true,
remote: {
url: ctx + "system/user/checkPhoneUnique",
type: "post",
dataType: "json",
data: {
"userId": function() {
return $("#userId").val();
},
"phonenumber": function() {
return $.common.trim($("#phonenumber").val());
}
},
dataFilter: function (data, type) {
return $.validate.unique(data);
}
}
},
},
messages: {
"userName": {
required: "请输入用户名称",
},
"email": {
required: "请输入邮箱",
remote: "Email已经存在"
},
"phonenumber":{
required: "请输入手机号码",
remote: "手机号码已经存在"
}
},
focusCleanup: true
});
function submitUserInfo() {
if ($.validate.form()) {
$.operate.saveModal(ctx + "system/user/profile/update", $('#form-user-edit').serialize());
}
}
/*用户管理-修改密码*/
$("#form-user-resetPwd").validate({
onkeyup: false,
rules:{
oldPassword:{
required:true,
remote: {
url: ctx + "system/user/profile/checkPassword",
type: "get",
dataType: "json",
data: {
password: function() {
return $("input[name='oldPassword']").val();
}
}
}
},
newPassword: {
required: true,
minlength: 6,
maxlength: 20
},
confirmPassword: {
required: true,
equalTo: "#newPassword"
}
},
messages: {
oldPassword: {
required: "请输入原密码",
remote: "原密码错误"
},
newPassword: {
required: "请输入新密码",
minlength: "密码不能小于6个字符",
maxlength: "密码不能大于20个字符"
},
confirmPassword: {
required: "请再次输入新密码",
equalTo: "两次密码输入不一致"
}
},
focusCleanup: true
});
function submitChangPassword () {
if ($.validate.form("form-user-resetPwd")) {
$.operate.saveModal(ctx + "system/user/profile/resetPwd", $('#form-user-resetPwd').serialize());
}
}
</script>
</body>
</html>
@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('修改用户密码')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-user-resetPwd">
@@ -33,7 +34,7 @@
</div>
</form>
</div>
<div th:include="include :: footer"></div>
<th:block th:include="include :: footer" />
<script>
$("#form-user-resetPwd").validate({
@@ -76,7 +77,8 @@
equalTo: "两次密码输入不一致"
}
}
},
focusCleanup: true
});
function submitHandler() {
@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<head>
<th:block th:include="include :: header('修改密码')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-user-resetPwd">
@@ -20,7 +21,7 @@
</div>
</form>
</div>
<div th:include="include :: footer"></div>
<th:block th:include="include :: footer" />
<script type="text/javascript">
$("#form-user-resetPwd").validate({
rules:{
@@ -29,7 +30,8 @@
minlength: 5,
maxlength: 20
},
}
},
focusCleanup: true
});
function submitHandler() {
@@ -1,11 +1,10 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link th:href="@{/ajax/libs/jquery-layout/jquery.layout-latest.css}" rel="stylesheet"/>
<link th:href="@{/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css}" rel="stylesheet"/>
<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 :: layout-latest-css" />
<th:block th:include="include :: ztree-css" />
</head>
<body class="gray-bg">
<div class="ui-layout-west">
<div class="main-content">
@@ -63,18 +62,18 @@
</form>
</div>
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:user:add">
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.addTab()" shiro:hasPermission="system:user:add">
<i class="fa fa-plus"></i> 新增
</a>
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="system:user:edit">
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.editTab()" shiro:hasPermission="system:user:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:user:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="system:user:import">
<i class="fa fa-download"></i> 导入
<i class="fa fa-upload"></i> 导入
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:user:export">
<i class="fa fa-download"></i> 导出
@@ -87,9 +86,9 @@
</div>
</div>
<div th:include="include :: footer"></div>
<script th:src="@{/ajax/libs/jquery-layout/jquery.layout-latest.js}"></script>
<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
<th:block th:include="include :: footer" />
<th:block th:include="include :: layout-latest-js" />
<th:block th:include="include :: ztree-js" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:user:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:user:remove')}]];
@@ -119,8 +118,6 @@
sortName: "createTime",
sortOrder: "desc",
modalName: "用户",
search: false,
showExport: false,
columns: [{
checkbox: true
},
@@ -168,7 +165,7 @@
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.userId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.editTab(\'' + row.userId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.userId + '\')"><i class="fa fa-remove"></i>删除</a> ');
actions.push('<a class="btn btn-info btn-xs ' + resetPwdFlag + '" href="#" onclick="resetPwd(\'' + row.userId + '\')"><i class="fa fa-key"></i>重置</a>');
return actions.join('');

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