diff --git a/README.md b/README.md index 3d24601..f171485 100644 --- a/README.md +++ b/README.md @@ -49,12 +49,12 @@ - - + + - - + + @@ -65,8 +65,8 @@ - - + + diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index 1122913..ae3a5c3 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -1,6 +1,6 @@ { "name": "ruoyi", - "version": "1.0.0", + "version": "1.1.0", "description": "若依管理系统", "author": "若依", "license": "MIT", diff --git a/ruoyi-ui/src/api/monitor/logininfor.js b/ruoyi-ui/src/api/monitor/logininfor.js index 9914aaf..0b89cdc 100644 --- a/ruoyi-ui/src/api/monitor/logininfor.js +++ b/ruoyi-ui/src/api/monitor/logininfor.js @@ -7,4 +7,29 @@ export function list(query) { method: 'get', params: query }) +} + +// 删除登录日志 +export function delLogininfor(infoId) { + return request({ + url: '/monitor/logininfor/' + infoId, + method: 'delete' + }) +} + +// 清空登录日志 +export function cleanLogininfor() { + return request({ + url: '/monitor/logininfor/clean', + 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 a6088ad..c519355 100644 --- a/ruoyi-ui/src/api/monitor/operlog.js +++ b/ruoyi-ui/src/api/monitor/operlog.js @@ -7,4 +7,29 @@ export function list(query) { 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' + }) +} + +// 导出操作日志 +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 6ed1050..124c981 100644 --- a/ruoyi-ui/src/api/system/config.js +++ b/ruoyi-ui/src/api/system/config.js @@ -49,4 +49,13 @@ export function delConfig(configId) { url: '/system/config/' + configId, method: 'delete' }) +} + +// 导出参数 +export function exportConfig(query) { + return request({ + url: '/system/config/export', + method: 'get', + params: query + }) } \ No newline at end of file diff --git a/ruoyi-ui/src/api/system/dict/data.js b/ruoyi-ui/src/api/system/dict/data.js index a0fb115..6a3f418 100644 --- a/ruoyi-ui/src/api/system/dict/data.js +++ b/ruoyi-ui/src/api/system/dict/data.js @@ -49,4 +49,13 @@ export function delData(dictCode) { url: '/system/dict/data/' + 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 749bfaa..80a6cfa 100644 --- a/ruoyi-ui/src/api/system/dict/type.js +++ b/ruoyi-ui/src/api/system/dict/type.js @@ -42,3 +42,12 @@ export function delType(dictId) { method: 'delete' }) } + +// 导出字典类型 +export function exportType(query) { + return request({ + url: '/system/dict/type/export', + method: 'get', + params: query + }) +} diff --git a/ruoyi-ui/src/api/system/post.js b/ruoyi-ui/src/api/system/post.js index 1bdf069..fb124d9 100644 --- a/ruoyi-ui/src/api/system/post.js +++ b/ruoyi-ui/src/api/system/post.js @@ -41,4 +41,13 @@ export function delPost(postId) { url: '/system/post/' + postId, method: 'delete' }) +} + +// 导出岗位 +export function exportPost(query) { + return request({ + url: '/system/post/export', + method: 'get', + params: query + }) } \ No newline at end of file diff --git a/ruoyi-ui/src/api/system/role.js b/ruoyi-ui/src/api/system/role.js index 95a606d..736708c 100644 --- a/ruoyi-ui/src/api/system/role.js +++ b/ruoyi-ui/src/api/system/role.js @@ -63,4 +63,13 @@ export function delRole(roleId) { url: '/system/role/' + roleId, method: 'delete' }) +} + +// 导出角色 +export function exportRole(query) { + return request({ + url: '/system/role/export', + method: 'get', + params: query + }) } \ No newline at end of file diff --git a/ruoyi-ui/src/api/system/user.js b/ruoyi-ui/src/api/system/user.js index 55766af..3b1170e 100644 --- a/ruoyi-ui/src/api/system/user.js +++ b/ruoyi-ui/src/api/system/user.js @@ -43,6 +43,15 @@ 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 = { @@ -106,4 +115,4 @@ export function uploadAvatar(data) { method: 'post', data: data }) -} \ No newline at end of file +} diff --git a/ruoyi-ui/src/assets/styles/ruoyi.scss b/ruoyi-ui/src/assets/styles/ruoyi.scss index 7c3aca1..9e0cdc3 100644 --- a/ruoyi-ui/src/assets/styles/ruoyi.scss +++ b/ruoyi-ui/src/assets/styles/ruoyi.scss @@ -3,6 +3,56 @@ * Copyright (c) 2019 ruoyi */ + /** 基础通用 **/ +.pt5 { + padding-top: 5px; +} +.pr5 { + padding-right: 5px; +} +.pb5 { + padding-bottom: 5px; +} +.mt5 { + margin-top: 5px; +} +.mr5 { + margin-right: 5px; +} +.mb5 { + margin-bottom: 5px; +} +.mb8 { + margin-bottom: 8px; +} +.ml5 { + margin-left: 5px; +} +.mt10 { + margin-top: 10px; +} +.mr10 { + margin-right: 10px; +} +.mb10 { + margin-bottom: 10px; +} +.ml0 { + margin-left: 10px; +} +.mt20 { + margin-top: 20px; +} +.mr20 { + margin-right: 20px; +} +.mb20 { + margin-bottom: 20px; +} +.m20 { + margin-left: 20px; +} + .el-table .el-table__header-wrapper th { word-break: break-word; background-color: #f8f8f9; diff --git a/ruoyi-ui/src/main.js b/ruoyi-ui/src/main.js index 2b5419d..fbd3d6d 100644 --- a/ruoyi-ui/src/main.js +++ b/ruoyi-ui/src/main.js @@ -18,7 +18,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 } from "@/utils/ruoyi"; +import { parseTime, resetForm, addDateRange, selectDictLabel, download } from "@/utils/ruoyi"; import Pagination from "@/components/Pagination"; // 全局方法挂载 @@ -28,6 +28,7 @@ Vue.prototype.parseTime = parseTime Vue.prototype.resetForm = resetForm Vue.prototype.addDateRange = addDateRange Vue.prototype.selectDictLabel = selectDictLabel +Vue.prototype.download = download Vue.prototype.msgSuccess = function (msg) { this.$message({ showClose: true, message: msg, type: "success" }); diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js index 6442ce2..db97dcc 100644 --- a/ruoyi-ui/src/utils/ruoyi.js +++ b/ruoyi-ui/src/utils/ruoyi.js @@ -3,6 +3,8 @@ * Copyright (c) 2019 ruoyi */ +const baseURL = process.env.VUE_APP_BASE_API + // 日期格式化 export function parseTime(time, pattern) { if (arguments.length === 0) { @@ -73,6 +75,11 @@ export function selectDictLabel(datas, value) { return actions.join(''); } +// 通用下载方法 +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/monitor/logininfor/index.vue b/ruoyi-ui/src/views/monitor/logininfor/index.vue index 1e3811e..9dee330 100644 --- a/ruoyi-ui/src/views/monitor/logininfor/index.vue +++ b/ruoyi-ui/src/views/monitor/logininfor/index.vue @@ -1,7 +1,7 @@