Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e36334c50a | ||
|
|
9f21f8816a | ||
|
|
7aedaf2085 | ||
|
|
895c290cbf | ||
|
|
346670b197 | ||
|
|
7ad0a35ba2 | ||
|
|
0d0a2ecc5a | ||
|
|
dc82712597 | ||
|
|
9ab3a297bd | ||
|
|
03174f1ead | ||
|
|
a4b0a7c0bb | ||
|
|
4b8d578f4d | ||
|
|
b369317800 | ||
|
|
d957acd899 | ||
|
|
e7d791ddf0 | ||
|
|
a0ada99856 | ||
|
|
cdbf0e2264 | ||
|
|
134e559704 | ||
|
|
dd9b2cd617 | ||
|
|
07e2d69ebf | ||
|
|
0d65960e86 | ||
|
|
e1191c56b2 | ||
|
|
cec1d3adcb | ||
|
|
a4c4f737a8 | ||
|
|
c0c62001a9 | ||
|
|
4a64a9269a | ||
|
|
30278a0451 | ||
|
|
f80a312b9b | ||
|
|
674d236007 | ||
|
|
4e211c4871 | ||
|
|
43788e0590 | ||
|
|
8bf5140a72 | ||
|
|
3d2d88287a | ||
|
|
6d5b261c7d | ||
|
|
2eb5752cc1 | ||
|
|
43ce484f36 | ||
|
|
277d42c12b | ||
|
|
2651383ab2 | ||
|
|
25022bfef2 | ||
|
|
98ee5e9772 | ||
|
|
acbf27bc26 | ||
|
|
aa62d63920 | ||
|
|
31c3d4021e | ||
|
|
3025017d0f | ||
|
|
514ccd2c75 | ||
|
|
7a8e047c6f | ||
|
|
be3adb875f | ||
|
|
18d80cc78e | ||
|
|
b1c60695e6 | ||
|
|
4a6e5a0fba | ||
|
|
a9775607e0 | ||
|
|
d7f7da596f | ||
|
|
6c8a389f9a | ||
|
|
0f3d67367a | ||
|
|
49e20200f1 | ||
|
|
f726bf25ce | ||
|
|
7fb5382c10 | ||
|
|
e75258a72b | ||
|
|
ffc16b032d | ||
|
|
f42b8c7a83 | ||
|
|
ddbb1aa170 | ||
|
|
c8b42c5b82 | ||
|
|
7d1b67a8b7 | ||
|
|
b09955f369 | ||
|
|
e7838317d0 | ||
|
|
1aa2d7a5cc | ||
|
|
8b4aef15cf | ||
|
|
d56d6ac5ac | ||
|
|
8d165f4919 | ||
|
|
44895c3d17 | ||
|
|
29a30a25c2 | ||
|
|
77c4a350d4 | ||
|
|
a1dba1ad1c | ||
|
|
ecaf13caa3 | ||
|
|
58bbf6c36d | ||
|
|
154b8d9db8 | ||
|
|
b7aa9f3f42 | ||
|
|
44df8c4c8b | ||
|
|
23b98a3ef8 | ||
|
|
18a7915079 | ||
|
|
68b5b80299 | ||
|
|
c426de4dee | ||
|
|
92911e840e | ||
|
|
781fd7dd1a | ||
|
|
f079622e11 | ||
|
|
c52ba00f4f | ||
|
|
7c48bc3184 | ||
|
|
91986f13f8 | ||
|
|
7728ad9eb4 | ||
|
|
868aed4079 | ||
|
|
9627ba9e1d | ||
|
|
e0e305c423 | ||
|
|
ed4280379d | ||
|
|
233089b3e6 | ||
|
|
bb0e7bd563 | ||
|
|
7bca4fcbc4 | ||
|
|
1b7a735f9c | ||
|
|
829dfafdaa | ||
|
|
5a59670124 | ||
|
|
2499685a31 | ||
|
|
a3bb603382 | ||
|
|
9ad3cc0b9a | ||
|
|
7e259cd101 | ||
|
|
3846329c82 | ||
|
|
326fe6a63f | ||
|
|
5321200c6e | ||
|
|
82d913c7de | ||
|
|
0df61a6336 | ||
|
|
68a4e6de5f | ||
|
|
84e447e170 | ||
|
|
4fcfe890c9 | ||
|
|
a3b51553fb | ||
|
|
7dc982aded | ||
|
|
07c3a67b70 | ||
|
|
40333c6b16 | ||
|
|
942e609d36 | ||
|
|
9f248e97f6 | ||
|
|
9c763dceab | ||
|
|
92d7c18879 | ||
|
|
e4919f1a62 | ||
|
|
052ab8866d | ||
|
|
338138a0bc | ||
|
|
fedb39c9ad | ||
|
|
128b35c2f6 | ||
|
|
57fed227f0 | ||
|
|
c3b9aa0daf | ||
|
|
690a9a6281 | ||
|
|
e91adcc28d | ||
|
|
83981138e0 | ||
|
|
c29d766cd8 | ||
|
|
3ede0313f2 | ||
|
|
e7248da61a | ||
|
|
05638550d5 | ||
|
|
004e5b8af6 | ||
|
|
0544581ab9 | ||
|
|
6b22fb86cb | ||
|
|
6d5830a235 | ||
|
|
6aed57056c | ||
|
|
3f17e54cf9 | ||
|
|
aea691537b | ||
|
|
8c88957b69 | ||
|
|
bb9d504d40 | ||
|
|
30b3909fc4 | ||
|
|
f72d399f9a | ||
|
|
cb6ca423f8 | ||
|
|
1cb1743445 | ||
|
|
f24da2fc98 | ||
|
|
0b85032ca8 | ||
|
|
9c54c5c37d | ||
|
|
59e2d4a2df | ||
|
|
dc6fe4c985 | ||
|
|
a8eeb652b2 | ||
|
|
1af0fef99e | ||
|
|
7190516a27 | ||
|
|
7e34c2339f | ||
|
|
12f1ff894f | ||
|
|
8a9d298ffc | ||
|
|
2c8365b605 | ||
|
|
27f40d0357 | ||
|
|
cb32d5cc90 | ||
|
|
14bb9f3cba | ||
|
|
0140de4546 | ||
|
|
e476fe6f5d | ||
|
|
897ce6e3c2 | ||
|
|
6d115e602e | ||
|
|
2bba8c7b73 | ||
|
|
1dbc11f708 | ||
|
|
f9fbdb291b | ||
|
|
a3b3332fdd | ||
|
|
384b58ca11 | ||
|
|
52423edb24 | ||
|
|
fed849beed | ||
|
|
fe296cc8ba | ||
|
|
6c94fe8b82 | ||
|
|
febd69e2b3 | ||
|
|
55512bdbec | ||
|
|
22d1e5882a | ||
|
|
2f24ab1692 | ||
|
|
025731a04c | ||
|
|
28c861c6df | ||
|
|
dcbc77b403 | ||
|
|
1e6b78c349 | ||
|
|
4f57c28f2f | ||
|
|
2a718ba4d6 | ||
|
|
ca9f87bff4 | ||
|
|
e517741f99 |
@@ -4,13 +4,9 @@
|
||||
|
||||
性别男,若依是给还没有出生女儿取的名字(寓意:你若不离不弃,我必生死相依)
|
||||
|
||||
> 如需前后端分离版本,请移步 [RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue)
|
||||
|
||||
> 如需单应用,请移步 [RuoYi-fast](https://gitee.com/y_project/RuoYi-fast) `(保持同步更新)`,如需其他版本,请移步 [项目扩展](http://doc.ruoyi.vip/ruoyi/document/xmkz.html) `(不定时更新)`
|
||||
|
||||
> 阿里云通用云产品1888优惠券 :[点我领取](https://www.aliyun.com/minisite/goods?userCode=brki8iof) 腾讯云通用云产品2860优惠券 :[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console) `(仅限新用户)`
|
||||
|
||||
> 阿里云Hi拼购 限量爆款 低至199元/年 [点我进入](https://www.aliyun.com/acts/hi-group-buying?userCode=brki8iof) `(仅限新用户)`
|
||||
* 感谢 [hplus](https://gitee.com/hplus_admin/hplus) 后台主题 UI 框架。
|
||||
* 前后端分离版本,请移步[RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue),微服务版本,请移步[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud)
|
||||
* 阿里云优惠券:[点我进入](https://www.aliyun.com/minisite/goods?userCode=brki8iof&share_source=copy_link),腾讯云优惠券:[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console)
|
||||
|
||||
## 内置功能
|
||||
|
||||
@@ -31,12 +27,13 @@
|
||||
15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。
|
||||
16. 在线构建器:拖动表单元素生成相应的HTML代码。
|
||||
17. 连接池监视:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。
|
||||
|
||||
## 在线体验
|
||||
> admin/admin123
|
||||
> 陆陆续续收到一些打赏,为了更好的体验已用于演示服务器升级。谢谢各位小伙伴。
|
||||
|
||||
- admin/admin123
|
||||
- 陆陆续续收到一些打赏,为了更好的体验已用于演示服务器升级。谢谢各位小伙伴。
|
||||
|
||||
演示地址:http://ruoyi.vip
|
||||
|
||||
文档地址:http://doc.ruoyi.vip
|
||||
|
||||
## 演示图
|
||||
|
||||
Binary file not shown.
@@ -1,38 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<version>4.2.0</version>
|
||||
<version>4.4.0</version>
|
||||
|
||||
<name>ruoyi</name>
|
||||
<url>http://www.ruoyi.vip</url>
|
||||
<url>http://www.ruoyi.vip</url>
|
||||
<description>若依管理系统</description>
|
||||
|
||||
<properties>
|
||||
<ruoyi.version>4.2.0</ruoyi.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<shiro.version>1.4.2</shiro.version>
|
||||
<thymeleaf.extras.shiro.version>2.0.0</thymeleaf.extras.shiro.version>
|
||||
<mybatis.boot.version>1.3.2</mybatis.boot.version>
|
||||
<druid.version>1.1.14</druid.version>
|
||||
<bitwalker.version>1.19</bitwalker.version>
|
||||
<kaptcha.version>2.3.2</kaptcha.version>
|
||||
<swagger.version>2.9.2</swagger.version>
|
||||
<pagehelper.boot.version>1.2.5</pagehelper.boot.version>
|
||||
<fastjson.version>1.2.60</fastjson.version>
|
||||
<oshi.version>3.9.1</oshi.version>
|
||||
<commons.io.version>2.5</commons.io.version>
|
||||
<commons.fileupload.version>1.3.3</commons.fileupload.version>
|
||||
<poi.version>3.17</poi.version>
|
||||
<velocity.version>1.7</velocity.version>
|
||||
</properties>
|
||||
|
||||
<ruoyi.version>4.4.0</ruoyi.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<shiro.version>1.6.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.14</druid.version>
|
||||
<bitwalker.version>1.19</bitwalker.version>
|
||||
<kaptcha.version>2.3.2</kaptcha.version>
|
||||
<swagger.version>2.9.2</swagger.version>
|
||||
<pagehelper.boot.version>1.2.5</pagehelper.boot.version>
|
||||
<fastjson.version>1.2.73</fastjson.version>
|
||||
<oshi.version>3.9.1</oshi.version>
|
||||
<commons.io.version>2.5</commons.io.version>
|
||||
<commons.fileupload.version>1.3.3</commons.fileupload.version>
|
||||
<poi.version>3.17</poi.version>
|
||||
<velocity.version>1.7</velocity.version>
|
||||
</properties>
|
||||
|
||||
<!-- 依赖声明 -->
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
@@ -47,183 +46,181 @@
|
||||
</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>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-models</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- swagger2-UI-->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>${swagger.version}</version>
|
||||
</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>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-models</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</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>
|
||||
|
||||
<!-- 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>
|
||||
|
||||
<!-- 阿里JSON解析器 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
<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>
|
||||
|
||||
<!-- 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>
|
||||
|
||||
<!-- 阿里JSON解析器 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>${fastjson.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>
|
||||
|
||||
<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>
|
||||
|
||||
<modules>
|
||||
<module>ruoyi-admin</module>
|
||||
<module>ruoyi-framework</module>
|
||||
<module>ruoyi-system</module>
|
||||
<module>ruoyi-quartz</module>
|
||||
<module>ruoyi-generator</module>
|
||||
<module>ruoyi-admin</module>
|
||||
<module>ruoyi-framework</module>
|
||||
<module>ruoyi-system</module>
|
||||
<module>ruoyi-quartz</module>
|
||||
<module>ruoyi-generator</module>
|
||||
<module>ruoyi-common</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependencies>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
@@ -238,29 +235,29 @@
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>public</id>
|
||||
<name>aliyun nexus</name>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
</repositories>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>public</id>
|
||||
<name>aliyun nexus</name>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>public</id>
|
||||
<name>aliyun nexus</name>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>public</id>
|
||||
<name>aliyun nexus</name>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
</project>
|
||||
+41
-35
@@ -5,18 +5,18 @@
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.2.0</version>
|
||||
<version>4.4.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
<packaging>jar</packaging>
|
||||
<artifactId>ruoyi-admin</artifactId>
|
||||
|
||||
<description>
|
||||
web服务入口
|
||||
</description>
|
||||
|
||||
<description>
|
||||
web服务入口
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
|
||||
<!-- SpringBoot集成thymeleaf模板 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@@ -24,55 +24,61 @@
|
||||
</dependency>
|
||||
|
||||
<!-- spring-boot-devtools -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<optional>true</optional> <!-- 表示依赖不会传递 -->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<optional>true</optional> <!-- 表示依赖不会传递 -->
|
||||
</dependency>
|
||||
|
||||
<!-- swagger2-->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--防止进入swagger页面报类型转换错误,排除2.9.2中的引用,手动增加1.5.21版本-->
|
||||
<!-- swagger2-->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--防止进入swagger页面报类型转换错误,排除2.9.2中的引用,手动增加1.5.21版本-->
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>1.5.21</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-models</artifactId>
|
||||
<version>1.5.21</version>
|
||||
</dependency>
|
||||
|
||||
<!-- swagger2-UI-->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 核心模块-->
|
||||
<!-- swagger2-UI-->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Mysql驱动包 -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 核心模块-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-framework</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- 定时任务-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-quartz</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- 代码生成-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-generator</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@@ -80,10 +86,10 @@
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.1.1.RELEASE</version>
|
||||
<version>2.1.1.RELEASE</version>
|
||||
<configuration>
|
||||
<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
|
||||
</configuration>
|
||||
<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
@@ -100,9 +106,9 @@
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<warName>${project.artifactId}</warName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
</build>
|
||||
|
||||
|
||||
</project>
|
||||
@@ -5,6 +5,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -49,10 +50,9 @@ public class CommonController
|
||||
String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
|
||||
String filePath = Global.getDownloadPath() + fileName;
|
||||
|
||||
response.setCharacterEncoding("utf-8");
|
||||
response.setContentType("multipart/form-data");
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment;fileName=" + FileUtils.setFileDownloadHeader(request, realFileName));
|
||||
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
|
||||
FileUtils.setAttachmentResponseHeader(response, realFileName);
|
||||
|
||||
FileUtils.writeBytes(filePath, response.getOutputStream());
|
||||
if (delete)
|
||||
{
|
||||
@@ -103,10 +103,10 @@ public class CommonController
|
||||
String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX);
|
||||
// 下载名称
|
||||
String downloadName = StringUtils.substringAfterLast(downloadPath, "/");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
response.setContentType("multipart/form-data");
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment;fileName=" + FileUtils.setFileDownloadHeader(request, downloadName));
|
||||
|
||||
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
|
||||
FileUtils.setAttachmentResponseHeader(response, downloadName);
|
||||
|
||||
FileUtils.writeBytes(downloadPath, response.getOutputStream());
|
||||
}
|
||||
}
|
||||
|
||||
+56
File diff suppressed because one or more lines are too long
+12
@@ -21,6 +21,7 @@ import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.exception.BusinessException;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.web.controller.demo.domain.CustomerModel;
|
||||
import com.ruoyi.web.controller.demo.domain.UserOperateModel;
|
||||
|
||||
/**
|
||||
@@ -153,6 +154,17 @@ public class DemoOperateController extends BaseController
|
||||
return AjaxResult.success(users.put(userId, user));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存主子表信息
|
||||
*/
|
||||
@PostMapping("/customer/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(CustomerModel customerModel)
|
||||
{
|
||||
System.out.println(customerModel.toString());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户
|
||||
*/
|
||||
|
||||
+39
-1
@@ -6,6 +6,7 @@ import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -140,6 +141,16 @@ public class DemoTableController extends BaseController
|
||||
return prefix + "/button";
|
||||
}
|
||||
|
||||
/**
|
||||
* 直接加载表格数据
|
||||
*/
|
||||
@GetMapping("/data")
|
||||
public String data(ModelMap mmap)
|
||||
{
|
||||
mmap.put("users", users);
|
||||
return prefix + "/data";
|
||||
}
|
||||
|
||||
/**
|
||||
* 表格冻结列
|
||||
*/
|
||||
@@ -166,7 +177,7 @@ public class DemoTableController extends BaseController
|
||||
{
|
||||
return prefix + "/detail";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 表格父子视图
|
||||
*/
|
||||
@@ -212,6 +223,33 @@ public class DemoTableController extends BaseController
|
||||
return prefix + "/editable";
|
||||
}
|
||||
|
||||
/**
|
||||
* 主子表提交
|
||||
*/
|
||||
@GetMapping("/subdata")
|
||||
public String subdata()
|
||||
{
|
||||
return prefix + "/subdata";
|
||||
}
|
||||
|
||||
/**
|
||||
* 表格自动刷新
|
||||
*/
|
||||
@GetMapping("/refresh")
|
||||
public String refresh()
|
||||
{
|
||||
return prefix + "/refresh";
|
||||
}
|
||||
|
||||
/**
|
||||
* 表格打印配置
|
||||
*/
|
||||
@GetMapping("/print")
|
||||
public String print()
|
||||
{
|
||||
return prefix + "/print";
|
||||
}
|
||||
|
||||
/**
|
||||
* 表格其他操作
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.ruoyi.web.controller.demo.domain;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 客户测试信息
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class CustomerModel
|
||||
{
|
||||
/**
|
||||
* 客户姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 客户手机
|
||||
*/
|
||||
private String phonenumber;
|
||||
|
||||
/**
|
||||
* 客户性别
|
||||
*/
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 客户生日
|
||||
*/
|
||||
private String birthday;
|
||||
|
||||
/**
|
||||
* 客户描述
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 商品信息
|
||||
*/
|
||||
private List<GoodsModel> goods;
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPhonenumber()
|
||||
{
|
||||
return phonenumber;
|
||||
}
|
||||
|
||||
public void setPhonenumber(String phonenumber)
|
||||
{
|
||||
this.phonenumber = phonenumber;
|
||||
}
|
||||
|
||||
|
||||
public String getSex()
|
||||
{
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex)
|
||||
{
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getBirthday()
|
||||
{
|
||||
return birthday;
|
||||
}
|
||||
|
||||
public void setBirthday(String birthday)
|
||||
{
|
||||
this.birthday = birthday;
|
||||
}
|
||||
|
||||
public String getRemark()
|
||||
{
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark)
|
||||
{
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public List<GoodsModel> getGoods()
|
||||
{
|
||||
return goods;
|
||||
}
|
||||
|
||||
public void setGoods(List<GoodsModel> goods)
|
||||
{
|
||||
this.goods = goods;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("name", getName())
|
||||
.append("phonenumber", getPhonenumber())
|
||||
.append("sex", getSex())
|
||||
.append("birthday", getBirthday())
|
||||
.append("goods", getGoods())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.ruoyi.web.controller.demo.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 商品测试信息
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class GoodsModel
|
||||
{
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 商品重量
|
||||
*/
|
||||
private Integer weight;
|
||||
|
||||
/**
|
||||
* 商品价格
|
||||
*/
|
||||
private Double price;
|
||||
|
||||
/**
|
||||
* 商品日期
|
||||
*/
|
||||
private Date date;
|
||||
|
||||
/**
|
||||
* 商品种类
|
||||
*/
|
||||
private String type;
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getWeight()
|
||||
{
|
||||
return weight;
|
||||
}
|
||||
|
||||
public void setWeight(Integer weight)
|
||||
{
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
public Double getPrice()
|
||||
{
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(Double price)
|
||||
{
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public Date getDate()
|
||||
{
|
||||
return date;
|
||||
}
|
||||
|
||||
public void setDate(Date date)
|
||||
{
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
public String getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("name", getName())
|
||||
.append("weight", getWeight())
|
||||
.append("price", getPrice())
|
||||
.append("date", getDate())
|
||||
.append("type", getType())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -135,11 +135,13 @@ public class UserOperateModel extends BaseEntity
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getCreateTime()
|
||||
{
|
||||
return createTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCreateTime(Date createTime)
|
||||
{
|
||||
this.createTime = createTime;
|
||||
|
||||
+7
-33
@@ -1,18 +1,19 @@
|
||||
package com.ruoyi.web.controller.monitor;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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.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.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.enums.OnlineStatus;
|
||||
import com.ruoyi.framework.shiro.session.OnlineSession;
|
||||
@@ -55,13 +56,13 @@ public class SysUserOnlineController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@RequiresPermissions("monitor:online:batchForceLogout")
|
||||
@RequiresPermissions(value = { "monitor:online:batchForceLogout", "monitor:online:forceLogout" }, logical = Logical.OR)
|
||||
@Log(title = "在线用户", businessType = BusinessType.FORCE)
|
||||
@PostMapping("/batchForceLogout")
|
||||
@ResponseBody
|
||||
public AjaxResult batchForceLogout(@RequestParam("ids[]") String[] ids)
|
||||
public AjaxResult batchForceLogout(String ids)
|
||||
{
|
||||
for (String sessionId : ids)
|
||||
for (String sessionId : Convert.toStrArray(ids))
|
||||
{
|
||||
SysUserOnline online = userOnlineService.selectOnlineById(sessionId);
|
||||
if (online == null)
|
||||
@@ -77,38 +78,11 @@ public class SysUserOnlineController extends BaseController
|
||||
{
|
||||
return error("当前登陆用户无法强退");
|
||||
}
|
||||
onlineSession.setStatus(OnlineStatus.off_line);
|
||||
onlineSessionDAO.update(onlineSession);
|
||||
onlineSessionDAO.delete(onlineSession);
|
||||
online.setStatus(OnlineStatus.off_line);
|
||||
userOnlineService.saveOnline(online);
|
||||
userOnlineService.removeUserCache(online.getLoginName(), sessionId);
|
||||
}
|
||||
return success();
|
||||
}
|
||||
|
||||
@RequiresPermissions("monitor:online:forceLogout")
|
||||
@Log(title = "在线用户", businessType = BusinessType.FORCE)
|
||||
@PostMapping("/forceLogout")
|
||||
@ResponseBody
|
||||
public AjaxResult forceLogout(String sessionId)
|
||||
{
|
||||
SysUserOnline online = userOnlineService.selectOnlineById(sessionId);
|
||||
if (sessionId.equals(ShiroUtils.getSessionId()))
|
||||
{
|
||||
return error("当前登陆用户无法强退");
|
||||
}
|
||||
if (online == null)
|
||||
{
|
||||
return error("用户已下线");
|
||||
}
|
||||
OnlineSession onlineSession = (OnlineSession) onlineSessionDAO.readSession(online.getSessionId());
|
||||
if (onlineSession == null)
|
||||
{
|
||||
return error("用户已下线");
|
||||
}
|
||||
onlineSession.setStatus(OnlineStatus.off_line);
|
||||
onlineSessionDAO.update(onlineSession);
|
||||
online.setStatus(OnlineStatus.off_line);
|
||||
userOnlineService.saveOnline(online);
|
||||
return success();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,6 +112,11 @@ public class SysDeptController extends BaseController
|
||||
{
|
||||
return error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己");
|
||||
}
|
||||
else if (StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus())
|
||||
&& deptService.selectNormalChildrenDeptById(dept.getDeptId()) > 0)
|
||||
{
|
||||
return AjaxResult.error("该部门包含未停用的子部门!");
|
||||
}
|
||||
dept.setUpdateBy(ShiroUtils.getLoginName());
|
||||
return toAjax(deptService.updateDept(dept));
|
||||
}
|
||||
@@ -148,11 +153,16 @@ public class SysDeptController extends BaseController
|
||||
|
||||
/**
|
||||
* 选择部门树
|
||||
*
|
||||
* @param deptId 部门ID
|
||||
* @param excludeId 排除ID
|
||||
*/
|
||||
@GetMapping("/selectDeptTree/{deptId}")
|
||||
public String selectDeptTree(@PathVariable("deptId") Long deptId, ModelMap mmap)
|
||||
@GetMapping(value = { "/selectDeptTree/{deptId}", "/selectDeptTree/{deptId}/{excludeId}" })
|
||||
public String selectDeptTree(@PathVariable("deptId") Long deptId,
|
||||
@PathVariable(value = "excludeId", required = false) String excludeId, ModelMap mmap)
|
||||
{
|
||||
mmap.put("dept", deptService.selectDeptById(deptId));
|
||||
mmap.put("excludeId", excludeId);
|
||||
return prefix + "/tree";
|
||||
}
|
||||
|
||||
@@ -167,6 +177,19 @@ public class SysDeptController extends BaseController
|
||||
return ztrees;
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载部门列表树(排除下级)
|
||||
*/
|
||||
@GetMapping("/treeData/{excludeId}")
|
||||
@ResponseBody
|
||||
public List<Ztree> treeDataExcludeChild(@PathVariable(value = "excludeId", required = false) Long excludeId)
|
||||
{
|
||||
SysDept dept = new SysDept();
|
||||
dept.setDeptId(excludeId);
|
||||
List<Ztree> ztrees = deptService.selectDeptTreeExcludeChild(dept);
|
||||
return ztrees;
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载角色部门(数据权限)列表树
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.ruoyi.web.controller.system;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
@@ -21,8 +22,8 @@ import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.shiro.service.SysPasswordService;
|
||||
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.ISysPostService;
|
||||
import com.ruoyi.system.service.ISysRoleService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
@@ -106,7 +107,7 @@ public class SysUserController extends BaseController
|
||||
@GetMapping("/add")
|
||||
public String add(ModelMap mmap)
|
||||
{
|
||||
mmap.put("roles", roleService.selectRoleAll());
|
||||
mmap.put("roles", roleService.selectRoleAll().stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
|
||||
mmap.put("posts", postService.selectPostAll());
|
||||
return prefix + "/add";
|
||||
}
|
||||
@@ -144,8 +145,9 @@ public class SysUserController extends BaseController
|
||||
@GetMapping("/edit/{userId}")
|
||||
public String edit(@PathVariable("userId") Long userId, ModelMap mmap)
|
||||
{
|
||||
List<SysRole> roles = roleService.selectRolesByUserId(userId);
|
||||
mmap.put("user", userService.selectUserById(userId));
|
||||
mmap.put("roles", roleService.selectRolesByUserId(userId));
|
||||
mmap.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
|
||||
mmap.put("posts", postService.selectPostsByUserId(userId));
|
||||
return prefix + "/edit";
|
||||
}
|
||||
@@ -173,7 +175,6 @@ public class SysUserController extends BaseController
|
||||
}
|
||||
|
||||
@RequiresPermissions("system:user:resetPwd")
|
||||
@Log(title = "重置密码", businessType = BusinessType.UPDATE)
|
||||
@GetMapping("/resetPwd/{userId}")
|
||||
public String resetPwd(@PathVariable("userId") Long userId, ModelMap mmap)
|
||||
{
|
||||
@@ -192,7 +193,7 @@ public class SysUserController extends BaseController
|
||||
user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt()));
|
||||
if (userService.resetUserPwd(user) > 0)
|
||||
{
|
||||
if (ShiroUtils.getUserId() == user.getUserId())
|
||||
if (ShiroUtils.getUserId().longValue() == user.getUserId().longValue())
|
||||
{
|
||||
ShiroUtils.setSysUser(userService.selectUserById(user.getUserId()));
|
||||
}
|
||||
@@ -209,9 +210,9 @@ public class SysUserController extends BaseController
|
||||
{
|
||||
SysUser user = userService.selectUserById(userId);
|
||||
// 获取用户所属的角色列表
|
||||
List<SysUserRole> userRoles = userService.selectUserRoleByUserId(userId);
|
||||
List<SysRole> roles = roleService.selectRolesByUserId(userId);
|
||||
mmap.put("user", user);
|
||||
mmap.put("userRoles", userRoles);
|
||||
mmap.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
|
||||
return prefix + "/authRole";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.web.core.config;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import com.ruoyi.common.config.Global;
|
||||
@@ -22,6 +23,10 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
@EnableSwagger2
|
||||
public class SwaggerConfig
|
||||
{
|
||||
/** 是否开启swagger */
|
||||
@Value("${swagger.enabled}")
|
||||
private boolean enabled;
|
||||
|
||||
/**
|
||||
* 创建API
|
||||
*/
|
||||
@@ -29,6 +34,8 @@ public class SwaggerConfig
|
||||
public Docket createRestApi()
|
||||
{
|
||||
return new Docket(DocumentationType.SWAGGER_2)
|
||||
// 是否启用Swagger
|
||||
.enable(enabled)
|
||||
// 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息)
|
||||
.apiInfo(apiInfo())
|
||||
// 设置哪些接口暴露给Swagger展示
|
||||
|
||||
@@ -3,7 +3,7 @@ ruoyi:
|
||||
# 名称
|
||||
name: RuoYi
|
||||
# 版本
|
||||
version: 4.2.0
|
||||
version: 4.4.0
|
||||
# 版权年份
|
||||
copyrightYear: 2019
|
||||
# 实例演示开关
|
||||
@@ -11,7 +11,7 @@ ruoyi:
|
||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||
profile: D:/ruoyi/uploadPath
|
||||
# 获取ip地址开关
|
||||
addressEnabled: true
|
||||
addressEnabled: false
|
||||
|
||||
# 开发环境配置
|
||||
server:
|
||||
@@ -108,6 +108,8 @@ shiro:
|
||||
httpOnly: true
|
||||
# 设置Cookie的过期时间,天为单位
|
||||
maxAge: 30
|
||||
# 设置密钥,务必保持唯一性(生成方式,直接拷贝到main运行即可)KeyGenerator keygen = KeyGenerator.getInstance("AES"); SecretKey deskey = keygen.generateKey(); System.out.println(Base64.encodeToString(deskey.getEncoded()));
|
||||
cipherKey: zSyK5Kp6PZAAjlT+eeNMlg==
|
||||
session:
|
||||
# Session超时时间,-1代表永不过期(默认30分钟)
|
||||
expireTime: 30
|
||||
@@ -128,3 +130,8 @@ xss:
|
||||
excludes: /system/notice/*
|
||||
# 匹配链接
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||
|
||||
# Swagger配置
|
||||
swagger:
|
||||
# 是否开启swagger
|
||||
enabled: true
|
||||
|
||||
@@ -5,10 +5,10 @@ PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
|
||||
<configuration>
|
||||
|
||||
<settings>
|
||||
<setting name="cacheEnabled" value="true" /> <!-- 全局映射器启用缓存 -->
|
||||
<setting name="useGeneratedKeys" value="true" /> <!-- 允许 JDBC 支持自动生成主键 -->
|
||||
<setting name="defaultExecutorType" value="REUSE" /> <!-- 配置默认的执行器 -->
|
||||
<setting name="logImpl" value="SLF4J" /> <!-- 指定 MyBatis 所用日志的具体实现 -->
|
||||
<setting name="cacheEnabled" value="true" /> <!-- 全局映射器启用缓存 -->
|
||||
<setting name="useGeneratedKeys" value="true" /> <!-- 允许 JDBC 支持自动生成主键 -->
|
||||
<setting name="defaultExecutorType" value="REUSE" /> <!-- 配置默认的执行器 -->
|
||||
<setting name="logImpl" value="SLF4J" /> <!-- 指定 MyBatis 所用日志的具体实现 -->
|
||||
<!-- <setting name="mapUnderscoreToCamelCase" value="true"/> 驼峰式命名 -->
|
||||
</settings>
|
||||
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+5
-3
File diff suppressed because one or more lines are too long
+10
File diff suppressed because one or more lines are too long
+1516
-269
File diff suppressed because it is too large
Load Diff
+10
File diff suppressed because one or more lines are too long
+2437
-121
File diff suppressed because it is too large
Load Diff
+10
File diff suppressed because one or more lines are too long
+1224
-77
File diff suppressed because it is too large
Load Diff
+10
File diff suppressed because one or more lines are too long
-211
@@ -1,211 +0,0 @@
|
||||
/**
|
||||
* @author: aperez <aperez@datadec.es>
|
||||
* @version: v2.0.0
|
||||
*
|
||||
* @update Dennis Hernández <http://djhvscf.github.io/Blog>
|
||||
*/
|
||||
|
||||
!function($) {
|
||||
'use strict';
|
||||
|
||||
var firstLoad = false;
|
||||
|
||||
var sprintf = $.fn.bootstrapTable.utils.sprintf;
|
||||
|
||||
var showAvdSearch = function(pColumns, searchTitle, searchText, that) {
|
||||
if (!$("#avdSearchModal" + "_" + that.options.idTable).hasClass("modal")) {
|
||||
var vModal = sprintf("<div id=\"avdSearchModal%s\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"mySmallModalLabel\" aria-hidden=\"true\">", "_" + that.options.idTable);
|
||||
vModal += "<div class=\"modal-dialog modal-xs\">";
|
||||
vModal += " <div class=\"modal-content\">";
|
||||
vModal += " <div class=\"modal-header\">";
|
||||
vModal += " <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\" >×</button>";
|
||||
vModal += sprintf(" <h4 class=\"modal-title\">%s</h4>", searchTitle);
|
||||
vModal += " </div>";
|
||||
vModal += " <div class=\"modal-body modal-body-custom\">";
|
||||
vModal += sprintf(" <div class=\"container-fluid\" id=\"avdSearchModalContent%s\" style=\"padding-right: 0px;padding-left: 0px;\" >", "_" + that.options.idTable);
|
||||
vModal += " </div>";
|
||||
vModal += " </div>";
|
||||
vModal += " </div>";
|
||||
vModal += " </div>";
|
||||
vModal += "</div>";
|
||||
|
||||
$("body").append($(vModal));
|
||||
|
||||
var vFormAvd = createFormAvd(pColumns, searchText, that),
|
||||
timeoutId = 0;;
|
||||
|
||||
$('#avdSearchModalContent' + "_" + that.options.idTable).append(vFormAvd.join(''));
|
||||
|
||||
$('#' + that.options.idForm).off('keyup blur', 'input').on('keyup blur', 'input', function (event) {
|
||||
clearTimeout(timeoutId);
|
||||
timeoutId = setTimeout(function () {
|
||||
that.onColumnAdvancedSearch(event);
|
||||
}, that.options.searchTimeOut);
|
||||
});
|
||||
|
||||
$("#btnCloseAvd" + "_" + that.options.idTable).click(function() {
|
||||
$("#avdSearchModal" + "_" + that.options.idTable).modal('hide');
|
||||
});
|
||||
|
||||
$("#avdSearchModal" + "_" + that.options.idTable).modal();
|
||||
} else {
|
||||
$("#avdSearchModal" + "_" + that.options.idTable).modal();
|
||||
}
|
||||
};
|
||||
|
||||
var createFormAvd = function(pColumns, searchText, that) {
|
||||
var htmlForm = [];
|
||||
htmlForm.push(sprintf('<form class="form-horizontal" id="%s" action="%s" >', that.options.idForm, that.options.actionForm));
|
||||
for (var i in pColumns) {
|
||||
var vObjCol = pColumns[i];
|
||||
if (!vObjCol.checkbox && vObjCol.visible && vObjCol.searchable) {
|
||||
htmlForm.push('<div class="form-group">');
|
||||
htmlForm.push(sprintf('<label class="col-sm-4 control-label">%s</label>', vObjCol.title));
|
||||
htmlForm.push('<div class="col-sm-6">');
|
||||
htmlForm.push(sprintf('<input type="text" class="form-control input-md" name="%s" placeholder="%s" id="%s">', vObjCol.field, vObjCol.title, vObjCol.field));
|
||||
htmlForm.push('</div>');
|
||||
htmlForm.push('</div>');
|
||||
}
|
||||
}
|
||||
|
||||
htmlForm.push('<div class="form-group">');
|
||||
htmlForm.push('<div class="col-sm-offset-9 col-sm-3">');
|
||||
htmlForm.push(sprintf('<button type="button" id="btnCloseAvd%s" class="btn btn-default" >%s</button>', "_" + that.options.idTable, searchText));
|
||||
htmlForm.push('</div>');
|
||||
htmlForm.push('</div>');
|
||||
htmlForm.push('</form>');
|
||||
|
||||
return htmlForm;
|
||||
};
|
||||
|
||||
$.extend($.fn.bootstrapTable.defaults, {
|
||||
advancedSearch: false,
|
||||
idForm: 'advancedSearch',
|
||||
actionForm: '',
|
||||
idTable: undefined,
|
||||
onColumnAdvancedSearch: function (field, text) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$.extend($.fn.bootstrapTable.defaults.icons, {
|
||||
advancedSearchIcon: 'glyphicon-chevron-down'
|
||||
});
|
||||
|
||||
$.extend($.fn.bootstrapTable.Constructor.EVENTS, {
|
||||
'column-advanced-search.bs.table': 'onColumnAdvancedSearch'
|
||||
});
|
||||
|
||||
$.extend($.fn.bootstrapTable.locales, {
|
||||
formatAdvancedSearch: function() {
|
||||
return 'Advanced search';
|
||||
},
|
||||
formatAdvancedCloseButton: function() {
|
||||
return "Close";
|
||||
}
|
||||
});
|
||||
|
||||
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
|
||||
|
||||
var BootstrapTable = $.fn.bootstrapTable.Constructor,
|
||||
_initToolbar = BootstrapTable.prototype.initToolbar,
|
||||
_load = BootstrapTable.prototype.load,
|
||||
_initSearch = BootstrapTable.prototype.initSearch;
|
||||
|
||||
BootstrapTable.prototype.initToolbar = function() {
|
||||
_initToolbar.apply(this, Array.prototype.slice.apply(arguments));
|
||||
|
||||
if (!this.options.search) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.options.advancedSearch) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.options.idTable) {
|
||||
return;
|
||||
}
|
||||
|
||||
var that = this,
|
||||
html = [];
|
||||
|
||||
html.push(sprintf('<div class="columns columns-%s btn-group pull-%s" role="group">', this.options.buttonsAlign, this.options.buttonsAlign));
|
||||
html.push(sprintf('<button class="btn btn-default%s' + '" type="button" name="advancedSearch" title="%s">', that.options.iconSize === undefined ? '' : ' btn-' + that.options.iconSize, that.options.formatAdvancedSearch()));
|
||||
html.push(sprintf('<i class="%s %s"></i>', that.options.iconsPrefix, that.options.icons.advancedSearchIcon))
|
||||
html.push('</button></div>');
|
||||
|
||||
that.$toolbar.prepend(html.join(''));
|
||||
|
||||
that.$toolbar.find('button[name="advancedSearch"]')
|
||||
.off('click').on('click', function() {
|
||||
showAvdSearch(that.columns, that.options.formatAdvancedSearch(), that.options.formatAdvancedCloseButton(), that);
|
||||
});
|
||||
};
|
||||
|
||||
BootstrapTable.prototype.load = function(data) {
|
||||
_load.apply(this, Array.prototype.slice.apply(arguments));
|
||||
|
||||
if (!this.options.advancedSearch) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof this.options.idTable === 'undefined') {
|
||||
return;
|
||||
} else {
|
||||
if (!firstLoad) {
|
||||
var height = parseInt($(".bootstrap-table").height());
|
||||
height += 10;
|
||||
$("#" + this.options.idTable).bootstrapTable("resetView", {height: height});
|
||||
firstLoad = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
BootstrapTable.prototype.initSearch = function () {
|
||||
_initSearch.apply(this, Array.prototype.slice.apply(arguments));
|
||||
|
||||
if (!this.options.advancedSearch) {
|
||||
return;
|
||||
}
|
||||
|
||||
var that = this;
|
||||
var fp = $.isEmptyObject(this.filterColumnsPartial) ? null : this.filterColumnsPartial;
|
||||
|
||||
this.data = fp ? $.grep(this.data, function (item, i) {
|
||||
for (var key in fp) {
|
||||
var fval = fp[key].toLowerCase();
|
||||
var value = item[key];
|
||||
value = $.fn.bootstrapTable.utils.calculateObjectValue(that.header,
|
||||
that.header.formatters[$.inArray(key, that.header.fields)],
|
||||
[value, item, i], value);
|
||||
|
||||
if (!($.inArray(key, that.header.fields) !== -1 &&
|
||||
(typeof value === 'string' || typeof value === 'number') &&
|
||||
(value + '').toLowerCase().indexOf(fval) !== -1)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}) : this.data;
|
||||
};
|
||||
|
||||
BootstrapTable.prototype.onColumnAdvancedSearch = function (event) {
|
||||
var text = $.trim($(event.currentTarget).val());
|
||||
var $field = $(event.currentTarget)[0].id;
|
||||
|
||||
if ($.isEmptyObject(this.filterColumnsPartial)) {
|
||||
this.filterColumnsPartial = {};
|
||||
}
|
||||
if (text) {
|
||||
this.filterColumnsPartial[$field] = text;
|
||||
} else {
|
||||
delete this.filterColumnsPartial[$field];
|
||||
}
|
||||
|
||||
this.options.pageNumber = 1;
|
||||
this.onSearch(event);
|
||||
this.updatePagination();
|
||||
this.trigger('column-advanced-search', $field, text);
|
||||
};
|
||||
}(jQuery);
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
/*
|
||||
* bootstrap-table - v1.11.0 - 2016-07-02
|
||||
* https://github.com/wenzhixin/bootstrap-table
|
||||
* Copyright (c) 2016 zhixin wen
|
||||
* Licensed MIT License
|
||||
*/
|
||||
!function(a){"use strict";var b=!1,c=a.fn.bootstrapTable.utils.sprintf,d=function(b,d,f,g){if(a("#avdSearchModal_"+g.options.idTable).hasClass("modal"))a("#avdSearchModal_"+g.options.idTable).modal();else{var h=c('<div id="avdSearchModal%s" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">',"_"+g.options.idTable);h+='<div class="modal-dialog modal-xs">',h+=' <div class="modal-content">',h+=' <div class="modal-header">',h+=' <button type="button" class="close" data-dismiss="modal" aria-hidden="true" >×</button>',h+=c(' <h4 class="modal-title">%s</h4>',d),h+=" </div>",h+=' <div class="modal-body modal-body-custom">',h+=c(' <div class="container-fluid" id="avdSearchModalContent%s" style="padding-right: 0px;padding-left: 0px;" >',"_"+g.options.idTable),h+=" </div>",h+=" </div>",h+=" </div>",h+=" </div>",h+="</div>",a("body").append(a(h));var i=e(b,f,g),j=0;a("#avdSearchModalContent_"+g.options.idTable).append(i.join("")),a("#"+g.options.idForm).off("keyup blur","input").on("keyup blur","input",function(a){clearTimeout(j),j=setTimeout(function(){g.onColumnAdvancedSearch(a)},g.options.searchTimeOut)}),a("#btnCloseAvd_"+g.options.idTable).click(function(){a("#avdSearchModal_"+g.options.idTable).modal("hide")}),a("#avdSearchModal_"+g.options.idTable).modal()}},e=function(a,b,d){var e=[];e.push(c('<form class="form-horizontal" id="%s" action="%s" >',d.options.idForm,d.options.actionForm));for(var f in a){var g=a[f];!g.checkbox&&g.visible&&g.searchable&&(e.push('<div class="form-group">'),e.push(c('<label class="col-sm-4 control-label">%s</label>',g.title)),e.push('<div class="col-sm-6">'),e.push(c('<input type="text" class="form-control input-md" name="%s" placeholder="%s" id="%s">',g.field,g.title,g.field)),e.push("</div>"),e.push("</div>"))}return e.push('<div class="form-group">'),e.push('<div class="col-sm-offset-9 col-sm-3">'),e.push(c('<button type="button" id="btnCloseAvd%s" class="btn btn-default" >%s</button>',"_"+d.options.idTable,b)),e.push("</div>"),e.push("</div>"),e.push("</form>"),e};a.extend(a.fn.bootstrapTable.defaults,{advancedSearch:!1,idForm:"advancedSearch",actionForm:"",idTable:void 0,onColumnAdvancedSearch:function(){return!1}}),a.extend(a.fn.bootstrapTable.defaults.icons,{advancedSearchIcon:"glyphicon-chevron-down"}),a.extend(a.fn.bootstrapTable.Constructor.EVENTS,{"column-advanced-search.bs.table":"onColumnAdvancedSearch"}),a.extend(a.fn.bootstrapTable.locales,{formatAdvancedSearch:function(){return"Advanced search"},formatAdvancedCloseButton:function(){return"Close"}}),a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales);var f=a.fn.bootstrapTable.Constructor,g=f.prototype.initToolbar,h=f.prototype.load,i=f.prototype.initSearch;f.prototype.initToolbar=function(){if(g.apply(this,Array.prototype.slice.apply(arguments)),this.options.search&&this.options.advancedSearch&&this.options.idTable){var a=this,b=[];b.push(c('<div class="columns columns-%s btn-group pull-%s" role="group">',this.options.buttonsAlign,this.options.buttonsAlign)),b.push(c('<button class="btn btn-default%s" type="button" name="advancedSearch" title="%s">',void 0===a.options.iconSize?"":" btn-"+a.options.iconSize,a.options.formatAdvancedSearch())),b.push(c('<i class="%s %s"></i>',a.options.iconsPrefix,a.options.icons.advancedSearchIcon)),b.push("</button></div>"),a.$toolbar.prepend(b.join("")),a.$toolbar.find('button[name="advancedSearch"]').off("click").on("click",function(){d(a.columns,a.options.formatAdvancedSearch(),a.options.formatAdvancedCloseButton(),a)})}},f.prototype.load=function(){if(h.apply(this,Array.prototype.slice.apply(arguments)),this.options.advancedSearch&&"undefined"!=typeof this.options.idTable&&!b){var c=parseInt(a(".bootstrap-table").height());c+=10,a("#"+this.options.idTable).bootstrapTable("resetView",{height:c}),b=!0}},f.prototype.initSearch=function(){if(i.apply(this,Array.prototype.slice.apply(arguments)),this.options.advancedSearch){var b=this,c=a.isEmptyObject(this.filterColumnsPartial)?null:this.filterColumnsPartial;this.data=c?a.grep(this.data,function(d,e){for(var f in c){var g=c[f].toLowerCase(),h=d[f];if(h=a.fn.bootstrapTable.utils.calculateObjectValue(b.header,b.header.formatters[a.inArray(f,b.header.fields)],[h,d,e],h),-1===a.inArray(f,b.header.fields)||"string"!=typeof h&&"number"!=typeof h||-1===(h+"").toLowerCase().indexOf(g))return!1}return!0}):this.data}},f.prototype.onColumnAdvancedSearch=function(b){var c=a.trim(a(b.currentTarget).val()),d=a(b.currentTarget)[0].id;a.isEmptyObject(this.filterColumnsPartial)&&(this.filterColumnsPartial={}),c?this.filterColumnsPartial[d]=c:delete this.filterColumnsPartial[d],this.options.pageNumber=1,this.onSearch(b),this.updatePagination(),this.trigger("column-advanced-search",d,c)}}(jQuery);
|
||||
Vendored
+768
-39
@@ -1,42 +1,771 @@
|
||||
(function ($) {
|
||||
'use strict';
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
||||
(global = global || self, factory(global.jQuery));
|
||||
}(this, (function ($) { 'use strict';
|
||||
|
||||
$.fn.bootstrapTable.locales['zh-CN'] = {
|
||||
formatLoadingMessage: function () {
|
||||
return '正在努力地加载数据中,请稍候……';
|
||||
},
|
||||
formatRecordsPerPage: function (pageNumber) {
|
||||
return pageNumber + ' 条记录每页';
|
||||
},
|
||||
formatShowingRows: function (pageFrom, pageTo, totalRows) {
|
||||
return '第 ' + pageFrom + ' 到 ' + pageTo + ' 条,共 ' + totalRows + ' 条记录。';
|
||||
},
|
||||
formatSearch: function () {
|
||||
return '搜索';
|
||||
},
|
||||
formatNoMatches: function () {
|
||||
return '没有找到匹配的记录';
|
||||
},
|
||||
formatPaginationSwitch: function () {
|
||||
return '隐藏/显示分页';
|
||||
},
|
||||
formatRefresh: function () {
|
||||
return '刷新';
|
||||
},
|
||||
formatToggle: function () {
|
||||
return '切换';
|
||||
},
|
||||
formatColumns: function () {
|
||||
return '列';
|
||||
},
|
||||
formatExport: function () {
|
||||
return '导出数据';
|
||||
},
|
||||
formatClearFilters: function () {
|
||||
return '清空过滤';
|
||||
}
|
||||
};
|
||||
$ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
|
||||
|
||||
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['zh-CN']);
|
||||
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
||||
|
||||
})(jQuery);
|
||||
function createCommonjsModule(fn, module) {
|
||||
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
||||
}
|
||||
|
||||
var check = function (it) {
|
||||
return it && it.Math == Math && it;
|
||||
};
|
||||
|
||||
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
||||
var global_1 =
|
||||
// eslint-disable-next-line no-undef
|
||||
check(typeof globalThis == 'object' && globalThis) ||
|
||||
check(typeof window == 'object' && window) ||
|
||||
check(typeof self == 'object' && self) ||
|
||||
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
||||
// eslint-disable-next-line no-new-func
|
||||
Function('return this')();
|
||||
|
||||
var fails = function (exec) {
|
||||
try {
|
||||
return !!exec();
|
||||
} catch (error) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
// Thank's IE8 for his funny defineProperty
|
||||
var descriptors = !fails(function () {
|
||||
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
|
||||
});
|
||||
|
||||
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
|
||||
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
||||
|
||||
// Nashorn ~ JDK8 bug
|
||||
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
|
||||
|
||||
// `Object.prototype.propertyIsEnumerable` method implementation
|
||||
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
|
||||
var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
||||
var descriptor = getOwnPropertyDescriptor(this, V);
|
||||
return !!descriptor && descriptor.enumerable;
|
||||
} : nativePropertyIsEnumerable;
|
||||
|
||||
var objectPropertyIsEnumerable = {
|
||||
f: f
|
||||
};
|
||||
|
||||
var createPropertyDescriptor = function (bitmap, value) {
|
||||
return {
|
||||
enumerable: !(bitmap & 1),
|
||||
configurable: !(bitmap & 2),
|
||||
writable: !(bitmap & 4),
|
||||
value: value
|
||||
};
|
||||
};
|
||||
|
||||
var toString = {}.toString;
|
||||
|
||||
var classofRaw = function (it) {
|
||||
return toString.call(it).slice(8, -1);
|
||||
};
|
||||
|
||||
var split = ''.split;
|
||||
|
||||
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
||||
var indexedObject = fails(function () {
|
||||
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
||||
// eslint-disable-next-line no-prototype-builtins
|
||||
return !Object('z').propertyIsEnumerable(0);
|
||||
}) ? function (it) {
|
||||
return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
|
||||
} : Object;
|
||||
|
||||
// `RequireObjectCoercible` abstract operation
|
||||
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
|
||||
var requireObjectCoercible = function (it) {
|
||||
if (it == undefined) throw TypeError("Can't call method on " + it);
|
||||
return it;
|
||||
};
|
||||
|
||||
// toObject with fallback for non-array-like ES3 strings
|
||||
|
||||
|
||||
|
||||
var toIndexedObject = function (it) {
|
||||
return indexedObject(requireObjectCoercible(it));
|
||||
};
|
||||
|
||||
var isObject = function (it) {
|
||||
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
||||
};
|
||||
|
||||
// `ToPrimitive` abstract operation
|
||||
// https://tc39.github.io/ecma262/#sec-toprimitive
|
||||
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
||||
// and the second argument - flag - preferred type is a string
|
||||
var toPrimitive = function (input, PREFERRED_STRING) {
|
||||
if (!isObject(input)) return input;
|
||||
var fn, val;
|
||||
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
||||
if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
|
||||
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
||||
throw TypeError("Can't convert object to primitive value");
|
||||
};
|
||||
|
||||
var hasOwnProperty = {}.hasOwnProperty;
|
||||
|
||||
var has = function (it, key) {
|
||||
return hasOwnProperty.call(it, key);
|
||||
};
|
||||
|
||||
var document = global_1.document;
|
||||
// typeof document.createElement is 'object' in old IE
|
||||
var EXISTS = isObject(document) && isObject(document.createElement);
|
||||
|
||||
var documentCreateElement = function (it) {
|
||||
return EXISTS ? document.createElement(it) : {};
|
||||
};
|
||||
|
||||
// Thank's IE8 for his funny defineProperty
|
||||
var ie8DomDefine = !descriptors && !fails(function () {
|
||||
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
||||
get: function () { return 7; }
|
||||
}).a != 7;
|
||||
});
|
||||
|
||||
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
||||
|
||||
// `Object.getOwnPropertyDescriptor` method
|
||||
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
|
||||
var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
||||
O = toIndexedObject(O);
|
||||
P = toPrimitive(P, true);
|
||||
if (ie8DomDefine) try {
|
||||
return nativeGetOwnPropertyDescriptor(O, P);
|
||||
} catch (error) { /* empty */ }
|
||||
if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
|
||||
};
|
||||
|
||||
var objectGetOwnPropertyDescriptor = {
|
||||
f: f$1
|
||||
};
|
||||
|
||||
var anObject = function (it) {
|
||||
if (!isObject(it)) {
|
||||
throw TypeError(String(it) + ' is not an object');
|
||||
} return it;
|
||||
};
|
||||
|
||||
var nativeDefineProperty = Object.defineProperty;
|
||||
|
||||
// `Object.defineProperty` method
|
||||
// https://tc39.github.io/ecma262/#sec-object.defineproperty
|
||||
var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
|
||||
anObject(O);
|
||||
P = toPrimitive(P, true);
|
||||
anObject(Attributes);
|
||||
if (ie8DomDefine) try {
|
||||
return nativeDefineProperty(O, P, Attributes);
|
||||
} catch (error) { /* empty */ }
|
||||
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
||||
if ('value' in Attributes) O[P] = Attributes.value;
|
||||
return O;
|
||||
};
|
||||
|
||||
var objectDefineProperty = {
|
||||
f: f$2
|
||||
};
|
||||
|
||||
var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
||||
return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
|
||||
} : function (object, key, value) {
|
||||
object[key] = value;
|
||||
return object;
|
||||
};
|
||||
|
||||
var setGlobal = function (key, value) {
|
||||
try {
|
||||
createNonEnumerableProperty(global_1, key, value);
|
||||
} catch (error) {
|
||||
global_1[key] = value;
|
||||
} return value;
|
||||
};
|
||||
|
||||
var SHARED = '__core-js_shared__';
|
||||
var store = global_1[SHARED] || setGlobal(SHARED, {});
|
||||
|
||||
var sharedStore = store;
|
||||
|
||||
var functionToString = Function.toString;
|
||||
|
||||
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
|
||||
if (typeof sharedStore.inspectSource != 'function') {
|
||||
sharedStore.inspectSource = function (it) {
|
||||
return functionToString.call(it);
|
||||
};
|
||||
}
|
||||
|
||||
var inspectSource = sharedStore.inspectSource;
|
||||
|
||||
var WeakMap = global_1.WeakMap;
|
||||
|
||||
var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
|
||||
|
||||
var shared = createCommonjsModule(function (module) {
|
||||
(module.exports = function (key, value) {
|
||||
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
||||
})('versions', []).push({
|
||||
version: '3.6.0',
|
||||
mode: 'global',
|
||||
copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
|
||||
});
|
||||
});
|
||||
|
||||
var id = 0;
|
||||
var postfix = Math.random();
|
||||
|
||||
var uid = function (key) {
|
||||
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
|
||||
};
|
||||
|
||||
var keys = shared('keys');
|
||||
|
||||
var sharedKey = function (key) {
|
||||
return keys[key] || (keys[key] = uid(key));
|
||||
};
|
||||
|
||||
var hiddenKeys = {};
|
||||
|
||||
var WeakMap$1 = global_1.WeakMap;
|
||||
var set, get, has$1;
|
||||
|
||||
var enforce = function (it) {
|
||||
return has$1(it) ? get(it) : set(it, {});
|
||||
};
|
||||
|
||||
var getterFor = function (TYPE) {
|
||||
return function (it) {
|
||||
var state;
|
||||
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
||||
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
||||
} return state;
|
||||
};
|
||||
};
|
||||
|
||||
if (nativeWeakMap) {
|
||||
var store$1 = new WeakMap$1();
|
||||
var wmget = store$1.get;
|
||||
var wmhas = store$1.has;
|
||||
var wmset = store$1.set;
|
||||
set = function (it, metadata) {
|
||||
wmset.call(store$1, it, metadata);
|
||||
return metadata;
|
||||
};
|
||||
get = function (it) {
|
||||
return wmget.call(store$1, it) || {};
|
||||
};
|
||||
has$1 = function (it) {
|
||||
return wmhas.call(store$1, it);
|
||||
};
|
||||
} else {
|
||||
var STATE = sharedKey('state');
|
||||
hiddenKeys[STATE] = true;
|
||||
set = function (it, metadata) {
|
||||
createNonEnumerableProperty(it, STATE, metadata);
|
||||
return metadata;
|
||||
};
|
||||
get = function (it) {
|
||||
return has(it, STATE) ? it[STATE] : {};
|
||||
};
|
||||
has$1 = function (it) {
|
||||
return has(it, STATE);
|
||||
};
|
||||
}
|
||||
|
||||
var internalState = {
|
||||
set: set,
|
||||
get: get,
|
||||
has: has$1,
|
||||
enforce: enforce,
|
||||
getterFor: getterFor
|
||||
};
|
||||
|
||||
var redefine = createCommonjsModule(function (module) {
|
||||
var getInternalState = internalState.get;
|
||||
var enforceInternalState = internalState.enforce;
|
||||
var TEMPLATE = String(String).split('String');
|
||||
|
||||
(module.exports = function (O, key, value, options) {
|
||||
var unsafe = options ? !!options.unsafe : false;
|
||||
var simple = options ? !!options.enumerable : false;
|
||||
var noTargetGet = options ? !!options.noTargetGet : false;
|
||||
if (typeof value == 'function') {
|
||||
if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
|
||||
enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
|
||||
}
|
||||
if (O === global_1) {
|
||||
if (simple) O[key] = value;
|
||||
else setGlobal(key, value);
|
||||
return;
|
||||
} else if (!unsafe) {
|
||||
delete O[key];
|
||||
} else if (!noTargetGet && O[key]) {
|
||||
simple = true;
|
||||
}
|
||||
if (simple) O[key] = value;
|
||||
else createNonEnumerableProperty(O, key, value);
|
||||
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
||||
})(Function.prototype, 'toString', function toString() {
|
||||
return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
|
||||
});
|
||||
});
|
||||
|
||||
var path = global_1;
|
||||
|
||||
var aFunction = function (variable) {
|
||||
return typeof variable == 'function' ? variable : undefined;
|
||||
};
|
||||
|
||||
var getBuiltIn = function (namespace, method) {
|
||||
return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
|
||||
: path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
|
||||
};
|
||||
|
||||
var ceil = Math.ceil;
|
||||
var floor = Math.floor;
|
||||
|
||||
// `ToInteger` abstract operation
|
||||
// https://tc39.github.io/ecma262/#sec-tointeger
|
||||
var toInteger = function (argument) {
|
||||
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
|
||||
};
|
||||
|
||||
var min = Math.min;
|
||||
|
||||
// `ToLength` abstract operation
|
||||
// https://tc39.github.io/ecma262/#sec-tolength
|
||||
var toLength = function (argument) {
|
||||
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
||||
};
|
||||
|
||||
var max = Math.max;
|
||||
var min$1 = Math.min;
|
||||
|
||||
// Helper for a popular repeating case of the spec:
|
||||
// Let integer be ? ToInteger(index).
|
||||
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
||||
var toAbsoluteIndex = function (index, length) {
|
||||
var integer = toInteger(index);
|
||||
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
||||
};
|
||||
|
||||
// `Array.prototype.{ indexOf, includes }` methods implementation
|
||||
var createMethod = function (IS_INCLUDES) {
|
||||
return function ($this, el, fromIndex) {
|
||||
var O = toIndexedObject($this);
|
||||
var length = toLength(O.length);
|
||||
var index = toAbsoluteIndex(fromIndex, length);
|
||||
var value;
|
||||
// Array#includes uses SameValueZero equality algorithm
|
||||
// eslint-disable-next-line no-self-compare
|
||||
if (IS_INCLUDES && el != el) while (length > index) {
|
||||
value = O[index++];
|
||||
// eslint-disable-next-line no-self-compare
|
||||
if (value != value) return true;
|
||||
// Array#indexOf ignores holes, Array#includes - not
|
||||
} else for (;length > index; index++) {
|
||||
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
||||
} return !IS_INCLUDES && -1;
|
||||
};
|
||||
};
|
||||
|
||||
var arrayIncludes = {
|
||||
// `Array.prototype.includes` method
|
||||
// https://tc39.github.io/ecma262/#sec-array.prototype.includes
|
||||
includes: createMethod(true),
|
||||
// `Array.prototype.indexOf` method
|
||||
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
|
||||
indexOf: createMethod(false)
|
||||
};
|
||||
|
||||
var indexOf = arrayIncludes.indexOf;
|
||||
|
||||
|
||||
var objectKeysInternal = function (object, names) {
|
||||
var O = toIndexedObject(object);
|
||||
var i = 0;
|
||||
var result = [];
|
||||
var key;
|
||||
for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
|
||||
// Don't enum bug & hidden keys
|
||||
while (names.length > i) if (has(O, key = names[i++])) {
|
||||
~indexOf(result, key) || result.push(key);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
// IE8- don't enum bug keys
|
||||
var enumBugKeys = [
|
||||
'constructor',
|
||||
'hasOwnProperty',
|
||||
'isPrototypeOf',
|
||||
'propertyIsEnumerable',
|
||||
'toLocaleString',
|
||||
'toString',
|
||||
'valueOf'
|
||||
];
|
||||
|
||||
var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
|
||||
|
||||
// `Object.getOwnPropertyNames` method
|
||||
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
|
||||
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
||||
return objectKeysInternal(O, hiddenKeys$1);
|
||||
};
|
||||
|
||||
var objectGetOwnPropertyNames = {
|
||||
f: f$3
|
||||
};
|
||||
|
||||
var f$4 = Object.getOwnPropertySymbols;
|
||||
|
||||
var objectGetOwnPropertySymbols = {
|
||||
f: f$4
|
||||
};
|
||||
|
||||
// all object keys, includes non-enumerable and symbols
|
||||
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
||||
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
||||
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
||||
return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
|
||||
};
|
||||
|
||||
var copyConstructorProperties = function (target, source) {
|
||||
var keys = ownKeys(source);
|
||||
var defineProperty = objectDefineProperty.f;
|
||||
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
var key = keys[i];
|
||||
if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
||||
}
|
||||
};
|
||||
|
||||
var replacement = /#|\.prototype\./;
|
||||
|
||||
var isForced = function (feature, detection) {
|
||||
var value = data[normalize(feature)];
|
||||
return value == POLYFILL ? true
|
||||
: value == NATIVE ? false
|
||||
: typeof detection == 'function' ? fails(detection)
|
||||
: !!detection;
|
||||
};
|
||||
|
||||
var normalize = isForced.normalize = function (string) {
|
||||
return String(string).replace(replacement, '.').toLowerCase();
|
||||
};
|
||||
|
||||
var data = isForced.data = {};
|
||||
var NATIVE = isForced.NATIVE = 'N';
|
||||
var POLYFILL = isForced.POLYFILL = 'P';
|
||||
|
||||
var isForced_1 = isForced;
|
||||
|
||||
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
options.target - name of the target object
|
||||
options.global - target is the global object
|
||||
options.stat - export as static methods of target
|
||||
options.proto - export as prototype methods of target
|
||||
options.real - real prototype method for the `pure` version
|
||||
options.forced - export even if the native feature is available
|
||||
options.bind - bind methods to the target, required for the `pure` version
|
||||
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
||||
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
||||
options.sham - add a flag to not completely full polyfills
|
||||
options.enumerable - export as enumerable property
|
||||
options.noTargetGet - prevent calling a getter on target
|
||||
*/
|
||||
var _export = function (options, source) {
|
||||
var TARGET = options.target;
|
||||
var GLOBAL = options.global;
|
||||
var STATIC = options.stat;
|
||||
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
||||
if (GLOBAL) {
|
||||
target = global_1;
|
||||
} else if (STATIC) {
|
||||
target = global_1[TARGET] || setGlobal(TARGET, {});
|
||||
} else {
|
||||
target = (global_1[TARGET] || {}).prototype;
|
||||
}
|
||||
if (target) for (key in source) {
|
||||
sourceProperty = source[key];
|
||||
if (options.noTargetGet) {
|
||||
descriptor = getOwnPropertyDescriptor$1(target, key);
|
||||
targetProperty = descriptor && descriptor.value;
|
||||
} else targetProperty = target[key];
|
||||
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
||||
// contained in target
|
||||
if (!FORCED && targetProperty !== undefined) {
|
||||
if (typeof sourceProperty === typeof targetProperty) continue;
|
||||
copyConstructorProperties(sourceProperty, targetProperty);
|
||||
}
|
||||
// add a flag to not completely full polyfills
|
||||
if (options.sham || (targetProperty && targetProperty.sham)) {
|
||||
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
||||
}
|
||||
// extend global
|
||||
redefine(target, key, sourceProperty, options);
|
||||
}
|
||||
};
|
||||
|
||||
// `IsArray` abstract operation
|
||||
// https://tc39.github.io/ecma262/#sec-isarray
|
||||
var isArray = Array.isArray || function isArray(arg) {
|
||||
return classofRaw(arg) == 'Array';
|
||||
};
|
||||
|
||||
// `ToObject` abstract operation
|
||||
// https://tc39.github.io/ecma262/#sec-toobject
|
||||
var toObject = function (argument) {
|
||||
return Object(requireObjectCoercible(argument));
|
||||
};
|
||||
|
||||
var createProperty = function (object, key, value) {
|
||||
var propertyKey = toPrimitive(key);
|
||||
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
||||
else object[propertyKey] = value;
|
||||
};
|
||||
|
||||
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
||||
// Chrome 38 Symbol has incorrect toString conversion
|
||||
// eslint-disable-next-line no-undef
|
||||
return !String(Symbol());
|
||||
});
|
||||
|
||||
var useSymbolAsUid = nativeSymbol
|
||||
// eslint-disable-next-line no-undef
|
||||
&& !Symbol.sham
|
||||
// eslint-disable-next-line no-undef
|
||||
&& typeof Symbol() == 'symbol';
|
||||
|
||||
var WellKnownSymbolsStore = shared('wks');
|
||||
var Symbol$1 = global_1.Symbol;
|
||||
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : uid;
|
||||
|
||||
var wellKnownSymbol = function (name) {
|
||||
if (!has(WellKnownSymbolsStore, name)) {
|
||||
if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name];
|
||||
else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
|
||||
} return WellKnownSymbolsStore[name];
|
||||
};
|
||||
|
||||
var SPECIES = wellKnownSymbol('species');
|
||||
|
||||
// `ArraySpeciesCreate` abstract operation
|
||||
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
||||
var arraySpeciesCreate = function (originalArray, length) {
|
||||
var C;
|
||||
if (isArray(originalArray)) {
|
||||
C = originalArray.constructor;
|
||||
// cross-realm fallback
|
||||
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
|
||||
else if (isObject(C)) {
|
||||
C = C[SPECIES];
|
||||
if (C === null) C = undefined;
|
||||
}
|
||||
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
||||
};
|
||||
|
||||
var userAgent = getBuiltIn('navigator', 'userAgent') || '';
|
||||
|
||||
var process = global_1.process;
|
||||
var versions = process && process.versions;
|
||||
var v8 = versions && versions.v8;
|
||||
var match, version;
|
||||
|
||||
if (v8) {
|
||||
match = v8.split('.');
|
||||
version = match[0] + match[1];
|
||||
} else if (userAgent) {
|
||||
match = userAgent.match(/Edge\/(\d+)/);
|
||||
if (!match || match[1] >= 74) {
|
||||
match = userAgent.match(/Chrome\/(\d+)/);
|
||||
if (match) version = match[1];
|
||||
}
|
||||
}
|
||||
|
||||
var v8Version = version && +version;
|
||||
|
||||
var SPECIES$1 = wellKnownSymbol('species');
|
||||
|
||||
var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
|
||||
// We can't use this feature detection in V8 since it causes
|
||||
// deoptimization and serious performance degradation
|
||||
// https://github.com/zloirock/core-js/issues/677
|
||||
return v8Version >= 51 || !fails(function () {
|
||||
var array = [];
|
||||
var constructor = array.constructor = {};
|
||||
constructor[SPECIES$1] = function () {
|
||||
return { foo: 1 };
|
||||
};
|
||||
return array[METHOD_NAME](Boolean).foo !== 1;
|
||||
});
|
||||
};
|
||||
|
||||
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
||||
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
||||
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
||||
|
||||
// We can't use this feature detection in V8 since it causes
|
||||
// deoptimization and serious performance degradation
|
||||
// https://github.com/zloirock/core-js/issues/679
|
||||
var IS_CONCAT_SPREADABLE_SUPPORT = v8Version >= 51 || !fails(function () {
|
||||
var array = [];
|
||||
array[IS_CONCAT_SPREADABLE] = false;
|
||||
return array.concat()[0] !== array;
|
||||
});
|
||||
|
||||
var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
|
||||
|
||||
var isConcatSpreadable = function (O) {
|
||||
if (!isObject(O)) return false;
|
||||
var spreadable = O[IS_CONCAT_SPREADABLE];
|
||||
return spreadable !== undefined ? !!spreadable : isArray(O);
|
||||
};
|
||||
|
||||
var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
|
||||
|
||||
// `Array.prototype.concat` method
|
||||
// https://tc39.github.io/ecma262/#sec-array.prototype.concat
|
||||
// with adding support of @@isConcatSpreadable and @@species
|
||||
_export({ target: 'Array', proto: true, forced: FORCED }, {
|
||||
concat: function concat(arg) { // eslint-disable-line no-unused-vars
|
||||
var O = toObject(this);
|
||||
var A = arraySpeciesCreate(O, 0);
|
||||
var n = 0;
|
||||
var i, k, length, len, E;
|
||||
for (i = -1, length = arguments.length; i < length; i++) {
|
||||
E = i === -1 ? O : arguments[i];
|
||||
if (isConcatSpreadable(E)) {
|
||||
len = toLength(E.length);
|
||||
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
||||
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
||||
} else {
|
||||
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
||||
createProperty(A, n++, E);
|
||||
}
|
||||
}
|
||||
A.length = n;
|
||||
return A;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Bootstrap Table Chinese translation
|
||||
* Author: Zhixin Wen<wenzhixin2010@gmail.com>
|
||||
*/
|
||||
|
||||
$.fn.bootstrapTable.locales['zh-CN'] = {
|
||||
formatLoadingMessage: function formatLoadingMessage() {
|
||||
return '正在努力地加载数据中,请稍候';
|
||||
},
|
||||
formatRecordsPerPage: function formatRecordsPerPage(pageNumber) {
|
||||
return "\u6BCF\u9875\u663E\u793A ".concat(pageNumber, " \u6761\u8BB0\u5F55");
|
||||
},
|
||||
formatShowingRows: function formatShowingRows(pageFrom, pageTo, totalRows, totalNotFiltered) {
|
||||
if (totalNotFiltered !== undefined && totalNotFiltered > 0 && totalNotFiltered > totalRows) {
|
||||
return "\u663E\u793A\u7B2C ".concat(pageFrom, " \u5230\u7B2C ").concat(pageTo, " \u6761\u8BB0\u5F55\uFF0C\u603B\u5171 ").concat(totalRows, " \u6761\u8BB0\u5F55\uFF08\u4ECE ").concat(totalNotFiltered, " \u603B\u8BB0\u5F55\u4E2D\u8FC7\u6EE4\uFF09");
|
||||
}
|
||||
|
||||
return "\u663E\u793A\u7B2C ".concat(pageFrom, " \u5230\u7B2C ").concat(pageTo, " \u6761\u8BB0\u5F55\uFF0C\u603B\u5171 ").concat(totalRows, " \u6761\u8BB0\u5F55");
|
||||
},
|
||||
formatSRPaginationPreText: function formatSRPaginationPreText() {
|
||||
return '上一页';
|
||||
},
|
||||
formatSRPaginationPageText: function formatSRPaginationPageText(page) {
|
||||
return "\u7B2C".concat(page, "\u9875");
|
||||
},
|
||||
formatSRPaginationNextText: function formatSRPaginationNextText() {
|
||||
return '下一页';
|
||||
},
|
||||
formatDetailPagination: function formatDetailPagination(totalRows) {
|
||||
return "\u603B\u5171 ".concat(totalRows, " \u6761\u8BB0\u5F55");
|
||||
},
|
||||
formatClearSearch: function formatClearSearch() {
|
||||
return '清空过滤';
|
||||
},
|
||||
formatSearch: function formatSearch() {
|
||||
return '搜索';
|
||||
},
|
||||
formatNoMatches: function formatNoMatches() {
|
||||
return '没有找到匹配的记录';
|
||||
},
|
||||
formatPaginationSwitch: function formatPaginationSwitch() {
|
||||
return '隐藏/显示分页';
|
||||
},
|
||||
formatPaginationSwitchDown: function formatPaginationSwitchDown() {
|
||||
return '显示分页';
|
||||
},
|
||||
formatPaginationSwitchUp: function formatPaginationSwitchUp() {
|
||||
return '隐藏分页';
|
||||
},
|
||||
formatRefresh: function formatRefresh() {
|
||||
return '刷新';
|
||||
},
|
||||
formatToggle: function formatToggle() {
|
||||
return '切换';
|
||||
},
|
||||
formatToggleOn: function formatToggleOn() {
|
||||
return '显示卡片视图';
|
||||
},
|
||||
formatToggleOff: function formatToggleOff() {
|
||||
return '隐藏卡片视图';
|
||||
},
|
||||
formatColumns: function formatColumns() {
|
||||
return '列';
|
||||
},
|
||||
formatColumnsToggleAll: function formatColumnsToggleAll() {
|
||||
return '切换所有';
|
||||
},
|
||||
formatFullscreen: function formatFullscreen() {
|
||||
return '全屏';
|
||||
},
|
||||
formatAllRows: function formatAllRows() {
|
||||
return '所有';
|
||||
},
|
||||
formatAutoRefresh: function formatAutoRefresh() {
|
||||
return '自动刷新';
|
||||
},
|
||||
formatExport: function formatExport() {
|
||||
return '导出数据';
|
||||
},
|
||||
formatJumpTo: function formatJumpTo() {
|
||||
return '跳转';
|
||||
},
|
||||
formatAdvancedSearch: function formatAdvancedSearch() {
|
||||
return '高级搜索';
|
||||
},
|
||||
formatAdvancedCloseButton: function formatAdvancedCloseButton() {
|
||||
return '关闭';
|
||||
},
|
||||
formatFilterControlSwitch: function formatFilterControlSwitch() {
|
||||
return '隐藏/显示过滤控制';
|
||||
},
|
||||
formatFilterControlSwitchHide: function formatFilterControlSwitchHide() {
|
||||
return '隐藏过滤控制';
|
||||
},
|
||||
formatFilterControlSwitchShow: function formatFilterControlSwitchShow() {
|
||||
return '显示过滤控制';
|
||||
}
|
||||
};
|
||||
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['zh-CN']);
|
||||
|
||||
})));
|
||||
|
||||
Vendored
+10
-1
File diff suppressed because one or more lines are too long
+5
-1
@@ -133,7 +133,7 @@
|
||||
if((!target.isFixWidth)&& column.width){
|
||||
target.isFixWidth = column.width.indexOf("px")>-1?true:false;
|
||||
}
|
||||
$th.text(column.title);
|
||||
$th.html(column.title);
|
||||
$thr.append($th);
|
||||
});
|
||||
var $thead = $('<thead class="treetable-thead"></thead>');
|
||||
@@ -167,6 +167,7 @@
|
||||
success: function(data, textStatus, jqXHR) {
|
||||
data = calculateObjectValue(options, options.responseHandler, [data], data);
|
||||
renderTable(data);
|
||||
calculateObjectValue(options, options.onLoadSuccess, [data], data);
|
||||
},
|
||||
error: function(xhr, textStatus) {
|
||||
var _errorMsg = '<tr><td colspan="' + options.columns.length + '"><div style="display: block;text-align: center;">' + xhr.responseText + '</div></td></tr>'
|
||||
@@ -738,6 +739,9 @@
|
||||
expanderCollapsedClass: 'glyphicon glyphicon-chevron-right', // 缩起的按钮的图标
|
||||
responseHandler: function(res) {
|
||||
return false;
|
||||
},
|
||||
onLoadSuccess: function(res) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
})(jQuery);
|
||||
@@ -1,127 +0,0 @@
|
||||
@charset "utf-8";
|
||||
.container {
|
||||
margin: 10px auto 0 auto;
|
||||
position: relative;
|
||||
font-family: 微软雅黑;
|
||||
font-size: 12px;
|
||||
}
|
||||
.container p {
|
||||
line-height: 12px;
|
||||
line-height: 0px;
|
||||
height: 0px;
|
||||
margin: 10px;
|
||||
color: #bbb
|
||||
}
|
||||
.action {
|
||||
width: 400px;
|
||||
height: 30px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
.cropped {
|
||||
position: absolute;
|
||||
left: 500px;
|
||||
top: 0;
|
||||
width: 200px;
|
||||
border: 1px #ddd solid;
|
||||
height: 450px;
|
||||
padding: 4px;
|
||||
box-shadow: 0px 0px 12px #ddd;
|
||||
text-align: center;
|
||||
}
|
||||
.imageBox {
|
||||
position: relative;
|
||||
height: 400px;
|
||||
width: 400px;
|
||||
border: 1px solid #aaa;
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
background-repeat: no-repeat;
|
||||
cursor: move;
|
||||
box-shadow: 4px 4px 12px #B0B0B0;
|
||||
}
|
||||
.imageBox .thumbBox {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
margin-top: -100px;
|
||||
margin-left: -100px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid rgb(102, 102, 102);
|
||||
box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.5);
|
||||
background: none repeat scroll 0% 0% transparent;
|
||||
}
|
||||
.imageBox .spinner {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
line-height: 400px;
|
||||
background: rgba(0,0,0,0.7);
|
||||
}
|
||||
.Btnsty_peyton{ float: right;
|
||||
width: 46px;
|
||||
display: inline-block;
|
||||
margin-bottom: 10px;
|
||||
height: 37px;
|
||||
line-height: 37px;
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
margin:0px 2px;
|
||||
background-color: #f38e81;
|
||||
border-radius: 3px;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
box-shadow: 0px 0px 5px #B0B0B0;
|
||||
border: 0px #fff solid;}
|
||||
/*选择文件上传*/
|
||||
.new-contentarea {
|
||||
width: 165px;
|
||||
overflow:hidden;
|
||||
margin: 0 auto;
|
||||
position:relative;float:left;
|
||||
}
|
||||
.new-contentarea label {
|
||||
width:100%;
|
||||
height:100%;
|
||||
display:block;
|
||||
}
|
||||
.new-contentarea input[type=file] {
|
||||
width:188px;
|
||||
height:60px;
|
||||
background:#333;
|
||||
margin: 0 auto;
|
||||
position:absolute;
|
||||
right:50%;
|
||||
margin-right:-94px;
|
||||
top:0;
|
||||
right/*\**/:0px\9;
|
||||
margin-right/*\**/:0px\9;
|
||||
width/*\**/:10px\9;
|
||||
opacity:0;
|
||||
filter:alpha(opacity=0);
|
||||
z-index:2;
|
||||
}
|
||||
a.upload-img{
|
||||
width:165px;
|
||||
display: inline-block;
|
||||
margin-bottom: 10px;
|
||||
height:37px;
|
||||
line-height: 37px;
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
background-color: #f38e81;
|
||||
border-radius: 3px;
|
||||
text-decoration:none;
|
||||
cursor:pointer;
|
||||
border: 0px #fff solid;
|
||||
box-shadow: 0px 0px 5px #B0B0B0;
|
||||
}
|
||||
a.upload-img:hover{
|
||||
background-color: #ec7e70;
|
||||
}
|
||||
|
||||
.tc{text-align:center;}
|
||||
@@ -1,136 +0,0 @@
|
||||
"use strict";
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(['jquery'], factory);
|
||||
} else {
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
var cropbox = function(options, el){
|
||||
var el = el || $(options.imageBox),
|
||||
obj =
|
||||
{
|
||||
state : {},
|
||||
ratio : 1,
|
||||
options : options,
|
||||
imageBox : el,
|
||||
thumbBox : el.find(options.thumbBox),
|
||||
spinner : el.find(options.spinner),
|
||||
image : new Image(),
|
||||
getDataURL: function ()
|
||||
{
|
||||
var width = this.thumbBox.width(),
|
||||
height = this.thumbBox.height(),
|
||||
canvas = document.createElement("canvas"),
|
||||
dim = el.css('background-position').split(' '),
|
||||
size = el.css('background-size').split(' '),
|
||||
dx = parseInt(dim[0]) - el.width()/2 + width/2,
|
||||
dy = parseInt(dim[1]) - el.height()/2 + height/2,
|
||||
dw = parseInt(size[0]),
|
||||
dh = parseInt(size[1]),
|
||||
sh = parseInt(this.image.height),
|
||||
sw = parseInt(this.image.width);
|
||||
|
||||
canvas.width = width;
|
||||
canvas.height = height;
|
||||
var context = canvas.getContext("2d");
|
||||
context.drawImage(this.image, 0, 0, sw, sh, dx, dy, dw, dh);
|
||||
var imageData = canvas.toDataURL('image/png');
|
||||
return imageData;
|
||||
},
|
||||
getBlob: function()
|
||||
{
|
||||
var imageData = this.getDataURL();
|
||||
var b64 = imageData.replace('data:image/png;base64,','');
|
||||
var binary = atob(b64);
|
||||
var array = [];
|
||||
for (var i = 0; i < binary.length; i++) {
|
||||
array.push(binary.charCodeAt(i));
|
||||
}
|
||||
return new Blob([new Uint8Array(array)], {type: 'image/png'});
|
||||
},
|
||||
zoomIn: function ()
|
||||
{
|
||||
this.ratio*=1.1;
|
||||
setBackground();
|
||||
},
|
||||
zoomOut: function ()
|
||||
{
|
||||
this.ratio*=0.9;
|
||||
setBackground();
|
||||
}
|
||||
},
|
||||
setBackground = function()
|
||||
{
|
||||
var w = parseInt(obj.image.width)*obj.ratio;
|
||||
var h = parseInt(obj.image.height)*obj.ratio;
|
||||
|
||||
var pw = (el.width() - w) / 2;
|
||||
var ph = (el.height() - h) / 2;
|
||||
|
||||
el.css({
|
||||
'background-image': 'url(' + obj.image.src + ')',
|
||||
'background-size': w +'px ' + h + 'px',
|
||||
'background-position': pw + 'px ' + ph + 'px',
|
||||
'background-repeat': 'no-repeat'});
|
||||
},
|
||||
imgMouseDown = function(e)
|
||||
{
|
||||
e.stopImmediatePropagation();
|
||||
|
||||
obj.state.dragable = true;
|
||||
obj.state.mouseX = e.clientX;
|
||||
obj.state.mouseY = e.clientY;
|
||||
},
|
||||
imgMouseMove = function(e)
|
||||
{
|
||||
e.stopImmediatePropagation();
|
||||
|
||||
if (obj.state.dragable)
|
||||
{
|
||||
var x = e.clientX - obj.state.mouseX;
|
||||
var y = e.clientY - obj.state.mouseY;
|
||||
|
||||
var bg = el.css('background-position').split(' ');
|
||||
|
||||
var bgX = x + parseInt(bg[0]);
|
||||
var bgY = y + parseInt(bg[1]);
|
||||
|
||||
el.css('background-position', bgX +'px ' + bgY + 'px');
|
||||
|
||||
obj.state.mouseX = e.clientX;
|
||||
obj.state.mouseY = e.clientY;
|
||||
}
|
||||
},
|
||||
imgMouseUp = function(e)
|
||||
{
|
||||
e.stopImmediatePropagation();
|
||||
obj.state.dragable = false;
|
||||
},
|
||||
zoomImage = function(e)
|
||||
{
|
||||
e.originalEvent.wheelDelta > 0 || e.originalEvent.detail < 0 ? obj.ratio*=1.1 : obj.ratio*=0.9;
|
||||
setBackground();
|
||||
}
|
||||
|
||||
obj.spinner.show();
|
||||
obj.image.onload = function() {
|
||||
obj.spinner.hide();
|
||||
setBackground();
|
||||
|
||||
el.bind('mousedown', imgMouseDown);
|
||||
el.bind('mousemove', imgMouseMove);
|
||||
$(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)});
|
||||
|
||||
return obj;
|
||||
};
|
||||
|
||||
jQuery.fn.cropbox = function(options){
|
||||
return new cropbox(options, this);
|
||||
};
|
||||
}));
|
||||
@@ -0,0 +1,304 @@
|
||||
/*!
|
||||
* Cropper.js v1.5.7
|
||||
* https://fengyuanchen.github.io/cropperjs
|
||||
*
|
||||
* Copyright 2015-present Chen Fengyuan
|
||||
* Released under the MIT license
|
||||
*
|
||||
* Date: 2020-05-23T05:22:57.283Z
|
||||
*/
|
||||
|
||||
.cropper-container {
|
||||
direction: ltr;
|
||||
font-size: 0;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.cropper-container img {
|
||||
display: block;
|
||||
height: 100%;
|
||||
image-orientation: 0deg;
|
||||
max-height: none !important;
|
||||
max-width: none !important;
|
||||
min-height: 0 !important;
|
||||
min-width: 0 !important;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.cropper-wrap-box,
|
||||
.cropper-canvas,
|
||||
.cropper-drag-box,
|
||||
.cropper-crop-box,
|
||||
.cropper-modal {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.cropper-wrap-box,
|
||||
.cropper-canvas {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.cropper-drag-box {
|
||||
background-color: #fff;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.cropper-modal {
|
||||
background-color: #000;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.cropper-view-box {
|
||||
display: block;
|
||||
height: 100%;
|
||||
outline: 1px solid #39f;
|
||||
outline-color: rgba(51, 153, 255, 0.75);
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.cropper-dashed {
|
||||
border: 0 dashed #eee;
|
||||
display: block;
|
||||
opacity: 0.5;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.cropper-dashed.dashed-h {
|
||||
border-bottom-width: 1px;
|
||||
border-top-width: 1px;
|
||||
height: calc(100% / 3);
|
||||
left: 0;
|
||||
top: calc(100% / 3);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.cropper-dashed.dashed-v {
|
||||
border-left-width: 1px;
|
||||
border-right-width: 1px;
|
||||
height: 100%;
|
||||
left: calc(100% / 3);
|
||||
top: 0;
|
||||
width: calc(100% / 3);
|
||||
}
|
||||
|
||||
.cropper-center {
|
||||
display: block;
|
||||
height: 0;
|
||||
left: 50%;
|
||||
opacity: 0.75;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.cropper-center::before,
|
||||
.cropper-center::after {
|
||||
background-color: #eee;
|
||||
content: ' ';
|
||||
display: block;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.cropper-center::before {
|
||||
height: 1px;
|
||||
left: -3px;
|
||||
top: 0;
|
||||
width: 7px;
|
||||
}
|
||||
|
||||
.cropper-center::after {
|
||||
height: 7px;
|
||||
left: 0;
|
||||
top: -3px;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.cropper-face,
|
||||
.cropper-line,
|
||||
.cropper-point {
|
||||
display: block;
|
||||
height: 100%;
|
||||
opacity: 0.1;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.cropper-face {
|
||||
background-color: #fff;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.cropper-line {
|
||||
background-color: #39f;
|
||||
}
|
||||
|
||||
.cropper-line.line-e {
|
||||
cursor: ew-resize;
|
||||
right: -3px;
|
||||
top: 0;
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
.cropper-line.line-n {
|
||||
cursor: ns-resize;
|
||||
height: 5px;
|
||||
left: 0;
|
||||
top: -3px;
|
||||
}
|
||||
|
||||
.cropper-line.line-w {
|
||||
cursor: ew-resize;
|
||||
left: -3px;
|
||||
top: 0;
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
.cropper-line.line-s {
|
||||
bottom: -3px;
|
||||
cursor: ns-resize;
|
||||
height: 5px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.cropper-point {
|
||||
background-color: #39f;
|
||||
height: 5px;
|
||||
opacity: 0.75;
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
.cropper-point.point-e {
|
||||
cursor: ew-resize;
|
||||
margin-top: -3px;
|
||||
right: -3px;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
.cropper-point.point-n {
|
||||
cursor: ns-resize;
|
||||
left: 50%;
|
||||
margin-left: -3px;
|
||||
top: -3px;
|
||||
}
|
||||
|
||||
.cropper-point.point-w {
|
||||
cursor: ew-resize;
|
||||
left: -3px;
|
||||
margin-top: -3px;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
.cropper-point.point-s {
|
||||
bottom: -3px;
|
||||
cursor: s-resize;
|
||||
left: 50%;
|
||||
margin-left: -3px;
|
||||
}
|
||||
|
||||
.cropper-point.point-ne {
|
||||
cursor: nesw-resize;
|
||||
right: -3px;
|
||||
top: -3px;
|
||||
}
|
||||
|
||||
.cropper-point.point-nw {
|
||||
cursor: nwse-resize;
|
||||
left: -3px;
|
||||
top: -3px;
|
||||
}
|
||||
|
||||
.cropper-point.point-sw {
|
||||
bottom: -3px;
|
||||
cursor: nesw-resize;
|
||||
left: -3px;
|
||||
}
|
||||
|
||||
.cropper-point.point-se {
|
||||
bottom: -3px;
|
||||
cursor: nwse-resize;
|
||||
height: 20px;
|
||||
opacity: 1;
|
||||
right: -3px;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.cropper-point.point-se {
|
||||
height: 15px;
|
||||
width: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
.cropper-point.point-se {
|
||||
height: 10px;
|
||||
width: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.cropper-point.point-se {
|
||||
height: 5px;
|
||||
opacity: 0.75;
|
||||
width: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.cropper-point.point-se::before {
|
||||
background-color: #39f;
|
||||
bottom: -50%;
|
||||
content: ' ';
|
||||
display: block;
|
||||
height: 200%;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
right: -50%;
|
||||
width: 200%;
|
||||
}
|
||||
|
||||
.cropper-invisible {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.cropper-bg {
|
||||
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC');
|
||||
}
|
||||
|
||||
.cropper-hide {
|
||||
display: block;
|
||||
height: 0;
|
||||
position: absolute;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.cropper-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.cropper-move {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.cropper-crop {
|
||||
cursor: crosshair;
|
||||
}
|
||||
|
||||
.cropper-disabled .cropper-drag-box,
|
||||
.cropper-disabled .cropper-face,
|
||||
.cropper-disabled .cropper-line,
|
||||
.cropper-disabled .cropper-point {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
/*!
|
||||
* Cropper.js v1.5.7
|
||||
* https://fengyuanchen.github.io/cropperjs
|
||||
*
|
||||
* Copyright 2015-present Chen Fengyuan
|
||||
* Released under the MIT license
|
||||
*
|
||||
* Date: 2020-05-23T05:22:57.283Z
|
||||
*/.cropper-container{direction:ltr;font-size:0;line-height:0;position:relative;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cropper-container img{display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-canvas,.cropper-crop-box,.cropper-drag-box,.cropper-modal,.cropper-wrap-box{bottom:0;left:0;position:absolute;right:0;top:0}.cropper-canvas,.cropper-wrap-box{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:1px solid #39f;outline-color:rgba(51,153,255,.75);overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:33.33333%;left:0;top:33.33333%;width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:33.33333%;top:0;width:33.33333%}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:after,.cropper-center:before{background-color:#eee;content:" ";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width:768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width:992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width:1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:" ";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC")}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,406 @@
|
||||
/*!
|
||||
* jQuery cxSelect
|
||||
* @name jquery.cxselect.js
|
||||
* @version 1.4.2
|
||||
* @date 2017-09-26
|
||||
* @author ciaoca
|
||||
* @email ciaoca@gmail.com
|
||||
* @site https://github.com/ciaoca/cxSelect
|
||||
* @license Released under the MIT license
|
||||
*/
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(['jquery'], factory);
|
||||
} else {
|
||||
factory(window.jQuery || window.Zepto || window.$);
|
||||
};
|
||||
}(function($) {
|
||||
var cxSelect = function() {
|
||||
var self = this;
|
||||
var dom, settings, callback;
|
||||
|
||||
// 分配参数
|
||||
for (var i = 0, l = arguments.length; i < l; i++) {
|
||||
if (cxSelect.isJquery(arguments[i]) || cxSelect.isZepto(arguments[i])) {
|
||||
dom = arguments[i];
|
||||
} else if (cxSelect.isElement(arguments[i])) {
|
||||
dom = $(arguments[i]);
|
||||
} else if (typeof arguments[i] === 'function') {
|
||||
callback = arguments[i];
|
||||
} else if (typeof arguments[i] === 'object') {
|
||||
settings = arguments[i];
|
||||
};
|
||||
};
|
||||
|
||||
var api = new cxSelect.init(dom, settings);
|
||||
|
||||
if (typeof callback === 'function') {
|
||||
callback(api);
|
||||
};
|
||||
|
||||
return api;
|
||||
};
|
||||
|
||||
cxSelect.isElement = function(o){
|
||||
if (o && (typeof HTMLElement === 'function' || typeof HTMLElement === 'object') && o instanceof HTMLElement) {
|
||||
return true;
|
||||
} else {
|
||||
return (o && o.nodeType && o.nodeType === 1) ? true : false;
|
||||
};
|
||||
};
|
||||
|
||||
cxSelect.isJquery = function(o){
|
||||
return (o && o.length && (typeof jQuery === 'function' || typeof jQuery === 'object') && o instanceof jQuery) ? true : false;
|
||||
};
|
||||
|
||||
cxSelect.isZepto = function(o){
|
||||
return (o && o.length && (typeof Zepto === 'function' || typeof Zepto === 'object') && Zepto.zepto.isZ(o)) ? true : false;
|
||||
};
|
||||
|
||||
cxSelect.getIndex = function(n, required) {
|
||||
return required ? n : n - 1;
|
||||
};
|
||||
|
||||
cxSelect.getData = function(data, space) {
|
||||
if (typeof space === 'string' && space.length) {
|
||||
space = space.split('.');
|
||||
for (var i = 0, l = space.length; i < l; i++) {
|
||||
data = data[space[i]];
|
||||
};
|
||||
};
|
||||
return data;
|
||||
};
|
||||
|
||||
cxSelect.init = function(dom, settings) {
|
||||
var self = this;
|
||||
|
||||
if (!cxSelect.isJquery(dom) && !cxSelect.isZepto(dom)) {return};
|
||||
|
||||
var theSelect = {
|
||||
dom: {
|
||||
box: dom
|
||||
}
|
||||
};
|
||||
|
||||
self.attach = cxSelect.attach.bind(theSelect);
|
||||
self.detach = cxSelect.detach.bind(theSelect);
|
||||
self.setOptions = cxSelect.setOptions.bind(theSelect);
|
||||
self.clear = cxSelect.clear.bind(theSelect);
|
||||
|
||||
theSelect.changeEvent = function() {
|
||||
cxSelect.selectChange.call(theSelect, this.className);
|
||||
};
|
||||
|
||||
theSelect.settings = $.extend({}, $.cxSelect.defaults, settings, {
|
||||
url: theSelect.dom.box.data('url'),
|
||||
emptyStyle: theSelect.dom.box.data('emptyStyle'),
|
||||
required: theSelect.dom.box.data('required'),
|
||||
firstTitle: theSelect.dom.box.data('firstTitle'),
|
||||
firstValue: theSelect.dom.box.data('firstValue'),
|
||||
jsonSpace: theSelect.dom.box.data('jsonSpace'),
|
||||
jsonName: theSelect.dom.box.data('jsonName'),
|
||||
jsonValue: theSelect.dom.box.data('jsonValue'),
|
||||
jsonSub: theSelect.dom.box.data('jsonSub')
|
||||
});
|
||||
|
||||
var _dataSelects = theSelect.dom.box.data('selects');
|
||||
|
||||
if (typeof _dataSelects === 'string' && _dataSelects.length) {
|
||||
theSelect.settings.selects = _dataSelects.split(',');
|
||||
};
|
||||
|
||||
self.setOptions();
|
||||
self.attach();
|
||||
|
||||
// 使用独立接口获取数据
|
||||
if (!theSelect.settings.url && !theSelect.settings.data) {
|
||||
cxSelect.start.apply(theSelect);
|
||||
|
||||
// 设置自定义数据
|
||||
} else if ($.isArray(theSelect.settings.data)) {
|
||||
cxSelect.start.call(theSelect, theSelect.settings.data);
|
||||
|
||||
// 设置 URL,通过 Ajax 获取数据
|
||||
} else if (typeof theSelect.settings.url === 'string' && theSelect.settings.url.length) {
|
||||
$.getJSON(theSelect.settings.url, function(json) {
|
||||
cxSelect.start.call(theSelect, json);
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
// 设置参数
|
||||
cxSelect.setOptions = function(opts) {
|
||||
var self = this;
|
||||
|
||||
if (opts) {
|
||||
$.extend(self.settings, opts);
|
||||
};
|
||||
|
||||
// 初次或重设选择器组
|
||||
if (!$.isArray(self.selectArray) || !self.selectArray.length || (opts && opts.selects)) {
|
||||
self.selectArray = [];
|
||||
|
||||
if ($.isArray(self.settings.selects) && self.settings.selects.length) {
|
||||
var _tempSelect;
|
||||
|
||||
for (var i = 0, l = self.settings.selects.length; i < l; i++) {
|
||||
_tempSelect = self.dom.box.find('select.' + self.settings.selects[i]);
|
||||
|
||||
if (!_tempSelect || !_tempSelect.length) {break};
|
||||
|
||||
self.selectArray.push(_tempSelect);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (opts) {
|
||||
if (!$.isArray(opts.data) && typeof opts.url === 'string' && opts.url.length) {
|
||||
$.getJSON(self.settings.url, function(json) {
|
||||
cxSelect.start.call(self, json);
|
||||
});
|
||||
|
||||
} else {
|
||||
cxSelect.start.call(self, opts.data);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// 绑定
|
||||
cxSelect.attach = function() {
|
||||
var self = this;
|
||||
|
||||
if (!self.attachStatus) {
|
||||
self.dom.box.on('change', 'select', self.changeEvent);
|
||||
};
|
||||
|
||||
if (typeof self.attachStatus === 'boolean') {
|
||||
cxSelect.start.call(self);
|
||||
};
|
||||
|
||||
self.attachStatus = true;
|
||||
};
|
||||
|
||||
// 移除绑定
|
||||
cxSelect.detach = function() {
|
||||
var self = this;
|
||||
self.dom.box.off('change', 'select', self.changeEvent);
|
||||
self.attachStatus = false;
|
||||
};
|
||||
|
||||
// 清空选项
|
||||
cxSelect.clear = function(index) {
|
||||
var self = this;
|
||||
var _style = {
|
||||
display: '',
|
||||
visibility: ''
|
||||
};
|
||||
|
||||
index = isNaN(index) ? 0 : index;
|
||||
|
||||
// 清空后面的 select
|
||||
for (var i = index, l = self.selectArray.length; i < l; i++) {
|
||||
self.selectArray[i].empty().prop('disabled', true);
|
||||
|
||||
if (self.settings.emptyStyle === 'none') {
|
||||
_style.display = 'none';
|
||||
} else if (self.settings.emptyStyle === 'hidden') {
|
||||
_style.visibility = 'hidden';
|
||||
};
|
||||
|
||||
self.selectArray[i].css(_style);
|
||||
};
|
||||
};
|
||||
|
||||
cxSelect.start = function(data) {
|
||||
var self = this;
|
||||
|
||||
if ($.isArray(data)) {
|
||||
self.settings.data = cxSelect.getData(data, self.settings.jsonSpace);
|
||||
};
|
||||
|
||||
if (!self.selectArray.length) {return};
|
||||
|
||||
// 保存默认值
|
||||
for (var i = 0, l = self.selectArray.length; i < l; i++) {
|
||||
if (typeof self.selectArray[i].attr('data-value') !== 'string' && self.selectArray[i][0].options.length) {
|
||||
self.selectArray[i].attr('data-value', self.selectArray[i].val());
|
||||
};
|
||||
};
|
||||
|
||||
if (self.settings.data || (typeof self.selectArray[0].data('url') === 'string' && self.selectArray[0].data('url').length)) {
|
||||
cxSelect.getOptionData.call(self, 0);
|
||||
} else if (self.selectArray[0][0].options.length && typeof self.selectArray[0].attr('data-value') === 'string' && self.selectArray[0].attr('data-value').length) {
|
||||
self.selectArray[0].val(self.selectArray[0].attr('data-value'));
|
||||
cxSelect.getOptionData.call(self, 1);
|
||||
} else {
|
||||
self.selectArray[0].prop('disabled', false).css({
|
||||
'display': '',
|
||||
'visibility': ''
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
// 获取选项数据
|
||||
cxSelect.getOptionData = function(index) {
|
||||
var self = this;
|
||||
|
||||
if (typeof index !== 'number' || isNaN(index) || index < 0 || index >= self.selectArray.length) {return};
|
||||
|
||||
var _indexPrev = index - 1;
|
||||
var _select = self.selectArray[index];
|
||||
var _selectData;
|
||||
var _valueIndex;
|
||||
var _dataUrl = _select.data('url');
|
||||
var _jsonSpace = typeof _select.data('jsonSpace') === 'undefined' ? self.settings.jsonSpace : _select.data('jsonSpace');
|
||||
var _query = {};
|
||||
var _queryName;
|
||||
var _selectName;
|
||||
var _selectValue;
|
||||
|
||||
cxSelect.clear.call(self, index);
|
||||
|
||||
// 使用独立接口
|
||||
if (typeof _dataUrl === 'string' && _dataUrl.length) {
|
||||
if (index > 0) {
|
||||
for (var i = 0, j = 1; i < index; i++, j++) {
|
||||
_queryName = self.selectArray[j].data('queryName');
|
||||
_selectName = self.selectArray[i].attr('name');
|
||||
_selectValue = self.selectArray[i].val();
|
||||
|
||||
if (typeof _queryName === 'string' && _queryName.length) {
|
||||
_query[_queryName] = _selectValue;
|
||||
} else if (typeof _selectName === 'string' && _selectName.length) {
|
||||
_query[_selectName] = _selectValue;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
$.getJSON(_dataUrl, _query, function(json) {
|
||||
_selectData = cxSelect.getData(json, _jsonSpace);
|
||||
|
||||
cxSelect.buildOption.call(self, index, _selectData);
|
||||
});
|
||||
|
||||
// 使用整合数据
|
||||
} else if (self.settings.data && typeof self.settings.data === 'object') {
|
||||
_selectData = self.settings.data;
|
||||
|
||||
for (var i = 0; i < index; i++) {
|
||||
_valueIndex = cxSelect.getIndex(self.selectArray[i][0].selectedIndex, typeof self.selectArray[i].data('required') === 'boolean' ? self.selectArray[i].data('required') : self.settings.required);
|
||||
|
||||
if (typeof _selectData[_valueIndex] === 'object' && $.isArray(_selectData[_valueIndex][self.settings.jsonSub]) && _selectData[_valueIndex][self.settings.jsonSub].length) {
|
||||
_selectData = _selectData[_valueIndex][self.settings.jsonSub];
|
||||
} else {
|
||||
_selectData = null;
|
||||
break;
|
||||
};
|
||||
};
|
||||
|
||||
cxSelect.buildOption.call(self, index, _selectData);
|
||||
};
|
||||
};
|
||||
|
||||
// 构建选项列表
|
||||
cxSelect.buildOption = function(index, data) {
|
||||
var self = this;
|
||||
|
||||
var _select = self.selectArray[index];
|
||||
var _required = typeof _select.data('required') === 'boolean' ? _select.data('required') : self.settings.required;
|
||||
var _firstTitle = typeof _select.data('firstTitle') === 'undefined' ? self.settings.firstTitle : _select.data('firstTitle');
|
||||
var _firstValue = typeof _select.data('firstValue') === 'undefined' ? self.settings.firstValue : _select.data('firstValue');
|
||||
var _jsonName = typeof _select.data('jsonName') === 'undefined' ? self.settings.jsonName : _select.data('jsonName');
|
||||
var _jsonValue = typeof _select.data('jsonValue') === 'undefined' ? self.settings.jsonValue : _select.data('jsonValue');
|
||||
|
||||
if (!$.isArray(data)) {return};
|
||||
|
||||
var _html = !_required ? '<option value="' + String(_firstValue) + '">' + String(_firstTitle) + '</option>' : '';
|
||||
|
||||
// 区分标题、值的数据
|
||||
if (typeof _jsonName === 'string' && _jsonName.length) {
|
||||
// 无值字段时使用标题作为值
|
||||
if (typeof _jsonValue !== 'string' || !_jsonValue.length) {
|
||||
_jsonValue = _jsonName;
|
||||
};
|
||||
|
||||
for (var i = 0, l = data.length; i < l; i++) {
|
||||
_html += '<option value="' + String(data[i][_jsonValue]) + '">' + String(data[i][_jsonName]) + '</option>';
|
||||
};
|
||||
|
||||
// 数组即为值的数据
|
||||
} else {
|
||||
for (var i = 0, l = data.length; i < l; i++) {
|
||||
_html += '<option value="' + String(data[i]) + '">' + String(data[i]) + '</option>';
|
||||
};
|
||||
};
|
||||
|
||||
_select.html(_html).prop('disabled', false).css({
|
||||
'display': '',
|
||||
'visibility': ''
|
||||
});
|
||||
|
||||
// 初次加载设置默认值
|
||||
if (typeof _select.attr('data-value') === 'string') {
|
||||
_select.val(String(_select.attr('data-value'))).removeAttr('data-value');
|
||||
|
||||
if (_select[0].selectedIndex < 0) {
|
||||
_select[0].options[0].selected = true;
|
||||
};
|
||||
};
|
||||
|
||||
if (_required || _select[0].selectedIndex > 0) {
|
||||
_select.trigger('change');
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
// 改变选择时的处理
|
||||
cxSelect.selectChange = function(name) {
|
||||
var self = this;
|
||||
|
||||
if (typeof name !== 'string' || !name.length) {return};
|
||||
|
||||
var index;
|
||||
|
||||
name = name.replace(/\s+/g, ',');
|
||||
name = ',' + name + ',';
|
||||
|
||||
// 获取当前 select 位置
|
||||
for (var i = 0, l = self.selectArray.length; i < l; i++) {
|
||||
if (name.indexOf(',' + self.settings.selects[i] + ',') > -1) {
|
||||
index = i;
|
||||
break;
|
||||
};
|
||||
};
|
||||
|
||||
if (typeof index === 'number' && index > -1) {
|
||||
index += 1;
|
||||
cxSelect.getOptionData.call(self, index);
|
||||
};
|
||||
};
|
||||
|
||||
$.cxSelect = function() {
|
||||
return cxSelect.apply(this, arguments);
|
||||
};
|
||||
|
||||
// 默认值
|
||||
$.cxSelect.defaults = {
|
||||
selects: [], // 下拉选框组
|
||||
url: null, // 列表数据文件路径(URL)或数组数据
|
||||
data: null, // 自定义数据
|
||||
emptyStyle: null, // 无数据状态显示方式
|
||||
required: false, // 是否为必选
|
||||
firstTitle: '请选择', // 第一个选项的标题
|
||||
firstValue: '', // 第一个选项的值
|
||||
jsonSpace: '', // 数据命名空间
|
||||
jsonName: 'n', // 数据标题字段名称
|
||||
jsonValue: '', // 数据值字段名称
|
||||
jsonSub: 's' // 子集数据字段名称
|
||||
};
|
||||
|
||||
$.fn.cxSelect = function(settings, callback) {
|
||||
this.each(function(i) {
|
||||
$.cxSelect(this, settings, callback);
|
||||
});
|
||||
return this;
|
||||
};
|
||||
}));
|
||||
+11
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -144,4 +144,18 @@ body.signin {
|
||||
font-weight: normal; /*改变了rememberme的字体*/
|
||||
margin-bottom: 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.form-control, .form-control:focus, .has-error .form-control:focus, .has-success .form-control:focus, .has-warning .form-control:focus, .navbar-collapse, .navbar-form, .navbar-form-custom .form-control:focus, .navbar-form-custom .form-control:hover, .open .btn.dropdown-toggle, .panel, .popover, .progress, .progress-bar {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.form-control{
|
||||
border-radius: 1px!important;
|
||||
padding: 6px 12px!important;
|
||||
height: 34px!important;
|
||||
}
|
||||
|
||||
.form-control:focus{
|
||||
border-color: #1ab394 !important;
|
||||
}
|
||||
+1
-1
@@ -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;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}.form-control,.form-control:focus,.has-error .form-control:focus,.has-success .form-control:focus,.has-warning .form-control:focus,.navbar-collapse,.navbar-form,.navbar-form-custom .form-control:focus,.navbar-form-custom .form-control:hover,.open .btn.dropdown-toggle,.panel,.popover,.progress,.progress-bar{box-shadow:none}.form-control{border-radius:1px!important;padding:6px 12px!important;height:34px!important}.form-control:focus{border-color:#1ab394!important}
|
||||
@@ -927,6 +927,7 @@
|
||||
.theme-blue.skin-blue .navbar-default .nav>li.selected>a,
|
||||
.theme-blue.skin-blue .navbar-default .nav>li.selected>a:focus {
|
||||
background-color: #1890ff;
|
||||
color: rgba(255,255,255,1);
|
||||
}
|
||||
|
||||
.theme-blue.skin-green .navbar-default .nav>li.active>a {
|
||||
|
||||
@@ -865,7 +865,7 @@ body.canvas-menu.mini-navbar nav.navbar-static-side {
|
||||
color: #cacaca;
|
||||
}
|
||||
|
||||
.form-control, .form-control:focus, .has-error .form-control:focus, .has-success .form-control:focus, .has-warning .form-control:focus, .navbar-collapse, .navbar-form, .navbar-form-custom .form-control:focus, .navbar-form-custom .form-control:hover, .open .btn.dropdown-toggle, .panel, .popover, .progress, .progress-bar {
|
||||
.form-control, .has-error .form-control:focus, .has-success .form-control:focus, .has-warning .form-control:focus, .navbar-collapse, .navbar-form, .navbar-form-custom .form-control:focus, .navbar-form-custom .form-control:hover, .open .btn.dropdown-toggle, .panel, .popover, .progress, .progress-bar {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
@@ -1818,18 +1818,23 @@ table.dataTable thead .sorting:after {
|
||||
.form-control, .single-line {
|
||||
background: #FFFFFF none;
|
||||
border: 1px solid #e5e6e7;
|
||||
border-radius: 1px;
|
||||
border-radius: 4px;
|
||||
color: inherit;
|
||||
display: block;
|
||||
padding: 6px 12px;
|
||||
padding: 3px 6px 4px;
|
||||
-webkit-transition: border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s;
|
||||
transition: border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s;
|
||||
width: 100%;
|
||||
height: 31px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.form-control.kv-fileinput-caption {
|
||||
height: 34px!important;
|
||||
}
|
||||
|
||||
.form-control:focus, .single-line:focus {
|
||||
border-color: #1ab394 !important;
|
||||
border-color: #3c8dbc !important;
|
||||
}
|
||||
|
||||
.has-success .form-control {
|
||||
@@ -1858,8 +1863,8 @@ table.dataTable thead .sorting:after {
|
||||
|
||||
.input-group-addon {
|
||||
background-color: #fff;
|
||||
border: 1px solid #E5E6E7;
|
||||
border-radius: 1px;
|
||||
border: 1px solid #e5e6e7;
|
||||
border-radius: 4px;
|
||||
color: inherit;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
@@ -4916,13 +4921,14 @@ dd.project-people {
|
||||
font-size: 10px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
/* Chat view */
|
||||
.message-input {
|
||||
height: 90px !important;
|
||||
}
|
||||
|
||||
.chat-avatar {
|
||||
white: 36px;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
@@ -4949,9 +4955,10 @@ dd.project-people {
|
||||
margin-left: -30px;
|
||||
}
|
||||
|
||||
@media ( max-width : 992px) {
|
||||
.chat-users, .chat-statistic {
|
||||
margin-left: 0px;
|
||||
@media (max-width: 992px) {
|
||||
.chat-users,
|
||||
.chat-statistic {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4971,12 +4978,12 @@ dd.project-people {
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.chat-discussion .chat-message:nth-child(2n+1) .message-avatar {
|
||||
.chat-discussion .chat-message.left .message-avatar {
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.chat-discussion .chat-message:nth-child(2n) .message-avatar {
|
||||
.chat-discussion .chat-message.right .message-avatar {
|
||||
float: right;
|
||||
margin-left: 10px;
|
||||
}
|
||||
@@ -4991,20 +4998,20 @@ dd.project-people {
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.chat-discussion .chat-message:nth-child(2n+1) .message-date {
|
||||
.chat-discussion .chat-message.left .message-date {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.chat-discussion .chat-message:nth-child(2n) .message-date {
|
||||
.chat-discussion .chat-message.right .message-date {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.chat-discussion .chat-message:nth-child(2n+1) .message {
|
||||
.chat-discussion .chat-message.left .message {
|
||||
text-align: left;
|
||||
margin-left: 55px;
|
||||
}
|
||||
|
||||
.chat-discussion .chat-message:nth-child(2n) .message {
|
||||
.chat-discussion .chat-message.right .message {
|
||||
text-align: right;
|
||||
margin-right: 55px;
|
||||
}
|
||||
@@ -5033,6 +5040,7 @@ dd.project-people {
|
||||
.chat-message-form .form-group {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* jsTree */
|
||||
.jstree-open>.jstree-anchor>.fa-folder:before {
|
||||
content: "\f07c";
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 4.0 KiB |
File diff suppressed because one or more lines are too long
+3
-3
File diff suppressed because one or more lines are too long
@@ -330,7 +330,7 @@
|
||||
label.error {
|
||||
position: absolute;
|
||||
right: 18px;
|
||||
top: 10px;
|
||||
top: 6px;
|
||||
color: #ef392b;
|
||||
font-size: 12px;
|
||||
z-index:99;
|
||||
@@ -346,7 +346,7 @@ label.error {
|
||||
right: 3px
|
||||
}
|
||||
|
||||
.Validform_error,input.error,select.error {
|
||||
.Validform_error,input.error,textarea.error,select.error {
|
||||
background-color: #fbe2e2;
|
||||
border-color: #c66161;
|
||||
color: #c00
|
||||
@@ -647,7 +647,7 @@ label {
|
||||
.select-list li p, .select-list li label:not(.radio-box){
|
||||
float: left;
|
||||
width: 65px;
|
||||
margin: 5px 5px 5px 0px;
|
||||
margin: 5px 0px 0px 0px;
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
@@ -681,11 +681,11 @@ label {
|
||||
|
||||
.bootstrap-select.form-control .btn-default {
|
||||
color: inherit;
|
||||
padding: 6px 12px;
|
||||
border-radius: 1px;
|
||||
padding: 4px 6px 4px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #e5e6e7;
|
||||
outline: none;
|
||||
height: 34px;
|
||||
height: 31px;
|
||||
background: #FFFFFF none
|
||||
}
|
||||
|
||||
@@ -813,17 +813,21 @@ label {
|
||||
min-height: 75%;
|
||||
}
|
||||
|
||||
.table-striped .bootstrap-table {
|
||||
.table-striped .bootstrap-table, .table-striped .table-bordered {
|
||||
border: 0px!important;
|
||||
}
|
||||
|
||||
.table-bordered .table>thead>tr>th, .table-bordered .table>tbody>tr>th {
|
||||
font-weight: normal;
|
||||
font-size: 13px
|
||||
}
|
||||
|
||||
.table-striped table>thead>tr>th, .table-striped table>tbody>tr>th, .table-striped table>tfoot>tr>th, .table-striped table>thead>tr>td, .table-striped table>tbody>tr>td, .table-striped table>tfoot>tr>td {
|
||||
border-bottom: 1px solid #e7eaec!important;
|
||||
background-color: transparent;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
|
||||
.table-bordered table>thead>tr>th:first-child, .table-bordered table>tbody>tr>td:first-child {
|
||||
border-left: 1px solid #ddd;
|
||||
}
|
||||
@@ -848,12 +852,10 @@ label {
|
||||
.table-striped .table>thead>tr>th, .table-striped .table>tbody>tr>th {
|
||||
border-bottom: 1px solid #ccc!important;
|
||||
border-top: 0px!important;
|
||||
}
|
||||
|
||||
.table-striped .table>thead:first-child>tr:first-child>th {
|
||||
font-weight: normal;
|
||||
font-size: 13px
|
||||
}
|
||||
|
||||
.table-striped table thead {
|
||||
background-color: #eff3f8;
|
||||
}
|
||||
@@ -867,39 +869,35 @@ label {
|
||||
}
|
||||
|
||||
/** 表格冻结列样式 **/
|
||||
.left-fixed-table-columns, .left-fixed-body-columns {
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
display: none;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
.fixed-columns, .fixed-columns-right {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.left-fixed-table-columns .table, .left-fixed-body-columns .table {
|
||||
border-right: 1px solid #ddd;
|
||||
.fixed-columns {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.left-fixed-table-columns .table.table-no-bordered, .left-fixed-body-columns .table.table-no-bordered {
|
||||
border-right: 1px solid transparent;
|
||||
.fixed-columns .fixed-table-body {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
.left-fixed-body-columns table {
|
||||
position: absolute;
|
||||
animation: none;
|
||||
.fixed-columns-right {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.fixed-columns-right .fixed-table-body {
|
||||
overflow-x: hidden !important;
|
||||
}
|
||||
|
||||
.bootstrap-table .table-hover > tbody > tr.hover > td {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.right-fixed-table-columns{
|
||||
position: absolute;
|
||||
right:63px;
|
||||
border-left:1px solid #ddd;
|
||||
display: none;
|
||||
z-index:100;
|
||||
}
|
||||
|
||||
/** 表格树样式 **/
|
||||
.bootstrap-tree-table .treetable-indent {width:16px; height: 16px; display: inline-block; position: relative;}
|
||||
.bootstrap-tree-table .treetable-expander {width:16px; height: 16px; display: inline-block; position: relative; cursor: pointer;}
|
||||
@@ -1004,7 +1002,7 @@ label {
|
||||
}
|
||||
|
||||
/** 表格选中样式 **/
|
||||
.fixed-table-container .selected {
|
||||
.bootstrap-table .fixed-table-container .table tbody tr.selected td {
|
||||
background-color: #E8F7FD;
|
||||
color: #1890ff;
|
||||
}
|
||||
@@ -1058,13 +1056,37 @@ label {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
/* 设置滚动条样式 */
|
||||
::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 10px;
|
||||
background-color: #F5F5F5;
|
||||
width:10px!important;
|
||||
height:10px!important;
|
||||
-webkit-appearance:none;
|
||||
background:#f1f1f1
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 6px;
|
||||
background-color: #999;
|
||||
}
|
||||
height:5px;
|
||||
border:1px solid transparent;
|
||||
border-top:0;
|
||||
border-bottom:0;
|
||||
border-radius:6px;
|
||||
background-color:#ccc;
|
||||
background-clip:padding-box
|
||||
}
|
||||
|
||||
/* 设置placeholder样式 */
|
||||
::-webkit-input-placeholder {
|
||||
color: #b3b3b3!important;
|
||||
}
|
||||
|
||||
:-moz-placeholder {
|
||||
color: #b3b3b3!important;
|
||||
}
|
||||
|
||||
::-moz-placeholder {
|
||||
color: #b3b3b3!important;
|
||||
}
|
||||
|
||||
:-ms-input-placeholder {
|
||||
color: #b3b3b3!important;
|
||||
}
|
||||
|
||||
@@ -7,19 +7,18 @@ layer.config({
|
||||
skin: 'layer-ext-moon'
|
||||
});
|
||||
|
||||
var isMobile = $.common.isMobile() || $(window).width() < 769;
|
||||
var isMobile = false;
|
||||
var sidebarHeight = isMobile ? '100%' : '96%';
|
||||
|
||||
$(function() {
|
||||
// MetsiMenu
|
||||
$('#side-menu').metisMenu();
|
||||
|
||||
// 固定菜单栏
|
||||
$(function() {
|
||||
$('.sidebar-collapse').slimScroll({
|
||||
height: '96%',
|
||||
railOpacity: 0.9,
|
||||
alwaysVisible: false
|
||||
});
|
||||
$('.sidebar-collapse').slimScroll({
|
||||
height: sidebarHeight,
|
||||
railOpacity: 0.9,
|
||||
alwaysVisible: false
|
||||
});
|
||||
|
||||
// 菜单切换
|
||||
@@ -31,12 +30,12 @@ $(function() {
|
||||
}
|
||||
SmoothlyMenu();
|
||||
});
|
||||
|
||||
|
||||
$('#side-menu>li').click(function() {
|
||||
if ($('body').hasClass('canvas-menu mini-navbar')) {
|
||||
NavToggle();
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
$('#side-menu>li li a:not(:has(span))').click(function() {
|
||||
if ($(window).width() < 769) {
|
||||
@@ -53,15 +52,39 @@ $(function() {
|
||||
|
||||
});
|
||||
|
||||
$(window).bind("load resize",
|
||||
function() {
|
||||
if ($(this).width() < 769) {
|
||||
$(window).bind("load resize", function() {
|
||||
isMobile = $.common.isMobile() || $(window).width() < 769;
|
||||
if (isMobile) {
|
||||
$('body').addClass('canvas-menu');
|
||||
$("body").removeClass("mini-navbar");
|
||||
$("nav .logo").addClass("hide");
|
||||
$(".slimScrollDiv").css({ "overflow":"hidden" })
|
||||
$(".slimScrollDiv").css({ "overflow": "hidden" });
|
||||
$('.navbar-static-side').fadeOut();
|
||||
} else {
|
||||
if($('body').hasClass('canvas-menu')) {
|
||||
$('body').addClass('fixed-sidebar');
|
||||
$('body').removeClass('canvas-menu');
|
||||
$("body").removeClass("mini-navbar");
|
||||
$("nav .logo").removeClass("hide");
|
||||
$(".slimScrollDiv").css({ "overflow": "visible" });
|
||||
$('.navbar-static-side').fadeIn();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function syncMenuTab(dataId) {
|
||||
if(isLinkage) {
|
||||
var $dataObj = $('a[href$="' + decodeURI(dataId) + '"]');
|
||||
if ($dataObj.attr("class") != null && !$dataObj.hasClass("noactive")) {
|
||||
$('.nav ul').removeClass("in");
|
||||
$dataObj.parents("ul").addClass("in")
|
||||
$dataObj.parents("li").addClass("active").siblings().removeClass("active").find('li').removeClass("active");
|
||||
$dataObj.parents("ul").css('height', 'auto').height();
|
||||
$dataObj.click();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function NavToggle() {
|
||||
$('.navbar-minimalize').trigger('click');
|
||||
}
|
||||
@@ -104,11 +127,12 @@ $(function() {
|
||||
});
|
||||
return width;
|
||||
}
|
||||
|
||||
|
||||
// 激活指定选项卡
|
||||
function setActiveTab(element) {
|
||||
if (!$(element).hasClass('active')) {
|
||||
var currentId = $(element).data('id');
|
||||
syncMenuTab(currentId);
|
||||
// 显示tab对应的内容区
|
||||
$('.RuoYi_iframe').each(function() {
|
||||
if ($(this).data('id') == currentId) {
|
||||
@@ -229,9 +253,17 @@ $(function() {
|
||||
dataIndex = $(this).data('index'),
|
||||
menuName = $.trim($(this).text()),
|
||||
flag = true;
|
||||
$(".nav ul li, .nav li").removeClass("selected");
|
||||
$(this).parent("li").addClass("selected");
|
||||
setIframeUrl($(this).attr("href"));
|
||||
|
||||
var $dataObj = $('a[href$="' + decodeURI(dataUrl) + '"]');
|
||||
if (!$dataObj.hasClass("noactive")) {
|
||||
$('.nav ul').removeClass("in");
|
||||
$dataObj.parents("ul").addClass("in")
|
||||
$dataObj.parents("li").addClass("active").siblings().removeClass("active").find('li').removeClass("active");
|
||||
$dataObj.parents("ul").css('height', 'auto').height();
|
||||
$(".nav ul li, .nav li").removeClass("selected");
|
||||
$(this).parent("li").addClass("selected");
|
||||
}
|
||||
setIframeUrl(dataUrl);
|
||||
if (dataUrl == undefined || $.trim(dataUrl).length == 0) return false;
|
||||
|
||||
// 选项卡菜单已存在
|
||||
@@ -260,20 +292,20 @@ $(function() {
|
||||
// 添加选项卡对应的iframe
|
||||
var str1 = '<iframe class="RuoYi_iframe" name="iframe' + dataIndex + '" width="100%" height="100%" src="' + dataUrl + '" frameborder="0" data-id="' + dataUrl + '" seamless></iframe>';
|
||||
$('.mainContent').find('iframe.RuoYi_iframe').hide().parents('.mainContent').append(str1);
|
||||
|
||||
|
||||
$.modal.loading("数据加载中,请稍后...");
|
||||
|
||||
|
||||
$('.mainContent iframe:visible').load(function () {
|
||||
$.modal.closeLoading();
|
||||
});
|
||||
|
||||
|
||||
// 添加选项卡
|
||||
$('.menuTabs .page-tabs-content').append(str);
|
||||
scrollToTab($('.menuTab.active'));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function menuBlank() {
|
||||
// 新窗口打开外网以http://开头,如http://ruoyi.vip
|
||||
var dataUrl = $(this).attr('href');
|
||||
@@ -282,7 +314,7 @@ $(function() {
|
||||
}
|
||||
|
||||
$('.menuItem').on('click', menuItem);
|
||||
|
||||
|
||||
$('.menuBlank').on('click', menuBlank);
|
||||
|
||||
// 关闭选项卡菜单
|
||||
@@ -347,7 +379,7 @@ $(function() {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if($.common.isNotEmpty(panelUrl)){
|
||||
$('.menuTab[data-id="' + panelUrl + '"]').addClass('active').siblings('.menuTab').removeClass('active');
|
||||
$('.mainContent .RuoYi_iframe').each(function() {
|
||||
@@ -373,9 +405,10 @@ $(function() {
|
||||
});
|
||||
}
|
||||
scrollToTab($('.menuTab.active'));
|
||||
syncMenuTab($('.page-tabs-content').find('.active').attr('data-id'));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$('.menuTabs').on('click', '.menuTab i', closeTab);
|
||||
|
||||
//滚动到已激活的选项卡
|
||||
@@ -388,6 +421,7 @@ $(function() {
|
||||
function activeTab() {
|
||||
if (!$(this).hasClass('active')) {
|
||||
var currentId = $(this).data('id');
|
||||
syncMenuTab(currentId);
|
||||
// 显示tab对应的内容区
|
||||
$('.mainContent .RuoYi_iframe').each(function() {
|
||||
if ($(this).data('id') == currentId) {
|
||||
@@ -410,19 +444,19 @@ $(function() {
|
||||
var url = target.attr('src');
|
||||
target.attr('src', url).ready();
|
||||
}
|
||||
|
||||
|
||||
// 页签全屏
|
||||
function fullScreenTab() {
|
||||
var currentId = $('.page-tabs-content').find('.active').attr('data-id');
|
||||
var target = $('.RuoYi_iframe[data-id="' + currentId + '"]');
|
||||
target.fullScreen(true);
|
||||
}
|
||||
|
||||
|
||||
// 关闭当前选项卡
|
||||
function tabCloseCurrent() {
|
||||
$('.page-tabs-content').find('.active i').trigger("click");
|
||||
}
|
||||
|
||||
|
||||
//关闭其他选项卡
|
||||
function tabCloseOther() {
|
||||
$('.page-tabs-content').children("[data-id]").not(":first").not(".active").each(function() {
|
||||
@@ -431,7 +465,7 @@ $(function() {
|
||||
});
|
||||
$('.page-tabs-content').css("margin-left", "0");
|
||||
}
|
||||
|
||||
|
||||
// 关闭全部选项卡
|
||||
function tabCloseAll() {
|
||||
$('.page-tabs-content').children("[data-id]").not(":first").each(function() {
|
||||
@@ -443,17 +477,18 @@ $(function() {
|
||||
$(this).addClass("active");
|
||||
});
|
||||
$('.page-tabs-content').css("margin-left", "0");
|
||||
syncMenuTab($('.page-tabs-content').find('.active').attr('data-id'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 全屏显示
|
||||
$('#fullScreen').on('click', function () {
|
||||
$(document).toggleFullScreen();
|
||||
});
|
||||
|
||||
|
||||
// 页签刷新按钮
|
||||
$('.tabReload').on('click', refreshTab);
|
||||
|
||||
|
||||
// 页签全屏按钮
|
||||
$('.tabFullScreen').on('click', fullScreenTab);
|
||||
|
||||
@@ -465,33 +500,33 @@ $(function() {
|
||||
|
||||
// 右移按扭
|
||||
$('.tabRight').on('click', scrollTabRight);
|
||||
|
||||
|
||||
// 关闭当前
|
||||
$('.tabCloseCurrent').on('click', tabCloseCurrent);
|
||||
|
||||
|
||||
// 关闭其他
|
||||
$('.tabCloseOther').on('click', tabCloseOther);
|
||||
|
||||
// 关闭全部
|
||||
$('.tabCloseAll').on('click', tabCloseAll);
|
||||
|
||||
|
||||
// tab全屏显示
|
||||
$('.tabMaxCurrent').on('click', function () {
|
||||
$('.page-tabs-content').find('.active').trigger("dblclick");
|
||||
});
|
||||
|
||||
|
||||
// 关闭全屏
|
||||
$('#ax_close_max').click(function(){
|
||||
$('#content-main').toggleClass('max');
|
||||
$('#ax_close_max').hide();
|
||||
})
|
||||
|
||||
|
||||
// 双击选项卡全屏显示
|
||||
function activeTabMax() {
|
||||
$('#content-main').toggleClass('max');
|
||||
$('#ax_close_max').show();
|
||||
}
|
||||
|
||||
|
||||
// 设置锚点
|
||||
function setIframeUrl(href) {
|
||||
if($.common.equals("history", mode)) {
|
||||
@@ -502,20 +537,20 @@ $(function() {
|
||||
window.location.href = newUrl + "#" + href;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$(window).keydown(function(event) {
|
||||
if (event.keyCode == 27) {
|
||||
$('#content-main').removeClass('max');
|
||||
$('#ax_close_max').hide();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
window.onhashchange = function() {
|
||||
var hash = location.hash;
|
||||
var url = hash.substring(1, hash.length);
|
||||
$('a[href$="' + url + '"]').click();
|
||||
};
|
||||
|
||||
|
||||
// 右键菜单实现
|
||||
$.contextMenu({
|
||||
selector: ".menuTab",
|
||||
|
||||
@@ -36,6 +36,30 @@ $(function() {
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 气泡弹出框特效(移到元素时)
|
||||
$(document).on("mouseenter", '.table [data-toggle="popover"]', function() {
|
||||
var _this = this;
|
||||
$(this).popover("show");
|
||||
$(".popover").on("mouseleave", function() {
|
||||
$(_this).popover('hide');
|
||||
});
|
||||
})
|
||||
|
||||
// 气泡弹出框特效(离开元素时)
|
||||
$(document).on("mouseleave", '.table [data-toggle="popover"]', function() {
|
||||
var _this = this;
|
||||
setTimeout(function() {
|
||||
if (!$(".popover:hover").length) $(_this).popover("hide");
|
||||
}, 100);
|
||||
});
|
||||
|
||||
// 取消回车自动提交表单
|
||||
$(document).on("keypress", ":input:not(textarea):not([type=submit])", function(event) {
|
||||
if (event.keyCode == 13) {
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
// laydate 时间控件绑定
|
||||
if ($(".select-time").length > 0) {
|
||||
@@ -79,6 +103,7 @@ $(function() {
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// laydate time-input 时间控件绑定
|
||||
if ($(".time-input").length > 0) {
|
||||
layui.use('laydate', function () {
|
||||
@@ -126,6 +151,7 @@ $(function() {
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// tree 关键字搜索绑定
|
||||
if ($("#keyword").length > 0) {
|
||||
$("#keyword").bind("focus", function focusKey(e) {
|
||||
@@ -139,6 +165,7 @@ $(function() {
|
||||
$.tree.searchNode(e);
|
||||
}).bind("input propertychange", $.tree.searchNode);
|
||||
}
|
||||
|
||||
// tree表格树 展开/折叠
|
||||
var expandFlag;
|
||||
$("#expandAllBtn").click(function() {
|
||||
@@ -151,6 +178,7 @@ $(function() {
|
||||
}
|
||||
expandFlag = expandFlag ? false: true;
|
||||
})
|
||||
|
||||
// 按下ESC按钮关闭弹层
|
||||
$('body', document).on('keyup', function(e) {
|
||||
if (e.which === 27) {
|
||||
@@ -238,7 +266,7 @@ var closeItem = function(dataId){
|
||||
/** 创建选项卡 */
|
||||
function createMenuItem(dataUrl, menuName) {
|
||||
var panelUrl = window.frameElement.getAttribute('data-id');
|
||||
dataIndex = $.common.random(1,100),
|
||||
dataIndex = $.common.random(1, 100),
|
||||
flag = true;
|
||||
if (dataUrl == undefined || $.trim(dataUrl).length == 0) return false;
|
||||
var topWindow = $(window.parent.document);
|
||||
@@ -247,6 +275,7 @@ function createMenuItem(dataUrl, menuName) {
|
||||
if ($(this).data('id') == dataUrl) {
|
||||
if (!$(this).hasClass('active')) {
|
||||
$(this).addClass('active').siblings('.menuTab').removeClass('active');
|
||||
scrollToTab(this);
|
||||
$('.page-tabs-content').animate({ marginLeft: ""}, "fast");
|
||||
// 显示tab对应的内容区
|
||||
$('.mainContent .RuoYi_iframe', topWindow).each(function() {
|
||||
@@ -262,7 +291,7 @@ function createMenuItem(dataUrl, menuName) {
|
||||
});
|
||||
// 选项卡菜单不存在
|
||||
if (flag) {
|
||||
var str = '<a href="javascript:;" class="active menuTab" data-id="' + dataUrl + '" data-panel="' + panelUrl + '">' + menuName + ' <i class="fa fa-times-circle"></i></a>';
|
||||
var str = '<a href="javascript:;" class="active menuTab noactive" data-id="' + dataUrl + '" data-panel="' + panelUrl + '">' + menuName + ' <i class="fa fa-times-circle"></i></a>';
|
||||
$('.menuTab', topWindow).removeClass('active');
|
||||
|
||||
// 添加选项卡对应的iframe
|
||||
@@ -276,11 +305,75 @@ function createMenuItem(dataUrl, menuName) {
|
||||
|
||||
// 添加选项卡
|
||||
$('.menuTabs .page-tabs-content', topWindow).append(str);
|
||||
scrollToTab($('.menuTab.active', topWindow));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//日志打印封装处理
|
||||
// 滚动到指定选项卡
|
||||
function scrollToTab(element) {
|
||||
var topWindow = $(window.parent.document);
|
||||
var marginLeftVal = calSumWidth($(element).prevAll()),
|
||||
marginRightVal = calSumWidth($(element).nextAll());
|
||||
// 可视区域非tab宽度
|
||||
var tabOuterWidth = calSumWidth($(".content-tabs", topWindow).children().not(".menuTabs"));
|
||||
//可视区域tab宽度
|
||||
var visibleWidth = $(".content-tabs", topWindow).outerWidth(true) - tabOuterWidth;
|
||||
//实际滚动宽度
|
||||
var scrollVal = 0;
|
||||
if ($(".page-tabs-content", topWindow).outerWidth() < visibleWidth) {
|
||||
scrollVal = 0;
|
||||
} else if (marginRightVal <= (visibleWidth - $(element).outerWidth(true) - $(element).next().outerWidth(true))) {
|
||||
if ((visibleWidth - $(element).next().outerWidth(true)) > marginRightVal) {
|
||||
scrollVal = marginLeftVal;
|
||||
var tabElement = element;
|
||||
while ((scrollVal - $(tabElement).outerWidth()) > ($(".page-tabs-content", topWindow).outerWidth() - visibleWidth)) {
|
||||
scrollVal -= $(tabElement).prev().outerWidth();
|
||||
tabElement = $(tabElement).prev();
|
||||
}
|
||||
}
|
||||
} else if (marginLeftVal > (visibleWidth - $(element).outerWidth(true) - $(element).prev().outerWidth(true))) {
|
||||
scrollVal = marginLeftVal - $(element).prev().outerWidth(true);
|
||||
}
|
||||
$('.page-tabs-content', topWindow).animate({ marginLeft: 0 - scrollVal + 'px' }, "fast");
|
||||
}
|
||||
|
||||
//计算元素集合的总宽度
|
||||
function calSumWidth(elements) {
|
||||
var width = 0;
|
||||
$(elements).each(function() {
|
||||
width += $(this).outerWidth(true);
|
||||
});
|
||||
return width;
|
||||
}
|
||||
|
||||
/** 密码规则范围验证 */
|
||||
function checkpwd(chrtype, password) {
|
||||
if (chrtype == 1) {
|
||||
if(!$.common.numValid(password)){
|
||||
$.modal.alertWarning("密码只能为0-9数字");
|
||||
return false;
|
||||
}
|
||||
} else if (chrtype == 2) {
|
||||
if(!$.common.enValid(password)){
|
||||
$.modal.alertWarning("密码只能为a-z和A-Z字母");
|
||||
return false;
|
||||
}
|
||||
} else if (chrtype == 3) {
|
||||
if(!$.common.enNumValid(password)){
|
||||
$.modal.alertWarning("密码必须包含字母以及数字");
|
||||
return false;
|
||||
}
|
||||
} else if (chrtype == 4) {
|
||||
if(!$.common.charValid(password)){
|
||||
$.modal.alertWarning("密码必须包含字母、数字、以及特殊符号-、_");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// 日志打印封装处理
|
||||
var log = {
|
||||
log: function(msg) {
|
||||
console.log(msg);
|
||||
@@ -296,7 +389,7 @@ var log = {
|
||||
}
|
||||
};
|
||||
|
||||
//本地缓存处理
|
||||
// 本地缓存处理
|
||||
var storage = {
|
||||
set: function(key, value) {
|
||||
window.localStorage.setItem(key, value);
|
||||
@@ -312,6 +405,42 @@ var storage = {
|
||||
}
|
||||
};
|
||||
|
||||
// 主子表操作封装处理
|
||||
var sub = {
|
||||
editColumn: function() {
|
||||
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
||||
var params = new Array();
|
||||
for (var dataIndex = 0; dataIndex <= count; dataIndex++) {
|
||||
var columns = $('#' + table.options.id + ' tr[data-index="' + dataIndex + '"] td');
|
||||
var obj = new Object();
|
||||
for (var i = 0; i < columns.length; i++) {
|
||||
var inputValue = $(columns[i]).find('input');
|
||||
var selectValue = $(columns[i]).find('select');
|
||||
var key = table.options.columns[i].field;
|
||||
if ($.common.isNotEmpty(inputValue.val())) {
|
||||
obj[key] = inputValue.val();
|
||||
} else if ($.common.isNotEmpty(selectValue.val())) {
|
||||
obj[key] = selectValue.val();
|
||||
} else {
|
||||
obj[key] = "";
|
||||
}
|
||||
}
|
||||
params.push({ index: dataIndex, row: obj });
|
||||
}
|
||||
$("#" + table.options.id).bootstrapTable("updateRow", params);
|
||||
},
|
||||
delColumn: function(column) {
|
||||
sub.editColumn();
|
||||
var subColumn = $.common.isEmpty(column) ? "index" : column;
|
||||
var ids = $.table.selectColumns(subColumn);
|
||||
if (ids.length == 0) {
|
||||
$.modal.alertWarning("请至少选择一条记录");
|
||||
return;
|
||||
}
|
||||
$("#" + table.options.id).bootstrapTable('remove', { field: subColumn, values: ids });
|
||||
}
|
||||
};
|
||||
|
||||
/** 设置全局ajax处理 */
|
||||
$.ajaxSetup({
|
||||
complete: function(XMLHttpRequest, textStatus) {
|
||||
|
||||
@@ -11,7 +11,7 @@ var table = {
|
||||
// 设置实例配置
|
||||
set: function(id) {
|
||||
if($.common.getLength(table.config) > 1) {
|
||||
var tableId = $.common.isEmpty(id) ? $(event.currentTarget).parents(".bootstrap-table").find(".table").attr("id") : id;
|
||||
var tableId = $.common.isEmpty(id) ? $(event.currentTarget).parents(".bootstrap-table").find("table.table").attr("id") : id;
|
||||
if ($.common.isNotEmpty(tableId)) {
|
||||
table.options = table.get(tableId);
|
||||
}
|
||||
@@ -38,14 +38,18 @@ var table = {
|
||||
var defaults = {
|
||||
id: "bootstrap-table",
|
||||
type: 0, // 0 代表bootstrapTable 1代表bootstrapTreeTable
|
||||
method: 'post',
|
||||
height: undefined,
|
||||
sidePagination: "server",
|
||||
sortName: "",
|
||||
sortOrder: "asc",
|
||||
pagination: true,
|
||||
paginationLoop: false,
|
||||
pageSize: 10,
|
||||
pageNumber: 1,
|
||||
pageList: [10, 25, 50],
|
||||
toolbar: "toolbar",
|
||||
loadingFontSize: 13,
|
||||
striped: false,
|
||||
escape: false,
|
||||
firstLoad: true,
|
||||
@@ -60,11 +64,11 @@ var table = {
|
||||
clickToSelect: false,
|
||||
singleSelect: false,
|
||||
mobileResponsive: true,
|
||||
maintainSelected: false,
|
||||
rememberSelected: false,
|
||||
fixedColumns: false,
|
||||
fixedNumber: 0,
|
||||
rightFixedColumns: false,
|
||||
rightFixedNumber: 0,
|
||||
fixedRightNumber: 0,
|
||||
queryParams: $.table.queryParams,
|
||||
rowStyle: {},
|
||||
};
|
||||
@@ -76,7 +80,7 @@ var table = {
|
||||
id: options.id,
|
||||
url: options.url, // 请求后台的URL(*)
|
||||
contentType: "application/x-www-form-urlencoded", // 编码类型
|
||||
method: 'post', // 请求方式(*)
|
||||
method: options.method, // 请求方式(*)
|
||||
cache: false, // 是否使用缓存
|
||||
height: options.height, // 表格的高度
|
||||
striped: options.striped, // 是否显示行间隔色
|
||||
@@ -85,6 +89,7 @@ var table = {
|
||||
sortName: options.sortName, // 排序列名称
|
||||
sortOrder: options.sortOrder, // 排序方式 asc 或者 desc
|
||||
pagination: options.pagination, // 是否显示分页(*)
|
||||
paginationLoop: options.paginationLoop, // 是否启用分页条无限循环的功能
|
||||
pageNumber: 1, // 初始化加载第一页,默认第一页
|
||||
pageSize: options.pageSize, // 每页的记录行数(*)
|
||||
pageList: options.pageList, // 可供选择的每页的行数(*)
|
||||
@@ -93,6 +98,7 @@ var table = {
|
||||
showFooter: options.showFooter, // 是否显示表尾
|
||||
iconSize: 'outline', // 图标大小:undefined默认的按钮尺寸 xs超小按钮sm小按钮lg大按钮
|
||||
toolbar: '#' + options.toolbar, // 指定工作栏
|
||||
loadingFontSize: options.loadingFontSize, // 自定义加载文本的字体大小
|
||||
sidePagination: options.sidePagination, // server启用服务端分页client客户端分页
|
||||
search: options.search, // 是否显示搜索框功能
|
||||
searchText: options.searchText, // 搜索框初始显示的内容,默认为空
|
||||
@@ -102,10 +108,13 @@ var table = {
|
||||
showColumns: options.showColumns, // 是否显示隐藏某列下拉框
|
||||
showToggle: options.showToggle, // 是否显示详细视图和列表视图的切换按钮
|
||||
showExport: options.showExport, // 是否支持导出文件
|
||||
showHeader: options.showHeader, // 是否显示表头
|
||||
showFullscreen: options.showFullscreen, // 是否显示全屏按钮
|
||||
uniqueId: options.uniqueId, // 唯 一的标识符
|
||||
clickToSelect: options.clickToSelect, // 是否启用点击选中行
|
||||
singleSelect: options.singleSelect, // 是否单选checkbox
|
||||
mobileResponsive: options.mobileResponsive, // 是否支持移动端适配
|
||||
cardView: options.cardView, // 是否启用显示卡片视图
|
||||
detailView: options.detailView, // 是否启用显示细节视图
|
||||
onClickRow: options.onClickRow, // 点击某行触发的事件
|
||||
onDblClickRow: options.onDblClickRow, // 双击某行触发的事件
|
||||
@@ -113,15 +122,16 @@ var table = {
|
||||
onDblClickCell: options.onDblClickCell, // 双击某格触发的事件
|
||||
onEditableSave: options.onEditableSave, // 行内编辑保存的事件
|
||||
onExpandRow: options.onExpandRow, // 点击详细视图的事件
|
||||
maintainSelected: options.maintainSelected, // 前端翻页时保留所选行
|
||||
rememberSelected: options.rememberSelected, // 启用翻页记住前面的选择
|
||||
fixedColumns: options.fixedColumns, // 是否启用冻结列(左侧)
|
||||
fixedNumber: options.fixedNumber, // 列冻结的个数(左侧)
|
||||
rightFixedColumns: options.rightFixedColumns, // 是否启用冻结列(右侧)
|
||||
rightFixedNumber: options.rightFixedNumber, // 列冻结的个数(右侧)
|
||||
fixedRightNumber: options.fixedRightNumber, // 列冻结的个数(右侧)
|
||||
onReorderRow: options.onReorderRow, // 当拖拽结束后处理函数
|
||||
queryParams: options.queryParams, // 传递参数(*)
|
||||
rowStyle: options.rowStyle, // 通过自定义函数设置行样式
|
||||
columns: options.columns, // 显示列信息(*)
|
||||
data: options.data, // 被加载的数据
|
||||
responseHandler: $.table.responseHandler, // 在加载服务器发送来的数据之前处理函数
|
||||
onLoadSuccess: $.table.onLoadSuccess, // 当所有数据被加载时触发处理函数
|
||||
exportOptions: options.exportOptions, // 前端导出忽略列索引
|
||||
@@ -152,8 +162,8 @@ var table = {
|
||||
},
|
||||
// 请求获取数据后处理回调函数
|
||||
responseHandler: function(res) {
|
||||
if (typeof table.options.responseHandler == "function") {
|
||||
table.options.responseHandler(res);
|
||||
if (typeof table.get(this.id).responseHandler == "function") {
|
||||
table.get(this.id).responseHandler(res);
|
||||
}
|
||||
if (res.code == 0) {
|
||||
if ($.common.isNotEmpty(table.options.sidePagination) && table.options.sidePagination == 'client') {
|
||||
@@ -181,8 +191,9 @@ var table = {
|
||||
table.set($(this).attr("id"));
|
||||
});
|
||||
// 选中、取消、全部选中、全部取消(事件)
|
||||
$(optionsIds).on("check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table", function (e, rows) {
|
||||
$(optionsIds).on("check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table", function (e, rowsAfter, rowsBefore) {
|
||||
// 复选框分页保留保存选中数组
|
||||
var rows = $.common.equals("uncheck-all", e.type) ? rowsBefore : rowsAfter;
|
||||
var rowIds = $.table.affectedRowIds(rows);
|
||||
if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) {
|
||||
func = $.inArray(e.type, ['check', 'check-all']) > -1 ? 'union' : 'difference';
|
||||
@@ -215,9 +226,14 @@ var table = {
|
||||
$(optionsIds).off("click").on("click", '.img-circle', function() {
|
||||
var src = $(this).attr('src');
|
||||
var target = $(this).data('target');
|
||||
var height = $(this).data('height');
|
||||
var width = $(this).data('width');
|
||||
if($.common.equals("self", target)) {
|
||||
var height = $(this).data('height');
|
||||
var width = $(this).data('width');
|
||||
// 如果是移动端,就使用自适应大小弹窗
|
||||
if ($.common.isMobile()) {
|
||||
width = 'auto';
|
||||
height = 'auto';
|
||||
}
|
||||
layer.open({
|
||||
title: false,
|
||||
type: 1,
|
||||
@@ -254,26 +270,6 @@ var table = {
|
||||
}
|
||||
// 浮动提示框特效
|
||||
$(".table [data-toggle='tooltip']").tooltip();
|
||||
|
||||
// 气泡弹出框特效
|
||||
$('.table [data-toggle="popover"]').each(function() {
|
||||
$(this).popover({ trigger: "manual", html: true, animation: false, container: "body", placement: "left"
|
||||
}).on("mouseenter",
|
||||
function() {
|
||||
var _this = this;
|
||||
$(this).popover("show");
|
||||
$(".popover").on("mouseleave", function() {
|
||||
$(_this).popover('hide');
|
||||
});
|
||||
}).on("mouseleave",
|
||||
function() {
|
||||
var _this = this;
|
||||
setTimeout(function() {
|
||||
if (!$(".popover:hover").length)
|
||||
$(_this).popover("hide");
|
||||
}, 100);
|
||||
});
|
||||
});
|
||||
},
|
||||
// 表格销毁
|
||||
destroy: function (tableId) {
|
||||
@@ -284,8 +280,8 @@ var table = {
|
||||
serialNumber: function (index, tableId) {
|
||||
var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId;
|
||||
var tableParams = $("#" + currentId).bootstrapTable('getOptions');
|
||||
var pageSize = tableParams.pageSize;
|
||||
var pageNumber = tableParams.pageNumber;
|
||||
var pageSize = $.common.isNotEmpty(tableParams.pageSize) ? tableParams.pageSize: table.options.pageSize;
|
||||
var pageNumber = $.common.isNotEmpty(tableParams.pageNumber) ? tableParams.pageNumber: table.options.pageNumber;
|
||||
return pageSize * (pageNumber - 1) + index + 1;
|
||||
},
|
||||
// 列超出指定长度浮动提示 target(copy单击复制文本 open弹窗打开文本)
|
||||
@@ -299,7 +295,7 @@ var table = {
|
||||
_value = _value.replace(/\'/g,"'");
|
||||
_value = _value.replace(/\"/g,""");
|
||||
var actions = [];
|
||||
actions.push($.common.sprintf('<input id="tooltip-show" style="opacity: 0;position: absolute;z-index:-1" type="text" value="%s"/>', _value));
|
||||
actions.push($.common.sprintf('<input style="opacity: 0;position: absolute;width:5px;z-index:-1" type="text" value="%s"/>', _value));
|
||||
actions.push($.common.sprintf('<a href="###" class="tooltip-show" data-toggle="tooltip" data-target="%s" title="%s">%s</a>', _target, _value, _text));
|
||||
return actions.join('');
|
||||
} else {
|
||||
@@ -336,24 +332,10 @@ var table = {
|
||||
}
|
||||
},
|
||||
// 搜索-默认第一个form
|
||||
search: function(formId, tableId, data) {
|
||||
search: function(formId, tableId) {
|
||||
table.set(tableId);
|
||||
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
|
||||
var params = $.common.isEmpty(tableId) ? $("#" + table.options.id).bootstrapTable('getOptions') : $("#" + tableId).bootstrapTable('getOptions');
|
||||
params.queryParams = function(params) {
|
||||
var search = $.common.formToJSON(currentId);
|
||||
if($.common.isNotEmpty(data)){
|
||||
$.each(data, function(key) {
|
||||
search[key] = data[key];
|
||||
});
|
||||
}
|
||||
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;
|
||||
}
|
||||
if($.common.isNotEmpty(tableId)){
|
||||
$("#" + tableId).bootstrapTable('refresh', params);
|
||||
} else{
|
||||
@@ -456,13 +438,13 @@ var table = {
|
||||
// 查询表格指定列值
|
||||
selectColumns: function(column) {
|
||||
var rows = $.map($("#" + table.options.id).bootstrapTable('getSelections'), function (row) {
|
||||
return row[column];
|
||||
return $.common.getItemField(row, column);
|
||||
});
|
||||
if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) {
|
||||
var selectedRows = table.rememberSelecteds[table.options.id];
|
||||
if($.common.isNotEmpty(selectedRows)) {
|
||||
rows = $.map(table.rememberSelecteds[table.options.id], function (row) {
|
||||
return row[column];
|
||||
return $.common.getItemField(row, column);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -474,7 +456,7 @@ var table = {
|
||||
var rowIds;
|
||||
if ($.isArray(rows)) {
|
||||
rowIds = $.map(rows, function(row) {
|
||||
return row[column];
|
||||
return $.common.getItemField(row, column);
|
||||
});
|
||||
} else {
|
||||
rowIds = [rows[column]];
|
||||
@@ -484,13 +466,13 @@ var table = {
|
||||
// 查询表格首列值
|
||||
selectFirstColumns: function() {
|
||||
var rows = $.map($("#" + table.options.id).bootstrapTable('getSelections'), function (row) {
|
||||
return row[table.options.columns[1].field];
|
||||
return $.common.getItemField(row, table.options.columns[1].field);
|
||||
});
|
||||
if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) {
|
||||
var selectedRows = table.rememberSelecteds[table.options.id];
|
||||
if($.common.isNotEmpty(selectedRows)) {
|
||||
rows = $.map(selectedRows, function (row) {
|
||||
return row[table.options.columns[1].field];
|
||||
return $.common.getItemField(row, table.options.columns[1].field);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -508,6 +490,21 @@ var table = {
|
||||
});
|
||||
return actions.join('');
|
||||
},
|
||||
// 回显数据字典(字符串数组)
|
||||
selectDictLabels: function(datas, value, separator) {
|
||||
var currentSeparator = $.common.isEmpty(separator) ? "," : separator;
|
||||
var actions = [];
|
||||
$.each(value.split(currentSeparator), function(i, val) {
|
||||
$.each(datas, function(index, dict) {
|
||||
if (dict.dictValue == ('' + val)) {
|
||||
var listClass = $.common.equals("default", dict.listClass) || $.common.isEmpty(dict.listClass) ? "" : "badge badge-" + dict.listClass;
|
||||
actions.push($.common.sprintf("<span class='%s'>%s </span>", listClass, dict.dictLabel));
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
return actions.join('');
|
||||
},
|
||||
// 显示表格指定列
|
||||
showColumn: function(column, tableId) {
|
||||
var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId;
|
||||
@@ -517,6 +514,16 @@ var table = {
|
||||
hideColumn: function(column, tableId) {
|
||||
var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId;
|
||||
$("#" + currentId).bootstrapTable('hideColumn', column);
|
||||
},
|
||||
// 显示所有表格列
|
||||
showAllColumns: function(tableId) {
|
||||
var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId;
|
||||
$("#" + currentId).bootstrapTable('showAllColumns');
|
||||
},
|
||||
// 隐藏所有表格列
|
||||
hideAllColumns: function(tableId) {
|
||||
var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId;
|
||||
$("#" + currentId).bootstrapTable('hideAllColumns');
|
||||
}
|
||||
},
|
||||
// 表格树封装处理
|
||||
@@ -541,6 +548,7 @@ var table = {
|
||||
var options = $.extend(defaults, options);
|
||||
table.options = options;
|
||||
table.config[options.id] = options;
|
||||
$.table.initEvent();
|
||||
$.bttTable = $('#' + options.id).bootstrapTreeTable({
|
||||
code: options.code, // 用于设置父子关系
|
||||
parentCode: options.parentCode, // 用于设置父子关系
|
||||
@@ -560,7 +568,8 @@ var table = {
|
||||
expandAll: options.expandAll, // 是否全部展开
|
||||
expandFirst: options.expandFirst, // 是否默认第一级展开--expandAll为false时生效
|
||||
columns: options.columns, // 显示列信息(*)
|
||||
responseHandler: $.treeTable.responseHandler // 当所有数据被加载时触发处理函数
|
||||
responseHandler: $.treeTable.responseHandler, // 在加载服务器发送来的数据之前处理函数
|
||||
onLoadSuccess: $.table.onLoadSuccess // 当所有数据被加载时触发处理函数
|
||||
});
|
||||
},
|
||||
// 条件查询
|
||||
@@ -576,7 +585,7 @@ var table = {
|
||||
// 查询表格树指定列值
|
||||
selectColumns: function(column) {
|
||||
var rows = $.map($.bttTable.bootstrapTreeTable('getSelections'), function (row) {
|
||||
return row[column];
|
||||
return $.common.getItemField(row, column);
|
||||
});
|
||||
return $.common.uniqueFn(rows);
|
||||
},
|
||||
@@ -782,22 +791,34 @@ var table = {
|
||||
options.callBack(index, layero);
|
||||
}
|
||||
}
|
||||
layer.open({
|
||||
type: 2,
|
||||
maxmin: true,
|
||||
shade: 0.3,
|
||||
title: _title,
|
||||
fix: false,
|
||||
area: [_width + 'px', _height + 'px'],
|
||||
content: _url,
|
||||
shadeClose: $.common.isEmpty(options.shadeClose) ? true : options.shadeClose,
|
||||
skin: options.skin,
|
||||
btn: $.common.isEmpty(options.btn) ? _btn : options.btn,
|
||||
yes: options.yes,
|
||||
cancel: function () {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
var btnCallback = {};
|
||||
if(options.btn instanceof Array){
|
||||
for (var i = 1, len = options.btn.length; i < len; i++) {
|
||||
var btn = options["btn" + (i + 1)];
|
||||
if (btn) {
|
||||
btnCallback["btn" + (i + 1)] = btn;
|
||||
}
|
||||
}
|
||||
}
|
||||
var index = layer.open($.extend({
|
||||
type: 2,
|
||||
maxmin: $.common.isEmpty(options.maxmin) ? true : options.maxmin,
|
||||
shade: 0.3,
|
||||
title: _title,
|
||||
fix: false,
|
||||
area: [_width + 'px', _height + 'px'],
|
||||
content: _url,
|
||||
shadeClose: $.common.isEmpty(options.shadeClose) ? true : options.shadeClose,
|
||||
skin: options.skin,
|
||||
btn: $.common.isEmpty(options.btn) ? _btn : options.btn,
|
||||
yes: options.yes,
|
||||
cancel: function () {
|
||||
return true;
|
||||
}
|
||||
}, btnCallback));
|
||||
if ($.common.isNotEmpty(options.full) && options.full === true) {
|
||||
layer.full(index);
|
||||
}
|
||||
},
|
||||
// 弹出层全屏
|
||||
openFull: function (title, url, width, height) {
|
||||
@@ -1031,8 +1052,17 @@ var table = {
|
||||
if ($.common.isNotEmpty(id)) {
|
||||
url = table.options.updateUrl.replace("{id}", id);
|
||||
} else {
|
||||
var row = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
|
||||
url = table.options.updateUrl.replace("{id}", row);
|
||||
if(table.options.type == table_type.bootstrapTreeTable) {
|
||||
var row = $("#" + table.options.id).bootstrapTreeTable('getSelections')[0];
|
||||
if ($.common.isEmpty(row)) {
|
||||
$.modal.alertWarning("请至少选择一条记录");
|
||||
return;
|
||||
}
|
||||
url = table.options.updateUrl.replace("{id}", row[table.options.uniqueId]);
|
||||
} else {
|
||||
var row = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
|
||||
url = table.options.updateUrl.replace("{id}", row);
|
||||
}
|
||||
}
|
||||
$.modal.openFull("修改" + table.options.modalName, url);
|
||||
},
|
||||
@@ -1124,7 +1154,7 @@ var table = {
|
||||
} else if (result.code == web_status.SUCCESS && table.options.type == table_type.bootstrapTreeTable) {
|
||||
$.modal.msgSuccess(result.msg);
|
||||
$.treeTable.refresh();
|
||||
} else if (result.code == web_status.SUCCESS && table.option.type == undefined) {
|
||||
} else if (result.code == web_status.SUCCESS && $.common.isEmpty(table.options.type)) {
|
||||
$.modal.msgSuccess(result.msg)
|
||||
} else if (result.code == web_status.WARNING) {
|
||||
$.modal.alertWarning(result.msg)
|
||||
@@ -1253,9 +1283,11 @@ var table = {
|
||||
var treeId = $("#treeId").val();
|
||||
tree = $.fn.zTree.init($("#" + options.id), setting, data);
|
||||
$._tree = tree;
|
||||
var nodes = tree.getNodesByParam("level", options.expandLevel - 1);
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
tree.expandNode(nodes[i], true, false, false);
|
||||
for (var i = 0; i < options.expandLevel; i++) {
|
||||
var nodes = tree.getNodesByParam("level", i);
|
||||
for (var j = 0; j < nodes.length; j++) {
|
||||
tree.expandNode(nodes[j], true, false, false);
|
||||
}
|
||||
}
|
||||
var node = tree.getNodesByParam("id", treeId, null)[0];
|
||||
$.tree.selectByIdName(treeId, node);
|
||||
@@ -1452,6 +1484,18 @@ var table = {
|
||||
});
|
||||
return flag ? str : '';
|
||||
},
|
||||
// 获取节点数据,支持多层级访问
|
||||
getItemField: function (item, field) {
|
||||
var value = item;
|
||||
if (typeof field !== 'string' || item.hasOwnProperty(field)) {
|
||||
return item[field];
|
||||
}
|
||||
var props = field.split('.');
|
||||
for (var p in props) {
|
||||
value = value && value[props[p]];
|
||||
}
|
||||
return value;
|
||||
},
|
||||
// 指定随机数返回
|
||||
random: function (min, max) {
|
||||
return Math.floor((Math.random() * max) + min);
|
||||
@@ -1497,6 +1541,20 @@ var table = {
|
||||
});
|
||||
return json;
|
||||
},
|
||||
// 数据字典转下拉框
|
||||
dictToSelect: function(datas, value, name) {
|
||||
var actions = [];
|
||||
actions.push($.common.sprintf("<select class='form-control' name='%s'>", name));
|
||||
$.each(datas, function(index, dict) {
|
||||
actions.push($.common.sprintf("<option value='%s'", dict.dictValue));
|
||||
if (dict.dictValue == ('' + value)) {
|
||||
actions.push(' selected');
|
||||
}
|
||||
actions.push($.common.sprintf(">%s</option>", dict.dictLabel));
|
||||
});
|
||||
actions.push('</select>');
|
||||
return actions.join('');
|
||||
},
|
||||
// 获取obj对象长度
|
||||
getLength: function(obj) {
|
||||
var count = 0;
|
||||
@@ -1511,6 +1569,26 @@ var table = {
|
||||
isMobile: function () {
|
||||
return navigator.userAgent.match(/(Android|iPhone|SymbianOS|Windows Phone|iPad|iPod)/i);
|
||||
},
|
||||
// 数字正则表达式,只能为0-9数字
|
||||
numValid : function(text){
|
||||
var patten = new RegExp(/^[0-9]+$/);
|
||||
return patten.test(text);
|
||||
},
|
||||
// 英文正则表达式,只能为a-z和A-Z字母
|
||||
enValid : function(text){
|
||||
var patten = new RegExp(/^[a-zA-Z]+$/);
|
||||
return patten.test(text);
|
||||
},
|
||||
// 英文、数字正则表达式,必须包含(字母,数字)
|
||||
enNumValid : function(text){
|
||||
var patten = new RegExp(/^(?=.*[a-zA-Z]+)(?=.*[0-9]+)[a-zA-Z0-9]+$/);
|
||||
return patten.test(text);
|
||||
},
|
||||
// 英文、数字、特殊字符正则表达式,必须包含(字母,数字,特殊字符-_)
|
||||
charValid : function(text){
|
||||
var patten = new RegExp(/^(?=.*[A-Za-z])(?=.*\d)(?=.*[-_])[A-Za-z\d-_]{6,}$/);
|
||||
return patten.test(text);
|
||||
},
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="form_basic.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="form_basic.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="form_basic.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -54,7 +54,7 @@
|
||||
<h4>还不是会员?</h4>
|
||||
<p>您可以注册一个新账户</p>
|
||||
<p class="text-center">
|
||||
<a href="form_basic.html"><i class="fa fa-sign-in big-icon"></i></a>
|
||||
<a href="#"><i class="fa fa-sign-in big-icon"></i></a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -69,13 +69,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="form_basic.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="form_basic.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="form_basic.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -119,13 +119,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="form_basic.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="form_basic.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="form_basic.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -160,13 +160,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="form_basic.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="form_basic.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="form_basic.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -176,7 +176,7 @@
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="text-center">
|
||||
<a data-toggle="modal" class="btn btn-primary" href="form_basic.html#modal-form">打开登录窗口</a>
|
||||
<a data-toggle="modal" class="btn btn-primary" href="#modal-form">打开登录窗口</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -191,13 +191,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="form_basic.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="form_basic.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="form_basic.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -463,14 +463,14 @@
|
||||
<button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">操作 <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="form_basic.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="form_basic.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
<li><a href="form_basic.html#">选项3</a>
|
||||
<li><a href="#">选项3</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="form_basic.html#">选项4</a>
|
||||
<li><a href="#">选项4</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -483,14 +483,14 @@
|
||||
<button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button">操作 <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><a href="form_basic.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="form_basic.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
<li><a href="form_basic.html#">选项3</a>
|
||||
<li><a href="#">选项3</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="form_basic.html#">选项4</a>
|
||||
<li><a href="#">选项4</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -508,14 +508,14 @@
|
||||
<button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button"><span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="form_basic.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="form_basic.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
<li><a href="form_basic.html#">选项3</a>
|
||||
<li><a href="#">选项3</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="form_basic.html#">选项4</a>
|
||||
<li><a href="#">选项4</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -580,7 +580,7 @@
|
||||
<h4>还不是会员?</h4>
|
||||
<p>您可以注册一个账户</p>
|
||||
<p class="text-center">
|
||||
<a href="form_basic.html"><i class="fa fa-sign-in big-icon"></i></a>
|
||||
<a href="#"><i class="fa fa-sign-in big-icon"></i></a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="buttons.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="buttons.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -56,13 +56,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="buttons.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="buttons.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -99,13 +99,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="buttons.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="buttons.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -143,13 +143,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="buttons.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="buttons.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -217,13 +217,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="buttons.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="buttons.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -241,14 +241,14 @@
|
||||
<button data-toggle="dropdown" class="btn btn-primary dropdown-toggle">操作 <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="buttons.html#">置顶</a>
|
||||
<li><a href="#">置顶</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#" class="font-bold">修改</a>
|
||||
<li><a href="#" class="font-bold">修改</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#">禁用</a>
|
||||
<li><a href="#">禁用</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="buttons.html#">删除</a>
|
||||
<li><a href="#">删除</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -256,14 +256,14 @@
|
||||
<button data-toggle="dropdown" class="btn btn-warning dropdown-toggle">操作 <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="buttons.html#">置顶</a>
|
||||
<li><a href="#">置顶</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#">修改</a>
|
||||
<li><a href="#">修改</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#">禁用</a>
|
||||
<li><a href="#">禁用</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="buttons.html#">删除</a>
|
||||
<li><a href="#">删除</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -271,14 +271,14 @@
|
||||
<button data-toggle="dropdown" class="btn btn-default dropdown-toggle">操作 <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="buttons.html#">置顶</a>
|
||||
<li><a href="#">置顶</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#" class="font-bold">修改</a>
|
||||
<li><a href="#" class="font-bold">修改</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#">禁用</a>
|
||||
<li><a href="#">禁用</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="buttons.html#">删除</a>
|
||||
<li><a href="#">删除</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -288,14 +288,14 @@
|
||||
<button data-toggle="dropdown" class="btn btn-primary btn-sm dropdown-toggle">操作 <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="buttons.html#">置顶</a>
|
||||
<li><a href="#">置顶</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#" class="font-bold">修改</a>
|
||||
<li><a href="#" class="font-bold">修改</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#">禁用</a>
|
||||
<li><a href="#">禁用</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="buttons.html#">删除</a>
|
||||
<li><a href="#">删除</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -303,14 +303,14 @@
|
||||
<button data-toggle="dropdown" class="btn btn-warning btn-sm dropdown-toggle">操作 <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="buttons.html#">置顶</a>
|
||||
<li><a href="#">置顶</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#" class="font-bold">修改</a>
|
||||
<li><a href="#" class="font-bold">修改</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#">禁用</a>
|
||||
<li><a href="#">禁用</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="buttons.html#">删除</a>
|
||||
<li><a href="#">删除</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -318,14 +318,14 @@
|
||||
<button data-toggle="dropdown" class="btn btn-default btn-sm dropdown-toggle">操作 <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="buttons.html#">置顶</a>
|
||||
<li><a href="#">置顶</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#" class="font-bold">修改</a>
|
||||
<li><a href="#" class="font-bold">修改</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#">禁用</a>
|
||||
<li><a href="#">禁用</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="buttons.html#">删除</a>
|
||||
<li><a href="#">删除</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -334,14 +334,14 @@
|
||||
<button data-toggle="dropdown" class="btn btn-primary btn-xs dropdown-toggle">操作 <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="buttons.html#">置顶</a>
|
||||
<li><a href="#">置顶</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#" class="font-bold">修改</a>
|
||||
<li><a href="#" class="font-bold">修改</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#">禁用</a>
|
||||
<li><a href="#">禁用</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="buttons.html#">删除</a>
|
||||
<li><a href="#">删除</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -349,14 +349,14 @@
|
||||
<button data-toggle="dropdown" class="btn btn-warning btn-xs dropdown-toggle">操作 <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="buttons.html#">置顶</a>
|
||||
<li><a href="#">置顶</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#" class="font-bold">修改</a>
|
||||
<li><a href="#" class="font-bold">修改</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#">禁用</a>
|
||||
<li><a href="#">禁用</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="buttons.html#">删除</a>
|
||||
<li><a href="#">删除</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -364,14 +364,14 @@
|
||||
<button data-toggle="dropdown" class="btn btn-default btn-xs dropdown-toggle">操作 <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="buttons.html#">置顶</a>
|
||||
<li><a href="#">置顶</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#" class="font-bold">修改</a>
|
||||
<li><a href="#" class="font-bold">修改</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#">禁用</a>
|
||||
<li><a href="#">禁用</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="buttons.html#">删除</a>
|
||||
<li><a href="#">删除</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -386,13 +386,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="buttons.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="buttons.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -431,13 +431,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="buttons.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="buttons.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -513,13 +513,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="buttons.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="buttons.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -576,13 +576,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="buttons.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="buttons.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="buttons.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -597,16 +597,16 @@
|
||||
|
||||
<h3 class="font-bold">按钮组</h3>
|
||||
<p>
|
||||
<a class="btn btn-default btn-rounded" href="buttons.html#">默认</a>
|
||||
<a class="btn btn-primary btn-rounded" href="buttons.html#">主要</a>
|
||||
<a class="btn btn-success btn-rounded" href="buttons.html#">成果</a>
|
||||
<a class="btn btn-info btn-rounded" href="buttons.html#">信息</a>
|
||||
<a class="btn btn-warning btn-rounded" href="buttons.html#">警告</a>
|
||||
<a class="btn btn-danger btn-rounded" href="buttons.html#">危险</a>
|
||||
<a class="btn btn-danger btn-rounded btn-outline" href="buttons.html#">危险</a>
|
||||
<a class="btn btn-default btn-rounded" href="#">默认</a>
|
||||
<a class="btn btn-primary btn-rounded" href="#">主要</a>
|
||||
<a class="btn btn-success btn-rounded" href="#">成果</a>
|
||||
<a class="btn btn-info btn-rounded" href="#">信息</a>
|
||||
<a class="btn btn-warning btn-rounded" href="#">警告</a>
|
||||
<a class="btn btn-danger btn-rounded" href="#">危险</a>
|
||||
<a class="btn btn-danger btn-rounded btn-outline" href="#">危险</a>
|
||||
<br/>
|
||||
<br/>
|
||||
<a class="btn btn-primary btn-rounded btn-block" href="buttons.html#"><i class="fa fa-info-circle"></i> 圆角块级带图标按钮</a>
|
||||
<a class="btn btn-primary btn-rounded btn-block" href="#"><i class="fa fa-info-circle"></i> 圆角块级带图标按钮</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<th:block th:include="include :: header('多级联动下拉')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>多级联动下拉<small>https://github.com/ciaoca/cxSelect</small></h5>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<p>简单联动示例。</p>
|
||||
<div id="element" class="row">
|
||||
<div class="col-sm-2">
|
||||
<select class="type form-control m-b" data-first-title="请选择">
|
||||
<option value="">请选择</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<select class="router form-control m-b" data-first-title="请选择">
|
||||
<option value="">请选择</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<p>国内省市区联动。</p>
|
||||
<div id="element1" class="row">
|
||||
<div class="col-sm-2">
|
||||
<select class="province form-control m-b" data-first-title="选择省">
|
||||
<option value="">请选择</option>
|
||||
<option value="广东省" selected>广东省</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<select class="city form-control m-b" data-first-title="选择市">
|
||||
<option value="">请选择</option>
|
||||
<option value="深圳市" selected>深圳市</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<select class="area form-control m-b" data-first-title="选择地区">
|
||||
<option value="">请选择</option>
|
||||
<option value="南山区" selected>南山区</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<p>自定义选项。</p>
|
||||
<div id="element2" class="row">
|
||||
<div class="col-sm-2">
|
||||
<select class="first form-control m-b"></select>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<select class="second form-control m-b"></select>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<select class="third form-control m-b"></select>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<select class="fourth form-control m-b"></select>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<select class="fifth form-control m-b"></select>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="form-group">
|
||||
<label class="font-noraml">相关参数详细信息</label>
|
||||
<div><a href="http://doc.ruoyi.vip/ruoyi/document/zjwd.html#jquery-cxselect" target="_blank">http://doc.ruoyi.vip/ruoyi/document/zjwd.html#jquery-cxselect</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: jquery-cxselect-js" />
|
||||
<script th:inline="javascript">
|
||||
// 直接返回获取
|
||||
var data = [[${data}]];
|
||||
$('#element').cxSelect({
|
||||
selects: ['type', 'router'],
|
||||
jsonValue: 'v',
|
||||
data: data
|
||||
});
|
||||
|
||||
// 通过默认url获取
|
||||
var urlChina = 'cityData';
|
||||
$.cxSelect.defaults.url = urlChina;
|
||||
$('#element1').cxSelect({
|
||||
selects: ['province', 'city', 'area'],
|
||||
nodata: 'none'
|
||||
});
|
||||
|
||||
// 固定值获取
|
||||
$('#element2').cxSelect({
|
||||
selects: ['first', 'second', 'third', 'fourth', 'fifth'],
|
||||
required: true,
|
||||
jsonValue: 'v',
|
||||
data: [
|
||||
{'v': '1', 'n': '第一级 >', 's': [
|
||||
{'v': '2', 'n': '第二级 >', 's': [
|
||||
{'v': '3', 'n': '第三级 >', 's': [
|
||||
{'v': '4', 'n': '第四级 >', 's': [
|
||||
{'v': '5', 'n': '第五级 >', 's': [
|
||||
{'v': '6', 'n': '第六级 >'}
|
||||
]}
|
||||
]}
|
||||
]}
|
||||
]}
|
||||
]},
|
||||
{'v': 'test number', 'n': '测试数字', 's': [
|
||||
{'v': 'text', 'n': '文本类型', 's': [
|
||||
{'v': '4', 'n': '4'},
|
||||
{'v': '5', 'n': '5'},
|
||||
{'v': '6', 'n': '6'},
|
||||
{'v': '7', 'n': '7'},
|
||||
{'v': '8', 'n': '8'},
|
||||
{'v': '9', 'n': '9'},
|
||||
{'v': '10', 'n': '10'}
|
||||
]},
|
||||
{'v': 'number', 'n': '数值类型', 's': [
|
||||
{'v': 11, 'n': 11},
|
||||
{'v': 12, 'n': 12},
|
||||
{'v': 13, 'n': 13},
|
||||
{'v': 14, 'n': 14},
|
||||
{'v': 15, 'n': 15},
|
||||
{'v': 16, 'n': 16},
|
||||
{'v': 17, 'n': 17}
|
||||
]}
|
||||
]},
|
||||
{'v': 'test boolean','n': '测试 Boolean 类型', 's': [
|
||||
{'v': true ,'n': true},
|
||||
{'v': false ,'n': false}
|
||||
]},
|
||||
{v: 'test quotes', n: '测试属性不加引号', s: [
|
||||
{v: 'quotes', n: '引号'}
|
||||
]},
|
||||
{v: 'test other', n: '测试奇怪的值', s: [
|
||||
{v: '[]', n: '数组(空)'},
|
||||
{v: [1,2,3], n: '数组(数值)'},
|
||||
{v: ['a','b','c'], n: '数组(文字)'},
|
||||
{v: new Date(), n: '日期'},
|
||||
{v: new RegExp('\\d+'), n: '正则对象'},
|
||||
{v: /\d+/, n: '正则直接量'},
|
||||
{v: {}, n: '对象'},
|
||||
{v: document.getElementById('custom_data'), n: 'DOM'},
|
||||
{v: null, n: 'Null'},
|
||||
{n: '未设置 value'}
|
||||
]},
|
||||
{'v': '' , 'n': '无子级'}
|
||||
]
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -14,13 +14,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="grid_options.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="grid_options.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="grid_options.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -124,13 +124,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="grid_options.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="grid_options.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="grid_options.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -183,13 +183,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="grid_options.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="grid_options.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="grid_options.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -227,13 +227,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="grid_options.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="grid_options.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="grid_options.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -270,13 +270,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="grid_options.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="grid_options.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="grid_options.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -285,7 +285,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<p>在等宽的4网格中,网格不等高会碰到问题,为了解决这个问题,可使用<code>.clearfix</code>。<a href="grid_options.html#responsive-utilities">响应实用工具类</a>
|
||||
<p>在等宽的4网格中,网格不等高会碰到问题,为了解决这个问题,可使用<code>.clearfix</code>。<a href="#responsive-utilities">响应实用工具类</a>
|
||||
</p>
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-6 col-sm-3">
|
||||
@@ -315,13 +315,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="grid_options.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="grid_options.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="grid_options.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -358,13 +358,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="grid_options.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="grid_options.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="grid_options.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -401,13 +401,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="grid_options.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="grid_options.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="grid_options.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<h2>若依后台管理系统</h2>
|
||||
<p>ruoyi是一个完全响应式,基于Bootstrap3.3.6最新版本开发的扁平化主题,她采用了主流的左右两栏式布局,使用了Html5+CSS3等现代技术,她提供了诸多的强大的可以重新组合的UI组件,并集成了最新的jQuery版本(v2.1.1),当然,也集成了很多功能强大,用途广泛的就jQuery插件,她可以用于所有的Web应用程序,如<b>网站管理后台</b>,<b>网站会员中心</b>,<b>CMS</b>,<b>CRM</b>,<b>OA</b>等等,当然,您也可以对她进行深度定制,以做出更强系统。</p>
|
||||
<p>
|
||||
<b>当前版本:</b>v4.2.0
|
||||
<b>当前版本:</b>v4.4.0
|
||||
</p>
|
||||
<p>
|
||||
<span class="label label-warning">免费开源</span>
|
||||
@@ -56,7 +56,7 @@
|
||||
<h3>你好,若依 </h3>
|
||||
<p>H+是一个完全响应式,基于Bootstrap3.3.6最新版本开发的扁平化主题,她采用了主流的左右两栏式布局,使用了Html5+CSS3等现代技术,她提供了诸多的强大的可以重新组合的UI组件,并集成了最新的jQuery版本(v2.1.1),当然,也集成了很多功能强大,用途广泛的就jQuery插件,她可以用于所有的Web应用程序,如<b>网站管理后台</b>,<b>网站会员中心</b>,<b>CMS</b>,<b>CRM</b>,<b>OA</b>等等,当然,您也可以对她进行深度定制,以做出更强系统。</p>
|
||||
<p>
|
||||
<b>当前版本:</b>v4.2.0
|
||||
<b>当前版本:</b>v4.4.0
|
||||
</p>
|
||||
<p>
|
||||
<span class="label label-warning">开源免费</span>
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="tabs_panels.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="tabs_panels.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="tabs_panels.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -76,13 +76,13 @@
|
||||
<div class="panel-options">
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" href="tabs_panels.html#tab-4"><i class="fa fa-laptop"></i></a>
|
||||
<li class="active"><a data-toggle="tab" href="#tab-4"><i class="fa fa-laptop"></i></a>
|
||||
</li>
|
||||
<li class=""><a data-toggle="tab" href="tabs_panels.html#tab-5"><i class="fa fa-desktop"></i></a>
|
||||
<li class=""><a data-toggle="tab" href="#tab-5"><i class="fa fa-desktop"></i></a>
|
||||
</li>
|
||||
<li class=""><a data-toggle="tab" href="tabs_panels.html#tab-6"><i class="fa fa-signal"></i></a>
|
||||
<li class=""><a data-toggle="tab" href="#tab-6"><i class="fa fa-signal"></i></a>
|
||||
</li>
|
||||
<li class=""><a data-toggle="tab" href="tabs_panels.html#tab-7"><i class="fa fa-bar-chart-o"></i></a>
|
||||
<li class=""><a data-toggle="tab" href="#tab-7"><i class="fa fa-bar-chart-o"></i></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -273,13 +273,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="tabs_panels.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="tabs_panels.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="tabs_panels.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -293,7 +293,7 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="tabs_panels.html#collapseOne">标题 #1</a>
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">标题 #1</a>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="collapseOne" class="panel-collapse collapse in">
|
||||
@@ -305,7 +305,7 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="tabs_panels.html#collapseTwo">标题 #2</a>
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo">标题 #2</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapseTwo" class="panel-collapse collapse">
|
||||
@@ -317,7 +317,7 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="tabs_panels.html#collapseThree">标题 #3</a>
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#collapseThree">标题 #3</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapseThree" class="panel-collapse collapse">
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="icons.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="icons.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="icons.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="icons.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="icons.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="icons.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
|
||||
@@ -23,13 +23,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="graph_flot.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="graph_flot.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="graph_flot.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -50,13 +50,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="graph_flot.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="graph_flot.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="graph_flot.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -80,13 +80,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="graph_flot.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="graph_flot.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="graph_flot.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -107,13 +107,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="graph_flot.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="graph_flot.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="graph_flot.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -134,13 +134,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="graph_flot.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="graph_flot.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="graph_flot.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -161,13 +161,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="graph_flot.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="graph_flot.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="graph_flot.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -188,13 +188,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="graph_flot.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="graph_flot.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="graph_flot.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -215,13 +215,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="graph_flot.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="graph_flot.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="graph_flot.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -245,13 +245,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="graph_flot.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="graph_flot.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="graph_flot.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
|
||||
@@ -98,13 +98,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="graph_sparkline.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="graph_sparkline.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="graph_sparkline.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -125,13 +125,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="graph_sparkline.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="graph_sparkline.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="graph_sparkline.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
@@ -152,13 +152,13 @@
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="graph_sparkline.html#">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="graph_sparkline.html#">选项1</a>
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="graph_sparkline.html#">选项2</a>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
<!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('加载data数据')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div th:include="include :: footer"></div>
|
||||
<script th:inline="javascript">
|
||||
var datas = [[${@dict.getType('sys_normal_disable')}]];
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
data: [[${users}]],
|
||||
sidePagination: "client",
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field : 'userId',
|
||||
title : '用户ID'
|
||||
},
|
||||
{
|
||||
field : 'userCode',
|
||||
title : '用户编号'
|
||||
},
|
||||
{
|
||||
field : 'userName',
|
||||
title : '用户姓名'
|
||||
},
|
||||
{
|
||||
field : 'userPhone',
|
||||
title : '用户手机'
|
||||
},
|
||||
{
|
||||
field : 'userEmail',
|
||||
title : '用户邮箱'
|
||||
},
|
||||
{
|
||||
field : 'userBalance',
|
||||
title : '用户余额'
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '用户状态',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(datas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs" href="#"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs" href="#"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -108,7 +108,7 @@
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function onEditableSave (field, row, oldValue, $el) {
|
||||
function onEditableSave (field, row, rowIndex, oldValue, $el) {
|
||||
alert("字段名:" + field + ",当前值:" + row[field] + ",旧值:" + oldValue);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div th:include="include :: footer"></div>
|
||||
<th:block th:include="include :: bootstrap-table-export-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "demo/table";
|
||||
var datas = [[${@dict.getType('sys_normal_disable')}]];
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div th:include="include :: footer"></div>
|
||||
<th:block th:include="include :: bootstrap-table-fixed-columns-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "demo/table";
|
||||
var datas = [[${@dict.getType('sys_normal_disable')}]];
|
||||
@@ -36,6 +37,7 @@
|
||||
showColumns: false,
|
||||
fixedColumns: true,
|
||||
fixedNumber: 3,
|
||||
fixedRightNumber: 3,
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<div class="col-xs-12 select-table table-striped">
|
||||
<table id="bootstrap-table1"></table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -73,7 +73,7 @@
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<div class="col-xs-12 select-table table-striped">
|
||||
<table id="bootstrap-table2"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('表格打印配置')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<!-- data-show-print设置为true为显示工具栏上的“打印”按钮。
|
||||
data-print-as-filtered-and-sorted-on-ui为true时-在用户界面上按排序和过滤条件打印表格。请注意,如果设置为true以及用于过滤和排序的显式预定义打印选项(printFilter,printSortOrder,printSortColumn),则它们将应用于已由UI控件过滤和排序的数据。对于在UI上按过滤和排序方式打印数据-请勿设置以下3个选项:printFilter,printSortOrder,printSortColumn
|
||||
data-print-page-builder 接收html <table>元素作为字符串参数,返回html字符串进行打印。用于样式和添加页眉或页脚。
|
||||
data-print-sort-column 设置列字段名称以对打印表进行排序
|
||||
data-print-sort-order 有效值:“ asc”,“ desc”。仅当设置了printSortColumn时相关
|
||||
data-print-filter 设置值以按此列过滤打印的数据。
|
||||
data-print-formatter 函数(值,行,索引)-返回字符串。格式化打印表中此列的单元格值。函数行为类似于“ formatter”列选项
|
||||
printIgnore 设置为true可以在打印页面中隐藏此列。 -->
|
||||
<table id="bootstrap-table" data-show-print="true"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div th:include="include :: footer"></div>
|
||||
<th:block th:include="include :: bootstrap-table-print-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "demo/table";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field : 'userId',
|
||||
title : '用户ID'
|
||||
},
|
||||
{
|
||||
field : 'userCode',
|
||||
title : '用户编号'
|
||||
},
|
||||
{
|
||||
field : 'userName',
|
||||
title : '用户姓名'
|
||||
},
|
||||
{
|
||||
field : 'userPhone',
|
||||
title : '用户手机'
|
||||
},
|
||||
{
|
||||
field : 'userEmail',
|
||||
title : '用户邮箱'
|
||||
},
|
||||
{
|
||||
field : 'userBalance',
|
||||
title : '用户余额'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-danger btn-xs" href="javascript:;" onclick="remove(this)"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
// 假删除操作
|
||||
function remove(obj) {
|
||||
$.modal.confirm("确认要删除吗?", function() {
|
||||
$(obj).parents("tr").remove();
|
||||
$.modal.msgSuccess('已删除!');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,79 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('表格自动刷新')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<!-- data-auto-refresh设置true为启用自动刷新插件
|
||||
data-auto-refresh-interval为每次自动刷新发生的时间(以秒为单位)默认60。
|
||||
data-auto-refresh-silent设置为true可以自动无提示刷新。默认: true
|
||||
data-auto-refresh-status 设置true为启用自动刷新。这是表加载时自动刷新的状态。单击按钮切换此属性。这只是自动刷新的默认状态,因为用户始终可以通过单击按钮来更改它。 默认: true -->
|
||||
<table id="bootstrap-table" data-auto-refresh="true" data-auto-refresh-interval="30"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div th:include="include :: footer"></div>
|
||||
<th:block th:include="include :: bootstrap-table-auto-refresh-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "demo/table";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field : 'userId',
|
||||
title : '用户ID'
|
||||
},
|
||||
{
|
||||
field : 'userCode',
|
||||
title : '用户编号'
|
||||
},
|
||||
{
|
||||
field : 'userName',
|
||||
title : '用户姓名'
|
||||
},
|
||||
{
|
||||
field : 'userPhone',
|
||||
title : '用户手机'
|
||||
},
|
||||
{
|
||||
field : 'userEmail',
|
||||
title : '用户邮箱'
|
||||
},
|
||||
{
|
||||
field : 'userBalance',
|
||||
title : '用户余额'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-danger btn-xs" href="javascript:;" onclick="remove(this)"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
// 假删除操作
|
||||
function remove(obj) {
|
||||
$.modal.confirm("确认要删除吗?", function() {
|
||||
$(obj).parents("tr").remove();
|
||||
$.modal.msgSuccess('已删除!');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -35,7 +35,7 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<p class="select-title">时间条件查询</p>
|
||||
<form id="time-form">
|
||||
@@ -61,7 +61,30 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<p class="select-title">多级联动下拉查询</p>
|
||||
<form id="cxselect-form">
|
||||
<div class="select-list">
|
||||
<ul id="element">
|
||||
<li>
|
||||
商户编号:<input type="text" name="userId"/>
|
||||
</li>
|
||||
<li>
|
||||
充值类型:<select class="type"></select>
|
||||
</li>
|
||||
<li>
|
||||
充值路由:<select class="router"></select>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('cxselect-form')"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<p class="select-title">下拉多选条件查询</p>
|
||||
<form id="select-form">
|
||||
@@ -90,7 +113,7 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<p class="select-title">复杂条件查询</p>
|
||||
<form id="complex-form">
|
||||
@@ -151,7 +174,7 @@
|
||||
<span>-</span>
|
||||
<input type="text" class="time-input" placeholder="结束时间"/>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm m50" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('complex-form')"><i class="fa fa-refresh"></i> 重置</a>
|
||||
@@ -164,5 +187,16 @@
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: bootstrap-select-js" />
|
||||
<th:block th:include="include :: jquery-cxselect-js" />
|
||||
|
||||
<script th:inline="javascript">
|
||||
// 直接返回获取
|
||||
var data = [{"v":"taobao","n":"淘宝","s":[{"v":"tm","n":"天猫"},{"v":"jhs","n":"聚划算"}]},{"v":"jd","n":"京东","s":[{"v":"jdcs","n":"京东超市"},{"v":"jdsx","n":"京东生鲜"}]}];
|
||||
$('#element').cxSelect({
|
||||
selects: ['type', 'router'],
|
||||
jsonValue: 'v',
|
||||
data: data
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,207 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('主子表提交')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="main-content">
|
||||
<form id="form-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 is-required">客户名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="name" placeholder="请输入客户名称" class="form-control" type="text" maxlength="30">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">用户性别:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="sex" class="form-control" 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="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">手机号码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="phonenumber" name="phonenumber" placeholder="请输入手机号码" class="form-control" type="text" maxlength="11">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">生日:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="birthday" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</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">
|
||||
<textarea name="remark" maxlength="500" class="form-control" rows="3"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="form-header h4">商品数据</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="addColumn()"><i class="fa fa-plus"> 增加</i></button>
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="sub.delColumn()"><i class="fa fa-minus"> 删除</i></button>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</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>
|
||||
<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 :: datetimepicker-js" />
|
||||
<script th:src="@{/js/jquery.tmpl.js}"></script>
|
||||
<script th:inline="javascript">
|
||||
$(function() {
|
||||
var options = {
|
||||
pagination: false,
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
sidePagination: "client",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'index',
|
||||
align: 'center',
|
||||
title: "序号",
|
||||
formatter: function (value, row, index) {
|
||||
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
|
||||
return columnIndex + $.table.serialNumber(index);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'name',
|
||||
align: 'center',
|
||||
title: '商品名称',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='goods[%s].name' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'weight',
|
||||
align: 'center',
|
||||
title: '商品重量',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='goods[%s].weight' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'date',
|
||||
align: 'center',
|
||||
title: '商品日期',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='goods[%s].date' value='%s' placeholder='yyyy-MM-dd'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'price',
|
||||
align: 'center',
|
||||
title: '商品价格',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='goods[%s].price' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'type',
|
||||
align: 'center',
|
||||
title: '商品种类',
|
||||
formatter: function(value, row, index) {
|
||||
var data = [{ index: index, type: value }];
|
||||
return $("#goodsTypeTpl").tmpl(data).html();
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
/* 主子表-提交 */
|
||||
function submitHandler(index, layero){
|
||||
var data = $("#form-add").serializeArray();
|
||||
$.operate.saveModal("/demo/operate/customer/add", data);
|
||||
}
|
||||
|
||||
$("input[name='birthday']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
function bindDatetimepicker() {
|
||||
$("input[name$='date']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true,
|
||||
pickerPosition:'top-right'
|
||||
});
|
||||
}
|
||||
|
||||
function addColumn() {
|
||||
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
||||
sub.editColumn();
|
||||
|
||||
$("#" + table.options.id).bootstrapTable('insertRow', {
|
||||
index: count,
|
||||
row: {
|
||||
index: $.table.serialNumber(count),
|
||||
name: "",
|
||||
weight: "",
|
||||
price: "",
|
||||
date: "",
|
||||
type: "",
|
||||
}
|
||||
});
|
||||
|
||||
bindDatetimepicker();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- 商品类型 -->
|
||||
<script id="goodsTypeTpl" type="text/x-jquery-tmpl">
|
||||
<div>
|
||||
<select class='form-control' name='goods[${index}].type'>
|
||||
<option value="">所有</option>
|
||||
<option value="0" {{if type==="0"}}selected{{/if}}>寒性</option>
|
||||
<option value="1" {{if type==="1"}}selected{{/if}}>热性</option>
|
||||
</select>
|
||||
</div>
|
||||
</script>
|
||||
@@ -10,10 +10,10 @@
|
||||
<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-table/bootstrap-table.min.css?v=20200727}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/animate.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/style.css?v=20200318}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/style.css?v=20200727}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.4.0}" rel="stylesheet"/>
|
||||
</head>
|
||||
|
||||
<!-- 通用JS -->
|
||||
@@ -22,27 +22,22 @@
|
||||
<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?v=20191219}"></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>
|
||||
<script th:src="@{/ajax/libs/bootstrap-table/bootstrap-table.min.js?v=20200727}"></script>
|
||||
<script th:src="@{/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js?v=20200727}"></script>
|
||||
<script th:src="@{/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js?v=20200727}"></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>
|
||||
<script th:src="@{/ajax/libs/validate/jquery.validate.extend.js}"></script>
|
||||
<!-- jquery-validate 表单树插件 -->
|
||||
<script th:src="@{/ajax/libs/bootstrap-treetable/bootstrap-treetable.js}"></script>
|
||||
<!-- jquery-export 表格导出插件 -->
|
||||
<script th:src="@{/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js}"></script>
|
||||
<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/layer/layer.min.js}"></script>
|
||||
<script th:src="@{/ajax/libs/layui/layui.js}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.2.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.2.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.4.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.4.0}"></script>
|
||||
<script th:inline="javascript"> var ctx = [[@{/}]]; </script>
|
||||
</div>
|
||||
|
||||
@@ -97,12 +92,12 @@
|
||||
<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"/>
|
||||
<!-- cropper图像裁剪插件 -->
|
||||
<div th:fragment="cropper-css">
|
||||
<link th:href="@{/ajax/libs/cropper/cropper.min.css}" rel="stylesheet"/>
|
||||
</div>
|
||||
<div th:fragment="cropbox-js">
|
||||
<script th:src="@{/ajax/libs/cropbox/cropbox.js}"></script>
|
||||
<div th:fragment="cropper-js">
|
||||
<script th:src="@{/ajax/libs/cropper/cropper.min.js}"></script>
|
||||
</div>
|
||||
|
||||
<!-- jasny功能扩展插件 -->
|
||||
@@ -139,6 +134,11 @@
|
||||
<script th:src="@{/ajax/libs/typeahead/bootstrap3-typeahead.min.js}"></script>
|
||||
</div>
|
||||
|
||||
<!-- 多级联动下拉 -->
|
||||
<div th:fragment="jquery-cxselect-js">
|
||||
<script th:src="@{/ajax/libs/cxselect/jquery.cxselect.min.js}"></script>
|
||||
</div>
|
||||
|
||||
<!-- jsonview格式化和语法高亮JSON格式数据查看插件 -->
|
||||
<div th:fragment="jsonview-css">
|
||||
<link th:href="@{/ajax/libs/jsonview/jquery.jsonview.css}" rel="stylesheet"/>
|
||||
@@ -182,5 +182,26 @@
|
||||
</div>
|
||||
<div th:fragment="bootstrap-table-editable-js">
|
||||
<script th:src="@{/ajax/libs/bootstrap-table/extensions/editable/bootstrap-editable.min.js}"></script>
|
||||
<script th:src="@{/ajax/libs/bootstrap-table/extensions/editable/bootstrap-table-editable.js}"></script>
|
||||
</div>
|
||||
<script th:src="@{/ajax/libs/bootstrap-table/extensions/editable/bootstrap-table-editable.min.js?v=20200727}"></script>
|
||||
</div>
|
||||
|
||||
<!-- 表格导出插件 -->
|
||||
<div th:fragment="bootstrap-table-export-js">
|
||||
<script th:src="@{/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js}"></script>
|
||||
<script th:src="@{/ajax/libs/bootstrap-table/extensions/export/tableExport.js}"></script>
|
||||
</div>
|
||||
|
||||
<!-- 表格冻结列插件 -->
|
||||
<div th:fragment="bootstrap-table-fixed-columns-js">
|
||||
<script th:src="@{/ajax/libs/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.min.js?v=20200727}"></script>
|
||||
</div>
|
||||
|
||||
<!-- 表格自动刷新插件 -->
|
||||
<div th:fragment="bootstrap-table-auto-refresh-js">
|
||||
<script th:src="@{/ajax/libs/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.min.js?v=20200729}"></script>
|
||||
</div>
|
||||
|
||||
<!-- 表格打印插件 -->
|
||||
<div th:fragment="bootstrap-table-print-js">
|
||||
<script th:src="@{/ajax/libs/bootstrap-table/extensions/print/bootstrap-table-print.min.js?v=20200729}"></script>
|
||||
</div>
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
<title>若依系统首页</title>
|
||||
<!-- 避免IE使用兼容模式 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link th:href="@{favicon.ico}" rel="stylesheet"/>
|
||||
<link th:href="@{favicon.ico}" rel="shortcut icon"/>
|
||||
<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/jquery.contextMenu.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/animate.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/style.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/skins.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.2.0}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.4.0}" rel="stylesheet"/>
|
||||
</head>
|
||||
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow: hidden">
|
||||
<div id="wrapper">
|
||||
@@ -26,17 +26,17 @@
|
||||
</div>
|
||||
<a th:href="@{/index}">
|
||||
<li class="logo hidden-xs">
|
||||
<span class="logo-lg">RuoYi</span>
|
||||
<span class="logo-lg">RuoYi</span>
|
||||
</li>
|
||||
</a>
|
||||
<div class="sidebar-collapse">
|
||||
<ul class="nav" id="side-menu">
|
||||
<li>
|
||||
<div class="user-panel">
|
||||
<a class="menuItem" title="个人中心" th:href="@{/system/user/profile}">
|
||||
<a class="menuItem noactive" title="个人中心" th:href="@{/system/user/profile}">
|
||||
<div class="hide" th:text="个人中心"></div>
|
||||
<div class="pull-left image">
|
||||
<img th:src="(${user.avatar} == '') ? @{/img/profile.jpg} : @{${user.avatar}}" class="img-circle" alt="User Image">
|
||||
<img th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" th:onerror="this.src='img/profile.jpg'" class="img-circle" alt="User Image">
|
||||
</div>
|
||||
</a>
|
||||
<div class="pull-left info">
|
||||
@@ -47,27 +47,24 @@
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#"><i class="fa fa-home"></i> <span class="nav-label">主页</span> <span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level">
|
||||
<li><a class="menuItem" th:href="@{/system/main}">了解若依</a></li>
|
||||
</ul>
|
||||
<a class="menuItem" th:href="@{/system/main}"><i class="fa fa-home"></i> <span class="nav-label">首页</span> </a>
|
||||
</li>
|
||||
<li th:each="menu : ${menus}">
|
||||
<a th:class="@{${menu.url != '' && menu.url != '#'} ? ${menu.target}}" th:href="@{${menu.url == ''} ? |#| : ${menu.url}}">
|
||||
<a th:class="@{${!#strings.isEmpty(menu.url) && menu.url != '#'} ? ${menu.target}}" th:href="@{${#strings.isEmpty(menu.url)} ? |#| : ${menu.url}}">
|
||||
<i class="fa fa-bar-chart-o" th:class="${menu.icon}"></i>
|
||||
<span class="nav-label" th:text="${menu.menuName}">一级菜单</span>
|
||||
<span th:class="${menu.url == '' || menu.url == '#'} ? |fa arrow|"></span>
|
||||
<span class="nav-label" th:text="${menu.menuName}">一级菜单</span>
|
||||
<span th:class="${#strings.isEmpty(menu.url) || menu.url == '#'} ? |fa arrow|"></span>
|
||||
</a>
|
||||
<ul class="nav nav-second-level collapse">
|
||||
<li th:each="cmenu : ${menu.children}">
|
||||
<a th:if="${#lists.isEmpty(cmenu.children)}" th:class="${cmenu.target == ''} ? |menuItem| : ${cmenu.target}" th:utext="${cmenu.menuName}" th:href="@{${cmenu.url}}">二级菜单</a>
|
||||
<a th:if="${#lists.isEmpty(cmenu.children)}" th:class="${#strings.isEmpty(cmenu.target)} ? |menuItem| : ${cmenu.target}" th:utext="${cmenu.menuName}" th:href="@{${cmenu.url}}">二级菜单</a>
|
||||
<a th:if="${not #lists.isEmpty(cmenu.children)}" href="#">[[${cmenu.menuName}]]<span class="fa arrow"></span></a>
|
||||
<ul th:if="${not #lists.isEmpty(cmenu.children)}" class="nav nav-third-level">
|
||||
<li th:each="emenu : ${cmenu.children}">
|
||||
<a th:if="${#lists.isEmpty(emenu.children)}" th:class="${emenu.target == ''} ? |menuItem| : ${emenu.target}" th:text="${emenu.menuName}" th:href="@{${emenu.url}}">三级菜单</a>
|
||||
<a th:if="${#lists.isEmpty(emenu.children)}" th:class="${#strings.isEmpty(emenu.target)} ? |menuItem| : ${emenu.target}" th:text="${emenu.menuName}" th:href="@{${emenu.url}}">三级菜单</a>
|
||||
<a th:if="${not #lists.isEmpty(emenu.children)}" href="#">[[${emenu.menuName}]]<span class="fa arrow"></span></a>
|
||||
<ul th:if="${not #lists.isEmpty(emenu.children)}" class="nav nav-four-level">
|
||||
<li th:each="fmenu : ${emenu.children}"><a th:if="${#lists.isEmpty(fmenu.children)}" th:class="${fmenu.target == ''} ? |menuItem| : ${fmenu.target}" th:text="${fmenu.menuName}" th:href="@{${fmenu.url}}">四级菜单</a></li>
|
||||
<li th:each="fmenu : ${emenu.children}"><a th:if="${#lists.isEmpty(fmenu.children)}" th:class="${#strings.isEmpty(fmenu.target)} ? |menuItem| : ${fmenu.target}" th:text="${fmenu.menuName}" th:href="@{${fmenu.url}}">四级菜单</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -95,6 +92,7 @@
|
||||
<li><a class="menuItem" th:href="@{/demo/form/summernote}">富文本编辑器</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/duallistbox}">左右互选组件</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/autocomplete}">搜索自动补全</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/cxselect}">多级联动下拉</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <a>表格<span class="fa arrow"></span></a>
|
||||
@@ -108,6 +106,7 @@
|
||||
<li><a class="menuItem" th:href="@{/demo/table/params}">自定义查询参数</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/multi}">初始多表格</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/button}">点击按钮加载表格</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/data}">直接加载表格数据</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/fixedColumns}">表格冻结列</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/event}">自定义触发事件</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/detail}">表格细节视图</a></li>
|
||||
@@ -116,6 +115,9 @@
|
||||
<li><a class="menuItem" th:href="@{/demo/table/curd}">动态增删改查</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/reorder}">表格拖拽操作</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/editable}">表格行内编辑</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/subdata}">主子表提交</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/refresh}">表格自动刷新</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/print}">表格打印配置</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/other}">表格其他操作</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -147,8 +149,8 @@
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#"><i class="fa fa-sitemap"></i> <span class="nav-label">四层菜单 </span><span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level collapse">
|
||||
<a href="#"><i class="fa fa-sitemap"></i>四层菜单<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-third-level collapse">
|
||||
<li>
|
||||
<a href="#" id="damian">三级菜单1<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-third-level">
|
||||
@@ -169,7 +171,7 @@
|
||||
</div>
|
||||
</nav>
|
||||
<!--左侧导航结束-->
|
||||
|
||||
|
||||
<!--右侧部分开始-->
|
||||
<div id="page-wrapper" class="gray-bg dashbard-1">
|
||||
<div class="row border-bottom">
|
||||
@@ -185,7 +187,7 @@
|
||||
<li><a title="全屏显示" href="javascript:void(0)" id="fullScreen"><i class="fa fa-arrows-alt"></i> 全屏显示</a></li>
|
||||
<li class="dropdown user-menu">
|
||||
<a href="javascript:void(0)" class="dropdown-toggle" data-hover="dropdown">
|
||||
<img th:src="(${user.avatar} == '') ? @{/img/profile.jpg} : @{${user.avatar}}" class="user-image">
|
||||
<img th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" th:onerror="this.src='img/profile.jpg'" class="user-image">
|
||||
<span class="hidden-xs">[[${#strings.defaultString(user.userName, '-')}]]</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
@@ -217,7 +219,7 @@
|
||||
</button>
|
||||
<nav class="page-tabs menuTabs">
|
||||
<div class="page-tabs-content">
|
||||
<a href="javascript:;" class="active menuTab" data-id="/system/main">首页</a>
|
||||
<a href="javascript:;" class="active menuTab" th:data-id="@{/system/main}">首页</a>
|
||||
</div>
|
||||
</nav>
|
||||
<button class="roll-nav roll-right tabRight">
|
||||
@@ -225,11 +227,11 @@
|
||||
</button>
|
||||
<a href="javascript:void(0);" class="roll-nav roll-right tabReload"><i class="fa fa-refresh"></i> 刷新</a>
|
||||
</div>
|
||||
|
||||
|
||||
<a id="ax_close_max" class="ax_close_max" href="#" title="关闭全屏"> <i class="fa fa-times-circle-o"></i> </a>
|
||||
|
||||
|
||||
<div class="row mainContent" id="content-main">
|
||||
<iframe class="RuoYi_iframe" name="iframe0" width="100%" height="100%" data-id="/system/main"
|
||||
<iframe class="RuoYi_iframe" name="iframe0" width="100%" height="100%" th:data-id="@{/system/main}"
|
||||
th:src="@{/system/main}" frameborder="0" seamless></iframe>
|
||||
</div>
|
||||
<div class="footer">
|
||||
@@ -246,8 +248,8 @@
|
||||
<script th:src="@{/js/jquery.contextMenu.min.js}"></script>
|
||||
<script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
|
||||
<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.2.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.2.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.4.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.4.0}"></script>
|
||||
<script th:src="@{/ruoyi/index.js}"></script>
|
||||
<script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script>
|
||||
<script th:inline="javascript">
|
||||
@@ -258,8 +260,8 @@ var skin = storage.get("skin");
|
||||
var mode = "history";
|
||||
// 历史访问路径缓存
|
||||
var historyPath = storage.get("historyPath");
|
||||
// 排除非左侧菜单链接
|
||||
var excludesUrl = ["/system/user/profile"];
|
||||
// 是否页签与菜单联动
|
||||
var isLinkage = true;
|
||||
|
||||
// 本地主题优先,未设置取系统配置
|
||||
if($.common.isNotEmpty(skin)){
|
||||
@@ -289,9 +291,9 @@ function switchSkin() {
|
||||
/** 刷新时访问路径页签 */
|
||||
function applyPath(url) {
|
||||
$('a[href$="' + decodeURI(url) + '"]').click();
|
||||
if($.inArray(url, excludesUrl)){
|
||||
$('a[href$="' + url + '"]').parent("li").addClass("selected").parents("li").addClass("active").end().parents("ul").addClass("in");
|
||||
}
|
||||
if (!$('a[href$="' + url + '"]').hasClass("noactive")) {
|
||||
$('a[href$="' + url + '"]').parent("li").addClass("selected").parents("li").addClass("active").end().parents("ul").addClass("in");
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/style.css" th:href="@{/css/style.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/login.min.css" th:href="@{/css/login.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.2.0}" rel="stylesheet"/>
|
||||
<link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.4.0}" rel="stylesheet"/>
|
||||
<!-- 360浏览器急速模式 -->
|
||||
<meta name="renderer" content="webkit">
|
||||
<!-- 避免IE使用兼容模式 -->
|
||||
@@ -78,7 +78,7 @@
|
||||
<script src="../static/ajax/libs/validate/messages_zh.min.js" th:src="@{/ajax/libs/validate/messages_zh.min.js}"></script>
|
||||
<script src="../static/ajax/libs/layer/layer.min.js" th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||
<script src="../static/ajax/libs/blockUI/jquery.blockUI.js" th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.2.0}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.4.0}"></script>
|
||||
<script src="../static/ruoyi/login.js" th:src="@{/ruoyi/login.js}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -96,13 +96,158 @@
|
||||
<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="#v44">v4.4.0</a><code class="pull-right">2020.08.24</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v44" class="panel-collapse collapse in">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>升级bootstrapTable到最新版本1.17.1</li>
|
||||
<li>升级shiro到最新版1.6.0 阻止权限绕过漏洞</li>
|
||||
<li>升级fastjson到最新版1.2.73</li>
|
||||
<li>代码生成支持同步数据库</li>
|
||||
<li>代码生成支持富文本控件</li>
|
||||
<li>用户密码支持自定义配置规则</li>
|
||||
<li>新增表格自动刷新插件</li>
|
||||
<li>新增表格打印配置插件</li>
|
||||
<li>更换图片裁剪工具为cropper</li>
|
||||
<li>Excel支持sort导出排序</li>
|
||||
<li>代码生成支持自定义路径</li>
|
||||
<li>代码生成支持选择上级菜单</li>
|
||||
<li>代码生成支持上传控件</li>
|
||||
<li>新增表格参数(自定义加载文本的字体大小loadingFontSize)</li>
|
||||
<li>Excel注解支持设置BigDecimal精度&舍入规则</li>
|
||||
<li>操作日志记录排除敏感属性字段</li>
|
||||
<li>修复不同浏览器附件下载中文名乱码的问题</li>
|
||||
<li>用户分配角色不允许选择超级管理员角色</li>
|
||||
<li>更换表格冻结列插件</li>
|
||||
<li>添加右侧冻结列示例</li>
|
||||
<li>升级表格行编辑&移动端适应插件</li>
|
||||
<li>修复更新表格插件后无法设置实例配置问题</li>
|
||||
<li>修复更新表格插件后导致的主子表错误</li>
|
||||
<li>修复页面存在多表格,回调函数res数据不正确问题</li>
|
||||
<li>强退&过期清理登录帐号缓存会话</li>
|
||||
<li>表格树标题内容支持html语义化标签</li>
|
||||
<li>修复配置应用的访问路径首页页签重复问题</li>
|
||||
<li>优化openTab打开时滚动到当前页签</li>
|
||||
<li>表格请求方式method支持自定义配置</li>
|
||||
<li>菜单页签联动优化</li>
|
||||
<li>用户邮箱长度限制修改为50</li>
|
||||
<li>主子表示例添加日期格式案例</li>
|
||||
<li>修改表格行内编辑示例旧值参数</li>
|
||||
<li>操作日志查询方式调整</li>
|
||||
<li>唯一限制条件只返回单条数据</li>
|
||||
<li>修改Excel设置STRING单元格类型</li>
|
||||
<li>添加获取当前的环境配置方法</li>
|
||||
<li>截取返回参数长度,防止超出异常</li>
|
||||
<li>定时任务cron表达式验证</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="#v431">v4.3.1</a><code class="pull-right">2020.07.05</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v431" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>国家信息安全漏洞(请务必保持cipherKey密钥唯一性)</li>
|
||||
<li>升级shiro到最新版1.5.3 阻止权限绕过漏洞</li>
|
||||
<li>修改验证码在使用后清除,防止多次使用</li>
|
||||
<li>检查字符支持小数点&降级改成异常提醒</li>
|
||||
<li>openOptions函数中加入自定义maxmin属性</li>
|
||||
<li>支持openOptions方法最大化</li>
|
||||
<li>支持openOptions方法多个按钮回调</li>
|
||||
<li>新增isLinkage支持页签与菜单联动</li>
|
||||
<li>修改代码生成导入表结构出现异常页面不提醒问题</li>
|
||||
<li>优化用户头像发生错误,则显示一个默认头像</li>
|
||||
<li>Excel导出支持字典类型</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="#v43">v4.3.0</a><code class="pull-right">2020.06.22</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v43" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>代码生成模板支持主子表</li>
|
||||
<li>代码生成显示类型支持复选框</li>
|
||||
<li>前端表单样式修改成圆角</li>
|
||||
<li>新增回显数据字典(字符串数组)</li>
|
||||
<li>修复浏览器手动缩放比例后菜单无法自适应问题</li>
|
||||
<li>限制用户不允许选择系统管理员角色</li>
|
||||
<li>用户信息添加输入框组图标&鼠标按下显示密码</li>
|
||||
<li>升级fastjson到最新版1.2.70 修复高危安全漏洞</li>
|
||||
<li>升级Bootstrap版本到v3.3.7</li>
|
||||
<li>修复selectColumns方法获取子对象数据无效问题</li>
|
||||
<li>修改数据源类型优先级,先根据方法,再根据类</li>
|
||||
<li>修改上级部门(选择项排除本身和下级)</li>
|
||||
<li>首页菜单显示调整</li>
|
||||
<li>添加是否开启swagger配置</li>
|
||||
<li>新增示例(主子表提交)</li>
|
||||
<li>新增示例(多级联动下拉示例)</li>
|
||||
<li>新增示例(表格属性data数据加载)</li>
|
||||
<li>新增表格列参数(是否列选项可见ignore)</li>
|
||||
<li>新增表格参数(是否启用显示卡片视图cardView)</li>
|
||||
<li>新增表格参数(是否显示全屏按钮showFullscreen)</li>
|
||||
<li>新增表格参数(是否启用分页条无限循环的功能paginationLoop)</li>
|
||||
<li>新增表格参数(是否显示表头showHeader)</li>
|
||||
<li>表格添加显示/隐藏所有列方法 showAllColumns/hideAllColumns</li>
|
||||
<li>修复部分情况节点不展开问题</li>
|
||||
<li>修复关闭标签页后刷新还是上次地址问题</li>
|
||||
<li>修复选择菜单后刷新页面,菜单箭头显示不对问题</li>
|
||||
<li>修复jquery表单序列化时复选框未选中不会序列化到对象中问题</li>
|
||||
<li>Excel支持readConverterExp读取字符串组内容</li>
|
||||
<li>更换IP地址查询接口</li>
|
||||
<li>默认关闭获取ip地址</li>
|
||||
<li>操作处理ajaxSuccess判断修正</li>
|
||||
<li>HttpUtils.sendPost()方法,参数无需拼接参数到url</li>
|
||||
<li>通用http发送方法增加参数 contentType 编码类型</li>
|
||||
<li>HTML过滤器不替换&实体</li>
|
||||
<li>代码生成浮点型改用BigDecimal</li>
|
||||
<li>修复表单构建单选和多选框渲染问题</li>
|
||||
<li>代码生成模板调整,字段为String并且必填则加空串条件</li>
|
||||
<li>字典数据查询列表根据dictSort升序排序</li>
|
||||
<li>修复树表对imageView和tooltip方法无效问题</li>
|
||||
<li>修复Long类型比较相等问题调整</li>
|
||||
<li>示例demo页面清除html链接,防止点击后跳转出现404</li>
|
||||
<li>在线用户强退方法合并</li>
|
||||
<li>添加校验部门包含未停用的子部门</li>
|
||||
<li>取消回车自动提交表单</li>
|
||||
<li>'A','I','BUTTON' 标签忽略clickToSelect事件,防止点击操作按钮时选中</li>
|
||||
<li>邮箱显示截取部分字符串,防止低分辨率错位</li>
|
||||
<li>代码生成列属性根据sort排序</li>
|
||||
<li>修复更多操作部分浏览器不兼容情况</li>
|
||||
<li>图片预览事件属性修正</li>
|
||||
<li>修复冻结列排序样式无效问题</li>
|
||||
<li>修复context-path的情况下个人中心刷新导致样式问题</li>
|
||||
<li>全屏editFull打开适配表树</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="#v42">v4.2.0</a><code class="pull-right">2020.03.23</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v42" class="panel-collapse collapse in">
|
||||
<div id="v42" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>用户管理添加分配角色页面</li>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: bootstrap-table-export-js" />
|
||||
<script th:inline="javascript">
|
||||
var forceFlag = [[${@permission.hasPermi('monitor:online:forceLogout')}]];
|
||||
var prefix = ctx + "monitor/online";
|
||||
@@ -61,7 +62,10 @@
|
||||
},
|
||||
{
|
||||
field: 'sessionId',
|
||||
title: '会话编号'
|
||||
title: '会话编号',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.tooltip(value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'loginName',
|
||||
@@ -125,8 +129,8 @@
|
||||
// 单条强退
|
||||
function forceLogout(sessionId) {
|
||||
$.modal.confirm("确定要强制选中用户下线吗?", function() {
|
||||
var data = { "sessionId": sessionId };
|
||||
$.operate.post(prefix + "/forceLogout", data);
|
||||
var data = { "ids": sessionId };
|
||||
$.operate.post(prefix + "/batchForceLogout", data);
|
||||
})
|
||||
}
|
||||
|
||||
@@ -139,7 +143,7 @@
|
||||
}
|
||||
$.modal.confirm("确认要强退选中的" + rows.length + "条数据吗?", function() {
|
||||
var url = prefix + "/batchForceLogout";
|
||||
var data = { "ids": rows };
|
||||
var data = { "ids": rows.join() };
|
||||
$.operate.post(url, data);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
detailUrl: prefix + "/detail/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
queryParams: queryParams,
|
||||
sortName: "operTime",
|
||||
sortOrder: "desc",
|
||||
modalName: "操作日志",
|
||||
@@ -148,10 +149,14 @@
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function queryParams(params) {
|
||||
var search = $.table.queryParams(params);
|
||||
search.businessTypes = $.common.join($('#businessTypes').selectpicker('val'));
|
||||
return search;
|
||||
}
|
||||
|
||||
function searchPre() {
|
||||
var data = {};
|
||||
data.businessTypes = $.common.join($('#businessTypes').selectpicker('val'));
|
||||
$.table.search('operlog-form', 'bootstrap-table', data);
|
||||
$.table.search('operlog-form', 'bootstrap-table');
|
||||
}
|
||||
|
||||
function resetPre() {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/style.css" th:href="@{/css/style.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/login.min.css" th:href="@{/css/login.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.2.0}" rel="stylesheet"/>
|
||||
<link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.4.0}" rel="stylesheet"/>
|
||||
<!-- 360浏览器急速模式 -->
|
||||
<meta name="renderer" content="webkit">
|
||||
<!-- 避免IE使用兼容模式 -->
|
||||
@@ -77,7 +77,7 @@
|
||||
<script src="../static/ajax/libs/validate/messages_zh.min.js" th:src="@{/ajax/libs/validate/messages_zh.min.js}"></script>
|
||||
<script src="../static/ajax/libs/layer/layer.min.js" th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||
<script src="../static/ajax/libs/blockUI/jquery.blockUI.js" th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.2.0}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.4.0}"></script>
|
||||
<script src="../static/ruoyi/register.js" th:src="@{/ruoyi/register.js}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
</ul>
|
||||
</body>
|
||||
<script th:src="@{/js/jquery.min.js}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.2.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.4.0}"></script>
|
||||
<script type="text/javascript">
|
||||
//皮肤样式列表
|
||||
var skins = ["skin-blue", "skin-green", "skin-purple", "skin-red", "skin-yellow"];
|
||||
|
||||
@@ -113,11 +113,12 @@
|
||||
/*部门管理-修改-选择部门树*/
|
||||
function selectDeptTree() {
|
||||
var deptId = $("#treeId").val();
|
||||
var excludeId = $("input[name='deptId']").val();
|
||||
if(deptId > 0) {
|
||||
var options = {
|
||||
title: '部门选择',
|
||||
width: "380",
|
||||
url: prefix + "/selectDeptTree/" + $("#treeId").val(),
|
||||
url: prefix + "/selectDeptTree/" + $("#treeId").val() + "/" + excludeId,
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
|
||||
@@ -28,8 +28,11 @@
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: ztree-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/dept"
|
||||
var deptId = [[${deptId}]];
|
||||
var excludeId = [[${excludeId}]];
|
||||
$(function() {
|
||||
var url = ctx + "system/dept/treeData";
|
||||
var url = $.common.isEmpty(excludeId) ? prefix + "/treeData": prefix + "/treeData/" + excludeId;
|
||||
var options = {
|
||||
url: url,
|
||||
expandLevel: 2,
|
||||
|
||||
@@ -70,8 +70,8 @@
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
queryParams: queryParams,
|
||||
sortName: "createTime",
|
||||
sortOrder: "desc",
|
||||
sortName: "dictSort",
|
||||
sortOrder: "asc",
|
||||
modalName: "数据",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
var more = [];
|
||||
more.push("<a class='btn btn-default btn-xs " + editFlag + "' href='javascript:void(0)' onclick='authDataScope(" + row.roleId + ")'><i class='fa fa-check-square-o'></i>数据权限</a> ");
|
||||
more.push("<a class='btn btn-default btn-xs " + editFlag + "' href='javascript:void(0)' onclick='authUser(" + row.roleId + ")'><i class='fa fa-user'></i>分配用户</a>");
|
||||
actions.push('<a class="btn btn-info btn-xs" role="button" data-toggle="popover" data-content="' + more.join('') + '"><i class="fa fa-chevron-circle-right"></i>更多操作</a>');
|
||||
actions.push('<a tabindex="0" class="btn btn-info btn-xs" role="button" data-container="body" data-placement="left" data-toggle="popover" data-html="true" data-trigger="hover" data-content="' + more.join('') + '"><i class="fa fa-chevron-circle-right"></i>更多操作</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
|
||||
@@ -35,7 +35,10 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">手机号码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="phonenumber" name="phonenumber" placeholder="请输入手机号码" class="form-control" type="text" maxlength="11" required>
|
||||
<div class="input-group">
|
||||
<input id="phonenumber" name="phonenumber" placeholder="请输入手机号码" class="form-control" type="text" maxlength="11" required>
|
||||
<span class="input-group-addon"><i class="fa fa-mobile"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -43,7 +46,10 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">邮箱:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="email" name="email" class="form-control email" type="text" maxlength="20" placeholder="请输入邮箱" required>
|
||||
<div class="input-group">
|
||||
<input id="email" name="email" class="form-control email" type="text" maxlength="50" placeholder="请输入邮箱" required>
|
||||
<span class="input-group-addon"><i class="fa fa-envelope"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -61,7 +67,12 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">登录密码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="password" placeholder="请输入登录密码" class="form-control" type="password" th:value="${@config.getKey('sys.user.initPassword')}" required>
|
||||
<div class="input-group">
|
||||
<input id="password" name="password" placeholder="请输入登录密码" class="form-control" type="password" th:value="${@config.getKey('sys.user.initPassword')}" required>
|
||||
<span class="input-group-addon" title="登录密码,鼠标按下显示密码"
|
||||
onmousedown="$('#password').attr('type','text')"
|
||||
onmouseup="$('#password').attr('type','password')"><i class="fa fa-key"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -210,7 +221,9 @@
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
var chrtype = [[${#strings.defaultString(@config.getKey('sys.account.chrtype'), 0)}]];
|
||||
var password = $("#password").val();
|
||||
if ($.validate.form() && checkpwd(chrtype, password)) {
|
||||
var data = $("#form-user-add").serializeArray();
|
||||
var status = $("input[id='status']").is(':checked') == true ? 0 : 1;
|
||||
var roleIds = $.form.selectCheckeds("role");
|
||||
@@ -222,7 +235,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
/*用户管理-新增-选择部门树*/
|
||||
/* 用户管理-新增-选择部门树 */
|
||||
function selectDeptTree() {
|
||||
var treeId = $("#treeId").val();
|
||||
var deptId = $.common.isEmpty(treeId) ? "100" : $("#treeId").val();
|
||||
|
||||
@@ -47,36 +47,42 @@
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/user/authRole";
|
||||
var userRoles = [[${userRoles}]]
|
||||
var roles = [[${roles}]]
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: ctx + "system/role/list",
|
||||
data: roles,
|
||||
sidePagination: "client",
|
||||
sortName: "roleSort",
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
clickToSelect: true,
|
||||
maintainSelected: true,
|
||||
columns: [{
|
||||
checkbox: true,
|
||||
formatter:function (value, row, index) {
|
||||
for (var i = 0; i < userRoles.length; i++) {
|
||||
if (userRoles[i].roleId == row.roleId) {
|
||||
return { checked: true };
|
||||
}
|
||||
if($.common.isEmpty(value)) {
|
||||
return { checked: row.flag };
|
||||
} else {
|
||||
return { checked: value }
|
||||
}
|
||||
return { checked: false };
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'roleId',
|
||||
title: '角色编号'
|
||||
},
|
||||
{
|
||||
field: 'roleSort',
|
||||
title: '排序',
|
||||
sortable: true,
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'roleName',
|
||||
title: '角色名称',
|
||||
sortable: true
|
||||
title: '角色名称'
|
||||
},
|
||||
{
|
||||
field: 'roleKey',
|
||||
|
||||
@@ -36,7 +36,10 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">手机号码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="phonenumber" placeholder="请输入手机号码" class="form-control" type="text" maxlength="11" th:field="*{phonenumber}" required>
|
||||
<div class="input-group">
|
||||
<input name="phonenumber" placeholder="请输入手机号码" class="form-control" type="text" maxlength="11" th:field="*{phonenumber}" required>
|
||||
<span class="input-group-addon"><i class="fa fa-mobile"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -44,7 +47,10 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">邮箱:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="email" class="form-control email" type="text" maxlength="20" placeholder="请输入邮箱" th:field="*{email}" required>
|
||||
<div class="input-group">
|
||||
<input name="email" class="form-control email" type="text" maxlength="50" placeholder="请输入邮箱" th:field="*{email}" required>
|
||||
<span class="input-group-addon"><i class="fa fa-envelope"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -194,7 +200,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
/*用户管理-修改-选择部门树*/
|
||||
/* 用户管理-修改-选择部门树 */
|
||||
function selectDeptTree() {
|
||||
var deptId = $.common.isEmpty($("#treeId").val()) ? "100" : $("#treeId").val();
|
||||
var url = ctx + "system/dept/selectDeptTree/" + deptId;
|
||||
|
||||
@@ -2,82 +2,259 @@
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改用户头像')" />
|
||||
<th:block th:include="include :: cropbox-css" />
|
||||
<th:block th:include="include :: cropper-css" />
|
||||
<style type='text/css'>
|
||||
/* avator css start */
|
||||
.container {
|
||||
margin: 10px 5px 5px 5px;
|
||||
}
|
||||
|
||||
.action {
|
||||
padding: 5px 0px;
|
||||
}
|
||||
|
||||
.cropped {
|
||||
width: 200px;
|
||||
border: 1px #ddd solid;
|
||||
box-shadow: 0px 0px 12px #ddd;
|
||||
}
|
||||
|
||||
.img-preview {
|
||||
border-radius: 50%;
|
||||
box-shadow: 0px 0px 12px #7e7e7e;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.preview-box {
|
||||
text-align: center;
|
||||
margin: 0px auto;
|
||||
margin-top: 10px;
|
||||
color: #bbb;
|
||||
}
|
||||
|
||||
.preview-md {
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
}
|
||||
|
||||
.preview-sm {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
}
|
||||
|
||||
.preview-xs {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
}
|
||||
|
||||
.imageBox {
|
||||
border: 1px solid #aaa;
|
||||
overflow: hidden;
|
||||
cursor: move;
|
||||
box-shadow: 4px 4px 12px #B0B0B0;
|
||||
margin: 0px auto;
|
||||
}
|
||||
|
||||
.btn-custom {
|
||||
float: right;
|
||||
width: 46px;
|
||||
display: inline-block;
|
||||
margin-bottom: 10px;
|
||||
height: 37px;
|
||||
line-height: 37px;
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
margin: 0px 2px;
|
||||
background-color: #f38e81;
|
||||
border-radius: 3px;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
box-shadow: 0px 0px 5px #B0B0B0;
|
||||
border: 0px #fff solid;
|
||||
}
|
||||
/*选择文件上传*/
|
||||
.new-contentarea {
|
||||
width: 165px;
|
||||
overflow: hidden;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.new-contentarea label {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.new-contentarea input[type=file] {
|
||||
width: 188px;
|
||||
height: 60px;
|
||||
background: #333;
|
||||
margin: 0 auto;
|
||||
position: absolute;
|
||||
right: 50%;
|
||||
margin-right: -94px;
|
||||
top: 0;
|
||||
right/*\**/: 0px\9;
|
||||
margin-right/*\**/: 0px\9;
|
||||
width/*\**/: 10px\9;
|
||||
opacity: 0;
|
||||
filter: alpha(opacity=0);
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
a.upload-img {
|
||||
width: 165px;
|
||||
display: inline-block;
|
||||
margin-bottom: 10px;
|
||||
height: 37px;
|
||||
line-height: 37px;
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
background-color: #f38e81;
|
||||
border-radius: 3px;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
border: 0px #fff solid;
|
||||
box-shadow: 0px 0px 5px #B0B0B0;
|
||||
}
|
||||
|
||||
a.upload-img:hover {
|
||||
background-color: #ec7e70;
|
||||
}
|
||||
|
||||
.tc {
|
||||
text-align: center;
|
||||
}
|
||||
/* avator css end */
|
||||
</style>
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="container">
|
||||
<div class="imageBox">
|
||||
<div class="thumbBox"></div>
|
||||
<div class="spinner" style="display: none">Loading...</div>
|
||||
</div>
|
||||
<div class="action">
|
||||
<div class="new-contentarea tc">
|
||||
<a href="javascript:void(0)" class="upload-img"> <label for="avatar">上传图像</label> </a>
|
||||
<input type="file" class="" name="avatar" id="avatar" accept="image/*"/>
|
||||
</div>
|
||||
<input type="button" id="btnCrop" class="Btnsty_peyton" value="裁切" />
|
||||
<input type="button" id="btnZoomIn" class="Btnsty_peyton" value="+" />
|
||||
<input type="button" id="btnZoomOut" class="Btnsty_peyton" value="-" />
|
||||
</div>
|
||||
<div class="cropped"></div>
|
||||
</div>
|
||||
<div class="row container">
|
||||
<div class="col-md-10">
|
||||
<div class="imageBox">
|
||||
<img id="avatar" th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" >
|
||||
</div>
|
||||
<div class="action">
|
||||
<div class="new-contentarea tc">
|
||||
<a href="javascript:void(0)" class="upload-img"><label for="inputImage">上传图像</label> </a>
|
||||
<input type="file" name="avatar" id="inputImage" accept="image/*"/>
|
||||
</div>
|
||||
<button type="button" class="btn-custom" data-method="zoom" data-option="0.1"><i class="fa fa-search-plus"></i></button>
|
||||
<button type="button" class="btn-custom" data-method="zoom" data-option="-0.1"><i class="fa fa-search-minus"></i></button>
|
||||
<button type="button" class="btn-custom" data-method="rotate" data-option="-45"><i class="fa fa-rotate-left"></i></button>
|
||||
<button type="button" class="btn-custom" data-method="rotate" data-option="45"><i class="fa fa-rotate-right"></i></button>
|
||||
<button type="button" class="btn-custom" data-method="scaleX" data-option="-1"><i class="fa fa-arrows-h"></i></button>
|
||||
<button type="button" class="btn-custom" data-method="scaleY" data-option="-1"><i class="fa fa-arrows-v"></i></button>
|
||||
<button type="button" class="btn-custom" data-method="reset"><i class="fa fa-refresh"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="cropped">
|
||||
<div class="preview-box">
|
||||
<div class="img-preview preview-xs"></div>
|
||||
</div>
|
||||
<div class="preview-box">
|
||||
<div class="img-preview preview-sm"></div>
|
||||
</div>
|
||||
<div class="preview-box">
|
||||
<div class="img-preview preview-md"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: cropbox-js" />
|
||||
<th:block th:include="include :: cropper-js" />
|
||||
<script type="text/javascript">
|
||||
var cropper;
|
||||
var croppable = false;
|
||||
$(window).load(function() {
|
||||
var avatar = '[[${user.avatar}]]';
|
||||
var options = {
|
||||
thumbBox: '.thumbBox',
|
||||
spinner: '.spinner',
|
||||
imgSrc: $.common.isEmpty(avatar) ? ctx + 'img/profile.jpg' : ctx + avatar.substr(1)
|
||||
}
|
||||
cropper = $('.imageBox').cropbox(options);
|
||||
$('#avatar').on('change', function() {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
options.imgSrc = e.target.result;
|
||||
//根据MIME判断上传的文件是不是图片类型
|
||||
if((options.imgSrc).indexOf("image/")==-1){
|
||||
$.modal.alertWarning("文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。");
|
||||
} else {
|
||||
cropper = $('.imageBox').cropbox(options);
|
||||
}
|
||||
}
|
||||
reader.readAsDataURL(this.files[0]);
|
||||
})
|
||||
|
||||
$('#btnCrop').on('click', function(){
|
||||
var img = cropper.getDataURL();
|
||||
$('.cropped').html('');
|
||||
$('.cropped').append('<img src="'+img+'" align="absmiddle" style="width:64px;margin-top:4px;border-radius:64px;box-shadow:0px 0px 12px #7E7E7E;" ><p>64px*64px</p>');
|
||||
$('.cropped').append('<img src="'+img+'" align="absmiddle" style="width:128px;margin-top:4px;border-radius:128px;box-shadow:0px 0px 12px #7E7E7E;"><p>128px*128px</p>');
|
||||
$('.cropped').append('<img src="'+img+'" align="absmiddle" style="width:180px;margin-top:4px;border-radius:180px;box-shadow:0px 0px 12px #7E7E7E;"><p>180px*180px</p>');
|
||||
var image = document.getElementById('avatar');
|
||||
cropper = new Cropper(image, {
|
||||
aspectRatio: 1,
|
||||
viewMode: 1,
|
||||
autoCropArea: 0.9,
|
||||
preview: '.img-preview',
|
||||
ready: function () {
|
||||
croppable = true;
|
||||
}
|
||||
})
|
||||
|
||||
$('#btnZoomIn').on('click', function(){
|
||||
cropper.zoomIn();
|
||||
})
|
||||
|
||||
$('#btnZoomOut').on('click', function(){
|
||||
cropper.zoomOut();
|
||||
|
||||
$('#inputImage').on('change', function() {
|
||||
var reader = new FileReader();
|
||||
var file = $('#inputImage')[0].files[0];
|
||||
if (/^image\/\w+$/.test(file.type)) {
|
||||
reader.onload = function(e) {
|
||||
if(croppable){
|
||||
cropper.replace(e.target.result)
|
||||
}
|
||||
}
|
||||
reader.readAsDataURL(this.files[0]);
|
||||
} else {
|
||||
$.modal.alertWarning('请选择一个图片文件。');
|
||||
}
|
||||
});
|
||||
|
||||
$('.btn-custom').on('click',function (e) {
|
||||
if (!croppable) {
|
||||
$.modal.alertWarning("裁剪框加载中,请稍后...");
|
||||
return;
|
||||
}
|
||||
var data = {
|
||||
method: $(this).data('method'),
|
||||
option: $(this).data('option') || undefined,
|
||||
};
|
||||
var result = cropper[data.method](data.option, data.secondOption);
|
||||
if(['scaleX','scaleY'].indexOf(data.method) !== -1){
|
||||
$(this).data('option', -data.option)
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
var img = cropper.getBlob();
|
||||
var formdata = new FormData();
|
||||
formdata.append("avatarfile", img);
|
||||
$.ajax({
|
||||
url: ctx + "system/user/profile/updateAvatar",
|
||||
data: formdata,
|
||||
type: "post",
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(result) {
|
||||
$.operate.saveSuccess(result);
|
||||
if (!croppable) {
|
||||
$.modal.alertWarning("裁剪框加载中,请稍后...");
|
||||
return
|
||||
}
|
||||
cropper.getCroppedCanvas().toBlob(function(img) {
|
||||
var formdata = new FormData();
|
||||
formdata.append("avatarfile", img);
|
||||
$.ajax({
|
||||
url: ctx + "system/user/profile/updateAvatar",
|
||||
data: formdata,
|
||||
type: "post",
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(result) {
|
||||
$.operate.saveSuccess(result);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
$(window).resize(function() {
|
||||
$('.imageBox').height($(window).height() - 80);
|
||||
$('.cropped').height($(window).height() - 40);
|
||||
}).resize();
|
||||
|
||||
if (!HTMLCanvasElement.prototype.toBlob) {
|
||||
Object.defineProperty(HTMLCanvasElement.prototype, 'toBlob', {
|
||||
value: function(callback, type, quality) {
|
||||
var canvas = this;
|
||||
setTimeout(function() {
|
||||
var binStr = atob(canvas.toDataURL(type, quality).split(',')[1]);
|
||||
var len = binStr.length;
|
||||
var arr = new Uint8Array(len);
|
||||
for (var i = 0; i < len; i++) {
|
||||
arr[i] = binStr.charCodeAt(i);
|
||||
}
|
||||
callback(new Blob([arr], {
|
||||
type: type || 'image/png'
|
||||
}));
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('用户个人信息')" />
|
||||
<style type="text/css">.user-info-head{position:relative;display:inline-block;}.user-info-head:hover:after{content:'\f030';position:absolute;left:0;right:0;top:0;bottom:0;color:#eee;background:rgba(0,0,0,0.5);font-family:FontAwesome;font-size:24px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;cursor:pointer;line-height:110px;border-radius:50%;}</style>
|
||||
</head>
|
||||
|
||||
<body class="gray-bg" style="font: 14px Helvetica Neue, Helvetica, PingFang SC, 微软雅黑, Tahoma, Arial, sans-serif !important;">
|
||||
@@ -15,7 +16,7 @@
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="text-center">
|
||||
<p><img class="img-circle img-lg" th:src="(${user.avatar} == '') ? @{/img/profile.jpg} : @{${user.avatar}}"></p>
|
||||
<p class="user-info-head" onclick="avatar()"><img class="img-circle img-lg" th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}"></p>
|
||||
<p><a href="javascript:avatar()">修改头像</a></p>
|
||||
</div>
|
||||
<ul class="list-group list-group-striped">
|
||||
@@ -29,15 +30,15 @@
|
||||
</li>
|
||||
<li class="list-group-item" th:if="${user.dept?.deptName != null}"><i class="fa fa-group"></i>
|
||||
<b class="font-noraml">所属部门:</b>
|
||||
<p class="pull-right" >[[${user.dept?.deptName}]] / [[${#strings.defaultString(postGroup,'无岗位')}]]</p>
|
||||
<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>
|
||||
<p class="pull-right" th:title="${user.email}">[[${#strings.abbreviate(user.email, 16)}]]</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>
|
||||
<p class="pull-right">[[${#dates.format(user.createTime, 'yyyy-MM-dd')}]]</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -76,7 +77,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">邮箱:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="email" th:field="*{email}" placeholder="请输入邮箱">
|
||||
<input type="text" maxlength="50" class="form-control" name="email" th:field="*{email}" placeholder="请输入邮箱">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -143,9 +144,28 @@
|
||||
/*用户管理-头像*/
|
||||
function avatar() {
|
||||
var url = ctx + 'system/user/profile/avatar';
|
||||
$.modal.open("修改头像", url);
|
||||
top.layer.open({
|
||||
type: 2,
|
||||
area: [$(window).width() + 'px', $(window).height() + 'px'],
|
||||
fix: false,
|
||||
//不固定
|
||||
maxmin: true,
|
||||
shade: 0.3,
|
||||
title: "修改头像",
|
||||
content: url,
|
||||
btn: ['确定', '关闭'],
|
||||
// 弹层外区域关闭
|
||||
shadeClose: true,
|
||||
yes: function(index, layero) {
|
||||
var iframeWin = layero.find('iframe')[0];
|
||||
iframeWin.contentWindow.submitHandler(index, layero);
|
||||
},
|
||||
cancel: function(index) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/*用户信息-修改*/
|
||||
$("#form-user-edit").validate({
|
||||
onkeyup: false,
|
||||
@@ -263,7 +283,9 @@
|
||||
});
|
||||
|
||||
function submitChangPassword () {
|
||||
if ($.validate.form("form-user-resetPwd")) {
|
||||
var chrtype = [[${#strings.defaultString(@config.getKey('sys.account.chrtype'), 0)}]];
|
||||
var password = $("#newPassword").val();
|
||||
if ($.validate.form("form-user-resetPwd") && checkpwd(chrtype, password)) {
|
||||
$.operate.saveModal(ctx + "system/user/profile/resetPwd", $('#form-user-resetPwd').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,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="password" name="confirm" id="confirm">
|
||||
<input class="form-control" type="password" name="confirmPassword" id="confirmPassword">
|
||||
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 请再次输入您的密码</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -57,7 +57,7 @@
|
||||
minlength: 5,
|
||||
maxlength: 20
|
||||
},
|
||||
confirm: {
|
||||
confirmPassword: {
|
||||
required: true,
|
||||
equalTo: "#newPassword"
|
||||
}
|
||||
@@ -72,7 +72,7 @@
|
||||
minlength: "密码不能小于6个字符",
|
||||
maxlength: "密码不能大于20个字符"
|
||||
},
|
||||
confirm: {
|
||||
confirmPassword: {
|
||||
required: "请再次输入新密码",
|
||||
equalTo: "两次密码输入不一致"
|
||||
}
|
||||
@@ -82,7 +82,9 @@
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
var chrtype = [[${#strings.defaultString(@config.getKey('sys.account.chrtype'), 0)}]];
|
||||
var password = $("#newPassword").val();
|
||||
if ($.validate.form() && checkpwd(chrtype, password)) {
|
||||
$.operate.save(ctx + "system/user/profile/resetPwd", $('#form-user-resetPwd').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
var more = [];
|
||||
more.push("<a class='btn btn-default btn-xs " + resetPwdFlag + "' href='javascript:void(0)' onclick='resetPwd(" + row.userId + ")'><i class='fa fa-key'></i>重置密码</a> ");
|
||||
more.push("<a class='btn btn-default btn-xs " + editFlag + "' href='javascript:void(0)' onclick='authRole(" + row.userId + ")'><i class='fa fa-check-square-o'></i>分配角色</a>");
|
||||
actions.push('<a class="btn btn-info btn-xs" role="button" data-toggle="popover" data-content="' + more.join('') + '"><i class="fa fa-chevron-circle-right"></i>更多操作</a>');
|
||||
actions.push('<a tabindex="0" class="btn btn-info btn-xs" role="button" data-container="body" data-placement="left" data-toggle="popover" data-html="true" data-trigger="hover" data-content="' + more.join('') + '"><i class="fa fa-chevron-circle-right"></i>更多操作</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
|
||||
@@ -162,12 +162,7 @@
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<script th:src="@{/ajax/libs/beautifyhtml/beautifyhtml.js}"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){setup_draggable();$("#n-columns").on("change",function(){var v=$(this).val();if(v==="1"){var $col=$(".form-body .col-md-12").toggle(true);$(".form-body .col-md-6 .draggable").each(function(i,el){$(this).remove().appendTo($col)});$(".form-body .col-md-6").toggle(false)}else{var $col=$(".form-body .col-md-6").toggle(true);$(".form-body .col-md-12 .draggable").each(function(i,el){$(this).remove().appendTo(i%2?$col[1]:$col[0])});$(".form-body .col-md-12").toggle(false)}});$("#copy-to-clipboard").on("click",function(){var $copy=$(".form-body").clone().appendTo(document.body);$copy.find(".tools, :hidden").remove();$.each(["draggable","droppable","sortable","dropped","ui-sortable","ui-draggable","ui-droppable","form-body"],function(i,c){$copy.find("."+c).removeClass(c).removeAttr("style")});var html=html_beautify($copy.html());$copy.remove();$modal=get_modal(html).modal("show");$modal.find(".btn").remove();$modal.find(".modal-title").html("复制HTML代码");$modal.find(":input:first").select().focus();return false})});var setup_draggable=function(){$(".draggable").draggable({appendTo:"body",helper:"clone"});$(".droppable").droppable({accept:".draggable",helper:"clone",hoverClass:"droppable-active",drop:function(event,ui){$(".empty-form").remove();var $orig=$(ui.draggable);if(!$(ui.draggable).hasClass("dropped")){var $el=$orig.clone().addClass("dropped").css({"position":"static","left":null,"right":null}).appendTo(this);var id=$orig.find(":input").attr("id");if(id){id=id.split("-").slice(0,-1).join("-")+"-"+(parseInt(id.split("-").slice(-1)[0])+1);$orig.find(":input").attr("id",id);$orig.find("label").attr("for",id)}$('<p class="tools col-sm-12 col-sm-offset-3"> <a class="edit-link">编辑HTML<a> | <a class="remove-link">移除</a></p>').appendTo($el)}else{if($(this)[0]!=$orig.parent()[0]){var $el=$orig.clone().css({"position":"static","left":null,"right":null}).appendTo(this);$orig.remove()}}}}).sortable()};var get_modal=function(content){var modal=$('<div class="modal" style="overflow: auto;" tabindex="-1"> <div class="modal-dialog"><div class="modal-content"><div class="modal-header"><a type="button" class="close" data-dismiss="modal" aria-hidden="true">×</a><h4 class="modal-title">编辑HTML</h4></div><div class="modal-body ui-front"> <textarea class="form-control textarea-show-src" style="min-height: 200px; margin-bottom: 10px;font-family: Monaco, Fixed"></textarea><button class="btn btn-success">更新HTML</button></div></div></div></div>').appendTo(document.body);var doms = document.getElementsByClassName("textarea-show-src");for (var i = 0; i < doms.length; i++) {doms.item(i).innerHTML = content;}return modal};$(document).on("click",".edit-link",function(ev){var $el=$(this).parent().parent();var $el_copy=$el.clone();var $edit_btn=$el_copy.find(".edit-link").parent().remove();var $modal=get_modal(html_beautify($el_copy.html())).modal("show");$modal.find(":input:first").focus();$modal.find(".btn-success").click(function(ev2){var html=$modal.find("textarea").val();if(!html){$el.remove()}else{$el.html(html);$edit_btn.appendTo($el)}$modal.modal("hide");return false})});$(document).on("click",".remove-link",function(ev){$(this).parent().parent().remove()});
|
||||
$(".input-group.date").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
$(document).ready(function(){setup_draggable();$("#n-columns").on("change",function(){var v=$(this).val();if(v==="1"){var $col=$(".form-body .col-md-12").toggle(true);$(".form-body .col-md-6 .draggable").each(function(i,el){$(this).remove().appendTo($col)});$(".form-body .col-md-6").toggle(false)}else{var $col=$(".form-body .col-md-6").toggle(true);$(".form-body .col-md-12 .draggable").each(function(i,el){$(this).remove().appendTo(i%2?$col[1]:$col[0])});$(".form-body .col-md-12").toggle(false)}});$("#copy-to-clipboard").on("click",function(){var $copy=$(".form-body").clone().appendTo(document.body);$copy.find(".tools, :hidden").remove();$.each(["draggable","droppable","sortable","dropped","ui-sortable","ui-draggable","ui-droppable","form-body"],function(i,c){$copy.find("."+c).removeClass(c).removeAttr("style")});var html=html_beautify($copy.html());$copy.remove();$modal=get_modal(html).modal("show");$modal.find(".btn").remove();$modal.find(".modal-title").html("复制HTML代码");$modal.find(":input:first").select().focus();return false})});var setup_draggable=function(){$(".draggable").draggable({appendTo:"body",helper:"clone"});$(".droppable").droppable({accept:".draggable",helper:"clone",hoverClass:"droppable-active",drop:function(event,ui){$(".empty-form").remove();var $orig=$(ui.draggable);if(!$(ui.draggable).hasClass("dropped")){var $el=$orig.clone().addClass("dropped").css({"position":"static","left":null,"right":null}).appendTo(this);if($el.find("label").hasClass("radio-box")){$el=$el.html('<label class="col-sm-3 control-label">单选框:</label>'+'<div class="col-sm-9">'+'<label class="radio-box"><input type="radio" checked="" value="option1" id="optionsRadios1" name="optionsRadios">选项1</label>'+'<label class="radio-box"><input type="radio" value="option2" id="optionsRadios2" name="optionsRadios">选项2</label>'+"</div>")}else{if($el.find("label").hasClass("check-box")){$el=$el.html('<label class="col-sm-3 control-label">复选框:</label>'+'<div class="col-sm-9">'+'<label class="check-box">'+'<input type="checkbox" value="option1" id="inlineCheckbox1">选项1</label>'+'<label class="check-box">'+'<input type="checkbox" value="option2" id="inlineCheckbox2">选项2</label>'+'<label class="check-box">'+'<input type="checkbox" value="option3" id="inlineCheckbox3">选项3</label>'+"</div>")}}var id=$orig.find(":input").attr("id");if(id){id=id.split("-").slice(0,-1).join("-")+"-"+(parseInt(id.split("-").slice(-1)[0])+1);$orig.find(":input").attr("id",id);$orig.find("label").attr("for",id)}$('<p class="tools col-sm-12 col-sm-offset-3"> <a class="edit-link">编辑HTML<a> | <a class="remove-link">移除</a></p>').appendTo($el)}else{if($(this)[0]!=$orig.parent()[0]){var $el=$orig.clone().css({"position":"static","left":null,"right":null}).appendTo(this);$orig.remove()}}}}).sortable()};var get_modal=function(content){var modal=$('<div class="modal" style="overflow: auto;" tabindex="-1"> <div class="modal-dialog"><div class="modal-content"><div class="modal-header"><a type="button" class="close" data-dismiss="modal" aria-hidden="true">×</a><h4 class="modal-title">编辑HTML</h4></div><div class="modal-body ui-front"> <textarea class="form-control textarea-show-src" style="min-height: 200px; margin-bottom: 10px;font-family: Monaco, Fixed"></textarea><button class="btn btn-success">更新HTML</button></div></div></div></div>').appendTo(document.body);var doms=document.getElementsByClassName("textarea-show-src");for(var i=0;i<doms.length;i++){doms.item(i).innerHTML=content}return modal};$(document).on("click",".edit-link",function(ev){var $el=$(this).parent().parent();var $el_copy=$el.clone();var $edit_btn=$el_copy.find(".edit-link").parent().remove();var $modal=get_modal(html_beautify($el_copy.html())).modal("show");$modal.find(":input:first").focus();$modal.find(".btn-success").click(function(ev2){var html=$modal.find("textarea").val();if(!html){$el.remove()}else{$el.html(html);$edit_btn.appendTo($el)}$modal.modal("hide");return false})});$(document).on("click",".remove-link",function(ev){$(this).parent().parent().remove()});$(".input-group.date").datetimepicker({format:"yyyy-mm-dd",minView:"month",autoclose:true});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+85
-79
@@ -5,96 +5,102 @@
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.2.0</version>
|
||||
<version>4.4.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
|
||||
<description>
|
||||
common通用工具
|
||||
</description>
|
||||
|
||||
<description>
|
||||
common通用工具
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- Spring框架基本的核心工具 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context-support</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringWeb模块 -->
|
||||
<dependency>
|
||||
|
||||
<!-- Spring框架基本的核心工具 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context-support</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringWeb模块 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!--Shiro核心框架 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- pagehelper 分页插件 -->
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 自定义验证注解 -->
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--常用工具类 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- JSON工具类 -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 阿里JSON解析器 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- io常用工具类 -->
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 文件上传工具类 -->
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- excel工具 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- yml解析器 -->
|
||||
<dependency>
|
||||
<groupId>org.yaml</groupId>
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- servlet包 -->
|
||||
|
||||
<!-- Shiro使用EhCache缓存框架 -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-ehcache</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- pagehelper 分页插件 -->
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 自定义验证注解 -->
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--常用工具类 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- JSON工具类 -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 阿里JSON解析器 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- io常用工具类 -->
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 文件上传工具类 -->
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- excel工具 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- yml解析器 -->
|
||||
<dependency>
|
||||
<groupId>org.yaml</groupId>
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- servlet包 -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
</project>
|
||||
@@ -10,7 +10,9 @@ import com.ruoyi.common.enums.DataSourceType;
|
||||
|
||||
/**
|
||||
* 自定义多数据源切换注解
|
||||
*
|
||||
*
|
||||
* 优先级:先方法,后类,如果方法覆盖了类上的数据源类型,以方法的为准,否则以类上的为准
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Target({ ElementType.METHOD, ElementType.TYPE })
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 自定义导出Excel数据注解
|
||||
@@ -14,6 +15,11 @@ import java.lang.annotation.Target;
|
||||
@Target(ElementType.FIELD)
|
||||
public @interface Excel
|
||||
{
|
||||
/**
|
||||
* 导出时在excel中排序
|
||||
*/
|
||||
public int sort() default Integer.MAX_VALUE;
|
||||
|
||||
/**
|
||||
* 导出到Excel中的名字.
|
||||
*/
|
||||
@@ -24,11 +30,31 @@ public @interface Excel
|
||||
*/
|
||||
public String dateFormat() default "";
|
||||
|
||||
/**
|
||||
* 如果是字典类型,请设置字典的type值 (如: sys_user_sex)
|
||||
*/
|
||||
public String dictType() default "";
|
||||
|
||||
/**
|
||||
* 读取内容转表达式 (如: 0=男,1=女,2=未知)
|
||||
*/
|
||||
public String readConverterExp() default "";
|
||||
|
||||
/**
|
||||
* 分隔符,读取字符串组内容
|
||||
*/
|
||||
public String separator() default ",";
|
||||
|
||||
/**
|
||||
* BigDecimal 精度 默认:-1(默认不开启BigDecimal格式化)
|
||||
*/
|
||||
public int scale() default -1;
|
||||
|
||||
/**
|
||||
* BigDecimal 舍入规则 默认:BigDecimal.ROUND_HALF_EVEN
|
||||
*/
|
||||
public int roundingMode() default BigDecimal.ROUND_HALF_EVEN;
|
||||
|
||||
/**
|
||||
* 导出类型(0数字 1字符串)
|
||||
*/
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.ruoyi.common.annotation;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Inherited;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
@@ -13,7 +12,6 @@ import java.lang.annotation.Target;
|
||||
* @author ruoyi
|
||||
*
|
||||
*/
|
||||
@Inherited
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
|
||||
@@ -12,6 +12,11 @@ public class Constants
|
||||
*/
|
||||
public static final String UTF8 = "UTF-8";
|
||||
|
||||
/**
|
||||
* GBK 字符集
|
||||
*/
|
||||
public static final String GBK = "GBK";
|
||||
|
||||
/**
|
||||
* 通用成功标识
|
||||
*/
|
||||
@@ -31,7 +36,7 @@ public class Constants
|
||||
* 注销
|
||||
*/
|
||||
public static final String LOGOUT = "Logout";
|
||||
|
||||
|
||||
/**
|
||||
* 注册
|
||||
*/
|
||||
|
||||
@@ -13,6 +13,9 @@ public class GenConstants
|
||||
/** 树表(增删改查) */
|
||||
public static final String TPL_TREE = "tree";
|
||||
|
||||
/** 主子表(增删改查) */
|
||||
public static final String TPL_SUB = "sub";
|
||||
|
||||
/** 树编码字段 */
|
||||
public static final String TREE_CODE = "treeCode";
|
||||
|
||||
@@ -22,6 +25,12 @@ public class GenConstants
|
||||
/** 树名称字段 */
|
||||
public static final String TREE_NAME = "treeName";
|
||||
|
||||
/** 上级菜单ID字段 */
|
||||
public static final String PARENT_MENU_ID = "parentMenuId";
|
||||
|
||||
/** 上级菜单名称字段 */
|
||||
public static final String PARENT_MENU_NAME = "parentMenuName";
|
||||
|
||||
/** 数据库字符串类型 */
|
||||
public static final String[] COLUMNTYPE_STR = { "char", "varchar", "narchar", "varchar2", "tinytext", "text",
|
||||
"mediumtext", "longtext" };
|
||||
@@ -68,6 +77,12 @@ public class GenConstants
|
||||
/** 日期控件 */
|
||||
public static final String HTML_DATETIME = "datetime";
|
||||
|
||||
/** 上传控件 */
|
||||
public static final String HTML_UPLOAD = "upload";
|
||||
|
||||
/** 富文本控件 */
|
||||
public static final String HTML_SUMMERNOTE = "summernote";
|
||||
|
||||
/** 字符串类型 */
|
||||
public static final String TYPE_STRING = "String";
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ package com.ruoyi.common.constant;
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface ScheduleConstants
|
||||
public class ScheduleConstants
|
||||
{
|
||||
public static final String TASK_CLASS_NAME = "TASK_CLASS_NAME";
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ package com.ruoyi.common.constant;
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface ShiroConstants
|
||||
public class ShiroConstants
|
||||
{
|
||||
/**
|
||||
* 当前登录的用户
|
||||
|
||||
@@ -19,14 +19,17 @@ public class UserConstants
|
||||
public static final String EXCEPTION = "1";
|
||||
|
||||
/** 用户封禁状态 */
|
||||
public static final String USER_BLOCKED = "1";
|
||||
public static final String USER_DISABLE = "1";
|
||||
|
||||
/** 角色封禁状态 */
|
||||
public static final String ROLE_BLOCKED = "1";
|
||||
public static final String ROLE_DISABLE = "1";
|
||||
|
||||
/** 部门正常状态 */
|
||||
public static final String DEPT_NORMAL = "0";
|
||||
|
||||
/** 部门停用状态 */
|
||||
public static final String DEPT_DISABLE = "1";
|
||||
|
||||
/** 字典正常状态 */
|
||||
public static final String DICT_NORMAL = "0";
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user