Compare commits
225 Commits
v3.9.2
...
springboot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18ff0701cc | ||
|
|
d29dcdc75d | ||
|
|
73b1a2b283 | ||
|
|
fd24c271c6 | ||
|
|
b99039b609 | ||
|
|
f6763c1ab6 | ||
|
|
9213f18332 | ||
|
|
8f8b4cd50b | ||
|
|
0aafd12699 | ||
|
|
7f901d79ec | ||
|
|
9509819297 | ||
|
|
613d0bbc94 | ||
|
|
b33d43840e | ||
|
|
795f975aa4 | ||
|
|
0432efbcc6 | ||
|
|
e3d5fb66eb | ||
|
|
9c63b051b8 | ||
|
|
e6354dae14 | ||
|
|
4960e13e5b | ||
|
|
60b6e2aee8 | ||
|
|
b35c25db2c | ||
|
|
e8d5c496fa | ||
|
|
6b7b3ffc15 | ||
|
|
50560a49a8 | ||
|
|
7975bf5ee8 | ||
|
|
83cfba6fda | ||
|
|
d3e60cdc04 | ||
|
|
af1ebb77a0 | ||
|
|
6b1815fb7e | ||
|
|
99345f5ed2 | ||
|
|
d8b5dc3533 | ||
|
|
595ef23933 | ||
|
|
c2cee3cf33 | ||
|
|
75ff7774e2 | ||
|
|
9927538189 | ||
|
|
7ae9d76793 | ||
|
|
687715caf1 | ||
|
|
78cc7fcbb8 | ||
|
|
5fea654e5f | ||
|
|
c36496cc67 | ||
|
|
58328fc477 | ||
|
|
0e3269d14e | ||
|
|
ac784e1eb8 | ||
|
|
49629a3157 | ||
|
|
198dec87b4 | ||
|
|
dc036af586 | ||
|
|
9b5a8281af | ||
|
|
752647f4be | ||
|
|
a25128fe03 | ||
|
|
2a11781ef8 | ||
|
|
f1cf8e44c1 | ||
|
|
761af45ec6 | ||
|
|
d554cbc7e9 | ||
|
|
14c0506bc3 | ||
|
|
670dddf08a | ||
|
|
4fd277c38f | ||
|
|
4fd53ffef3 | ||
|
|
929fe2b802 | ||
|
|
b9052413f7 | ||
|
|
0d6c2af081 | ||
|
|
85d8a2fa80 | ||
|
|
f82ea7942a | ||
|
|
d76f52b5ca | ||
|
|
4c75cc4062 | ||
|
|
fa18b9cf8b | ||
|
|
1f7b712dc5 | ||
|
|
c0e188e414 | ||
|
|
e8945ad50e | ||
|
|
b1bc7033c4 | ||
|
|
604b6877f0 | ||
|
|
4a0faad4bc | ||
|
|
eafe812ae7 | ||
|
|
70d125a6f4 | ||
|
|
493dd513e5 | ||
|
|
8df58e7512 | ||
|
|
6a35245aaf | ||
|
|
b2cd0b51c2 | ||
|
|
a0be25948d | ||
|
|
ab1bbf21ed | ||
|
|
2c82a847eb | ||
|
|
2b3b29a4a3 | ||
|
|
f57dea5332 | ||
|
|
fab921a1d2 | ||
|
|
336a47660f | ||
|
|
575b1b727f | ||
|
|
542979e703 | ||
|
|
c2202fee27 | ||
|
|
17a726942f | ||
|
|
362db4a071 | ||
|
|
771b9af7c0 | ||
|
|
7a787a919e | ||
|
|
8fdbd05ce7 | ||
|
|
970275755d | ||
|
|
516116f125 | ||
|
|
d3493e94d6 | ||
|
|
3beb3ae3f9 | ||
|
|
f77c0ec97d | ||
|
|
55854ec195 | ||
|
|
088e9afbc9 | ||
|
|
456e1534ee | ||
|
|
352ed6eee7 | ||
|
|
0cb12f5440 | ||
|
|
169ca65ed3 | ||
|
|
cd6c2fc5f1 | ||
|
|
e24918b054 | ||
|
|
2d36603c46 | ||
|
|
964569f715 | ||
|
|
e37b8ff9b8 | ||
|
|
5896895bab | ||
|
|
0c8e9ad74e | ||
|
|
f0346b3def | ||
|
|
d1cdbbd22c | ||
|
|
e2badb7c68 | ||
|
|
40f54f9700 | ||
|
|
534bd7b8cd | ||
|
|
6c811c88c2 | ||
|
|
eed3ae8f80 | ||
|
|
5aa5f42042 | ||
|
|
29e4eae4e2 | ||
|
|
84e1f8a210 | ||
|
|
2eceac52cf | ||
|
|
624c52b568 | ||
|
|
0e698bcd5b | ||
|
|
c044ec0bb8 | ||
|
|
c6d9a03f9f | ||
|
|
3030c3fa11 | ||
|
|
9dfea3c77f | ||
|
|
ada072c767 | ||
|
|
c8a47f8b39 | ||
|
|
92f8a44f67 | ||
|
|
e0bfca5bdb | ||
|
|
3f753cd801 | ||
|
|
f3bdf8c7e8 | ||
|
|
9a37444e68 | ||
|
|
e43efd179c | ||
|
|
99e9f21253 | ||
|
|
6ee698b1ab | ||
|
|
992537f343 | ||
|
|
fbd5052f99 | ||
|
|
f8a918c62c | ||
|
|
df0954d5df | ||
|
|
8af2aa929a | ||
|
|
fb7743de1c | ||
|
|
eefe15e36b | ||
|
|
b6874d4320 | ||
|
|
6d00fc8603 | ||
|
|
00b2eeb4c3 | ||
|
|
838fc115ca | ||
|
|
62630a5a95 | ||
|
|
f30e737be2 | ||
|
|
5069654cb7 | ||
|
|
fc6b8eefae | ||
|
|
d6c22b8a42 | ||
|
|
33303f13d9 | ||
|
|
0154365cc0 | ||
|
|
2cbae4126d | ||
|
|
a8ba5b1b0e | ||
|
|
cf59bb007d | ||
|
|
fd2568b0e7 | ||
|
|
7ab047745f | ||
|
|
3d09ea31fc | ||
|
|
0188c81853 | ||
|
|
e39629472c | ||
|
|
df911695f0 | ||
|
|
13b2f5149b | ||
|
|
495e640888 | ||
|
|
3a224461d8 | ||
|
|
5fdd49582b | ||
|
|
e763e67c61 | ||
|
|
9962534193 | ||
|
|
dd1f6a7b9e | ||
|
|
7eb86458cc | ||
|
|
d3de651360 | ||
|
|
637a09cfa9 | ||
|
|
499648c90e | ||
|
|
896c0a23de | ||
|
|
50e1a727d4 | ||
|
|
af80841751 | ||
|
|
4bbe3f3b56 | ||
|
|
57293a2ecf | ||
|
|
98cdcae01f | ||
|
|
927ad037a2 | ||
|
|
8a672152f8 | ||
|
|
1883a40dcf | ||
|
|
8b63f468b4 | ||
|
|
bfc6fe5ae1 | ||
|
|
45e8c51751 | ||
|
|
353476b88c | ||
|
|
db2f438279 | ||
|
|
739a1c262d | ||
|
|
88f620c44d | ||
|
|
aec1a93e16 | ||
|
|
ed96bf80e7 | ||
|
|
4a9011a727 | ||
|
|
8e99b826fa | ||
|
|
c5615001c8 | ||
|
|
b376ab792a | ||
|
|
0ca6619a80 | ||
|
|
a691f28f30 | ||
|
|
32f0636d46 | ||
|
|
4c013a4f73 | ||
|
|
a69a436159 | ||
|
|
8ba8524250 | ||
|
|
bb74a620ba | ||
|
|
ff8ded2704 | ||
|
|
fa8b909408 | ||
|
|
433f588747 | ||
|
|
35c1f02392 | ||
|
|
1a7bcc10bd | ||
|
|
4008d1f30d | ||
|
|
27e07c6a80 | ||
|
|
587858abe3 | ||
|
|
0adc70d510 | ||
|
|
4e1ec5e98e | ||
|
|
7d0724b9bf | ||
|
|
0bbb8b7c06 | ||
|
|
19d7e347e4 | ||
|
|
9369590f57 | ||
|
|
16af81344c | ||
|
|
6fc05bc616 | ||
|
|
b84d5554c2 | ||
|
|
583f057de6 | ||
|
|
232d228e52 | ||
|
|
92ea278242 | ||
|
|
534f7d13d3 |
31
README.md
@@ -13,16 +13,17 @@
|
|||||||
|
|
||||||
若依是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。
|
若依是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。
|
||||||
|
|
||||||
* 前端采用Vue、Element UI。
|
* 本仓库为RuoYi-Vue的Spring Boot 3 的版本,保持同步更新。
|
||||||
|
* 前端采用Vue、Element(提供 Vue2/Vue3/TS 多版本)。
|
||||||
* 后端采用Spring Boot、Spring Security、Redis & Jwt。
|
* 后端采用Spring Boot、Spring Security、Redis & Jwt。
|
||||||
* 权限认证使用Jwt,支持多终端认证系统。
|
* 基于Jwt的Token认证,支持多终端(Web、App、小程序)无缝接入。
|
||||||
* 支持加载动态权限菜单,多方式轻松权限控制。
|
* 支持加载动态权限菜单,多方式轻松权限控制,细粒度到按钮级别。
|
||||||
* 高效率开发,使用代码生成器可以一键生成前后端代码。
|
* 内置强大代码生成器,一键生成前后端代码(java、vue、xml、sql),支持 CRUD 下载。
|
||||||
* 阿里云折扣场:[点我进入](http://aly.ruoyi.vip),腾讯云秒杀场:[点我进入](http://txy.ruoyi.vip)
|
* 阿里云折扣场:[点我进入](http://aly.ruoyi.vip),腾讯云秒杀场:[点我进入](http://txy.ruoyi.vip)
|
||||||
|
|
||||||
# 版本分支
|
# 版本分支
|
||||||
|
|
||||||
RuoYi-Vue 后端项目提供 Spring Boot 2.x / 3.x / 4.x 多版本分支的并行维护。
|
RuoYi-Vue 后端项目提供 Spring Boot 2.x / 3.x / 4.x 多版本分支的并行维护
|
||||||
|
|
||||||
| 名称 | 说明 | 地址 |
|
| 名称 | 说明 | 地址 |
|
||||||
| :---------------- | :------------------------ | :------------------------------------------------------ |
|
| :---------------- | :------------------------ | :------------------------------------------------------ |
|
||||||
@@ -30,18 +31,18 @@ RuoYi-Vue 后端项目提供 Spring Boot 2.x / 3.x / 4.x 多版本分支的并
|
|||||||
| springboot3 分支 | Spring Boot 3.x (JDK 17+) | https://gitee.com/y_project/RuoYi-Vue/tree/springboot3 |
|
| springboot3 分支 | Spring Boot 3.x (JDK 17+) | https://gitee.com/y_project/RuoYi-Vue/tree/springboot3 |
|
||||||
| springboot2 分支 | Spring Boot 2.x (JDK 8+) | https://gitee.com/y_project/RuoYi-Vue/tree/springboot2 |
|
| springboot2 分支 | Spring Boot 2.x (JDK 8+) | https://gitee.com/y_project/RuoYi-Vue/tree/springboot2 |
|
||||||
|
|
||||||
RuoYi-Vue 前端项目提供 Vue 2.x / 3.x / JavaScript TypeScript 版本均可混用搭配
|
RuoYi-Vue 前端项目提供 Vue 2.x / 3.x / JavaScript / TypeScript 版本,均可混用搭配
|
||||||
|
|
||||||
| 项目名称 | **RuoYi-Vue** | **RuoYi-Vue3** | **RuoYi-Vue3-TypeScript** |
|
| 项目名称 | **RuoYi-Vue2** | **RuoYi-Vue3** | **RuoYi-Vue3-TypeScript** |
|
||||||
| :--- | :--- | :--- | :--- |
|
| :--- | :--- | :--- | :--- |
|
||||||
| **前端框架** | Vue 2 | Vue 3 | Vue 3 |
|
| **前端框架** | Vue 2 | Vue 3 | Vue 3 |
|
||||||
| **脚本语言** | JavaScript | JavaScript | TypeScript |
|
| **脚本语言** | JavaScript | JavaScript | TypeScript |
|
||||||
| **构建工具** | Vue CLI | Vite | Vite |
|
| **构建工具** | Vue CLI | Vite | Vite |
|
||||||
| **UI 组件库** | Element UI | Element Plus | Element Plus |
|
| **UI 组件库** | Element UI | Element Plus | Element Plus |
|
||||||
| **状态管理** | Vuex | Pinia | Pinia |
|
| **状态管理** | Vuex | Pinia | Pinia |
|
||||||
| **路由管理** | Vue Router 3 | Vue Router 4 | Vue Router 4 |
|
| **路由管理** | Vue Router 3 | Vue Router 4 | Vue Router 4 |
|
||||||
| **核心特点** | 1. 技术栈经典稳定<br>2. 社区资料丰富<br>3. 当前维护重心已转移 | 1. 现代前端技术栈<br>2. 开发体验与性能更优<br>3. 官方主推的活跃版本 | 1. 类型加持,减少沟通成本<br>2. 开发时有提示,效率更高<br>3. 多人协作企业级开发项目 |
|
| **核心特点** | 1. 技术栈经典稳定<br>2. 社区资料丰富<br>3. 当前维护重心已转移 | 1. 现代前端技术栈<br>2. 开发体验与性能更优<br>3. 官方主推的活跃版本 | 1. 类型加持,减少沟通成本<br>2. 开发时有提示,效率更高<br>3. 多人协作企业级开发项目 |
|
||||||
| **仓库地址** | [RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue) | [RuoYi-Vue3](https://gitcode.com/yangzongzhuan/RuoYi-Vue3) | [RuoYi-Vue3-TypeScript](https://gitcode.com/yangzongzhuan/RuoYi-Vue3/tree/typescript) |
|
| **仓库地址** | [RuoYi-Vue2](https://gitcode.com/yangzongzhuan/RuoYi-Vue2) | [RuoYi-Vue3](https://gitcode.com/yangzongzhuan/RuoYi-Vue3) | [RuoYi-Vue3-TypeScript](https://gitcode.com/yangzongzhuan/RuoYi-Vue3/tree/typescript) |
|
||||||
|
|
||||||
## 内置功能
|
## 内置功能
|
||||||
|
|
||||||
|
|||||||
18
pom.xml
@@ -17,27 +17,27 @@
|
|||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<java.version>17</java.version>
|
<java.version>17</java.version>
|
||||||
<spring-boot.version>4.0.3</spring-boot.version>
|
<spring-boot.version>3.5.16</spring-boot.version>
|
||||||
<mybatis-spring-boot.version>4.0.1</mybatis-spring-boot.version>
|
<mybatis-spring-boot.version>3.0.5</mybatis-spring-boot.version>
|
||||||
<druid.version>1.2.28</druid.version>
|
<druid.version>1.2.28</druid.version>
|
||||||
<yauaa.version>8.1.0</yauaa.version>
|
<yauaa.version>8.2.0</yauaa.version>
|
||||||
<kaptcha.version>2.3.3</kaptcha.version>
|
<kaptcha.version>2.3.3</kaptcha.version>
|
||||||
<pagehelper.boot.version>2.1.1</pagehelper.boot.version>
|
<pagehelper.boot.version>2.1.1</pagehelper.boot.version>
|
||||||
<fastjson.version>2.0.61</fastjson.version>
|
<fastjson.version>2.0.64</fastjson.version>
|
||||||
<oshi.version>6.10.0</oshi.version>
|
<oshi.version>7.4.4</oshi.version>
|
||||||
<commons.io.version>2.21.0</commons.io.version>
|
<commons.io.version>2.22.0</commons.io.version>
|
||||||
<poi.version>4.1.2</poi.version>
|
<poi.version>4.1.2</poi.version>
|
||||||
<velocity.version>2.3</velocity.version>
|
<velocity.version>2.3</velocity.version>
|
||||||
<jwt.version>0.9.1</jwt.version>
|
<jwt.version>0.9.1</jwt.version>
|
||||||
<jaxb-api.version>2.3.1</jaxb-api.version>
|
<jaxb-api.version>2.3.1</jaxb-api.version>
|
||||||
<springdoc.version>3.0.2</springdoc.version>
|
<springdoc.version>2.9.0</springdoc.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- 依赖声明 -->
|
<!-- 依赖声明 -->
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<!-- SpringBoot的依赖配置-->
|
<!-- SpringBoot的依赖配置 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-dependencies</artifactId>
|
<artifactId>spring-boot-dependencies</artifactId>
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
<!-- 阿里数据库连接池 -->
|
<!-- 阿里数据库连接池 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>druid-spring-boot-4-starter</artifactId>
|
<artifactId>druid-spring-boot-3-starter</artifactId>
|
||||||
<version>${druid.version}</version>
|
<version>${druid.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package com.ruoyi;
|
|||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration;
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启动程序
|
* 启动程序
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ public class SysLoginController
|
|||||||
ajax.put("user", user);
|
ajax.put("user", user);
|
||||||
ajax.put("roles", roles);
|
ajax.put("roles", roles);
|
||||||
ajax.put("permissions", permissions);
|
ajax.put("permissions", permissions);
|
||||||
|
ajax.put("pwdChrtype", getSysAccountChrtype());
|
||||||
ajax.put("isDefaultModifyPwd", initPasswordIsModify(user.getPwdUpdateDate()));
|
ajax.put("isDefaultModifyPwd", initPasswordIsModify(user.getPwdUpdateDate()));
|
||||||
ajax.put("isPasswordExpired", passwordIsExpiration(user.getPwdUpdateDate()));
|
ajax.put("isPasswordExpired", passwordIsExpiration(user.getPwdUpdateDate()));
|
||||||
return ajax;
|
return ajax;
|
||||||
@@ -105,6 +106,12 @@ public class SysLoginController
|
|||||||
return AjaxResult.success(menuService.buildMenus(menus));
|
return AjaxResult.success(menuService.buildMenus(menus));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取用户密码自定义配置规则
|
||||||
|
public String getSysAccountChrtype()
|
||||||
|
{
|
||||||
|
return Convert.toStr(configService.selectConfigByKey("sys.account.chrtype"), "0");
|
||||||
|
}
|
||||||
|
|
||||||
// 检查初始密码是否提醒修改
|
// 检查初始密码是否提醒修改
|
||||||
public boolean initPasswordIsModify(Date pwdUpdateDate)
|
public boolean initPasswordIsModify(Date pwdUpdateDate)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ public class SysNoticeController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 根据通知公告编号获取详细信息
|
* 根据通知公告编号获取详细信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:notice:query')")
|
|
||||||
@GetMapping(value = "/{noticeId}")
|
@GetMapping(value = "/{noticeId}")
|
||||||
public AjaxResult getInfo(@PathVariable Long noticeId)
|
public AjaxResult getInfo(@PathVariable Long noticeId)
|
||||||
{
|
{
|
||||||
@@ -124,6 +123,19 @@ public class SysNoticeController extends BaseController
|
|||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已读用户列表数据
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:notice:list')")
|
||||||
|
@GetMapping("/readUsers/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo readUsersList(Long noticeId, String searchValue)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<?> list = noticeReadService.selectReadUsersByNoticeId(noticeId, searchValue);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除通知公告
|
* 删除通知公告
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -19,10 +19,8 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
|||||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.framework.web.service.SysPermissionService;
|
import com.ruoyi.framework.web.service.SysPermissionService;
|
||||||
import com.ruoyi.framework.web.service.TokenService;
|
import com.ruoyi.framework.web.service.TokenService;
|
||||||
@@ -128,14 +126,8 @@ public class SysRoleController extends BaseController
|
|||||||
|
|
||||||
if (roleService.updateRole(role) > 0)
|
if (roleService.updateRole(role) > 0)
|
||||||
{
|
{
|
||||||
// 更新缓存用户权限
|
// 刷新所有持有该角色的在线用户权限
|
||||||
LoginUser loginUser = getLoginUser();
|
tokenService.refreshPermissionByRoleId(role.getRoleId(), permissionService);
|
||||||
if (StringUtils.isNotNull(loginUser.getUser()) && !loginUser.getUser().isAdmin())
|
|
||||||
{
|
|
||||||
loginUser.setUser(userService.selectUserByUserName(loginUser.getUser().getUserName()));
|
|
||||||
loginUser.setPermissions(permissionService.getMenuPermission(loginUser.getUser()));
|
|
||||||
tokenService.setLoginUser(loginUser);
|
|
||||||
}
|
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
return error("修改角色'" + role.getRoleName() + "'失败,请联系管理员");
|
return error("修改角色'" + role.getRoleName() + "'失败,请联系管理员");
|
||||||
|
|||||||
@@ -60,9 +60,6 @@ spring:
|
|||||||
max-file-size: 10MB
|
max-file-size: 10MB
|
||||||
# 设置总上传的文件大小
|
# 设置总上传的文件大小
|
||||||
max-request-size: 20MB
|
max-request-size: 20MB
|
||||||
jackson:
|
|
||||||
time-zone: GMT+8
|
|
||||||
date-format: yyyy-MM-dd HH:mm:ss
|
|
||||||
# 服务模块
|
# 服务模块
|
||||||
devtools:
|
devtools:
|
||||||
restart:
|
restart:
|
||||||
|
|||||||
@@ -95,11 +95,6 @@
|
|||||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-cache</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- pool 对象池 -->
|
<!-- pool 对象池 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
|
|||||||
@@ -16,15 +16,25 @@ import java.lang.annotation.Target;
|
|||||||
@Documented
|
@Documented
|
||||||
public @interface DataScope
|
public @interface DataScope
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* 用户表的别名
|
||||||
|
*/
|
||||||
|
public String userAlias() default "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门表的别名
|
* 部门表的别名
|
||||||
*/
|
*/
|
||||||
public String deptAlias() default "";
|
public String deptAlias() default "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户表的别名
|
* 用户字段名
|
||||||
*/
|
*/
|
||||||
public String userAlias() default "";
|
public String userField() default "user_id";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门字段名
|
||||||
|
*/
|
||||||
|
public String deptField() default "dept_id";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 权限字符(用于多个角色匹配符合要求的权限)默认根据权限注解@ss获取,多个权限用逗号分隔开来
|
* 权限字符(用于多个角色匹配符合要求的权限)默认根据权限注解@ss获取,多个权限用逗号分隔开来
|
||||||
|
|||||||
@@ -170,4 +170,35 @@ public class Constants
|
|||||||
*/
|
*/
|
||||||
public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
|
public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
|
||||||
"org.springframework", "org.apache", "com.ruoyi.common.utils.file", "com.ruoyi.common.config", "com.ruoyi.generator" };
|
"org.springframework", "org.apache", "com.ruoyi.common.utils.file", "com.ruoyi.common.config", "com.ruoyi.generator" };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门相关常量
|
||||||
|
*/
|
||||||
|
public static class Dept
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 全部数据权限
|
||||||
|
*/
|
||||||
|
public static final String DATA_SCOPE_ALL = "1";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自定数据权限
|
||||||
|
*/
|
||||||
|
public static final String DATA_SCOPE_CUSTOM = "2";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门数据权限
|
||||||
|
*/
|
||||||
|
public static final String DATA_SCOPE_DEPT = "3";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门及以下数据权限
|
||||||
|
*/
|
||||||
|
public static final String DATA_SCOPE_DEPT_AND_CHILD = "4";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仅本人数据权限
|
||||||
|
*/
|
||||||
|
public static final String DATA_SCOPE_SELF = "5";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,9 @@ public class GenConstants
|
|||||||
/** 上级菜单名称字段 */
|
/** 上级菜单名称字段 */
|
||||||
public static final String PARENT_MENU_NAME = "parentMenuName";
|
public static final String PARENT_MENU_NAME = "parentMenuName";
|
||||||
|
|
||||||
|
/** 生成详情页开关 */
|
||||||
|
public static final String GEN_VIEW = "genView";
|
||||||
|
|
||||||
/** 数据库字符串类型 */
|
/** 数据库字符串类型 */
|
||||||
public static final String[] COLUMNTYPE_STR = { "char", "varchar", "nvarchar", "varchar2" };
|
public static final String[] COLUMNTYPE_STR = { "char", "varchar", "nvarchar", "varchar2" };
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import java.util.List;
|
|||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
import com.ruoyi.common.annotation.Excel.ColumnType;
|
import com.ruoyi.common.annotation.Excel.ColumnType;
|
||||||
@@ -69,6 +70,7 @@ public class SysUser extends BaseEntity
|
|||||||
private String loginIp;
|
private String loginIp;
|
||||||
|
|
||||||
/** 最后登录时间 */
|
/** 最后登录时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT)
|
@Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT)
|
||||||
private Date loginDate;
|
private Date loginDate;
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,11 @@
|
|||||||
package com.ruoyi.common.core.domain.model;
|
package com.ruoyi.common.core.domain.model;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import org.springframework.security.core.GrantedAuthority;
|
|
||||||
import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
|
||||||
import org.springframework.security.core.userdetails.UserDetails;
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONField;
|
import com.alibaba.fastjson2.annotation.JSONField;
|
||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
|
import org.springframework.security.core.GrantedAuthority;
|
||||||
|
import org.springframework.security.core.userdetails.UserDetails;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录用户身份权限
|
* 登录用户身份权限
|
||||||
@@ -263,16 +259,8 @@ public class LoginUser implements UserDetails
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@JSONField(serialize = false)
|
|
||||||
public Collection<? extends GrantedAuthority> getAuthorities()
|
public Collection<? extends GrantedAuthority> getAuthorities()
|
||||||
{
|
{
|
||||||
if (permissions == null || permissions.isEmpty())
|
return null;
|
||||||
{
|
|
||||||
return Collections.emptyList();
|
|
||||||
}
|
|
||||||
return permissions.stream()
|
|
||||||
.filter(Objects::nonNull)
|
|
||||||
.map(SimpleGrantedAuthority::new)
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package com.ruoyi.common.enums;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.jspecify.annotations.Nullable;
|
import org.springframework.lang.Nullable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求方式
|
* 请求方式
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import java.util.HashSet;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import org.apache.commons.lang3.Strings;
|
|
||||||
import org.springframework.util.AntPathMatcher;
|
import org.springframework.util.AntPathMatcher;
|
||||||
import com.ruoyi.common.constant.Constants;
|
import com.ruoyi.common.constant.Constants;
|
||||||
import com.ruoyi.common.core.text.StrFormatter;
|
import com.ruoyi.common.core.text.StrFormatter;
|
||||||
@@ -434,24 +433,12 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 检查子字符串是否存在
|
|
||||||
*
|
|
||||||
* @param seq 检查的字符串
|
|
||||||
* @param searchSeq 查找的字符串
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public static boolean contains(final CharSequence seq, final CharSequence searchSeq)
|
|
||||||
{
|
|
||||||
return Strings.CS.contains(seq, searchSeq);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断给定的collection列表中是否包含数组array 判断给定的数组array中是否包含给定的元素value
|
* 判断给定的collection列表中是否包含数组array 判断给定的数组array中是否包含给定的元素value
|
||||||
*
|
*
|
||||||
* @param collection 给定的集合
|
* @param collection 给定的集合
|
||||||
* @param array 给定的数组
|
* @param array 给定的数组
|
||||||
* @return 结果
|
* @return boolean 结果
|
||||||
*/
|
*/
|
||||||
public static boolean containsAny(Collection<String> collection, String... array)
|
public static boolean containsAny(Collection<String> collection, String... array)
|
||||||
{
|
{
|
||||||
@@ -472,18 +459,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 判断是否包含给定数组中的任意一个。
|
|
||||||
*
|
|
||||||
* @param cs 要判断的字符串
|
|
||||||
* @param searchCharSequences 要判断的数组
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public static boolean containsAny(final CharSequence cs, final CharSequence... searchCharSequences)
|
|
||||||
{
|
|
||||||
return Strings.CS.containsAny(cs, searchCharSequences);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查找指定字符串是否包含指定字符串列表中的任意一个字符串同时串忽略大小写
|
* 查找指定字符串是否包含指定字符串列表中的任意一个字符串同时串忽略大小写
|
||||||
*
|
*
|
||||||
@@ -507,163 +482,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 检查是否包含要搜索的字符串,忽略大小写
|
|
||||||
*
|
|
||||||
* @param str 要检查的字符串
|
|
||||||
* @param searchStr 要查找的字符串
|
|
||||||
* @return 如果包含要搜索的字符串(忽略大小写)则返回true,如果不包含或返回false
|
|
||||||
*/
|
|
||||||
public static boolean containsIgnoreCase(final CharSequence str, final CharSequence searchStr)
|
|
||||||
{
|
|
||||||
return Strings.CI.contains(str, searchStr);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 检查字符串是否以任意前缀开始
|
|
||||||
*
|
|
||||||
* @param sequence 要检查的字符串
|
|
||||||
* @param searchStrings 区分大小写的字符串前缀数组
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public static boolean startsWithAny(final CharSequence sequence, final CharSequence... searchStrings)
|
|
||||||
{
|
|
||||||
return Strings.CS.startsWithAny(sequence, searchStrings);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 不区分大小写地检查一个字符串是否以指定前缀开头。
|
|
||||||
*
|
|
||||||
* @param str 待检查的字符串
|
|
||||||
* @param 要查找的前缀
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public static boolean startsWithIgnoreCase(final CharSequence str, final CharSequence prefix)
|
|
||||||
{
|
|
||||||
return Strings.CI.startsWith(str, prefix);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 比较两个字符串是否相同
|
|
||||||
*
|
|
||||||
* @param cs1 第一个字符串
|
|
||||||
* @param cs2 第二个字符串
|
|
||||||
* @return 如果给定对象与字符串相等,则返回 true;否则返回 false
|
|
||||||
*/
|
|
||||||
public static boolean equals(final CharSequence cs1, final CharSequence cs2)
|
|
||||||
{
|
|
||||||
return Strings.CS.equals(cs1, cs2);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 替换字符串中所有匹配的字符
|
|
||||||
*
|
|
||||||
* @param text 要搜索和替换的文本
|
|
||||||
* @param searchString 要搜索的字符串
|
|
||||||
* @param replacement 用于替换的字符串
|
|
||||||
* @return 处理完所有替换后的文本
|
|
||||||
*/
|
|
||||||
public static String replace(final String text, final String searchString, final String replacement)
|
|
||||||
{
|
|
||||||
return Strings.CS.replace(text, searchString, replacement);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 仅当子字符串位于源字符串末尾时才将其移除,否则返回源字符串。
|
|
||||||
* @param str 要搜索的源字符串
|
|
||||||
* @param remove 要搜索并移除的字符串
|
|
||||||
* @return 如果找到并移除了字符串,则返回移除后的子字符串
|
|
||||||
*/
|
|
||||||
public static String removeEnd(final String str, final String remove)
|
|
||||||
{
|
|
||||||
return Strings.CS.removeEnd(str, remove);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查找字符串首次出现位置的索引
|
|
||||||
*
|
|
||||||
* @param seq 要检查的字符串
|
|
||||||
* @param searchSeq 要查找的字符串
|
|
||||||
* @return 返回指定字符在字符串中第一次出现处的索引,如果此字符串中没有这样的字符,则返回 -1
|
|
||||||
*/
|
|
||||||
public static int indexOf(final CharSequence seq, final CharSequence searchSeq)
|
|
||||||
{
|
|
||||||
return Strings.CS.indexOf(seq, searchSeq);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 检查字符串是否以指定的后缀结尾
|
|
||||||
*
|
|
||||||
* @param str 要检查的字符
|
|
||||||
* @param suffix 要检查的后缀
|
|
||||||
* @return 若参数与该字符串末尾相符 true;否则 false
|
|
||||||
*/
|
|
||||||
public static boolean endsWith(final CharSequence str, final CharSequence suffix)
|
|
||||||
{
|
|
||||||
return Strings.CS.endsWith(str, suffix);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 将给定的字符串与数组进行比较
|
|
||||||
*
|
|
||||||
* @param string 要比较的字符串
|
|
||||||
* @param searchStrings 字符串数组
|
|
||||||
* @return 如果字符串等于(区分大小写){@code searchStrings}中的任意其他元素,则返回true;如果{@code searchStrings}为null或不包含匹配项,则返回false
|
|
||||||
*/
|
|
||||||
public static boolean equalsAny(final CharSequence string, final CharSequence... searchStrings)
|
|
||||||
{
|
|
||||||
return Strings.CS.equalsAny(string, searchStrings);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 检查一个字符串是否以任意提供的区分大小写的后缀结尾。
|
|
||||||
*
|
|
||||||
* @param sequence 要检查的字符串
|
|
||||||
* @param searchStrings 要查找的区分大小写的字符串数组
|
|
||||||
* @return 如果输入参数{@code sequence}为null且未提供任何{@code searchStrings},或者输入{@code sequence}以任意提供的区分大小写的{@code searchStrings}结尾,则返回{@code true}。
|
|
||||||
*/
|
|
||||||
public static boolean endsWithAny(final CharSequence sequence, final CharSequence... searchStrings)
|
|
||||||
{
|
|
||||||
return Strings.CS.endsWithAny(sequence, searchStrings);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 不区分大小写地检查字符序列是否以指定的后缀结尾
|
|
||||||
*
|
|
||||||
* @param str 要检查的字符序列
|
|
||||||
* @param suffix 要查找的后缀
|
|
||||||
* @return 如果字符序列以该后缀结尾(不区分大小写),或两者均为{@code null},则返回{@code true}
|
|
||||||
*/
|
|
||||||
public static boolean endsWithIgnoreCase(final CharSequence str, final CharSequence suffix)
|
|
||||||
{
|
|
||||||
return Strings.CI.endsWith(str, suffix);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 指定范围内查找字符串,忽略大小写
|
|
||||||
*
|
|
||||||
* @param str 要检查的字符串
|
|
||||||
* @param searchStr 要查找的字符串
|
|
||||||
* @return 搜索字符串的第一个索引,如果未找到匹配项则返回 -1
|
|
||||||
*/
|
|
||||||
public static int indexOfIgnoreCase(final CharSequence str, final CharSequence searchStr)
|
|
||||||
{
|
|
||||||
return Strings.CI.indexOf(str, searchStr);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Compares given {@code string} to a CharSequences vararg of {@code searchStrings},
|
|
||||||
* returning {@code true} if the {@code string} is equal to any of the {@code searchStrings}, ignoring case.
|
|
||||||
*
|
|
||||||
* @param string to compare, may be {@code null}.
|
|
||||||
* @param searchStrings a vararg of strings, may be {@code null}.
|
|
||||||
* @return {@code true} if the string is equal (case-insensitive) to any other element of {@code searchStrings};
|
|
||||||
*/
|
|
||||||
public static boolean equalsAnyIgnoreCase(final CharSequence string, final CharSequence... searchStrings)
|
|
||||||
{
|
|
||||||
return Strings.CI.equalsAny(string, searchStrings);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 驼峰转下划线命名
|
* 驼峰转下划线命名
|
||||||
*/
|
*/
|
||||||
@@ -735,22 +553,6 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除最后一个字符串
|
|
||||||
*
|
|
||||||
* @param str 输入字符串
|
|
||||||
* @param spit 以什么类型结尾的
|
|
||||||
* @return 截取后的字符串
|
|
||||||
*/
|
|
||||||
public static String lastStringDel(String str, String spit)
|
|
||||||
{
|
|
||||||
if (!StringUtils.isEmpty(str) && str.endsWith(spit))
|
|
||||||
{
|
|
||||||
return str.subSequence(0, str.length() - 1).toString();
|
|
||||||
}
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 将下划线大写方式命名的字符串转换为驼峰式。如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。 例如:HELLO_WORLD->HelloWorld
|
* 将下划线大写方式命名的字符串转换为驼峰式。如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。 例如:HELLO_WORLD->HelloWorld
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class MimeTypeUtils
|
|||||||
// 图片
|
// 图片
|
||||||
"bmp", "gif", "jpg", "jpeg", "png",
|
"bmp", "gif", "jpg", "jpeg", "png",
|
||||||
// word excel powerpoint
|
// word excel powerpoint
|
||||||
"doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt",
|
"doc", "docx", "xls", "xlsx", "ppt", "pptx", "txt",
|
||||||
// 压缩文件
|
// 压缩文件
|
||||||
"rar", "zip", "gz", "bz2",
|
"rar", "zip", "gz", "bz2",
|
||||||
// 视频格式
|
// 视频格式
|
||||||
|
|||||||
@@ -0,0 +1,85 @@
|
|||||||
|
package com.ruoyi.common.utils.poi;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多 Sheet 导出时的数据信息
|
||||||
|
*
|
||||||
|
* 使用示例:
|
||||||
|
* <pre>
|
||||||
|
* List<ExcelSheet<?>> sheets = new ArrayList<>();
|
||||||
|
* sheets.add(new ExcelSheet<>("参数数据", configList, Config.class, "参数信息"));
|
||||||
|
* sheets.add(new ExcelSheet<>("岗位数据", postList, Post.class, "岗位信息"));
|
||||||
|
* return ExcelUtil.exportMultiSheet(sheets);
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
public class ExcelSheet<T>
|
||||||
|
{
|
||||||
|
/** Sheet 名称 */
|
||||||
|
private String sheetName;
|
||||||
|
|
||||||
|
/** 导出数据集合 */
|
||||||
|
private List<T> list;
|
||||||
|
|
||||||
|
/** 数据对应的实体 Class */
|
||||||
|
private Class<T> clazz;
|
||||||
|
|
||||||
|
/** Sheet 顶部大标题(可为空) */
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
public ExcelSheet(String sheetName, List<T> list, Class<T> clazz)
|
||||||
|
{
|
||||||
|
this(sheetName, list, clazz, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
public ExcelSheet(String sheetName, List<T> list, Class<T> clazz, String title)
|
||||||
|
{
|
||||||
|
this.sheetName = sheetName;
|
||||||
|
this.list = list != null ? list : new ArrayList<>();
|
||||||
|
this.clazz = clazz;
|
||||||
|
this.title = title != null ? title : "";
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSheetName()
|
||||||
|
{
|
||||||
|
return sheetName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<T> getList()
|
||||||
|
{
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Class<T> getClazz()
|
||||||
|
{
|
||||||
|
return clazz;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle()
|
||||||
|
{
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSheetName(String sheetName)
|
||||||
|
{
|
||||||
|
this.sheetName = sheetName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setList(List<T> list)
|
||||||
|
{
|
||||||
|
this.list = list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClazz(Class<T> clazz)
|
||||||
|
{
|
||||||
|
this.clazz = clazz;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title)
|
||||||
|
{
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -585,6 +585,117 @@ public class ExcelUtil<T>
|
|||||||
exportExcel(response);
|
exportExcel(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多 Sheet 导出 —— 将多个不同类型的数据集合写入同一 Excel,直接输出到 HttpServletResponse
|
||||||
|
*
|
||||||
|
* @param response HTTP 响应
|
||||||
|
* @param sheets Sheet 描述列表
|
||||||
|
*/
|
||||||
|
public static void exportMultiSheet(HttpServletResponse response, List<ExcelSheet<?>> sheets)
|
||||||
|
{
|
||||||
|
if (sheets == null || sheets.isEmpty())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
SXSSFWorkbook wb = buildWorkbook(sheets);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||||
|
response.setCharacterEncoding("utf-8");
|
||||||
|
wb.write(response.getOutputStream());
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
log.error("多Sheet导出Excel异常{}", e.getMessage());
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
IOUtils.closeQuietly(wb);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多 Sheet 导出 —— 将多个不同类型的数据集合写入同一 Excel,生成文件并返回下载地址
|
||||||
|
*
|
||||||
|
* @param sheets Sheet 描述列表
|
||||||
|
* @return AjaxResult(含文件下载地址)
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
|
public static AjaxResult exportMultiSheet(List<ExcelSheet<?>> sheets)
|
||||||
|
{
|
||||||
|
if (sheets == null || sheets.isEmpty())
|
||||||
|
{
|
||||||
|
return AjaxResult.error("导出数据不能为空");
|
||||||
|
}
|
||||||
|
SXSSFWorkbook wb = buildWorkbook(sheets);
|
||||||
|
OutputStream out = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ExcelUtil firstUtil = new ExcelUtil(sheets.get(0).getClazz());
|
||||||
|
String filename = firstUtil.encodingFilename(sheets.get(0).getSheetName());
|
||||||
|
out = new FileOutputStream(firstUtil.getAbsoluteFile(filename));
|
||||||
|
wb.write(out);
|
||||||
|
return AjaxResult.success(filename);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
log.error("多Sheet导出Excel异常{}", e.getMessage());
|
||||||
|
throw new UtilException("导出Excel失败,请联系网站管理员!");
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
IOUtils.closeQuietly(wb);
|
||||||
|
IOUtils.closeQuietly(out);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建多 Sheet Workbook —— 创建 SXSSFWorkbook 并将所有 Sheet 数据写入
|
||||||
|
*
|
||||||
|
* @param sheets Sheet 描述列表
|
||||||
|
* @return 已写入所有 Sheet 数据的 SXSSFWorkbook
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||||
|
private static SXSSFWorkbook buildWorkbook(List<ExcelSheet<?>> sheets)
|
||||||
|
{
|
||||||
|
SXSSFWorkbook wb = new SXSSFWorkbook(500);
|
||||||
|
for (ExcelSheet<?> excelSheet : sheets)
|
||||||
|
{
|
||||||
|
ExcelUtil util = new ExcelUtil(excelSheet.getClazz());
|
||||||
|
util.initWithWorkbook(wb, excelSheet.getList(), excelSheet.getSheetName(), excelSheet.getTitle());
|
||||||
|
util.writeSheet();
|
||||||
|
}
|
||||||
|
return wb;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 使用外部传入的 Workbook 初始化(多 Sheet 导出专用)
|
||||||
|
* 与 init() 的区别:不新建 Workbook,而是在已有 wb 上追加新 Sheet
|
||||||
|
*
|
||||||
|
* @param wb 已有工作簿
|
||||||
|
* @param list 数据集合
|
||||||
|
* @param sheetName Sheet 名称
|
||||||
|
* @param title 大标题(可为空)
|
||||||
|
*/
|
||||||
|
public void initWithWorkbook(SXSSFWorkbook wb, List<T> list, String sheetName, String title)
|
||||||
|
{
|
||||||
|
if (list == null)
|
||||||
|
{
|
||||||
|
list = new ArrayList<T>();
|
||||||
|
}
|
||||||
|
this.list = list;
|
||||||
|
this.sheetName = sheetName;
|
||||||
|
this.title = title != null ? title : "";
|
||||||
|
this.type = Type.EXPORT;
|
||||||
|
this.rownum = 0;
|
||||||
|
this.wb = wb;
|
||||||
|
this.sheet = wb.createSheet(sheetName);
|
||||||
|
createExcelField();
|
||||||
|
this.styles = createStyles(wb);
|
||||||
|
createTitle();
|
||||||
|
createSubHead();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 对list数据源将其里面的数据导入到excel表单
|
* 对list数据源将其里面的数据导入到excel表单
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -7,13 +7,13 @@ import java.lang.reflect.Modifier;
|
|||||||
import java.lang.reflect.ParameterizedType;
|
import java.lang.reflect.ParameterizedType;
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.Validate;
|
import org.apache.commons.lang3.Validate;
|
||||||
import org.apache.poi.ss.usermodel.DateUtil;
|
import org.apache.poi.ss.usermodel.DateUtil;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import com.ruoyi.common.core.text.Convert;
|
import com.ruoyi.common.core.text.Convert;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 反射工具类. 提供调用getter/setter方法, 访问私有变量, 调用私有方法, 获取泛型类型Class, 被AOP过的真实类等工具函数.
|
* 反射工具类. 提供调用getter/setter方法, 访问私有变量, 调用私有方法, 获取泛型类型Class, 被AOP过的真实类等工具函数.
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public class SqlUtil
|
|||||||
/**
|
/**
|
||||||
* 定义常用的 sql关键字
|
* 定义常用的 sql关键字
|
||||||
*/
|
*/
|
||||||
public static String SQL_REGEX = "\u000B|and |extractvalue|updatexml|sleep|information_schema|exec |insert |select |delete |update |drop |count |chr |mid |master |truncate |char |declare |or |union |like |+|/*|user()";
|
public static String SQL_REGEX = "\u000B|%0A|and |extractvalue|updatexml|sleep|information_schema|exec |insert |select |delete |update |drop |count |chr |mid |master |truncate |char |declare |or |union |like |+|/*|user()";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 仅支持字母、数字、下划线、空格、逗号、小数点(支持多个字段排序)
|
* 仅支持字母、数字、下划线、空格、逗号、小数点(支持多个字段排序)
|
||||||
@@ -58,12 +58,13 @@ public class SqlUtil
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
String normalizedValue = value.replaceAll("\\p{Z}|\\s", "");
|
||||||
String[] sqlKeywords = StringUtils.split(SQL_REGEX, "\\|");
|
String[] sqlKeywords = StringUtils.split(SQL_REGEX, "\\|");
|
||||||
for (String sqlKeyword : sqlKeywords)
|
for (String sqlKeyword : sqlKeywords)
|
||||||
{
|
{
|
||||||
if (StringUtils.indexOfIgnoreCase(value, sqlKeyword) > -1)
|
if (StringUtils.indexOfIgnoreCase(normalizedValue, sqlKeyword) > -1)
|
||||||
{
|
{
|
||||||
throw new UtilException("参数存在SQL注入风险");
|
throw new UtilException("请求参数包含敏感关键词'" + sqlKeyword + "',可能存在安全风险");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,19 +20,19 @@
|
|||||||
<!-- SpringBoot Web容器 -->
|
<!-- SpringBoot Web容器 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-webmvc</artifactId>
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- SpringBoot 拦截器 -->
|
<!-- SpringBoot 拦截器 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-aspectj</artifactId>
|
<artifactId>spring-boot-starter-aop</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 阿里数据库连接池 -->
|
<!-- 阿里数据库连接池 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>druid-spring-boot-4-starter</artifactId>
|
<artifactId>druid-spring-boot-3-starter</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 验证码 -->
|
<!-- 验证码 -->
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import org.aspectj.lang.annotation.Aspect;
|
|||||||
import org.aspectj.lang.annotation.Before;
|
import org.aspectj.lang.annotation.Before;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import com.ruoyi.common.annotation.DataScope;
|
import com.ruoyi.common.annotation.DataScope;
|
||||||
|
import com.ruoyi.common.constant.Constants;
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||||
@@ -26,31 +27,6 @@ import com.ruoyi.framework.security.context.PermissionContextHolder;
|
|||||||
@Component
|
@Component
|
||||||
public class DataScopeAspect
|
public class DataScopeAspect
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* 全部数据权限
|
|
||||||
*/
|
|
||||||
public static final String DATA_SCOPE_ALL = "1";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定数据权限
|
|
||||||
*/
|
|
||||||
public static final String DATA_SCOPE_CUSTOM = "2";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 部门数据权限
|
|
||||||
*/
|
|
||||||
public static final String DATA_SCOPE_DEPT = "3";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 部门及以下数据权限
|
|
||||||
*/
|
|
||||||
public static final String DATA_SCOPE_DEPT_AND_CHILD = "4";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 仅本人数据权限
|
|
||||||
*/
|
|
||||||
public static final String DATA_SCOPE_SELF = "5";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据权限过滤关键字
|
* 数据权限过滤关键字
|
||||||
*/
|
*/
|
||||||
@@ -74,7 +50,7 @@ public class DataScopeAspect
|
|||||||
if (StringUtils.isNotNull(currentUser) && !currentUser.isAdmin())
|
if (StringUtils.isNotNull(currentUser) && !currentUser.isAdmin())
|
||||||
{
|
{
|
||||||
String permission = StringUtils.defaultIfEmpty(controllerDataScope.permission(), PermissionContextHolder.getContext());
|
String permission = StringUtils.defaultIfEmpty(controllerDataScope.permission(), PermissionContextHolder.getContext());
|
||||||
dataScopeFilter(joinPoint, currentUser, controllerDataScope.deptAlias(), controllerDataScope.userAlias(), permission);
|
dataScopeFilter(joinPoint, currentUser, controllerDataScope.userAlias(), controllerDataScope.deptAlias(), controllerDataScope.userField(), controllerDataScope.deptField(), permission);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -88,13 +64,13 @@ public class DataScopeAspect
|
|||||||
* @param userAlias 用户别名
|
* @param userAlias 用户别名
|
||||||
* @param permission 权限字符
|
* @param permission 权限字符
|
||||||
*/
|
*/
|
||||||
public static void dataScopeFilter(JoinPoint joinPoint, SysUser user, String deptAlias, String userAlias, String permission)
|
public static void dataScopeFilter(JoinPoint joinPoint, SysUser user, String userAlias, String deptAlias, String userField, String deptField, String permission)
|
||||||
{
|
{
|
||||||
StringBuilder sqlString = new StringBuilder();
|
StringBuilder sqlString = new StringBuilder();
|
||||||
List<String> conditions = new ArrayList<String>();
|
List<String> conditions = new ArrayList<String>();
|
||||||
List<String> scopeCustomIds = new ArrayList<String>();
|
List<String> scopeCustomIds = new ArrayList<String>();
|
||||||
user.getRoles().forEach(role -> {
|
user.getRoles().forEach(role -> {
|
||||||
if (DATA_SCOPE_CUSTOM.equals(role.getDataScope()) && StringUtils.equals(role.getStatus(), UserConstants.ROLE_NORMAL) && (StringUtils.isEmpty(permission) || StringUtils.containsAny(role.getPermissions(), Convert.toStrArray(permission))))
|
if (Constants.Dept.DATA_SCOPE_CUSTOM.equals(role.getDataScope()) && StringUtils.equals(role.getStatus(), UserConstants.ROLE_NORMAL) && (StringUtils.isEmpty(permission) || StringUtils.containsAny(role.getPermissions(), Convert.toStrArray(permission))))
|
||||||
{
|
{
|
||||||
scopeCustomIds.add(Convert.toStr(role.getRoleId()));
|
scopeCustomIds.add(Convert.toStr(role.getRoleId()));
|
||||||
}
|
}
|
||||||
@@ -111,42 +87,42 @@ public class DataScopeAspect
|
|||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (DATA_SCOPE_ALL.equals(dataScope))
|
if (Constants.Dept.DATA_SCOPE_ALL.equals(dataScope))
|
||||||
{
|
{
|
||||||
sqlString = new StringBuilder();
|
sqlString = new StringBuilder();
|
||||||
conditions.add(dataScope);
|
conditions.add(dataScope);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (DATA_SCOPE_CUSTOM.equals(dataScope))
|
else if (Constants.Dept.DATA_SCOPE_CUSTOM.equals(dataScope))
|
||||||
{
|
{
|
||||||
if (scopeCustomIds.size() > 1)
|
if (scopeCustomIds.size() > 1)
|
||||||
{
|
{
|
||||||
// 多个自定数据权限使用in查询,避免多次拼接。
|
// 多个自定数据权限使用in查询,避免多次拼接。
|
||||||
sqlString.append(StringUtils.format(" OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id in ({}) ) ", deptAlias, String.join(",", scopeCustomIds)));
|
sqlString.append(StringUtils.format(" OR {}.{} IN ( SELECT dept_id FROM sys_role_dept WHERE role_id in ({}) ) ", deptAlias, deptField, String.join(",", scopeCustomIds)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sqlString.append(StringUtils.format(" OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id = {} ) ", deptAlias, role.getRoleId()));
|
sqlString.append(StringUtils.format(" OR {}.{} IN ( SELECT dept_id FROM sys_role_dept WHERE role_id = {} ) ", deptAlias, deptField, role.getRoleId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (DATA_SCOPE_DEPT.equals(dataScope))
|
else if (Constants.Dept.DATA_SCOPE_DEPT.equals(dataScope))
|
||||||
{
|
{
|
||||||
sqlString.append(StringUtils.format(" OR {}.dept_id = {} ", deptAlias, user.getDeptId()));
|
sqlString.append(StringUtils.format(" OR {}.{} = {} ", deptAlias, deptField, user.getDeptId()));
|
||||||
}
|
}
|
||||||
else if (DATA_SCOPE_DEPT_AND_CHILD.equals(dataScope))
|
else if (Constants.Dept.DATA_SCOPE_DEPT_AND_CHILD.equals(dataScope))
|
||||||
{
|
{
|
||||||
sqlString.append(StringUtils.format(" OR {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or find_in_set( {} , ancestors ) )", deptAlias, user.getDeptId(), user.getDeptId()));
|
sqlString.append(StringUtils.format(" OR {}.{} IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or find_in_set( {} , ancestors ) )", deptAlias, deptField, user.getDeptId(), user.getDeptId()));
|
||||||
}
|
}
|
||||||
else if (DATA_SCOPE_SELF.equals(dataScope))
|
else if (Constants.Dept.DATA_SCOPE_SELF.equals(dataScope))
|
||||||
{
|
{
|
||||||
if (StringUtils.isNotBlank(userAlias))
|
if (StringUtils.isNotBlank(userAlias))
|
||||||
{
|
{
|
||||||
sqlString.append(StringUtils.format(" OR {}.user_id = {} ", userAlias, user.getUserId()));
|
sqlString.append(StringUtils.format(" OR {}.{} = {} ", userAlias, userField, user.getUserId()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// 数据权限为仅本人且没有userAlias别名不查询任何数据
|
// 数据权限为仅本人且没有userAlias别名不查询任何数据
|
||||||
sqlString.append(StringUtils.format(" OR {}.dept_id = 0 ", deptAlias));
|
sqlString.append(StringUtils.format(" OR {}.{} = 0 ", deptAlias, deptField));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
conditions.add(dataScope);
|
conditions.add(dataScope);
|
||||||
@@ -155,7 +131,7 @@ public class DataScopeAspect
|
|||||||
// 角色都不包含传递过来的权限字符,这个时候sqlString也会为空,所以要限制一下,不查询任何数据
|
// 角色都不包含传递过来的权限字符,这个时候sqlString也会为空,所以要限制一下,不查询任何数据
|
||||||
if (StringUtils.isEmpty(conditions))
|
if (StringUtils.isEmpty(conditions))
|
||||||
{
|
{
|
||||||
sqlString.append(StringUtils.format(" OR {}.dept_id = 0 ", deptAlias));
|
sqlString.append(StringUtils.format(" OR {}.{} = 0 ", deptAlias, deptField));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(sqlString.toString()))
|
if (StringUtils.isNotBlank(sqlString.toString()))
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
package com.ruoyi.framework.config;
|
package com.ruoyi.framework.config;
|
||||||
|
|
||||||
|
import java.util.TimeZone;
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
|
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
||||||
|
|
||||||
@@ -16,4 +19,12 @@ import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
|||||||
@MapperScan("com.ruoyi.**.mapper")
|
@MapperScan("com.ruoyi.**.mapper")
|
||||||
public class ApplicationConfig
|
public class ApplicationConfig
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* 时区配置
|
||||||
|
*/
|
||||||
|
@Bean
|
||||||
|
public Jackson2ObjectMapperBuilderCustomizer jacksonObjectMapperCustomization()
|
||||||
|
{
|
||||||
|
return jacksonObjectMapperBuilder -> jacksonObjectMapperBuilder.timeZone(TimeZone.getDefault());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import org.springframework.context.annotation.Bean;
|
|||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.Primary;
|
import org.springframework.context.annotation.Primary;
|
||||||
import com.alibaba.druid.pool.DruidDataSource;
|
import com.alibaba.druid.pool.DruidDataSource;
|
||||||
import com.alibaba.druid.spring.boot4.autoconfigure.DruidDataSourceBuilder;
|
import com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceBuilder;
|
||||||
import com.alibaba.druid.spring.boot4.autoconfigure.properties.DruidStatProperties;
|
import com.alibaba.druid.spring.boot3.autoconfigure.properties.DruidStatProperties;
|
||||||
import com.alibaba.druid.util.Utils;
|
import com.alibaba.druid.util.Utils;
|
||||||
import com.ruoyi.common.enums.DataSourceType;
|
import com.ruoyi.common.enums.DataSourceType;
|
||||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ public class ThreadPoolConfig
|
|||||||
protected ScheduledExecutorService scheduledExecutorService()
|
protected ScheduledExecutorService scheduledExecutorService()
|
||||||
{
|
{
|
||||||
return new ScheduledThreadPoolExecutor(corePoolSize,
|
return new ScheduledThreadPoolExecutor(corePoolSize,
|
||||||
BasicThreadFactory.builder().namingPattern("schedule-pool-%d").daemon(true).build(),
|
new BasicThreadFactory.Builder().namingPattern("schedule-pool-%d").daemon(true).build(),
|
||||||
new ThreadPoolExecutor.CallerRunsPolicy())
|
new ThreadPoolExecutor.CallerRunsPolicy())
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
protected void afterExecute(Runnable r, Throwable t)
|
protected void afterExecute(Runnable r, Throwable t)
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ public class PermitAllUrlProperties implements InitializingBean, ApplicationCont
|
|||||||
|
|
||||||
public String ASTERISK = "*";
|
public String ASTERISK = "*";
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@Override
|
@Override
|
||||||
public void afterPropertiesSet()
|
public void afterPropertiesSet()
|
||||||
{
|
{
|
||||||
@@ -46,7 +45,7 @@ public class PermitAllUrlProperties implements InitializingBean, ApplicationCont
|
|||||||
|
|
||||||
// 获取方法上边的注解 替代path variable 为 *
|
// 获取方法上边的注解 替代path variable 为 *
|
||||||
Anonymous method = AnnotationUtils.findAnnotation(handlerMethod.getMethod(), Anonymous.class);
|
Anonymous method = AnnotationUtils.findAnnotation(handlerMethod.getMethod(), Anonymous.class);
|
||||||
Optional.ofNullable(method).ifPresent(anonymous -> Objects.requireNonNull(info.getPathPatternsCondition().getPatternValues())
|
Optional.ofNullable(method).ifPresent(anonymous -> Objects.requireNonNull(info.getPathPatternsCondition().getPatternValues()) //
|
||||||
.forEach(url -> urls.add(RegExUtils.replaceAll(url, PATTERN, ASTERISK))));
|
.forEach(url -> urls.add(RegExUtils.replaceAll(url, PATTERN, ASTERISK))));
|
||||||
|
|
||||||
// 获取类上边的注解, 替代path variable 为 *
|
// 获取类上边的注解, 替代path variable 为 *
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.ruoyi.framework.web.service;
|
package com.ruoyi.framework.web.service;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -22,6 +22,7 @@ import com.ruoyi.common.utils.uuid.IdUtils;
|
|||||||
import io.jsonwebtoken.Claims;
|
import io.jsonwebtoken.Claims;
|
||||||
import io.jsonwebtoken.Jwts;
|
import io.jsonwebtoken.Jwts;
|
||||||
import io.jsonwebtoken.SignatureAlgorithm;
|
import io.jsonwebtoken.SignatureAlgorithm;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* token验证处理
|
* token验证处理
|
||||||
@@ -229,4 +230,41 @@ public class TokenService
|
|||||||
{
|
{
|
||||||
return CacheConstants.LOGIN_TOKEN_KEY + uuid;
|
return CacheConstants.LOGIN_TOKEN_KEY + uuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色权限变更后,刷新所有持有该角色的在线用户权限
|
||||||
|
*
|
||||||
|
* @param roleId 变更的角色ID
|
||||||
|
* @param permissionService 权限服务
|
||||||
|
*/
|
||||||
|
public void refreshPermissionByRoleId(Long roleId, SysPermissionService permissionService)
|
||||||
|
{
|
||||||
|
// 扫描所有在线 token
|
||||||
|
String pattern = CacheConstants.LOGIN_TOKEN_KEY + "*";
|
||||||
|
Collection<String> keys = redisCache.keys(pattern);
|
||||||
|
if (keys == null || keys.isEmpty())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (String key : keys)
|
||||||
|
{
|
||||||
|
LoginUser loginUser = redisCache.getCacheObject(key);
|
||||||
|
if (loginUser == null || loginUser.getUser() == null || loginUser.getUser().isAdmin())
|
||||||
|
{
|
||||||
|
// 管理员拥有所有权限,跳过
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// 判断该用户是否拥有此角色
|
||||||
|
boolean hasRole = loginUser.getUser().getRoles() != null
|
||||||
|
&& loginUser.getUser().getRoles().stream().anyMatch(r -> roleId.equals(r.getRoleId()));
|
||||||
|
if (!hasRole)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// 刷新权限缓存
|
||||||
|
loginUser.setPermissions(permissionService.getMenuPermission(loginUser.getUser()));
|
||||||
|
refreshToken(loginUser);
|
||||||
|
log.info("角色[{}]权限变更,已刷新在线用户[{}]的权限缓存", roleId, loginUser.getUsername());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
<!-- 阿里数据库连接池 -->
|
<!-- 阿里数据库连接池 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>druid-spring-boot-4-starter</artifactId>
|
<artifactId>druid-spring-boot-3-starter</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|||||||
@@ -64,6 +64,9 @@ public class GenTable extends BaseEntity
|
|||||||
@NotBlank(message = "作者不能为空")
|
@NotBlank(message = "作者不能为空")
|
||||||
private String functionAuthor;
|
private String functionAuthor;
|
||||||
|
|
||||||
|
/** 表单布局(单列 双列 三列) */
|
||||||
|
private Integer formColNum;
|
||||||
|
|
||||||
/** 生成代码方式(0zip压缩包 1自定义路径) */
|
/** 生成代码方式(0zip压缩包 1自定义路径) */
|
||||||
private String genType;
|
private String genType;
|
||||||
|
|
||||||
@@ -98,6 +101,9 @@ public class GenTable extends BaseEntity
|
|||||||
/** 上级菜单名称字段 */
|
/** 上级菜单名称字段 */
|
||||||
private String parentMenuName;
|
private String parentMenuName;
|
||||||
|
|
||||||
|
/** 是否生成详情页 */
|
||||||
|
private boolean isView;
|
||||||
|
|
||||||
public Long getTableId()
|
public Long getTableId()
|
||||||
{
|
{
|
||||||
return tableId;
|
return tableId;
|
||||||
@@ -228,6 +234,16 @@ public class GenTable extends BaseEntity
|
|||||||
this.functionAuthor = functionAuthor;
|
this.functionAuthor = functionAuthor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getFormColNum()
|
||||||
|
{
|
||||||
|
return formColNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFormColNum(Integer formColNum)
|
||||||
|
{
|
||||||
|
this.formColNum = formColNum;
|
||||||
|
}
|
||||||
|
|
||||||
public String getGenType()
|
public String getGenType()
|
||||||
{
|
{
|
||||||
return genType;
|
return genType;
|
||||||
@@ -338,6 +354,16 @@ public class GenTable extends BaseEntity
|
|||||||
this.parentMenuName = parentMenuName;
|
this.parentMenuName = parentMenuName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isView()
|
||||||
|
{
|
||||||
|
return isView;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setView(boolean isView)
|
||||||
|
{
|
||||||
|
this.isView = isView;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isSub()
|
public boolean isSub()
|
||||||
{
|
{
|
||||||
return isSub(this.tplCategory);
|
return isSub(this.tplCategory);
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ public class GenTableServiceImpl implements IGenTableService
|
|||||||
VelocityContext context = VelocityUtils.prepareContext(table);
|
VelocityContext context = VelocityUtils.prepareContext(table);
|
||||||
|
|
||||||
// 获取模板列表
|
// 获取模板列表
|
||||||
List<String> templates = VelocityUtils.getTemplateList(table.getTplCategory(), table.getTplWebType());
|
List<String> templates = VelocityUtils.getTemplateList(table);
|
||||||
for (String template : templates)
|
for (String template : templates)
|
||||||
{
|
{
|
||||||
// 渲染模板
|
// 渲染模板
|
||||||
@@ -263,10 +263,10 @@ public class GenTableServiceImpl implements IGenTableService
|
|||||||
VelocityContext context = VelocityUtils.prepareContext(table);
|
VelocityContext context = VelocityUtils.prepareContext(table);
|
||||||
|
|
||||||
// 获取模板列表
|
// 获取模板列表
|
||||||
List<String> templates = VelocityUtils.getTemplateList(table.getTplCategory(), table.getTplWebType());
|
List<String> templates = VelocityUtils.getTemplateList(table);
|
||||||
for (String template : templates)
|
for (String template : templates)
|
||||||
{
|
{
|
||||||
if (!StringUtils.containsAny(template, "sql.vm", "api.js.vm", "index.vue.vm", "index-tree.vue.vm"))
|
if (!StringUtils.containsAny(template, "sql.vm", "api.js.vm", "api.ts.vm", "type.ts.vm", "index.ts.vm", "index.vue.vm", "index-tree.vue.vm", "view.vue.vm"))
|
||||||
{
|
{
|
||||||
// 渲染模板
|
// 渲染模板
|
||||||
StringWriter sw = new StringWriter();
|
StringWriter sw = new StringWriter();
|
||||||
@@ -381,7 +381,7 @@ public class GenTableServiceImpl implements IGenTableService
|
|||||||
VelocityContext context = VelocityUtils.prepareContext(table);
|
VelocityContext context = VelocityUtils.prepareContext(table);
|
||||||
|
|
||||||
// 获取模板列表
|
// 获取模板列表
|
||||||
List<String> templates = VelocityUtils.getTemplateList(table.getTplCategory(), table.getTplWebType());
|
List<String> templates = VelocityUtils.getTemplateList(table);
|
||||||
for (String template : templates)
|
for (String template : templates)
|
||||||
{
|
{
|
||||||
// 渲染模板
|
// 渲染模板
|
||||||
@@ -534,12 +534,14 @@ public class GenTableServiceImpl implements IGenTableService
|
|||||||
String treeName = paramsObj.getString(GenConstants.TREE_NAME);
|
String treeName = paramsObj.getString(GenConstants.TREE_NAME);
|
||||||
Long parentMenuId = paramsObj.getLongValue(GenConstants.PARENT_MENU_ID);
|
Long parentMenuId = paramsObj.getLongValue(GenConstants.PARENT_MENU_ID);
|
||||||
String parentMenuName = paramsObj.getString(GenConstants.PARENT_MENU_NAME);
|
String parentMenuName = paramsObj.getString(GenConstants.PARENT_MENU_NAME);
|
||||||
|
boolean isView = paramsObj.getBooleanValue(GenConstants.GEN_VIEW);
|
||||||
|
|
||||||
genTable.setTreeCode(treeCode);
|
genTable.setTreeCode(treeCode);
|
||||||
genTable.setTreeParentCode(treeParentCode);
|
genTable.setTreeParentCode(treeParentCode);
|
||||||
genTable.setTreeName(treeName);
|
genTable.setTreeName(treeName);
|
||||||
genTable.setParentMenuId(parentMenuId);
|
genTable.setParentMenuId(parentMenuId);
|
||||||
genTable.setParentMenuName(parentMenuName);
|
genTable.setParentMenuName(parentMenuName);
|
||||||
|
genTable.setView(isView);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ public class VelocityUtils
|
|||||||
velocityContext.put("basePackage", getPackagePrefix(packageName));
|
velocityContext.put("basePackage", getPackagePrefix(packageName));
|
||||||
velocityContext.put("packageName", packageName);
|
velocityContext.put("packageName", packageName);
|
||||||
velocityContext.put("author", genTable.getFunctionAuthor());
|
velocityContext.put("author", genTable.getFunctionAuthor());
|
||||||
|
velocityContext.put("colSpan", getColSpan(genTable.getFormColNum()));
|
||||||
velocityContext.put("datetime", DateUtils.getDate());
|
velocityContext.put("datetime", DateUtils.getDate());
|
||||||
velocityContext.put("pkColumn", genTable.getPkColumn());
|
velocityContext.put("pkColumn", genTable.getPkColumn());
|
||||||
velocityContext.put("importList", getImportList(genTable));
|
velocityContext.put("importList", getImportList(genTable));
|
||||||
@@ -67,6 +68,7 @@ public class VelocityUtils
|
|||||||
velocityContext.put("columns", genTable.getColumns());
|
velocityContext.put("columns", genTable.getColumns());
|
||||||
velocityContext.put("table", genTable);
|
velocityContext.put("table", genTable);
|
||||||
velocityContext.put("dicts", getDicts(genTable));
|
velocityContext.put("dicts", getDicts(genTable));
|
||||||
|
setExtensionsContext(velocityContext, genTable.getOptions());
|
||||||
setMenuVelocityContext(velocityContext, genTable);
|
setMenuVelocityContext(velocityContext, genTable);
|
||||||
if (GenConstants.TPL_TREE.equals(tplCategory))
|
if (GenConstants.TPL_TREE.equals(tplCategory))
|
||||||
{
|
{
|
||||||
@@ -79,6 +81,13 @@ public class VelocityUtils
|
|||||||
return velocityContext;
|
return velocityContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void setExtensionsContext(VelocityContext context, String options)
|
||||||
|
{
|
||||||
|
JSONObject paramsObj = JSONObject.parseObject(options);
|
||||||
|
boolean genView = genView(paramsObj);
|
||||||
|
context.put("genView", genView);
|
||||||
|
}
|
||||||
|
|
||||||
public static void setMenuVelocityContext(VelocityContext context, GenTable genTable)
|
public static void setMenuVelocityContext(VelocityContext context, GenTable genTable)
|
||||||
{
|
{
|
||||||
String options = genTable.getOptions();
|
String options = genTable.getOptions();
|
||||||
@@ -133,8 +142,12 @@ public class VelocityUtils
|
|||||||
* @param tplWebType 前端类型
|
* @param tplWebType 前端类型
|
||||||
* @return 模板列表
|
* @return 模板列表
|
||||||
*/
|
*/
|
||||||
public static List<String> getTemplateList(String tplCategory, String tplWebType)
|
public static List<String> getTemplateList(GenTable table)
|
||||||
{
|
{
|
||||||
|
String tplWebType = table.getTplWebType();
|
||||||
|
String tplCategory = table.getTplCategory();
|
||||||
|
JSONObject paramsObj = JSONObject.parseObject(table.getOptions());
|
||||||
|
boolean isView = genView(paramsObj);
|
||||||
String useWebType = "vm/vue";
|
String useWebType = "vm/vue";
|
||||||
String apiTemplate = "vm/js/api.js.vm";
|
String apiTemplate = "vm/js/api.js.vm";
|
||||||
if (StringUtils.equals(ELEMENT_PLUS, tplWebType))
|
if (StringUtils.equals(ELEMENT_PLUS, tplWebType))
|
||||||
@@ -173,6 +186,10 @@ public class VelocityUtils
|
|||||||
templates.add(useWebType + "/index.vue.vm");
|
templates.add(useWebType + "/index.vue.vm");
|
||||||
templates.add("vm/java/sub-domain.java.vm");
|
templates.add("vm/java/sub-domain.java.vm");
|
||||||
}
|
}
|
||||||
|
if (isView)
|
||||||
|
{
|
||||||
|
templates.add(useWebType + "/view.vue.vm");
|
||||||
|
}
|
||||||
return templates;
|
return templates;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -252,6 +269,10 @@ public class VelocityUtils
|
|||||||
{
|
{
|
||||||
fileName = StringUtils.format("{}/views/{}/{}/index.vue", vuePath, moduleName, businessName);
|
fileName = StringUtils.format("{}/views/{}/{}/index.vue", vuePath, moduleName, businessName);
|
||||||
}
|
}
|
||||||
|
else if (template.contains("view.vue.vm"))
|
||||||
|
{
|
||||||
|
fileName = StringUtils.format("{}/views/{}/{}/view.vue", vuePath, moduleName, businessName);
|
||||||
|
}
|
||||||
return fileName;
|
return fileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -393,6 +414,21 @@ public class VelocityUtils
|
|||||||
return StringUtils.EMPTY;
|
return StringUtils.EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扩展功能/生成详情页
|
||||||
|
*
|
||||||
|
* @param paramsObj 生成其他选项
|
||||||
|
* @return 是否生成详细页
|
||||||
|
*/
|
||||||
|
public static boolean genView(JSONObject paramsObj)
|
||||||
|
{
|
||||||
|
if (StringUtils.isNotNull(paramsObj) && paramsObj.containsKey(GenConstants.GEN_VIEW))
|
||||||
|
{
|
||||||
|
return paramsObj.getBoolean(GenConstants.GEN_VIEW);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取树名称
|
* 获取树名称
|
||||||
*
|
*
|
||||||
@@ -434,4 +470,23 @@ public class VelocityUtils
|
|||||||
}
|
}
|
||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取表单 el-col span
|
||||||
|
*
|
||||||
|
* @param formColNum 表单布局方式(1单列 2双列 3三列)
|
||||||
|
* @return span 数值字符串
|
||||||
|
*/
|
||||||
|
public static String getColSpan(int formColNum)
|
||||||
|
{
|
||||||
|
if (formColNum == 2)
|
||||||
|
{
|
||||||
|
return "12";
|
||||||
|
}
|
||||||
|
else if (formColNum == 3)
|
||||||
|
{
|
||||||
|
return "8";
|
||||||
|
}
|
||||||
|
return "24";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<set>
|
<set>
|
||||||
<if test="columnComment != null">column_comment = #{columnComment},</if>
|
<if test="columnComment != null">column_comment = #{columnComment},</if>
|
||||||
<if test="javaType != null">java_type = #{javaType},</if>
|
<if test="javaType != null">java_type = #{javaType},</if>
|
||||||
|
<if test="columnType != null">column_type = #{columnType},</if>
|
||||||
<if test="javaField != null">java_field = #{javaField},</if>
|
<if test="javaField != null">java_field = #{javaField},</if>
|
||||||
<if test="isInsert != null">is_insert = #{isInsert},</if>
|
<if test="isInsert != null">is_insert = #{isInsert},</if>
|
||||||
<if test="isEdit != null">is_edit = #{isEdit},</if>
|
<if test="isEdit != null">is_edit = #{isEdit},</if>
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="businessName" column="business_name" />
|
<result property="businessName" column="business_name" />
|
||||||
<result property="functionName" column="function_name" />
|
<result property="functionName" column="function_name" />
|
||||||
<result property="functionAuthor" column="function_author" />
|
<result property="functionAuthor" column="function_author" />
|
||||||
|
<result property="formColNum" column="form_col_num" />
|
||||||
<result property="genType" column="gen_type" />
|
<result property="genType" column="gen_type" />
|
||||||
<result property="genPath" column="gen_path" />
|
<result property="genPath" column="gen_path" />
|
||||||
<result property="options" column="options" />
|
<result property="options" column="options" />
|
||||||
@@ -55,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectGenTableVo">
|
<sql id="selectGenTableVo">
|
||||||
select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, tpl_web_type, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark from gen_table
|
select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, tpl_web_type, package_name, module_name, business_name, function_name, function_author, form_col_num, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark from gen_table
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectGenTableList" parameterType="GenTable" resultMap="GenTableResult">
|
<select id="selectGenTableList" parameterType="GenTable" resultMap="GenTableResult">
|
||||||
@@ -112,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectGenTableById" parameterType="Long" resultMap="GenTableResult">
|
<select id="selectGenTableById" parameterType="Long" resultMap="GenTableResult">
|
||||||
SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.tpl_web_type, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark,
|
SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.tpl_web_type, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.form_col_num, t.gen_type, t.gen_path, t.options, t.remark,
|
||||||
c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort
|
c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort
|
||||||
FROM gen_table t
|
FROM gen_table t
|
||||||
LEFT JOIN gen_table_column c ON t.table_id = c.table_id
|
LEFT JOIN gen_table_column c ON t.table_id = c.table_id
|
||||||
@@ -120,7 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectGenTableByName" parameterType="String" resultMap="GenTableResult">
|
<select id="selectGenTableByName" parameterType="String" resultMap="GenTableResult">
|
||||||
SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.tpl_web_type, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark,
|
SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.tpl_web_type, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.form_col_num, t.gen_type, t.gen_path, t.options, t.remark,
|
||||||
c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort
|
c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort
|
||||||
FROM gen_table t
|
FROM gen_table t
|
||||||
LEFT JOIN gen_table_column c ON t.table_id = c.table_id
|
LEFT JOIN gen_table_column c ON t.table_id = c.table_id
|
||||||
@@ -128,7 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectGenTableAll" parameterType="String" resultMap="GenTableResult">
|
<select id="selectGenTableAll" parameterType="String" resultMap="GenTableResult">
|
||||||
SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.tpl_web_type, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.options, t.remark,
|
SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.tpl_web_type, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.form_col_num, t.options, t.remark,
|
||||||
c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort
|
c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort
|
||||||
FROM gen_table t
|
FROM gen_table t
|
||||||
LEFT JOIN gen_table_column c ON t.table_id = c.table_id
|
LEFT JOIN gen_table_column c ON t.table_id = c.table_id
|
||||||
@@ -147,6 +148,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="businessName != null and businessName != ''">business_name,</if>
|
<if test="businessName != null and businessName != ''">business_name,</if>
|
||||||
<if test="functionName != null and functionName != ''">function_name,</if>
|
<if test="functionName != null and functionName != ''">function_name,</if>
|
||||||
<if test="functionAuthor != null and functionAuthor != ''">function_author,</if>
|
<if test="functionAuthor != null and functionAuthor != ''">function_author,</if>
|
||||||
|
<if test="formColNum != null">form_col_num,</if>
|
||||||
<if test="genType != null and genType != ''">gen_type,</if>
|
<if test="genType != null and genType != ''">gen_type,</if>
|
||||||
<if test="genPath != null and genPath != ''">gen_path,</if>
|
<if test="genPath != null and genPath != ''">gen_path,</if>
|
||||||
<if test="remark != null and remark != ''">remark,</if>
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
@@ -163,6 +165,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="businessName != null and businessName != ''">#{businessName},</if>
|
<if test="businessName != null and businessName != ''">#{businessName},</if>
|
||||||
<if test="functionName != null and functionName != ''">#{functionName},</if>
|
<if test="functionName != null and functionName != ''">#{functionName},</if>
|
||||||
<if test="functionAuthor != null and functionAuthor != ''">#{functionAuthor},</if>
|
<if test="functionAuthor != null and functionAuthor != ''">#{functionAuthor},</if>
|
||||||
|
<if test="formColNum != null">#{formColNum},</if>
|
||||||
<if test="genType != null and genType != ''">#{genType},</if>
|
<if test="genType != null and genType != ''">#{genType},</if>
|
||||||
<if test="genPath != null and genPath != ''">#{genPath},</if>
|
<if test="genPath != null and genPath != ''">#{genPath},</if>
|
||||||
<if test="remark != null and remark != ''">#{remark},</if>
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
@@ -184,6 +187,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="subTableFkName != null">sub_table_fk_name = #{subTableFkName},</if>
|
<if test="subTableFkName != null">sub_table_fk_name = #{subTableFkName},</if>
|
||||||
<if test="className != null and className != ''">class_name = #{className},</if>
|
<if test="className != null and className != ''">class_name = #{className},</if>
|
||||||
<if test="functionAuthor != null and functionAuthor != ''">function_author = #{functionAuthor},</if>
|
<if test="functionAuthor != null and functionAuthor != ''">function_author = #{functionAuthor},</if>
|
||||||
|
<if test="formColNum != null">form_col_num = #{formColNum},</if>
|
||||||
<if test="genType != null and genType != ''">gen_type = #{genType},</if>
|
<if test="genType != null and genType != ''">gen_type = #{genType},</if>
|
||||||
<if test="genPath != null and genPath != ''">gen_path = #{genPath},</if>
|
<if test="genPath != null and genPath != ''">gen_path = #{genPath},</if>
|
||||||
<if test="tplCategory != null and tplCategory != ''">tpl_category = #{tplCategory},</if>
|
<if test="tplCategory != null and tplCategory != ''">tpl_category = #{tplCategory},</if>
|
||||||
|
|||||||
@@ -139,6 +139,15 @@
|
|||||||
#end
|
#end
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
#if($genView)
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-view"
|
||||||
|
@click="handleViewData(scope.row)"
|
||||||
|
v-hasPermi="['${permissionPrefix}:query']"
|
||||||
|
>详情</el-button>
|
||||||
|
#end
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@@ -164,9 +173,21 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
|
#if($genView)
|
||||||
|
<!-- ${functionName}详情抽屉 -->
|
||||||
|
<${businessName}-view-drawer ref="${businessName}ViewRef" />
|
||||||
|
#end
|
||||||
<!-- 添加或修改${functionName}对话框 -->
|
<!-- 添加或修改${functionName}对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
#if($table.formColNum == 2)
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
#set($dialogWidth = "800px")
|
||||||
|
#elseif($table.formColNum == 3)
|
||||||
|
#set($dialogWidth = "1100px")
|
||||||
|
#else
|
||||||
|
#set($dialogWidth = "500px")
|
||||||
|
#end
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="${dialogWidth}" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-row>
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#set($field=$column.javaField)
|
#set($field=$column.javaField)
|
||||||
#if($column.insert && !$column.pk)
|
#if($column.insert && !$column.pk)
|
||||||
@@ -179,100 +200,127 @@
|
|||||||
#end
|
#end
|
||||||
#set($dictType=$column.dictType)
|
#set($dictType=$column.dictType)
|
||||||
#if("" != $treeParentCode && $column.javaField == $treeParentCode)
|
#if("" != $treeParentCode && $column.javaField == $treeParentCode)
|
||||||
<el-form-item label="${comment}" prop="${treeParentCode}">
|
<el-col :span="${colSpan}">
|
||||||
<treeselect v-model="form.${treeParentCode}" :options="${businessName}Options" :normalizer="normalizer" placeholder="请选择${comment}" />
|
<el-form-item label="${comment}" prop="${treeParentCode}">
|
||||||
</el-form-item>
|
<treeselect v-model="form.${treeParentCode}" :options="${businessName}Options" :normalizer="normalizer" placeholder="请选择${comment}" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "input")
|
#elseif($column.htmlType == "input")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-input v-model="form.${field}" placeholder="请输入${comment}" />
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<el-input v-model="form.${field}" placeholder="请输入${comment}" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "imageUpload")
|
#elseif($column.htmlType == "imageUpload")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<image-upload v-model="form.${field}"/>
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<image-upload v-model="form.${field}"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "fileUpload")
|
#elseif($column.htmlType == "fileUpload")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<file-upload v-model="form.${field}"/>
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<file-upload v-model="form.${field}"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "editor")
|
#elseif($column.htmlType == "editor")
|
||||||
<el-form-item label="${comment}">
|
<el-col :span="24">
|
||||||
<editor v-model="form.${field}" :min-height="192"/>
|
<el-form-item label="${comment}">
|
||||||
</el-form-item>
|
<editor v-model="form.${field}" :min-height="192"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "select" && "" != $dictType)
|
#elseif($column.htmlType == "select" && "" != $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-option
|
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
||||||
v-for="dict in dict.type.${dictType}"
|
<el-option
|
||||||
:key="dict.value"
|
v-for="dict in dict.type.${dictType}"
|
||||||
:label="dict.label"
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
||||||
:value="parseInt(dict.value)"
|
:value="parseInt(dict.value)"
|
||||||
#else
|
#else
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
#end
|
#end
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "select" && $dictType)
|
#elseif($column.htmlType == "select" && $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-option label="请选择字典生成" value="" />
|
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
||||||
</el-select>
|
<el-option label="请选择字典生成" value="" />
|
||||||
</el-form-item>
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "checkbox" && "" != $dictType)
|
#elseif($column.htmlType == "checkbox" && "" != $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-checkbox-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-checkbox
|
<el-checkbox-group v-model="form.${field}">
|
||||||
v-for="dict in dict.type.${dictType}"
|
<el-checkbox
|
||||||
:key="dict.value"
|
v-for="dict in dict.type.${dictType}"
|
||||||
:label="dict.value">
|
:key="dict.value"
|
||||||
{{dict.label}}
|
:label="dict.value">
|
||||||
</el-checkbox>
|
{{dict.label}}
|
||||||
</el-checkbox-group>
|
</el-checkbox>
|
||||||
</el-form-item>
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "checkbox" && $dictType)
|
#elseif($column.htmlType == "checkbox" && $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-checkbox-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-checkbox>请选择字典生成</el-checkbox>
|
<el-checkbox-group v-model="form.${field}">
|
||||||
</el-checkbox-group>
|
<el-checkbox>请选择字典生成</el-checkbox>
|
||||||
</el-form-item>
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "radio" && "" != $dictType)
|
#elseif($column.htmlType == "radio" && "" != $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-radio-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-radio
|
<el-radio-group v-model="form.${field}">
|
||||||
v-for="dict in dict.type.${dictType}"
|
<el-radio
|
||||||
:key="dict.value"
|
v-for="dict in dict.type.${dictType}"
|
||||||
|
:key="dict.value"
|
||||||
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
||||||
:label="parseInt(dict.value)"
|
:label="parseInt(dict.value)"
|
||||||
#else
|
#else
|
||||||
:label="dict.value"
|
:label="dict.value"
|
||||||
#end
|
#end
|
||||||
>{{dict.label}}</el-radio>
|
>{{dict.label}}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "radio" && $dictType)
|
#elseif($column.htmlType == "radio" && $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-radio-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-radio label="1">请选择字典生成</el-radio>
|
<el-radio-group v-model="form.${field}">
|
||||||
</el-radio-group>
|
<el-radio label="1">请选择字典生成</el-radio>
|
||||||
</el-form-item>
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "datetime")
|
#elseif($column.htmlType == "datetime")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-date-picker clearable
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
v-model="form.${field}"
|
<el-date-picker clearable
|
||||||
type="date"
|
v-model="form.${field}"
|
||||||
value-format="yyyy-MM-dd"
|
type="date"
|
||||||
placeholder="选择${comment}">
|
value-format="yyyy-MM-dd"
|
||||||
</el-date-picker>
|
placeholder="选择${comment}">
|
||||||
</el-form-item>
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "textarea")
|
#elseif($column.htmlType == "textarea")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="24">
|
||||||
<el-input v-model="form.${field}" type="textarea" placeholder="请输入内容" />
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<el-input v-model="form.${field}" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
@@ -284,6 +332,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"
|
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"
|
||||||
|
#if($genView)
|
||||||
|
import ${BusinessName}ViewDrawer from "./view"
|
||||||
|
#end
|
||||||
import Treeselect from "@riophae/vue-treeselect"
|
import Treeselect from "@riophae/vue-treeselect"
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css"
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css"
|
||||||
|
|
||||||
@@ -293,6 +344,9 @@ export default {
|
|||||||
dicts: [${dicts}],
|
dicts: [${dicts}],
|
||||||
#end
|
#end
|
||||||
components: {
|
components: {
|
||||||
|
#if($genView)
|
||||||
|
${BusinessName}ViewDrawer,
|
||||||
|
#end
|
||||||
Treeselect
|
Treeselect
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -448,6 +502,12 @@ export default {
|
|||||||
this.refreshTable = true
|
this.refreshTable = true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
#if($genView)
|
||||||
|
/** 详情按钮操作 */
|
||||||
|
handleViewData(row) {
|
||||||
|
this.#[[$]]#refs["${businessName}ViewRef"].open(row.${pkColumn.javaField})
|
||||||
|
},
|
||||||
|
#end
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset()
|
this.reset()
|
||||||
|
|||||||
@@ -153,6 +153,15 @@
|
|||||||
#end
|
#end
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
#if($genView)
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-view"
|
||||||
|
@click="handleViewData(scope.row)"
|
||||||
|
v-hasPermi="['${permissionPrefix}:query']"
|
||||||
|
>详情</el-button>
|
||||||
|
#end
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@@ -179,9 +188,21 @@
|
|||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
#if($genView)
|
||||||
|
<!-- ${functionName}详情抽屉 -->
|
||||||
|
<${businessName}-view-drawer ref="${businessName}ViewRef" />
|
||||||
|
#end
|
||||||
<!-- 添加或修改${functionName}对话框 -->
|
<!-- 添加或修改${functionName}对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
#if($table.formColNum == 2)
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
#set($dialogWidth = "800px")
|
||||||
|
#elseif($table.formColNum == 3)
|
||||||
|
#set($dialogWidth = "1100px")
|
||||||
|
#else
|
||||||
|
#set($dialogWidth = "500px")
|
||||||
|
#end
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="${dialogWidth}" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-row>
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#set($field=$column.javaField)
|
#set($field=$column.javaField)
|
||||||
#if($column.insert && !$column.pk)
|
#if($column.insert && !$column.pk)
|
||||||
@@ -194,96 +215,121 @@
|
|||||||
#end
|
#end
|
||||||
#set($dictType=$column.dictType)
|
#set($dictType=$column.dictType)
|
||||||
#if($column.htmlType == "input")
|
#if($column.htmlType == "input")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-input v-model="form.${field}" placeholder="请输入${comment}" />
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<el-input v-model="form.${field}" placeholder="请输入${comment}" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "imageUpload")
|
#elseif($column.htmlType == "imageUpload")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<image-upload v-model="form.${field}"/>
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<image-upload v-model="form.${field}"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "fileUpload")
|
#elseif($column.htmlType == "fileUpload")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<file-upload v-model="form.${field}"/>
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<file-upload v-model="form.${field}"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "editor")
|
#elseif($column.htmlType == "editor")
|
||||||
<el-form-item label="${comment}">
|
<el-col :span="24">
|
||||||
<editor v-model="form.${field}" :min-height="192"/>
|
<el-form-item label="${comment}">
|
||||||
</el-form-item>
|
<editor v-model="form.${field}" :min-height="192"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "select" && "" != $dictType)
|
#elseif($column.htmlType == "select" && "" != $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-option
|
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
||||||
v-for="dict in dict.type.${dictType}"
|
<el-option
|
||||||
:key="dict.value"
|
v-for="dict in dict.type.${dictType}"
|
||||||
:label="dict.label"
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
||||||
:value="parseInt(dict.value)"
|
:value="parseInt(dict.value)"
|
||||||
#else
|
#else
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
#end
|
#end
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "select" && $dictType)
|
#elseif($column.htmlType == "select" && $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-option label="请选择字典生成" value="" />
|
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
||||||
</el-select>
|
<el-option label="请选择字典生成" value="" />
|
||||||
</el-form-item>
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "checkbox" && "" != $dictType)
|
#elseif($column.htmlType == "checkbox" && "" != $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-checkbox-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-checkbox
|
<el-checkbox-group v-model="form.${field}">
|
||||||
v-for="dict in dict.type.${dictType}"
|
<el-checkbox
|
||||||
:key="dict.value"
|
v-for="dict in dict.type.${dictType}"
|
||||||
:label="dict.value">
|
:key="dict.value"
|
||||||
{{dict.label}}
|
:label="dict.value">
|
||||||
</el-checkbox>
|
{{dict.label}}
|
||||||
</el-checkbox-group>
|
</el-checkbox>
|
||||||
</el-form-item>
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "checkbox" && $dictType)
|
#elseif($column.htmlType == "checkbox" && $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-checkbox-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-checkbox>请选择字典生成</el-checkbox>
|
<el-checkbox-group v-model="form.${field}">
|
||||||
</el-checkbox-group>
|
<el-checkbox>请选择字典生成</el-checkbox>
|
||||||
</el-form-item>
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "radio" && "" != $dictType)
|
#elseif($column.htmlType == "radio" && "" != $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-radio-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-radio
|
<el-radio-group v-model="form.${field}">
|
||||||
v-for="dict in dict.type.${dictType}"
|
<el-radio
|
||||||
:key="dict.value"
|
v-for="dict in dict.type.${dictType}"
|
||||||
|
:key="dict.value"
|
||||||
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
||||||
:label="parseInt(dict.value)"
|
:label="parseInt(dict.value)"
|
||||||
#else
|
#else
|
||||||
:label="dict.value"
|
:label="dict.value"
|
||||||
#end
|
#end
|
||||||
>{{dict.label}}</el-radio>
|
>{{dict.label}}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "radio" && $dictType)
|
#elseif($column.htmlType == "radio" && $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-radio-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-radio label="1">请选择字典生成</el-radio>
|
<el-radio-group v-model="form.${field}">
|
||||||
</el-radio-group>
|
<el-radio label="1">请选择字典生成</el-radio>
|
||||||
</el-form-item>
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "datetime")
|
#elseif($column.htmlType == "datetime")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-date-picker clearable
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
v-model="form.${field}"
|
<el-date-picker clearable
|
||||||
type="date"
|
v-model="form.${field}"
|
||||||
value-format="yyyy-MM-dd"
|
type="date"
|
||||||
placeholder="请选择${comment}">
|
value-format="yyyy-MM-dd"
|
||||||
</el-date-picker>
|
placeholder="请选择${comment}">
|
||||||
</el-form-item>
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "textarea")
|
#elseif($column.htmlType == "textarea")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="24">
|
||||||
<el-input v-model="form.${field}" type="textarea" placeholder="请输入内容" />
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<el-input v-model="form.${field}" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
|
</el-row>
|
||||||
#if($table.sub)
|
#if($table.sub)
|
||||||
<el-divider content-position="center">${subTable.functionName}信息</el-divider>
|
<el-divider content-position="center">${subTable.functionName}信息</el-divider>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
@@ -354,9 +400,15 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"
|
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"
|
||||||
|
#if($genView)
|
||||||
|
import ${BusinessName}ViewDrawer from "./view"
|
||||||
|
#end
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "${BusinessName}",
|
name: "${BusinessName}",
|
||||||
|
#if($genView)
|
||||||
|
components: { ${BusinessName}ViewDrawer },
|
||||||
|
#end
|
||||||
#if(${dicts} != '')
|
#if(${dicts} != '')
|
||||||
dicts: [${dicts}],
|
dicts: [${dicts}],
|
||||||
#end
|
#end
|
||||||
@@ -493,7 +545,7 @@ export default {
|
|||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.${pkColumn.javaField})
|
this.ids = selection.map(item => item.${pkColumn.javaField})
|
||||||
this.single = selection.length!==1
|
this.single = selection.length !== 1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
@@ -590,6 +642,12 @@ export default {
|
|||||||
handle${subClassName}SelectionChange(selection) {
|
handle${subClassName}SelectionChange(selection) {
|
||||||
this.checked${subClassName} = selection.map(item => item.index)
|
this.checked${subClassName} = selection.map(item => item.index)
|
||||||
},
|
},
|
||||||
|
#end
|
||||||
|
#if($genView)
|
||||||
|
/** 详情按钮操作 */
|
||||||
|
handleViewData(row) {
|
||||||
|
this.#[[$]]#refs["${businessName}ViewRef"].open(row.${pkColumn.javaField})
|
||||||
|
},
|
||||||
#end
|
#end
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
|
|||||||
@@ -136,6 +136,9 @@
|
|||||||
#end
|
#end
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
#if($genView)
|
||||||
|
<el-button link type="primary" icon="View" @click="handleViewData(scope.row)" v-hasPermi="['${permissionPrefix}:query']">详情</el-button>
|
||||||
|
#end
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${permissionPrefix}:edit']">修改</el-button>
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${permissionPrefix}:edit']">修改</el-button>
|
||||||
<el-button link type="primary" icon="Plus" @click="handleAdd(scope.row)" v-hasPermi="['${permissionPrefix}:add']">新增</el-button>
|
<el-button link type="primary" icon="Plus" @click="handleAdd(scope.row)" v-hasPermi="['${permissionPrefix}:add']">新增</el-button>
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${permissionPrefix}:remove']">删除</el-button>
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${permissionPrefix}:remove']">删除</el-button>
|
||||||
@@ -143,9 +146,21 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
|
#if($genView)
|
||||||
|
<!-- ${functionName}详情抽屉 -->
|
||||||
|
<${businessName}-view-drawer ref="${businessName}ViewRef" />
|
||||||
|
#end
|
||||||
<!-- 添加或修改${functionName}对话框 -->
|
<!-- 添加或修改${functionName}对话框 -->
|
||||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
#if($table.formColNum == 2)
|
||||||
<el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="80px">
|
#set($dialogWidth = "800px")
|
||||||
|
#elseif($table.formColNum == 3)
|
||||||
|
#set($dialogWidth = "1100px")
|
||||||
|
#else
|
||||||
|
#set($dialogWidth = "500px")
|
||||||
|
#end
|
||||||
|
<el-dialog :title="title" v-model="open" width="${dialogWidth}" append-to-body>
|
||||||
|
<el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-row>
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#set($field=$column.javaField)
|
#set($field=$column.javaField)
|
||||||
#if($column.insert && !$column.pk)
|
#if($column.insert && !$column.pk)
|
||||||
@@ -158,107 +173,134 @@
|
|||||||
#end
|
#end
|
||||||
#set($dictType=$column.dictType)
|
#set($dictType=$column.dictType)
|
||||||
#if("" != $treeParentCode && $column.javaField == $treeParentCode)
|
#if("" != $treeParentCode && $column.javaField == $treeParentCode)
|
||||||
<el-form-item label="${comment}" prop="${treeParentCode}">
|
<el-col :span="${colSpan}">
|
||||||
<el-tree-select
|
<el-form-item label="${comment}" prop="${treeParentCode}">
|
||||||
v-model="form.${treeParentCode}"
|
<el-tree-select
|
||||||
:data="${businessName}Options"
|
v-model="form.${treeParentCode}"
|
||||||
:props="{ value: '${treeCode}', label: '${treeName}', children: 'children' }"
|
:data="${businessName}Options"
|
||||||
value-key="${treeCode}"
|
:props="{ value: '${treeCode}', label: '${treeName}', children: 'children' }"
|
||||||
placeholder="请选择${comment}"
|
value-key="${treeCode}"
|
||||||
check-strictly
|
placeholder="请选择${comment}"
|
||||||
/>
|
check-strictly
|
||||||
</el-form-item>
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "input")
|
#elseif($column.htmlType == "input")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-input v-model="form.${field}" placeholder="请输入${comment}" />
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<el-input v-model="form.${field}" placeholder="请输入${comment}" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "imageUpload")
|
#elseif($column.htmlType == "imageUpload")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<image-upload v-model="form.${field}"/>
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<image-upload v-model="form.${field}"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "fileUpload")
|
#elseif($column.htmlType == "fileUpload")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<file-upload v-model="form.${field}"/>
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<file-upload v-model="form.${field}"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "editor")
|
#elseif($column.htmlType == "editor")
|
||||||
<el-form-item label="${comment}">
|
<el-col :span="24">
|
||||||
<editor v-model="form.${field}" :min-height="192"/>
|
<el-form-item label="${comment}">
|
||||||
</el-form-item>
|
<editor v-model="form.${field}" :min-height="192"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "select" && "" != $dictType)
|
#elseif($column.htmlType == "select" && "" != $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-option
|
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
||||||
v-for="dict in ${dictType}"
|
<el-option
|
||||||
:key="dict.value"
|
v-for="dict in ${dictType}"
|
||||||
:label="dict.label"
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
||||||
:value="parseInt(dict.value)"
|
:value="parseInt(dict.value)"
|
||||||
#else
|
#else
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
#end
|
#end
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "select" && $dictType)
|
#elseif($column.htmlType == "select" && $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-option label="请选择字典生成" value="" />
|
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
||||||
</el-select>
|
<el-option label="请选择字典生成" value="" />
|
||||||
</el-form-item>
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "checkbox" && "" != $dictType)
|
#elseif($column.htmlType == "checkbox" && "" != $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-checkbox-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-checkbox
|
<el-checkbox-group v-model="form.${field}">
|
||||||
v-for="dict in ${dictType}"
|
<el-checkbox
|
||||||
:key="dict.value"
|
v-for="dict in ${dictType}"
|
||||||
:label="dict.value">
|
:key="dict.value"
|
||||||
{{dict.label}}
|
:label="dict.value">
|
||||||
</el-checkbox>
|
{{dict.label}}
|
||||||
</el-checkbox-group>
|
</el-checkbox>
|
||||||
</el-form-item>
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "checkbox" && $dictType)
|
#elseif($column.htmlType == "checkbox" && $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-checkbox-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-checkbox>请选择字典生成</el-checkbox>
|
<el-checkbox-group v-model="form.${field}">
|
||||||
</el-checkbox-group>
|
<el-checkbox>请选择字典生成</el-checkbox>
|
||||||
</el-form-item>
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "radio" && "" != $dictType)
|
#elseif($column.htmlType == "radio" && "" != $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-radio-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-radio
|
<el-radio-group v-model="form.${field}">
|
||||||
v-for="dict in ${dictType}"
|
<el-radio
|
||||||
:key="dict.value"
|
v-for="dict in ${dictType}"
|
||||||
|
:key="dict.value"
|
||||||
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
||||||
:label="parseInt(dict.value)"
|
:label="parseInt(dict.value)"
|
||||||
#else
|
#else
|
||||||
:label="dict.value"
|
:label="dict.value"
|
||||||
#end
|
#end
|
||||||
>{{dict.label}}</el-radio>
|
>{{dict.label}}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "radio" && $dictType)
|
#elseif($column.htmlType == "radio" && $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-radio-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-radio label="1">请选择字典生成</el-radio>
|
<el-radio-group v-model="form.${field}">
|
||||||
</el-radio-group>
|
<el-radio label="1">请选择字典生成</el-radio>
|
||||||
</el-form-item>
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "datetime")
|
#elseif($column.htmlType == "datetime")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-date-picker clearable
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
v-model="form.${field}"
|
<el-date-picker clearable
|
||||||
type="date"
|
v-model="form.${field}"
|
||||||
value-format="YYYY-MM-DD"
|
type="date"
|
||||||
placeholder="选择${comment}">
|
value-format="YYYY-MM-DD"
|
||||||
</el-date-picker>
|
placeholder="选择${comment}">
|
||||||
</el-form-item>
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "textarea")
|
#elseif($column.htmlType == "textarea")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="24">
|
||||||
<el-input v-model="form.${field}" type="textarea" placeholder="请输入内容" />
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<el-input v-model="form.${field}" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
@@ -272,11 +314,14 @@
|
|||||||
|
|
||||||
<script setup name="${BusinessName}">
|
<script setup name="${BusinessName}">
|
||||||
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"
|
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"
|
||||||
|
#if($genView)
|
||||||
|
import ${BusinessName}ViewDrawer from "./view"
|
||||||
|
#end
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
#if(${dicts} != '')
|
#if(${dicts} != '')
|
||||||
#set($dictsNoSymbol=$dicts.replace("'", ""))
|
#set($dictsNoSymbol=$dicts.replace("'", ""))
|
||||||
const { ${dictsNoSymbol} } = proxy.useDict(${dicts})
|
const { ${dictsNoSymbol} } = useDict(${dicts})
|
||||||
#end
|
#end
|
||||||
|
|
||||||
const ${businessName}List = ref([])
|
const ${businessName}List = ref([])
|
||||||
@@ -299,7 +344,7 @@ const data = reactive({
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
#foreach ($column in $columns)
|
#foreach ($column in $columns)
|
||||||
#if($column.query)
|
#if($column.query)
|
||||||
$column.javaField: null#if($foreach.count != $columns.size()),#end
|
$column.javaField: undefined#if($foreach.count != $columns.size()),#end
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
},
|
},
|
||||||
@@ -356,13 +401,13 @@ function getTreeselect() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 取消按钮
|
/** 取消按钮 */
|
||||||
function cancel() {
|
function cancel() {
|
||||||
open.value = false
|
open.value = false
|
||||||
reset()
|
reset()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 表单重置
|
/** 表单重置 */
|
||||||
function reset() {
|
function reset() {
|
||||||
form.value = {
|
form.value = {
|
||||||
#foreach ($column in $columns)
|
#foreach ($column in $columns)
|
||||||
@@ -414,6 +459,13 @@ function toggleExpandAll() {
|
|||||||
refreshTable.value = true
|
refreshTable.value = true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
#if($genView)
|
||||||
|
|
||||||
|
/** 详情按钮操作 */
|
||||||
|
function handleViewData(row) {
|
||||||
|
proxy.#[[$]]#refs["${businessName}ViewRef"].open(row.${pkColumn.javaField})
|
||||||
|
}
|
||||||
|
#end
|
||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
async function handleUpdate(row) {
|
async function handleUpdate(row) {
|
||||||
@@ -444,13 +496,13 @@ function submitForm() {
|
|||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
if (form.value.${pkColumn.javaField} != null) {
|
if (form.value.${pkColumn.javaField} != null) {
|
||||||
update${BusinessName}(form.value).then(response => {
|
update${BusinessName}(form.value).then(() => {
|
||||||
proxy.#[[$modal]]#.msgSuccess("修改成功")
|
proxy.#[[$modal]]#.msgSuccess("修改成功")
|
||||||
open.value = false
|
open.value = false
|
||||||
getList()
|
getList()
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
add${BusinessName}(form.value).then(response => {
|
add${BusinessName}(form.value).then(() => {
|
||||||
proxy.#[[$modal]]#.msgSuccess("新增成功")
|
proxy.#[[$modal]]#.msgSuccess("新增成功")
|
||||||
open.value = false
|
open.value = false
|
||||||
getList()
|
getList()
|
||||||
|
|||||||
@@ -148,6 +148,9 @@
|
|||||||
#end
|
#end
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
#if($genView)
|
||||||
|
<el-button link type="primary" icon="View" @click="handleViewData(scope.row)" v-hasPermi="['${permissionPrefix}:query']">详情</el-button>
|
||||||
|
#end
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${permissionPrefix}:edit']">修改</el-button>
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${permissionPrefix}:edit']">修改</el-button>
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${permissionPrefix}:remove']">删除</el-button>
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${permissionPrefix}:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -162,9 +165,21 @@
|
|||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
#if($genView)
|
||||||
|
<!-- ${functionName}详情抽屉 -->
|
||||||
|
<${businessName}-view-drawer ref="${businessName}ViewRef" />
|
||||||
|
#end
|
||||||
<!-- 添加或修改${functionName}对话框 -->
|
<!-- 添加或修改${functionName}对话框 -->
|
||||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
#if($table.formColNum == 2)
|
||||||
<el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="80px">
|
#set($dialogWidth = "800px")
|
||||||
|
#elseif($table.formColNum == 3)
|
||||||
|
#set($dialogWidth = "1100px")
|
||||||
|
#else
|
||||||
|
#set($dialogWidth = "500px")
|
||||||
|
#end
|
||||||
|
<el-dialog :title="title" v-model="open" width="${dialogWidth}" append-to-body>
|
||||||
|
<el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-row>
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#set($field=$column.javaField)
|
#set($field=$column.javaField)
|
||||||
#if($column.insert && !$column.pk)
|
#if($column.insert && !$column.pk)
|
||||||
@@ -177,96 +192,121 @@
|
|||||||
#end
|
#end
|
||||||
#set($dictType=$column.dictType)
|
#set($dictType=$column.dictType)
|
||||||
#if($column.htmlType == "input")
|
#if($column.htmlType == "input")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-input v-model="form.${field}" placeholder="请输入${comment}" />
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<el-input v-model="form.${field}" placeholder="请输入${comment}" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "imageUpload")
|
#elseif($column.htmlType == "imageUpload")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<image-upload v-model="form.${field}"/>
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<image-upload v-model="form.${field}"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "fileUpload")
|
#elseif($column.htmlType == "fileUpload")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<file-upload v-model="form.${field}"/>
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<file-upload v-model="form.${field}"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "editor")
|
#elseif($column.htmlType == "editor")
|
||||||
<el-form-item label="${comment}">
|
<el-col :span="24">
|
||||||
<editor v-model="form.${field}" :min-height="192"/>
|
<el-form-item label="${comment}">
|
||||||
</el-form-item>
|
<editor v-model="form.${field}" :min-height="192"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "select" && "" != $dictType)
|
#elseif($column.htmlType == "select" && "" != $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-option
|
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
||||||
v-for="dict in ${dictType}"
|
<el-option
|
||||||
:key="dict.value"
|
v-for="dict in ${dictType}"
|
||||||
:label="dict.label"
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
||||||
:value="parseInt(dict.value)"
|
:value="parseInt(dict.value)"
|
||||||
#else
|
#else
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
#end
|
#end
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "select" && $dictType)
|
#elseif($column.htmlType == "select" && $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-option label="请选择字典生成" value="" />
|
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
||||||
</el-select>
|
<el-option label="请选择字典生成" value="" />
|
||||||
</el-form-item>
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "checkbox" && "" != $dictType)
|
#elseif($column.htmlType == "checkbox" && "" != $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-checkbox-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-checkbox
|
<el-checkbox-group v-model="form.${field}">
|
||||||
v-for="dict in ${dictType}"
|
<el-checkbox
|
||||||
:key="dict.value"
|
v-for="dict in ${dictType}"
|
||||||
:label="dict.value">
|
:key="dict.value"
|
||||||
{{dict.label}}
|
:label="dict.value">
|
||||||
</el-checkbox>
|
{{dict.label}}
|
||||||
</el-checkbox-group>
|
</el-checkbox>
|
||||||
</el-form-item>
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "checkbox" && $dictType)
|
#elseif($column.htmlType == "checkbox" && $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-checkbox-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-checkbox>请选择字典生成</el-checkbox>
|
<el-checkbox-group v-model="form.${field}">
|
||||||
</el-checkbox-group>
|
<el-checkbox>请选择字典生成</el-checkbox>
|
||||||
</el-form-item>
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "radio" && "" != $dictType)
|
#elseif($column.htmlType == "radio" && "" != $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-radio-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-radio
|
<el-radio-group v-model="form.${field}">
|
||||||
v-for="dict in ${dictType}"
|
<el-radio
|
||||||
:key="dict.value"
|
v-for="dict in ${dictType}"
|
||||||
|
:key="dict.value"
|
||||||
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
||||||
:label="parseInt(dict.value)"
|
:label="parseInt(dict.value)"
|
||||||
#else
|
#else
|
||||||
:label="dict.value"
|
:label="dict.value"
|
||||||
#end
|
#end
|
||||||
>{{dict.label}}</el-radio>
|
>{{dict.label}}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "radio" && $dictType)
|
#elseif($column.htmlType == "radio" && $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-radio-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-radio label="1">请选择字典生成</el-radio>
|
<el-radio-group v-model="form.${field}">
|
||||||
</el-radio-group>
|
<el-radio label="1">请选择字典生成</el-radio>
|
||||||
</el-form-item>
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "datetime")
|
#elseif($column.htmlType == "datetime")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-date-picker clearable
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
v-model="form.${field}"
|
<el-date-picker clearable
|
||||||
type="date"
|
v-model="form.${field}"
|
||||||
value-format="YYYY-MM-DD"
|
type="date"
|
||||||
placeholder="请选择${comment}">
|
value-format="YYYY-MM-DD"
|
||||||
</el-date-picker>
|
placeholder="请选择${comment}">
|
||||||
</el-form-item>
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "textarea")
|
#elseif($column.htmlType == "textarea")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="24">
|
||||||
<el-input v-model="form.${field}" type="textarea" placeholder="请输入内容" />
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<el-input v-model="form.${field}" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
|
</el-row>
|
||||||
#if($table.sub)
|
#if($table.sub)
|
||||||
<el-divider content-position="center">${subTable.functionName}信息</el-divider>
|
<el-divider content-position="center">${subTable.functionName}信息</el-divider>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
@@ -277,9 +317,13 @@
|
|||||||
<el-button type="danger" icon="Delete" @click="handleDelete${subClassName}">删除</el-button>
|
<el-button type="danger" icon="Delete" @click="handleDelete${subClassName}">删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table :data="${subclassName}List" :row-class-name="row${subClassName}Index" @selection-change="handle${subClassName}SelectionChange" ref="${subclassName}">
|
<el-table :data="${subclassName}List" @selection-change="handle${subClassName}SelectionChange" ref="${subclassName}">
|
||||||
<el-table-column type="selection" width="50" align="center" />
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
<el-table-column label="序号" align="center" prop="index" width="50"/>
|
<el-table-column label="序号" width="60">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
{{ $index + 1 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
#foreach($column in $subTable.columns)
|
#foreach($column in $subTable.columns)
|
||||||
#set($javaField=$column.javaField)
|
#set($javaField=$column.javaField)
|
||||||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||||
@@ -344,11 +388,14 @@
|
|||||||
|
|
||||||
<script setup name="${BusinessName}">
|
<script setup name="${BusinessName}">
|
||||||
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"
|
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"
|
||||||
|
#if($genView)
|
||||||
|
import ${BusinessName}ViewDrawer from "./view"
|
||||||
|
#end
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
#if(${dicts} != '')
|
#if(${dicts} != '')
|
||||||
#set($dictsNoSymbol=$dicts.replace("'", ""))
|
#set($dictsNoSymbol=$dicts.replace("'", ""))
|
||||||
const { ${dictsNoSymbol} } = proxy.useDict(${dicts})
|
const { ${dictsNoSymbol} } = useDict(${dicts})
|
||||||
#end
|
#end
|
||||||
|
|
||||||
const ${businessName}List = ref([])
|
const ${businessName}List = ref([])
|
||||||
@@ -380,7 +427,7 @@ const data = reactive({
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
#foreach ($column in $columns)
|
#foreach ($column in $columns)
|
||||||
#if($column.query)
|
#if($column.query)
|
||||||
$column.javaField: null#if($foreach.count != $columns.size()),#end
|
$column.javaField: undefined#if($foreach.count != $columns.size()),#end
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
},
|
},
|
||||||
@@ -428,13 +475,13 @@ function getList() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 取消按钮
|
/** 取消按钮 */
|
||||||
function cancel() {
|
function cancel() {
|
||||||
open.value = false
|
open.value = false
|
||||||
reset()
|
reset()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 表单重置
|
/** 表单重置 */
|
||||||
function reset() {
|
function reset() {
|
||||||
form.value = {
|
form.value = {
|
||||||
#foreach ($column in $columns)
|
#foreach ($column in $columns)
|
||||||
@@ -469,7 +516,7 @@ function resetQuery() {
|
|||||||
handleQuery()
|
handleQuery()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 多选框选中数据
|
/** 多选框选中数据 */
|
||||||
function handleSelectionChange(selection) {
|
function handleSelectionChange(selection) {
|
||||||
ids.value = selection.map(item => item.${pkColumn.javaField})
|
ids.value = selection.map(item => item.${pkColumn.javaField})
|
||||||
single.value = selection.length != 1
|
single.value = selection.length != 1
|
||||||
@@ -515,13 +562,13 @@ function submitForm() {
|
|||||||
form.value.${subclassName}List = ${subclassName}List.value
|
form.value.${subclassName}List = ${subclassName}List.value
|
||||||
#end
|
#end
|
||||||
if (form.value.${pkColumn.javaField} != null) {
|
if (form.value.${pkColumn.javaField} != null) {
|
||||||
update${BusinessName}(form.value).then(response => {
|
update${BusinessName}(form.value).then(() => {
|
||||||
proxy.#[[$modal]]#.msgSuccess("修改成功")
|
proxy.#[[$modal]]#.msgSuccess("修改成功")
|
||||||
open.value = false
|
open.value = false
|
||||||
getList()
|
getList()
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
add${BusinessName}(form.value).then(response => {
|
add${BusinessName}(form.value).then(() => {
|
||||||
proxy.#[[$modal]]#.msgSuccess("新增成功")
|
proxy.#[[$modal]]#.msgSuccess("新增成功")
|
||||||
open.value = false
|
open.value = false
|
||||||
getList()
|
getList()
|
||||||
@@ -543,18 +590,13 @@ function handleDelete(row) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if($table.sub)
|
#if($table.sub)
|
||||||
/** ${subTable.functionName}序号 */
|
|
||||||
function row${subClassName}Index({ row, rowIndex }) {
|
|
||||||
row.index = rowIndex + 1
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ${subTable.functionName}添加按钮操作 */
|
/** ${subTable.functionName}添加按钮操作 */
|
||||||
function handleAdd${subClassName}() {
|
function handleAdd${subClassName}() {
|
||||||
let obj = {}
|
let obj = {}
|
||||||
#foreach($column in $subTable.columns)
|
#foreach($column in $subTable.columns)
|
||||||
#if($column.pk || $column.javaField == ${subTableFkclassName})
|
#if($column.pk || $column.javaField == ${subTableFkclassName})
|
||||||
#elseif($column.list && "" != $javaField)
|
#elseif($column.list && "" != $javaField)
|
||||||
obj.$column.javaField = ""
|
obj.$column.javaField = undefined
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
${subclassName}List.value.push(obj)
|
${subclassName}List.value.push(obj)
|
||||||
@@ -578,6 +620,13 @@ function handle${subClassName}SelectionChange(selection) {
|
|||||||
checked${subClassName}.value = selection.map(item => item.index)
|
checked${subClassName}.value = selection.map(item => item.index)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#end
|
||||||
|
#if($genView)
|
||||||
|
/** 详情按钮操作 */
|
||||||
|
function handleViewData(row) {
|
||||||
|
proxy.#[[$]]#refs["${businessName}ViewRef"].open(row.${pkColumn.javaField})
|
||||||
|
}
|
||||||
|
|
||||||
#end
|
#end
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
function handleExport() {
|
function handleExport() {
|
||||||
|
|||||||
83
ruoyi-generator/src/main/resources/vm/vue/v3/view.vue.vm
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
<template>
|
||||||
|
<el-drawer title="${functionName}详情" v-model="visible" direction="rtl" size="60%" append-to-body :before-close="handleClose" class="detail-drawer">
|
||||||
|
<div v-loading="loading" class="drawer-content">
|
||||||
|
<h4 class="section-header">基本信息</h4>
|
||||||
|
#set($i = 0)
|
||||||
|
#foreach($column in $columns)
|
||||||
|
#if(!$column.pk && $column.list)
|
||||||
|
#set($dictType=$column.dictType)
|
||||||
|
#set($javaField=$column.javaField)
|
||||||
|
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||||
|
#if($parentheseIndex != -1)
|
||||||
|
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
||||||
|
#else
|
||||||
|
#set($comment=$column.columnComment)
|
||||||
|
#end
|
||||||
|
#if($i % 2 == 0)
|
||||||
|
<el-row :gutter="20" class="mb8">
|
||||||
|
#end
|
||||||
|
<el-col :span="12">
|
||||||
|
<div class="info-item">
|
||||||
|
<label class="info-label">${comment}:</label>
|
||||||
|
<span class="info-value plaintext">
|
||||||
|
#if("" != $dictType)
|
||||||
|
#if($column.htmlType == "checkbox")
|
||||||
|
<dict-tag :options="${dictType}" :value="info.${javaField} ? info.${javaField}.split(',') : []" />
|
||||||
|
#else
|
||||||
|
<dict-tag :options="${dictType}" :value="info.${javaField}" />
|
||||||
|
#end
|
||||||
|
#elseif($column.htmlType == "datetime")
|
||||||
|
{{ parseTime(info.${javaField}, '{y}-{m}-{d}') }}
|
||||||
|
#elseif($column.htmlType == "imageUpload")
|
||||||
|
<image-preview :src="info.${javaField}" :width="60" :height="60" />
|
||||||
|
#else
|
||||||
|
{{ info.${javaField} }}
|
||||||
|
#end
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
#set($i = $i + 1)
|
||||||
|
#if($i % 2 == 0)
|
||||||
|
</el-row>
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
#if($i % 2 != 0)
|
||||||
|
</el-row>
|
||||||
|
#end
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="${BusinessName}ViewDrawer">
|
||||||
|
import { get${BusinessName} } from '@/api/${moduleName}/${businessName}'
|
||||||
|
|
||||||
|
#if(${dicts} != '')
|
||||||
|
#set($dictsNoSymbol=$dicts.replace("'", ""))
|
||||||
|
const { ${dictsNoSymbol} } = useDict(${dicts})
|
||||||
|
#end
|
||||||
|
|
||||||
|
const visible = ref(false)
|
||||||
|
const loading = ref(false)
|
||||||
|
const info = reactive({})
|
||||||
|
|
||||||
|
const open = async (${pkColumn.javaField}) => {
|
||||||
|
visible.value = true
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
const res = await get${BusinessName}(${pkColumn.javaField})
|
||||||
|
Object.assign(info, res.data || {})
|
||||||
|
} catch (error) {
|
||||||
|
console.error('获取${functionName}信息失败:', error)
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleClose() {
|
||||||
|
visible.value = false
|
||||||
|
Object.keys(info).forEach(key => delete info[key])
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({ open })
|
||||||
|
</script>
|
||||||
@@ -136,6 +136,9 @@
|
|||||||
#end
|
#end
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
#if($genView)
|
||||||
|
<el-button link type="primary" icon="View" @click="handleViewData(scope.row)" v-hasPermi="['${permissionPrefix}:query']">详情</el-button>
|
||||||
|
#end
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${permissionPrefix}:edit']">修改</el-button>
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${permissionPrefix}:edit']">修改</el-button>
|
||||||
<el-button link type="primary" icon="Plus" @click="handleAdd(scope.row)" v-hasPermi="['${permissionPrefix}:add']">新增</el-button>
|
<el-button link type="primary" icon="Plus" @click="handleAdd(scope.row)" v-hasPermi="['${permissionPrefix}:add']">新增</el-button>
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${permissionPrefix}:remove']">删除</el-button>
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${permissionPrefix}:remove']">删除</el-button>
|
||||||
@@ -143,9 +146,21 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
|
#if($genView)
|
||||||
|
<!-- ${functionName}详情抽屉 -->
|
||||||
|
<${businessName}-view-drawer ref="${businessName}ViewRef" />
|
||||||
|
#end
|
||||||
<!-- 添加或修改${functionName}对话框 -->
|
<!-- 添加或修改${functionName}对话框 -->
|
||||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
#if($table.formColNum == 2)
|
||||||
<el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="80px">
|
#set($dialogWidth = "800px")
|
||||||
|
#elseif($table.formColNum == 3)
|
||||||
|
#set($dialogWidth = "1100px")
|
||||||
|
#else
|
||||||
|
#set($dialogWidth = "500px")
|
||||||
|
#end
|
||||||
|
<el-dialog :title="title" v-model="open" width="${dialogWidth}" append-to-body>
|
||||||
|
<el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-row>
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#set($field=$column.javaField)
|
#set($field=$column.javaField)
|
||||||
#if($column.insert && !$column.pk)
|
#if($column.insert && !$column.pk)
|
||||||
@@ -158,107 +173,134 @@
|
|||||||
#end
|
#end
|
||||||
#set($dictType=$column.dictType)
|
#set($dictType=$column.dictType)
|
||||||
#if("" != $treeParentCode && $column.javaField == $treeParentCode)
|
#if("" != $treeParentCode && $column.javaField == $treeParentCode)
|
||||||
<el-form-item label="${comment}" prop="${treeParentCode}">
|
<el-col :span="${colSpan}">
|
||||||
<el-tree-select
|
<el-form-item label="${comment}" prop="${treeParentCode}">
|
||||||
v-model="form.${treeParentCode}"
|
<el-tree-select
|
||||||
:data="${businessName}Options"
|
v-model="form.${treeParentCode}"
|
||||||
:props="{ value: '${treeCode}', label: '${treeName}', children: 'children' }"
|
:data="${businessName}Options"
|
||||||
value-key="${treeCode}"
|
:props="{ value: '${treeCode}', label: '${treeName}', children: 'children' }"
|
||||||
placeholder="请选择${comment}"
|
value-key="${treeCode}"
|
||||||
check-strictly
|
placeholder="请选择${comment}"
|
||||||
/>
|
check-strictly
|
||||||
</el-form-item>
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "input")
|
#elseif($column.htmlType == "input")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-input v-model="form.${field}" placeholder="请输入${comment}" />
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<el-input v-model="form.${field}" placeholder="请输入${comment}" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "imageUpload")
|
#elseif($column.htmlType == "imageUpload")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<image-upload v-model="form.${field}"/>
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<image-upload v-model="form.${field}"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "fileUpload")
|
#elseif($column.htmlType == "fileUpload")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<file-upload v-model="form.${field}"/>
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<file-upload v-model="form.${field}"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "editor")
|
#elseif($column.htmlType == "editor")
|
||||||
<el-form-item label="${comment}">
|
<el-col :span="24">
|
||||||
<editor v-model="form.${field}" :min-height="192"/>
|
<el-form-item label="${comment}">
|
||||||
</el-form-item>
|
<editor v-model="form.${field}" :min-height="192"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "select" && "" != $dictType)
|
#elseif($column.htmlType == "select" && "" != $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-option
|
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
||||||
v-for="dict in ${dictType}"
|
<el-option
|
||||||
:key="dict.value"
|
v-for="dict in ${dictType}"
|
||||||
:label="dict.label"
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
||||||
:value="parseInt(dict.value)"
|
:value="parseInt(dict.value)"
|
||||||
#else
|
#else
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
#end
|
#end
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "select" && $dictType)
|
#elseif($column.htmlType == "select" && $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-option label="请选择字典生成" value="" />
|
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
||||||
</el-select>
|
<el-option label="请选择字典生成" value="" />
|
||||||
</el-form-item>
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "checkbox" && "" != $dictType)
|
#elseif($column.htmlType == "checkbox" && "" != $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-checkbox-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-checkbox
|
<el-checkbox-group v-model="form.${field}">
|
||||||
v-for="dict in ${dictType}"
|
<el-checkbox
|
||||||
:key="dict.value"
|
v-for="dict in ${dictType}"
|
||||||
:label="dict.value">
|
:key="dict.value"
|
||||||
{{dict.label}}
|
:label="dict.value">
|
||||||
</el-checkbox>
|
{{dict.label}}
|
||||||
</el-checkbox-group>
|
</el-checkbox>
|
||||||
</el-form-item>
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "checkbox" && $dictType)
|
#elseif($column.htmlType == "checkbox" && $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-checkbox-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-checkbox>请选择字典生成</el-checkbox>
|
<el-checkbox-group v-model="form.${field}">
|
||||||
</el-checkbox-group>
|
<el-checkbox>请选择字典生成</el-checkbox>
|
||||||
</el-form-item>
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "radio" && "" != $dictType)
|
#elseif($column.htmlType == "radio" && "" != $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-radio-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-radio
|
<el-radio-group v-model="form.${field}">
|
||||||
v-for="dict in ${dictType}"
|
<el-radio
|
||||||
:key="dict.value"
|
v-for="dict in ${dictType}"
|
||||||
|
:key="dict.value"
|
||||||
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
||||||
:label="parseInt(dict.value)"
|
:label="parseInt(dict.value)"
|
||||||
#else
|
#else
|
||||||
:label="dict.value"
|
:label="dict.value"
|
||||||
#end
|
#end
|
||||||
>{{dict.label}}</el-radio>
|
>{{dict.label}}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "radio" && $dictType)
|
#elseif($column.htmlType == "radio" && $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-radio-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-radio label="1">请选择字典生成</el-radio>
|
<el-radio-group v-model="form.${field}">
|
||||||
</el-radio-group>
|
<el-radio label="1">请选择字典生成</el-radio>
|
||||||
</el-form-item>
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "datetime")
|
#elseif($column.htmlType == "datetime")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-date-picker clearable
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
v-model="form.${field}"
|
<el-date-picker clearable
|
||||||
type="date"
|
v-model="form.${field}"
|
||||||
value-format="YYYY-MM-DD"
|
type="date"
|
||||||
placeholder="选择${comment}">
|
value-format="YYYY-MM-DD"
|
||||||
</el-date-picker>
|
placeholder="选择${comment}">
|
||||||
</el-form-item>
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "textarea")
|
#elseif($column.htmlType == "textarea")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="24">
|
||||||
<el-input v-model="form.${field}" type="textarea" placeholder="请输入内容" />
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<el-input v-model="form.${field}" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
@@ -272,13 +314,16 @@
|
|||||||
|
|
||||||
<script setup lang="ts" name="${BusinessName}">
|
<script setup lang="ts" name="${BusinessName}">
|
||||||
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"
|
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"
|
||||||
|
#if($genView)
|
||||||
|
import ${BusinessName}ViewDrawer from "./view.vue"
|
||||||
|
#end
|
||||||
import type { ${ClassName}, ${BusinessName}QueryParams } from "@/types/api/${moduleName}/${businessName}"
|
import type { ${ClassName}, ${BusinessName}QueryParams } from "@/types/api/${moduleName}/${businessName}"
|
||||||
import type { TreeSelect } from '@/types/api/common'
|
import type { TreeSelect } from '@/types/api/common'
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
#if(${dicts} != '')
|
#if(${dicts} != '')
|
||||||
#set($dictsNoSymbol=$dicts.replace("'", ""))
|
#set($dictsNoSymbol=$dicts.replace("'", ""))
|
||||||
const { ${dictsNoSymbol} } = proxy.useDict(${dicts})
|
const { ${dictsNoSymbol} } = useDict(${dicts})
|
||||||
#end
|
#end
|
||||||
|
|
||||||
const ${businessName}List = ref<any[]>([])
|
const ${businessName}List = ref<any[]>([])
|
||||||
@@ -358,13 +403,13 @@ function getTreeselect() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 取消按钮
|
/** 取消按钮 */
|
||||||
function cancel() {
|
function cancel() {
|
||||||
open.value = false
|
open.value = false
|
||||||
reset()
|
reset()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 表单重置
|
/** 表单重置 */
|
||||||
function reset() {
|
function reset() {
|
||||||
form.value = {
|
form.value = {
|
||||||
#foreach ($column in $columns)
|
#foreach ($column in $columns)
|
||||||
@@ -416,6 +461,13 @@ function toggleExpandAll() {
|
|||||||
refreshTable.value = true
|
refreshTable.value = true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
#if($genView)
|
||||||
|
|
||||||
|
/** 详情按钮操作 */
|
||||||
|
function handleViewData(row: ${ClassName}) {
|
||||||
|
proxy.#[[$]]#refs["${businessName}ViewRef"].open(row.${pkColumn.javaField})
|
||||||
|
}
|
||||||
|
#end
|
||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
async function handleUpdate(row: ${ClassName}) {
|
async function handleUpdate(row: ${ClassName}) {
|
||||||
|
|||||||
@@ -148,6 +148,9 @@
|
|||||||
#end
|
#end
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
#if($genView)
|
||||||
|
<el-button link type="primary" icon="View" @click="handleViewData(scope.row)" v-hasPermi="['${permissionPrefix}:query']">详情</el-button>
|
||||||
|
#end
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${permissionPrefix}:edit']">修改</el-button>
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${permissionPrefix}:edit']">修改</el-button>
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${permissionPrefix}:remove']">删除</el-button>
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${permissionPrefix}:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -162,9 +165,21 @@
|
|||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
#if($genView)
|
||||||
|
<!-- ${functionName}详情抽屉 -->
|
||||||
|
<${businessName}-view-drawer ref="${businessName}ViewRef" />
|
||||||
|
#end
|
||||||
<!-- 添加或修改${functionName}对话框 -->
|
<!-- 添加或修改${functionName}对话框 -->
|
||||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
#if($table.formColNum == 2)
|
||||||
<el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="80px">
|
#set($dialogWidth = "800px")
|
||||||
|
#elseif($table.formColNum == 3)
|
||||||
|
#set($dialogWidth = "1100px")
|
||||||
|
#else
|
||||||
|
#set($dialogWidth = "500px")
|
||||||
|
#end
|
||||||
|
<el-dialog :title="title" v-model="open" width="${dialogWidth}" append-to-body>
|
||||||
|
<el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-row>
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#set($field=$column.javaField)
|
#set($field=$column.javaField)
|
||||||
#if($column.insert && !$column.pk)
|
#if($column.insert && !$column.pk)
|
||||||
@@ -177,96 +192,121 @@
|
|||||||
#end
|
#end
|
||||||
#set($dictType=$column.dictType)
|
#set($dictType=$column.dictType)
|
||||||
#if($column.htmlType == "input")
|
#if($column.htmlType == "input")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-input v-model="form.${field}" placeholder="请输入${comment}" />
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<el-input v-model="form.${field}" placeholder="请输入${comment}" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "imageUpload")
|
#elseif($column.htmlType == "imageUpload")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<image-upload v-model="form.${field}"/>
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<image-upload v-model="form.${field}"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "fileUpload")
|
#elseif($column.htmlType == "fileUpload")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<file-upload v-model="form.${field}"/>
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<file-upload v-model="form.${field}"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "editor")
|
#elseif($column.htmlType == "editor")
|
||||||
<el-form-item label="${comment}">
|
<el-col :span="24">
|
||||||
<editor v-model="form.${field}" :min-height="192"/>
|
<el-form-item label="${comment}">
|
||||||
</el-form-item>
|
<editor v-model="form.${field}" :min-height="192"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "select" && "" != $dictType)
|
#elseif($column.htmlType == "select" && "" != $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-option
|
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
||||||
v-for="dict in ${dictType}"
|
<el-option
|
||||||
:key="dict.value"
|
v-for="dict in ${dictType}"
|
||||||
:label="dict.label"
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
||||||
:value="parseInt(dict.value)"
|
:value="parseInt(dict.value)"
|
||||||
#else
|
#else
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
#end
|
#end
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "select" && $dictType)
|
#elseif($column.htmlType == "select" && $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-option label="请选择字典生成" value="" />
|
<el-select v-model="form.${field}" placeholder="请选择${comment}">
|
||||||
</el-select>
|
<el-option label="请选择字典生成" value="" />
|
||||||
</el-form-item>
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "checkbox" && "" != $dictType)
|
#elseif($column.htmlType == "checkbox" && "" != $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-checkbox-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-checkbox
|
<el-checkbox-group v-model="form.${field}">
|
||||||
v-for="dict in ${dictType}"
|
<el-checkbox
|
||||||
:key="dict.value"
|
v-for="dict in ${dictType}"
|
||||||
:label="dict.value">
|
:key="dict.value"
|
||||||
{{dict.label}}
|
:label="dict.value">
|
||||||
</el-checkbox>
|
{{dict.label}}
|
||||||
</el-checkbox-group>
|
</el-checkbox>
|
||||||
</el-form-item>
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "checkbox" && $dictType)
|
#elseif($column.htmlType == "checkbox" && $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-checkbox-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-checkbox>请选择字典生成</el-checkbox>
|
<el-checkbox-group v-model="form.${field}">
|
||||||
</el-checkbox-group>
|
<el-checkbox>请选择字典生成</el-checkbox>
|
||||||
</el-form-item>
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "radio" && "" != $dictType)
|
#elseif($column.htmlType == "radio" && "" != $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-radio-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-radio
|
<el-radio-group v-model="form.${field}">
|
||||||
v-for="dict in ${dictType}"
|
<el-radio
|
||||||
:key="dict.value"
|
v-for="dict in ${dictType}"
|
||||||
|
:key="dict.value"
|
||||||
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
#if($column.javaType == "Integer" || $column.javaType == "Long")
|
||||||
:label="parseInt(dict.value)"
|
:label="parseInt(dict.value)"
|
||||||
#else
|
#else
|
||||||
:label="dict.value"
|
:label="dict.value"
|
||||||
#end
|
#end
|
||||||
>{{dict.label}}</el-radio>
|
>{{dict.label}}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "radio" && $dictType)
|
#elseif($column.htmlType == "radio" && $dictType)
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-radio-group v-model="form.${field}">
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
<el-radio label="1">请选择字典生成</el-radio>
|
<el-radio-group v-model="form.${field}">
|
||||||
</el-radio-group>
|
<el-radio label="1">请选择字典生成</el-radio>
|
||||||
</el-form-item>
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "datetime")
|
#elseif($column.htmlType == "datetime")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="${colSpan}">
|
||||||
<el-date-picker clearable
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
v-model="form.${field}"
|
<el-date-picker clearable
|
||||||
type="date"
|
v-model="form.${field}"
|
||||||
value-format="YYYY-MM-DD"
|
type="date"
|
||||||
placeholder="请选择${comment}">
|
value-format="YYYY-MM-DD"
|
||||||
</el-date-picker>
|
placeholder="请选择${comment}">
|
||||||
</el-form-item>
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#elseif($column.htmlType == "textarea")
|
#elseif($column.htmlType == "textarea")
|
||||||
<el-form-item label="${comment}" prop="${field}">
|
<el-col :span="24">
|
||||||
<el-input v-model="form.${field}" type="textarea" placeholder="请输入内容" />
|
<el-form-item label="${comment}" prop="${field}">
|
||||||
</el-form-item>
|
<el-input v-model="form.${field}" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
|
</el-row>
|
||||||
#if($table.sub)
|
#if($table.sub)
|
||||||
<el-divider content-position="center">${subTable.functionName}信息</el-divider>
|
<el-divider content-position="center">${subTable.functionName}信息</el-divider>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
@@ -346,18 +386,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="Config">
|
<script setup lang="ts" name="${BusinessName}">
|
||||||
#if($table.sub)
|
#if($table.sub)
|
||||||
import type { ${ClassName}, ${subClassName}, ${BusinessName}QueryParams } from "@/types/api/${moduleName}/${businessName}"
|
import type { ${ClassName}, ${subClassName}, ${BusinessName}QueryParams } from "@/types/api/${moduleName}/${businessName}"
|
||||||
#else
|
#else
|
||||||
import type { ${ClassName}, ${BusinessName}QueryParams } from "@/types/api/${moduleName}/${businessName}"
|
import type { ${ClassName}, ${BusinessName}QueryParams } from "@/types/api/${moduleName}/${businessName}"
|
||||||
#end
|
#end
|
||||||
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"
|
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"
|
||||||
|
#if($genView)
|
||||||
|
import ${BusinessName}ViewDrawer from "./view.vue"
|
||||||
|
#end
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
#if(${dicts} != '')
|
#if(${dicts} != '')
|
||||||
#set($dictsNoSymbol=$dicts.replace("'", ""))
|
#set($dictsNoSymbol=$dicts.replace("'", ""))
|
||||||
const { ${dictsNoSymbol} } = proxy.useDict(${dicts})
|
const { ${dictsNoSymbol} } = useDict(${dicts})
|
||||||
#end
|
#end
|
||||||
|
|
||||||
const ${businessName}List = ref<${ClassName}[]>([])
|
const ${businessName}List = ref<${ClassName}[]>([])
|
||||||
@@ -437,13 +480,13 @@ function getList() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 取消按钮
|
/** 取消按钮 */
|
||||||
function cancel() {
|
function cancel() {
|
||||||
open.value = false
|
open.value = false
|
||||||
reset()
|
reset()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 表单重置
|
/** 表单重置 */
|
||||||
function reset() {
|
function reset() {
|
||||||
form.value = {
|
form.value = {
|
||||||
#foreach ($column in $columns)
|
#foreach ($column in $columns)
|
||||||
@@ -478,7 +521,7 @@ function resetQuery() {
|
|||||||
handleQuery()
|
handleQuery()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 多选框选中数据
|
/** 多选框选中数据 */
|
||||||
function handleSelectionChange(selection: ${ClassName}[]) {
|
function handleSelectionChange(selection: ${ClassName}[]) {
|
||||||
ids.value = selection.map(item => item.${pkColumn.javaField})
|
ids.value = selection.map(item => item.${pkColumn.javaField})
|
||||||
single.value = selection.length != 1
|
single.value = selection.length != 1
|
||||||
@@ -582,6 +625,13 @@ function handle${subClassName}SelectionChange(selection: any[]) {
|
|||||||
checked${subClassName}.value = selection.map(item => item.index)
|
checked${subClassName}.value = selection.map(item => item.index)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#end
|
||||||
|
#if($genView)
|
||||||
|
/** 详情按钮操作 */
|
||||||
|
function handleViewData(row: ${ClassName}) {
|
||||||
|
proxy.#[[$]]#refs["${businessName}ViewRef"].open(row.${pkColumn.javaField})
|
||||||
|
}
|
||||||
|
|
||||||
#end
|
#end
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
function handleExport() {
|
function handleExport() {
|
||||||
|
|||||||
84
ruoyi-generator/src/main/resources/vm/vue/v3ts/view.vue.vm
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
<template>
|
||||||
|
<el-drawer title="${functionName}详情" v-model="visible" direction="rtl" size="60%" append-to-body :before-close="handleClose" class="detail-drawer">
|
||||||
|
<div v-loading="loading" class="drawer-content">
|
||||||
|
<h4 class="section-header">基本信息</h4>
|
||||||
|
#set($i = 0)
|
||||||
|
#foreach($column in $columns)
|
||||||
|
#if(!$column.pk && $column.list)
|
||||||
|
#set($dictType=$column.dictType)
|
||||||
|
#set($javaField=$column.javaField)
|
||||||
|
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||||
|
#if($parentheseIndex != -1)
|
||||||
|
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
||||||
|
#else
|
||||||
|
#set($comment=$column.columnComment)
|
||||||
|
#end
|
||||||
|
#if($i % 2 == 0)
|
||||||
|
<el-row :gutter="20" class="mb8">
|
||||||
|
#end
|
||||||
|
<el-col :span="12">
|
||||||
|
<div class="info-item">
|
||||||
|
<label class="info-label">${comment}:</label>
|
||||||
|
<span class="info-value plaintext">
|
||||||
|
#if("" != $dictType)
|
||||||
|
#if($column.htmlType == "checkbox")
|
||||||
|
<dict-tag :options="${dictType}" :value="info.${javaField} ? info.${javaField}.split(',') : []" />
|
||||||
|
#else
|
||||||
|
<dict-tag :options="${dictType}" :value="info.${javaField}" />
|
||||||
|
#end
|
||||||
|
#elseif($column.htmlType == "datetime")
|
||||||
|
{{ parseTime(info.${javaField}, '{y}-{m}-{d}') }}
|
||||||
|
#elseif($column.htmlType == "imageUpload")
|
||||||
|
<image-preview :src="info.${javaField}" :width="60" :height="60" />
|
||||||
|
#else
|
||||||
|
{{ info.${javaField} }}
|
||||||
|
#end
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
#set($i = $i + 1)
|
||||||
|
#if($i % 2 == 0)
|
||||||
|
</el-row>
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
#if($i % 2 != 0)
|
||||||
|
</el-row>
|
||||||
|
#end
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts" name="${BusinessName}ViewDrawer">
|
||||||
|
import type { ${ClassName} } from "@/types/api/${moduleName}/${businessName}"
|
||||||
|
import { get${BusinessName} } from '@/api/${moduleName}/${businessName}'
|
||||||
|
#if(${dicts} != '')
|
||||||
|
#set($dictsNoSymbol=$dicts.replace("'", ""))
|
||||||
|
|
||||||
|
const { ${dictsNoSymbol} } = useDict(${dicts})
|
||||||
|
#end
|
||||||
|
|
||||||
|
const visible = ref<boolean>(false)
|
||||||
|
const loading = ref<boolean>(false)
|
||||||
|
const info = reactive<Partial<${ClassName}>>({})
|
||||||
|
|
||||||
|
const open = async (#if($pkColumn.javaType == "Long" || $pkColumn.javaType == "Integer")${pkColumn.javaField}: number#else${pkColumn.javaField}: string#end): Promise<void> => {
|
||||||
|
visible.value = true
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
const res = await get${BusinessName}(${pkColumn.javaField})
|
||||||
|
Object.assign(info, res.data ?? {})
|
||||||
|
} catch (error) {
|
||||||
|
console.error('获取${functionName}信息失败:', error)
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleClose = (): void => {
|
||||||
|
visible.value = false
|
||||||
|
Object.keys(info).forEach(key => delete (info as any)[key])
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({ open })
|
||||||
|
</script>
|
||||||
86
ruoyi-generator/src/main/resources/vm/vue/view.vue.vm
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
<template>
|
||||||
|
<el-drawer title="${functionName}详情" :visible.sync="visible" direction="rtl" size="60%" append-to-body :before-close="handleClose" custom-class="detail-drawer">
|
||||||
|
<div v-loading="loading" class="drawer-content">
|
||||||
|
<h4 class="section-header">基本信息</h4>
|
||||||
|
#set($i = 0)
|
||||||
|
#foreach($column in $columns)
|
||||||
|
#if(!$column.pk && $column.list)
|
||||||
|
#set($dictType=$column.dictType)
|
||||||
|
#set($javaField=$column.javaField)
|
||||||
|
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||||
|
#if($parentheseIndex != -1)
|
||||||
|
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
||||||
|
#else
|
||||||
|
#set($comment=$column.columnComment)
|
||||||
|
#end
|
||||||
|
#if($i % 2 == 0)
|
||||||
|
<el-row :gutter="20" class="mb8">
|
||||||
|
#end
|
||||||
|
<el-col :span="12">
|
||||||
|
<div class="info-item">
|
||||||
|
<label class="info-label">${comment}:</label>
|
||||||
|
<span class="info-value plaintext">
|
||||||
|
#if("" != $dictType)
|
||||||
|
#if($column.htmlType == "checkbox")
|
||||||
|
<dict-tag :options="dict.type.${dictType}" :value="info.${javaField} ? info.${javaField}.split(',') : []" />
|
||||||
|
#else
|
||||||
|
<dict-tag :options="dict.type.${dictType}" :value="info.${javaField}" />
|
||||||
|
#end
|
||||||
|
#elseif($column.htmlType == "datetime")
|
||||||
|
{{ parseTime(info.${javaField}, '{y}-{m}-{d}') }}
|
||||||
|
#else
|
||||||
|
{{ info.${javaField} }}
|
||||||
|
#end
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
#set($i = $i + 1)
|
||||||
|
#if($i % 2 == 0)
|
||||||
|
</el-row>
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
#if($i % 2 != 0)
|
||||||
|
</el-row>
|
||||||
|
#end
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { get${BusinessName} } from '@/api/${moduleName}/${businessName}'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: '${BusinessName}ViewDrawer',
|
||||||
|
#foreach($column in $columns)
|
||||||
|
#if("" != $column.dictType)
|
||||||
|
#set($hasDicts = true)
|
||||||
|
#break
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
#if($hasDicts)
|
||||||
|
dicts: [#foreach($column in $columns)#if("" != $column.dictType)'${column.dictType}'#if($foreach.hasNext), #end#end#end],
|
||||||
|
#end
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
loading: false,
|
||||||
|
info: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
open(${pkColumn.javaField}) {
|
||||||
|
this.visible = true
|
||||||
|
this.loading = true
|
||||||
|
get${BusinessName}(${pkColumn.javaField}).then(res => {
|
||||||
|
this.info = res.data || {}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleClose() {
|
||||||
|
this.visible = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
<!-- 定时任务 -->
|
<!-- 定时任务 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.quartz-scheduler</groupId>
|
||||||
<artifactId>spring-boot-starter-quartz</artifactId>
|
<artifactId>quartz</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 通用工具-->
|
<!-- 通用工具-->
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import com.ruoyi.system.domain.SysNoticeRead;
|
|
||||||
import com.ruoyi.system.domain.SysNotice;
|
import com.ruoyi.system.domain.SysNotice;
|
||||||
|
import com.ruoyi.system.domain.SysNoticeRead;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 公告已读记录 数据层
|
* 公告已读记录 数据层
|
||||||
@@ -55,6 +56,15 @@ public interface SysNoticeReadMapper
|
|||||||
*/
|
*/
|
||||||
public List<SysNotice> selectNoticeListWithReadStatus(@Param("userId") Long userId, @Param("limit") int limit);
|
public List<SysNotice> selectNoticeListWithReadStatus(@Param("userId") Long userId, @Param("limit") int limit);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询已阅读某公告的用户列表
|
||||||
|
*
|
||||||
|
* @param noticeId 公告ID
|
||||||
|
* @param searchValue 搜索值
|
||||||
|
* @return 已读用户列表
|
||||||
|
*/
|
||||||
|
public List<Map<String, Object>> selectReadUsersByNoticeId(@Param("noticeId") Long noticeId, @Param("searchValue") String searchValue);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 公告删除时清理对应已读记录
|
* 公告删除时清理对应已读记录
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.ruoyi.system.service;
|
package com.ruoyi.system.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import com.ruoyi.system.domain.SysNotice;
|
import com.ruoyi.system.domain.SysNotice;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -43,6 +44,15 @@ public interface ISysNoticeReadService
|
|||||||
*/
|
*/
|
||||||
public void markReadBatch(Long userId, Long[] noticeIds);
|
public void markReadBatch(Long userId, Long[] noticeIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询已阅读某公告的用户列表
|
||||||
|
*
|
||||||
|
* @param noticeId 公告ID
|
||||||
|
* @param searchValue 搜索值
|
||||||
|
* @return 已读用户列表
|
||||||
|
*/
|
||||||
|
public List<Map<String, Object>> selectReadUsersByNoticeId(Long noticeId, String searchValue);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除公告时清理对应已读记录
|
* 删除公告时清理对应已读记录
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
package com.ruoyi.system.service.impl;
|
package com.ruoyi.system.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.ruoyi.system.domain.SysNoticeRead;
|
|
||||||
import com.ruoyi.system.domain.SysNotice;
|
import com.ruoyi.system.domain.SysNotice;
|
||||||
|
import com.ruoyi.system.domain.SysNoticeRead;
|
||||||
import com.ruoyi.system.mapper.SysNoticeReadMapper;
|
import com.ruoyi.system.mapper.SysNoticeReadMapper;
|
||||||
import com.ruoyi.system.service.ISysNoticeReadService;
|
import com.ruoyi.system.service.ISysNoticeReadService;
|
||||||
|
|
||||||
@@ -62,6 +63,15 @@ public class SysNoticeReadServiceImpl implements ISysNoticeReadService
|
|||||||
noticeReadMapper.insertNoticeReadBatch(userId, noticeIds);
|
noticeReadMapper.insertNoticeReadBatch(userId, noticeIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询已阅读某公告的用户列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> selectReadUsersByNoticeId(Long noticeId, String searchValue)
|
||||||
|
{
|
||||||
|
return noticeReadMapper.selectReadUsersByNoticeId(noticeId, searchValue);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除公告时清理对应已读记录
|
* 删除公告时清理对应已读记录
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -63,4 +63,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<!-- 查询已阅读某公告的用户列表,支持按登录名/用户名模糊筛选 -->
|
||||||
|
<select id="selectReadUsersByNoticeId" resultType="java.util.Map">
|
||||||
|
select
|
||||||
|
u.user_id as userId,
|
||||||
|
u.user_name as userName,
|
||||||
|
u.nick_name as nickName,
|
||||||
|
d.dept_name as deptName,
|
||||||
|
u.phonenumber as phonenumber,
|
||||||
|
r.read_time as readTime
|
||||||
|
from sys_notice_read r
|
||||||
|
inner join sys_user u on u.user_id = r.user_id and u.del_flag = '0'
|
||||||
|
left join sys_dept d on d.dept_id = u.dept_id
|
||||||
|
where r.notice_id = #{noticeId}
|
||||||
|
<if test="searchValue != null and searchValue != ''">
|
||||||
|
and (
|
||||||
|
u.user_name like concat('%', #{searchValue}, '%')
|
||||||
|
or u.nick_name like concat('%', #{searchValue}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
order by r.read_time desc
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectUserVo">
|
<sql id="selectUserVo">
|
||||||
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.pwd_update_date, u.create_by, u.create_time, u.remark,
|
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.pwd_update_date, u.create_by, u.create_time, u.update_by, u.update_time, u.remark,
|
||||||
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
|
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
|
||||||
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
|
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
|
||||||
from sys_user u
|
from sys_user u
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
# 告诉EditorConfig插件,这是根文件,不用继续往上查找
|
|
||||||
root = true
|
|
||||||
|
|
||||||
# 匹配全部文件
|
|
||||||
[*]
|
|
||||||
# 设置字符集
|
|
||||||
charset = utf-8
|
|
||||||
# 缩进风格,可选space、tab
|
|
||||||
indent_style = space
|
|
||||||
# 缩进的空格数
|
|
||||||
indent_size = 2
|
|
||||||
# 结尾换行符,可选lf、cr、crlf
|
|
||||||
end_of_line = lf
|
|
||||||
# 在文件结尾插入新行
|
|
||||||
insert_final_newline = true
|
|
||||||
# 删除一行中的前后空格
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
|
|
||||||
# 匹配md结尾的文件
|
|
||||||
[*.md]
|
|
||||||
insert_final_newline = false
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# 页面标题
|
|
||||||
VUE_APP_TITLE = 若依管理系统
|
|
||||||
|
|
||||||
# 开发环境配置
|
|
||||||
ENV = 'development'
|
|
||||||
|
|
||||||
# 若依管理系统/开发环境
|
|
||||||
VUE_APP_BASE_API = '/dev-api'
|
|
||||||
|
|
||||||
# 路由懒加载
|
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
# 页面标题
|
|
||||||
VUE_APP_TITLE = 若依管理系统
|
|
||||||
|
|
||||||
# 生产环境配置
|
|
||||||
ENV = 'production'
|
|
||||||
|
|
||||||
# 若依管理系统/生产环境
|
|
||||||
VUE_APP_BASE_API = '/prod-api'
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
# 页面标题
|
|
||||||
VUE_APP_TITLE = 若依管理系统
|
|
||||||
|
|
||||||
BABEL_ENV = production
|
|
||||||
|
|
||||||
NODE_ENV = production
|
|
||||||
|
|
||||||
# 测试环境配置
|
|
||||||
ENV = 'staging'
|
|
||||||
|
|
||||||
# 若依管理系统/测试环境
|
|
||||||
VUE_APP_BASE_API = '/stage-api'
|
|
||||||
23
ruoyi-ui/.gitignore
vendored
@@ -1,23 +0,0 @@
|
|||||||
.DS_Store
|
|
||||||
node_modules/
|
|
||||||
dist/
|
|
||||||
npm-debug.log*
|
|
||||||
yarn-debug.log*
|
|
||||||
yarn-error.log*
|
|
||||||
**/*.log
|
|
||||||
|
|
||||||
tests/**/coverage/
|
|
||||||
tests/e2e/reports
|
|
||||||
selenium-debug.log
|
|
||||||
|
|
||||||
# Editor directories and files
|
|
||||||
.idea
|
|
||||||
.vscode
|
|
||||||
*.suo
|
|
||||||
*.ntvs*
|
|
||||||
*.njsproj
|
|
||||||
*.sln
|
|
||||||
*.local
|
|
||||||
|
|
||||||
package-lock.json
|
|
||||||
yarn.lock
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
## 开发
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# 克隆项目
|
|
||||||
git clone https://gitee.com/y_project/RuoYi-Vue
|
|
||||||
|
|
||||||
# 进入项目目录
|
|
||||||
cd ruoyi-ui
|
|
||||||
|
|
||||||
# 安装依赖
|
|
||||||
npm install
|
|
||||||
|
|
||||||
# 建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题
|
|
||||||
npm install --registry=https://registry.npmmirror.com
|
|
||||||
|
|
||||||
# 启动服务
|
|
||||||
npm run dev
|
|
||||||
```
|
|
||||||
|
|
||||||
浏览器访问 http://localhost:80
|
|
||||||
|
|
||||||
## 发布
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# 构建测试环境
|
|
||||||
npm run build:stage
|
|
||||||
|
|
||||||
# 构建生产环境
|
|
||||||
npm run build:prod
|
|
||||||
```
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
presets: [
|
|
||||||
// https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
|
|
||||||
'@vue/cli-plugin-babel/preset'
|
|
||||||
],
|
|
||||||
'env': {
|
|
||||||
'development': {
|
|
||||||
// babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
|
|
||||||
// This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
|
|
||||||
'plugins': ['dynamic-import-node']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
@echo off
|
|
||||||
echo.
|
|
||||||
echo [信息] 打包Web工程,生成dist文件。
|
|
||||||
echo.
|
|
||||||
|
|
||||||
%~d0
|
|
||||||
cd %~dp0
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
npm run build:prod
|
|
||||||
|
|
||||||
pause
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
@echo off
|
|
||||||
echo.
|
|
||||||
echo [信息] 安装Web工程,生成node_modules文件。
|
|
||||||
echo.
|
|
||||||
|
|
||||||
%~d0
|
|
||||||
cd %~dp0
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
npm install --registry=https://registry.npmmirror.com
|
|
||||||
|
|
||||||
pause
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
@echo off
|
|
||||||
echo.
|
|
||||||
echo [信息] 使用 Vue CLI 命令运行 Web 工程。
|
|
||||||
echo.
|
|
||||||
|
|
||||||
%~d0
|
|
||||||
cd %~dp0
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
npm run dev
|
|
||||||
|
|
||||||
pause
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
const { run } = require('runjs')
|
|
||||||
const chalk = require('chalk')
|
|
||||||
const config = require('../vue.config.js')
|
|
||||||
const rawArgv = process.argv.slice(2)
|
|
||||||
const args = rawArgv.join(' ')
|
|
||||||
|
|
||||||
if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
|
|
||||||
const report = rawArgv.includes('--report')
|
|
||||||
|
|
||||||
run(`vue-cli-service build ${args}`)
|
|
||||||
|
|
||||||
const port = 9526
|
|
||||||
const publicPath = config.publicPath
|
|
||||||
|
|
||||||
var connect = require('connect')
|
|
||||||
var serveStatic = require('serve-static')
|
|
||||||
const app = connect()
|
|
||||||
|
|
||||||
app.use(
|
|
||||||
publicPath,
|
|
||||||
serveStatic('./dist', {
|
|
||||||
index: ['index.html', '/']
|
|
||||||
})
|
|
||||||
)
|
|
||||||
|
|
||||||
app.listen(port, function () {
|
|
||||||
console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
|
|
||||||
if (report) {
|
|
||||||
console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
run(`vue-cli-service build ${args}`)
|
|
||||||
}
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "ruoyi",
|
|
||||||
"version": "3.9.2",
|
|
||||||
"description": "若依管理系统",
|
|
||||||
"author": "若依",
|
|
||||||
"license": "MIT",
|
|
||||||
"scripts": {
|
|
||||||
"dev": "vue-cli-service serve",
|
|
||||||
"build:prod": "vue-cli-service build",
|
|
||||||
"build:stage": "vue-cli-service build --mode staging",
|
|
||||||
"preview": "node build/index.js --preview"
|
|
||||||
},
|
|
||||||
"keywords": [
|
|
||||||
"vue",
|
|
||||||
"admin",
|
|
||||||
"dashboard",
|
|
||||||
"element-ui",
|
|
||||||
"boilerplate",
|
|
||||||
"admin-template",
|
|
||||||
"management-system"
|
|
||||||
],
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://gitee.com/y_project/RuoYi-Vue.git"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@riophae/vue-treeselect": "0.4.0",
|
|
||||||
"axios": "0.30.3",
|
|
||||||
"clipboard": "2.0.8",
|
|
||||||
"core-js": "3.37.1",
|
|
||||||
"echarts": "5.4.0",
|
|
||||||
"element-ui": "2.15.14",
|
|
||||||
"file-saver": "2.0.5",
|
|
||||||
"fuse.js": "6.4.3",
|
|
||||||
"highlight.js": "9.18.5",
|
|
||||||
"js-beautify": "1.13.0",
|
|
||||||
"js-cookie": "3.0.1",
|
|
||||||
"jsencrypt": "3.0.0-rc.1",
|
|
||||||
"nprogress": "0.2.0",
|
|
||||||
"quill": "2.0.2",
|
|
||||||
"screenfull": "5.0.2",
|
|
||||||
"sortablejs": "1.10.2",
|
|
||||||
"splitpanes": "2.4.1",
|
|
||||||
"vue": "2.6.12",
|
|
||||||
"vue-count-to": "1.0.13",
|
|
||||||
"vue-cropper": "0.5.5",
|
|
||||||
"vue-router": "3.4.9",
|
|
||||||
"vuedraggable": "2.24.3",
|
|
||||||
"vuex": "3.6.0"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@vue/cli-plugin-babel": "4.4.6",
|
|
||||||
"@vue/cli-service": "4.4.6",
|
|
||||||
"babel-plugin-dynamic-import-node": "2.3.3",
|
|
||||||
"chalk": "4.1.0",
|
|
||||||
"compression-webpack-plugin": "6.1.2",
|
|
||||||
"connect": "3.6.6",
|
|
||||||
"sass": "1.32.13",
|
|
||||||
"sass-loader": "10.1.1",
|
|
||||||
"script-ext-html-webpack-plugin": "2.1.5",
|
|
||||||
"svg-sprite-loader": "5.1.1",
|
|
||||||
"vue-template-compiler": "2.6.12"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8.9",
|
|
||||||
"npm": ">= 3.0.0"
|
|
||||||
},
|
|
||||||
"browserslist": [
|
|
||||||
"> 1%",
|
|
||||||
"last 2 versions"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 5.5 KiB |
@@ -1,208 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
||||||
<meta name="renderer" content="webkit">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
|
||||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
|
||||||
<title><%= webpackConfig.name %></title>
|
|
||||||
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
|
|
||||||
<style>
|
|
||||||
html,
|
|
||||||
body,
|
|
||||||
#app {
|
|
||||||
height: 100%;
|
|
||||||
margin: 0px;
|
|
||||||
padding: 0px;
|
|
||||||
}
|
|
||||||
.chromeframe {
|
|
||||||
margin: 0.2em 0;
|
|
||||||
background: #ccc;
|
|
||||||
color: #000;
|
|
||||||
padding: 0.2em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#loader-wrapper {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
z-index: 999999;
|
|
||||||
}
|
|
||||||
|
|
||||||
#loader {
|
|
||||||
display: block;
|
|
||||||
position: relative;
|
|
||||||
left: 50%;
|
|
||||||
top: 50%;
|
|
||||||
width: 150px;
|
|
||||||
height: 150px;
|
|
||||||
margin: -75px 0 0 -75px;
|
|
||||||
border-radius: 50%;
|
|
||||||
border: 3px solid transparent;
|
|
||||||
border-top-color: #FFF;
|
|
||||||
-webkit-animation: spin 2s linear infinite;
|
|
||||||
-ms-animation: spin 2s linear infinite;
|
|
||||||
-moz-animation: spin 2s linear infinite;
|
|
||||||
-o-animation: spin 2s linear infinite;
|
|
||||||
animation: spin 2s linear infinite;
|
|
||||||
z-index: 1001;
|
|
||||||
}
|
|
||||||
|
|
||||||
#loader:before {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
top: 5px;
|
|
||||||
left: 5px;
|
|
||||||
right: 5px;
|
|
||||||
bottom: 5px;
|
|
||||||
border-radius: 50%;
|
|
||||||
border: 3px solid transparent;
|
|
||||||
border-top-color: #FFF;
|
|
||||||
-webkit-animation: spin 3s linear infinite;
|
|
||||||
-moz-animation: spin 3s linear infinite;
|
|
||||||
-o-animation: spin 3s linear infinite;
|
|
||||||
-ms-animation: spin 3s linear infinite;
|
|
||||||
animation: spin 3s linear infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
#loader:after {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
top: 15px;
|
|
||||||
left: 15px;
|
|
||||||
right: 15px;
|
|
||||||
bottom: 15px;
|
|
||||||
border-radius: 50%;
|
|
||||||
border: 3px solid transparent;
|
|
||||||
border-top-color: #FFF;
|
|
||||||
-moz-animation: spin 1.5s linear infinite;
|
|
||||||
-o-animation: spin 1.5s linear infinite;
|
|
||||||
-ms-animation: spin 1.5s linear infinite;
|
|
||||||
-webkit-animation: spin 1.5s linear infinite;
|
|
||||||
animation: spin 1.5s linear infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@-webkit-keyframes spin {
|
|
||||||
0% {
|
|
||||||
-webkit-transform: rotate(0deg);
|
|
||||||
-ms-transform: rotate(0deg);
|
|
||||||
transform: rotate(0deg);
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
-webkit-transform: rotate(360deg);
|
|
||||||
-ms-transform: rotate(360deg);
|
|
||||||
transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes spin {
|
|
||||||
0% {
|
|
||||||
-webkit-transform: rotate(0deg);
|
|
||||||
-ms-transform: rotate(0deg);
|
|
||||||
transform: rotate(0deg);
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
-webkit-transform: rotate(360deg);
|
|
||||||
-ms-transform: rotate(360deg);
|
|
||||||
transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#loader-wrapper .loader-section {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
width: 51%;
|
|
||||||
height: 100%;
|
|
||||||
background: #7171C6;
|
|
||||||
z-index: 1000;
|
|
||||||
-webkit-transform: translateX(0);
|
|
||||||
-ms-transform: translateX(0);
|
|
||||||
transform: translateX(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
#loader-wrapper .loader-section.section-left {
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#loader-wrapper .loader-section.section-right {
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.loaded #loader-wrapper .loader-section.section-left {
|
|
||||||
-webkit-transform: translateX(-100%);
|
|
||||||
-ms-transform: translateX(-100%);
|
|
||||||
transform: translateX(-100%);
|
|
||||||
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
|
||||||
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
|
||||||
}
|
|
||||||
|
|
||||||
.loaded #loader-wrapper .loader-section.section-right {
|
|
||||||
-webkit-transform: translateX(100%);
|
|
||||||
-ms-transform: translateX(100%);
|
|
||||||
transform: translateX(100%);
|
|
||||||
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
|
||||||
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
|
||||||
}
|
|
||||||
|
|
||||||
.loaded #loader {
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-transition: all 0.3s ease-out;
|
|
||||||
transition: all 0.3s ease-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
.loaded #loader-wrapper {
|
|
||||||
visibility: hidden;
|
|
||||||
-webkit-transform: translateY(-100%);
|
|
||||||
-ms-transform: translateY(-100%);
|
|
||||||
transform: translateY(-100%);
|
|
||||||
-webkit-transition: all 0.3s 1s ease-out;
|
|
||||||
transition: all 0.3s 1s ease-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-js #loader-wrapper {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-js h1 {
|
|
||||||
color: #222222;
|
|
||||||
}
|
|
||||||
|
|
||||||
#loader-wrapper .load_title {
|
|
||||||
font-family: 'Open Sans';
|
|
||||||
color: #FFF;
|
|
||||||
font-size: 19px;
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
z-index: 9999999999999;
|
|
||||||
position: absolute;
|
|
||||||
top: 60%;
|
|
||||||
opacity: 1;
|
|
||||||
line-height: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#loader-wrapper .load_title span {
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: italic;
|
|
||||||
font-size: 13px;
|
|
||||||
color: #FFF;
|
|
||||||
opacity: 0.5;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="app">
|
|
||||||
<div id="loader-wrapper">
|
|
||||||
<div id="loader"></div>
|
|
||||||
<div class="loader-section section-left"></div>
|
|
||||||
<div class="loader-section section-right"></div>
|
|
||||||
<div class="load_title">正在加载系统资源,请耐心等待</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
User-agent: *
|
|
||||||
Disallow: /
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div id="app">
|
|
||||||
<router-view />
|
|
||||||
<theme-picker />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import ThemePicker from "@/components/ThemePicker"
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "App",
|
|
||||||
components: { ThemePicker }
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style scoped>
|
|
||||||
#app .theme-picker {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 登录方法
|
|
||||||
export function login(username, password, code, uuid) {
|
|
||||||
const data = {
|
|
||||||
username,
|
|
||||||
password,
|
|
||||||
code,
|
|
||||||
uuid
|
|
||||||
}
|
|
||||||
return request({
|
|
||||||
url: '/login',
|
|
||||||
headers: {
|
|
||||||
isToken: false,
|
|
||||||
repeatSubmit: false
|
|
||||||
},
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 注册方法
|
|
||||||
export function register(data) {
|
|
||||||
return request({
|
|
||||||
url: '/register',
|
|
||||||
headers: {
|
|
||||||
isToken: false
|
|
||||||
},
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取用户详细信息
|
|
||||||
export function getInfo() {
|
|
||||||
return request({
|
|
||||||
url: '/getInfo',
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 解锁屏幕
|
|
||||||
export function unlockScreen(password) {
|
|
||||||
return request({
|
|
||||||
url: '/unlockscreen',
|
|
||||||
method: 'post',
|
|
||||||
data: { password }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 退出方法
|
|
||||||
export function logout() {
|
|
||||||
return request({
|
|
||||||
url: '/logout',
|
|
||||||
method: 'post'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取验证码
|
|
||||||
export function getCodeImg() {
|
|
||||||
return request({
|
|
||||||
url: '/captchaImage',
|
|
||||||
headers: {
|
|
||||||
isToken: false
|
|
||||||
},
|
|
||||||
method: 'get',
|
|
||||||
timeout: 20000
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 获取路由
|
|
||||||
export const getRouters = () => {
|
|
||||||
return request({
|
|
||||||
url: '/getRouters',
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询缓存详细
|
|
||||||
export function getCache() {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/cache',
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询缓存名称列表
|
|
||||||
export function listCacheName() {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/cache/getNames',
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询缓存键名列表
|
|
||||||
export function listCacheKey(cacheName) {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/cache/getKeys/' + cacheName,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询缓存内容
|
|
||||||
export function getCacheValue(cacheName, cacheKey) {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/cache/getValue/' + cacheName + '/' + cacheKey,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 清理指定名称缓存
|
|
||||||
export function clearCacheName(cacheName) {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/cache/clearCacheName/' + cacheName,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 清理指定键名缓存
|
|
||||||
export function clearCacheKey(cacheKey) {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/cache/clearCacheKey/' + cacheKey,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 清理全部缓存
|
|
||||||
export function clearCacheAll() {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/cache/clearCacheAll',
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询定时任务调度列表
|
|
||||||
export function listJob(query) {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/job/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询定时任务调度详细
|
|
||||||
export function getJob(jobId) {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/job/' + jobId,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增定时任务调度
|
|
||||||
export function addJob(data) {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/job',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改定时任务调度
|
|
||||||
export function updateJob(data) {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/job',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除定时任务调度
|
|
||||||
export function delJob(jobId) {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/job/' + jobId,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 任务状态修改
|
|
||||||
export function changeJobStatus(jobId, status) {
|
|
||||||
const data = {
|
|
||||||
jobId,
|
|
||||||
status
|
|
||||||
}
|
|
||||||
return request({
|
|
||||||
url: '/monitor/job/changeStatus',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 定时任务立即执行一次
|
|
||||||
export function runJob(jobId, jobGroup) {
|
|
||||||
const data = {
|
|
||||||
jobId,
|
|
||||||
jobGroup
|
|
||||||
}
|
|
||||||
return request({
|
|
||||||
url: '/monitor/job/run',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询调度日志列表
|
|
||||||
export function listJobLog(query) {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/jobLog/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除调度日志
|
|
||||||
export function delJobLog(jobLogId) {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/jobLog/' + jobLogId,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 清空调度日志
|
|
||||||
export function cleanJobLog() {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/jobLog/clean',
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询登录日志列表
|
|
||||||
export function list(query) {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/logininfor/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除登录日志
|
|
||||||
export function delLogininfor(infoId) {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/logininfor/' + infoId,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 解锁用户登录状态
|
|
||||||
export function unlockLogininfor(userName) {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/logininfor/unlock/' + userName,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 清空登录日志
|
|
||||||
export function cleanLogininfor() {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/logininfor/clean',
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询在线用户列表
|
|
||||||
export function list(query) {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/online/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 强退用户
|
|
||||||
export function forceLogout(tokenId) {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/online/' + tokenId,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询操作日志列表
|
|
||||||
export function list(query) {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/operlog/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除操作日志
|
|
||||||
export function delOperlog(operId) {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/operlog/' + operId,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 清空操作日志
|
|
||||||
export function cleanOperlog() {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/operlog/clean',
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 获取服务信息
|
|
||||||
export function getServer() {
|
|
||||||
return request({
|
|
||||||
url: '/monitor/server',
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询参数列表
|
|
||||||
export function listConfig(query) {
|
|
||||||
return request({
|
|
||||||
url: '/system/config/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询参数详细
|
|
||||||
export function getConfig(configId) {
|
|
||||||
return request({
|
|
||||||
url: '/system/config/' + configId,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 根据参数键名查询参数值
|
|
||||||
export function getConfigKey(configKey) {
|
|
||||||
return request({
|
|
||||||
url: '/system/config/configKey/' + configKey,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增参数配置
|
|
||||||
export function addConfig(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/config',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改参数配置
|
|
||||||
export function updateConfig(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/config',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除参数配置
|
|
||||||
export function delConfig(configId) {
|
|
||||||
return request({
|
|
||||||
url: '/system/config/' + configId,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 刷新参数缓存
|
|
||||||
export function refreshCache() {
|
|
||||||
return request({
|
|
||||||
url: '/system/config/refreshCache',
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询部门列表
|
|
||||||
export function listDept(query) {
|
|
||||||
return request({
|
|
||||||
url: '/system/dept/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询部门列表(排除节点)
|
|
||||||
export function listDeptExcludeChild(deptId) {
|
|
||||||
return request({
|
|
||||||
url: '/system/dept/list/exclude/' + deptId,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询部门详细
|
|
||||||
export function getDept(deptId) {
|
|
||||||
return request({
|
|
||||||
url: '/system/dept/' + deptId,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增部门
|
|
||||||
export function addDept(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/dept',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改部门
|
|
||||||
export function updateDept(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/dept',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 保存部门排序
|
|
||||||
export function updateDeptSort(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/dept/updateSort',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除部门
|
|
||||||
export function delDept(deptId) {
|
|
||||||
return request({
|
|
||||||
url: '/system/dept/' + deptId,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询字典数据列表
|
|
||||||
export function listData(query) {
|
|
||||||
return request({
|
|
||||||
url: '/system/dict/data/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询字典数据详细
|
|
||||||
export function getData(dictCode) {
|
|
||||||
return request({
|
|
||||||
url: '/system/dict/data/' + dictCode,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 根据字典类型查询字典数据信息
|
|
||||||
export function getDicts(dictType) {
|
|
||||||
return request({
|
|
||||||
url: '/system/dict/data/type/' + dictType,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增字典数据
|
|
||||||
export function addData(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/dict/data',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改字典数据
|
|
||||||
export function updateData(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/dict/data',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除字典数据
|
|
||||||
export function delData(dictCode) {
|
|
||||||
return request({
|
|
||||||
url: '/system/dict/data/' + dictCode,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询字典类型列表
|
|
||||||
export function listType(query) {
|
|
||||||
return request({
|
|
||||||
url: '/system/dict/type/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询字典类型详细
|
|
||||||
export function getType(dictId) {
|
|
||||||
return request({
|
|
||||||
url: '/system/dict/type/' + dictId,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增字典类型
|
|
||||||
export function addType(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/dict/type',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改字典类型
|
|
||||||
export function updateType(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/dict/type',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除字典类型
|
|
||||||
export function delType(dictId) {
|
|
||||||
return request({
|
|
||||||
url: '/system/dict/type/' + dictId,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 刷新字典缓存
|
|
||||||
export function refreshCache() {
|
|
||||||
return request({
|
|
||||||
url: '/system/dict/type/refreshCache',
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取字典选择框列表
|
|
||||||
export function optionselect() {
|
|
||||||
return request({
|
|
||||||
url: '/system/dict/type/optionselect',
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询菜单列表
|
|
||||||
export function listMenu(query) {
|
|
||||||
return request({
|
|
||||||
url: '/system/menu/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询菜单详细
|
|
||||||
export function getMenu(menuId) {
|
|
||||||
return request({
|
|
||||||
url: '/system/menu/' + menuId,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询菜单下拉树结构
|
|
||||||
export function treeselect() {
|
|
||||||
return request({
|
|
||||||
url: '/system/menu/treeselect',
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 根据角色ID查询菜单下拉树结构
|
|
||||||
export function roleMenuTreeselect(roleId) {
|
|
||||||
return request({
|
|
||||||
url: '/system/menu/roleMenuTreeselect/' + roleId,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增菜单
|
|
||||||
export function addMenu(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/menu',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改菜单
|
|
||||||
export function updateMenu(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/menu',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 保存菜单排序
|
|
||||||
export function updateMenuSort(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/menu/updateSort',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除菜单
|
|
||||||
export function delMenu(menuId) {
|
|
||||||
return request({
|
|
||||||
url: '/system/menu/' + menuId,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询公告列表
|
|
||||||
export function listNotice(query) {
|
|
||||||
return request({
|
|
||||||
url: '/system/notice/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询公告详细
|
|
||||||
export function getNotice(noticeId) {
|
|
||||||
return request({
|
|
||||||
url: '/system/notice/' + noticeId,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增公告
|
|
||||||
export function addNotice(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/notice',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改公告
|
|
||||||
export function updateNotice(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/notice',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除公告
|
|
||||||
export function delNotice(noticeId) {
|
|
||||||
return request({
|
|
||||||
url: '/system/notice/' + noticeId,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 首页顶部公告列表(带已读状态)
|
|
||||||
export function listNoticeTop() {
|
|
||||||
return request({
|
|
||||||
url: '/system/notice/listTop',
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 标记公告已读
|
|
||||||
export function markNoticeRead(noticeId) {
|
|
||||||
return request({
|
|
||||||
url: '/system/notice/markRead',
|
|
||||||
method: 'post',
|
|
||||||
params: { noticeId }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 批量标记已读
|
|
||||||
export function markNoticeReadAll(ids) {
|
|
||||||
return request({
|
|
||||||
url: '/system/notice/markReadAll',
|
|
||||||
method: 'post',
|
|
||||||
params: { ids }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询岗位列表
|
|
||||||
export function listPost(query) {
|
|
||||||
return request({
|
|
||||||
url: '/system/post/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询岗位详细
|
|
||||||
export function getPost(postId) {
|
|
||||||
return request({
|
|
||||||
url: '/system/post/' + postId,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增岗位
|
|
||||||
export function addPost(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/post',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改岗位
|
|
||||||
export function updatePost(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/post',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除岗位
|
|
||||||
export function delPost(postId) {
|
|
||||||
return request({
|
|
||||||
url: '/system/post/' + postId,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,119 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询角色列表
|
|
||||||
export function listRole(query) {
|
|
||||||
return request({
|
|
||||||
url: '/system/role/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询角色详细
|
|
||||||
export function getRole(roleId) {
|
|
||||||
return request({
|
|
||||||
url: '/system/role/' + roleId,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增角色
|
|
||||||
export function addRole(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/role',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改角色
|
|
||||||
export function updateRole(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/role',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 角色数据权限
|
|
||||||
export function dataScope(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/role/dataScope',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 角色状态修改
|
|
||||||
export function changeRoleStatus(roleId, status) {
|
|
||||||
const data = {
|
|
||||||
roleId,
|
|
||||||
status
|
|
||||||
}
|
|
||||||
return request({
|
|
||||||
url: '/system/role/changeStatus',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除角色
|
|
||||||
export function delRole(roleId) {
|
|
||||||
return request({
|
|
||||||
url: '/system/role/' + roleId,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询角色已授权用户列表
|
|
||||||
export function allocatedUserList(query) {
|
|
||||||
return request({
|
|
||||||
url: '/system/role/authUser/allocatedList',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询角色未授权用户列表
|
|
||||||
export function unallocatedUserList(query) {
|
|
||||||
return request({
|
|
||||||
url: '/system/role/authUser/unallocatedList',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 取消用户授权角色
|
|
||||||
export function authUserCancel(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/role/authUser/cancel',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 批量取消用户授权角色
|
|
||||||
export function authUserCancelAll(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/role/authUser/cancelAll',
|
|
||||||
method: 'put',
|
|
||||||
params: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 授权用户选择
|
|
||||||
export function authUserSelectAll(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/role/authUser/selectAll',
|
|
||||||
method: 'put',
|
|
||||||
params: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 根据角色ID查询部门树结构
|
|
||||||
export function deptTreeSelect(roleId) {
|
|
||||||
return request({
|
|
||||||
url: '/system/role/deptTree/' + roleId,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,136 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
import { parseStrEmpty } from "@/utils/ruoyi"
|
|
||||||
|
|
||||||
// 查询用户列表
|
|
||||||
export function listUser(query) {
|
|
||||||
return request({
|
|
||||||
url: '/system/user/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询用户详细
|
|
||||||
export function getUser(userId) {
|
|
||||||
return request({
|
|
||||||
url: '/system/user/' + parseStrEmpty(userId),
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增用户
|
|
||||||
export function addUser(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/user',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改用户
|
|
||||||
export function updateUser(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/user',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除用户
|
|
||||||
export function delUser(userId) {
|
|
||||||
return request({
|
|
||||||
url: '/system/user/' + userId,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 用户密码重置
|
|
||||||
export function resetUserPwd(userId, password) {
|
|
||||||
const data = {
|
|
||||||
userId,
|
|
||||||
password
|
|
||||||
}
|
|
||||||
return request({
|
|
||||||
url: '/system/user/resetPwd',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 用户状态修改
|
|
||||||
export function changeUserStatus(userId, status) {
|
|
||||||
const data = {
|
|
||||||
userId,
|
|
||||||
status
|
|
||||||
}
|
|
||||||
return request({
|
|
||||||
url: '/system/user/changeStatus',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询用户个人信息
|
|
||||||
export function getUserProfile() {
|
|
||||||
return request({
|
|
||||||
url: '/system/user/profile',
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改用户个人信息
|
|
||||||
export function updateUserProfile(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/user/profile',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 用户密码重置
|
|
||||||
export function updateUserPwd(oldPassword, newPassword) {
|
|
||||||
const data = {
|
|
||||||
oldPassword,
|
|
||||||
newPassword
|
|
||||||
}
|
|
||||||
return request({
|
|
||||||
url: '/system/user/profile/updatePwd',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 用户头像上传
|
|
||||||
export function uploadAvatar(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/user/profile/avatar',
|
|
||||||
method: 'post',
|
|
||||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询授权角色
|
|
||||||
export function getAuthRole(userId) {
|
|
||||||
return request({
|
|
||||||
url: '/system/user/authRole/' + userId,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 保存授权角色
|
|
||||||
export function updateAuthRole(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/user/authRole',
|
|
||||||
method: 'put',
|
|
||||||
params: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询部门下拉树结构
|
|
||||||
export function deptTreeSelect() {
|
|
||||||
return request({
|
|
||||||
url: '/system/user/deptTree',
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询生成表数据
|
|
||||||
export function listTable(query) {
|
|
||||||
return request({
|
|
||||||
url: '/tool/gen/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 查询db数据库列表
|
|
||||||
export function listDbTable(query) {
|
|
||||||
return request({
|
|
||||||
url: '/tool/gen/db/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询表详细信息
|
|
||||||
export function getGenTable(tableId) {
|
|
||||||
return request({
|
|
||||||
url: '/tool/gen/' + tableId,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改代码生成信息
|
|
||||||
export function updateGenTable(data) {
|
|
||||||
return request({
|
|
||||||
url: '/tool/gen',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 导入表
|
|
||||||
export function importTable(data) {
|
|
||||||
return request({
|
|
||||||
url: '/tool/gen/importTable',
|
|
||||||
method: 'post',
|
|
||||||
params: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 创建表
|
|
||||||
export function createTable(data) {
|
|
||||||
return request({
|
|
||||||
url: '/tool/gen/createTable',
|
|
||||||
method: 'post',
|
|
||||||
params: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 预览生成代码
|
|
||||||
export function previewTable(tableId) {
|
|
||||||
return request({
|
|
||||||
url: '/tool/gen/preview/' + tableId,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除表数据
|
|
||||||
export function delTable(tableId) {
|
|
||||||
return request({
|
|
||||||
url: '/tool/gen/' + tableId,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 生成代码(自定义路径)
|
|
||||||
export function genCode(tableName) {
|
|
||||||
return request({
|
|
||||||
url: '/tool/gen/genCode/' + tableName,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 同步数据库
|
|
||||||
export function synchDb(tableName) {
|
|
||||||
return request({
|
|
||||||
url: '/tool/gen/synchDb/' + tableName,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
@@ -1,9 +0,0 @@
|
|||||||
import Vue from 'vue'
|
|
||||||
import SvgIcon from '@/components/SvgIcon'// svg component
|
|
||||||
|
|
||||||
// register globally
|
|
||||||
Vue.component('svg-icon', SvgIcon)
|
|
||||||
|
|
||||||
const req = require.context('./svg', false, /\.svg$/)
|
|
||||||
const requireAll = requireContext => requireContext.keys().map(requireContext)
|
|
||||||
requireAll(req)
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M121.718 73.272v9.953c3.957-7.584 6.199-16.05 6.199-24.995C127.917 26.079 99.273 0 63.958 0 28.644 0 0 26.079 0 58.23c0 .403.028.806.028 1.21l22.97-25.953h13.34l-19.76 27.187h6.42V53.77l13.728-19.477v49.361H22.998V73.272H2.158c5.951 20.284 23.608 36.208 45.998 41.399-1.44 3.3-5.618 11.263-12.565 12.674-8.607 1.764 23.358.428 46.163-13.178 17.519-4.611 31.938-15.849 39.77-30.513h-13.506V73.272H85.02V59.464l22.998-25.977h13.008l-19.429 27.187h6.421v-7.433l13.727-19.402v39.433h-.027zm-78.24 2.822a10.516 10.516 0 0 1-.996-4.535V44.548c0-1.613.332-3.124.996-4.535a11.66 11.66 0 0 1 2.713-3.68c1.134-1.032 2.49-1.864 4.04-2.468 1.55-.605 3.21-.908 4.982-.908h11.292c1.77 0 3.431.303 4.981.908 1.522.604 2.85 1.41 3.986 2.418l-12.26 16.303v-2.898a1.96 1.96 0 0 0-.665-1.512c-.443-.403-.996-.604-1.66-.604-.665 0-1.218.201-1.661.604a1.96 1.96 0 0 0-.664 1.512v9.071L44.364 77.606a10.556 10.556 0 0 1-.886-1.512zm35.73-4.535c0 1.613-.332 3.124-.997 4.535a11.66 11.66 0 0 1-2.712 3.68c-1.134 1.032-2.49 1.864-4.04 2.469-1.55.604-3.21.907-4.982.907H55.185c-1.77 0-3.431-.303-4.981-.907-1.55-.605-2.906-1.437-4.041-2.47a12.49 12.49 0 0 1-1.384-1.512l13.727-18.217v6.375c0 .605.222 1.109.665 1.512.442.403.996.604 1.66.604.664 0 1.218-.201 1.66-.604a1.96 1.96 0 0 0 .665-1.512V53.87L75.97 36.838c.913.932 1.66 1.99 2.214 3.175.664 1.41.996 2.922.996 4.535v27.011h.028z"/></svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.4 KiB |
@@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1773923748724" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5930" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M512 212l48.8 12c101.6 24.8 176 117.6 176 220.8v254.4l18.4 18.4 24.8 25.6h-536l24.8-25.6 18.4-18.4V444.8c0-103.2 73.6-196.8 176-220.8l48.8-12M512 64c-36.8 0-64 30.4-64 68v30.4C320.8 192 223.2 307.2 223.2 444.8v228.8L136 763.2v44.8h752v-44.8l-87.2-89.6V444.8c0-137.6-97.6-252.8-224.8-283.2v-28.8c0-32-17.6-60.8-48-67.2-5.6-1.6-11.2-1.6-16-1.6z m88 808H424c0 49.6 38.4 88 88 88s88-38.4 88-88z" p-id="5931"></path></svg>
|
|
||||||
|
Before Width: | Height: | Size: 750 B |
@@ -1 +0,0 @@
|
|||||||
<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M127.88 73.143c0 1.412-.506 2.635-1.518 3.669-1.011 1.033-2.209 1.55-3.592 1.55h-17.887c0 9.296-1.783 17.178-5.35 23.645l16.609 17.044c1.011 1.034 1.517 2.257 1.517 3.67 0 1.412-.506 2.635-1.517 3.668-.958 1.033-2.155 1.55-3.593 1.55-1.438 0-2.635-.517-3.593-1.55l-15.811-16.063a15.49 15.49 0 0 1-1.196 1.06c-.532.434-1.65 1.208-3.353 2.322a50.104 50.104 0 0 1-5.192 2.974c-1.758.87-3.94 1.658-6.546 2.364-2.607.706-5.189 1.06-7.748 1.06V47.044H58.89v73.062c-2.716 0-5.417-.367-8.106-1.102-2.688-.734-5.003-1.631-6.945-2.692a66.769 66.769 0 0 1-5.268-3.179c-1.571-1.057-2.73-1.94-3.476-2.65L33.9 109.34l-14.611 16.877c-1.066 1.14-2.344 1.711-3.833 1.711-1.277 0-2.422-.434-3.434-1.304-1.012-.978-1.557-2.187-1.635-3.627-.079-1.44.333-2.705 1.236-3.794l16.129-18.51c-3.087-6.197-4.63-13.644-4.63-22.342H5.235c-1.383 0-2.58-.517-3.592-1.55S.125 74.545.125 73.132c0-1.412.506-2.635 1.518-3.668 1.012-1.034 2.21-1.55 3.592-1.55h17.887V43.939L9.308 29.833c-1.012-1.033-1.517-2.256-1.517-3.669 0-1.412.505-2.635 1.517-3.668 1.012-1.034 2.21-1.55 3.593-1.55s2.58.516 3.593 1.55l13.813 14.106h67.396l13.814-14.106c1.012-1.034 2.21-1.55 3.592-1.55 1.384 0 2.581.516 3.593 1.55 1.012 1.033 1.518 2.256 1.518 3.668 0 1.413-.506 2.636-1.518 3.67l-13.814 14.105v23.975h17.887c1.383 0 2.58.516 3.593 1.55 1.011 1.033 1.517 2.256 1.517 3.668l-.005.01zM89.552 26.175H38.448c0-7.23 2.489-13.386 7.466-18.469C50.892 2.623 56.92.082 64 .082c7.08 0 13.108 2.541 18.086 7.624 4.977 5.083 7.466 11.24 7.466 18.469z"/></svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.5 KiB |
@@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1568899741379" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2054" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M960 591.424V368.96c0-0.288 0.16-0.512 0.16-0.768S960 367.68 960 367.424V192a32 32 0 0 0-32-32H96a32 32 0 0 0-32 32v175.424c0 0.288-0.16 0.512-0.16 0.768s0.16 0.48 0.16 0.768v222.464c0 0.288-0.16 0.512-0.16 0.768s0.16 0.48 0.16 0.768V864a32 32 0 0 0 32 32h832a32 32 0 0 0 32-32v-271.04c0-0.288 0.16-0.512 0.16-0.768S960 591.68 960 591.424z m-560-31.232v-160H608v160h-208z m208 64V832h-208v-207.808H608z m-480-224h208v160H128v-160z m544 0h224v160h-224v-160zM896 224v112.192H128V224h768zM128 624.192h208V832H128v-207.808zM672 832v-207.808h224V832h-224z" p-id="2055"></path></svg>
|
|
||||||
|
Before Width: | Height: | Size: 954 B |
@@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1588670460195" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1314" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M230.4 307.712c13.824 0 25.088-11.264 25.088-25.088 0-100.352 81.92-182.272 182.272-182.272s182.272 81.408 182.272 182.272c0 13.824 11.264 25.088 25.088 25.088s25.088-11.264 24.576-25.088c0-127.488-103.936-231.936-231.936-231.936S205.824 154.624 205.824 282.624c-0.512 14.336 10.752 25.088 24.576 25.088z m564.736 234.496c-11.264 0-21.504 2.048-31.232 6.144 0-44.544-40.448-81.92-88.064-81.92-14.848 0-28.16 3.584-39.936 10.24-13.824-28.16-44.544-48.128-78.848-48.128-12.288 0-24.576 2.56-35.328 7.68V284.16c0-45.568-37.888-81.92-84.48-81.92s-84.48 36.864-84.48 81.92v348.672l-69.12-112.64c-18.432-28.16-58.368-36.864-91.136-19.968-26.624 14.336-46.592 47.104-30.208 88.064 3.072 8.192 76.8 205.312 171.52 311.296 0 0 28.16 24.576 43.008 58.88 4.096 9.728 13.312 15.36 22.528 15.36 3.072 0 6.656-0.512 9.728-2.048 12.288-5.12 18.432-19.968 12.8-32.256-19.456-44.544-53.76-74.752-53.76-74.752C281.6 768 209.408 573.44 208.384 570.88c-5.12-12.8-2.56-20.992 7.168-26.112 9.216-4.608 21.504-4.608 26.112 2.56l113.152 184.32c4.096 8.704 12.8 14.336 22.528 14.336 13.824 0 25.088-10.752 25.088-25.088V284.16c0-17.92 15.36-32.256 34.816-32.256s34.816 14.336 34.816 32.256v284.16c0 13.824 10.24 25.088 24.576 25.088 13.824 0 25.088-11.264 25.088-25.088v-57.344c0-17.92 15.36-32.768 34.816-32.768 19.968 0 37.376 15.36 37.376 32.768v95.232c0 7.168 3.072 13.312 7.68 17.92 4.608 4.608 10.752 7.168 17.92 7.168 13.824 0 24.576-11.264 24.576-25.088V547.84c0-18.432 13.824-32.256 32.256-32.256 20.48 0 38.912 15.36 38.912 32.256v95.232c0 13.824 11.264 25.088 25.088 25.088s24.576-11.264 25.088-25.088v-18.944c0-18.944 12.8-32.256 30.72-32.256 18.432 0 22.528 18.944 22.528 31.744 0 1.024-11.776 99.84-50.688 173.056-30.72 58.368-45.056 112.128-51.2 146.944-2.56 13.312 6.656 26.112 19.968 28.672 1.536 0 3.072 0.512 4.608 0.512 11.776 0 22.016-8.192 24.064-20.48 5.632-31.232 18.432-79.36 46.08-132.608 43.52-81.92 55.808-186.88 56.32-193.536-0.512-50.688-29.696-83.968-72.704-83.968z"></path></path></svg>
|
|
||||||
|
Before Width: | Height: | Size: 2.3 KiB |
@@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1576153230908" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="971" xmlns:xlink="http://www.w3.org/1999/xlink" width="81" height="81"><defs><style type="text/css"></style></defs><path d="M772.87036133 734.06115723c-43.34106445 0-80.00793458 27.93273926-93.76831055 66.57714843H475.90991211c-56.60705567 0-102.66723633-46.06018067-102.66723633-102.66723633V600.82446289h305.859375c13.76037598 38.64440918 50.42724609 66.57714844 93.76831055 66.57714844 55.12390137 0 99.94812012-44.82421875 99.94812012-99.94812012S827.9942627 467.50537109 772.87036133 467.50537109c-43.34106445 0-80.00793458 27.93273926-93.76831055 66.57714844H373.24267578V401.01062011h321.92687989c55.12390137 0 99.94812012-44.82421875 99.94812011-99.94812011V190.07312011C795.11767578 134.94921875 750.29345703 90.125 695.16955567 90.125H251.12963867C196.0057373 90.125 151.18151855 134.94921875 151.18151855 190.07312011V301.0625c0 55.12390137 44.82421875 99.94812012 99.94812012 99.94812012h55.53588867v296.96044921c0 93.35632325 75.97045898 169.32678223 169.32678224 169.32678223h203.19213866c13.76037598 38.64440918 50.42724609 66.57714844 93.76831055 66.57714844 55.12390137 0 99.94812012-44.82421875 99.94812012-99.94812012s-44.90661622-99.86572266-100.03051758-99.86572265z m0-199.89624024c18.37463379 0 33.28857422 14.91394043 33.28857422 33.28857423s-14.91394043 33.28857422-33.28857422 33.28857421-33.28857422-14.91394043-33.28857422-33.28857421 14.91394043-33.28857422 33.28857422-33.28857422zM217.75866699 301.0625V190.07312011c0-18.37463379 14.91394043-33.28857422 33.28857423-33.28857421h444.03991698c18.37463379 0 33.28857422 14.91394043 33.28857422 33.28857422V301.0625c0 18.37463379-14.91394043 33.28857422-33.28857422 33.28857422H251.12963867c-18.37463379 0-33.37097168-14.91394043-33.37097168-33.28857422z m555.11169434 566.23535156c-18.37463379 0-33.28857422-14.91394043-33.28857422-33.28857422 0-18.37463379 14.91394043-33.28857422 33.28857422-33.28857422s33.28857422 14.91394043 33.28857422 33.28857422c0.08239747 18.29223633-14.91394043 33.28857422-33.28857422 33.28857422z" p-id="972"></path></svg>
|
|
||||||
|
Before Width: | Height: | Size: 2.2 KiB |
@@ -1 +0,0 @@
|
|||||||
<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M0 54.857h36.571V128H0V54.857zM91.429 27.43H128V128H91.429V27.429zM45.714 0h36.572v128H45.714V0z"/></svg>
|
|
||||||
|
Before Width: | Height: | Size: 179 B |
@@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1575982282951" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="902" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M828.40625 90.125H195.59375C137.375 90.125 90.125 137.375 90.125 195.59375v632.8125c0 58.21875 47.25 105.46875 105.46875 105.46875h632.8125c58.21875 0 105.46875-47.25 105.46875-105.46875V195.59375c0-58.21875-47.25-105.46875-105.46875-105.46875z m52.734375 738.28125c0 29.16-23.57015625 52.734375-52.734375 52.734375H195.59375c-29.109375 0-52.734375-23.574375-52.734375-52.734375V195.59375c0-29.109375 23.625-52.734375 52.734375-52.734375h632.8125c29.16 0 52.734375 23.625 52.734375 52.734375v632.8125z" p-id="903"></path><path d="M421.52890625 709.55984375a36.28125 36.28125 0 0 1-27.55265625-12.66890625L205.17453125 476.613125a36.28546875 36.28546875 0 0 1 55.10109375-47.22890625l164.986875 192.4846875 342.16171875-298.48078125a36.2896875 36.2896875 0 0 1 47.70984375 54.68765625L445.3859375 700.6203125a36.3234375 36.3234375 0 0 1-23.85703125 8.93953125z" p-id="904"></path></svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.2 KiB |
@@ -1 +0,0 @@
|
|||||||
<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M54.857 118.857h64V73.143H89.143c-1.902 0-3.52-.668-4.855-2.002-1.335-1.335-2.002-2.954-2.002-4.855V36.57H54.857v82.286zM73.143 16v-4.571a2.2 2.2 0 0 0-.677-1.61 2.198 2.198 0 0 0-1.609-.676H20.571c-.621 0-1.158.225-1.609.676a2.198 2.198 0 0 0-.676 1.61V16a2.2 2.2 0 0 0 .676 1.61c.451.45.988.676 1.61.676h50.285c.622 0 1.158-.226 1.61-.677.45-.45.676-.987.676-1.609zm18.286 48h21.357L91.43 42.642V64zM128 73.143v48c0 1.902-.667 3.52-2.002 4.855-1.335 1.335-2.953 2.002-4.855 2.002H52.57c-1.901 0-3.52-.667-4.854-2.002-1.335-1.335-2.003-2.953-2.003-4.855v-11.429H6.857c-1.902 0-3.52-.667-4.855-2.002C.667 106.377 0 104.759 0 102.857v-96c0-1.902.667-3.52 2.002-4.855C3.337.667 4.955 0 6.857 0h77.714c1.902 0 3.52.667 4.855 2.002 1.335 1.335 2.003 2.953 2.003 4.855V30.29c1 .622 1.856 1.29 2.569 2.003l29.147 29.147c1.335 1.335 2.478 3.145 3.429 5.43.95 2.287 1.426 4.383 1.426 6.291v-.018z"/></svg>
|
|
||||||
|
Before Width: | Height: | Size: 971 B |
@@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1546567861908" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2422" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M318.577778 819.2L17.066667 512l301.511111-307.2 45.511111 45.511111L96.711111 512l267.377778 261.688889zM705.422222 819.2l-45.511111-45.511111L927.288889 512l-267.377778-261.688889 45.511111-45.511111L1006.933333 512zM540.785778 221.866667l55.751111 11.150222L483.157333 802.133333l-55.751111-11.093333z" p-id="2423"></path></svg>
|
|
||||||
|
Before Width: | Height: | Size: 717 B |
@@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1577252187056" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2508" xmlns:xlink="http://www.w3.org/1999/xlink" width="81" height="81"><defs><style type="text/css"></style></defs><path d="M747.59340925 691.12859384c11.51396329 0.25305413 22.43746719-0.21087818 40.74171707-1.51832482 29.35428085-2.10878421 35.84933734-2.36183835 46.47761114-0.8856895 24.71495444 3.37405491 41.12129828 21.76265671 32.47528161 47.95376084-85.57447632 258.19957947-442.00123984 249.76444099-628.67084683 50.73735554-153.47733892-159.33976008-153.09775772-414.41833795 0.92786545-573.42069196 159.71934128-162.67163983 424.03439521-166.59397897 565.78689185 0.63263534 80.38686649 94.81095318 108.34934958 169.16669549 89.11723508 230.57450162-15.01454608 47.99593598-50.61082928 77.68762207-119.77896259 114.63352789-4.89237973 2.65706845-29.35428085 15.52065436-35.84933652 19.02123633-46.94154346 25.30541465-63.51659033 41.20565021-62.20914449 58.45550757 2.95229856 39.13904114 24.16667102 52.7196135 70.98168823 53.81618115z m44.41100207 50.10472101c-19.82257471 1.43397372-32.05352527 1.940082-45.63409763 1.6448519-70.34905207-1.60267593-115.98314969-30.91478165-121.38163769-101.64341492-3.45840683-46.05585397 24.7571304-73.13264758 89.24376132-107.96976837 6.7902866-3.66928501 31.37871396-16.57504688 36.06021551-19.06341229 57.69634516-30.83042972 85.15271997-53.73183005 94.76877722-84.47790866 12.77923398-40.78389304-9.10994898-98.94417051-79.24812286-181.6507002-121.17075953-142.97559219-350.14258521-139.60153647-489.2380134 2.06660824-134.49827774 138.84237405-134.79350784 362.12048163-0.42175717 501.637667 158.53842169 168.99799328 451.9968783 181.18676788 534.57688175-11.80919339-4.68150156 0.2952301-10.71262573 0.67481131-18.72600705 1.26527069z" p-id="2509"></path><path d="M346.03865637 637.18588562a78.82636652 78.82636652 0 0 0 78.32025825-79.29029883c0-43.69401562-35.005823-79.29029883-78.32025825-79.29029882a78.82636652 78.82636652 0 0 0-78.36243338 79.29029882c0 43.69401562 35.005823 79.29029883 78.36243338 79.29029883z m0-51.7495729a27.07679361 27.07679361 0 0 1-26.5706845-27.54072593c0-15.30977536 11.97789643-27.54072593 26.5706845-27.54072592 14.55061295 0 26.57068533 12.23095057 26.57068533 27.54072592a27.07679361 27.07679361 0 0 1-26.57068533 27.54072593zM475.7289063 807.11174353a78.82636652 78.82636652 0 0 0 78.3624334-79.29029882c0-43.69401562-34.96364785-79.29029883-78.32025825-79.29029883a78.82636652 78.82636652 0 0 0-78.32025742 79.29029883c0 43.69401562 34.96364785 79.29029883 78.32025742 79.29029882z m0-51.74957208a27.07679361 27.07679361 0 0 1-26.57068532-27.54072674c0-15.30977536 12.06224753-27.54072593 26.57068532-27.54072593 14.59278892 0 26.57068533 12.23095057 26.57068453 27.54072593a27.07679361 27.07679361 0 0 1-26.57068453 27.54072674zM601.24376214 377.21492718a78.82636652 78.82636652 0 0 0 78.32025742-79.29029883c0-43.69401562-34.96364785-79.29029883-78.32025742-79.29029882a78.82636652 78.82636652 0 0 0-78.32025823 79.29029883c0 43.69401562 34.96364785 79.29029883 78.32025824 79.29029883z m1e-8-51.74957208a27.07679361 27.07679361 0 0 1-26.57068534-27.54072675c0-15.30977536 11.97789643-27.54072593 26.57068534-27.54072591 14.55061295 0 26.57068533 12.23095057 26.57068451 27.54072592a27.07679361 27.07679361 0 0 1-26.57068451 27.54072674zM378.80916809 433.85687983a78.82636652 78.82636652 0 0 0 78.32025824-79.29029883c0-43.69401562-34.96364785-79.29029883-78.32025824-79.29029802a78.82636652 78.82636652 0 0 0-78.32025742 79.29029802c0 43.69401562 34.96364785 79.29029883 78.32025742 79.29029883z m0-51.74957209a27.07679361 27.07679361 0 0 1-26.57068451-27.54072674c0-15.30977536 11.97789643-27.54072593 26.57068451-27.54072593 14.55061295 0 26.57068533 12.23095057 26.57068533 27.54072593a27.07679361 27.07679361 0 0 1-26.57068533 27.54072674z" p-id="2510"></path></svg>
|
|
||||||
|
Before Width: | Height: | Size: 3.9 KiB |