diff --git a/README.md b/README.md index 3bd450bf6..8dd1fb95c 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ | --- | --- | --- | | 🚀 | 配置管理 | 对系统动态配置常用参数,支持 SpringBoot 加载 | | | 定时任务 | 在线(添加、修改、删除)任务调度包含执行结果日志 | +| 🚀 | 文件服务 | 支持本地文件存储,同时支持兼容 Amazon S3 协议的云服务、开源组件 | | 🚀 | API 日志 | 包括 RESTful API 访问日志、异常日志两部分,方便排查 API 相关的问题 | | | MySQL 监控 | 监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈 | | | Redis 监控 |监控 Redis 数据库的使用情况,使用的 Redis Key 管理 | @@ -64,7 +65,6 @@ 计划新增: * 工作流 * 错误码 -* 文件服务 ### 研发工具 diff --git a/lombok.config b/lombok.config new file mode 100644 index 000000000..c6488faea --- /dev/null +++ b/lombok.config @@ -0,0 +1,4 @@ +config.stopBubbling = true +lombok.tostring.callsuper=true +lombok.equalsandhashcode.callsuper=true +lombok.accessors.chain=true diff --git a/pom.xml b/pom.xml index a601b907d..bba8d18cc 100644 --- a/pom.xml +++ b/pom.xml @@ -235,6 +235,12 @@ mapstruct ${mapstruct.version} + + org.mapstruct + mapstruct-processor + ${mapstruct.version} + true + org.mapstruct mapstruct-jdk8 diff --git a/ruoyi-ui/src/api/infra/dbDoc.js b/ruoyi-ui/src/api/infra/dbDoc.js index de54981d1..015c6d71d 100644 --- a/ruoyi-ui/src/api/infra/dbDoc.js +++ b/ruoyi-ui/src/api/infra/dbDoc.js @@ -8,3 +8,19 @@ export function exportHtml() { responseType: 'blob' }) } + +export function exportWord() { + return request({ + url: '/infra/db-doc/export-word', + method: 'get', + responseType: 'blob' + }) +} + +export function exportMarkdown() { + return request({ + url: '/infra/db-doc/export-markdown', + method: 'get', + responseType: 'blob' + }) +} diff --git a/ruoyi-ui/src/api/infra/file.js b/ruoyi-ui/src/api/infra/file.js new file mode 100644 index 000000000..2aeda2e90 --- /dev/null +++ b/ruoyi-ui/src/api/infra/file.js @@ -0,0 +1,18 @@ +import request from '@/utils/request' + +// 删除文件 +export function deleteFile(id) { + return request({ + url: '/infra/file/delete?id=' + id, + method: 'delete' + }) +} + +// 获得文件分页 +export function getFilePage(query) { + return request({ + url: '/infra/file/page', + method: 'get', + params: query + }) +} diff --git a/ruoyi-ui/src/api/system/dept.js b/ruoyi-ui/src/api/system/dept.js index c22f0f4a8..d8c59cf9a 100644 --- a/ruoyi-ui/src/api/system/dept.js +++ b/ruoyi-ui/src/api/system/dept.js @@ -46,7 +46,7 @@ export function addDept(data) { export function updateDept(data) { return request({ url: '/system/dept/update', - method: 'post', + method: 'put', data: data }) } @@ -55,6 +55,6 @@ export function updateDept(data) { export function delDept(id) { return request({ url: '/system/dept/delete?id=' + id, - method: 'post' + method: 'delete' }) } diff --git a/ruoyi-ui/src/api/system/dict/data.js b/ruoyi-ui/src/api/system/dict/data.js index c29b2f81f..00e614b15 100644 --- a/ruoyi-ui/src/api/system/dict/data.js +++ b/ruoyi-ui/src/api/system/dict/data.js @@ -38,7 +38,7 @@ export function addData(data) { export function updateData(data) { return request({ url: '/system/dict-data/update', - method: 'post', + method: 'put', data: data }) } @@ -47,7 +47,7 @@ export function updateData(data) { export function delData(dictCode) { return request({ url: '/system/dict-data/delete?id=' + dictCode, - method: 'post' + method: 'delete' }) } diff --git a/ruoyi-ui/src/api/system/dict/type.js b/ruoyi-ui/src/api/system/dict/type.js index a1423f1d6..9fe10d418 100644 --- a/ruoyi-ui/src/api/system/dict/type.js +++ b/ruoyi-ui/src/api/system/dict/type.js @@ -30,7 +30,7 @@ export function addType(data) { export function updateType(data) { return request({ url: '/system/dict-type/update', - method: 'post', + method: 'put', data: data }) } @@ -39,7 +39,7 @@ export function updateType(data) { export function delType(dictId) { return request({ url: '/system/dict-type/delete?id=' + dictId, - method: 'post' + method: 'delete' }) } diff --git a/ruoyi-ui/src/api/system/menu.js b/ruoyi-ui/src/api/system/menu.js index fb3fa6e98..b378b01d9 100644 --- a/ruoyi-ui/src/api/system/menu.js +++ b/ruoyi-ui/src/api/system/menu.js @@ -38,7 +38,7 @@ export function addMenu(data) { export function updateMenu(data) { return request({ url: '/system/menu/update', - method: 'post', + method: 'put', data: data }) } @@ -47,6 +47,6 @@ export function updateMenu(data) { export function delMenu(id) { return request({ url: '/system/menu/delete?id=' + id, - method: 'post' + method: 'delete' }) } diff --git a/ruoyi-ui/src/api/system/notice.js b/ruoyi-ui/src/api/system/notice.js index 744bba745..b8c7cf709 100644 --- a/ruoyi-ui/src/api/system/notice.js +++ b/ruoyi-ui/src/api/system/notice.js @@ -30,7 +30,7 @@ export function addNotice(data) { export function updateNotice(data) { return request({ url: '/system/notice/update', - method: 'post', + method: 'put', data: data }) } @@ -39,6 +39,6 @@ export function updateNotice(data) { export function delNotice(noticeId) { return request({ url: '/system/notice/delete?id=' + noticeId, - method: 'post' + method: 'delete' }) } diff --git a/ruoyi-ui/src/api/system/post.js b/ruoyi-ui/src/api/system/post.js index cb1dfc3e5..3ef4a9906 100644 --- a/ruoyi-ui/src/api/system/post.js +++ b/ruoyi-ui/src/api/system/post.js @@ -38,7 +38,7 @@ export function addPost(data) { export function updatePost(data) { return request({ url: '/system/post/update', - method: 'post', + method: 'put', data: data }) } @@ -47,7 +47,7 @@ export function updatePost(data) { export function delPost(postId) { return request({ url: '/system/post/delete?id=' + postId, - method: 'post' + method: 'delete' }) } diff --git a/ruoyi-ui/src/api/system/role.js b/ruoyi-ui/src/api/system/role.js index 36edcc2dd..27bb0500b 100644 --- a/ruoyi-ui/src/api/system/role.js +++ b/ruoyi-ui/src/api/system/role.js @@ -38,7 +38,7 @@ export function addRole(data) { export function updateRole(data) { return request({ url: '/system/role/update', - method: 'post', + method: 'put', data: data }) } @@ -51,7 +51,7 @@ export function changeRoleStatus(id, status) { } return request({ url: '/system/role/update-status', - method: 'post', + method: 'put', data: data }) } @@ -60,7 +60,7 @@ export function changeRoleStatus(id, status) { export function delRole(roleId) { return request({ url: '/system/role/delete?id=' + roleId, - method: 'post' + method: 'delete' }) } diff --git a/ruoyi-ui/src/api/system/user.js b/ruoyi-ui/src/api/system/user.js index 7676e2bcb..b1322edd5 100644 --- a/ruoyi-ui/src/api/system/user.js +++ b/ruoyi-ui/src/api/system/user.js @@ -31,7 +31,7 @@ export function addUser(data) { export function updateUser(data) { return request({ url: '/system/user/update', - method: 'post', + method: 'put', data: data }) } @@ -62,7 +62,7 @@ export function resetUserPwd(id, password) { } return request({ url: '/system/user/update-password', - method: 'post', + method: 'put', data: data }) } @@ -75,7 +75,7 @@ export function changeUserStatus(id, status) { } return request({ url: '/system/user/update-status', - method: 'post', + method: 'put', data: data }) } @@ -83,7 +83,7 @@ export function changeUserStatus(id, status) { // 查询用户个人信息 export function getUserProfile() { return request({ - url: '/system/user/profile', + url: '/system/user/profile/get', method: 'get' }) } @@ -91,7 +91,7 @@ export function getUserProfile() { // 修改用户个人信息 export function updateUserProfile(data) { return request({ - url: '/system/user/profile', + url: '/system/user/profile/update', method: 'put', data: data }) @@ -114,7 +114,7 @@ export function updateUserPwd(oldPassword, newPassword) { export function uploadAvatar(data) { return request({ url: '/system/user/profile/avatar', - method: 'post', + method: 'put', data: data }) } diff --git a/ruoyi-ui/src/main.js b/ruoyi-ui/src/main.js index 91556bf68..e1f067fa1 100644 --- a/ruoyi-ui/src/main.js +++ b/ruoyi-ui/src/main.js @@ -25,7 +25,10 @@ import { download, handleTree, downloadExcel, - downloadZip + downloadWord, + downloadZip, + downloadHtml, + downloadMarkdown, } from "@/utils/ruoyi"; import Pagination from "@/components/Pagination"; // 自定义表格工具扩展 @@ -48,6 +51,9 @@ Vue.prototype.getDictDataLabel = getDictDataLabel Vue.prototype.DICT_TYPE = DICT_TYPE Vue.prototype.download = download Vue.prototype.downloadExcel = downloadExcel +Vue.prototype.downloadWord = downloadWord +Vue.prototype.downloadHtml = downloadHtml +Vue.prototype.downloadMarkdown = downloadMarkdown Vue.prototype.downloadZip = downloadZip Vue.prototype.handleTree = handleTree diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js index 17f235f22..82f8aecc5 100644 --- a/ruoyi-ui/src/utils/ruoyi.js +++ b/ruoyi-ui/src/utils/ruoyi.js @@ -120,11 +120,26 @@ export function downloadExcel(data, fileName) { download0(data, fileName, 'application/vnd.ms-excel'); } +// 下载 Word 方法 +export function downloadWord(data, fileName) { + download0(data, fileName, 'application/msword'); +} + // 下载 Zip 方法 export function downloadZip(data, fileName) { download0(data, fileName, 'application/zip'); } +// 下载 Html 方法 +export function downloadHtml(data, fileName) { + download0(data, fileName, 'text/html'); +} + +// 下载 Markdown 方法 +export function downloadMarkdown(data, fileName) { + download0(data, fileName, 'text/markdown'); +} + function download0(data, fileName, mineType) { // 创建 blob let blob = new Blob([data], {type: mineType}); diff --git a/ruoyi-ui/src/views/infra/file/index.vue b/ruoyi-ui/src/views/infra/file/index.vue new file mode 100644 index 000000000..5eaf41655 --- /dev/null +++ b/ruoyi-ui/src/views/infra/file/index.vue @@ -0,0 +1,202 @@ + + + diff --git a/ruoyi-ui/src/views/system/dept/index.vue b/ruoyi-ui/src/views/system/dept/index.vue index 5485703ac..0fc5a8733 100644 --- a/ruoyi-ui/src/views/system/dept/index.vue +++ b/ruoyi-ui/src/views/system/dept/index.vue @@ -2,22 +2,11 @@
- + - + @@ -28,24 +17,13 @@ - 新增 + 新增 - + @@ -56,28 +34,12 @@ @@ -119,11 +81,8 @@ - {{dict.label}} + + {{dict.label}} diff --git a/ruoyi-ui/src/views/system/dict/data.vue b/ruoyi-ui/src/views/system/dict/data.vue index 262ea31bb..13d262303 100644 --- a/ruoyi-ui/src/views/system/dict/data.vue +++ b/ruoyi-ui/src/views/system/dict/data.vue @@ -3,31 +3,15 @@ - + - + - + @@ -38,22 +22,12 @@ - 新增 + 新增 - 导出 + 导出 @@ -72,31 +46,16 @@ - + @@ -115,11 +74,7 @@ - {{dict.label}} + {{dict.label}} diff --git a/ruoyi-ui/src/views/system/dict/index.vue b/ruoyi-ui/src/views/system/dict/index.vue index 4f92859a0..a730e61bf 100644 --- a/ruoyi-ui/src/views/system/dict/index.vue +++ b/ruoyi-ui/src/views/system/dict/index.vue @@ -2,52 +2,19 @@
- + - + - - + + - + 搜索 @@ -57,22 +24,12 @@ - 新增 + 新增 - 导出 + 导出 @@ -96,31 +53,16 @@ - + @@ -133,11 +75,7 @@ - {{dict.label}} + {{dict.label}} diff --git a/ruoyi-ui/src/views/system/loginlog/index.vue b/ruoyi-ui/src/views/system/loginlog/index.vue index 601c9420f..5e572aa94 100644 --- a/ruoyi-ui/src/views/system/loginlog/index.vue +++ b/ruoyi-ui/src/views/system/loginlog/index.vue @@ -2,56 +2,22 @@
- + - + - - - + + + - + 搜索 @@ -61,13 +27,8 @@ - 导出 + 导出 @@ -76,7 +37,7 @@ @@ -95,13 +56,8 @@ - +
diff --git a/ruoyi-ui/src/views/system/menu/index.vue b/ruoyi-ui/src/views/system/menu/index.vue index e2e759eeb..767878e2e 100644 --- a/ruoyi-ui/src/views/system/menu/index.vue +++ b/ruoyi-ui/src/views/system/menu/index.vue @@ -2,22 +2,11 @@
- + - + @@ -28,23 +17,14 @@ - 新增 + 新增 - +