Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
nse-ui
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
吴超
nse-ui
Commits
b9ac0c1a
Commit
b9ac0c1a
authored
Aug 23, 2025
by
周海峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日志
parent
df79cc93
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
164 行增加
和
124 行删除
+164
-124
src/api/logSet/desensitizationLog.js
+20
-0
src/api/logSet/encryptedLog.js
+10
-0
src/api/logSet/operationLog.js
+5
-1
src/constants/timeRangeOptions.js
+13
-0
src/views/logSet/desensitizationLog/index.vue
+88
-95
src/views/logSet/encryptedLog/index.vue
+25
-15
src/views/logSet/operationLog/index.vue
+3
-13
没有找到文件。
src/api/logSet/desensitizationLog.js
0 → 100644
View file @
b9ac0c1a
import
request
from
'@/utils/request'
export
function
queryDesensitizationStrategyLog
(
data
)
{
return
request
({
url
:
'/aop/DesensitizationStrategyLog/queryDesensitizationStrategyLog'
,
method
:
'post'
,
data
:
data
})
}
export
function
getDesensitizationLogExcel
(
data
)
{
return
request
({
url
:
'/aop/DesensitizationStrategyLog/getdesensitizationStrategyLog'
,
method
:
'post'
,
data
:
data
,
responseType
:
'blob'
//
})
}
src/api/logSet/encryptedLog.js
View file @
b9ac0c1a
...
...
@@ -16,3 +16,12 @@ export function allProject(data) {
data
:
data
})
}
export
function
getEncryptionLogExcel
(
data
)
{
return
request
({
url
:
'/aop/encryptlog/getEncryptionLogExcel'
,
method
:
'post'
,
data
:
data
,
responseType
:
'blob'
//
})
}
\ No newline at end of file
src/api/logSet/operationLog.js
View file @
b9ac0c1a
...
...
@@ -27,10 +27,13 @@ export function queryMenuTreeAndUserlist(data) {
data
:
data
})
}
export
function
getOpeExcel
(
data
)
{
return
request
({
url
:
'/aop/getOpeExcel'
,
method
:
'post'
,
data
:
data
data
:
data
,
responseType
:
'blob'
//
})
}
\ No newline at end of file
src/constants/timeRangeOptions.js
0 → 100644
View file @
b9ac0c1a
// timeRangeOptions.js
const
timeRangeOptions
=
[
{
value
:
'0'
,
label
:
'今天'
},
{
value
:
'3'
,
label
:
'近三天'
},
{
value
:
'7'
,
label
:
'近一周'
},
{
value
:
'30'
,
label
:
'近一个月'
},
{
value
:
'90'
,
label
:
'近三个月'
},
{
value
:
'180'
,
label
:
'近半年'
},
{
value
:
'全部'
,
label
:
'全部'
}
]
export
default
timeRangeOptions
;
src/views/logSet/desensitizationLog/index.vue
View file @
b9ac0c1a
...
...
@@ -16,7 +16,7 @@
<el-option
v-for=
"item in userOptions"
:key=
"item.id"
:label=
"item.
realname
"
:label=
"item.
user
"
:value=
"item.id"
/>
</el-select>
...
...
@@ -26,7 +26,6 @@
v-model=
"queryParams.range"
placeholder=
"请选择时间"
style=
"width: 200px"
@
change=
"handleTimeRangeChange"
>
<el-option
v-for=
"item in timeRangeOptions"
...
...
@@ -54,7 +53,7 @@
<el-form-item>
<el-button
type=
"primary"
icon=
"Search"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
type=
"primary"
icon=
"Download"
@
click=
"handleExport"
>
导出
</el-button>
<
el-button
type=
"primary"
@
click=
"handleCheck"
>
数据完整性校验
</el-button
>
<
!--
<el-button
type=
"primary"
@
click=
"handleCheck"
>
数据完整性校验
</el-button>
--
>
</el-form-item>
</el-form>
</div>
...
...
@@ -65,18 +64,18 @@
border
style=
"width: 100%"
>
<el-table-column
prop=
"
user"
label=
"用户
"
align=
"left"
/>
<el-table-column
prop=
"time"
label=
"时间"
align=
"left"
width=
"180"
/>
<el-table-column
prop=
"
moduleId
"
label=
"模块编号"
align=
"left"
width=
"120"
/>
<el-table-column
prop=
"
moduleNam
e"
label=
"操作模块"
align=
"left"
width=
"150"
/>
<el-table-column
prop=
"operation"
label=
"操作信息"
align=
"left"
show-overflow-tooltip
/>
<el-table-column
prop=
"
createuser"
label=
"用户"
width=
"200
"
align=
"left"
/>
<el-table-column
prop=
"
create
time"
label=
"时间"
align=
"left"
width=
"180"
/>
<el-table-column
prop=
"
code
"
label=
"模块编号"
align=
"left"
width=
"120"
/>
<el-table-column
prop=
"
operModul
e"
label=
"操作模块"
align=
"left"
width=
"150"
/>
<el-table-column
prop=
"operation
Massage
"
label=
"操作信息"
align=
"left"
show-overflow-tooltip
/>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
v-model:page=
"queryParams.page
Num
"
v-model:limit=
"queryParams.
pageSize
"
v-model:page=
"queryParams.page"
v-model:limit=
"queryParams.
rows
"
@
pagination=
"getList"
/>
</div>
...
...
@@ -84,127 +83,121 @@
<
script
setup
>
import
{
ref
,
reactive
,
computed
,
onMounted
}
from
'vue'
import
{
ElMessageBox
,
ElMessage
}
from
'element-plus'
import
{
Coin
}
from
'@element-plus/icons-vue'
import
{
queryMenuTreeAndUserlist
}
from
'@/api/logSet/operationLog.js'
import
{
queryDesensitizationStrategyLog
,
getDesensitizationLogExcel
}
from
'@/api/logSet/desensitizationLog.js'
import
{
allProject
}
from
'@/api/logSet/encryptedLog.js'
import
useAppStore
from
'@/store/modules/app'
import
timeRangeOptions
from
'@/constants/timeRangeOptions.js'
const
appStore
=
useAppStore
()
console
.
log
(
'当前用户信息'
,
appStore
.
userInfo
)
const
loading
=
ref
(
true
)
const
total
=
ref
(
0
)
const
logList
=
ref
([])
const
queryParams
=
reactive
({
page
Num
:
1
,
pageSize
:
10
,
page
:
1
,
rows
:
10
,
user
:
undefined
,
range
:
'0'
,
startTime
:
''
,
endTime
:
''
,
module
:
undefined
,
projectId
:
undefined
})
const
userOptions
=
ref
([
{
id
:
'admin'
,
realname
:
'admin'
},
{
id
:
'system'
,
realname
:
'system'
},
{
id
:
'test'
,
realname
:
'test'
}
])
const
timeRangeOptions
=
ref
([
{
value
:
'0'
,
label
:
'今天'
},
{
value
:
'3'
,
label
:
'近三天'
},
{
value
:
'7'
,
label
:
'近一周'
},
{
value
:
'30'
,
label
:
'近一个月'
},
{
value
:
'90'
,
label
:
'近三个月'
},
{
value
:
'180'
,
label
:
'近半年'
},
{
value
:
'全部'
,
label
:
'全部'
}
// { id: 'admin', realname: 'admin' },
// { id: 'system', realname: 'system' },
// { id: 'test', realname: 'test' }
])
const
projectLevelOptions
=
ref
([
{
id
:
'1'
,
project
:
'一级'
},
{
id
:
'2'
,
project
:
'二级'
},
{
id
:
'3'
,
project
:
'三级'
}
//
{ id: '1', project: '一级' },
//
{ id: '2', project: '二级' },
//
{ id: '3', project: '三级' }
])
const
pageCount
=
computed
(()
=>
{
const
t
=
Number
(
total
.
value
)
||
0
const
ps
=
Number
(
queryParams
.
pageSize
)
||
1
return
Math
.
ceil
(
t
/
ps
)
})
const
getList
=
()
=>
{
const
getList
=
async
()
=>
{
loading
.
value
=
true
setTimeout
(()
=>
{
logList
.
value
=
[
{
user
:
'admin'
,
time
:
'2025-08-19 19:36:25'
,
moduleId
:
'DDM_00000'
,
moduleName
:
'系统模块'
,
operation
:
'用户登录'
},
{
user
:
'admin'
,
time
:
'2025-08-19 19:01:36'
,
moduleId
:
'DDM_00001'
,
moduleName
:
'用户管理-用户'
,
operation
:
'用户[admin]登录到系统平台。'
}
]
total
.
value
=
53
try
{
const
response
=
await
queryDesensitizationStrategyLog
(
queryParams
)
logList
.
value
=
response
.
data
.
list
||
[]
total
.
value
=
response
.
data
.
total
||
0
}
catch
(
error
)
{
console
.
error
(
'Failed to fetch desensitization log list:'
,
error
)
}
finally
{
loading
.
value
=
false
}
,
200
)
}
}
const
handleQuery
=
()
=>
{
queryParams
.
page
Num
=
1
queryParams
.
page
=
1
getList
()
}
const
handleExport
=
()
=>
{
window
.
$modal
.
confirm
(
'是否确认导出所有操作日志数据?'
).
then
(()
=>
{
// 实际导出逻辑
window
.
$modal
.
msgSuccess
(
'导出成功'
)
}).
catch
(()
=>
{})
const
handleExport
=
async
()
=>
{
ElMessageBox
.
confirm
(
'是否确认导出日志数据?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(
async
()
=>
{
try
{
const
response
=
await
getDesensitizationLogExcel
(
queryParams
)
const
blob
=
new
Blob
([
response
],
{
type
:
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
});
const
link
=
document
.
createElement
(
'a'
)
link
.
href
=
URL
.
createObjectURL
(
blob
)
link
.
download
=
'脱敏日志.xls'
link
.
click
()
URL
.
revokeObjectURL
(
link
.
href
)
ElMessage
.
success
(
'导出成功'
)
}
catch
(
error
)
{
console
.
error
(
'Failed to export operation logs:'
,
error
)
ElMessage
.
error
(
'导出出错'
)
}
})
.
catch
(()
=>
{
ElMessage
.
info
(
'导出已取消'
)
})
}
const
handleCheck
=
()
=>
{
window
.
$modal
.
msgSuccess
(
'数据完整性校验完成'
)
}
const
handleTimeRangeChange
=
(
value
)
=>
{
const
now
=
new
Date
()
let
startTime
=
new
Date
()
switch
(
value
)
{
case
'last3days'
:
startTime
.
setDate
(
now
.
getDate
()
-
3
)
break
case
'lastWeek'
:
startTime
.
setDate
(
now
.
getDate
()
-
7
)
break
case
'lastMonth'
:
startTime
.
setMonth
(
now
.
getMonth
()
-
1
)
break
case
'last3Months'
:
startTime
.
setMonth
(
now
.
getMonth
()
-
3
)
break
case
'lastHalfYear'
:
startTime
.
setMonth
(
now
.
getMonth
()
-
6
)
break
case
'all'
:
startTime
=
null
break
onMounted
(
async
()
=>
{
try
{
const
response
=
await
queryMenuTreeAndUserlist
({
type
:
'global'
})
console
.
log
(
'queryMenuTreeAndUserlist'
,
response
)
userOptions
.
value
=
response
.
data
.
userlist
.
map
(
user
=>
({
id
:
user
.
id
,
user
:
user
.
realname
}))
}
catch
(
error
)
{
console
.
error
(
'Failed to fetch user and module data:'
,
error
)
}
if
(
startTime
)
{
queryParams
.
startTime
=
startTime
.
toISOString
().
split
(
'T'
)[
0
]
+
' 00:00:00'
queryParams
.
endTime
=
now
.
toISOString
().
split
(
'T'
)[
0
]
+
' 23:59:59'
}
else
{
queryParams
.
startTime
=
''
queryParams
.
endTime
=
''
try
{
const
params
=
{
loginUser
:
{
tsysUser
:
{
id
:
appStore
.
userInfo
.
user
.
id
,
username
:
appStore
.
userInfo
.
user
.
username
}
},
proName
:
''
,
note
:
''
}
const
projectResponse
=
await
allProject
(
params
)
projectLevelOptions
.
value
=
projectResponse
.
data
.
map
(
project
=>
({
id
:
project
.
id
,
project
:
project
.
project
}))
}
catch
(
error
)
{
console
.
error
(
'Failed to fetch project level data:'
,
error
)
}
handleQuery
()
}
onMounted
(()
=>
{
getList
()
})
</
script
>
...
...
src/views/logSet/encryptedLog/index.vue
View file @
b9ac0c1a
...
...
@@ -85,9 +85,10 @@
import
{
ref
,
reactive
,
computed
,
onMounted
}
from
'vue'
import
{
Lock
}
from
'@element-plus/icons-vue'
import
{
queryMenuTreeAndUserlist
}
from
'@/api/logSet/operationLog.js'
import
{
query
,
allProject
}
from
'@/api/logSet/encryptedLog.js'
import
{
query
,
allProject
,
getEncryptionLogExcel
}
from
'@/api/logSet/encryptedLog.js'
import
{
ElMessageBox
,
ElMessage
}
from
'element-plus'
import
useAppStore
from
'@/store/modules/app'
import
timeRangeOptions
from
'@/constants/timeRangeOptions.js'
const
appStore
=
useAppStore
()
console
.
log
(
'当前用户信息'
,
appStore
.
userInfo
)
const
loading
=
ref
(
true
)
...
...
@@ -108,16 +109,6 @@ const userOptions = ref([
// { id: 'test', user: 'test' }
])
const
timeRangeOptions
=
ref
([
{
value
:
'0'
,
label
:
'今天'
},
{
value
:
'3'
,
label
:
'近三天'
},
{
value
:
'7'
,
label
:
'近一周'
},
{
value
:
'30'
,
label
:
'近一个月'
},
{
value
:
'90'
,
label
:
'近三个月'
},
{
value
:
'180'
,
label
:
'近半年'
},
{
value
:
'全部'
,
label
:
'全部'
}
])
const
projectLevelOptions
=
ref
([
// { id: '1', project: '一级' },
// { id: '2', project: '二级' },
...
...
@@ -144,10 +135,29 @@ const handleQuery = () => {
}
const
handleExport
=
()
=>
{
window
.
$modal
.
confirm
(
'是否确认导出所有操作日志数据?'
).
then
(()
=>
{
// 实际导出逻辑
window
.
$modal
.
msgSuccess
(
'导出成功'
)
}).
catch
(()
=>
{})
ElMessageBox
.
confirm
(
'是否确认导出所有加密日志数据?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(
async
()
=>
{
try
{
const
response
=
await
getEncryptionLogExcel
(
queryParams
)
const
blob
=
new
Blob
([
response
],
{
type
:
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
});
const
link
=
document
.
createElement
(
'a'
)
link
.
href
=
URL
.
createObjectURL
(
blob
)
link
.
download
=
'加密日志.xls'
link
.
click
()
URL
.
revokeObjectURL
(
link
.
href
)
ElMessage
.
success
(
'导出成功'
)
}
catch
(
error
)
{
console
.
error
(
'Failed to export operation logs:'
,
error
)
ElMessage
.
error
(
'导出出错'
)
}
})
.
catch
(()
=>
{
ElMessage
.
info
(
'导出已取消'
)
})
}
const
handleCheck
=
()
=>
{
...
...
src/views/logSet/operationLog/index.vue
View file @
b9ac0c1a
...
...
@@ -87,7 +87,7 @@ import { ref, reactive, computed, onMounted } from 'vue'
import
{
Document
}
from
'@element-plus/icons-vue'
import
{
query
,
checkEnc
,
queryMenuTreeAndUserlist
,
getOpeExcel
}
from
'@/api/logSet/operationLog.js'
import
{
ElMessageBox
,
ElMessage
}
from
'element-plus'
import
timeRangeOptions
from
'@/constants/timeRangeOptions.js'
const
loading
=
ref
(
true
)
const
total
=
ref
(
0
)
const
logList
=
ref
([])
...
...
@@ -105,15 +105,6 @@ const userOptions = ref([
// { id: 'test', realname: 'test' }
])
const
timeRangeOptions
=
ref
([
{
value
:
'0'
,
label
:
'今天'
},
{
value
:
'3'
,
label
:
'近三天'
},
{
value
:
'7'
,
label
:
'近一周'
},
{
value
:
'30'
,
label
:
'近一个月'
},
{
value
:
'90'
,
label
:
'近三个月'
},
{
value
:
'180'
,
label
:
'近半年'
},
{
value
:
'全部'
,
label
:
'全部'
}
])
const
moduleTreeOptions
=
ref
([])
...
...
@@ -144,11 +135,10 @@ const handleExport = async () => {
.
then
(
async
()
=>
{
try
{
const
response
=
await
getOpeExcel
(
queryParams
)
//const blob = new Blob([response], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' })
const
blob
=
new
Blob
([
response
],
{
type
:
'application/vnd.ms-excel'
})
const
blob
=
new
Blob
([
response
],
{
type
:
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
});
const
link
=
document
.
createElement
(
'a'
)
link
.
href
=
URL
.
createObjectURL
(
blob
)
link
.
download
=
'操作日志.xls
x
'
link
.
download
=
'操作日志.xls'
link
.
click
()
URL
.
revokeObjectURL
(
link
.
href
)
ElMessage
.
success
(
'导出成功'
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论