diff --git a/README.md b/README.md
index 2779fda93..778b901f4 100644
--- a/README.md
+++ b/README.md
@@ -4,8 +4,8 @@
[](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/blob/master/LICENSE)
[](https://www.jetbrains.com/?from=RuoYi-Vue-Plus)
-[](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus)
-[]()
+[](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus)
+[]()
[]()
[]()
@@ -21,51 +21,39 @@ RuoYi-Vue-Plus 是基于 RuoYi-Vue 针对 `分布式集群` 场景升级 定期
* 权限认证框架 Spring Security、Jwt,支持多终端认证系统
* 关系数据库 MySQL 适配 8.X
* 缓存数据库 Redis 适配 6.X
-* 数据库开发框架 Mybatis-Plus 快速 CRUD 增加开发效率 插件化支持各类需求
+* 数据库框架 Mybatis-Plus 快速 CRUD 增加开发效率 插件化支持各类需求
+* 数据库框架 多数据源框架 dynamic-datasource 支持主从与多种类数据库异构
+* 数据库框架 Redis客户端 采用 Redisson 性能更强
+* 数据库框架 性能分析插件 p6spy 更强劲的 SQL 分析
+* 序列化框架 统一使用 jackson 高效可靠
* 网络框架 Feign、OkHttp3 接口化管理 HTTP 请求
-* 工具类框架 Hutool、Lombok 减少代码冗余 增加安全性
+* 分布式锁 Lock4j 注解锁、工具锁 多种多样
+* 文件存储 OSS 对象存储模块 支持(Minio、七牛、阿里、腾讯)
* 监控框架 spring-boot-admin 全方位服务监控
* 校验框架 validation 增强接口安全性 严谨性
+* Excel框架 Alibaba EasyExcel 性能优异 扩展性强
* 文档框架 knife4j 美化接口文档
-* 序列化框架 统一使用 jackson 高效可靠
+* 工具类框架 Hutool、Lombok 减少代码冗余 增加安全性
* 代码生成器 一键生成前后端代码
-* 多数据源框架 dynamic-datasource 支持主从与多种类数据库异构
-* Redis客户端 采用 Redisson 性能更强
-* 分布式锁 Lock4j 注解锁、工具锁 多种多样
* 部署方式 Docker 容器编排 一键部署业务集群
-* 文件存储 OSS 对象存储模块 支持(Minio、七牛、阿里、腾讯)
+* 国际化 Spring 标准国际化方解决方案
## 参考文档
使用框架前请仔细阅读文档重点注意事项
>[初始化项目 必看](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/关于初始化项目?sort_id=4164117)
+>>[https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/关于初始化项目?sort_id=4164117](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/关于初始化项目?sort_id=4164117)
>
>[部署项目 必看](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/关于应用部署?sort_id=4219382)
+>>[https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/关于应用部署?sort_id=4219382](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/关于应用部署?sort_id=4219382)
>
>[参考文档 Wiki](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages)
+>>[https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages)
-## 提问四部曲
-### 一、查阅wiki
-优先在`wiki->重点事项`,查找是否有相关问题及解决方案,尤其是框架更新后产生的问题,多会在wiki中提及
+## 软件架构图
-> [参考文档 Wiki](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/pages)
-
-### 二、借助issues
-尝试issues中搜索问题关键字(记得选择已完成),看看是否有其他人提出相同问题
-- `如果有`那么依据评论中的解决方案自行尝试解决
-- `如果没有`那么提交一个新的issues描述清楚你的问题,需要包含以下内容(优质的issues,能够帮助作者更高效的帮你解决问题):
- - 出现问题的模块或功能或类,总之你要说清楚在哪出的问题
- - 描述产生问题的相关操作流程,以便复现快速解决
- - 报错的日志截图,一定是截图,不要复制一堆报错的文本
-> [issues](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/issues)
-
-### 三、百度
-大家都懂,不多描述,将关键的报错信息CC->CV到百度中看看大佬们怎么解决的
-> [百度](http://www.baidu.com)
-
-### 四、加群
-以上三点已经能解决大家绝大部分问题了,如果还有问题没能通过这几种方式解决,那么加群,大家一起在群里探讨一下
+
## 贡献代码
@@ -79,7 +67,8 @@ RuoYi-Vue-Plus 是基于 RuoYi-Vue 针对 `分布式集群` 场景升级 定期
* ORM框架 使用 Mybatis-Plus 简化CRUD (不支持主子表)
* Bean简化 使用 Lombok 简化 get set toString 等等
* 容器改动 Tomcat 改为 并发性能更好的 undertow
-* 分页移除 pagehelper 改为 Mybatis-Plus 分页
+* 移除 pagehelper 改为 Mybatis-Plus 分页
+* 集成 p6spy 更强劲的 SQL 分析
* 升级 swagger 为 knife4j
* 集成 Hutool 5.X 并重写RuoYi部分功能
* 集成 Feign 接口化管理 Http 请求(如三方请求 支付,短信,推送等)
@@ -90,7 +79,8 @@ RuoYi-Vue-Plus 是基于 RuoYi-Vue 针对 `分布式集群` 场景升级 定期
* 集成 dynamic-datasource 多数据源(默认支持MySQL,其他种类需自行适配)
* 集成 Lock4j 实现分布式 注解锁、工具锁 多种多样
* 增加 Docker 容器编排 打包插件与部署脚本
-* 移除 本地文件上传 改为 OSS对象存储 支持(Minio、七牛、阿里、腾讯)
+* 移除 通用上传下载 改为 OSS对象存储 支持(Minio、七牛、阿里、腾讯)
+* 移除 RuoYi自带 Excel 工具 改为 EasyExcel 工具
### 代码改动
@@ -112,8 +102,9 @@ RuoYi-Vue-Plus 是基于 RuoYi-Vue 针对 `分布式集群` 场景升级 定期
* 单模块 fast 分支 [RuoYi-Vue-Plus-fast](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/tree/fast/)
* Oracle 模块 oracle 分支 [RuoYi-Vue-Plus-oracle](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/tree/oracle/)
-## 扫码加群 一起交流
-
+## 加群与捐献
+>[加群与捐献](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/加群与捐献?sort_id=4104598)
+>>[https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/加群与捐献?sort_id=4104598](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/wikis/加群与捐献?sort_id=4104598)
## 捐献作者
作者为兼职做开源,平时还需要工作,如果帮到了您可以请作者吃个盒饭
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index ac065c351..228ddbf29 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -18,8 +18,6 @@ services:
- /docker/mysql/data/:/var/lib/mysql/
# 配置挂载
- /docker/mysql/conf/:/etc/mysql/conf.d/
- # 主机本机时间文件映射 与本机时间同步
- - /etc/localtime:/etc/localtime:ro
command:
# 将mysql8.0默认密码策略 修改为 原先 策略 (mysql8.0对其默认策略做了更改 会导致密码无法匹配)
--default-authentication-plugin=mysql_native_password
@@ -37,6 +35,9 @@ services:
# 如果需要指定版本 就把 latest 换成版本号
image: nginx:latest
container_name: nginx-web
+ environment:
+ # 时区上海
+ TZ: Asia/Shanghai
ports:
- 80:80
- 443:443
@@ -49,8 +50,6 @@ services:
- /docker/nginx/html:/usr/share/nginx/html
# 日志目录
- /docker/nginx/log:/var/log/nginx
- # 主机本机时间文件映射 与本机时间同步
- - /etc/localtime:/etc/localtime:ro
privileged: true
restart: always
networks:
@@ -62,16 +61,13 @@ services:
ports:
- 6379:6379
environment:
- # 设置环境变量 时区上海 编码UTF-8
+ # 时区上海
TZ: Asia/Shanghai
- LANG: en_US.UTF-8
volumes:
# 配置文件
- /docker/redis/conf/redis.conf:/redis.conf:rw
# 数据文件
- /docker/redis/data:/data:rw
- # 主机本机时间文件映射 与本机时间同步
- - /etc/localtime:/etc/localtime:ro
command: "redis-server --appendonly yes"
privileged: true
restart: always
@@ -88,6 +84,8 @@ services:
# 控制台端口
- 9001:9001
environment:
+ # 时区上海
+ TZ: Asia/Shanghai
# 管理后台用户名
MINIO_ACCESS_KEY: ruoyi
# 管理后台密码,最小8个字符
@@ -97,8 +95,6 @@ services:
- /docker/minio/data:/data
# 映射配置目录
- /docker/minio/config:/root/.minio/
- # 主机本机时间文件映射 与本机时间同步
- - /etc/localtime:/etc/localtime:ro
command: server --console-address ':9001' /data # 指定容器中的目录 /data
privileged: true
restart: always
@@ -107,9 +103,10 @@ services:
ipv4_address: 172.30.0.54
ruoyi-server1:
- image: "ruoyi/ruoyi-server:2.6.0"
+ image: "ruoyi/ruoyi-server:3.0.0"
environment:
- - TZ=Asia/Shanghai
+ # 时区上海
+ TZ: Asia/Shanghai
volumes:
# 配置文件
- /docker/server1/logs/:/ruoyi/server/logs/
@@ -121,9 +118,10 @@ services:
ipv4_address: 172.30.0.60
ruoyi-server2:
- image: "ruoyi/ruoyi-server:2.6.0"
+ image: "ruoyi/ruoyi-server:3.0.0"
environment:
- - TZ=Asia/Shanghai
+ # 时区上海
+ TZ: Asia/Shanghai
volumes:
# 配置文件
- /docker/server2/logs/:/ruoyi/server/logs/
@@ -135,9 +133,10 @@ services:
ipv4_address: 172.30.0.61
ruoyi-monitor-admin:
- image: "ruoyi/ruoyi-monitor-admin:2.6.0"
+ image: "ruoyi/ruoyi-monitor-admin:3.0.0"
environment:
- - TZ=Asia/Shanghai
+ # 时区上海
+ TZ: Asia/Shanghai
privileged: true
restart: always
networks:
diff --git a/pom.xml b/pom.xml
index d66cdcf63..e0866bdad 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,14 +6,14 @@
com.ruoyi
ruoyi-vue-plus
- 2.6.0
+ 3.0.0
RuoYi-Vue-Plus
https://gitee.com/JavaLionLi/RuoYi-Vue-Plus
RuoYi-Vue-Plus后台管理系统
- 2.6.0
+ 3.0.0
2.5.3
UTF-8
UTF-8
@@ -22,22 +22,25 @@
1.2.6
3.0.3
4.1.2
+ 2.2.10
1.7
0.9.1
3.4.3
- 5.7.6
+ 3.9.1
+ 5.7.7
3.0.3
- 11.0
- 2.4.3
+ 11.2
+ 4.9.1
+ 2.5.0
3.16.1
2.2.1
- 3.4.1
+ 3.4.1
7.8.0
3.13.0
5.6.47
- 8.2.0
+ 8.3.0
localhost
@@ -79,6 +82,12 @@
${poi.version}
+
+ com.alibaba
+ easyexcel
+ ${easyexcel.version}
+
+
org.apache.velocity
@@ -97,7 +106,7 @@
com.baomidou
dynamic-datasource-spring-boot-starter
- ${datasource.version}
+ ${dynamic-ds.version}
@@ -110,6 +119,12 @@
mybatis-plus-extension
${mybatis-plus.version}
+
+
+ p6spy
+ p6spy
+ ${p6spy.version}
+
cn.hutool
@@ -129,6 +144,12 @@
${feign-okhttp.version}
+
+ com.squareup.okhttp3
+ okhttp
+ ${okhttp.version}
+
+
de.codecentric
spring-boot-admin-starter-server
@@ -193,7 +214,7 @@
public
aliyun nexus
- http://maven.aliyun.com/nexus/content/groups/public/
+ https://maven.aliyun.com/repository/public/
true
@@ -204,7 +225,7 @@
public
aliyun nexus
- http://maven.aliyun.com/nexus/content/groups/public/
+ https://maven.aliyun.com/repository/public/
true
@@ -221,6 +242,7 @@
local
debug
+ '*'
@@ -229,6 +251,7 @@
dev
debug
+ '*'
@@ -240,6 +263,7 @@
prod
warn
+ health,info
diff --git a/ruoyi-extend/pom.xml b/ruoyi-extend/pom.xml
index 4df48bab7..3bfe77021 100644
--- a/ruoyi-extend/pom.xml
+++ b/ruoyi-extend/pom.xml
@@ -5,7 +5,7 @@
ruoyi-vue-plus
com.ruoyi
- 2.6.0
+ 3.0.0
4.0.0
ruoyi-extend
diff --git a/ruoyi-extend/ruoyi-monitor-admin/pom.xml b/ruoyi-extend/ruoyi-monitor-admin/pom.xml
index 9aca296c1..bada747b4 100644
--- a/ruoyi-extend/ruoyi-monitor-admin/pom.xml
+++ b/ruoyi-extend/ruoyi-monitor-admin/pom.xml
@@ -5,7 +5,7 @@
ruoyi-extend
com.ruoyi
- 2.6.0
+ 3.0.0
4.0.0
jar
diff --git a/ruoyi-ui/bin/run-web.bat b/ruoyi-ui/bin/run-web.bat
index a938e8921..3e209d772 100644
--- a/ruoyi-ui/bin/run-web.bat
+++ b/ruoyi-ui/bin/run-web.bat
@@ -1,6 +1,6 @@
@echo off
echo.
-echo [Ϣ] ʹ Vue Web ̡
+echo [��Ϣ] ʹ�� Vue CLI �������� Web ���̡�
echo.
%~d0
@@ -9,4 +9,4 @@ cd %~dp0
cd ..
npm run dev
-pause
\ No newline at end of file
+pause
diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json
index c980bab82..604d964c3 100644
--- a/ruoyi-ui/package.json
+++ b/ruoyi-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "ruoyi-vue-plus",
- "version": "2.6.0",
+ "version": "3.0.0",
"description": "RuoYi-Vue-Plus后台管理系统",
"author": "LionLi",
"license": "MIT",
@@ -41,7 +41,7 @@
"clipboard": "2.0.6",
"core-js": "3.8.1",
"echarts": "4.9.0",
- "element-ui": "2.15.3",
+ "element-ui": "2.15.5",
"file-saver": "2.0.4",
"fuse.js": "6.4.3",
"highlight.js": "9.18.5",
diff --git a/ruoyi-ui/src/api/demo/demo.js b/ruoyi-ui/src/api/demo/demo.js
index c7195afbd..04d40256f 100644
--- a/ruoyi-ui/src/api/demo/demo.js
+++ b/ruoyi-ui/src/api/demo/demo.js
@@ -52,11 +52,3 @@ export function delDemo(id) {
})
}
-// 导出测试单表
-export function exportDemo(query) {
- return request({
- url: '/demo/demo/export',
- method: 'get',
- params: query
- })
-}
diff --git a/ruoyi-ui/src/api/demo/tree.js b/ruoyi-ui/src/api/demo/tree.js
index d597e7261..4c7ebc070 100644
--- a/ruoyi-ui/src/api/demo/tree.js
+++ b/ruoyi-ui/src/api/demo/tree.js
@@ -42,12 +42,3 @@ export function delTree(id) {
method: 'delete'
})
}
-
-// 导出测试树表
-export function exportTree(query) {
- return request({
- url: '/demo/tree/export',
- method: 'get',
- params: query
- })
-}
\ No newline at end of file
diff --git a/ruoyi-ui/src/api/login.js b/ruoyi-ui/src/api/login.js
index 869cd9fda..8b5b6cf22 100644
--- a/ruoyi-ui/src/api/login.js
+++ b/ruoyi-ui/src/api/login.js
@@ -15,6 +15,18 @@ export function login(username, password, code, uuid) {
})
}
+// 注册方法
+export function register(data) {
+ return request({
+ url: '/register',
+ headers: {
+ isToken: false
+ },
+ method: 'post',
+ data: data
+ })
+}
+
// 获取用户详细信息
export function getInfo() {
return request({
@@ -37,4 +49,4 @@ export function getCodeImg() {
url: '/captchaImage',
method: 'get'
})
-}
\ No newline at end of file
+}
diff --git a/ruoyi-ui/src/api/monitor/jobLog.js b/ruoyi-ui/src/api/monitor/jobLog.js
index be1fffdfa..6e0be6166 100644
--- a/ruoyi-ui/src/api/monitor/jobLog.js
+++ b/ruoyi-ui/src/api/monitor/jobLog.js
@@ -24,12 +24,3 @@ export function cleanJobLog() {
method: 'delete'
})
}
-
-// 导出调度日志
-export function exportJobLog(query) {
- return request({
- url: '/monitor/jobLog/export',
- method: 'get',
- params: query
- })
-}
\ No newline at end of file
diff --git a/ruoyi-ui/src/api/monitor/logininfor.js b/ruoyi-ui/src/api/monitor/logininfor.js
index 383d61f30..26a46eb56 100644
--- a/ruoyi-ui/src/api/monitor/logininfor.js
+++ b/ruoyi-ui/src/api/monitor/logininfor.js
@@ -24,12 +24,3 @@ export function cleanLogininfor() {
method: 'delete'
})
}
-
-// 导出登录日志
-export function exportLogininfor(query) {
- return request({
- url: '/monitor/logininfor/export',
- method: 'get',
- params: query
- })
-}
\ No newline at end of file
diff --git a/ruoyi-ui/src/api/monitor/operlog.js b/ruoyi-ui/src/api/monitor/operlog.js
index f09b8ed8f..a04bca840 100644
--- a/ruoyi-ui/src/api/monitor/operlog.js
+++ b/ruoyi-ui/src/api/monitor/operlog.js
@@ -24,12 +24,3 @@ export function cleanOperlog() {
method: 'delete'
})
}
-
-// 导出操作日志
-export function exportOperlog(query) {
- return request({
- url: '/monitor/operlog/export',
- method: 'get',
- params: query
- })
-}
\ No newline at end of file
diff --git a/ruoyi-ui/src/api/system/config.js b/ruoyi-ui/src/api/system/config.js
index 4c5cb6b8d..c1932848d 100644
--- a/ruoyi-ui/src/api/system/config.js
+++ b/ruoyi-ui/src/api/system/config.js
@@ -59,11 +59,3 @@ export function refreshCache() {
})
}
-// 导出参数
-export function exportConfig(query) {
- return request({
- url: '/system/config/export',
- method: 'get',
- params: query
- })
-}
diff --git a/ruoyi-ui/src/api/system/dict/data.js b/ruoyi-ui/src/api/system/dict/data.js
index d7aca8923..6c9eb79b4 100644
--- a/ruoyi-ui/src/api/system/dict/data.js
+++ b/ruoyi-ui/src/api/system/dict/data.js
@@ -50,12 +50,3 @@ export function delData(dictCode) {
method: 'delete'
})
}
-
-// 导出字典数据
-export function exportData(query) {
- return request({
- url: '/system/dict/data/export',
- method: 'get',
- params: query
- })
-}
\ No newline at end of file
diff --git a/ruoyi-ui/src/api/system/dict/type.js b/ruoyi-ui/src/api/system/dict/type.js
index 2f0532da7..a0254baa7 100644
--- a/ruoyi-ui/src/api/system/dict/type.js
+++ b/ruoyi-ui/src/api/system/dict/type.js
@@ -51,15 +51,6 @@ export function refreshCache() {
})
}
-// 导出字典类型
-export function exportType(query) {
- return request({
- url: '/system/dict/type/export',
- method: 'get',
- params: query
- })
-}
-
// 获取字典选择框列表
export function optionselect() {
return request({
diff --git a/ruoyi-ui/src/api/system/oss.js b/ruoyi-ui/src/api/system/oss.js
index 39be59710..965f137aa 100644
--- a/ruoyi-ui/src/api/system/oss.js
+++ b/ruoyi-ui/src/api/system/oss.js
@@ -16,3 +16,14 @@ export function delOss(ossId) {
method: 'delete'
})
}
+
+export function changePreviewListResource(previewListResource) {
+ const data = {
+ previewListResource
+ }
+ return request({
+ url: '/system/oss/changePreviewListResource',
+ method: 'put',
+ data: data
+ })
+}
diff --git a/ruoyi-ui/src/api/system/ossConfig.js b/ruoyi-ui/src/api/system/ossConfig.js
new file mode 100644
index 000000000..2c6ae0c43
--- /dev/null
+++ b/ruoyi-ui/src/api/system/ossConfig.js
@@ -0,0 +1,58 @@
+import request from '@/utils/request'
+
+// 查询云存储配置列表
+export function listOssConfig(query) {
+ return request({
+ url: '/system/oss/config/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询云存储配置详细
+export function getOssConfig(ossConfigId) {
+ return request({
+ url: '/system/oss/config/' + ossConfigId,
+ method: 'get'
+ })
+}
+
+// 新增云存储配置
+export function addOssConfig(data) {
+ return request({
+ url: '/system/oss/config',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改云存储配置
+export function updateOssConfig(data) {
+ return request({
+ url: '/system/oss/config',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除云存储配置
+export function delOssConfig(ossConfigId) {
+ return request({
+ url: '/system/oss/config/' + ossConfigId,
+ method: 'delete'
+ })
+}
+
+// 用户状态修改
+export function changeOssConfigStatus(ossConfigId, status, configKey) {
+ const data = {
+ ossConfigId,
+ status,
+ configKey
+ }
+ return request({
+ url: '/system/oss/config/changeStatus',
+ method: 'put',
+ data: data
+ })
+}
diff --git a/ruoyi-ui/src/api/system/role.js b/ruoyi-ui/src/api/system/role.js
index c669ac43a..888538e55 100644
--- a/ruoyi-ui/src/api/system/role.js
+++ b/ruoyi-ui/src/api/system/role.js
@@ -65,16 +65,6 @@ export function delRole(roleId) {
})
}
-// 导出角色
-export function exportRole(query) {
- return request({
- url: '/system/role/export',
- method: 'get',
- params: query
- })
-}
-
-
// 查询角色已授权用户列表
export function allocatedUserList(query) {
return request({
diff --git a/ruoyi-ui/src/api/system/user.js b/ruoyi-ui/src/api/system/user.js
index 37f4eb338..204c26eb8 100644
--- a/ruoyi-ui/src/api/system/user.js
+++ b/ruoyi-ui/src/api/system/user.js
@@ -44,15 +44,6 @@ export function delUser(userId) {
})
}
-// 导出用户
-export function exportUser(query) {
- return request({
- url: '/system/user/export',
- method: 'get',
- params: query
- })
-}
-
// 用户密码重置
export function resetUserPwd(userId, password) {
const data = {
@@ -118,14 +109,6 @@ export function uploadAvatar(data) {
})
}
-// 下载用户导入模板
-export function importTemplate() {
- return request({
- url: '/system/user/importTemplate',
- method: 'get'
- })
-}
-
// 查询授权角色
export function getAuthRole(userId) {
return request({
diff --git a/ruoyi-ui/src/components/Breadcrumb/index.vue b/ruoyi-ui/src/components/Breadcrumb/index.vue
index b313fdd67..1fbae5f3c 100644
--- a/ruoyi-ui/src/components/Breadcrumb/index.vue
+++ b/ruoyi-ui/src/components/Breadcrumb/index.vue
@@ -45,7 +45,7 @@ export default {
if (!name) {
return false
}
- return name.trim() === '首页'
+ return name.trim() === 'Index'
},
handleLink(item) {
const { redirect, path } = item
diff --git a/ruoyi-ui/src/main.js b/ruoyi-ui/src/main.js
index d07dead41..5bc2b6c43 100644
--- a/ruoyi-ui/src/main.js
+++ b/ruoyi-ui/src/main.js
@@ -16,7 +16,7 @@ import './assets/icons' // icon
import './permission' // permission control
import { getDicts } from "@/api/system/dict/data";
import { getConfigKey } from "@/api/system/config";
-import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, handleTree } from "@/utils/ruoyi";
+import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi";
import Pagination from "@/components/Pagination";
// 自定义表格工具组件
import RightToolbar from "@/components/RightToolbar"
@@ -39,7 +39,6 @@ Vue.prototype.resetForm = resetForm
Vue.prototype.addDateRange = addDateRange
Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels
-Vue.prototype.download = download
Vue.prototype.handleTree = handleTree
Vue.prototype.msgSuccess = function (msg) {
diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js
index 98f09ed3d..381264eeb 100644
--- a/ruoyi-ui/src/router/index.js
+++ b/ruoyi-ui/src/router/index.js
@@ -43,6 +43,11 @@ export const constantRoutes = [
component: (resolve) => require(['@/views/login'], resolve),
hidden: true
},
+ {
+ path: '/register',
+ component: (resolve) => require(['@/views/register'], resolve),
+ hidden: true
+ },
{
path: '/404',
component: (resolve) => require(['@/views/error/404'], resolve),
@@ -61,8 +66,8 @@ export const constantRoutes = [
{
path: 'index',
component: (resolve) => require(['@/views/index'], resolve),
- name: '首页',
- meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
+ name: 'Index',
+ meta: { title: '首页', icon: 'dashboard', affix: true }
}
]
},
@@ -119,6 +124,19 @@ export const constantRoutes = [
}
]
},
+ {
+ path: '/system/oss-config',
+ component: Layout,
+ hidden: true,
+ children: [
+ {
+ path: 'index',
+ component: (resolve) => require(['@/views/system/oss/config'], resolve),
+ name: 'OssConfig',
+ meta: { title: '配置管理', activeMenu: '/system/oss'}
+ }
+ ]
+ },
{
path: '/monitor/job-log',
component: Layout,
diff --git a/ruoyi-ui/src/store/modules/user.js b/ruoyi-ui/src/store/modules/user.js
index c6624e3af..917f9163d 100644
--- a/ruoyi-ui/src/store/modules/user.js
+++ b/ruoyi-ui/src/store/modules/user.js
@@ -51,7 +51,7 @@ const user = {
return new Promise((resolve, reject) => {
getInfo().then(res => {
const user = res.data.user
- const avatar = user.avatar == "" ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar;
+ const avatar = user.avatar == "" ? require("@/assets/images/profile.jpg") : user.avatar;
if (res.data.roles && res.data.roles.length > 0) { // 验证返回的roles是否是一个非空数组
commit('SET_ROLES', res.data.roles)
commit('SET_PERMISSIONS', res.data.permissions)
diff --git a/ruoyi-ui/src/utils/download.js b/ruoyi-ui/src/utils/download.js
new file mode 100644
index 000000000..52b07f713
--- /dev/null
+++ b/ruoyi-ui/src/utils/download.js
@@ -0,0 +1,91 @@
+import axios from 'axios'
+import { getToken } from '@/utils/auth'
+
+const mimeMap = {
+ xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+ zip: 'application/zip',
+ oss: 'application/octet-stream'
+}
+
+const baseUrl = process.env.VUE_APP_BASE_API
+export function downLoadZip(str, filename) {
+ var url = baseUrl + str
+ axios({
+ method: 'get',
+ url: url,
+ responseType: 'blob',
+ headers: { 'Authorization': 'Bearer ' + getToken() }
+ }).then(res => {
+ resolveBlob(res, mimeMap.zip)
+ })
+}
+
+export function downLoadOss(ossId) {
+ var url = baseUrl + '/system/oss/download/' + ossId
+ axios({
+ method: 'get',
+ url: url,
+ responseType: 'blob',
+ headers: { 'Authorization': 'Bearer ' + getToken() }
+ }).then(res => {
+ resolveBlob(res, mimeMap.oss)
+ })
+}
+
+export function downLoadExcel(url, params) {
+ // get请求映射params参数
+ if (params) {
+ let urlparams = url + '?';
+ for (const propName of Object.keys(params)) {
+ const value = params[propName];
+ var part = encodeURIComponent(propName) + "=";
+ if (value !== null && typeof(value) !== "undefined") {
+ if (typeof value === 'object') {
+ for (const key of Object.keys(value)) {
+ if (value[key] !== null && typeof (value[key]) !== 'undefined') {
+ let params = propName + '[' + key + ']';
+ let subPart = encodeURIComponent(params) + '=';
+ urlparams += subPart + encodeURIComponent(value[key]) + '&';
+ }
+ }
+ } else {
+ urlparams += part + encodeURIComponent(value) + "&";
+ }
+ }
+ }
+ urlparams = urlparams.slice(0, -1);
+ url = urlparams;
+ }
+ url = baseUrl + url
+ axios({
+ method: 'get',
+ url: url,
+ responseType: 'blob',
+ headers: { 'Authorization': 'Bearer ' + getToken() }
+ }).then(res => {
+ resolveBlob(res, mimeMap.xlsx)
+ })
+}
+
+/**
+ * 解析blob响应内容并下载
+ * @param {*} res blob响应内容
+ * @param {String} mimeType MIME类型
+ */
+export function resolveBlob(res, mimeType) {
+ const aLink = document.createElement('a')
+ var blob = new Blob([res.data], { type: mimeType })
+ // //从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment; filename=xxxx.docx") 设置的文件名;
+ var patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*')
+ var contentDisposition = decodeURI(res.headers['content-disposition'])
+ var result = patt.exec(contentDisposition)
+ var fileName = result[1]
+ fileName = fileName.replace(/\"/g, '')
+ aLink.style.display = 'none'
+ aLink.href = URL.createObjectURL(blob)
+ aLink.setAttribute('download', decodeURI(fileName)) // 设置下载文件名称
+ document.body.appendChild(aLink)
+ aLink.click()
+ URL.revokeObjectURL(aLink.href);//清除引用
+ document.body.removeChild(aLink);
+}
diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js
index 6a7cbfa32..e4418b17d 100644
--- a/ruoyi-ui/src/utils/request.js
+++ b/ruoyi-ui/src/utils/request.js
@@ -28,9 +28,11 @@ service.interceptors.request.use(config => {
if (value !== null && typeof(value) !== "undefined") {
if (typeof value === 'object') {
for (const key of Object.keys(value)) {
- let params = propName + '[' + key + ']';
- var subPart = encodeURIComponent(params) + "=";
- url += subPart + encodeURIComponent(value[key]) + "&";
+ if (value[key] !== null && typeof (value[key]) !== 'undefined') {
+ let params = propName + '[' + key + ']';
+ let subPart = encodeURIComponent(params) + '=';
+ url += subPart + encodeURIComponent(value[key]) + '&';
+ }
}
} else {
url += part + encodeURIComponent(value) + "&";
@@ -64,7 +66,7 @@ service.interceptors.response.use(res => {
location.href = '/index';
})
}).catch(() => {});
- return Promise.reject('error')
+ return Promise.reject('令牌验证失败')
} else if (code === 500) {
Message({
message: msg,
diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js
index ac390f530..b426a313b 100644
--- a/ruoyi-ui/src/utils/ruoyi.js
+++ b/ruoyi-ui/src/utils/ruoyi.js
@@ -55,16 +55,15 @@ export function resetForm(refName) {
// 添加日期范围
export function addDateRange(params, dateRange, propName) {
- var search = params;
- search.params = {};
- if (null != dateRange && '' != dateRange) {
- if (typeof (propName) === "undefined") {
- search.params["beginTime"] = dateRange[0];
- search.params["endTime"] = dateRange[1];
- } else {
- search.params["begin" + propName] = dateRange[0];
- search.params["end" + propName] = dateRange[1];
- }
+ let search = params;
+ search.params = typeof (search.params) === 'object' && search.params !== null && !Array.isArray(search.params) ? search.params : {};
+ dateRange = Array.isArray(dateRange) ? dateRange : [];
+ if (typeof (propName) === 'undefined') {
+ search.params['beginTime'] = dateRange[0];
+ search.params['endTime'] = dateRange[1];
+ } else {
+ search.params['begin' + propName] = dateRange[0];
+ search.params['end' + propName] = dateRange[1];
}
return search;
}
@@ -96,11 +95,6 @@ export function selectDictLabels(datas, value, separator) {
return actions.join('').substring(0, actions.join('').length - 1);
}
-// 通用下载方法
-export function download(fileName) {
- window.location.href = baseURL + "/common/download?fileName=" + encodeURI(fileName) + "&delete=" + true;
-}
-
// 字符串格式化(%s )
export function sprintf(str) {
var args = arguments, flag = true, i = 1;
diff --git a/ruoyi-ui/src/views/demo/demo/index.vue b/ruoyi-ui/src/views/demo/demo/index.vue
index c2ef2e005..a0d9edc72 100644
--- a/ruoyi-ui/src/views/demo/demo/index.vue
+++ b/ruoyi-ui/src/views/demo/demo/index.vue
@@ -169,7 +169,8 @@
\ No newline at end of file
+
diff --git a/ruoyi-ui/src/views/monitor/logininfor/index.vue b/ruoyi-ui/src/views/monitor/logininfor/index.vue
index 07937b460..5d6c05193 100644
--- a/ruoyi-ui/src/views/monitor/logininfor/index.vue
+++ b/ruoyi-ui/src/views/monitor/logininfor/index.vue
@@ -119,7 +119,8 @@
+
+
diff --git a/ruoyi-ui/src/views/system/config/index.vue b/ruoyi-ui/src/views/system/config/index.vue
index 25086a9fe..69d85640f 100644
--- a/ruoyi-ui/src/views/system/config/index.vue
+++ b/ruoyi-ui/src/views/system/config/index.vue
@@ -181,7 +181,8 @@
diff --git a/ruoyi-ui/src/views/system/oss/index.vue b/ruoyi-ui/src/views/system/oss/index.vue
index 1171cc9c6..2bbbba060 100644
--- a/ruoyi-ui/src/views/system/oss/index.vue
+++ b/ruoyi-ui/src/views/system/oss/index.vue
@@ -96,7 +96,25 @@
v-hasPermi="['system:oss:remove']"
>删除
-
+
+ 预览开关 : {{previewListResource ? "禁用" : "启用"}}
+
+
+ 配置管理
+
@@ -109,12 +127,12 @@
+ v-if="!checkFileSuffix(scope.row.fileSuffix) || !previewListResource"/>
@@ -169,10 +187,8 @@