Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d02f8f7e7 | ||
|
|
70205922fc | ||
|
|
f3d1f0afe2 | ||
|
|
7ee6ad8aec | ||
|
|
4ff9afac23 | ||
|
|
167970e5c4 | ||
|
|
29395be19a | ||
|
|
da01f093f8 | ||
|
|
f53515eb70 | ||
|
|
84dde0dcf2 | ||
|
|
df1c283335 | ||
|
|
faa4bfaef3 | ||
|
|
eef7ef6544 | ||
|
|
22d42048ab | ||
|
|
e5b905c455 | ||
|
|
c64f027e66 | ||
|
|
96934ca139 | ||
|
|
f4c763c84d | ||
|
|
8cd0d9f366 | ||
|
|
6a7f727f70 | ||
|
|
62381f0472 | ||
|
|
2952337f15 | ||
|
|
c719be609a | ||
|
|
6253e41658 | ||
|
|
bd0e574268 | ||
|
|
6e176c807c | ||
|
|
2bdf12b1e1 | ||
|
|
67f2ba2aa9 | ||
|
|
c105f44eb9 | ||
|
|
e23a6919af | ||
|
|
b362e58646 | ||
|
|
db3e571af0 | ||
|
|
52fe19e933 | ||
|
|
7b3ab45ecc | ||
|
|
e337f685bc | ||
|
|
13287e02eb | ||
|
|
d4a33eab94 | ||
|
|
0ca327f538 | ||
|
|
31bd27fcf0 | ||
|
|
dcfc062c01 | ||
|
|
daa8286804 | ||
|
|
5a3714e9bc | ||
|
|
abe1f0d63e | ||
|
|
c95cb70af3 | ||
|
|
47bd3c4c10 | ||
|
|
1c8f55c2c1 | ||
|
|
0f9558a825 | ||
|
|
8a4d37e975 | ||
|
|
7fbabe1a8e | ||
|
|
53cd4867df | ||
|
|
7aa4872cb9 | ||
|
|
8fcc548d34 | ||
|
|
d318b719fc | ||
|
|
d6db5963d5 | ||
|
|
d5f4bba084 | ||
|
|
960dee7756 | ||
|
|
08f775da4b | ||
|
|
2a0fcdea21 | ||
|
|
3f0a34e20f | ||
|
|
289161b8c6 | ||
|
|
47b51fe965 | ||
|
|
0c0efc9455 | ||
|
|
dd86447176 | ||
|
|
3427223da2 | ||
|
|
1959b02220 | ||
|
|
acf8ea428f | ||
|
|
6e476e40af | ||
|
|
25d07b11cc | ||
|
|
36013e6139 | ||
|
|
87d3c9a93c | ||
|
|
d1b3f4f397 | ||
|
|
5c5961f1b4 | ||
|
|
e932a7ead1 | ||
|
|
20db92ecf5 | ||
|
|
e1c855b091 | ||
|
|
693498b877 | ||
|
|
0ef403d785 | ||
|
|
d8b2a9a905 | ||
|
|
6df2609d1a | ||
|
|
608f05b21b | ||
|
|
8145485cff | ||
|
|
7506ac77cb | ||
|
|
5142e2d668 | ||
|
|
ef1cf982e3 | ||
|
|
12d550d2b6 | ||
|
|
2304f95b13 | ||
|
|
a4be143104 | ||
|
|
0209ed0326 | ||
|
|
55846c5658 | ||
|
|
799815c273 | ||
|
|
baa689b098 | ||
|
|
e4bc44115a | ||
|
|
53bb1da7a1 | ||
|
|
977ceb562e | ||
|
|
0264da8d7c | ||
|
|
94e23ec0f8 | ||
|
|
7610e138dc | ||
|
|
b04c6833a3 | ||
|
|
035c326071 | ||
|
|
e7660d94c9 | ||
|
|
5f996472e1 | ||
|
|
7cbdc0eb8e | ||
|
|
615aa58bea | ||
|
|
de7e2f1bfc | ||
|
|
41bf76a49f | ||
|
|
2a2744a1bf | ||
|
|
757c0eebaf | ||
|
|
f60cb25245 | ||
|
|
199eb3f191 | ||
|
|
c1de1113c4 | ||
|
|
19803715be | ||
|
|
d60d0425bc | ||
|
|
28387c46e2 | ||
|
|
6e06a6a9e8 | ||
|
|
9a60c27785 | ||
|
|
4613984fb4 | ||
|
|
893b29cae8 | ||
|
|
b99efad19c | ||
|
|
034e7ec9f0 | ||
|
|
72540d01ab | ||
|
|
85677a3349 | ||
|
|
b5301a3632 | ||
|
|
c2743f949e | ||
|
|
a7350294e8 | ||
|
|
6d531fb173 | ||
|
|
18517b6dc5 | ||
|
|
27889b0a14 | ||
|
|
6bd0dc8e05 | ||
|
|
248fe926c5 | ||
|
|
8c6546f5d8 | ||
|
|
b04eac0566 | ||
|
|
6984644313 | ||
|
|
174520d259 | ||
|
|
e4a22fabc5 | ||
|
|
d770e73e31 | ||
|
|
e73877f0a2 | ||
|
|
0086cc9f53 | ||
|
|
2f4c975615 | ||
|
|
bbfe5889ea | ||
|
|
8b2177673b | ||
|
|
eb0602033d | ||
|
|
210d75be8e | ||
|
|
ed1e7e69a8 | ||
|
|
e9ebf86ac8 | ||
|
|
8faea4836d | ||
|
|
30f821be49 | ||
|
|
3361f420c4 | ||
|
|
07357a8b75 | ||
|
|
c009c88a5b | ||
|
|
40715336e3 | ||
|
|
16ec346493 | ||
|
|
a11fb3ddf7 | ||
|
|
063ee7f773 | ||
|
|
008a461968 | ||
|
|
36f428d928 | ||
|
|
871c0a115d | ||
|
|
6c3f0c36ff | ||
|
|
26c76deb5f | ||
|
|
20e2b60370 | ||
|
|
503e9c3a8e | ||
|
|
cea74fec35 | ||
|
|
9cca7839bc | ||
|
|
8bcbdc3160 | ||
|
|
a9e38fa54d | ||
|
|
a5573315a1 | ||
|
|
d7ed5a1f73 | ||
|
|
4c9c67927b | ||
|
|
4a53b718b1 | ||
|
|
6f42d2e821 | ||
|
|
07cc5dfa51 | ||
|
|
22881ccb59 | ||
|
|
c44c280b21 | ||
|
|
452da5caeb | ||
|
|
c78758e32d | ||
|
|
4b7e9152c6 | ||
|
|
e8e149719a | ||
|
|
d2730a187e | ||
|
|
068483ac6a | ||
|
|
e597cdead4 | ||
|
|
25340da2e2 | ||
|
|
02375cbe7d | ||
|
|
5587d39d42 | ||
|
|
ae8f069cbc | ||
|
|
d6f7423d59 | ||
|
|
2a3981268a | ||
|
|
40263f9549 | ||
|
|
be8cb965e3 | ||
|
|
8a92dc8257 | ||
|
|
2cd634a8de | ||
|
|
a23af96034 | ||
|
|
78abc63c06 | ||
|
|
ba9b483472 | ||
|
|
a21b875402 | ||
|
|
366459e8f3 | ||
|
|
7414626137 | ||
|
|
9ff9eb30aa | ||
|
|
4d6ff66187 | ||
|
|
0bc9bd2cfb | ||
|
|
7cd98d6dd0 | ||
|
|
6d3c988768 | ||
|
|
618b81bc93 | ||
|
|
16248b6e12 | ||
|
|
ceba6a91f0 | ||
|
|
d005057c98 | ||
|
|
e4738da6fa | ||
|
|
ed8834075e | ||
|
|
13bba13d6a | ||
|
|
e0b7910d5e | ||
|
|
086458b89d | ||
|
|
775d77ee6d | ||
|
|
7c1fa482ba | ||
|
|
7be993eb8d | ||
|
|
5a9e87c60d | ||
|
|
5f836d249c | ||
|
|
1d0175fb87 | ||
|
|
774cff9c52 | ||
|
|
51251331cf | ||
|
|
2b1c90d249 | ||
|
|
14ca1e5c40 | ||
|
|
0efa04946b | ||
|
|
96286d5836 | ||
|
|
07e933de5c | ||
|
|
2ec5eab7bb | ||
|
|
601cc1060c | ||
|
|
a6bc8e342d | ||
|
|
30c603a733 | ||
|
|
a10d09f293 | ||
|
|
5493e21bfd | ||
|
|
59217e59d0 | ||
|
|
03b977f5cb | ||
|
|
b8a8583598 | ||
|
|
4f50365ac1 | ||
|
|
ee9ff26594 | ||
|
|
af7339f3b0 | ||
|
|
0224f58e52 | ||
|
|
05ee2d0bf4 | ||
|
|
54d338807e | ||
|
|
4b6ed674b3 | ||
|
|
32ec900f87 | ||
|
|
5b160a275b | ||
|
|
c6b6295b26 | ||
|
|
c11ac2e565 | ||
|
|
912366563b | ||
|
|
61007b2905 | ||
|
|
db83718aa6 | ||
|
|
4c46e41525 | ||
|
|
69d31e301f | ||
|
|
314f0e94da | ||
|
|
ff3d2134a5 | ||
|
|
4a6194274a | ||
|
|
bf222b392b | ||
|
|
7aebe466d9 | ||
|
|
777b05ce6a | ||
|
|
9046b96941 | ||
|
|
eb6f4c7f92 | ||
|
|
d3899a8d9e | ||
|
|
4315c0983d | ||
|
|
3ea3edc6ba | ||
|
|
dc18ca2274 | ||
|
|
8fadbef031 | ||
|
|
7187161621 | ||
|
|
17afe54f6f | ||
|
|
8ed485c28f | ||
|
|
b307655251 | ||
|
|
38f7ecb671 | ||
|
|
f51b4f40f1 | ||
|
|
1530644de5 | ||
|
|
79fee39b2a | ||
|
|
c44c9187a9 |
@@ -0,0 +1 @@
|
||||
custom: http://doc.ruoyi.vip/ruoyi/other/donate.html
|
||||
@@ -25,6 +25,8 @@ target/
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### JRebel ###
|
||||
rebel.xml
|
||||
### NetBeans ###
|
||||
nbproject/private/
|
||||
build/*
|
||||
@@ -37,6 +39,7 @@ nbdist/
|
||||
# Others
|
||||
*.log
|
||||
*.xml.versionsBackup
|
||||
*.swp
|
||||
|
||||
!*/build/*.java
|
||||
!*/build/*.html
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
<p align="center">
|
||||
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-dd77653d7c9f197dd9d93684f3c8dcfbab6.png">
|
||||
</p>
|
||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v4.7.6</h1>
|
||||
<h4 align="center">基于SpringBoot开发的轻量级Java快速开发框架</h4>
|
||||
<p align="center">
|
||||
<a href="https://gitee.com/y_project/RuoYi/stargazers"><img src="https://gitee.com/y_project/RuoYi/badge/star.svg?theme=gvp"></a>
|
||||
<a href="https://gitee.com/y_project/RuoYi"><img src="https://img.shields.io/badge/RuoYi-v4.7.6-brightgreen.svg"></a>
|
||||
<a href="https://gitee.com/y_project/RuoYi/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
|
||||
</p>
|
||||
|
||||
## 平台简介
|
||||
|
||||
一直想做一款后台管理系统,看了很多优秀的开源项目但是发现没有合适的。于是利用空闲休息时间开始自己写了一套后台系统。如此有了若依。她可以用于所有的Web应用程序,如网站管理后台,网站会员中心,CMS,CRM,OA。所有前端后台代码封装过后十分精简易上手,出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。
|
||||
@@ -88,4 +99,4 @@
|
||||
|
||||
## 若依交流群
|
||||
|
||||
QQ群: [](https://jq.qq.com/?_wv=1027&k=5HBAaYN) [](https://jq.qq.com/?_wv=1027&k=5cHeRVW) [](https://jq.qq.com/?_wv=1027&k=53R0L5Z) [](https://jq.qq.com/?_wv=1027&k=5g75dCU) [](https://jq.qq.com/?_wv=1027&k=58cPoHA) [](https://jq.qq.com/?_wv=1027&k=5Ofd4Pb) [](https://jq.qq.com/?_wv=1027&k=5yugASz) [](https://jq.qq.com/?_wv=1027&k=5Rf3d2P) [](https://jq.qq.com/?_wv=1027&k=5ZIjaeP) [](https://jq.qq.com/?_wv=1027&k=5CJw1jY) [](https://jq.qq.com/?_wv=1027&k=5omzbKc) [](https://jq.qq.com/?_wv=1027&k=qPIKBb7s) [](https://jq.qq.com/?_wv=1027&k=4NsjKbtU) [](https://jq.qq.com/?_wv=1027&k=VD2pkz2G) [](https://jq.qq.com/?_wv=1027&k=HlshFwkJ) [](https://jq.qq.com/?_wv=1027&k=0ARRrO9V)
|
||||
QQ群: [](https://jq.qq.com/?_wv=1027&k=5HBAaYN) [](https://jq.qq.com/?_wv=1027&k=5cHeRVW) [](https://jq.qq.com/?_wv=1027&k=53R0L5Z) [](https://jq.qq.com/?_wv=1027&k=5g75dCU) [](https://jq.qq.com/?_wv=1027&k=58cPoHA) [](https://jq.qq.com/?_wv=1027&k=5Ofd4Pb) [](https://jq.qq.com/?_wv=1027&k=5yugASz) [](https://jq.qq.com/?_wv=1027&k=5Rf3d2P) [](https://jq.qq.com/?_wv=1027&k=5ZIjaeP) [](https://jq.qq.com/?_wv=1027&k=5CJw1jY) [](https://jq.qq.com/?_wv=1027&k=5omzbKc) [](https://jq.qq.com/?_wv=1027&k=qPIKBb7s) [](https://jq.qq.com/?_wv=1027&k=4NsjKbtU) [](https://jq.qq.com/?_wv=1027&k=VD2pkz2G) [](https://jq.qq.com/?_wv=1027&k=HlshFwkJ) [](https://jq.qq.com/?_wv=1027&k=0ARRrO9V) [](https://jq.qq.com/?_wv=1027&k=up9k3ZXJ) [](https://jq.qq.com/?_wv=1027&k=540WfdEr) [](https://jq.qq.com/?_wv=1027&k=ss91fC4t) [](https://jq.qq.com/?_wv=1027&k=Cqd66IKe)
|
||||
@@ -5,33 +5,31 @@
|
||||
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<version>4.7.0</version>
|
||||
<version>4.7.6</version>
|
||||
|
||||
<name>ruoyi</name>
|
||||
<url>http://www.ruoyi.vip</url>
|
||||
<description>若依管理系统</description>
|
||||
|
||||
<properties>
|
||||
<ruoyi.version>4.7.0</ruoyi.version>
|
||||
<ruoyi.version>4.7.6</ruoyi.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
|
||||
<shiro.version>1.8.0</shiro.version>
|
||||
<thymeleaf.extras.shiro.version>2.0.0</thymeleaf.extras.shiro.version>
|
||||
<druid.version>1.2.6</druid.version>
|
||||
<shiro.version>1.10.1</shiro.version>
|
||||
<thymeleaf.extras.shiro.version>2.1.0</thymeleaf.extras.shiro.version>
|
||||
<druid.version>1.2.15</druid.version>
|
||||
<bitwalker.version>1.21</bitwalker.version>
|
||||
<kaptcha.version>2.3.2</kaptcha.version>
|
||||
<kaptcha.version>2.3.3</kaptcha.version>
|
||||
<swagger.version>3.0.0</swagger.version>
|
||||
<mybatis-spring-boot.version>2.1.4</mybatis-spring-boot.version>
|
||||
<pagehelper.boot.version>1.3.1</pagehelper.boot.version>
|
||||
<fastjson.version>1.2.76</fastjson.version>
|
||||
<oshi.version>5.8.0</oshi.version>
|
||||
<jna.version>5.8.0</jna.version>
|
||||
<pagehelper.boot.version>1.4.6</pagehelper.boot.version>
|
||||
<fastjson.version>1.2.83</fastjson.version>
|
||||
<oshi.version>6.4.0</oshi.version>
|
||||
<commons.io.version>2.11.0</commons.io.version>
|
||||
<commons.fileupload.version>1.4</commons.fileupload.version>
|
||||
<poi.version>4.1.2</poi.version>
|
||||
<velocity.version>1.7</velocity.version>
|
||||
<velocity.version>2.3</velocity.version>
|
||||
</properties>
|
||||
|
||||
<!-- 依赖声明 -->
|
||||
@@ -42,7 +40,7 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>2.2.13.RELEASE</version>
|
||||
<version>2.5.14</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
@@ -56,7 +54,7 @@
|
||||
|
||||
<!-- 验证码 -->
|
||||
<dependency>
|
||||
<groupId>com.github.penggle</groupId>
|
||||
<groupId>pro.fessional</groupId>
|
||||
<artifactId>kaptcha</artifactId>
|
||||
<version>${kaptcha.version}</version>
|
||||
</dependency>
|
||||
@@ -81,7 +79,7 @@
|
||||
<artifactId>shiro-ehcache</artifactId>
|
||||
<version>${shiro.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- thymeleaf模板引擎和shiro框架的整合 -->
|
||||
<dependency>
|
||||
<groupId>com.github.theborakompanioni</groupId>
|
||||
@@ -96,13 +94,6 @@
|
||||
<version>${bitwalker.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot集成mybatis框架 -->
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>${mybatis-spring-boot.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- pagehelper 分页插件 -->
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
@@ -117,18 +108,6 @@
|
||||
<version>${oshi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.java.dev.jna</groupId>
|
||||
<artifactId>jna</artifactId>
|
||||
<version>${jna.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.java.dev.jna</groupId>
|
||||
<artifactId>jna-platform</artifactId>
|
||||
<version>${jna.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Swagger3依赖 -->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
@@ -166,14 +145,8 @@
|
||||
<!-- velocity代码生成使用模板 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
<artifactId>velocity</artifactId>
|
||||
<artifactId>velocity-engine-core</artifactId>
|
||||
<version>${velocity.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- 阿里JSON解析器 -->
|
||||
@@ -182,7 +155,7 @@
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- 定时任务-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
@@ -255,7 +228,7 @@
|
||||
<repository>
|
||||
<id>public</id>
|
||||
<name>aliyun nexus</name>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
||||
<url>https://maven.aliyun.com/repository/public</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
@@ -266,7 +239,7 @@
|
||||
<pluginRepository>
|
||||
<id>public</id>
|
||||
<name>aliyun nexus</name>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
||||
<url>https://maven.aliyun.com/repository/public</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.7.0</version>
|
||||
<version>4.7.6</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
@@ -11,6 +11,7 @@ import org.springframework.http.MediaType;
|
||||
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.ResponseBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
@@ -27,6 +28,7 @@ import com.ruoyi.common.utils.file.FileUtils;
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/common")
|
||||
public class CommonController
|
||||
{
|
||||
private static final Logger log = LoggerFactory.getLogger(CommonController.class);
|
||||
@@ -42,7 +44,7 @@ public class CommonController
|
||||
* @param fileName 文件名称
|
||||
* @param delete 是否删除
|
||||
*/
|
||||
@GetMapping("common/download")
|
||||
@GetMapping("/download")
|
||||
public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request)
|
||||
{
|
||||
try
|
||||
@@ -71,7 +73,7 @@ public class CommonController
|
||||
/**
|
||||
* 通用上传请求(单个)
|
||||
*/
|
||||
@PostMapping("/common/upload")
|
||||
@PostMapping("/upload")
|
||||
@ResponseBody
|
||||
public AjaxResult uploadFile(MultipartFile file) throws Exception
|
||||
{
|
||||
@@ -83,8 +85,10 @@ public class CommonController
|
||||
String fileName = FileUploadUtils.upload(filePath, file);
|
||||
String url = serverConfig.getUrl() + fileName;
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax.put("fileName", fileName);
|
||||
ajax.put("url", url);
|
||||
ajax.put("fileName", fileName);
|
||||
ajax.put("newFileName", FileUtils.getName(fileName));
|
||||
ajax.put("originalFilename", file.getOriginalFilename());
|
||||
return ajax;
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -96,7 +100,7 @@ public class CommonController
|
||||
/**
|
||||
* 通用上传请求(多个)
|
||||
*/
|
||||
@PostMapping("/common/uploads")
|
||||
@PostMapping("/uploads")
|
||||
@ResponseBody
|
||||
public AjaxResult uploadFiles(List<MultipartFile> files) throws Exception
|
||||
{
|
||||
@@ -104,19 +108,25 @@ public class CommonController
|
||||
{
|
||||
// 上传文件路径
|
||||
String filePath = RuoYiConfig.getUploadPath();
|
||||
List<String> fileNames = new ArrayList<String>();
|
||||
List<String> urls = new ArrayList<String>();
|
||||
List<String> fileNames = new ArrayList<String>();
|
||||
List<String> newFileNames = new ArrayList<String>();
|
||||
List<String> originalFilenames = new ArrayList<String>();
|
||||
for (MultipartFile file : files)
|
||||
{
|
||||
// 上传并返回新文件名称
|
||||
String fileName = FileUploadUtils.upload(filePath, file);
|
||||
String url = serverConfig.getUrl() + fileName;
|
||||
fileNames.add(fileName);
|
||||
urls.add(url);
|
||||
fileNames.add(fileName);
|
||||
newFileNames.add(FileUtils.getName(fileName));
|
||||
originalFilenames.add(file.getOriginalFilename());
|
||||
}
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax.put("fileNames", StringUtils.join(fileNames, FILE_DELIMETER));
|
||||
ajax.put("urls", StringUtils.join(urls, FILE_DELIMETER));
|
||||
ajax.put("fileNames", StringUtils.join(fileNames, FILE_DELIMETER));
|
||||
ajax.put("newFileNames", StringUtils.join(newFileNames, FILE_DELIMETER));
|
||||
ajax.put("originalFilenames", StringUtils.join(originalFilenames, FILE_DELIMETER));
|
||||
return ajax;
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -128,7 +138,7 @@ public class CommonController
|
||||
/**
|
||||
* 本地资源通用下载
|
||||
*/
|
||||
@GetMapping("/common/download/resource")
|
||||
@GetMapping("/download/resource")
|
||||
public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
|
||||
throws Exception
|
||||
{
|
||||
|
||||
+18
@@ -77,4 +77,22 @@ public class DemoDialogController
|
||||
{
|
||||
return prefix + "/table/parent";
|
||||
}
|
||||
|
||||
/**
|
||||
* 多层窗口frame1
|
||||
*/
|
||||
@GetMapping("/frame1")
|
||||
public String frame1()
|
||||
{
|
||||
return prefix + "/table/frame1";
|
||||
}
|
||||
|
||||
/**
|
||||
* 多层窗口frame2
|
||||
*/
|
||||
@GetMapping("/frame2")
|
||||
public String frame2()
|
||||
{
|
||||
return prefix + "/table/frame2";
|
||||
}
|
||||
}
|
||||
|
||||
+9
@@ -62,6 +62,15 @@ public class DemoFormController
|
||||
return prefix + "/timeline";
|
||||
}
|
||||
|
||||
/**
|
||||
* 进度条
|
||||
*/
|
||||
@GetMapping("/progress_bars")
|
||||
public String progress_bars()
|
||||
{
|
||||
return prefix + "/progress_bars";
|
||||
}
|
||||
|
||||
/**
|
||||
* 表单校验
|
||||
*/
|
||||
|
||||
+247
@@ -65,6 +65,57 @@ public class DemoTableController extends BaseController
|
||||
users.add(new UserTableModel(26, "1000026", "测试26", "1", "15666666666", "ry@qq.com", 250.0, "1"));
|
||||
}
|
||||
|
||||
private final static List<AreaModel> areas = new ArrayList<AreaModel>();
|
||||
{
|
||||
areas.add(new AreaModel(1, 0, "广东省", "440000", "GDS", "GuangDongSheng", 1));
|
||||
areas.add(new AreaModel(2, 0, "湖南省", "430000", "HNS", "HuNanSheng", 1));
|
||||
areas.add(new AreaModel(3, 0, "河南省", "410000", "HNS", "HeNanSheng", 0));
|
||||
areas.add(new AreaModel(4, 0, "湖北省", "420000", "HBS", "HuBeiSheng", 0));
|
||||
areas.add(new AreaModel(5, 0, "辽宁省", "210000", "LNS", "LiaoNingSheng", 0));
|
||||
areas.add(new AreaModel(6, 0, "山东省", "370000", "SDS", "ShanDongSheng", 0));
|
||||
areas.add(new AreaModel(7, 0, "陕西省", "610000", "SXS", "ShanXiSheng", 0));
|
||||
areas.add(new AreaModel(8, 0, "贵州省", "520000", "GZS", "GuiZhouSheng", 0));
|
||||
areas.add(new AreaModel(9, 0, "上海市", "310000", "SHS", "ShangHaiShi", 0));
|
||||
areas.add(new AreaModel(10, 0, "重庆市", "500000", "CQS", "ChongQingShi", 0));
|
||||
areas.add(new AreaModel(11, 0, "若依省", "666666", "YYS", "RuoYiSheng", 0));
|
||||
areas.add(new AreaModel(12, 0, "安徽省", "340000", "AHS", "AnHuiSheng", 0));
|
||||
areas.add(new AreaModel(13, 0, "福建省", "350000", "FJS", "FuJianSheng", 0));
|
||||
areas.add(new AreaModel(14, 0, "海南省", "460000", "HNS", "HaiNanSheng", 0));
|
||||
areas.add(new AreaModel(15, 0, "江苏省", "320000", "JSS", "JiangSuSheng", 0));
|
||||
areas.add(new AreaModel(16, 0, "青海省", "630000", "QHS", "QingHaiSheng", 0));
|
||||
areas.add(new AreaModel(17, 0, "广西壮族自治区", "450000", "GXZZZZQ", "GuangXiZhuangZuZiZhiQu", 0));
|
||||
areas.add(new AreaModel(18, 0, "宁夏回族自治区", "640000", "NXHZZZQ", "NingXiaHuiZuZiZhiQu", 0));
|
||||
areas.add(new AreaModel(19, 0, "内蒙古自治区", "150000", "NMGZZQ", "NeiMengGuZiZhiQu", 0));
|
||||
areas.add(new AreaModel(20, 0, "新疆维吾尔自治区", "650000", "XJWWEZZQ", "XinJiangWeiWuErZiZhiQu", 0));
|
||||
areas.add(new AreaModel(21, 0, "江西省", "360000", "JXS", "JiangXiSheng", 0));
|
||||
areas.add(new AreaModel(22, 0, "浙江省", "330000", "ZJS", "ZheJiangSheng", 0));
|
||||
areas.add(new AreaModel(23, 0, "河北省", "130000", "HBS", "HeBeiSheng", 0));
|
||||
areas.add(new AreaModel(24, 0, "天津市", "120000", "TJS", "TianJinShi", 0));
|
||||
areas.add(new AreaModel(25, 0, "山西省", "140000", "SXS", "ShanXiSheng", 0));
|
||||
areas.add(new AreaModel(26, 0, "台湾省", "710000", "TWS", "TaiWanSheng", 0));
|
||||
areas.add(new AreaModel(27, 0, "甘肃省", "620000", "GSS", "GanSuSheng", 0));
|
||||
areas.add(new AreaModel(28, 0, "四川省", "510000", "SCS", "SiChuanSheng", 0));
|
||||
areas.add(new AreaModel(29, 0, "云南省", "530000", "YNS", "YunNanSheng", 0));
|
||||
areas.add(new AreaModel(30, 0, "北京市", "110000", "BJS", "BeiJingShi", 0));
|
||||
areas.add(new AreaModel(31, 0, "香港特别行政区", "810000", "XGTBXZQ", "XiangGangTeBieXingZhengQu", 0));
|
||||
areas.add(new AreaModel(32, 0, "澳门特别行政区", "820000", "AMTBXZQ", "AoMenTeBieXingZhengQu", 0));
|
||||
|
||||
areas.add(new AreaModel(100, 1, "深圳市", "440300", "SZS", "ShenZhenShi", 1));
|
||||
areas.add(new AreaModel(101, 1, "广州市", "440100", "GZS", "GuangZhouShi", 0));
|
||||
areas.add(new AreaModel(102, 1, "东莞市", "441900", "DGS", "DongGuanShi", 0));
|
||||
areas.add(new AreaModel(103, 2, "长沙市", "410005", "CSS", "ChangShaShi", 1));
|
||||
areas.add(new AreaModel(104, 2, "岳阳市", "414000", "YYS", "YueYangShi", 0));
|
||||
|
||||
areas.add(new AreaModel(1000, 100, "龙岗区", "518172", "LGQ", "LongGangQu", 0));
|
||||
areas.add(new AreaModel(1001, 100, "南山区", "518051", "NSQ", "NanShanQu", 0));
|
||||
areas.add(new AreaModel(1002, 100, "宝安区", "518101", "BAQ", "BaoAnQu", 0));
|
||||
areas.add(new AreaModel(1003, 100, "福田区", "518081", "FTQ", "FuTianQu", 0));
|
||||
areas.add(new AreaModel(1004, 103, "天心区", "410004", "TXQ", "TianXinQu", 0));
|
||||
areas.add(new AreaModel(1005, 103, "开福区", "410008", "KFQ", "KaiFuQu", 0));
|
||||
areas.add(new AreaModel(1006, 103, "芙蓉区", "410011", "FRQ", "FuRongQu", 0));
|
||||
areas.add(new AreaModel(1007, 103, "雨花区", "410011", "YHQ", "YuHuaQu", 0));
|
||||
}
|
||||
|
||||
private final static List<UserTableColumn> columns = new ArrayList<UserTableColumn>();
|
||||
{
|
||||
columns.add(new UserTableColumn("用户ID", "userId"));
|
||||
@@ -348,6 +399,15 @@ public class DemoTableController extends BaseController
|
||||
return prefix + "/customView";
|
||||
}
|
||||
|
||||
/**
|
||||
* 异步加载表格树
|
||||
*/
|
||||
@GetMapping("/asynTree")
|
||||
public String asynTree()
|
||||
{
|
||||
return prefix + "/asynTree";
|
||||
}
|
||||
|
||||
/**
|
||||
* 表格其他操作
|
||||
*/
|
||||
@@ -412,6 +472,84 @@ public class DemoTableController extends BaseController
|
||||
rspData.setTotal(userList.size());
|
||||
return rspData;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询树表数据
|
||||
*/
|
||||
@PostMapping("/tree/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo treeList(AreaModel areaModel)
|
||||
{
|
||||
TableDataInfo rspData = new TableDataInfo();
|
||||
List<AreaModel> areaList = new ArrayList<AreaModel>(Arrays.asList(new AreaModel[areas.size()]));
|
||||
// 默认查询条件 parentId 0
|
||||
Collections.copy(areaList, areas);
|
||||
areaList.clear();
|
||||
if (StringUtils.isNotEmpty(areaModel.getAreaName()))
|
||||
{
|
||||
for (AreaModel area : areas)
|
||||
{
|
||||
if (area.getParentId() == 0 && area.getAreaName().equals(areaModel.getAreaName()))
|
||||
{
|
||||
areaList.add(area);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (AreaModel area : areas)
|
||||
{
|
||||
if (area.getParentId() == 0)
|
||||
{
|
||||
areaList.add(area);
|
||||
}
|
||||
}
|
||||
}
|
||||
PageDomain pageDomain = TableSupport.buildPageRequest();
|
||||
Integer pageNum = (pageDomain.getPageNum() - 1) * 10;
|
||||
Integer pageSize = pageDomain.getPageNum() * 10;
|
||||
if (pageSize > areaList.size())
|
||||
{
|
||||
pageSize = areaList.size();
|
||||
}
|
||||
rspData.setRows(areaList.subList(pageNum, pageSize));
|
||||
rspData.setTotal(areaList.size());
|
||||
return rspData;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询树表子节点数据
|
||||
*/
|
||||
@PostMapping("/tree/listChild")
|
||||
@ResponseBody
|
||||
public List<AreaModel> listChild(AreaModel areaModel)
|
||||
{
|
||||
List<AreaModel> areaList = new ArrayList<AreaModel>(Arrays.asList(new AreaModel[areas.size()]));
|
||||
// 查询条件 parentId
|
||||
Collections.copy(areaList, areas);
|
||||
areaList.clear();
|
||||
if (StringUtils.isNotEmpty(areaModel.getAreaName()))
|
||||
{
|
||||
for (AreaModel area : areas)
|
||||
{
|
||||
if (area.getParentId().intValue() == areaModel.getParentId().intValue() && area.getAreaName().equals(areaModel.getAreaName()))
|
||||
{
|
||||
areaList.add(area);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (AreaModel area : areas)
|
||||
{
|
||||
if (area.getParentId().intValue() == areaModel.getParentId().intValue())
|
||||
{
|
||||
areaList.add(area);
|
||||
}
|
||||
}
|
||||
}
|
||||
return areaList;
|
||||
}
|
||||
}
|
||||
|
||||
class UserTableColumn
|
||||
@@ -597,3 +735,112 @@ class UserTableModel
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
||||
class AreaModel
|
||||
{
|
||||
/** 编号 */
|
||||
private Long id;
|
||||
|
||||
/** 父编号 */
|
||||
private Long parentId;
|
||||
|
||||
/** 区域名称 */
|
||||
private String areaName;
|
||||
|
||||
/** 区域代码 */
|
||||
private String areaCode;
|
||||
|
||||
/** 名称首字母 */
|
||||
private String simplePy;
|
||||
|
||||
/** 名称全拼 */
|
||||
private String pinYin;
|
||||
|
||||
/** 是否有子节点(0无 1有) */
|
||||
private Integer isTreeLeaf = 1;
|
||||
|
||||
public AreaModel()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public AreaModel(int id, int parentId, String areaName, String areaCode, String simplePy, String pinYin, Integer isTreeLeaf)
|
||||
{
|
||||
this.id = Long.valueOf(id);
|
||||
this.parentId = Long.valueOf(parentId);
|
||||
this.areaName = areaName;
|
||||
this.areaCode = areaCode;
|
||||
this.simplePy = simplePy;
|
||||
this.pinYin = pinYin;
|
||||
this.isTreeLeaf = isTreeLeaf;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getParentId()
|
||||
{
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(Long parentId)
|
||||
{
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getAreaName()
|
||||
{
|
||||
return areaName;
|
||||
}
|
||||
|
||||
public void setAreaName(String areaName)
|
||||
{
|
||||
this.areaName = areaName;
|
||||
}
|
||||
|
||||
public String getAreaCode()
|
||||
{
|
||||
return areaCode;
|
||||
}
|
||||
|
||||
public void setAreaCode(String areaCode)
|
||||
{
|
||||
this.areaCode = areaCode;
|
||||
}
|
||||
|
||||
public String getSimplePy()
|
||||
{
|
||||
return simplePy;
|
||||
}
|
||||
|
||||
public void setSimplePy(String simplePy)
|
||||
{
|
||||
this.simplePy = simplePy;
|
||||
}
|
||||
|
||||
public String getPinYin()
|
||||
{
|
||||
return pinYin;
|
||||
}
|
||||
|
||||
public void setPinYin(String pinYin)
|
||||
{
|
||||
this.pinYin = pinYin;
|
||||
}
|
||||
|
||||
public Integer getIsTreeLeaf()
|
||||
{
|
||||
return isTreeLeaf;
|
||||
}
|
||||
|
||||
public void setIsTreeLeaf(Integer isTreeLeaf)
|
||||
{
|
||||
this.isTreeLeaf = isTreeLeaf;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.web.controller.monitor;
|
||||
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
@@ -25,6 +26,7 @@ public class CacheController extends BaseController
|
||||
@Autowired
|
||||
private CacheService cacheService;
|
||||
|
||||
@RequiresPermissions("monitor:cache:view")
|
||||
@GetMapping()
|
||||
public String cache(ModelMap mmap)
|
||||
{
|
||||
@@ -32,6 +34,7 @@ public class CacheController extends BaseController
|
||||
return prefix + "/cache";
|
||||
}
|
||||
|
||||
@RequiresPermissions("monitor:cache:view")
|
||||
@PostMapping("/getNames")
|
||||
public String getCacheNames(String fragment, ModelMap mmap)
|
||||
{
|
||||
@@ -39,14 +42,16 @@ public class CacheController extends BaseController
|
||||
return prefix + "/cache::" + fragment;
|
||||
}
|
||||
|
||||
@RequiresPermissions("monitor:cache:view")
|
||||
@PostMapping("/getKeys")
|
||||
public String getCacheKeys(String fragment, String cacheName, ModelMap mmap)
|
||||
{
|
||||
mmap.put("cacheName", cacheName);
|
||||
mmap.put("cacheKyes", cacheService.getCacheKeys(cacheName));
|
||||
mmap.put("cacheKeys", cacheService.getCacheKeys(cacheName));
|
||||
return prefix + "/cache::" + fragment;
|
||||
}
|
||||
|
||||
@RequiresPermissions("monitor:cache:view")
|
||||
@PostMapping("/getValue")
|
||||
public String getCacheValue(String fragment, String cacheName, String cacheKey, ModelMap mmap)
|
||||
{
|
||||
@@ -56,6 +61,7 @@ public class CacheController extends BaseController
|
||||
return prefix + "/cache::" + fragment;
|
||||
}
|
||||
|
||||
@RequiresPermissions("monitor:cache:view")
|
||||
@PostMapping("/clearCacheName")
|
||||
@ResponseBody
|
||||
public AjaxResult clearCacheName(String cacheName, ModelMap mmap)
|
||||
@@ -64,6 +70,7 @@ public class CacheController extends BaseController
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@RequiresPermissions("monitor:cache:view")
|
||||
@PostMapping("/clearCacheKey")
|
||||
@ResponseBody
|
||||
public AjaxResult clearCacheKey(String cacheName, String cacheKey, ModelMap mmap)
|
||||
@@ -72,6 +79,7 @@ public class CacheController extends BaseController
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@RequiresPermissions("monitor:cache:view")
|
||||
@GetMapping("/clearAll")
|
||||
@ResponseBody
|
||||
public AjaxResult clearAll(ModelMap mmap)
|
||||
|
||||
@@ -95,6 +95,7 @@ public class SysConfigController extends BaseController
|
||||
/**
|
||||
* 修改参数配置
|
||||
*/
|
||||
@RequiresPermissions("system:config:edit")
|
||||
@GetMapping("/edit/{configId}")
|
||||
public String edit(@PathVariable("configId") Long configId, ModelMap mmap)
|
||||
{
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
@@ -84,8 +83,9 @@ public class SysDeptController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* 修改部门
|
||||
*/
|
||||
@RequiresPermissions("system:dept:edit")
|
||||
@GetMapping("/edit/{deptId}")
|
||||
public String edit(@PathVariable("deptId") Long deptId, ModelMap mmap)
|
||||
{
|
||||
@@ -100,7 +100,7 @@ public class SysDeptController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
* 修改保存部门
|
||||
*/
|
||||
@Log(title = "部门管理", businessType = BusinessType.UPDATE)
|
||||
@RequiresPermissions("system:dept:edit")
|
||||
@@ -108,16 +108,17 @@ public class SysDeptController extends BaseController
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(@Validated SysDept dept)
|
||||
{
|
||||
Long deptId = dept.getDeptId();
|
||||
deptService.checkDeptDataScope(deptId);
|
||||
if (UserConstants.DEPT_NAME_NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept)))
|
||||
{
|
||||
return error("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在");
|
||||
}
|
||||
else if (dept.getParentId().equals(dept.getDeptId()))
|
||||
else if (dept.getParentId().equals(deptId))
|
||||
{
|
||||
return error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己");
|
||||
}
|
||||
else if (StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus())
|
||||
&& deptService.selectNormalChildrenDeptById(dept.getDeptId()) > 0)
|
||||
else if (StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus()) && deptService.selectNormalChildrenDeptById(deptId) > 0)
|
||||
{
|
||||
return AjaxResult.error("该部门包含未停用的子部门!");
|
||||
}
|
||||
@@ -142,6 +143,7 @@ public class SysDeptController extends BaseController
|
||||
{
|
||||
return AjaxResult.warn("部门存在用户,不允许删除");
|
||||
}
|
||||
deptService.checkDeptDataScope(deptId);
|
||||
return toAjax(deptService.deleteDeptById(deptId));
|
||||
}
|
||||
|
||||
@@ -163,24 +165,13 @@ public class SysDeptController extends BaseController
|
||||
*/
|
||||
@GetMapping(value = { "/selectDeptTree/{deptId}", "/selectDeptTree/{deptId}/{excludeId}" })
|
||||
public String selectDeptTree(@PathVariable("deptId") Long deptId,
|
||||
@PathVariable(value = "excludeId", required = false) String excludeId, ModelMap mmap)
|
||||
@PathVariable(value = "excludeId", required = false) Long excludeId, ModelMap mmap)
|
||||
{
|
||||
mmap.put("dept", deptService.selectDeptById(deptId));
|
||||
mmap.put("excludeId", excludeId);
|
||||
return prefix + "/tree";
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载部门列表树
|
||||
*/
|
||||
@GetMapping("/treeData")
|
||||
@ResponseBody
|
||||
public List<Ztree> treeData()
|
||||
{
|
||||
List<Ztree> ztrees = deptService.selectDeptTree(new SysDept());
|
||||
return ztrees;
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载部门列表树(排除下级)
|
||||
*/
|
||||
@@ -193,15 +184,4 @@ public class SysDeptController extends BaseController
|
||||
List<Ztree> ztrees = deptService.selectDeptTreeExcludeChild(dept);
|
||||
return ztrees;
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载角色部门(数据权限)列表树
|
||||
*/
|
||||
@GetMapping("/roleDeptTreeData")
|
||||
@ResponseBody
|
||||
public List<Ztree> deptTreeData(SysRole role)
|
||||
{
|
||||
List<Ztree> ztrees = deptService.roleDeptTreeData(role);
|
||||
return ztrees;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,6 +88,7 @@ public class SysDictDataController extends BaseController
|
||||
/**
|
||||
* 修改字典类型
|
||||
*/
|
||||
@RequiresPermissions("system:dict:edit")
|
||||
@GetMapping("/edit/{dictCode}")
|
||||
public String edit(@PathVariable("dictCode") Long dictCode, ModelMap mmap)
|
||||
{
|
||||
|
||||
@@ -94,6 +94,7 @@ public class SysDictTypeController extends BaseController
|
||||
/**
|
||||
* 修改字典类型
|
||||
*/
|
||||
@RequiresPermissions("system:dict:edit")
|
||||
@GetMapping("/edit/{dictId}")
|
||||
public String edit(@PathVariable("dictId") Long dictId, ModelMap mmap)
|
||||
{
|
||||
|
||||
@@ -55,7 +55,11 @@ public class SysIndexController extends BaseController
|
||||
mmap.put("user", user);
|
||||
mmap.put("sideTheme", configService.selectConfigByKey("sys.index.sideTheme"));
|
||||
mmap.put("skinName", configService.selectConfigByKey("sys.index.skinName"));
|
||||
mmap.put("ignoreFooter", configService.selectConfigByKey("sys.index.ignoreFooter"));
|
||||
Boolean footer = Convert.toBool(configService.selectConfigByKey("sys.index.footer"), true);
|
||||
Boolean tagsView = Convert.toBool(configService.selectConfigByKey("sys.index.tagsView"), true);
|
||||
mmap.put("footer", footer);
|
||||
mmap.put("tagsView", tagsView);
|
||||
mmap.put("mainClass", contentMainClass(footer, tagsView));
|
||||
mmap.put("copyrightYear", RuoYiConfig.getCopyrightYear());
|
||||
mmap.put("demoEnabled", RuoYiConfig.isDemoEnabled());
|
||||
mmap.put("isDefaultModifyPwd", initPasswordIsModify(user.getPwdUpdateDate()));
|
||||
@@ -98,7 +102,7 @@ public class SysIndexController extends BaseController
|
||||
SysUser user = getSysUser();
|
||||
if (StringUtils.isNull(user))
|
||||
{
|
||||
return AjaxResult.error("服务器超时,请重新登陆");
|
||||
return AjaxResult.error("服务器超时,请重新登录");
|
||||
}
|
||||
if (passwordService.matches(user, password))
|
||||
{
|
||||
@@ -130,6 +134,24 @@ public class SysIndexController extends BaseController
|
||||
return "main";
|
||||
}
|
||||
|
||||
// content-main class
|
||||
public String contentMainClass(Boolean footer, Boolean tagsView)
|
||||
{
|
||||
if (!footer && !tagsView)
|
||||
{
|
||||
return "tagsview-footer-hide";
|
||||
}
|
||||
else if (!footer)
|
||||
{
|
||||
return "footer-hide";
|
||||
}
|
||||
else if (!tagsView)
|
||||
{
|
||||
return "tagsview-hide";
|
||||
}
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
|
||||
// 检查初始密码是否提醒修改
|
||||
public boolean initPasswordIsModify(Date pwdUpdateDate)
|
||||
{
|
||||
|
||||
@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.ServletUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.framework.web.service.ConfigService;
|
||||
@@ -47,7 +48,7 @@ public class SysLoginController extends BaseController
|
||||
// 是否开启记住我
|
||||
mmap.put("isRemembered", rememberMe);
|
||||
// 是否开启用户注册
|
||||
mmap.put("isAllowRegister", configService.getKey("sys.account.registerUser"));
|
||||
mmap.put("isAllowRegister", Convert.toBool(configService.getKey("sys.account.registerUser"), false));
|
||||
return "login";
|
||||
}
|
||||
|
||||
|
||||
@@ -117,6 +117,7 @@ public class SysMenuController extends BaseController
|
||||
/**
|
||||
* 修改菜单
|
||||
*/
|
||||
@RequiresPermissions("system:menu:edit")
|
||||
@GetMapping("/edit/{menuId}")
|
||||
public String edit(@PathVariable("menuId") Long menuId, ModelMap mmap)
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -68,7 +69,7 @@ public class SysNoticeController extends BaseController
|
||||
@Log(title = "通知公告", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(SysNotice notice)
|
||||
public AjaxResult addSave(@Validated SysNotice notice)
|
||||
{
|
||||
notice.setCreateBy(getLoginName());
|
||||
return toAjax(noticeService.insertNotice(notice));
|
||||
@@ -77,6 +78,7 @@ public class SysNoticeController extends BaseController
|
||||
/**
|
||||
* 修改公告
|
||||
*/
|
||||
@RequiresPermissions("system:notice:edit")
|
||||
@GetMapping("/edit/{noticeId}")
|
||||
public String edit(@PathVariable("noticeId") Long noticeId, ModelMap mmap)
|
||||
{
|
||||
@@ -91,7 +93,7 @@ public class SysNoticeController extends BaseController
|
||||
@Log(title = "通知公告", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(SysNotice notice)
|
||||
public AjaxResult editSave(@Validated SysNotice notice)
|
||||
{
|
||||
notice.setUpdateBy(getLoginName());
|
||||
return toAjax(noticeService.updateNotice(notice));
|
||||
|
||||
@@ -112,6 +112,7 @@ public class SysPostController extends BaseController
|
||||
/**
|
||||
* 修改岗位
|
||||
*/
|
||||
@RequiresPermissions("system:post:edit")
|
||||
@GetMapping("/edit/{postId}")
|
||||
public String edit(@PathVariable("postId") Long postId, ModelMap mmap)
|
||||
{
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.common.utils.file.MimeTypeUtils;
|
||||
import com.ruoyi.framework.shiro.service.SysPasswordService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
|
||||
@@ -62,11 +63,7 @@ public class SysProfileController extends BaseController
|
||||
public boolean checkPassword(String password)
|
||||
{
|
||||
SysUser user = getSysUser();
|
||||
if (passwordService.matches(user, password))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return passwordService.matches(user, password);
|
||||
}
|
||||
|
||||
@GetMapping("/resetPwd")
|
||||
@@ -168,7 +165,7 @@ public class SysProfileController extends BaseController
|
||||
{
|
||||
if (!file.isEmpty())
|
||||
{
|
||||
String avatar = FileUploadUtils.upload(RuoYiConfig.getAvatarPath(), file);
|
||||
String avatar = FileUploadUtils.upload(RuoYiConfig.getAvatarPath(), file, MimeTypeUtils.IMAGE_EXTENSION);
|
||||
currentUser.setAvatar(avatar);
|
||||
if (userService.updateUserInfo(currentUser) > 0)
|
||||
{
|
||||
|
||||
+1
-1
@@ -2,13 +2,13 @@ package com.ruoyi.web.controller.system;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.framework.shiro.service.SysRegisterService;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
@@ -22,6 +23,7 @@ import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.shiro.util.AuthorizationUtils;
|
||||
import com.ruoyi.system.domain.SysUserRole;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
import com.ruoyi.system.service.ISysRoleService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
|
||||
@@ -42,6 +44,9 @@ public class SysRoleController extends BaseController
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
|
||||
@Autowired
|
||||
private ISysDeptService deptService;
|
||||
|
||||
@RequiresPermissions("system:role:view")
|
||||
@GetMapping()
|
||||
public String role()
|
||||
@@ -105,6 +110,7 @@ public class SysRoleController extends BaseController
|
||||
/**
|
||||
* 修改角色
|
||||
*/
|
||||
@RequiresPermissions("system:role:edit")
|
||||
@GetMapping("/edit/{roleId}")
|
||||
public String edit(@PathVariable("roleId") Long roleId, ModelMap mmap)
|
||||
{
|
||||
@@ -123,6 +129,7 @@ public class SysRoleController extends BaseController
|
||||
public AjaxResult editSave(@Validated SysRole role)
|
||||
{
|
||||
roleService.checkRoleAllowed(role);
|
||||
roleService.checkRoleDataScope(role.getRoleId());
|
||||
if (UserConstants.ROLE_NAME_NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
|
||||
{
|
||||
return error("修改角色'" + role.getRoleName() + "'失败,角色名称已存在");
|
||||
@@ -156,6 +163,7 @@ public class SysRoleController extends BaseController
|
||||
public AjaxResult authDataScopeSave(SysRole role)
|
||||
{
|
||||
roleService.checkRoleAllowed(role);
|
||||
roleService.checkRoleDataScope(role.getRoleId());
|
||||
role.setUpdateBy(getLoginName());
|
||||
if (roleService.authDataScope(role) > 0)
|
||||
{
|
||||
@@ -213,6 +221,7 @@ public class SysRoleController extends BaseController
|
||||
public AjaxResult changeStatus(SysRole role)
|
||||
{
|
||||
roleService.checkRoleAllowed(role);
|
||||
roleService.checkRoleDataScope(role.getRoleId());
|
||||
return toAjax(roleService.changeStatus(role));
|
||||
}
|
||||
|
||||
@@ -296,6 +305,19 @@ public class SysRoleController extends BaseController
|
||||
@ResponseBody
|
||||
public AjaxResult selectAuthUserAll(Long roleId, String userIds)
|
||||
{
|
||||
roleService.checkRoleDataScope(roleId);
|
||||
return toAjax(roleService.insertAuthUsers(roleId, userIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载角色部门(数据权限)列表树
|
||||
*/
|
||||
@RequiresPermissions("system:role:edit")
|
||||
@GetMapping("/deptTreeData")
|
||||
@ResponseBody
|
||||
public List<Ztree> deptTreeData(SysRole role)
|
||||
{
|
||||
List<Ztree> ztrees = deptService.roleDeptTreeData(role);
|
||||
return ztrees;
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,8 @@ import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.Ztree;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
@@ -27,6 +29,8 @@ import com.ruoyi.common.utils.ShiroUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.shiro.service.SysPasswordService;
|
||||
import com.ruoyi.framework.shiro.util.AuthorizationUtils;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
import com.ruoyi.system.service.ISysPostService;
|
||||
import com.ruoyi.system.service.ISysRoleService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
@@ -47,6 +51,9 @@ public class SysUserController extends BaseController
|
||||
|
||||
@Autowired
|
||||
private ISysRoleService roleService;
|
||||
|
||||
@Autowired
|
||||
private ISysDeptService deptService;
|
||||
|
||||
@Autowired
|
||||
private ISysPostService postService;
|
||||
@@ -123,7 +130,7 @@ public class SysUserController extends BaseController
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(@Validated SysUser user)
|
||||
{
|
||||
if (UserConstants.USER_NAME_NOT_UNIQUE.equals(userService.checkLoginNameUnique(user.getLoginName())))
|
||||
if (UserConstants.USER_NAME_NOT_UNIQUE.equals(userService.checkLoginNameUnique(user)))
|
||||
{
|
||||
return error("新增用户'" + user.getLoginName() + "'失败,登录账号已存在");
|
||||
}
|
||||
@@ -146,6 +153,7 @@ public class SysUserController extends BaseController
|
||||
/**
|
||||
* 修改用户
|
||||
*/
|
||||
@RequiresPermissions("system:user:edit")
|
||||
@GetMapping("/edit/{userId}")
|
||||
public String edit(@PathVariable("userId") Long userId, ModelMap mmap)
|
||||
{
|
||||
@@ -167,7 +175,12 @@ public class SysUserController extends BaseController
|
||||
public AjaxResult editSave(@Validated SysUser user)
|
||||
{
|
||||
userService.checkUserAllowed(user);
|
||||
if (StringUtils.isNotEmpty(user.getPhonenumber())
|
||||
userService.checkUserDataScope(user.getUserId());
|
||||
if (UserConstants.USER_NAME_NOT_UNIQUE.equals(userService.checkLoginNameUnique(user)))
|
||||
{
|
||||
return error("修改用户'" + user.getLoginName() + "'失败,登录账号已存在");
|
||||
}
|
||||
else if (StringUtils.isNotEmpty(user.getPhonenumber())
|
||||
&& UserConstants.USER_PHONE_NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
|
||||
{
|
||||
return error("修改用户'" + user.getLoginName() + "'失败,手机号码已存在");
|
||||
@@ -178,6 +191,7 @@ public class SysUserController extends BaseController
|
||||
return error("修改用户'" + user.getLoginName() + "'失败,邮箱账号已存在");
|
||||
}
|
||||
user.setUpdateBy(getLoginName());
|
||||
AuthorizationUtils.clearAllCachedAuthorizationInfo();
|
||||
return toAjax(userService.updateUser(user));
|
||||
}
|
||||
|
||||
@@ -196,6 +210,7 @@ public class SysUserController extends BaseController
|
||||
public AjaxResult resetPwdSave(SysUser user)
|
||||
{
|
||||
userService.checkUserAllowed(user);
|
||||
userService.checkUserDataScope(user.getUserId());
|
||||
user.setSalt(ShiroUtils.randomSalt());
|
||||
user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt()));
|
||||
if (userService.resetUserPwd(user) > 0)
|
||||
@@ -232,7 +247,9 @@ public class SysUserController extends BaseController
|
||||
@ResponseBody
|
||||
public AjaxResult insertAuthRole(Long userId, Long[] roleIds)
|
||||
{
|
||||
userService.checkUserDataScope(userId);
|
||||
userService.insertUserAuth(userId, roleIds);
|
||||
AuthorizationUtils.clearAllCachedAuthorizationInfo();
|
||||
return success();
|
||||
}
|
||||
|
||||
@@ -256,7 +273,7 @@ public class SysUserController extends BaseController
|
||||
@ResponseBody
|
||||
public String checkLoginNameUnique(SysUser user)
|
||||
{
|
||||
return userService.checkLoginNameUnique(user.getLoginName());
|
||||
return userService.checkLoginNameUnique(user);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -289,6 +306,32 @@ public class SysUserController extends BaseController
|
||||
public AjaxResult changeStatus(SysUser user)
|
||||
{
|
||||
userService.checkUserAllowed(user);
|
||||
userService.checkUserDataScope(user.getUserId());
|
||||
return toAjax(userService.changeStatus(user));
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载部门列表树
|
||||
*/
|
||||
@RequiresPermissions("system:user:list")
|
||||
@GetMapping("/deptTreeData")
|
||||
@ResponseBody
|
||||
public List<Ztree> deptTreeData()
|
||||
{
|
||||
List<Ztree> ztrees = deptService.selectDeptTree(new SysDept());
|
||||
return ztrees;
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择部门树
|
||||
*
|
||||
* @param deptId 部门ID
|
||||
*/
|
||||
@RequiresPermissions("system:user:list")
|
||||
@GetMapping("/selectDeptTree/{deptId}")
|
||||
public String selectDeptTree(@PathVariable("deptId") Long deptId, ModelMap mmap)
|
||||
{
|
||||
mmap.put("dept", deptService.selectDeptById(deptId));
|
||||
return prefix + "/deptTree";
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@@ -40,73 +40,75 @@ public class TestController extends BaseController
|
||||
|
||||
@ApiOperation("获取用户列表")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult userList()
|
||||
public R<List<UserEntity>> userList()
|
||||
{
|
||||
List<UserEntity> userList = new ArrayList<UserEntity>(users.values());
|
||||
return AjaxResult.success(userList);
|
||||
return R.ok(userList);
|
||||
}
|
||||
|
||||
@ApiOperation("获取用户详细")
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path")
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
|
||||
@GetMapping("/{userId}")
|
||||
public AjaxResult getUser(@PathVariable Integer userId)
|
||||
public R<UserEntity> getUser(@PathVariable Integer userId)
|
||||
{
|
||||
if (!users.isEmpty() && users.containsKey(userId))
|
||||
{
|
||||
return AjaxResult.success(users.get(userId));
|
||||
return R.ok(users.get(userId));
|
||||
}
|
||||
else
|
||||
{
|
||||
return error("用户不存在");
|
||||
return R.fail("用户不存在");
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("新增用户")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "userId", value = "用户id", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "username", value = "用户名称", dataType = "String"),
|
||||
@ApiImplicitParam(name = "password", value = "用户密码", dataType = "String"),
|
||||
@ApiImplicitParam(name = "mobile", value = "用户手机", dataType = "String")
|
||||
@ApiImplicitParam(name = "userId", value = "用户id", dataType = "Integer", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "username", value = "用户名称", dataType = "String", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "password", value = "用户密码", dataType = "String", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "mobile", value = "用户手机", dataType = "String", dataTypeClass = String.class)
|
||||
})
|
||||
@PostMapping("/save")
|
||||
public AjaxResult save(UserEntity user)
|
||||
public R<String> save(UserEntity user)
|
||||
{
|
||||
if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
|
||||
{
|
||||
return error("用户ID不能为空");
|
||||
return R.fail("用户ID不能为空");
|
||||
}
|
||||
return AjaxResult.success(users.put(user.getUserId(), user));
|
||||
users.put(user.getUserId(), user);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ApiOperation("更新用户")
|
||||
@PutMapping("/update")
|
||||
public AjaxResult update(@RequestBody UserEntity user)
|
||||
public R<String> update(@RequestBody UserEntity user)
|
||||
{
|
||||
if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
|
||||
{
|
||||
return error("用户ID不能为空");
|
||||
return R.fail("用户ID不能为空");
|
||||
}
|
||||
if (users.isEmpty() || !users.containsKey(user.getUserId()))
|
||||
{
|
||||
return error("用户不存在");
|
||||
return R.fail("用户不存在");
|
||||
}
|
||||
users.remove(user.getUserId());
|
||||
return AjaxResult.success(users.put(user.getUserId(), user));
|
||||
users.put(user.getUserId(), user);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ApiOperation("删除用户信息")
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path")
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
|
||||
@DeleteMapping("/{userId}")
|
||||
public AjaxResult delete(@PathVariable Integer userId)
|
||||
public R<String> delete(@PathVariable Integer userId)
|
||||
{
|
||||
if (!users.isEmpty() && users.containsKey(userId))
|
||||
{
|
||||
users.remove(userId);
|
||||
return success();
|
||||
return R.ok();
|
||||
}
|
||||
else
|
||||
{
|
||||
return error("用户不存在");
|
||||
return R.fail("用户不存在");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@ ruoyi:
|
||||
# 名称
|
||||
name: RuoYi
|
||||
# 版本
|
||||
version: 4.7.0
|
||||
version: 4.7.6
|
||||
# 版权年份
|
||||
copyrightYear: 2021
|
||||
copyrightYear: 2022
|
||||
# 实例演示开关
|
||||
demoEnabled: true
|
||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||
@@ -23,10 +23,13 @@ server:
|
||||
tomcat:
|
||||
# tomcat的URI编码
|
||||
uri-encoding: UTF-8
|
||||
# tomcat最大线程数,默认为200
|
||||
max-threads: 800
|
||||
# Tomcat启动初始化的线程数,默认值25
|
||||
min-spare-threads: 30
|
||||
# 连接数满后的排队数,默认为100
|
||||
accept-count: 1000
|
||||
threads:
|
||||
# tomcat最大线程数,默认为200
|
||||
max: 800
|
||||
# Tomcat启动初始化的线程数,默认值10
|
||||
min-spare: 100
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
|
||||
@@ -3,13 +3,18 @@
|
||||
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-config.dtd">
|
||||
<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="mapUnderscoreToCamelCase" value="true"/> 驼峰式命名 -->
|
||||
<!-- 全局参数 -->
|
||||
<settings>
|
||||
<!-- 使全局的映射器启用或禁用缓存 -->
|
||||
<setting name="cacheEnabled" value="true" />
|
||||
<!-- 允许JDBC 支持自动生成主键 -->
|
||||
<setting name="useGeneratedKeys" value="true" />
|
||||
<!-- 配置默认的执行器.SIMPLE就是普通执行器;REUSE执行器会重用预处理语句(prepared statements);BATCH执行器将重用语句并执行批量更新 -->
|
||||
<setting name="defaultExecutorType" value="SIMPLE" />
|
||||
<!-- 指定 MyBatis 所用日志的具体实现 -->
|
||||
<setting name="logImpl" value="SLF4J" />
|
||||
<!-- 使用驼峰命名法转换字段 -->
|
||||
<!-- <setting name="mapUnderscoreToCamelCase" value="true"/> -->
|
||||
</settings>
|
||||
|
||||
</configuration>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*!
|
||||
* bootstrap-fileinput v5.2.3
|
||||
* bootstrap-fileinput v5.5.2
|
||||
* http://plugins.krajee.com/file-input
|
||||
*
|
||||
* Krajee default styling for bootstrap-fileinput.
|
||||
*
|
||||
* Author: Kartik Visweswaran
|
||||
* Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
|
||||
* Copyright: 2014 - 2022, Kartik Visweswaran, Krajee.com
|
||||
*
|
||||
* Licensed under the BSD-3-Clause
|
||||
* https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
|
||||
@@ -50,6 +50,10 @@ input[type=file].file-loading {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.file-caption .input-group {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.btn-file input[type=file],
|
||||
.file-caption-icon,
|
||||
.file-preview .fileinput-remove,
|
||||
@@ -179,15 +183,15 @@ input[type=file].file-loading {
|
||||
}
|
||||
|
||||
.file-caption.icon-visible .file-caption-name {
|
||||
padding-left: 1.875rem;
|
||||
padding-left: 25px;
|
||||
}
|
||||
|
||||
.file-caption.icon-visible > .input-group-lg .file-caption-name {
|
||||
padding-left: 2.1rem;
|
||||
padding-left: 30px;
|
||||
}
|
||||
|
||||
.file-caption.icon-visible > .input-group-sm .file-caption-name {
|
||||
padding-left: 1.5rem;
|
||||
padding-left: 22px;
|
||||
}
|
||||
|
||||
.file-caption-name:not(.file-caption-disabled) {
|
||||
@@ -201,7 +205,7 @@ input[type=file].file-loading {
|
||||
}
|
||||
|
||||
.file-caption-icon {
|
||||
padding: 0.5rem;
|
||||
padding: 7px 5px;
|
||||
left: 4px;
|
||||
}
|
||||
|
||||
@@ -274,6 +278,7 @@ input[type=file].file-loading {
|
||||
padding: 6px;
|
||||
float: left;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
.krajee-default.file-preview-frame .kv-file-content {
|
||||
@@ -281,12 +286,6 @@ input[type=file].file-loading {
|
||||
height: 160px;
|
||||
}
|
||||
|
||||
.krajee-default .file-preview-other-frame {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.krajee-default.file-preview-frame .kv-file-content.kv-pdf-rendered {
|
||||
width: 400px;
|
||||
}
|
||||
@@ -330,7 +329,7 @@ input[type=file].file-loading {
|
||||
text-align: center;
|
||||
padding-top: 4px;
|
||||
font-size: 11px;
|
||||
color: #777;
|
||||
color: #999;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
@@ -406,7 +405,7 @@ input[type=file].file-loading {
|
||||
height: 2.4rem;
|
||||
top: 50%;
|
||||
border-radius: 50%;
|
||||
text-align:center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.btn-navigate * {
|
||||
@@ -426,19 +425,12 @@ input[type=file].file-loading {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.file-zoom-dialog .kv-zoom-caption {
|
||||
max-width: 50%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.file-zoom-dialog .kv-zoom-header {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.file-zoom-dialog .kv-zoom-body {
|
||||
padding: 0.25rem 0.5rem 0.25rem 0;
|
||||
padding: 0.25rem;
|
||||
}
|
||||
|
||||
.file-zoom-dialog .kv-zoom-description {
|
||||
@@ -554,6 +546,10 @@ input[type=file].file-loading {
|
||||
z-index: 3000;
|
||||
}
|
||||
|
||||
.kv-zoom-actions {
|
||||
min-width: 140px;
|
||||
}
|
||||
|
||||
.kv-zoom-actions .btn-kv {
|
||||
margin-left: 3px;
|
||||
}
|
||||
@@ -568,15 +564,6 @@ input[type=file].file-loading {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.file-zoom-content > * {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.file-zoom-content .kv-spacer {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.file-zoom-content .file-preview-image {
|
||||
max-height: 100%;
|
||||
}
|
||||
@@ -668,4 +655,34 @@ input[type=file].file-loading {
|
||||
|
||||
.file-preview .kv-zoom-cache {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.file-preview-other-frame, .file-preview-object, .kv-file-content, .kv-zoom-body {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.btn-kv-rotate,
|
||||
.kv-file-rotate {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.rotatable:not(.hide-rotate) .btn-kv-rotate,
|
||||
.rotatable:not(.hide-rotate) .kv-file-rotate {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.rotatable .file-zoom-detail,
|
||||
.rotatable .kv-file-content,
|
||||
.rotatable .kv-file-content > :first-child {
|
||||
transform-origin: center center;
|
||||
}
|
||||
|
||||
.rotate-animate {
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.kv-overflow-hidden {
|
||||
overflow: hidden;
|
||||
}
|
||||
+620
-331
File diff suppressed because it is too large
Load Diff
+4
-3
File diff suppressed because one or more lines are too long
+3
-486
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+3
-1
@@ -4,10 +4,11 @@
|
||||
* @update: zhixin wen <wenzhixin2010@gmail.com>
|
||||
*/
|
||||
|
||||
const Utils = $.fn.bootstrapTable.utils
|
||||
var Utils = $.fn.bootstrapTable.utils
|
||||
|
||||
$.extend($.fn.bootstrapTable.defaults, {
|
||||
autoRefresh: false,
|
||||
showAutoRefresh: true,
|
||||
autoRefreshInterval: 60,
|
||||
autoRefreshSilent: true,
|
||||
autoRefreshStatus: true,
|
||||
@@ -17,6 +18,7 @@ $.extend($.fn.bootstrapTable.defaults, {
|
||||
$.extend($.fn.bootstrapTable.defaults.icons, {
|
||||
autoRefresh: {
|
||||
bootstrap3: 'glyphicon-time icon-time',
|
||||
bootstrap5: 'bi-clock',
|
||||
materialize: 'access_time',
|
||||
'bootstrap-table': 'icon-clock'
|
||||
}[$.fn.bootstrapTable.theme] || 'fa-clock'
|
||||
|
||||
+2
-1
@@ -2,7 +2,7 @@
|
||||
* @author zhixin wen <wenzhixin2010@gmail.com>
|
||||
*/
|
||||
|
||||
const Utils = $.fn.bootstrapTable.utils
|
||||
var Utils = $.fn.bootstrapTable.utils
|
||||
|
||||
// Reasonable defaults
|
||||
const PIXEL_STEP = 10
|
||||
@@ -225,6 +225,7 @@ $.BootstrapTable = class extends $.BootstrapTable {
|
||||
const initFixedBody = ($fixedColumns, $fixedHeader) => {
|
||||
$fixedColumns.find('.fixed-table-body').remove()
|
||||
$fixedColumns.append(this.$tableBody.clone(true))
|
||||
$fixedColumns.find('.fixed-table-body table').removeAttr('id')
|
||||
|
||||
const $fixedBody = $fixedColumns.find('.fixed-table-body')
|
||||
|
||||
|
||||
+4
-3
@@ -1,8 +1,9 @@
|
||||
/**
|
||||
* @author zhixin wen <wenzhixin2010@gmail.com>
|
||||
* @author: Dustin Utecht
|
||||
* @github: https://github.com/UtechtDustin
|
||||
*/
|
||||
|
||||
const Utils = $.fn.bootstrapTable.utils
|
||||
var Utils = $.fn.bootstrapTable.utils
|
||||
|
||||
$.extend($.fn.bootstrapTable.defaults, {
|
||||
customView: false,
|
||||
@@ -105,4 +106,4 @@ $.BootstrapTable = class extends $.BootstrapTable {
|
||||
this.showCustomView = !this.showCustomView
|
||||
this.initBody()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
* extensions: https://github.com/vitalets/x-editable
|
||||
*/
|
||||
|
||||
const Utils = $.fn.bootstrapTable.utils
|
||||
var Utils = $.fn.bootstrapTable.utils
|
||||
|
||||
$.extend($.fn.bootstrapTable.defaults, {
|
||||
editable: true,
|
||||
|
||||
+52
-48
@@ -3,7 +3,7 @@
|
||||
* extensions: https://github.com/hhurz/tableExport.jquery.plugin
|
||||
*/
|
||||
|
||||
const Utils = $.fn.bootstrapTable.utils
|
||||
var Utils = $.fn.bootstrapTable.utils
|
||||
|
||||
const TYPE_NAME = {
|
||||
json: 'JSON',
|
||||
@@ -43,6 +43,7 @@ $.extend($.fn.bootstrapTable.columnDefaults, {
|
||||
$.extend($.fn.bootstrapTable.defaults.icons, {
|
||||
export: {
|
||||
bootstrap3: 'glyphicon-export icon-share',
|
||||
bootstrap5: 'bi-download',
|
||||
materialize: 'file_download',
|
||||
'bootstrap-table': 'icon-download'
|
||||
}[$.fn.bootstrapTable.theme] || 'fa-download'
|
||||
@@ -91,30 +92,51 @@ $.BootstrapTable = class extends $.BootstrapTable {
|
||||
|
||||
this.buttons = Object.assign(this.buttons, {
|
||||
export: {
|
||||
html: exportTypes.length === 1 ? `
|
||||
<div class="export ${this.constants.classes.buttonsDropdown}"
|
||||
data-type="${exportTypes[0]}">
|
||||
<button class="${this.constants.buttonsClass}"
|
||||
aria-label="Export"
|
||||
type="button"
|
||||
title="${o.formatExport()}">
|
||||
${o.showButtonIcons ? Utils.sprintf(this.constants.html.icon, o.iconsPrefix, o.icons.export) : ''}
|
||||
${o.showButtonText ? o.formatExport() : ''}
|
||||
</button>
|
||||
</div>
|
||||
` : `
|
||||
<div class="export ${this.constants.classes.buttonsDropdown}">
|
||||
<button class="${this.constants.buttonsClass} dropdown-toggle"
|
||||
aria-label="Export"
|
||||
${this.constants.dataToggle}="dropdown"
|
||||
type="button"
|
||||
title="${o.formatExport()}">
|
||||
${o.showButtonIcons ? Utils.sprintf(this.constants.html.icon, o.iconsPrefix, o.icons.export) : ''}
|
||||
${o.showButtonText ? o.formatExport() : ''}
|
||||
${this.constants.html.dropdownCaret}
|
||||
</button>
|
||||
</div>
|
||||
`
|
||||
html:
|
||||
(() => {
|
||||
if (exportTypes.length === 1) {
|
||||
return `
|
||||
<div class="export ${this.constants.classes.buttonsDropdown}"
|
||||
data-type="${exportTypes[0]}">
|
||||
<button class="${this.constants.buttonsClass}"
|
||||
aria-label="Export"
|
||||
type="button"
|
||||
title="${o.formatExport()}">
|
||||
${o.showButtonIcons ? Utils.sprintf(this.constants.html.icon, o.iconsPrefix, o.icons.export) : ''}
|
||||
${o.showButtonText ? o.formatExport() : ''}
|
||||
</button>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
|
||||
const html = []
|
||||
|
||||
html.push(`
|
||||
<div class="export ${this.constants.classes.buttonsDropdown}">
|
||||
<button class="${this.constants.buttonsClass} dropdown-toggle"
|
||||
aria-label="Export"
|
||||
${this.constants.dataToggle}="dropdown"
|
||||
type="button"
|
||||
title="${o.formatExport()}">
|
||||
${o.showButtonIcons ? Utils.sprintf(this.constants.html.icon, o.iconsPrefix, o.icons.export) : ''}
|
||||
${o.showButtonText ? o.formatExport() : ''}
|
||||
${this.constants.html.dropdownCaret}
|
||||
</button>
|
||||
${this.constants.html.toolbarDropdown[0]}
|
||||
`)
|
||||
|
||||
for (const type of exportTypes) {
|
||||
if (TYPE_NAME.hasOwnProperty(type)) {
|
||||
const $item = $(Utils.sprintf(this.constants.html.pageDropdownItem, '', TYPE_NAME[type]))
|
||||
|
||||
$item.attr('data-type', type)
|
||||
html.push($item.prop('outerHTML'))
|
||||
}
|
||||
}
|
||||
|
||||
html.push(this.constants.html.toolbarDropdown[1], '</div>')
|
||||
return html.join('')
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -126,32 +148,14 @@ $.BootstrapTable = class extends $.BootstrapTable {
|
||||
return
|
||||
}
|
||||
|
||||
let $menu = $(this.constants.html.toolbarDropdown.join(''))
|
||||
let $items = this.$export
|
||||
this.updateExportButton()
|
||||
let $exportButtons = this.$export.find('[data-type]')
|
||||
|
||||
if (exportTypes.length > 1) {
|
||||
this.$export.append($menu)
|
||||
|
||||
// themes support
|
||||
if ($menu.children().length) {
|
||||
$menu = $menu.children().eq(0)
|
||||
}
|
||||
for (const type of exportTypes) {
|
||||
if (TYPE_NAME.hasOwnProperty(type)) {
|
||||
const $item = $(Utils.sprintf(this.constants.html.pageDropdownItem,
|
||||
'', TYPE_NAME[type]))
|
||||
|
||||
$item.attr('data-type', type)
|
||||
$menu.append($item)
|
||||
}
|
||||
}
|
||||
|
||||
$items = $menu.children()
|
||||
if (exportTypes.length === 1) {
|
||||
$exportButtons = this.$export.find('button')
|
||||
}
|
||||
|
||||
this.updateExportButton()
|
||||
|
||||
$items.click(e => {
|
||||
$exportButtons.click(e => {
|
||||
e.preventDefault()
|
||||
|
||||
const type = $(e.currentTarget).data('type')
|
||||
|
||||
+4
-3
@@ -2,7 +2,7 @@
|
||||
* @update zhixin wen <wenzhixin2010@gmail.com>
|
||||
*/
|
||||
|
||||
const Utils = $.fn.bootstrapTable.utils
|
||||
var Utils = $.fn.bootstrapTable.utils
|
||||
|
||||
function printPageBuilderDefault (table) {
|
||||
return `
|
||||
@@ -134,8 +134,9 @@ $.BootstrapTable = class extends $.BootstrapTable {
|
||||
|
||||
doPrint (data) {
|
||||
const formatValue = (row, i, column) => {
|
||||
const value = Utils.calculateObjectValue(column, column.printFormatter,
|
||||
[row[column.field], row, i], row[column.field])
|
||||
const value = Utils.calculateObjectValue(column,
|
||||
column.printFormatter || column.formatter,
|
||||
[$.common.getItemField(row, column.field), row, i], $.common.getItemField(row, column.field))
|
||||
|
||||
return typeof value === 'undefined' || value === null ?
|
||||
this.options.undefinedText : value
|
||||
|
||||
+17
-1
@@ -13,7 +13,7 @@ $.extend($.fn.bootstrapTable.defaults, {
|
||||
onDragStyle: null,
|
||||
onDropStyle: null,
|
||||
onDragClass: 'reorder_rows_onDragClass',
|
||||
dragHandle: '>tbody>tr>td',
|
||||
dragHandle: '>tbody>tr>td:not(.bs-checkbox)',
|
||||
useRowAttrFunc: false,
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
onReorderRowsDrag (row) {
|
||||
@@ -93,10 +93,26 @@ $.BootstrapTable = class extends $.BootstrapTable {
|
||||
this.options.data.splice(this.options.data.indexOf(draggingRow), 1)
|
||||
this.options.data.splice(index, 0, draggingRow)
|
||||
|
||||
this.initSearch()
|
||||
|
||||
// Call the user defined function
|
||||
this.options.onReorderRowsDrop(droppedRow)
|
||||
|
||||
// Call the event reorder-row
|
||||
this.trigger('reorder-row', newData, draggingRow, droppedRow)
|
||||
}
|
||||
|
||||
initSearch () {
|
||||
this.ignoreInitSort = true
|
||||
super.initSearch()
|
||||
}
|
||||
|
||||
initSort () {
|
||||
if (this.ignoreInitSort) {
|
||||
this.ignoreInitSort = false
|
||||
return
|
||||
}
|
||||
|
||||
super.initSort()
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -43,6 +43,8 @@ $.BootstrapTable = class extends $.BootstrapTable {
|
||||
.on('column-switch.bs.table page-change.bs.table', () => {
|
||||
reInitResizable(this)
|
||||
})
|
||||
|
||||
reInitResizable(this)
|
||||
}
|
||||
|
||||
toggleView (...args) {
|
||||
|
||||
+344
-48
@@ -14,12 +14,14 @@
|
||||
}
|
||||
// 如果是初始化组件
|
||||
options = $.extend({}, $.fn.bootstrapTreeTable.defaults, options || {});
|
||||
target.hasSelectItem = false;// 是否有radio或checkbox
|
||||
target.data_list = null; //用于缓存格式化后的数据-按父分组
|
||||
target.data_obj = null; //用于缓存格式化后的数据-按id存对象
|
||||
target.hiddenColumns = []; //用于存放被隐藏列的field
|
||||
target.lastAjaxParams; //用户最后一次请求的参数
|
||||
target.isFixWidth=false; //是否有固定宽度
|
||||
target.hasSelectItem = false; // 是否有radio或checkbox
|
||||
target.data_list = null; // 用于缓存格式化后的数据-按父分组
|
||||
target.data_obj = null; // 用于缓存格式化后的数据-按id存对象
|
||||
target.hiddenColumns = []; // 用于存放被隐藏列的field
|
||||
target.lastAjaxParams; // 用户最后一次请求的参数
|
||||
target.isFixWidth=false; // 是否有固定宽度
|
||||
target.totalRows = 0; // 记录总数
|
||||
target.totalPages = 0; // 总页数
|
||||
// 初始化
|
||||
var init = function() {
|
||||
// 初始化容器
|
||||
@@ -148,12 +150,30 @@
|
||||
if (options.height) {
|
||||
$tbody.css("height", options.height);
|
||||
}
|
||||
if (options.pagination) {
|
||||
var $pagination = $('<div class="fixed-table-pagination"></div>');
|
||||
target.append($pagination);
|
||||
}
|
||||
}
|
||||
// 初始化数据服务
|
||||
var initServer = function(parms) {
|
||||
if (options.pagination) {
|
||||
if(parms == undefined || parms == null) {
|
||||
parms = {};
|
||||
}
|
||||
parms[options.parentCode] = options.rootIdValue;
|
||||
}
|
||||
// 加载数据前先清空
|
||||
target.data_list = {};
|
||||
target.data_obj = {};
|
||||
// 设置请求分页参数
|
||||
if (options.pagination) {
|
||||
var params = {};
|
||||
params.offset = options.pageSize * (options.pageNumber - 1);
|
||||
params.limit = options.pageSize;
|
||||
var curParams = { pageSize: params.limit, pageNum: params.offset / params.limit + 1 };
|
||||
parms = $.extend(curParams, parms);
|
||||
}
|
||||
var $tbody = target.find("tbody");
|
||||
// 添加加载loading
|
||||
var $loading = '<tr><td colspan="' + options.columns.length + '"><div style="display: block;text-align: center;">正在努力地加载数据中,请稍候……</div></td></tr>'
|
||||
@@ -162,8 +182,8 @@
|
||||
$.ajax({
|
||||
type: options.type,
|
||||
url: options.url,
|
||||
data: parms ? parms : options.ajaxParams,
|
||||
dataType: "JSON",
|
||||
data: $.extend(parms, options.ajaxParams),
|
||||
dataType: "json",
|
||||
success: function(data, textStatus, jqXHR) {
|
||||
data = calculateObjectValue(options, options.responseHandler, [data], data);
|
||||
renderTable(data);
|
||||
@@ -172,7 +192,7 @@
|
||||
error: function(xhr, textStatus) {
|
||||
var _errorMsg = '<tr><td colspan="' + options.columns.length + '"><div style="display: block;text-align: center;">' + xhr.responseText + '</div></td></tr>'
|
||||
$tbody.html(_errorMsg);
|
||||
},
|
||||
}
|
||||
});
|
||||
} else {
|
||||
renderTable(options.data);
|
||||
@@ -180,6 +200,17 @@
|
||||
}
|
||||
// 加载完数据后渲染表格
|
||||
var renderTable = function(data) {
|
||||
var list, totalPage = 0, currPage = 0;
|
||||
if (options.pagination) {
|
||||
list = data.rows; // 数据
|
||||
currPage = options.pageNumber; // 当前页
|
||||
totalPage = ~~((data.total - 1) / options.pageSize) + 1 // 总页数
|
||||
target.totalPages = totalPage;
|
||||
target.totalRows = data.total; // 总记录数
|
||||
} else {
|
||||
list = data;
|
||||
}
|
||||
data = list;
|
||||
var $tbody = target.find("tbody");
|
||||
// 先清空
|
||||
$tbody.html("");
|
||||
@@ -196,22 +227,24 @@
|
||||
if (rootNode) {
|
||||
$.each(rootNode, function(i, item) {
|
||||
var _child_row_id = "row_id_" + i
|
||||
recursionNode(item, 1, _child_row_id, "row_root");
|
||||
recursionNode(item, 1, _child_row_id, "row_root", item[options.code]);
|
||||
});
|
||||
}
|
||||
// 下边的操作主要是为了查询时让一些没有根节点的节点显示
|
||||
$.each(data, function(i, item) {
|
||||
if (!item.isShow) {
|
||||
var tr = renderRow(item, false, 1, "", "");
|
||||
var tr = renderRow(item, false, 1, "", "", options.pagination, item[options.code]);
|
||||
$tbody.append(tr);
|
||||
}
|
||||
});
|
||||
target.append($tbody);
|
||||
registerExpanderEvent();
|
||||
registerRowClickEvent();
|
||||
initHiddenColumns();
|
||||
// 动态设置表头宽度
|
||||
autoTheadWidth();
|
||||
if (options.pagination) {
|
||||
initPagination(totalPage, currPage);
|
||||
}
|
||||
// 移动端适配
|
||||
var treetableTable = $(target).parent('.treetable-table');
|
||||
var availableHeight = treetableTable.outerWidth();
|
||||
@@ -229,6 +262,180 @@
|
||||
$(target).attr('style','width:' + w +'px');
|
||||
}
|
||||
}
|
||||
// 初始化分页
|
||||
var initPagination = function (totalPage,currPage) {
|
||||
var $pagination = target.find(".fixed-table-pagination");
|
||||
$pagination.empty();
|
||||
var html = [];
|
||||
var pageFrom = (options.pageNumber - 1) * options.pageSize + 1;
|
||||
var pageTo = options.pageNumber * options.pageSize;
|
||||
if (pageTo > target.totalRows) {
|
||||
pageTo = target.totalRows;
|
||||
}
|
||||
html.push('<div class="pull-left pagination-detail">');
|
||||
html.push('<span class="pagination-info">' + formatShowingRows(pageFrom, pageTo, target.totalRows) + '</span>');
|
||||
var pageList = false;
|
||||
$.each(options.pageList, function (i, page) {
|
||||
if(target.totalRows > page){
|
||||
pageList = true;
|
||||
}
|
||||
})
|
||||
if(pageList){
|
||||
var _page_list = [];
|
||||
_page_list.push('<span class="page-list">');
|
||||
_page_list.push('<span class="btn-group dropup">');
|
||||
_page_list.push('<button type="button" class="btn btn-default btn-outline dropdown-toggle" data-toggle="dropdown">');
|
||||
_page_list.push('<span class="page-size">' + options.pageSize + '</span>');
|
||||
_page_list.push('<span class="caret"></span>');
|
||||
_page_list.push('</button>');
|
||||
_page_list.push('<ul class="dropdown-menu" role="menu">');
|
||||
$.each(options.pageList, function (i, page) {
|
||||
if(page == options.pageSize){
|
||||
_page_list.push('<li class="active"><a href="javascript:void(0)">' + page + '</a></li>');
|
||||
}
|
||||
else if(page >= target.totalRows && i === 1){
|
||||
_page_list.push('<li><a href="javascript:void(0)">' + page + '</a></li>');
|
||||
}
|
||||
else if(page <= target.totalRows){
|
||||
_page_list.push('<li><a href="javascript:void(0)">' + page + '</a></li>');
|
||||
}
|
||||
})
|
||||
_page_list.push('</ul>');
|
||||
_page_list.push('</span>');
|
||||
html.push(formatRecordsPerPage(_page_list.join('')))
|
||||
html.push('</span>');
|
||||
}
|
||||
html.push('</div>');
|
||||
|
||||
if(totalPage > 1){
|
||||
html.push('<div class="pull-right pagination">');
|
||||
html.push('<ul class="pagination pagination-outline">');
|
||||
html.push('<li class="page-pre"><a href="javascript:void(0)">' + options.paginationPreText + '</a></li>');
|
||||
var from, to;
|
||||
if (totalPage < 5) {
|
||||
from = 1;
|
||||
to = totalPage;
|
||||
} else {
|
||||
from = currPage - 2;
|
||||
to = from + 4;
|
||||
if (from < 1) {
|
||||
from = 1;
|
||||
to = 5;
|
||||
}
|
||||
if (to > totalPage) {
|
||||
to = totalPage;
|
||||
from = to - 4;
|
||||
}
|
||||
}
|
||||
|
||||
if (totalPage >= 6) {
|
||||
if (currPage >= 3) {
|
||||
html.push('<li class="page-first' + (1 == currPage ? ' active' : '') + '">', '<a href="javascript:void(0)">', 1, '</a>', '</li>');
|
||||
from++;
|
||||
}
|
||||
if (currPage >= 4) {
|
||||
if (currPage == 4 || totalPage == 6 || totalPage == 7) {
|
||||
from--;
|
||||
} else {
|
||||
html.push('<li class="page-first-separator disabled">', '<a href="javascript:void(0)">...</a>', '</li>');
|
||||
}
|
||||
to--;
|
||||
}
|
||||
}
|
||||
|
||||
if (totalPage >= 7) {
|
||||
if (currPage >= (totalPage - 2)) {
|
||||
from--;
|
||||
}
|
||||
}
|
||||
if (totalPage == 6) {
|
||||
if (currPage >= (totalPage - 2)) {
|
||||
to++;
|
||||
}
|
||||
} else if (totalPage >= 7) {
|
||||
if (totalPage == 7 || currPage >= (totalPage - 3)) {
|
||||
to++;
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = from; i <= to; i++) {
|
||||
html.push('<li class="page-number' + (i == currPage ? ' active' : '') + '">', '<a href="javascript:void(0)">', i, '</a>', '</li>');
|
||||
}
|
||||
|
||||
if (totalPage >= 8) {
|
||||
if (currPage <= (totalPage - 4)) {
|
||||
html.push('<li class="page-last-separator disabled">', '<a href="javascript:void(0)">...</a>', '</li>');
|
||||
}
|
||||
}
|
||||
|
||||
if (totalPage >= 6) {
|
||||
if (currPage <= (totalPage - 3)) {
|
||||
html.push('<li class="page-last' + (totalPage === currPage ? ' active' : '') + '">', '<a href="javascript:void(0)">', totalPage, '</a>', '</li>');
|
||||
}
|
||||
}
|
||||
|
||||
html.push('<li class="page-next"><a href="javascript:void(0)">' + options.paginationNextText + '</a></li>');
|
||||
html.push('</ul></div>');
|
||||
}
|
||||
|
||||
$pagination.append(html.join(''));
|
||||
|
||||
var $pageList = $pagination.find('.page-list a');
|
||||
var $pre = $pagination.find('.page-pre');
|
||||
var $next = $pagination.find('.page-next');
|
||||
var $number = $pagination.find('.page-number');
|
||||
var $first = $pagination.find('.page-first');
|
||||
var $last = $pagination.find('.page-last');
|
||||
$pre.off('click').on('click', $.proxy(onPagePre, this));
|
||||
$pageList.off('click').on('click', $.proxy(onPageListChange, this));
|
||||
$number.off('click').on('click', $.proxy(onPageNumber, this));
|
||||
$first.off('click').on('click', $.proxy(onPageFirst, this));
|
||||
$last.off('click').on('click', $.proxy(onPageLast, this));
|
||||
$next.off('click').on('click', $.proxy(onPageNext, this));
|
||||
}
|
||||
var onPageListChange = function(event){
|
||||
var $this = $(event.currentTarget);
|
||||
$this.parent().addClass('active').siblings().removeClass('active');
|
||||
var $pagination = target.find(".fixed-table-pagination");
|
||||
options.pageSize = $this.text().toUpperCase() === target.totalRows ? target.totalRows : + $this.text();
|
||||
|
||||
if(target.totalRows < options.pageSize * options.pageNumber){
|
||||
options.pageNumber = 1;
|
||||
}
|
||||
$pagination.find('.page-size').text(options.pageSize);
|
||||
initServer();
|
||||
}
|
||||
var onPagePre = function(event){
|
||||
if ((options.pageNumber - 1) === 0) {
|
||||
options.pageNumber = target.totalPages;
|
||||
} else {
|
||||
options.pageNumber--;
|
||||
}
|
||||
initServer();
|
||||
}
|
||||
var onPageNumber = function(event){
|
||||
if (options.pageNumber == $(event.currentTarget).text()) {
|
||||
return;
|
||||
}
|
||||
options.pageNumber = $(event.currentTarget).text();
|
||||
initServer();
|
||||
}
|
||||
var onPageFirst = function(event){
|
||||
options.pageNumber = 1;
|
||||
initServer();
|
||||
}
|
||||
var onPageLast = function (event) {
|
||||
options.pageNumber = target.totalPages;
|
||||
initServer();
|
||||
}
|
||||
var onPageNext = function(event){
|
||||
if ((options.pageNumber + 1) > target.totalPages) {
|
||||
options.pageNumber = 1;
|
||||
} else {
|
||||
options.pageNumber++;
|
||||
}
|
||||
initServer();
|
||||
}
|
||||
// 动态设置表头宽度
|
||||
var autoTheadWidth = function(initFlag) {
|
||||
if(options.height>0){
|
||||
@@ -269,6 +476,14 @@
|
||||
$.each(data, function(index, item) {
|
||||
// 添加一个默认属性,用来判断当前节点有没有被显示
|
||||
item.isShow = false;
|
||||
// 是否分页
|
||||
if (options.pagination) {
|
||||
if (item.isTreeLeaf == undefined || item.isTreeLeaf == null) {
|
||||
item.isTreeLeaf = false;
|
||||
} else {
|
||||
item.isTreeLeaf = (item["isTreeLeaf"] == 1 ? true: false) || ((item["isTreeLeaf"] == 'true' || item["isTreeLeaf"] == true) ? true: false);
|
||||
}
|
||||
}
|
||||
// 顶级节点校验判断,兼容0,'0','',null
|
||||
var _defaultRootFlag = item[options.parentCode] == '0' ||
|
||||
item[options.parentCode] == 0 ||
|
||||
@@ -295,26 +510,26 @@
|
||||
});
|
||||
}
|
||||
// 递归获取子节点并且设置子节点
|
||||
var recursionNode = function(parentNode, lv, row_id, p_id) {
|
||||
var recursionNode = function(parentNode, lv, row_id, p_id, k) {
|
||||
var $tbody = target.find("tbody");
|
||||
var _ls = target.data_list["_n_" + parentNode[options.code]];
|
||||
var $tr = renderRow(parentNode, _ls ? true : false, lv, row_id, p_id);
|
||||
var $tr = renderRow(parentNode, _ls ? true : false, lv, row_id, p_id, options.pagination, k);
|
||||
$tbody.append($tr);
|
||||
if (_ls) {
|
||||
$.each(_ls, function(i, item) {
|
||||
var _child_row_id = row_id + "_" + i
|
||||
recursionNode(item, (lv + 1), _child_row_id, row_id)
|
||||
recursionNode(item, (lv + 1), _child_row_id, row_id, item[options.code])
|
||||
});
|
||||
}
|
||||
};
|
||||
// 绘制行
|
||||
var renderRow = function(item, isP, lv, row_id, p_id) {
|
||||
var renderRow = function(item, isP, lv, row_id, p_id, _pagination, k) {
|
||||
// 标记已显示
|
||||
item.isShow = true;
|
||||
item.row_id = row_id;
|
||||
item.p_id = p_id;
|
||||
item.lv = lv;
|
||||
var $tr = $('<tr id="' + row_id + '" pid="' + p_id + '"></tr>');
|
||||
var $tr = $('<tr id="' + row_id + '" data-id="' + k + '"pid="' + p_id + '"></tr>');
|
||||
var _icon = options.expanderCollapsedClass;
|
||||
if (options.expandAll) {
|
||||
$tr.css("display", "table");
|
||||
@@ -329,6 +544,10 @@
|
||||
$tr.css("display", "none");
|
||||
}
|
||||
_icon = options.expanderCollapsedClass;
|
||||
} else if (_pagination) {
|
||||
if (item.isTreeLeaf) {
|
||||
_icon = options.expanderCollapsedClass;
|
||||
}
|
||||
} else {
|
||||
$tr.css("display", "none");
|
||||
_icon = options.expanderCollapsedClass;
|
||||
@@ -375,12 +594,20 @@
|
||||
$td.text(getItemField(item, column.field));
|
||||
}
|
||||
if (options.expandColumn == index) {
|
||||
if (!isP) {
|
||||
$td.prepend('<span class="treetable-expander"></span>')
|
||||
} else {
|
||||
$td.prepend('<span class="treetable-expander ' + _icon + '"></span>')
|
||||
}
|
||||
for (var int = 0; int < (lv - 1); int++) {
|
||||
if (_pagination) {
|
||||
if (item["isTreeLeaf"]) {
|
||||
$td.prepend('<span class="treetable-expander ' + _icon + '"></span>');
|
||||
} else {
|
||||
$td.prepend('<span class="treetable-expander"></span>')
|
||||
}
|
||||
} else {
|
||||
if (!isP) {
|
||||
$td.prepend('<span class="treetable-expander"></span>')
|
||||
} else {
|
||||
$td.prepend('<span class="treetable-expander ' + _icon + '"></span>');
|
||||
}
|
||||
}
|
||||
for (var int = 0; int < (lv - options.expandColumn); int++) {
|
||||
$td.prepend('<span class="treetable-indent"></span>')
|
||||
}
|
||||
}
|
||||
@@ -440,6 +667,8 @@
|
||||
$(this).addClass("treetable-selected");
|
||||
}
|
||||
}
|
||||
var _rowData = target.data_obj["id_" + $(this).data('id')];
|
||||
calculateObjectValue(options, options.onClickRow, [_rowData], _rowData);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -452,26 +681,77 @@
|
||||
if (_isExpanded || _isCollapsed) {
|
||||
var tr = $(this).parent().parent();
|
||||
var row_id = tr.attr("id");
|
||||
var _ls = target.find("tbody").find("tr[id^='" + row_id + "_']"); //下所有
|
||||
if (_isExpanded) {
|
||||
$(this).removeClass(options.expanderExpandedClass);
|
||||
$(this).addClass(options.expanderCollapsedClass);
|
||||
if (_ls && _ls.length > 0) {
|
||||
$.each(_ls, function(index, item) {
|
||||
$(item).css("display", "none");
|
||||
});
|
||||
}
|
||||
var _id = tr.attr("data-id");
|
||||
var _ls = target.find("tbody").find("tr[id^='" + row_id + "_']");
|
||||
if (!options.pagination) {
|
||||
if (_isExpanded) {
|
||||
$(this).removeClass(options.expanderExpandedClass);
|
||||
$(this).addClass(options.expanderCollapsedClass);
|
||||
if (_ls && _ls.length > 0) {
|
||||
$.each(_ls, function(index, item) {
|
||||
$(item).css("display", "none");
|
||||
});
|
||||
}
|
||||
} else {
|
||||
$(this).removeClass(options.expanderCollapsedClass);
|
||||
$(this).addClass(options.expanderExpandedClass);
|
||||
if (_ls && _ls.length > 0) {
|
||||
$.each(_ls, function(index, item) {
|
||||
var _p_icon = $("#" + $(item).attr("pid")).children().eq(options.expandColumn).find(".treetable-expander");
|
||||
var _p_display = $("#" + $(item).attr("pid")).css('display');
|
||||
if (_p_icon.hasClass(options.expanderExpandedClass) && _p_display == 'table') {
|
||||
$(item).css("display", "table");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$(this).removeClass(options.expanderCollapsedClass);
|
||||
$(this).addClass(options.expanderExpandedClass);
|
||||
var _ls = target.find("tbody").find("tr[id^='" + row_id + "_']");
|
||||
if (_ls && _ls.length > 0) {
|
||||
$.each(_ls, function(index, item) {
|
||||
// 父icon
|
||||
var _p_icon = $("#" + $(item).attr("pid")).children().eq(options.expandColumn).find(".treetable-expander");
|
||||
if (_p_icon.hasClass(options.expanderExpandedClass)) {
|
||||
$(item).css("display", "table");
|
||||
if (_isExpanded) {
|
||||
$.each(_ls, function(index, item) {
|
||||
$(item).css("display", "none");
|
||||
});
|
||||
} else {
|
||||
$.each(_ls, function(index, item) {
|
||||
var _icon = $(item).eq(options.expandColumn).find(".treetable-expander");
|
||||
if (_icon && _icon.hasClass(options.expanderExpandedClass)) {
|
||||
$(item).css("display", "table");
|
||||
} else {
|
||||
$(item).css("display", "table");
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (options.pagination) {
|
||||
var parms = {};
|
||||
parms[options.parentCode] = _id;
|
||||
if (options.dataUrl) {
|
||||
$.ajax({
|
||||
type: options.type,
|
||||
url: options.dataUrl,
|
||||
data: $.extend(parms, options.ajaxParams),
|
||||
dataType: "json",
|
||||
success: function(data, textStatus, jqXHR) {
|
||||
$("#" + row_id + "_load").remove();
|
||||
var list = data;
|
||||
data = list;
|
||||
target.appendData(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>'
|
||||
$("#" + row_id).after(_errorMsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
if (_isExpanded) {
|
||||
$(this).removeClass(options.expanderExpandedClass);
|
||||
$(this).addClass(options.expanderCollapsedClass);
|
||||
} else {
|
||||
$(this).removeClass(options.expanderCollapsedClass);
|
||||
$(this).addClass(options.expanderExpandedClass);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -488,6 +768,9 @@
|
||||
target.appendData = function(data) {
|
||||
// 下边的操作主要是为了查询时让一些没有根节点的节点显示
|
||||
$.each(data, function(i, item) {
|
||||
if (options.pagination) {
|
||||
item.__nodes = (item["nodes"] == 1 ? true: false) || ((item["nodes"] == 'true' || item["nodes"] == true) ? true: false);
|
||||
}
|
||||
var _data = target.data_obj["id_" + item[options.code]];
|
||||
var _p_data = target.data_obj["id_" + item[options.parentCode]];
|
||||
var _c_list = target.data_list["_n_" + item[options.parentCode]];
|
||||
@@ -509,7 +792,7 @@
|
||||
}
|
||||
_lv = _p_data.lv + 1; //如果有父
|
||||
// 绘制行
|
||||
tr = renderRow(item, false, _lv, row_id, p_id);
|
||||
tr = renderRow(item, true, _lv, row_id, p_id, options.pagination, item[options.code]);
|
||||
|
||||
var _p_icon = $("#" + _p_data.row_id).children().eq(options.expandColumn).find(".treetable-expander");
|
||||
var _isExpanded = _p_icon.hasClass(options.expanderExpandedClass);
|
||||
@@ -531,12 +814,11 @@
|
||||
} else {
|
||||
// 计算父的同级下一行
|
||||
var _tmp_ls = _p_data.row_id.split("_");
|
||||
var _p_next = _p_data.row_id.substring(0, _p_data.row_id.length - 1) + (parseInt(_tmp_ls[_tmp_ls.length - 1]) + 1);
|
||||
// 画上
|
||||
$("#" + _p_next).before(tr);
|
||||
var _p_next = _p_data.row_id.substring(0, _p_data.row_id.length - (_tmp_ls[_tmp_ls.length - 1] + "").length) + (parseInt(_tmp_ls[_tmp_ls.length - 1]) + 1);
|
||||
$("#" + _p_data.row_id).after(tr);
|
||||
}
|
||||
} else {
|
||||
tr = renderRow(item, false, _lv, row_id, p_id);
|
||||
tr = renderRow(item, false, _lv, row_id, p_id, options.pagination, item[options.code]);
|
||||
if (_data) {
|
||||
$("#" + _data.row_id).before(tr);
|
||||
$("#" + _data.row_id).remove();
|
||||
@@ -660,6 +942,12 @@
|
||||
}
|
||||
return defaultValue;
|
||||
};
|
||||
var formatRecordsPerPage = function (pageNumber) {
|
||||
return '每页显示 ' + pageNumber + ' 条记录';
|
||||
};
|
||||
var formatShowingRows = function (pageFrom, pageTo, totalRows) {
|
||||
return '显示第 ' + pageFrom + ' 到第 ' + pageTo + ' 条记录,总共 ' + totalRows + ' 条记录。';
|
||||
};
|
||||
// 初始化
|
||||
init();
|
||||
return target;
|
||||
@@ -732,12 +1020,12 @@
|
||||
$.fn.bootstrapTreeTable.defaults = {
|
||||
code: 'code', // 选取记录返回的值,用于设置父子关系
|
||||
parentCode: 'parentCode', // 用于设置父子关系
|
||||
rootIdValue: null, // 设置根节点id值----可指定根节点,默认为null,"",0,"0"
|
||||
rootIdValue: 0, // 设置根节点id值----可指定根节点,默认为null,"",0,"0"
|
||||
data: null, // 构造table的数据集合
|
||||
type: "GET", // 请求数据的ajax类型
|
||||
url: null, // 请求数据的ajax的url
|
||||
ajaxParams: {}, // 请求数据的ajax的data属性
|
||||
expandColumn: 0, // 在哪一列上面显示展开按钮
|
||||
expandColumn: 1, // 在哪一列上面显示展开按钮
|
||||
expandAll: false, // 是否全部展开
|
||||
expandFirst: true, // 是否默认第一级展开--expandAll为false时生效
|
||||
striped: false, // 是否各行渐变色
|
||||
@@ -747,11 +1035,19 @@
|
||||
columns: [], // 列
|
||||
toolbar: null, // 顶部工具条
|
||||
height: 0, // 表格高度
|
||||
pagination: false, // 是否显示分页
|
||||
dataUrl: null, // 加载子节点异步请求数据url
|
||||
pageNumber: 1, // 当前页条数
|
||||
pageSize: 10, // 每页的记录行数
|
||||
onClickRow: null, // 单击某行事件
|
||||
pageList: [10, 25, 50], // 可供选择的每页的行数
|
||||
showTitle: true, // 是否采用title属性显示字段内容(被formatter格式化的字段不会显示)
|
||||
showSearch: true, // 是否显示检索信息
|
||||
showColumns: true, // 是否显示内容列下拉框
|
||||
showRefresh: true, // 是否显示刷新按钮
|
||||
expanderExpandedClass: 'glyphicon glyphicon-chevron-down', // 展开的按钮的图标
|
||||
paginationPreText: '‹',
|
||||
paginationNextText: '›',
|
||||
expanderExpandedClass: 'glyphicon glyphicon-chevron-down', // 展开的按钮的图标
|
||||
expanderCollapsedClass: 'glyphicon glyphicon-chevron-right', // 缩起的按钮的图标
|
||||
responseHandler: function(res) {
|
||||
return false;
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -8,7 +8,7 @@ $(document).ready(function(){
|
||||
//手机号码验证身份证正则合并:(^\d{15}$)|(^\d{17}([0-9]|X)$)
|
||||
jQuery.validator.addMethod("isPhone",function(value,element){
|
||||
var length = value.length;
|
||||
var phone=/^1[3|4|5|6|7|8|9][0-9]\d{8}$/;
|
||||
var phone=/^1[3-9]\d{9}$/;
|
||||
return this.optional(element)||(length == 11 && phone.test(value));
|
||||
},"请填写正确的11位手机号");
|
||||
//电话号码验证
|
||||
@@ -31,7 +31,12 @@ $(document).ready(function(){
|
||||
jQuery.validator.addMethod("isIdentity",function(value,element){
|
||||
var id= /^(\d{15}$|^\d{18}$|^\d{17}(\d|X))$/;
|
||||
return this.optional(element) || (id.test(value));
|
||||
},"请输入正确的15或18位身份证号,末尾为大写X");
|
||||
},"请输入正确的15或18位身份证号,末尾若为X请大写");
|
||||
//校验二代身份证
|
||||
jQuery.validator.addMethod("isIdentity18",function(value,element){
|
||||
var id= /^(^\d{17}(\d|X))$/;
|
||||
return this.optional(element) || (id.test(value));
|
||||
},"请输入正确的18位身份证号,末尾若为X请大写");
|
||||
//校验出生日期
|
||||
jQuery.validator.addMethod("isBirth",function(value,element){
|
||||
var birth = /^(19|20)\d{2}-(1[0-2]|0?[1-9])-(0?[1-9]|[1-2][0-9]|3[0-1])$/;
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -726,8 +726,8 @@ body.canvas-menu.mini-navbar nav.navbar-static-side {
|
||||
}
|
||||
|
||||
.btn-success:hover, .btn-success:focus, .btn-success:active, .btn-success.active, .open .dropdown-toggle.btn-success {
|
||||
background-color: #1a7bb9;
|
||||
border-color: #1a7bb9;
|
||||
background-color: #1a7bb9 !important;
|
||||
border-color: #1a7bb9 !important;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
@@ -3344,6 +3344,21 @@ nav.page-tabs .page-tabs-content {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tagsview-hide#content-main {
|
||||
height: calc(100% - 88px);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.footer-hide#content-main {
|
||||
height: calc(100% - 91px);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tagsview-footer-hide#content-main {
|
||||
height: calc(100% - 52px);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.fixed-nav #content-main {
|
||||
height: calc(100% - 80px);
|
||||
overflow: hidden;
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -338,7 +338,7 @@ label.error {
|
||||
|
||||
.input-group label.error {
|
||||
z-index:99;
|
||||
right: 42px
|
||||
right: 42px;
|
||||
}
|
||||
|
||||
.input-group input.error + label.error + .input-group-addon>i {
|
||||
@@ -347,10 +347,14 @@ label.error {
|
||||
|
||||
.input-group.date label.error {
|
||||
z-index:99;
|
||||
right: 3px
|
||||
right: 42px;
|
||||
}
|
||||
|
||||
.Validform_error,input.error,textarea.error,select.error {
|
||||
.select2-hidden-accessible + label.error {
|
||||
right: 38px;
|
||||
}
|
||||
|
||||
.Validform_error,input.error,textarea.error,select.error,label.error+.select2-container--bootstrap .select2-selection--single {
|
||||
background-color: #fbe2e2;
|
||||
border-color: #c66161;
|
||||
color: #c00
|
||||
@@ -508,7 +512,7 @@ div.ztree-border {
|
||||
left: calc(100% - 20px);
|
||||
background-color: #33cabb
|
||||
}
|
||||
|
||||
|
||||
.toggle-switch.switch-solid span {
|
||||
height: 20px;
|
||||
}
|
||||
@@ -843,7 +847,7 @@ label {
|
||||
.table-bordered table>thead>tr>th:first-child, .table-bordered table>tbody>tr>td:first-child {
|
||||
border-left: 1px solid #ddd;
|
||||
}
|
||||
|
||||
|
||||
.table-bordered table>thead>tr>th:last-child, .table-bordered table>tbody>tr>td:last-child {
|
||||
border-right: 1px solid #ddd;
|
||||
}
|
||||
@@ -872,7 +876,7 @@ label {
|
||||
background-color: #eff3f8;
|
||||
}
|
||||
|
||||
.fixed-table-container thead th >.both{
|
||||
.fixed-table-container thead th >.both{
|
||||
display: inline-block
|
||||
}
|
||||
|
||||
@@ -908,6 +912,9 @@ table.rc-table-resizing thead > th > a {
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
z-index: 1;
|
||||
border-width: 0 0 0 1px;
|
||||
-webkit-box-shadow: 0 0 10px rgba(0,0,0,.12);
|
||||
box-shadow: 0 0 10px rgba(0,0,0,.12);
|
||||
}
|
||||
|
||||
.fixed-columns {
|
||||
@@ -948,6 +955,7 @@ table.rc-table-resizing thead > th > a {
|
||||
.bootstrap-tree-table .table{border-bottom: 0px solid #e7eaec!important;}
|
||||
.bootstrap-tree-table .table-bordered .treetable-thead th {border-left: 1px solid #e7eaec!important;}
|
||||
.bootstrap-tree-table .table-bordered .treetable-tbody td {border-right: 1px solid #e7eaec!important;}
|
||||
.bootstrap-tree-table .fixed-table-pagination .pagination-detail {margin-top: 10px;margin-bottom: 10px;}
|
||||
|
||||
/** 首页样式 **/
|
||||
.ax_close_max {
|
||||
@@ -1036,12 +1044,12 @@ table.rc-table-resizing thead > th > a {
|
||||
}
|
||||
|
||||
/** 表格列拖拽样式 **/
|
||||
.dragtable-sortable {
|
||||
.dragtable-sortable {
|
||||
list-style-type: none; margin: 0; padding: 0; -moz-user-select: none;
|
||||
}
|
||||
|
||||
.dragtable-sortable li {
|
||||
margin: 0; padding: 0; float: left; font-size: 1em; background: white;
|
||||
margin: 0; padding: 0; float: left; font-size: 1em; background: white;
|
||||
}
|
||||
|
||||
.dragtable-sortable th, .dragtable-sortable td{
|
||||
@@ -1049,26 +1057,26 @@ table.rc-table-resizing thead > th > a {
|
||||
}
|
||||
|
||||
.dragtable-sortable li:first-child th, .dragtable-sortable li:first-child td {
|
||||
border-left: 1px solid #CCC;
|
||||
border-left: 1px solid #CCC;
|
||||
}
|
||||
|
||||
.ui-sortable-helper {
|
||||
opacity: 0.7;filter: alpha(opacity=70);
|
||||
}
|
||||
|
||||
.ui-sortable-placeholder {
|
||||
.ui-sortable-placeholder {
|
||||
-moz-box-shadow: 4px 5px 4px #C6C6C6 inset;
|
||||
-webkit-box-shadow: 4px 5px 4px #C6C6C6 inset;
|
||||
box-shadow: 4px 5px 4px #C6C6C6 inset;
|
||||
border-bottom: 1px solid #CCCCCC;
|
||||
border-top: 1px solid #CCCCCC;
|
||||
visibility: visible !important;
|
||||
background: #EFEFEF !important;
|
||||
background: #EFEFEF !important;
|
||||
visibility: visible !important;
|
||||
}
|
||||
|
||||
.ui-sortable-placeholder * {
|
||||
opacity: 0.0; visibility: hidden;
|
||||
.ui-sortable-placeholder * {
|
||||
opacity: 0.0; visibility: hidden;
|
||||
}
|
||||
|
||||
/** 表格选中样式 **/
|
||||
|
||||
@@ -262,7 +262,7 @@ $(function() {
|
||||
// 获取标识数据
|
||||
var dataUrl = $(this).attr('href'),
|
||||
dataIndex = $(this).data('index'),
|
||||
menuName = $.trim($(this).text()),
|
||||
menuName = $(this).data('title') || $.trim($(this).text()),
|
||||
isRefresh = $(this).data("refresh"),
|
||||
flag = true;
|
||||
|
||||
@@ -306,10 +306,10 @@ $(function() {
|
||||
$('.menuTab').removeClass('active');
|
||||
|
||||
// 添加选项卡对应的iframe
|
||||
var str1 = '<iframe class="RuoYi_iframe" name="iframe' + dataIndex + '" width="100%" height="100%" src="' + dataUrl + '" frameborder="0" data-id="' + dataUrl + '" seamless></iframe>';
|
||||
var str1 = '<iframe class="RuoYi_iframe" name="iframe' + dataIndex + '" width="100%" height="100%" src="' + dataUrl + '" frameborder="0" data-id="' + dataUrl + '" data-refresh="' + isRefresh + '" seamless></iframe>';
|
||||
$('.mainContent').find('iframe.RuoYi_iframe').hide().parents('.mainContent').append(str1);
|
||||
|
||||
$.modal.loading("数据加载中,请稍后...");
|
||||
$.modal.loading("数据加载中,请稍候...");
|
||||
|
||||
$('.mainContent iframe:visible').on('load', function() {
|
||||
$.modal.closeLoading();
|
||||
@@ -434,15 +434,20 @@ $(function() {
|
||||
function activeTab() {
|
||||
if (!$(this).hasClass('active')) {
|
||||
var currentId = $(this).data('id');
|
||||
var isRefresh = false;
|
||||
syncMenuTab(currentId);
|
||||
// 显示tab对应的内容区
|
||||
$('.mainContent .RuoYi_iframe').each(function() {
|
||||
if ($(this).data('id') == currentId) {
|
||||
$(this).show().siblings('.RuoYi_iframe').hide();
|
||||
isRefresh = $(this).data('refresh');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$(this).addClass('active').siblings('.menuTab').removeClass('active');
|
||||
if (isRefresh) {
|
||||
refreshTab();
|
||||
}
|
||||
scrollToTab(this);
|
||||
}
|
||||
}
|
||||
@@ -601,7 +606,7 @@ $(function() {
|
||||
callback: function(key, opt) {
|
||||
setActiveTab(this);
|
||||
this.nextAll('.menuTab').each(function() {
|
||||
$('.menuTab[data-id="' + $(this).data('id') + '"]').remove();
|
||||
$('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove();
|
||||
$(this).remove();
|
||||
});
|
||||
}
|
||||
@@ -630,7 +635,7 @@ $(function() {
|
||||
setActiveTab(this);
|
||||
var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]');
|
||||
var url = target.attr('src');
|
||||
$.modal.loading("数据加载中,请稍后...");
|
||||
$.modal.loading("数据加载中,请稍候...");
|
||||
target.attr('src', url).on('load', function() {
|
||||
$.modal.closeLoading();
|
||||
});
|
||||
@@ -645,5 +650,5 @@ $(function() {
|
||||
}
|
||||
},
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
@@ -289,7 +289,7 @@ function createMenuItem(dataUrl, menuName, isRefresh) {
|
||||
var str1 = '<iframe class="RuoYi_iframe" name="iframe' + dataIndex + '" width="100%" height="100%" src="' + dataUrl + '" frameborder="0" data-id="' + dataUrl + '" data-panel="' + panelUrl + '" seamless></iframe>';
|
||||
$('.mainContent', topWindow).find('iframe.RuoYi_iframe').hide().parents('.mainContent').append(str1);
|
||||
|
||||
window.parent.$.modal.loading("数据加载中,请稍后...");
|
||||
window.parent.$.modal.loading("数据加载中,请稍候...");
|
||||
$('.mainContent iframe:visible', topWindow).on('load', function() {
|
||||
window.parent.$.modal.closeLoading();
|
||||
});
|
||||
@@ -351,8 +351,10 @@ function calSumWidth(elements) {
|
||||
function activeWindow() {
|
||||
var topWindow = $(window.parent.document);
|
||||
var currentId = $('.page-tabs-content', topWindow).find('.active').attr('data-id');
|
||||
var activeWindow = $('.RuoYi_iframe[data-id="' + currentId + '"]', topWindow)[0].contentWindow;
|
||||
return activeWindow;
|
||||
if (!currentId) {
|
||||
return window.parent;
|
||||
}
|
||||
return $('.RuoYi_iframe[data-id="' + currentId + '"]', topWindow)[0].contentWindow;
|
||||
}
|
||||
|
||||
/** 密码规则范围验证 */
|
||||
@@ -415,7 +417,7 @@ var storage = {
|
||||
|
||||
// 主子表操作封装处理
|
||||
var sub = {
|
||||
editColumn: function() {
|
||||
editRow: function() {
|
||||
var dataColumns = [];
|
||||
for (var columnIndex = 0; columnIndex < table.options.columns.length; columnIndex++) {
|
||||
if (table.options.columns[columnIndex].visible != false) {
|
||||
@@ -440,7 +442,11 @@ var sub = {
|
||||
} else if ($.common.isNotEmpty(textareaValue.val())) {
|
||||
obj[key] = textareaValue.val();
|
||||
} else {
|
||||
obj[key] = "";
|
||||
if (key == "index" && $.common.isNotEmpty(data[dataIndex].index)) {
|
||||
obj[key] = data[dataIndex].index;
|
||||
} else {
|
||||
obj[key] = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
var item = data[dataIndex];
|
||||
@@ -449,8 +455,8 @@ var sub = {
|
||||
}
|
||||
$("#" + table.options.id).bootstrapTable("updateRow", params);
|
||||
},
|
||||
delColumn: function(column) {
|
||||
sub.editColumn();
|
||||
delRow: function(column) {
|
||||
sub.editRow();
|
||||
var subColumn = $.common.isEmpty(column) ? "index" : column;
|
||||
var ids = $.table.selectColumns(subColumn);
|
||||
if (ids.length == 0) {
|
||||
@@ -459,15 +465,17 @@ var sub = {
|
||||
}
|
||||
$("#" + table.options.id).bootstrapTable('remove', { field: subColumn, values: ids });
|
||||
},
|
||||
addColumn: function(row, tableId) {
|
||||
delRowByIndex: function(value) {
|
||||
sub.editRow();
|
||||
$("#" + table.options.id).bootstrapTable('remove', { field: "index", values: [value] });
|
||||
sub.editRow();
|
||||
},
|
||||
addRow: function(row, tableId) {
|
||||
var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId;
|
||||
table.set(currentId);
|
||||
var count = $("#" + currentId).bootstrapTable('getData').length;
|
||||
sub.editColumn();
|
||||
$("#" + currentId).bootstrapTable('insertRow', {
|
||||
index: count + 1,
|
||||
row: row
|
||||
});
|
||||
sub.editRow();
|
||||
$("#" + currentId).bootstrapTable('insertRow', { index: count + 1, row: row });
|
||||
}
|
||||
};
|
||||
|
||||
@@ -490,6 +498,44 @@ function loadJs(file, headElem) {
|
||||
else document.getElementsByTagName('head')[0].appendChild(script);
|
||||
}
|
||||
|
||||
// 禁止后退键(Backspace)
|
||||
window.onload = function() {
|
||||
document.getElementsByTagName("body")[0].onkeydown = function() {
|
||||
// 获取事件对象
|
||||
var elem = event.relatedTarget || event.srcElement || event.target || event.currentTarget;
|
||||
// 判断按键为backSpace键
|
||||
if (event.keyCode == 8) {
|
||||
// 判断是否需要阻止按下键盘的事件默认传递
|
||||
var name = elem.nodeName;
|
||||
var className = elem.className;
|
||||
// 屏蔽特定的样式名称
|
||||
if (className.indexOf('note-editable') != -1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (name != 'INPUT' && name != 'TEXTAREA') {
|
||||
return _stopIt(event);
|
||||
}
|
||||
var type_e = elem.type.toUpperCase();
|
||||
if (name == 'INPUT' && (type_e != 'TEXT' && type_e != 'TEXTAREA' && type_e != 'PASSWORD' && type_e != 'FILE' && type_e != 'SEARCH' && type_e != 'NUMBER' && type_e != 'EMAIL' && type_e != 'URL')) {
|
||||
return _stopIt(event);
|
||||
}
|
||||
if (name == 'INPUT' && (elem.readOnly == true || elem.disabled == true)) {
|
||||
return _stopIt(event);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
function _stopIt(e) {
|
||||
if (e.returnValue) {
|
||||
e.returnValue = false;
|
||||
}
|
||||
if (e.preventDefault) {
|
||||
e.preventDefault();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** 设置全局ajax处理 */
|
||||
$.ajaxSetup({
|
||||
complete: function(XMLHttpRequest, textStatus) {
|
||||
|
||||
@@ -10,8 +10,8 @@ var table = {
|
||||
options: {},
|
||||
// 设置实例配置
|
||||
set: function(id) {
|
||||
if($.common.getLength(table.config) > 1) {
|
||||
var tableId = $.common.isEmpty(id) ? $(event.currentTarget).parents(".bootstrap-table").find("table.table").attr("id") : id;
|
||||
if ($.common.getLength(table.config) > 1 && $.common.isNotEmpty(event)) {
|
||||
var tableId = $.common.isEmpty(id) ? $(event.currentTarget).parents(".bootstrap-table").find("table.table").attr("id") || $(event.currentTarget).parents(".bootstrap-tree-table").find("table.table").attr("id") : id;
|
||||
if ($.common.isNotEmpty(tableId)) {
|
||||
table.options = table.get(tableId);
|
||||
}
|
||||
@@ -73,7 +73,7 @@ var table = {
|
||||
fixedNumber: 0,
|
||||
fixedRightNumber: 0,
|
||||
queryParams: $.table.queryParams,
|
||||
rowStyle: undefined,
|
||||
rowStyle: undefined
|
||||
};
|
||||
var options = $.extend(defaults, options);
|
||||
table.options = options;
|
||||
@@ -163,6 +163,7 @@ var table = {
|
||||
},
|
||||
// 查询条件
|
||||
queryParams: function(params) {
|
||||
table.set();
|
||||
var curParams = {
|
||||
// 传递参数查询参数
|
||||
pageSize: params.limit,
|
||||
@@ -179,14 +180,15 @@ var table = {
|
||||
if (typeof table.get(this.id).responseHandler == "function") {
|
||||
table.get(this.id).responseHandler(res);
|
||||
}
|
||||
var thisOptions = table.config[this.id];
|
||||
if (res.code == web_status.SUCCESS) {
|
||||
if ($.common.isNotEmpty(table.options.sidePagination) && table.options.sidePagination == 'client') {
|
||||
if ($.common.isNotEmpty(thisOptions.sidePagination) && thisOptions.sidePagination == 'client') {
|
||||
return res.rows;
|
||||
} else {
|
||||
if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) {
|
||||
var column = $.common.isEmpty(table.options.uniqueId) ? table.options.columns[1].field : table.options.uniqueId;
|
||||
if ($.common.isNotEmpty(thisOptions.rememberSelected) && thisOptions.rememberSelected) {
|
||||
var column = $.common.isEmpty(thisOptions.uniqueId) ? thisOptions.columns[1].field : thisOptions.uniqueId;
|
||||
$.each(res.rows, function(i, row) {
|
||||
row.state = $.inArray(row[column], table.rememberSelectedIds[table.options.id]) !== -1;
|
||||
row.state = $.inArray(row[column], table.rememberSelectedIds[thisOptions.id]) !== -1;
|
||||
})
|
||||
}
|
||||
return { rows: res.rows, total: res.total };
|
||||
@@ -219,13 +221,13 @@ var table = {
|
||||
if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) {
|
||||
func = $.inArray(e.type, ['check', 'check-all']) > -1 ? 'union' : 'difference';
|
||||
var selectedIds = table.rememberSelectedIds[table.options.id];
|
||||
if($.common.isNotEmpty(selectedIds)) {
|
||||
if ($.common.isNotEmpty(selectedIds)) {
|
||||
table.rememberSelectedIds[table.options.id] = _[func](selectedIds, rowIds);
|
||||
} else {
|
||||
table.rememberSelectedIds[table.options.id] = _[func]([], rowIds);
|
||||
}
|
||||
var selectedRows = table.rememberSelecteds[table.options.id];
|
||||
if($.common.isNotEmpty(selectedRows)) {
|
||||
if ($.common.isNotEmpty(selectedRows)) {
|
||||
table.rememberSelecteds[table.options.id] = _[func](selectedRows, rows);
|
||||
} else {
|
||||
table.rememberSelecteds[table.options.id] = _[func]([], rows);
|
||||
@@ -247,7 +249,7 @@ var table = {
|
||||
$(optionsIds).off("click").on("click", '.img-circle', function() {
|
||||
var src = $(this).attr('src');
|
||||
var target = $(this).data('target');
|
||||
if($.common.equals("self", target)) {
|
||||
if ($.common.equals("self", target)) {
|
||||
var height = $(this).data('height');
|
||||
var width = $(this).data('width');
|
||||
top.layer.open({
|
||||
@@ -298,6 +300,9 @@ var table = {
|
||||
var tableParams = $("#" + currentId).bootstrapTable('getOptions');
|
||||
var pageSize = $.common.isNotEmpty(tableParams.pageSize) ? tableParams.pageSize: table.options.pageSize;
|
||||
var pageNumber = $.common.isNotEmpty(tableParams.pageNumber) ? tableParams.pageNumber: table.options.pageNumber;
|
||||
if (table.options.sidePagination == 'client') {
|
||||
return index + 1;
|
||||
}
|
||||
return pageSize * (pageNumber - 1) + index + 1;
|
||||
},
|
||||
// 列超出指定长度浮动提示 target(copy单击复制文本 open弹窗打开文本)
|
||||
@@ -358,7 +363,7 @@ var table = {
|
||||
if ($.common.isNotEmpty(pageSize)) {
|
||||
params.pageSize = pageSize;
|
||||
}
|
||||
if($.common.isNotEmpty(tableId)){
|
||||
if ($.common.isNotEmpty(tableId)){
|
||||
$("#" + tableId).bootstrapTable('refresh', params);
|
||||
} else{
|
||||
$("#" + table.options.id).bootstrapTable('refresh', params);
|
||||
@@ -373,7 +378,7 @@ var table = {
|
||||
var dataParam = $("#" + currentId).serializeArray();
|
||||
dataParam.push({ "name": "orderByColumn", "value": params.sortName });
|
||||
dataParam.push({ "name": "isAsc", "value": params.sortOrder });
|
||||
$.modal.loading("正在导出数据,请稍后...");
|
||||
$.modal.loading("正在导出数据,请稍候...");
|
||||
$.post(table.options.exportUrl, dataParam, function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
|
||||
@@ -447,6 +452,9 @@ var table = {
|
||||
$.modal.enable();
|
||||
$.modal.alertError(result.msg);
|
||||
}
|
||||
},
|
||||
complete: function () {
|
||||
layero.find('#file').val('');
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -485,7 +493,7 @@ var table = {
|
||||
});
|
||||
if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) {
|
||||
var selectedRows = table.rememberSelecteds[table.options.id];
|
||||
if($.common.isNotEmpty(selectedRows)) {
|
||||
if ($.common.isNotEmpty(selectedRows)) {
|
||||
rows = $.map(table.rememberSelecteds[table.options.id], function (row) {
|
||||
return $.common.getItemField(row, column);
|
||||
});
|
||||
@@ -514,7 +522,7 @@ var table = {
|
||||
});
|
||||
if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) {
|
||||
var selectedRows = table.rememberSelecteds[table.options.id];
|
||||
if($.common.isNotEmpty(selectedRows)) {
|
||||
if ($.common.isNotEmpty(selectedRows)) {
|
||||
rows = $.map(selectedRows, function (row) {
|
||||
return $.common.getItemField(row, table.options.columns[1].field);
|
||||
});
|
||||
@@ -535,6 +543,9 @@ var table = {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
if (actions.length === 0) {
|
||||
actions.push($.common.sprintf("<span>%s</span>", value))
|
||||
}
|
||||
return actions.join('');
|
||||
},
|
||||
// 回显数据字典(字符串数组)
|
||||
@@ -545,13 +556,18 @@ var table = {
|
||||
var currentSeparator = $.common.isEmpty(separator) ? "," : separator;
|
||||
var actions = [];
|
||||
$.each(value.split(currentSeparator), function(i, val) {
|
||||
var match = false
|
||||
$.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));
|
||||
actions.push($.common.sprintf("<span class='%s'>%s</span>", listClass, dict.dictLabel));
|
||||
match = true
|
||||
return false;
|
||||
}
|
||||
});
|
||||
if (!match) {
|
||||
actions.push($.common.sprintf("<span> %s </span>", val));
|
||||
}
|
||||
});
|
||||
return actions.join('');
|
||||
},
|
||||
@@ -584,10 +600,13 @@ var table = {
|
||||
id: "bootstrap-tree-table",
|
||||
type: 1, // 0 代表bootstrapTable 1代表bootstrapTreeTable
|
||||
height: 0,
|
||||
rootIdValue: null,
|
||||
rootIdValue: 0,
|
||||
ajaxParams: {},
|
||||
toolbar: "toolbar",
|
||||
striped: false,
|
||||
pagination: false,
|
||||
pageSize: 10,
|
||||
pageList: [10, 25, 50],
|
||||
expandColumn: 1,
|
||||
showSearch: true,
|
||||
showRefresh: true,
|
||||
@@ -608,6 +627,10 @@ var table = {
|
||||
ajaxParams: options.ajaxParams, // 请求数据的ajax的data属性
|
||||
rootIdValue: options.rootIdValue, // 设置指定根节点id值
|
||||
height: options.height, // 表格树的高度
|
||||
pagination: options.pagination, // 是否显示分页
|
||||
dataUrl: options.dataUrl, // 加载子节点异步请求数据url
|
||||
pageSize: options.pageSize, // 每页的记录行数
|
||||
pageList: options.pageList, // 可供选择的每页的行数
|
||||
expandColumn: options.expandColumn, // 在哪一列上面显示展开按钮
|
||||
striped: options.striped, // 是否显示行间隔色
|
||||
bordered: options.bordered, // 是否显示边框
|
||||
@@ -618,6 +641,7 @@ var table = {
|
||||
expandAll: options.expandAll, // 是否全部展开
|
||||
expandFirst: options.expandFirst, // 是否默认第一级展开--expandAll为false时生效
|
||||
columns: options.columns, // 显示列信息(*)
|
||||
onClickRow: options.onClickRow, // 单击某行事件
|
||||
responseHandler: $.treeTable.responseHandler, // 在加载服务器发送来的数据之前处理函数
|
||||
onLoadSuccess: $.treeTable.onLoadSuccess // 当所有数据被加载时触发处理函数
|
||||
});
|
||||
@@ -626,7 +650,7 @@ var table = {
|
||||
search: function(formId) {
|
||||
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
|
||||
var params = $.common.formToJSON(currentId);
|
||||
$.bttTable.bootstrapTreeTable('refresh', params);
|
||||
$.bttTable.bootstrapTreeTable('refresh', $.extend(params, table.options.ajaxParams));
|
||||
},
|
||||
// 刷新
|
||||
refresh: function() {
|
||||
@@ -678,7 +702,7 @@ var table = {
|
||||
}
|
||||
$("#" + tableId).bootstrapTable('refresh', params);
|
||||
} else if (table.options.type == table_type.bootstrapTreeTable) {
|
||||
$("#" + tableId).bootstrapTreeTable('refresh', []);
|
||||
$("#" + tableId).bootstrapTreeTable('refresh', table.options.ajaxParams);
|
||||
}
|
||||
if ($.common.isNotEmpty(startLayDate) && $.common.isNotEmpty(endLayDate)) {
|
||||
endLayDate.config.min.year = '';
|
||||
@@ -788,7 +812,7 @@ var table = {
|
||||
},
|
||||
// 获取iframe页的DOM
|
||||
getChildFrame: function (index) {
|
||||
if($.common.isEmpty(index)){
|
||||
if ($.common.isEmpty(index)){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
return parent.layer.getChildFrame('body', index);
|
||||
} else {
|
||||
@@ -797,7 +821,7 @@ var table = {
|
||||
},
|
||||
// 关闭窗体
|
||||
close: function (index) {
|
||||
if($.common.isEmpty(index)){
|
||||
if ($.common.isEmpty(index)){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);
|
||||
} else {
|
||||
@@ -859,6 +883,9 @@ var table = {
|
||||
yes: callback,
|
||||
cancel: function(index) {
|
||||
return true;
|
||||
},
|
||||
success: function () {
|
||||
$(':focus').blur();
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -880,7 +907,7 @@ var table = {
|
||||
}
|
||||
}
|
||||
var btnCallback = {};
|
||||
if(options.btn instanceof Array){
|
||||
if (options.btn instanceof Array){
|
||||
for (var i = 1, len = options.btn.length; i < len; i++) {
|
||||
var btn = options["btn" + (i + 1)];
|
||||
if (btn) {
|
||||
@@ -889,6 +916,8 @@ var table = {
|
||||
}
|
||||
}
|
||||
var index = top.layer.open($.extend({
|
||||
id: options.id, // 唯一id
|
||||
anim: options.anim, // 弹出动画 0-6
|
||||
type: 2,
|
||||
maxmin: $.common.isEmpty(options.maxmin) ? true : options.maxmin,
|
||||
shade: 0.3,
|
||||
@@ -903,10 +932,13 @@ var table = {
|
||||
yes: options.yes,
|
||||
cancel: function () {
|
||||
return true;
|
||||
},
|
||||
success: function () {
|
||||
$(':focus').blur();
|
||||
}
|
||||
}, btnCallback));
|
||||
if ($.common.isNotEmpty(options.full) && options.full === true) {
|
||||
layer.full(index);
|
||||
top.layer.full(index);
|
||||
}
|
||||
},
|
||||
// 弹出层全屏
|
||||
@@ -946,6 +978,9 @@ var table = {
|
||||
},
|
||||
cancel: function(index) {
|
||||
return true;
|
||||
},
|
||||
success: function () {
|
||||
$(':focus').blur();
|
||||
}
|
||||
});
|
||||
top.layer.full(index);
|
||||
@@ -999,7 +1034,7 @@ var table = {
|
||||
dataType: dataType,
|
||||
data: data,
|
||||
beforeSend: function () {
|
||||
$.modal.loading("正在处理中,请稍后...");
|
||||
$.modal.loading("正在处理中,请稍候...");
|
||||
},
|
||||
success: function(result) {
|
||||
if (typeof callback == "function") {
|
||||
@@ -1060,7 +1095,7 @@ var table = {
|
||||
table.set();
|
||||
$.modal.confirm("确定删除该条" + table.options.modalName + "信息吗?", function() {
|
||||
var url = $.common.isEmpty(id) ? table.options.removeUrl : table.options.removeUrl.replace("{id}", id);
|
||||
if(table.options.type == table_type.bootstrapTreeTable) {
|
||||
if (table.options.type == table_type.bootstrapTreeTable) {
|
||||
$.operate.get(url);
|
||||
} else {
|
||||
var data = { "ids": id };
|
||||
@@ -1113,7 +1148,7 @@ var table = {
|
||||
// 修改信息
|
||||
edit: function(id) {
|
||||
table.set();
|
||||
if($.common.isEmpty(id) && table.options.type == table_type.bootstrapTreeTable) {
|
||||
if ($.common.isEmpty(id) && table.options.type == table_type.bootstrapTreeTable) {
|
||||
var row = $("#" + table.options.id).bootstrapTreeTable('getSelections')[0];
|
||||
if ($.common.isEmpty(row)) {
|
||||
$.modal.alertWarning("请至少选择一条记录");
|
||||
@@ -1137,7 +1172,7 @@ var table = {
|
||||
if ($.common.isNotEmpty(id)) {
|
||||
url = table.options.updateUrl.replace("{id}", id);
|
||||
} else {
|
||||
if(table.options.type == table_type.bootstrapTreeTable) {
|
||||
if (table.options.type == table_type.bootstrapTreeTable) {
|
||||
var row = $("#" + table.options.id).bootstrapTreeTable('getSelections')[0];
|
||||
if ($.common.isEmpty(row)) {
|
||||
$.modal.alertWarning("请至少选择一条记录");
|
||||
@@ -1174,7 +1209,7 @@ var table = {
|
||||
dataType: "json",
|
||||
data: data,
|
||||
beforeSend: function () {
|
||||
$.modal.loading("正在处理中,请稍后...");
|
||||
$.modal.loading("正在处理中,请稍候...");
|
||||
$.modal.disable();
|
||||
},
|
||||
success: function(result) {
|
||||
@@ -1194,7 +1229,7 @@ var table = {
|
||||
dataType: "json",
|
||||
data: data,
|
||||
beforeSend: function () {
|
||||
$.modal.loading("正在处理中,请稍后...");
|
||||
$.modal.loading("正在处理中,请稍候...");
|
||||
},
|
||||
success: function(result) {
|
||||
if (typeof callback == "function") {
|
||||
@@ -1220,7 +1255,7 @@ var table = {
|
||||
dataType: "json",
|
||||
data: data,
|
||||
beforeSend: function () {
|
||||
$.modal.loading("正在处理中,请稍后...");
|
||||
$.modal.loading("正在处理中,请稍候...");
|
||||
},
|
||||
success: function(result) {
|
||||
if (typeof callback == "function") {
|
||||
@@ -1263,7 +1298,7 @@ var table = {
|
||||
successCallback: function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
var parent = activeWindow();
|
||||
if($.common.isEmpty(parent.table)) {
|
||||
if ($.common.isEmpty(parent.table)) {
|
||||
$.modal.msgSuccessReload(result.msg);
|
||||
} else if (parent.table.options.type == table_type.bootstrapTable) {
|
||||
$.modal.close();
|
||||
@@ -1287,15 +1322,20 @@ var table = {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
var topWindow = $(window.parent.document);
|
||||
var currentId = $('.page-tabs-content', topWindow).find('.active').attr('data-panel');
|
||||
var $contentWindow = $('.RuoYi_iframe[data-id="' + currentId + '"]', topWindow)[0].contentWindow;
|
||||
$.modal.close();
|
||||
$contentWindow.$.modal.msgSuccess(result.msg);
|
||||
$contentWindow.$(".layui-layer-padding").removeAttr("style");
|
||||
if ($contentWindow.table.options.type == table_type.bootstrapTable) {
|
||||
$contentWindow.$.table.refresh();
|
||||
} else if ($contentWindow.table.options.type == table_type.bootstrapTreeTable) {
|
||||
$contentWindow.$.treeTable.refresh();
|
||||
var topWindow = $('.RuoYi_iframe[data-id="' + currentId + '"]', topWindow)[0];
|
||||
if ($.common.isNotEmpty(topWindow) && $.common.isNotEmpty(currentId)) {
|
||||
var $contentWindow = topWindow.contentWindow;
|
||||
$contentWindow.$.modal.msgSuccess(result.msg);
|
||||
$contentWindow.$(".layui-layer-padding").removeAttr("style");
|
||||
if ($contentWindow.table.options.type == table_type.bootstrapTable) {
|
||||
$contentWindow.$.table.refresh();
|
||||
} else if ($contentWindow.table.options.type == table_type.bootstrapTreeTable) {
|
||||
$contentWindow.$.treeTable.refresh();
|
||||
}
|
||||
} else {
|
||||
$.modal.msgSuccess(result.msg);
|
||||
}
|
||||
$.modal.close();
|
||||
$.modal.closeTab();
|
||||
} else if (result.code == web_status.WARNING) {
|
||||
$.modal.alertWarning(result.msg)
|
||||
@@ -1307,7 +1347,7 @@ var table = {
|
||||
},
|
||||
// 校验封装处理
|
||||
validate: {
|
||||
// 判断返回标识是否唯一 false 不存在 true 存在
|
||||
// 判断返回标识是否唯一 false 为存在 true 为不存在
|
||||
unique: function (value) {
|
||||
if (value == "0") {
|
||||
return true;
|
||||
@@ -1378,7 +1418,7 @@ var table = {
|
||||
var node = tree.getNodesByParam("id", treeId, null)[0];
|
||||
$.tree.selectByIdName(treeId, node);
|
||||
// 回调tree方法
|
||||
if(typeof(options.callBack) === "function"){
|
||||
if (typeof(options.callBack) === "function"){
|
||||
options.callBack(tree);
|
||||
}
|
||||
});
|
||||
@@ -1423,7 +1463,6 @@ var table = {
|
||||
},
|
||||
// 隐藏所有节点
|
||||
hideAllNode: function(nodes) {
|
||||
var tree = $.fn.zTree.getZTreeObj("tree");
|
||||
var nodes = $._tree.transformToArray(nodes);
|
||||
for (var i = nodes.length - 1; i >= 0; i--) {
|
||||
$._tree.hideNode(nodes[i]);
|
||||
@@ -1468,7 +1507,7 @@ var table = {
|
||||
// 不允许根父节点选择
|
||||
notAllowParents: function(_tree) {
|
||||
var nodes = _tree.getSelectedNodes();
|
||||
if(nodes.length == 0){
|
||||
if (nodes.length == 0){
|
||||
$.modal.msgError("请选择节点后提交");
|
||||
return false;
|
||||
}
|
||||
@@ -1515,7 +1554,7 @@ var table = {
|
||||
common: {
|
||||
// 判断字符串是否为空
|
||||
isEmpty: function (value) {
|
||||
if (value == null || this.trim(value) == "") {
|
||||
if (value == null || this.trim(value) == "" || value == undefined || value == "undefined") {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -1582,7 +1621,7 @@ var table = {
|
||||
if (!format) format = "yyyy-MM-dd";
|
||||
switch (typeof date) {
|
||||
case "string":
|
||||
date = new Date(date.replace(/-/, "/"));
|
||||
date = new Date(date.replace(/-/g, "/"));
|
||||
break;
|
||||
case "number":
|
||||
date = new Date(date);
|
||||
@@ -1656,7 +1695,7 @@ var table = {
|
||||
formToJSON: function(formId) {
|
||||
var json = {};
|
||||
$.each($("#" + formId).serializeArray(), function(i, field) {
|
||||
if(json[field.name]) {
|
||||
if (json[field.name]) {
|
||||
json[field.name] += ("," + field.value);
|
||||
} else {
|
||||
json[field.name] = field.value;
|
||||
|
||||
@@ -33,11 +33,11 @@ function login() {
|
||||
if (r.code == web_status.SUCCESS) {
|
||||
location.href = ctx + 'index';
|
||||
} else {
|
||||
$.modal.closeLoading();
|
||||
$('.imgcode').click();
|
||||
$(".code").val("");
|
||||
$.modal.msg(r.msg);
|
||||
}
|
||||
$.modal.closeLoading();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -76,11 +76,11 @@ function validateKickout() {
|
||||
if (top != self) {
|
||||
top.location = self.location;
|
||||
} else {
|
||||
var url = location.search;
|
||||
var url = location.search;
|
||||
if (url) {
|
||||
var oldUrl = window.location.href;
|
||||
var newUrl = oldUrl.substring(0, oldUrl.indexOf('?'));
|
||||
self.location = newUrl;
|
||||
var oldUrl = window.location.href;
|
||||
var newUrl = oldUrl.substring(0, oldUrl.indexOf('?'));
|
||||
self.location = newUrl;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
<!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>进度条 (Progress Bars)</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-wrench"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
<li><a href="#">选项1</a>
|
||||
</li>
|
||||
<li><a href="#">选项2</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<!-- style: progress-bar-success/progress-bar-info/progress-bar-warning/progress-bar-danger -->
|
||||
<h5>基本</h5>
|
||||
<div class="progress">
|
||||
<div style="width: 35%" aria-valuemax="100" aria-valuemin="0" aria-valuenow="35" role="progressbar" class="progress-bar progress-bar-success">
|
||||
<span class="sr-only">35% Complete (success)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="progress progress-bar-default">
|
||||
<div style="width: 43%" aria-valuemax="100" aria-valuemin="0" aria-valuenow="43" role="progressbar" class="progress-bar">
|
||||
<span class="sr-only">43% Complete (success)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h5>条纹效果</h5>
|
||||
<div class="progress progress-striped">
|
||||
<div style="width: 50%" aria-valuemax="100" aria-valuemin="0" aria-valuenow="50" role="progressbar" class="progress-bar progress-bar-warning">
|
||||
<span class="sr-only">50% Complete (success)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h5>动画效果</h5>
|
||||
<div class="progress progress-striped active">
|
||||
<div style="width: 75%" aria-valuemax="100" aria-valuemin="0" aria-valuenow="75" role="progressbar" class="progress-bar progress-bar-danger">
|
||||
<span class="sr-only">75% Complete (success)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h5>堆叠效果</h5>
|
||||
<div class="progress progress-striped active">
|
||||
<div style="width: 30%" class="progress-bar progress-bar-success">
|
||||
<span class="sr-only">30% Complete (success)</span>
|
||||
</div>
|
||||
<div style="width: 20%" class="progress-bar progress-bar-warning">
|
||||
<span class="sr-only">20% Complete (warning)</span>
|
||||
</div>
|
||||
<div style="width: 40%" class="progress-bar progress-bar-danger">
|
||||
<span class="sr-only">40% Complete (danger)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h5>带有提示标签的进度条</h5>
|
||||
<div class="progress">
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="95" aria-valuemin="0" aria-valuemax="100" style="width: 95%;">
|
||||
95%
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script type="text/javascript">
|
||||
$("[data-toggle='tooltip']").tooltip();
|
||||
$("[data-toggle=popover]").popover();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -17,7 +17,7 @@
|
||||
<h2>若依后台管理系统</h2>
|
||||
<p>ruoyi是一个完全响应式,基于Bootstrap3.3.7最新版本开发的扁平化主题,她采用了主流的左右两栏式布局,使用了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.7.0
|
||||
<b>当前版本:</b>v4.7.6
|
||||
</p>
|
||||
<p>
|
||||
<span class="label label-warning">免费开源</span>
|
||||
@@ -56,7 +56,7 @@
|
||||
<h3>你好,若依 </h3>
|
||||
<p>H+是一个完全响应式,基于Bootstrap3.3.7最新版本开发的扁平化主题,她采用了主流的左右两栏式布局,使用了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.7.0
|
||||
<b>当前版本:</b>v4.7.6
|
||||
</p>
|
||||
<p>
|
||||
<span class="label label-warning">开源免费</span>
|
||||
|
||||
@@ -50,6 +50,8 @@
|
||||
var rsp = data.response;
|
||||
log.info("return url:" + rsp.url)
|
||||
log.info("reutrn fileName:" + rsp.fileName)
|
||||
log.info("reutrn newFileName:" + rsp.newFileName)
|
||||
log.info("return originalFilename:" + rsp.originalFilename)
|
||||
}).on('fileremoved', function (event, id, index) {
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
})
|
||||
@@ -62,6 +64,8 @@
|
||||
var rsp = data.response;
|
||||
log.info("return urls:" + rsp.urls)
|
||||
log.info("reutrn fileNames:" + rsp.fileNames)
|
||||
log.info("reutrn newFileNames:" + rsp.newFileNames)
|
||||
log.info("return originalFilenames:" + rsp.originalFilenames)
|
||||
}).on('fileremoved', function (event, id, index) {
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
})
|
||||
|
||||
@@ -161,8 +161,8 @@
|
||||
</div>
|
||||
<div id="step-3" class="tab-pane" role="tabpanel" aria-labelledby="step-3">
|
||||
<div class="m-t-md">
|
||||
<p>1、如果需要工具栏在页面底部显示, 将style中下面的部分取消注释<blockquote>.sw>.toolbar-bottom </blockquote></p>
|
||||
<p>2、如果设置了自动调节高度为false, 将style中下面的部分取消注释<blockquote>.sw>.tab-content </blockquote></p>
|
||||
<p>1、如果不需要工具栏固定在页面底部, 将style中下面的部分取消注释<blockquote>.sw>.toolbar-bottom </blockquote></p>
|
||||
<p>2、如果设置了自动调节高度(autoAdjustHeight)为true, 将style中下面的部分取消注释<blockquote>.sw>.tab-content </blockquote></p>
|
||||
<p>3、工具栏的按钮样式会被表单插件中.btn样式覆盖导致bootstrap中的按钮样式无效, 如果需要改变按钮样式可以自己定义并提高优先级</blockquote></p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -181,7 +181,7 @@ $('#smartwizard').smartWizard({
|
||||
enableURLhash: true, // Enable selection of the step based on url hash
|
||||
transition: {
|
||||
animation: 'none', // Effect on navigation, none/fade/slide-horizontal/slide-vertical/slide-swing
|
||||
speed: '400', // Transion animation speed
|
||||
speed: '400', // Transition animation speed
|
||||
easing:'' // Transition animation easing. Not supported without a jQuery easing plugin
|
||||
},
|
||||
toolbarSettings: {
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
})
|
||||
|
||||
$("#button-msgReload").click(function(){
|
||||
$.modal.msgReload("保存成功,正在刷新数据请稍后……", modal_status.SUCCESS);
|
||||
$.modal.msgReload("保存成功,正在刷新数据请稍候……", modal_status.SUCCESS);
|
||||
})
|
||||
|
||||
$("#button-open-1").click(function(){
|
||||
|
||||
@@ -24,49 +24,97 @@
|
||||
<h5>弹层框</h5>
|
||||
</div>
|
||||
<div class="ibox-content" id="test">
|
||||
<p>弹出复选框表格及单选框表格(点击提交后得到数据并回显到父窗体)。 </p>
|
||||
<button type="button" class="btn btn-info" onclick="selectUsersToParent()">弹出表格(复选框)</button>
|
||||
<button type="button" class="btn btn-warning" onclick="selectUsersToParentCallBack()">弹出表格(复选框)- 回调形式</button>
|
||||
<p>弹出层,点击提交后得到数据并回显到父窗体。 </p>
|
||||
<button type="button" class="btn btn-primary" onclick="selectUsersToParent()">弹出表格(方式一)</button>
|
||||
<button type="button" class="btn btn-success" onclick="selectUsersToParentCallBack2()">弹出表格(方式二)</button>
|
||||
<button type="button" class="btn btn-info" onclick="selectUsersToParentCallBack3()">弹出表格(方式三)</button>
|
||||
<p id="userids"> </p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5>弹层框</h5>
|
||||
</div>
|
||||
<div class="ibox-content" id="test">
|
||||
<p>多层弹出,点击提交后得到数据并回显到父窗体。 </p>
|
||||
<button type="button" class="btn btn-primary" onclick="selectUsersToParent4()">弹出窗口(方式四)</button>
|
||||
<p id="username"> </p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "demo/modal";
|
||||
|
||||
|
||||
function selectCheckUser(){
|
||||
$.modal.open("选择用户", prefix + "/check");
|
||||
}
|
||||
|
||||
|
||||
function selectRadioUser(){
|
||||
$.modal.open("选择用户", prefix + "/radio");
|
||||
}
|
||||
|
||||
|
||||
// 根据当前激活的选项卡获取(方式一)
|
||||
function selectUsersToParent(){
|
||||
$.modal.open("选择用户", prefix + "/parent");
|
||||
}
|
||||
|
||||
function selectUsersToParentCallBack(){
|
||||
// callBack获取父窗口方法(方式二)
|
||||
function selectUsersToParentCallBack2(){
|
||||
var options = {
|
||||
title: '选择用户',
|
||||
url: prefix + "/parent",
|
||||
callBack: doSubmit
|
||||
callBack: doSubmit2
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
// callBack获取父窗口值(方式三)
|
||||
function selectUsersToParentCallBack3(){
|
||||
var options = {
|
||||
title: '选择用户',
|
||||
url: prefix + "/parent",
|
||||
callBack: doSubmit3
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
// callBack获取父窗口值(方式四)
|
||||
function selectUsersToParent4(){
|
||||
var prefix = ctx + "demo/modal";
|
||||
var options = {
|
||||
title: '多层窗口A',
|
||||
url: prefix + "/frame1",
|
||||
callBack: doSubmit4
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function doSubmit2(index, layero){
|
||||
var rows = layero.find("iframe")[0].contentWindow.getSelections();
|
||||
if (rows.length == 0) {
|
||||
$.modal.alertWarning("请至少选择一条记录");
|
||||
return;
|
||||
}
|
||||
$('#userids').html(rows.join())
|
||||
$('#userids').html('我是通过方式二来的:' + rows.join())
|
||||
$.modal.close(index);
|
||||
}
|
||||
|
||||
function doSubmit3(index, layero){
|
||||
var body = $.modal.getChildFrame(index);
|
||||
$("#userids").html('我是通过方式三来的:' + body.find('#rowIds').val());
|
||||
$.modal.close(index);
|
||||
}
|
||||
|
||||
function doSubmit4(index, layero){
|
||||
var body = $.modal.getChildFrame(index);
|
||||
$("#username").html('我是通过方式四来的:' + body.find('#name').val());
|
||||
$.modal.close(index);
|
||||
}
|
||||
|
||||
function selectUsers(){
|
||||
alert(1);
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
<!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('多层窗口A')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<form id="form-user-add" class="form-horizontal">
|
||||
<div class="row">
|
||||
<div class="col-sm-12" style="margin-top: 50px">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">用户名称:</label>
|
||||
<div class="col-sm-4">
|
||||
<input id="name" placeholder="请输入用户名称" class="form-control" type="text">
|
||||
</div>
|
||||
<button type="button" class="btn btn-primary" onclick="selectUserToParentId()">选择</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div th:include="include :: footer"></div>
|
||||
<script th:inline="javascript">
|
||||
/* 提交 */
|
||||
function submitHandler() {
|
||||
var name = $("#name").val();
|
||||
activeWindow().$('#username').html(name);
|
||||
$.modal.close();
|
||||
}
|
||||
|
||||
// 根据父窗口ID获取
|
||||
function selectUserToParentId(){
|
||||
var prefix = ctx + "demo/modal";
|
||||
var options = {
|
||||
width: '100px',
|
||||
height: '100px',
|
||||
title: '多层窗口B',
|
||||
url: prefix + "/frame2",
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
var body = $.modal.getChildFrame(index);
|
||||
$("#name").val(body.find('#name').val());
|
||||
$.modal.close(index);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,24 @@
|
||||
<!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('多层窗口B')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<form id="form-user-add" class="form-horizontal">
|
||||
<div class="row">
|
||||
<div class="col-sm-12" style="margin-top: 20px">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">用户名称:</label>
|
||||
<div class="col-sm-4">
|
||||
<input id="name" placeholder="请输入用户名称" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -4,6 +4,7 @@
|
||||
<th:block th:include="include :: header('表格传值给父页面')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<input type="hidden" id="rowIds">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
@@ -81,15 +82,21 @@
|
||||
}
|
||||
$.modal.close();
|
||||
// 父页面的方法
|
||||
// parent.selectUsers();
|
||||
// activeWindow().selectUsers();
|
||||
// 父页面的变量
|
||||
parent.$('#userids').html(rows.join());
|
||||
activeWindow().$('#userids').html('我是通过方式一来的:' + rows.join());
|
||||
}
|
||||
|
||||
/* 添加用户-选择用户-提交(回调形式-父页面调用子页面) */
|
||||
function getSelections() {
|
||||
return $.table.selectFirstColumns();
|
||||
}
|
||||
|
||||
$("#bootstrap-table").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);
|
||||
$("#rowIds").val(rowIds);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -59,7 +59,7 @@
|
||||
type: "post",
|
||||
success: function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
layer.msg("保存成功,正在刷新数据请稍后……", {
|
||||
layer.msg("保存成功,正在刷新数据请稍候……", {
|
||||
icon: 1,
|
||||
time: 500,
|
||||
shade: [0.1, '#8F8F8F']
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
<body class="gray-bg">
|
||||
<div class="row border-bottom white-bg dashboard-header">
|
||||
<div class="col-sm-12">
|
||||
<p>ECharts开源来自百度商业前端数据可视化团队,基于html5 Canvas,是一个纯Javascript图表库,提供直观,生动,可交互,可个性化定制的数据可视化图表。创新的拖拽重计算、数据视图、值域漫游等特性大大增强了用户体验,赋予了用户对数据进行挖掘、整合的能力。 <a href="http://echarts.baidu.com/doc/about.html" target="_blank">了解更多</a>
|
||||
<p>ECharts开源来自百度商业前端数据可视化团队,基于html5 Canvas,是一个纯Javascript图表库,提供直观,生动,可交互,可个性化定制的数据可视化图表。创新的拖拽重计算、数据视图、值域漫游等特性大大增强了用户体验,赋予了用户对数据进行挖掘、整合的能力。 <a href="https://echarts.apache.org/handbook/zh/get-started/" target="_blank">了解更多</a>
|
||||
</p>
|
||||
<p>ECharts官网:<a href="http://echarts.baidu.com/" target="_blank">http://echarts.baidu.com/</a>
|
||||
<p>ECharts官网:<a href="https://echarts.apache.org/" target="_blank">https://echarts.apache.org/</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('异步加载表格树')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>区域名称:</label>
|
||||
<input type="text" name="areaName"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.treeTable.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-info" id="expandAllBtn">
|
||||
<i class="fa fa-exchange"></i> 展开/折叠
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-tree-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "demo/table";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
code: "id",
|
||||
parentCode: "parentId",
|
||||
uniqueId: "id",
|
||||
expandAll: false,
|
||||
expandFirst: false,
|
||||
expandColumn: 1,
|
||||
pagination: true, // 开启分页
|
||||
url: prefix + "/tree/list", // 列表请求
|
||||
dataUrl: prefix + "/tree/listChild", // 子节点异步请求
|
||||
onClickRow: onClickRow,
|
||||
columns: [{
|
||||
field: 'selectItem',
|
||||
radio: true
|
||||
},
|
||||
{
|
||||
field: 'areaName',
|
||||
title: '区域名称',
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
field: 'areaCode',
|
||||
title: '区域代码',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'simplePy',
|
||||
title: '首字母简拼',
|
||||
align: 'left'
|
||||
},
|
||||
{
|
||||
field: 'pinYin',
|
||||
title: '名称全拼',
|
||||
align: 'left'
|
||||
}]
|
||||
};
|
||||
$.treeTable.init(options);
|
||||
});
|
||||
|
||||
function onClickRow(row, $element){
|
||||
// alert("单击行id:" + row.id + " name:" + row.name);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,6 +7,9 @@
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<!-- 点击事件的方式打开使用 detailViewIcon: false and detailViewByClick: true
|
||||
data-detail-view-icon="false"
|
||||
data-detail-view-by-click="true" -->
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
function ajaxColumns() {
|
||||
var url = prefix + "/ajaxColumns";
|
||||
var dataParam = $.common.formToJSON("table-form");
|
||||
$.modal.loading("正在查询中,请稍后...");
|
||||
$.modal.loading("正在查询中,请稍候...");
|
||||
$.post(url, dataParam, function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
setColumns(result.data);
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
$(function() {
|
||||
var options = {
|
||||
id: "bootstrap-table1",
|
||||
formId: "form1",
|
||||
toolbar: "toolbar1",
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
@@ -145,6 +146,7 @@
|
||||
$(function() {
|
||||
var options = {
|
||||
id: "bootstrap-table2",
|
||||
formId: "form2",
|
||||
toolbar: "toolbar2",
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-primary" onclick="getData()">
|
||||
<i class="fa fa-search"></i> 查询所有数据
|
||||
</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<p class="select-title">按住表格行拖拽</p>
|
||||
@@ -29,7 +34,9 @@
|
||||
showColumns: false,
|
||||
onReorderRow: function (data) {
|
||||
//当拖拽结束后,data为整个表格的数据
|
||||
console.log('拖拽结束' + JSON.stringify(data))
|
||||
console.table(data)
|
||||
// 当sidePagination: "server"时,拖拽行后顺序错乱,需要重新调用加载数据方法
|
||||
$("#" + table.options.id).bootstrapTable('load', data);
|
||||
return false;
|
||||
},
|
||||
columns: [{
|
||||
@@ -70,6 +77,12 @@
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
/* 查询表格所有数据值 */
|
||||
function getData(){
|
||||
var data = $("#" + table.options.id).bootstrapTable('getData');
|
||||
alert(JSON.stringify(data.map( item => { return item.userId })))
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,8 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('主子表提交')" />
|
||||
<th:block th:include="include :: header('主子表提交')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
<style type="text/css">
|
||||
table label.error{position: inherit;}select + label.error{z-index:1;right:40px;}
|
||||
</style>
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="main-content">
|
||||
@@ -13,7 +16,7 @@
|
||||
<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">
|
||||
<input name="name" placeholder="请输入客户名称" class="form-control" type="text" maxlength="30" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -31,9 +34,9 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">手机号码:</label>
|
||||
<label class="col-sm-4 control-label">手机号码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="phonenumber" name="phonenumber" placeholder="请输入手机号码" class="form-control" type="text" maxlength="11">
|
||||
<input id="phonenumber" name="phonenumber" placeholder="请输入手机号码" class="form-control isPhone" type="text" maxlength="11">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -62,8 +65,8 @@
|
||||
<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>
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="addRow()"><i class="fa fa-plus"> 增加</i></button>
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="sub.delRow()"><i class="fa fa-minus"> 删除</i></button>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
@@ -127,7 +130,7 @@
|
||||
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);
|
||||
var html = $.common.sprintf("<input class='form-control goodsName' type='text' name='goods[%s].name' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
@@ -136,7 +139,7 @@
|
||||
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);
|
||||
var html = $.common.sprintf("<input class='form-control goodsWeight' type='text' name='goods[%s].weight' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
@@ -166,16 +169,34 @@
|
||||
var data = [{ index: index, type: value }];
|
||||
return $("#goodsTypeTpl").tmpl(data).html();
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var value = $.common.isNotEmpty(row.index) ? row.index : $.table.serialNumber(index);
|
||||
return '<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="sub.delRowByIndex(\'' + value + '\')"><i class="fa fa-remove"></i>删除</a>';
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
/* 主子表-提交 */
|
||||
$.validator.addMethod("goodsName", function(value, element) {
|
||||
return !this.optional(element);
|
||||
}, "商品名称必填。");
|
||||
|
||||
$.validator.addMethod("goodsWeight", function(value, element) {
|
||||
return !this.optional(element) && (value <= 100 && value >= 0);
|
||||
}, "商品重量长度区间0-100。");
|
||||
|
||||
/* 主子表-提交 */
|
||||
function submitHandler(index, layero){
|
||||
var data = $("#form-add").serializeArray();
|
||||
alert(JSON.stringify(data))
|
||||
$.operate.saveModal("/demo/operate/customer/add", data);
|
||||
if ($.validate.form()) {
|
||||
var data = $("#form-add").serializeArray();
|
||||
alert(JSON.stringify(data))
|
||||
$.operate.saveModal("/demo/operate/customer/add", data);
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='birthday']").datetimepicker({
|
||||
@@ -184,15 +205,17 @@
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
function addColumn() {
|
||||
function addRow() {
|
||||
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
||||
var row = {
|
||||
index: $.table.serialNumber(count),
|
||||
name: "",
|
||||
weight: "",
|
||||
price: "",
|
||||
date: "",
|
||||
type: "",
|
||||
}
|
||||
sub.addColumn(row);
|
||||
sub.addRow(row);
|
||||
}
|
||||
|
||||
$("#bootstrap-table").on("post-body.bs.table", function (e, args) {
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
<link th:href="@{/ajax/libs/bootstrap-table/bootstrap-table.min.css?v=1.18.3}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/animate.min.css?v=20210831}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/style.min.css?v=20210831}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.7.0}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.7.6}" rel="stylesheet"/>
|
||||
</head>
|
||||
|
||||
<!-- 通用JS -->
|
||||
<div th:fragment="footer">
|
||||
<script th:inline="javascript"> var ctx = [[@{/}]]; var lockscreen = [[${session.lockscreen}]]; if(lockscreen){window.top.location=ctx+"lockscreen";} </script>
|
||||
<a id="scroll-up" href="#" class="btn btn-sm display"><i class="fa fa-angle-double-up"></i></a>
|
||||
<script th:src="@{/js/jquery.min.js?v=3.6.0}"></script>
|
||||
<script th:src="@{/js/jquery.min.js?v=3.6.1}"></script>
|
||||
<script th:src="@{/js/bootstrap.min.js?v=3.3.7}"></script>
|
||||
<!-- bootstrap-table 表格插件 -->
|
||||
<script th:src="@{/ajax/libs/bootstrap-table/bootstrap-table.min.js?v=1.18.3}"></script>
|
||||
@@ -35,9 +35,9 @@
|
||||
<script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js?v=2.70.0}"></script>
|
||||
<script th:src="@{/ajax/libs/iCheck/icheck.min.js?v=1.0.3}"></script>
|
||||
<script th:src="@{/ajax/libs/layer/layer.min.js?v=3.5.1}"></script>
|
||||
<script th:src="@{/ajax/libs/layui/layui.min.js?v=2.6.8}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.7.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.7.0}"></script>
|
||||
<script th:src="@{/ajax/libs/layui/layui.min.js?v=2.7.5}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.7.6}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.7.6}"></script>
|
||||
</div>
|
||||
|
||||
<!-- ztree树插件 -->
|
||||
@@ -108,10 +108,10 @@
|
||||
|
||||
<!-- fileinput文件上传插件 -->
|
||||
<div th:fragment="bootstrap-fileinput-css">
|
||||
<link th:href="@{/ajax/libs/bootstrap-fileinput/fileinput.min.css?v=5.2.3}" rel="stylesheet"/>
|
||||
<link th:href="@{/ajax/libs/bootstrap-fileinput/fileinput.min.css?v=5.5.2}" rel="stylesheet"/>
|
||||
</div>
|
||||
<div th:fragment="bootstrap-fileinput-js">
|
||||
<script th:src="@{/ajax/libs/bootstrap-fileinput/fileinput.min.js?v=5.2.3}"></script>
|
||||
<script th:src="@{/ajax/libs/bootstrap-fileinput/fileinput.min.js?v=5.5.2}"></script>
|
||||
</div>
|
||||
|
||||
<!-- duallistbox双列表框插件 -->
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
<link th:href="@{/css/animate.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/style.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/skins.css?v=20200902}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.7.0}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.7.6}" rel="stylesheet"/>
|
||||
<style type="text/css">.fixed-sidebar .nav:not(.navbar-toolbar)>li.active{border-left:0px!important;}</style>
|
||||
</head>
|
||||
<body class="fixed-sidebar full-height-layout gray-bg" th:classappend="${isMobile} ? 'canvas-menu'" style="overflow: hidden">
|
||||
<div id="wrapper">
|
||||
@@ -98,6 +99,7 @@
|
||||
<li><a class="menuItem" th:href="@{/demo/form/grid}">栅格</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/select}">下拉框</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/timeline}">时间轴</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/progress_bars}">进度条</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/basic}">基本表单</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/cards}">卡片列表</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/jasny}">功能扩展</a></li>
|
||||
@@ -146,6 +148,7 @@
|
||||
<li><a class="menuItem" th:href="@{/demo/table/print}">表格打印配置</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/dynamicColumns}">表格动态列</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/customView}">自定义视图分页</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/asynTree}">异步加载表格树</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/other}">表格其他操作</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -279,7 +282,7 @@
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="row content-tabs">
|
||||
<div class="row content-tabs" th:classappend="${#bools.isFalse(tagsView)} ? |hide|">
|
||||
<button class="roll-nav roll-left tabLeft">
|
||||
<i class="fa fa-backward"></i>
|
||||
</button>
|
||||
@@ -296,12 +299,12 @@
|
||||
|
||||
<a id="ax_close_max" class="ax_close_max" href="#" title="关闭全屏"> <i class="fa fa-times-circle-o"></i> </a>
|
||||
|
||||
<div class="row mainContent" id="content-main" th:style="${#bools.isFalse(ignoreFooter)} ? |height: calc(100% - 91px)|">
|
||||
<div class="row mainContent" id="content-main" th:classappend="${mainClass}">
|
||||
<iframe class="RuoYi_iframe" name="iframe0" width="100%" height="100%" th:data-id="@{/system/main}"
|
||||
th:src="@{/system/main}" frameborder="0" seamless></iframe>
|
||||
th:src="@{/system/main}" frameborder="0" seamless></iframe>
|
||||
</div>
|
||||
|
||||
<div th:if="${ignoreFooter}" class="footer">
|
||||
<div th:if="${footer}" class="footer">
|
||||
<div class="pull-right">© [[${copyrightYear}]] RuoYi Copyright </div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -315,8 +318,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.7.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.7.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.7.6}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.7.6}"></script>
|
||||
<script th:src="@{/ruoyi/index.js?v=20201208}"></script>
|
||||
<script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script>
|
||||
<script th:src="@{/js/resize-tabs.js}"></script>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<link th:href="@{/css/animate.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/style.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/skins.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.7.0}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.7.6}" rel="stylesheet"/>
|
||||
</head>
|
||||
<body class="fixed-sidebar full-height-layout gray-bg" th:classappend="${isMobile} ? 'canvas-menu'" style="overflow: hidden">
|
||||
<div id="wrapper">
|
||||
@@ -80,6 +80,7 @@
|
||||
<li><a class="menuItem" th:href="@{/demo/form/grid}">栅格</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/select}">下拉框</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/timeline}">时间轴</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/progress_bars}">进度条</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/basic}">基本表单</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/cards}">卡片列表</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/jasny}">功能扩展</a></li>
|
||||
@@ -127,6 +128,7 @@
|
||||
<li><a class="menuItem" th:href="@{/demo/table/print}">表格打印配置</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/dynamicColumns}">表格动态列</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/customView}">自定义视图分页</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/asynTree}">异步加载表格树</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/other}">表格其他操作</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -226,7 +228,7 @@
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="row content-tabs">
|
||||
<div class="row content-tabs" th:classappend="${#bools.isFalse(tagsView)} ? |hide|">
|
||||
<button class="roll-nav roll-left tabLeft">
|
||||
<i class="fa fa-backward"></i>
|
||||
</button>
|
||||
@@ -243,12 +245,12 @@
|
||||
|
||||
<a id="ax_close_max" class="ax_close_max" href="#" title="关闭全屏"> <i class="fa fa-times-circle-o"></i> </a>
|
||||
|
||||
<div class="row mainContent" id="content-main" th:style="${#bools.isFalse(ignoreFooter)} ? |height: calc(100% - 91px)|">
|
||||
<div class="row mainContent" id="content-main" th:classappend="${mainClass}">
|
||||
<iframe class="RuoYi_iframe" name="iframe0" width="100%" height="100%" th:data-id="@{/system/main}"
|
||||
th:src="@{/system/main}" frameborder="0" seamless></iframe>
|
||||
th:src="@{/system/main}" frameborder="0" seamless></iframe>
|
||||
</div>
|
||||
|
||||
<div th:if="${ignoreFooter}" class="footer">
|
||||
|
||||
<div th:if="${footer}" class="footer">
|
||||
<div class="pull-right">© [[${copyrightYear}]] RuoYi Copyright </div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -262,8 +264,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.7.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.7.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.7.6}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.7.6}"></script>
|
||||
<script th:src="@{/ruoyi/index.js?v=20201208}"></script>
|
||||
<script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script>
|
||||
<script th:inline="javascript">
|
||||
|
||||
@@ -29,16 +29,16 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="help-block text-center" style="margin-top: 50px;">系统锁屏,请输入密码登陆!</div>
|
||||
<div class="help-block text-center" style="margin-top: 50px;">系统锁屏,请输入密码登录!</div>
|
||||
<div class="text-center">
|
||||
<a th:href="@{logout}">退出重新登陆</a>
|
||||
<a th:href="@{logout}">退出重新登录</a>
|
||||
</div>
|
||||
</div>
|
||||
<script src="../static/js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script>
|
||||
<script src="../static/js/bootstrap.min.js" th:src="@{/js/bootstrap.min.js}"></script>
|
||||
<script src="../static/js/three.min.js" th:src="@{/js/three.min.js}"></script>
|
||||
<script src="../static/ajax/libs/layer/layer.min.js" th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.7.0}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.7.6}"></script>
|
||||
</body>
|
||||
<script th:inline="javascript">
|
||||
var ctx = [[@{/}]];
|
||||
|
||||
@@ -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.min.css" th:href="@{/css/style.min.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.7.0}" rel="stylesheet"/>
|
||||
<link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.7.6}" rel="stylesheet"/>
|
||||
<!-- 360浏览器急速模式 -->
|
||||
<meta name="renderer" content="webkit">
|
||||
<!-- 避免IE使用兼容模式 -->
|
||||
@@ -59,13 +59,13 @@
|
||||
<div class="checkbox-custom" th:if="${isRemembered}" th:classappend="${captchaEnabled==false} ? 'm-t'">
|
||||
<input type="checkbox" id="rememberme" name="rememberme"> <label for="rememberme">记住我</label>
|
||||
</div>
|
||||
<button class="btn btn-success btn-block" id="btnSubmit" data-loading="正在验证登录,请稍后...">登录</button>
|
||||
<button class="btn btn-success btn-block" id="btnSubmit" data-loading="正在验证登录,请稍候...">登录</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="signup-footer">
|
||||
<div class="pull-left">
|
||||
Copyright © 2018-2021 ruoyi.vip All Rights Reserved. <br>
|
||||
Copyright © 2018-2022 ruoyi.vip All Rights Reserved. <br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -76,7 +76,7 @@
|
||||
<script src="../static/ajax/libs/validate/jquery.validate.min.js" th:src="@{/ajax/libs/validate/jquery.validate.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.7.0}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.7.6}"></script>
|
||||
<script src="../static/ruoyi/login.js" th:src="@{/ruoyi/login.js}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<div class="ibox-content">
|
||||
<p><i class="fa fa-send-o"></i> 官网:<a href="http://www.ruoyi.vip" target="_blank">http://www.ruoyi.vip</a>
|
||||
</p>
|
||||
<p><i class="fa fa-qq"></i> QQ群:<s>满1389287</s> <s>满1679294</s> <s>满1529866</s> <s>满1772718</s> <s>满1366522</s> <s>满1382251</s> <s>满1145125</s> <s>满86752435</s> <s>满134072510</s> <s>满210336300</s> <s>满339522636</s> <s>满130035985</s> <s>满143151071</s> <s>满158781320</s> <s>满201531282</s> <a href="https://jq.qq.com/?_wv=1027&k=0ARRrO9V" target="_blank">101526938</a>
|
||||
<p><i class="fa fa-qq"></i> QQ群:<s>满1389287</s> <s>满1679294</s> <s>满1529866</s> <s>满1772718</s> <s>满1366522</s> <s>满1382251</s> <s>满1145125</s> <s>满86752435</s> <s>满134072510</s> <s>满210336300</s> <s>满339522636</s> <s>满130035985</s> <s>满143151071</s> <s>满158781320</s> <s>满201531282</s> <s>满101526938</s> <s>满264355400</s> <s>满298522656</s> <s>满139845794</s> <a href="https://jq.qq.com/?_wv=1027&k=Cqd66IKe" target="_blank">185760789</a>
|
||||
</p>
|
||||
<p><i class="fa fa-weixin"></i> 微信:<a href="javascript:;">/ *若依</a>
|
||||
</p>
|
||||
@@ -96,13 +96,262 @@
|
||||
<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="#v476">v4.7.6</a><code class="pull-right">2022.12.16</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v476" class="panel-collapse collapse in">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>定时任务违规的字符</li>
|
||||
<li>忽略不必要的属性数据返回</li>
|
||||
<li>导入更新用户数据前校验数据权限</li>
|
||||
<li>修改参数键名时移除前缓存配置</li>
|
||||
<li>修改用户登录账号进行重复验证</li>
|
||||
<li>兼容Excel下拉框内容过多无法显示</li>
|
||||
<li>升级oshi到最新版本6.4.0</li>
|
||||
<li>升级kaptcha到最新版2.3.3</li>
|
||||
<li>升级druid到最新版本1.2.15</li>
|
||||
<li>升级shiro到最新版本1.10.1</li>
|
||||
<li>升级pagehelper到最新版1.4.6</li>
|
||||
<li>升级bootstrap-fileinput到最新版本5.5.2</li>
|
||||
<li>修复sheet超出最大行数异常问题</li>
|
||||
<li>修复关闭父页签后提交无法跳转的问题</li>
|
||||
<li>修复操作日志类型多选导出不生效问题</li>
|
||||
<li>修复导出包含空子列表数据异常的问题</li>
|
||||
<li>优化树形表格层级显示</li>
|
||||
<li>优化SQL关键字检查防止注入</li>
|
||||
<li>优化用户管理重置时取消部门选择</li>
|
||||
<li>优化代码生成同步后字典值NULL问题</li>
|
||||
<li>优化导出对象的子列表为空会出现[]问题</li>
|
||||
<li>优化select2搜索下拉后校验必填样式问题</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="#v475">v4.7.5</a><code class="pull-right">2022.09.05</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v475" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>Excel支持导出对象的子列表方法</li>
|
||||
<li>数据逻辑删除不进行唯一验证</li>
|
||||
<li>优化多角色数据权限匹配规则</li>
|
||||
<li>新增主子表提交校验示例</li>
|
||||
<li>支持自定义隐藏Excel属性列</li>
|
||||
<li>Excel注解支持backgroundColor属性设置背景颜色</li>
|
||||
<li>菜单配置刷新时Tab页签切换时刷新</li>
|
||||
<li>增加对AjaxResult消息结果类型的判断</li>
|
||||
<li>新增示例(进度条)</li>
|
||||
<li>新增内容编码/解码方便插件集成使用</li>
|
||||
<li>升级jquery到最新版3.6.1</li>
|
||||
<li>升级layui到最新版本2.7.5</li>
|
||||
<li>升级shiro到最新版本1.9.1</li>
|
||||
<li>升级druid到最新版本1.2.11</li>
|
||||
<li>升级pagehelper到最新版1.4.3</li>
|
||||
<li>升级oshi到最新版本6.2.2</li>
|
||||
<li>修复树表onLoadSuccess不生效的问题</li>
|
||||
<li>修复用户分配角色大于默认页数丢失问题</li>
|
||||
<li>定时任务支持执行父类方法</li>
|
||||
<li>自动设置切换多个树表格实例配置</li>
|
||||
<li>页签创建标题优先data-title属性</li>
|
||||
<li>优化任务过期不执行调度</li>
|
||||
<li>优化横向菜单下激活菜单样式</li>
|
||||
<li>优化按钮打开窗口后按回车反复弹出</li>
|
||||
<li>优化excel/scale属性导出单元格数值类型</li>
|
||||
<li>优化druid开启wall过滤器出现的异常问题</li>
|
||||
<li>优化多个相同角色数据导致权限SQL重复问题</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="#v474">v4.7.4</a><code class="pull-right">2022.06.01</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v474" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>用户头像上传图片格式限制</li>
|
||||
<li>Excel注解支持color属性设置字体颜色</li>
|
||||
<li>设置分页参数默认值</li>
|
||||
<li>主子表操作列新增单个删除</li>
|
||||
<li>定时任务检查Bean包名是否为白名单配置</li>
|
||||
<li>升级spring-boot到最新版本2.5.14</li>
|
||||
<li>升级shiro到最新版本1.9.0</li>
|
||||
<li>升级oshi到最新版本6.1.6</li>
|
||||
<li>升级fastjson到最新版1.2.83 安全修复版本</li>
|
||||
<li>文件上传兼容Weblogic环境</li>
|
||||
<li>新增清理分页的线程变量方法</li>
|
||||
<li>新增获取不带后缀文件名称方法</li>
|
||||
<li>用户缓存信息添加部门ancestors祖级列表</li>
|
||||
<li>自定义ShiroFilterFactoryBean防止中文请求被拦截</li>
|
||||
<li>字典类型必须以字母开头,且只能为(小写字母,数字,下滑线)</li>
|
||||
<li>优化IP地址获取到多个的问题</li>
|
||||
<li>优化表格冻结列阴影效果显示</li>
|
||||
<li>优化菜单侧边栏滚动条尺寸及颜色</li>
|
||||
<li>优化显示顺序orderNum类型为整型</li>
|
||||
<li>优化接口使用泛型使其看到响应属性字段</li>
|
||||
<li>优化导出数据LocalDateTime类型无数据问题</li>
|
||||
<li>修复导入Excel时字典字段类型为Long转义为空问题</li>
|
||||
<li>优化导出excel单元格验证,包含变更为开头.防止正常内容被替换</li>
|
||||
<li>修复URL类型回退键被禁止问题</li>
|
||||
<li>修复表格客户端分页序号显示错误问题</li>
|
||||
<li>修复代码生成拖拽多次出现的排序不正确问题</li>
|
||||
<li>修复表格打印组件不识别多层对象属性值问题</li>
|
||||
<li>修复操作日志查询类型条件为0时会查到所有数据</li>
|
||||
<li>修复Excel注解prompt/combo同时使用不生效问题</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="#v473">v4.7.3</a><code class="pull-right">2022.03.01</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v473" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>表格树支持分页/异步加载</li>
|
||||
<li>代码生成预览支持复制内容</li>
|
||||
<li>定时任务默认保存到内存中执行</li>
|
||||
<li>代码生成同步保留必填/类型选项</li>
|
||||
<li>页面若未匹配到字典标签则返回原字典值</li>
|
||||
<li>用户访问控制时校验数据权限,防止越权</li>
|
||||
<li>导出Excel时屏蔽公式,防止CSV注入风险</li>
|
||||
<li>升级spring-boot到最新版本2.5.10</li>
|
||||
<li>升级spring-boot-mybatis到最新版2.2.2</li>
|
||||
<li>升级pagehelper到最新版1.4.1</li>
|
||||
<li>升级oshi到最新版本6.1.2</li>
|
||||
<li>升级bootstrap-table到最新版本1.19.1</li>
|
||||
<li>服务监控新增运行参数信息显示</li>
|
||||
<li>定时任务目标字符串验证包名白名单</li>
|
||||
<li>文件上传接口新增原/新文件名返回参数</li>
|
||||
<li>定时任务屏蔽违规的字符</li>
|
||||
<li>分页数据新增分页参数合理化参数</li>
|
||||
<li>表格父子视图添加点击事件打开示例</li>
|
||||
<li>优化上传文件名称命名规则</li>
|
||||
<li>优化加载字典缓存数据</li>
|
||||
<li>优化任务队列满时任务拒绝策略</li>
|
||||
<li>优化IE11上传预览不显示的问题</li>
|
||||
<li>优化Excel格式化不同类型的日期对象</li>
|
||||
<li>优化国际化配置多余的zh请求问题</li>
|
||||
<li>优化新版Chrome浏览器回退出现的遮罩层</li>
|
||||
<li>修复EMAIL类型回退键被禁止问题</li>
|
||||
<li>修复Xss注解字段值为空时的异常问题</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="#v472">v4.7.2</a><code class="pull-right">2021.12.23</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v472" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>自定义xss校验注解实现</li>
|
||||
<li>进入修改页面方法添加权限标识</li>
|
||||
<li>代码生成创建按钮添加超级管理员权限</li>
|
||||
<li>代码生成创建表检查关键字,防止注入风险</li>
|
||||
<li>修复定时任务多参数逗号分隔的问题</li>
|
||||
<li>修复表格插件一起使用出现的声明报错问题</li>
|
||||
<li>修复代码生成主子表模板删除方法缺少事务</li>
|
||||
<li>升级oshi到最新版本v5.8.6</li>
|
||||
<li>升级velocity到最新版本2.3</li>
|
||||
<li>升级fastjson到最新版1.2.79</li>
|
||||
<li>升级log4j2到最新版2.17.0 防止漏洞风险</li>
|
||||
<li>升级thymeleaf到最新版3.0.14 阻止远程代码执行漏洞</li>
|
||||
<li>优化修改/授权角色实时生效</li>
|
||||
<li>修整tomcat配置参数已过期问题</li>
|
||||
<li>前端添加单独的二代身份证校验</li>
|
||||
<li>优化新增部门时验证用户所属部门</li>
|
||||
<li>优化查询用户的角色组&岗位组代码</li>
|
||||
<li>请求分页方法设置成通用方便灵活调用</li>
|
||||
<li>优化日期类型错误提示与图标重叠问题</li>
|
||||
<li>其他细节优化</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v471">v4.7.1</a><code class="pull-right">2021.11.10</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v471" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增是否开启页签功能</li>
|
||||
<li>代码生成的模块增加创建表功能</li>
|
||||
<li>Excel导入支持@Excels注解</li>
|
||||
<li>Excel注解支持导入导出标题信息</li>
|
||||
<li>Excel注解支持自定义数据处理器</li>
|
||||
<li>日志注解新增是否保存响应参数</li>
|
||||
<li>防重提交注解支持配置间隔时间/提示消息</li>
|
||||
<li>网页部分操作禁止使用后退键(Backspace)</li>
|
||||
<li>实例演示中增加多层窗口获取值</li>
|
||||
<li>弹出层openOptions增加动画属性</li>
|
||||
<li>升级spring-boot到最新版本2.5.6</li>
|
||||
<li>升级spring-boot-mybatis到最新版2.2.0</li>
|
||||
<li>升级pagehelper到最新版1.4.0</li>
|
||||
<li>升级oshi到最新版本v5.8.2</li>
|
||||
<li>升级druid到最新版1.2.8</li>
|
||||
<li>升级fastjson到最新版1.2.78</li>
|
||||
<li>升级thymeleaf-extras-shiro到最新版本v2.1.0</li>
|
||||
<li>升级bootstrap-fileinput到最新版本v5.2.4</li>
|
||||
<li>修改阿里云maven仓库地址为新版地址</li>
|
||||
<li>定时任务屏蔽违规字符</li>
|
||||
<li>增加sendGet无参请求方法</li>
|
||||
<li>代码生成去掉多余的排序字段</li>
|
||||
<li>优化启动脚本参数优化</li>
|
||||
<li>优化页签关闭右侧清除iframe元素</li>
|
||||
<li>优化多表格切换表单查询参数</li>
|
||||
<li>优化表格实例切换event不能为空</li>
|
||||
<li>优化mybatis全局默认的执行器</li>
|
||||
<li>优化导入Excel数据关闭时清理file</li>
|
||||
<li>优化Excel导入图片可能出现的异常</li>
|
||||
<li>优化记录登录信息,防止不必要的修改</li>
|
||||
<li>优化aop语法,使用spring自动注入注解</li>
|
||||
<li>修复无法被反转义问题</li>
|
||||
<li>修复拖拽行数据错位问题</li>
|
||||
<li>修复新窗口打开页面关闭弹窗报错</li>
|
||||
<li>修复富文本回退键被禁止&控制台报错问题</li>
|
||||
<li>修复自定义弹出层全屏参数无效问题</li>
|
||||
<li>修复树表代码生成短字段无法识别问题</li>
|
||||
<li>修复apple/webkit浏览器时间无法格式化</li>
|
||||
<li>修复后端主子表代码模板方法名生成错误问题</li>
|
||||
<li>修复swagger没有指定dataTypeClass导致启动出现warn日志</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="#v470">v4.7.0</a><code class="pull-right">2021.09.01</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v470" class="panel-collapse collapse in">
|
||||
<div id="v470" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>优化弹出层显示在顶层窗口</li>
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="cacheKyes">
|
||||
<tr th:fragment="fragment-cache-kyes" th:each="cacheKey, stat : ${cacheKyes}">
|
||||
<tbody id="cacheKeys">
|
||||
<tr th:fragment="fragment-cache-kyes" th:each="cacheKey, stat : ${cacheKeys}">
|
||||
<td>[[${stat.index + 1}]]</td>
|
||||
<td style="word-wrap:break-word;word-break:break-all;" th:onclick="getCacheValue([[${cacheName}]], [[${cacheKey}]])">[[${cacheKey}]]</td>
|
||||
<td style="width: 50px"><a href="#" th:onclick="clearCacheKey([[${cacheName}]], [[${cacheKey}]])" title="清空"><i class="fa fa-trash-o text-danger"></i></a></td>
|
||||
@@ -125,7 +125,7 @@ function getCacheKeys(cacheName, isMsg) {
|
||||
"fragment": 'fragment-cache-kyes'
|
||||
},
|
||||
success: function(data) {
|
||||
$("#cacheKyes").html(data);
|
||||
$("#cacheKeys").html(data);
|
||||
$("#cacheName").val(_cacheName);
|
||||
if (isMsg) {
|
||||
$.modal.msgSuccess("刷新键名列表成功");
|
||||
@@ -174,7 +174,7 @@ function clearCacheKey(cacheName, cacheKey) {
|
||||
function clearAll(){
|
||||
$.get(prefix + "/clearAll", function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$.modal.msgSuccess("清理缓存成功")
|
||||
$.modal.msgSuccess("清理全部缓存成功")
|
||||
} else {
|
||||
$.modal.msgError(result.msg);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<label>操作人员: </label><input type="text" name="operName"/>
|
||||
</li>
|
||||
<li class="select-selectpicker">
|
||||
<label>操作类型: </label><select id="businessTypes" th:with="type=${@dict.getType('sys_oper_type')}" class="selectpicker" data-none-selected-text="请选择" multiple>
|
||||
<label>操作类型: </label><select id="businessTypes" name="businessTypes" th:with="type=${@dict.getType('sys_oper_type')}" class="selectpicker" data-none-selected-text="请选择" multiple>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<table class="table table-hover margin bottom">
|
||||
<table class="table table-hover margin bottom" style="table-layout:fixed;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Java名称</td>
|
||||
@@ -174,6 +174,10 @@
|
||||
<td colspan="1">项目路径</td>
|
||||
<td colspan="3" th:text="${server.sys.userDir}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">运行参数</td>
|
||||
<td colspan="3" th:text="${server.jvm.inputArgs}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -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.min.css" th:href="@{/css/style.min.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.7.0}" rel="stylesheet"/>
|
||||
<link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.7.6}" rel="stylesheet"/>
|
||||
<!-- 360浏览器急速模式 -->
|
||||
<meta name="renderer" content="webkit">
|
||||
<!-- 避免IE使用兼容模式 -->
|
||||
@@ -58,13 +58,13 @@
|
||||
<input type="checkbox" id="acceptTerm" name="acceptTerm"> <label for="acceptTerm">我已阅读并同意</label>
|
||||
<a href="https://gitee.com/y_project/RuoYi/blob/master/README.md" target="_blank">使用条款</a>
|
||||
</div>
|
||||
<button class="btn btn-success btn-block" id="btnSubmit" data-loading="正在验证注册,请稍后...">注册</button>
|
||||
<button class="btn btn-success btn-block" id="btnSubmit" data-loading="正在验证注册,请稍候...">注册</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="signup-footer">
|
||||
<div class="pull-left">
|
||||
© 2019 All Rights Reserved. RuoYi <br>
|
||||
© 2018-2022 All Rights Reserved. RuoYi <br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -74,7 +74,7 @@
|
||||
<script src="../static/ajax/libs/validate/jquery.validate.min.js" th:src="@{/ajax/libs/validate/jquery.validate.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.7.0}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.7.6}"></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.7.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.7.6}"></script>
|
||||
<script type="text/javascript">
|
||||
//皮肤样式列表
|
||||
var skins = ["skin-blue", "skin-green", "skin-purple", "skin-red", "skin-yellow"];
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-dept-add">
|
||||
<input id="treeId" name="parentId" type="hidden" th:value="${dept.deptId}" />
|
||||
<input id="treeId" name="parentId" type="hidden" th:value="${dept?.deptId}" />
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">上级部门:</label>
|
||||
<label class="col-sm-3 control-label is-required">上级部门:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" onclick="selectDeptTree()" id="treeName" readonly="true" th:value="${dept.deptName}">
|
||||
<input class="form-control" type="text" onclick="selectDeptTree()" id="treeName" readonly="true" th:value="${dept?.deptName}" required>
|
||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -108,10 +108,15 @@
|
||||
|
||||
/*部门管理-新增-选择父部门树*/
|
||||
function selectDeptTree() {
|
||||
var treeId = $("#treeId").val();
|
||||
if ($.common.isEmpty(treeId)) {
|
||||
$.modal.alertWarning("请先添加用户所属的部门!");
|
||||
return;
|
||||
}
|
||||
var options = {
|
||||
title: '部门选择',
|
||||
width: "380",
|
||||
url: prefix + "/selectDeptTree/" + $("#treeId").val(),
|
||||
url: prefix + "/selectDeptTree/" + treeId + "/0",
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
var deptId = [[${deptId}]];
|
||||
var excludeId = [[${excludeId}]];
|
||||
$(function() {
|
||||
var url = $.common.isEmpty(excludeId) ? prefix + "/treeData": prefix + "/treeData/" + excludeId;
|
||||
var url = prefix + "/treeData/" + excludeId;
|
||||
var options = {
|
||||
url: url,
|
||||
expandLevel: 2,
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function() {
|
||||
var url = ctx + "system/dept/roleDeptTreeData?roleId=" + $("#roleId").val();
|
||||
var url = ctx + "system/role/deptTreeData?roleId=" + $("#roleId").val();
|
||||
var options = {
|
||||
id: "deptTrees",
|
||||
url: url,
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
function selectDeptTree() {
|
||||
var treeId = $("#treeId").val();
|
||||
var deptId = $.common.isEmpty(treeId) ? "100" : $("#treeId").val();
|
||||
var url = ctx + "system/dept/selectDeptTree/" + deptId;
|
||||
var url = ctx + "system/user/selectDeptTree/" + deptId;
|
||||
var options = {
|
||||
title: '选择部门',
|
||||
width: "380",
|
||||
@@ -250,7 +250,6 @@
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
var tree = layero.find("iframe")[0].contentWindow.$._tree;
|
||||
var body = $.modal.getChildFrame(index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
|
||||
@@ -100,9 +100,14 @@
|
||||
|
||||
/* 添加角色-提交 */
|
||||
function submitHandler(index, layero){
|
||||
var rows = $.table.selectFirstColumns();
|
||||
var data = { "userId": $("#userId").val(), "roleIds": rows.join() };
|
||||
$.operate.saveTab(prefix + "/insertAuthRole", data);
|
||||
var roleIds = [];
|
||||
var data = $('#bootstrap-table').bootstrapTable('getData');
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
if (data[i][0] || ($.common.isEmpty(data[i][0]) && data[i].flag)) {
|
||||
roleIds.push(data[i].roleId)
|
||||
}
|
||||
}
|
||||
$.operate.saveTab(prefix + "/insertAuthRole", { "userId": $("#userId").val(), "roleIds": roleIds.join() });
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('部门树选择')" />
|
||||
<th:block th:include="include :: ztree-css" />
|
||||
</head>
|
||||
<style>
|
||||
body{height:auto;font-family: "Microsoft YaHei";}
|
||||
button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
|
||||
</style>
|
||||
<body class="hold-transition box box-main">
|
||||
<input id="treeId" name="treeId" type="hidden" th:value="${dept.deptId}"/>
|
||||
<input id="treeName" name="treeName" type="hidden" th:value="${dept.deptName}"/>
|
||||
<div class="wrapper"><div class="treeShowHideButton" onclick="$.tree.toggleSearch();">
|
||||
<label id="btnShow" title="显示搜索" style="display:none;">︾</label>
|
||||
<label id="btnHide" title="隐藏搜索">︽</label>
|
||||
</div>
|
||||
<div class="treeSearchInput" id="search">
|
||||
<label for="keyword">关键字:</label><input type="text" class="empty" id="keyword" maxlength="50">
|
||||
<button class="btn" id="btn" onclick="$.tree.searchNode()"> 搜索 </button>
|
||||
</div>
|
||||
<div class="treeExpandCollapse">
|
||||
<a href="#" onclick="$.tree.expand()">展开</a> /
|
||||
<a href="#" onclick="$.tree.collapse()">折叠</a>
|
||||
</div>
|
||||
<div id="tree" class="ztree treeselect"></div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: ztree-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "system/user"
|
||||
var deptId = [[${deptId}]];
|
||||
$(function() {
|
||||
var url = prefix + "/deptTreeData";
|
||||
var options = {
|
||||
url: url,
|
||||
expandLevel: 2,
|
||||
onClick : zOnClick
|
||||
};
|
||||
$.tree.init(options);
|
||||
});
|
||||
|
||||
function zOnClick(event, treeId, treeNode) {
|
||||
var treeId = treeNode.id;
|
||||
var treeName = treeNode.name;
|
||||
$("#treeId").val(treeId);
|
||||
$("#treeName").val(treeName);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -203,7 +203,7 @@
|
||||
/* 用户管理-修改-选择部门树 */
|
||||
function selectDeptTree() {
|
||||
var deptId = $.common.isEmpty($("#treeId").val()) ? "100" : $("#treeId").val();
|
||||
var url = ctx + "system/dept/selectDeptTree/" + deptId;
|
||||
var url = ctx + "system/user/selectDeptTree/" + deptId;
|
||||
var options = {
|
||||
title: '选择部门',
|
||||
width: "380",
|
||||
@@ -214,7 +214,6 @@
|
||||
}
|
||||
|
||||
function doSubmit(index, layero){
|
||||
var tree = layero.find("iframe")[0].contentWindow.$._tree;
|
||||
var body = $.modal.getChildFrame(index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
|
||||
@@ -198,7 +198,7 @@ $(window).on('load', function() {
|
||||
|
||||
$('.btn-custom').on('click',function (e) {
|
||||
if (!croppable) {
|
||||
$.modal.alertWarning("裁剪框加载中,请稍后...");
|
||||
$.modal.alertWarning("裁剪框加载中,请稍候...");
|
||||
return;
|
||||
}
|
||||
var data = {
|
||||
@@ -214,7 +214,7 @@ $(window).on('load', function() {
|
||||
|
||||
function submitHandler() {
|
||||
if (!croppable) {
|
||||
$.modal.alertWarning("裁剪框加载中,请稍后...");
|
||||
$.modal.alertWarning("裁剪框加载中,请稍候...");
|
||||
return
|
||||
}
|
||||
cropper.getCroppedCanvas().toBlob(function(img) {
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</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()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="resetPre()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -191,7 +191,7 @@
|
||||
|
||||
function queryDeptTree()
|
||||
{
|
||||
var url = ctx + "system/dept/treeData";
|
||||
var url = ctx + "system/user/deptTreeData";
|
||||
var options = {
|
||||
url: url,
|
||||
expandLevel: 2,
|
||||
@@ -221,6 +221,15 @@
|
||||
$('#btnRefresh').click(function() {
|
||||
queryDeptTree();
|
||||
});
|
||||
|
||||
/* 自定义重置-表单重置/隐藏框/树节点选择色/搜索 */
|
||||
function resetPre() {
|
||||
$("#user-form")[0].reset();
|
||||
$("#deptId").val("");
|
||||
$("#parentId").val("");
|
||||
$(".curSelectedNode").removeClass("curSelectedNode");
|
||||
$.table.search();
|
||||
}
|
||||
|
||||
/* 用户管理-部门 */
|
||||
function dept() {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.7.0</version>
|
||||
<version>4.7.6</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
|
||||
<!-- 自定义验证注解 -->
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--常用工具类 -->
|
||||
|
||||
@@ -25,4 +25,9 @@ public @interface DataScope
|
||||
* 用户表的别名
|
||||
*/
|
||||
public String userAlias() default "";
|
||||
|
||||
/**
|
||||
* 权限字符(用于多个角色匹配符合要求的权限)默认根据权限注解@RequiresPermissions获取,多个权限用逗号分隔开来
|
||||
*/
|
||||
public String permission() default "";
|
||||
}
|
||||
|
||||
@@ -5,6 +5,9 @@ import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
import java.math.BigDecimal;
|
||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||
import org.apache.poi.ss.usermodel.IndexedColors;
|
||||
import com.ruoyi.common.utils.poi.ExcelHandlerAdapter;
|
||||
|
||||
/**
|
||||
* 自定义导出Excel数据注解
|
||||
@@ -55,11 +58,6 @@ public @interface Excel
|
||||
*/
|
||||
public int roundingMode() default BigDecimal.ROUND_HALF_EVEN;
|
||||
|
||||
/**
|
||||
* 导出类型(0数字 1字符串)
|
||||
*/
|
||||
public ColumnType cellType() default ColumnType.STRING;
|
||||
|
||||
/**
|
||||
* 导出时在excel中每个列的高度 单位为字符
|
||||
*/
|
||||
@@ -90,6 +88,11 @@ public @interface Excel
|
||||
*/
|
||||
public String[] combo() default {};
|
||||
|
||||
/**
|
||||
* 是否需要纵向合并单元格,应对需求:含有list集合单元格)
|
||||
*/
|
||||
public boolean needMerge() default false;
|
||||
|
||||
/**
|
||||
* 是否导出数据,应对需求:有时我们需要导出一份模板,这是标题需要但内容需要用户手工填写.
|
||||
*/
|
||||
@@ -106,25 +109,44 @@ public @interface Excel
|
||||
public boolean isStatistics() default false;
|
||||
|
||||
/**
|
||||
* 导出字段对齐方式(0:默认;1:靠左;2:居中;3:靠右)
|
||||
* 导出类型(0数字 1字符串 2图片)
|
||||
*/
|
||||
Align align() default Align.AUTO;
|
||||
public ColumnType cellType() default ColumnType.STRING;
|
||||
|
||||
public enum Align
|
||||
{
|
||||
AUTO(0), LEFT(1), CENTER(2), RIGHT(3);
|
||||
private final int value;
|
||||
/**
|
||||
* 导出列头背景色
|
||||
*/
|
||||
public IndexedColors headerBackgroundColor() default IndexedColors.GREY_50_PERCENT;
|
||||
|
||||
Align(int value)
|
||||
{
|
||||
this.value = value;
|
||||
}
|
||||
/**
|
||||
* 导出列头字体颜色
|
||||
*/
|
||||
public IndexedColors headerColor() default IndexedColors.WHITE;
|
||||
|
||||
public int value()
|
||||
{
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 导出单元格背景色
|
||||
*/
|
||||
public IndexedColors backgroundColor() default IndexedColors.WHITE;
|
||||
|
||||
/**
|
||||
* 导出单元格字体颜色
|
||||
*/
|
||||
public IndexedColors color() default IndexedColors.BLACK;
|
||||
|
||||
/**
|
||||
* 导出字段对齐方式
|
||||
*/
|
||||
public HorizontalAlignment align() default HorizontalAlignment.CENTER;
|
||||
|
||||
/**
|
||||
* 自定义数据处理器
|
||||
*/
|
||||
public Class<?> handler() default ExcelHandlerAdapter.class;
|
||||
|
||||
/**
|
||||
* 自定义数据处理器参数
|
||||
*/
|
||||
public String[] args() default {};
|
||||
|
||||
/**
|
||||
* 字段类型(0:导出导入;1:仅导出;2:仅导入)
|
||||
|
||||
@@ -37,4 +37,9 @@ public @interface Log
|
||||
* 是否保存请求的参数
|
||||
*/
|
||||
public boolean isSaveRequestData() default true;
|
||||
|
||||
/**
|
||||
* 是否保存响应的参数
|
||||
*/
|
||||
public boolean isSaveResponseData() default true;
|
||||
}
|
||||
|
||||
@@ -17,5 +17,13 @@ import java.lang.annotation.Target;
|
||||
@Documented
|
||||
public @interface RepeatSubmit
|
||||
{
|
||||
/**
|
||||
* 间隔时间(ms),小于此时间视为重复提交
|
||||
*/
|
||||
public int interval() default 5000;
|
||||
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
public String message() default "不允许重复提交,请稍后再试";
|
||||
}
|
||||
@@ -49,7 +49,8 @@ public class ThreadPoolConfig
|
||||
protected ScheduledExecutorService scheduledExecutorService()
|
||||
{
|
||||
return new ScheduledThreadPoolExecutor(corePoolSize,
|
||||
new BasicThreadFactory.Builder().namingPattern("schedule-pool-%d").daemon(true).build())
|
||||
new BasicThreadFactory.Builder().namingPattern("schedule-pool-%d").daemon(true).build(),
|
||||
new ThreadPoolExecutor.CallerRunsPolicy())
|
||||
{
|
||||
@Override
|
||||
protected void afterExecute(Runnable r, Throwable t)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user