From 3dac1d893197dc807f595647cd3b63eac56929b3 Mon Sep 17 00:00:00 2001 From: tianyongbao Date: Tue, 3 Feb 2026 22:21:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=8C=E6=88=90=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E5=92=8C=E7=99=BB=E5=BD=95=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/operlog.js | 26 + src/pages.json | 6 + src/pages_mine/pages/system/index.vue | 11 +- .../pages/system/logininfor/list.vue | 131 ++-- src/pages_mine/pages/system/operlog/list.vue | 632 ++++++++++++++++++ src/pages_mine/pages/system/post/list.vue | 119 ++-- src/pages_mine/pages/system/user/list.vue | 119 ++-- 7 files changed, 919 insertions(+), 125 deletions(-) create mode 100644 src/api/system/operlog.js create mode 100644 src/pages_mine/pages/system/operlog/list.vue diff --git a/src/api/system/operlog.js b/src/api/system/operlog.js new file mode 100644 index 0000000..51a4cc3 --- /dev/null +++ b/src/api/system/operlog.js @@ -0,0 +1,26 @@ +import request from '@/utils/request' + +// 查询操作日志列表 +export function list(query) { + return request({ + url: '/system/operlog/list', + method: 'get', + params: query + }) +} + +// 删除操作日志 +export function delOperlog(operId) { + return request({ + url: '/system/operlog/' + operId, + method: 'delete' + }) +} + +// 清空操作日志 +export function cleanOperlog() { + return request({ + url: '/system/operlog/clean', + method: 'delete' + }) +} diff --git a/src/pages.json b/src/pages.json index f35ad2a..c383d04 100644 --- a/src/pages.json +++ b/src/pages.json @@ -943,6 +943,12 @@ "style": { "navigationBarTitleText": "部门详情" } + }, + { + "path": "system/operlog/list", + "style": { + "navigationBarTitleText": "操作日志" + } } ] }, diff --git a/src/pages_mine/pages/system/index.vue b/src/pages_mine/pages/system/index.vue index 1528840..0860cec 100644 --- a/src/pages_mine/pages/system/index.vue +++ b/src/pages_mine/pages/system/index.vue @@ -34,13 +34,18 @@ const systemGridList = ref([ { path: '/pages/system/config/index', text: '参数设置', icon: 'gear', color: 'linear-gradient(135deg, #5f72bd 0%, #9b23ea 100%)' }, { path: '/pages/system/notice/index', text: '通知公告', icon: 'notification', color: 'linear-gradient(135deg, #0be881 0%, #0fbcf9 100%)' }, { path: '/pages/system/job/index', text: '定时任务', icon: 'calendar', color: 'linear-gradient(135deg, #6366f1 0%, #a855f7 100%)' }, - { path: '/pages/system/log/operlog/index', text: '操作日志', icon: 'compose', color: 'linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%)' }, + { path: '/pages_mine/pages/system/operlog/list', text: '操作日志', icon: 'compose', color: 'linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%)' }, { path: '/pages_mine/pages/system/logininfor/list', text: '登录日志', icon: 'eye', color: 'linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%)' } ]) function navigateTo(path) { - // 字典管理、登录日志、用户管理、岗位管理、部门管理已开发完成,可以跳转 - if (path === '/pages_mine/pages/system/dict/list' || path === '/pages_mine/pages/system/logininfor/list' || path === '/pages_mine/pages/system/user/list' || path === '/pages_mine/pages/system/post/list' || path === '/pages_mine/pages/system/dept/list') { + // 字典管理、登录日志、用户管理、岗位管理、部门管理、操作日志已开发完成,可以跳转 + if (path === '/pages_mine/pages/system/dict/list' || + path === '/pages_mine/pages/system/logininfor/list' || + path === '/pages_mine/pages/system/user/list' || + path === '/pages_mine/pages/system/post/list' || + path === '/pages_mine/pages/system/dept/list' || + path === '/pages_mine/pages/system/operlog/list') { uni.navigateTo({ url: path }); diff --git a/src/pages_mine/pages/system/logininfor/list.vue b/src/pages_mine/pages/system/logininfor/list.vue index f84807a..b9a6602 100644 --- a/src/pages_mine/pages/system/logininfor/list.vue +++ b/src/pages_mine/pages/system/logininfor/list.vue @@ -24,10 +24,18 @@ 登录时间 + disabledColor="#ffffff"> + + + disabledColor="#ffffff"> + + @@ -274,49 +282,69 @@ page { } .filter-panel { + width: 100%; position: absolute; - top: 100rpx; left: 0; - right: 0; - background-color: #ffffff; + top: 96rpx; + background-color: rgba(0, 0, 0, 0.5); z-index: 999; - display: flex; - flex-direction: column; - box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1); .filter-panel-content { - flex: 1; - padding: 32rpx; - overflow-y: auto; + background-color: #ffffff; + padding: 0 30rpx 30rpx; + border-radius: 16rpx 16rpx 0 0; .filter-title { - font-size: 28rpx; - font-weight: bold; - margin: 32rpx 0 24rpx 0; - color: #303133; - - &:first-child { - margin-top: 0; + color: #2c3e50; + font-size: 32rpx; + font-weight: 600; + padding: 32rpx 0 24rpx 20rpx; + position: relative; + display: flex; + align-items: center; + + &::before { + content: ''; + width: 6rpx; + height: 32rpx; + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + border-radius: 3rpx; + margin-right: 12rpx; + flex-shrink: 0; } } .state-list { display: flex; flex-wrap: wrap; + justify-content: flex-start; gap: 16rpx; .state-item { - padding: 16rpx 32rpx; - background-color: #f5f5f5; - border-radius: 32rpx; + padding: 0 32rpx; + height: 68rpx; + border: 2rpx solid #e8edf3; + border-radius: 34rpx; + text-align: center; + line-height: 68rpx; font-size: 28rpx; - color: #606266; - - &.active { - background-color: #667eea; - color: #ffffff; + color: #666666; + transition: all 0.3s ease; + background: #ffffff; + box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04); + + &:active { + transform: scale(0.95); } } + + .active { + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + border: 2rpx solid transparent; + color: #ffffff; + box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.3); + font-weight: 600; + } } .date-range { @@ -327,33 +355,52 @@ page { .btn-box { display: flex; - padding: 24rpx 32rpx; - border-top: 1rpx solid #f0f0f0; - + gap: 20rpx; + padding: 24rpx 30rpx; + background-color: #fff; + box-shadow: 0rpx -10rpx 20rpx #EEEEEE; + .btn-reset, .btn-confirm { - flex: 1; display: flex; align-items: center; justify-content: center; - padding: 20rpx 0; - border-radius: 32rpx; - font-size: 28rpx; - + gap: 8rpx; + height: 88rpx; + border-radius: 12rpx; + font-size: 30rpx; + font-weight: 600; + transition: all 0.3s ease; + + &:active { + transform: scale(0.98); + opacity: 0.9; + } + text { - margin-left: 12rpx; + line-height: 1; } } - + .btn-reset { - background-color: #f5f5f5; - color: #909399; - margin-right: 16rpx; + flex: 1; + background: #f5f7fa; + border: 2rpx solid #dcdfe6; + + text { + color: #606266; + } } - + .btn-confirm { - background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); - color: #ffffff; + flex: 1; + background: #667eea; + box-shadow: 0 2rpx 8rpx rgba(102, 126, 234, 0.2); + border: none; + + text { + color: #ffffff; + } } } } diff --git a/src/pages_mine/pages/system/operlog/list.vue b/src/pages_mine/pages/system/operlog/list.vue new file mode 100644 index 0000000..5520b0e --- /dev/null +++ b/src/pages_mine/pages/system/operlog/list.vue @@ -0,0 +1,632 @@ + + + + + diff --git a/src/pages_mine/pages/system/post/list.vue b/src/pages_mine/pages/system/post/list.vue index 5b8e0b5..a6a5260 100644 --- a/src/pages_mine/pages/system/post/list.vue +++ b/src/pages_mine/pages/system/post/list.vue @@ -324,81 +324,120 @@ page { } .filter-panel { + width: 100%; position: absolute; - top: 100rpx; left: 0; - right: 0; - background-color: #ffffff; + top: 96rpx; + background-color: rgba(0, 0, 0, 0.5); z-index: 999; - display: flex; - flex-direction: column; - box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1); .filter-panel-content { - flex: 1; - padding: 32rpx; - overflow-y: auto; + background-color: #ffffff; + padding: 0 30rpx 30rpx; + border-radius: 16rpx 16rpx 0 0; .filter-title { - font-size: 28rpx; - font-weight: bold; - margin: 32rpx 0 24rpx 0; - color: #303133; - - &:first-child { - margin-top: 0; + color: #2c3e50; + font-size: 32rpx; + font-weight: 600; + padding: 32rpx 0 24rpx 20rpx; + position: relative; + display: flex; + align-items: center; + + &::before { + content: ''; + width: 6rpx; + height: 32rpx; + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + border-radius: 3rpx; + margin-right: 12rpx; + flex-shrink: 0; } } .state-list { display: flex; flex-wrap: wrap; + justify-content: flex-start; gap: 16rpx; .state-item { - padding: 16rpx 32rpx; - background-color: #f5f5f5; - border-radius: 32rpx; + padding: 0 32rpx; + height: 68rpx; + border: 2rpx solid #e8edf3; + border-radius: 34rpx; + text-align: center; + line-height: 68rpx; font-size: 28rpx; - color: #606266; - - &.active { - background-color: #667eea; - color: #ffffff; + color: #666666; + transition: all 0.3s ease; + background: #ffffff; + box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04); + + &:active { + transform: scale(0.95); } } + + .active { + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + border: 2rpx solid transparent; + color: #ffffff; + box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.3); + font-weight: 600; + } } } .btn-box { display: flex; - padding: 24rpx 32rpx; - border-top: 1rpx solid #f0f0f0; - + gap: 20rpx; + padding: 24rpx 30rpx; + background-color: #fff; + box-shadow: 0rpx -10rpx 20rpx #EEEEEE; + .btn-reset, .btn-confirm { - flex: 1; display: flex; align-items: center; justify-content: center; - padding: 20rpx 0; - border-radius: 32rpx; - font-size: 28rpx; - + gap: 8rpx; + height: 88rpx; + border-radius: 12rpx; + font-size: 30rpx; + font-weight: 600; + transition: all 0.3s ease; + + &:active { + transform: scale(0.98); + opacity: 0.9; + } + text { - margin-left: 12rpx; + line-height: 1; } } - + .btn-reset { - background-color: #f5f5f5; - color: #909399; - margin-right: 16rpx; + flex: 1; + background: #f5f7fa; + border: 2rpx solid #dcdfe6; + + text { + color: #606266; + } } - + .btn-confirm { - background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); - color: #ffffff; + flex: 1; + background: #667eea; + box-shadow: 0 2rpx 8rpx rgba(102, 126, 234, 0.2); + border: none; + + text { + color: #ffffff; + } } } } diff --git a/src/pages_mine/pages/system/user/list.vue b/src/pages_mine/pages/system/user/list.vue index 8bdfd03..2bc99e6 100644 --- a/src/pages_mine/pages/system/user/list.vue +++ b/src/pages_mine/pages/system/user/list.vue @@ -337,81 +337,120 @@ function dictStr(value, list) { } .filter-panel { + width: 100%; position: absolute; - top: 100rpx; left: 0; - right: 0; - background-color: #ffffff; + top: 96rpx; + background-color: rgba(0, 0, 0, 0.5); z-index: 999; - display: flex; - flex-direction: column; - box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1); .filter-panel-content { - flex: 1; - padding: 32rpx; - overflow-y: auto; + background-color: #ffffff; + padding: 0 30rpx 30rpx; + border-radius: 16rpx 16rpx 0 0; .filter-title { - font-size: 28rpx; - font-weight: bold; - margin: 32rpx 0 24rpx 0; - color: #303133; - - &:first-child { - margin-top: 0; + color: #2c3e50; + font-size: 32rpx; + font-weight: 600; + padding: 32rpx 0 24rpx 20rpx; + position: relative; + display: flex; + align-items: center; + + &::before { + content: ''; + width: 6rpx; + height: 32rpx; + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + border-radius: 3rpx; + margin-right: 12rpx; + flex-shrink: 0; } } .state-list { display: flex; flex-wrap: wrap; + justify-content: flex-start; gap: 16rpx; .state-item { - padding: 16rpx 32rpx; - background-color: #f5f5f5; - border-radius: 32rpx; + padding: 0 32rpx; + height: 68rpx; + border: 2rpx solid #e8edf3; + border-radius: 34rpx; + text-align: center; + line-height: 68rpx; font-size: 28rpx; - color: #606266; - - &.active { - background-color: #667eea; - color: #ffffff; + color: #666666; + transition: all 0.3s ease; + background: #ffffff; + box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04); + + &:active { + transform: scale(0.95); } } + + .active { + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + border: 2rpx solid transparent; + color: #ffffff; + box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.3); + font-weight: 600; + } } } .btn-box { display: flex; - padding: 24rpx 32rpx; - border-top: 1rpx solid #f0f0f0; - + gap: 20rpx; + padding: 24rpx 30rpx; + background-color: #fff; + box-shadow: 0rpx -10rpx 20rpx #EEEEEE; + .btn-reset, .btn-confirm { - flex: 1; display: flex; align-items: center; justify-content: center; - padding: 20rpx 0; - border-radius: 32rpx; - font-size: 28rpx; - + gap: 8rpx; + height: 88rpx; + border-radius: 12rpx; + font-size: 30rpx; + font-weight: 600; + transition: all 0.3s ease; + + &:active { + transform: scale(0.98); + opacity: 0.9; + } + text { - margin-left: 12rpx; + line-height: 1; } } - + .btn-reset { - background-color: #f5f5f5; - color: #909399; - margin-right: 16rpx; + flex: 1; + background: #f5f7fa; + border: 2rpx solid #dcdfe6; + + text { + color: #606266; + } } - + .btn-confirm { - background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); - color: #ffffff; + flex: 1; + background: #667eea; + box-shadow: 0 2rpx 8rpx rgba(102, 126, 234, 0.2); + border: none; + + text { + color: #ffffff; + } } } }