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
14c7602a
Commit
14c7602a
authored
Sep 26, 2025
by
ningjihai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加密日志
parent
42a4e27d
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
364 行增加
和
287 行删除
+364
-287
src/views/logSet/encryptedLog/QueryForm.vue
+95
-13
src/views/logSet/encryptedLog/index.vue
+13
-242
src/views/logSet/encryptedLog/list.vue
+225
-0
src/views/logSet/operationLog/list.vue
+31
-32
没有找到文件。
src/views/logSet/encryptedLog/QueryForm.vue
View file @
14c7602a
...
...
@@ -6,11 +6,12 @@ import {
Plus
}
from
'@element-plus/icons-vue'
import
{
color
}
from
'echarts'
// import { useDict } from '@/utils/dict'
// import { listDept } from '@/api/system/dept'// 部门
import
{
queryMenuTreeAndUserlist
}
from
'@/api/logSet/operationLog.js'
import
{
query
,
allProject
,
getEncryptionLogExcel
}
from
'@/api/logSet/encryptedLog.js'
import
useAppStore
from
'@/store/modules/app'
import
timeRangeOptions
from
'@/constants/timeRangeOptions.js'
const
appStore
=
useAppStore
()
// const { approve_status, invoice_status} = useDict('approve_status', 'invoice_status')
const
emit
=
defineEmits
([
'update:modelValue'
,
'query'
,
'reset'
,
'handleAdd'
])
const
invoice_status_filter
=
ref
([])
...
...
@@ -47,7 +48,53 @@ function onReset(formRef: FormInstance) {
function
handleAdd
()
{
emit
(
'handleAdd'
)
}
const
userOptions
:
any
=
ref
([
// { id: 'admin', user: 'admin' },
// { id: 'system', user: 'system' },
// { id: 'test', user: 'test' }
])
const
projectLevelOptions
:
any
=
ref
([
// { id: '1', project: '一级' },
// { id: '2', project: '二级' },
// { id: '3', project: '三级' }
])
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
)
}
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
)
}
})
</
script
>
<
template
>
...
...
@@ -66,15 +113,50 @@ function handleAdd() {
]"
@search="onSearch"
@reset="onReset">
<el-form-item
label=
"唯一标识:"
>
<el-input
v-model=
"queryForm.useridentifier"
clearable
placeholder=
"请输入唯一标识"
></el-input>
</el-form-item>
<el-form-item
label=
"用户名:"
>
<el-input
v-model=
"queryForm.username"
clearable
placeholder=
"请输入用户名"
></el-input>
</el-form-item>
<el-form-item
label=
"备注:"
>
<el-input
v-model=
"queryForm.note"
clearable
placeholder=
"请输入备注"
></el-input>
</el-form-item>
<el-form-item
label=
"用户"
prop=
"user"
>
<el-select
v-model=
"queryForm.user"
placeholder=
"请选择"
clearable
style=
"width: 200px"
>
<el-option
v-for=
"item in userOptions"
:key=
"item.id"
:label=
"item.user"
:value=
"item.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"时间"
prop=
"range"
>
<el-select
v-model=
"queryForm.range"
placeholder=
"请选择时间"
style=
"width: 200px"
>
<el-option
v-for=
"item in timeRangeOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"项目级"
prop=
"projectId"
>
<el-select
v-model=
"queryForm.projectId"
placeholder=
"请选择项目级"
clearable
style=
"width: 200px"
>
<el-option
v-for=
"item in projectLevelOptions"
:key=
"item.id"
:label=
"item.project"
:value=
"item.id"
/>
</el-select>
</el-form-item>
</page-wrapper-search>
...
...
src/views/logSet/encryptedLog/index.vue
View file @
14c7602a
<
template
>
<div
class=
"app-container"
>
<div
class=
"page-title"
>
<el-icon
class=
"title-icon"
><Lock
/></el-icon>
<span>
加密日志
</span>
</div>
<div
class=
"search-box"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
>
<el-form-item
label=
"用户"
prop=
"user"
>
<el-select
v-model=
"queryParams.user"
placeholder=
"请选择"
clearable
style=
"width: 200px"
>
<el-option
v-for=
"item in userOptions"
:key=
"item.id"
:label=
"item.user"
:value=
"item.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"时间"
prop=
"range"
>
<el-select
v-model=
"queryParams.range"
placeholder=
"请选择时间"
style=
"width: 200px"
>
<el-option
v-for=
"item in timeRangeOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"项目级"
prop=
"projectId"
>
<el-select
v-model=
"queryParams.projectId"
placeholder=
"请选择项目级"
clearable
style=
"width: 200px"
>
<el-option
v-for=
"item in projectLevelOptions"
:key=
"item.id"
:label=
"item.project"
:value=
"item.id"
/>
</el-select>
</el-form-item>
<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-form-item>
</el-form>
</div>
<el-table
v-loading=
"loading"
:data=
"logList"
border
style=
"width: 100%"
>
<el-table-column
prop=
"operptionUser"
label=
"用户"
width=
"200"
align=
"left"
/>
<el-table-column
prop=
"createtime"
label=
"时间"
align=
"left"
width=
"180"
/>
<el-table-column
prop=
"code"
label=
"模块编号"
align=
"left"
width=
"120"
/>
<el-table-column
prop=
"operModule"
label=
"操作模块"
align=
"left"
width=
"150"
/>
<el-table-column
prop=
"operptionMassage"
label=
"操作信息"
align=
"left"
show-overflow-tooltip
/>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
v-model:page=
"queryParams.page"
v-model:limit=
"queryParams.rows"
@
pagination=
"getList"
/>
</div>
</
template
>
<
script
setup
>
import
{
ref
,
reactive
,
computed
,
onMounted
}
from
'vue'
import
{
Lock
}
from
'@element-plus/icons-vue'
import
{
queryMenuTreeAndUserlist
}
from
'@/api/logSet/operationLog.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
)
const
total
=
ref
(
0
)
const
logList
=
ref
([])
const
queryParams
=
reactive
({
page
:
1
,
rows
:
10
,
user
:
undefined
,
range
:
'0'
,
module
:
undefined
,
projectId
:
undefined
})
const
userOptions
=
ref
([
// { id: 'admin', user: 'admin' },
// { id: 'system', user: 'system' },
// { id: 'test', user: 'test' }
])
<
script
setup
lang=
"ts"
name=
"projectManageIndex"
>
import
{
ref
}
from
'vue'
import
list
from
'./list.vue'
const
projectLevelOptions
=
ref
([
// { id: '1', project: '一级' },
// { id: '2', project: '二级' },
// { id: '3', project: '三级' }
])
const
getList
=
async
()
=>
{
loading
.
value
=
true
try
{
const
response
=
await
query
(
queryParams
)
logList
.
value
=
response
.
data
.
list
||
[]
total
.
value
=
response
.
data
.
total
||
0
}
catch
(
error
)
{
console
.
error
(
'Failed to fetch log list:'
,
error
)
}
finally
{
loading
.
value
=
false
}
}
const
handleQuery
=
()
=>
{
queryParams
.
page
=
1
getList
()
const
widget
=
{
list
:
list
}
const
handleExport
=
()
=>
{
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
page
=
ref
(
'list'
)
const
params
=
ref
({})
const
handleCheck
=
()
=>
{
window
.
$modal
.
msgSuccess
(
'数据完整性校验完成'
)
function
onChangePage
(
val
:
string
,
param
?:
any
)
{
page
.
value
=
val
params
.
value
=
param
??
{}
}
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
)
}
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
)
}
getList
()
})
</
script
>
<
style
lang=
"scss"
scoped
>
.app-container
{
padding
:
20px
;
.page-title
{
display
:
flex
;
align-items
:
center
;
margin-bottom
:
20px
;
font-size
:
16px
;
font-weight
:
bold
;
.title-icon
{
margin-right
:
8px
;
font-size
:
20px
;
color
:
#409EFF
;
}
}
.search-box
{
margin-bottom
:
20px
;
background-color
:
#fff
;
padding
:
20px
;
border-radius
:
4px
;
text-align
:
left
;
:deep(.el-form)
{
justify-content
:
flex-start
;
}
:deep
(
.el-form--inline
.el-form-item
)
{
margin-right
:
20px
;
}
}
.el-table
{
margin-top
:
20px
;
}
:deep
(
.el-table
)
{
text-align
:
left
;
}
:deep
(
.el-cascader
)
{
width
:
100%
;
}
}
</
style
>
<
template
>
<component
:is=
"widget[page]"
v-bind=
"params"
@
page=
"onChangePage"
/>
</
template
>
src/views/logSet/encryptedLog/list.vue
0 → 100644
View file @
14c7602a
<
template
>
<div
class=
"app-container scroller"
>
<PageTitle>
<template
#
title
>
<div
style=
"display: flex;align-items: center;"
>
<el-icon
class=
"title-icon"
><Lock
/></el-icon>
<span
style=
"margin-left: 8px;"
>
加密日志
</span>
</div>
</
template
>
</PageTitle>
<div
class=
"app-container__body"
>
<query-form
ref=
"QueryFormRef"
v-model=
"queryParams"
@
query=
"handleQuery"
@
reset=
"onReset"
@
handleAdd=
"handleExport"
/>
<div
style=
"flex: 1;"
>
<el-table
v-loading=
"loading"
:data=
"logList"
stripe
height=
"100%"
style=
"width: 100%"
>
<el-table-column
prop=
"operptionUser"
label=
"用户"
width=
"200"
align=
"left"
/>
<el-table-column
prop=
"createtime"
label=
"时间"
align=
"left"
width=
"180"
/>
<el-table-column
prop=
"code"
label=
"模块编号"
align=
"left"
width=
"120"
/>
<el-table-column
prop=
"operModule"
label=
"操作模块"
align=
"left"
width=
"150"
/>
<el-table-column
prop=
"operptionMassage"
label=
"操作信息"
align=
"left"
show-overflow-tooltip
/>
</el-table>
</div>
<pagination
v-show=
"total > 0"
:total=
"total"
v-model:page=
"queryParams.page"
v-model:limit=
"queryParams.rows"
@
pagination=
"getList"
/>
</div>
</div>
</template>
<
script
setup
>
import
{
ref
,
reactive
,
computed
,
onMounted
}
from
'vue'
import
{
Lock
}
from
'@element-plus/icons-vue'
import
{
queryMenuTreeAndUserlist
}
from
'@/api/logSet/operationLog.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'
import
QueryForm
from
'./QueryForm.vue'
const
appStore
=
useAppStore
()
console
.
log
(
'当前用户信息'
,
appStore
.
userInfo
)
const
loading
=
ref
(
true
)
const
logList
=
ref
([])
const
userOptions
=
ref
([
// { id: 'admin', user: 'admin' },
// { id: 'system', user: 'system' },
// { id: 'test', user: 'test' }
])
const
projectLevelOptions
=
ref
([
// { id: '1', project: '一级' },
// { id: '2', project: '二级' },
// { id: '3', project: '三级' }
])
const
data
=
reactive
({
queryParams
:
{
page
:
1
,
rows
:
10
,
user
:
undefined
,
range
:
'0'
,
module
:
undefined
,
projectId
:
undefined
}
})
const
total
=
ref
(
0
)
// 表格数据
const
{
queryParams
}
=
toRefs
(
data
)
const
getList
=
async
()
=>
{
loading
.
value
=
true
try
{
const
response
=
await
query
(
queryParams
.
value
)
logList
.
value
=
response
.
data
.
list
||
[]
total
.
value
=
response
.
data
.
total
||
0
}
catch
(
error
)
{
console
.
error
(
'Failed to fetch log list:'
,
error
)
}
finally
{
loading
.
value
=
false
}
}
const
handleQuery
=
()
=>
{
queryParams
.
value
.
page
=
1
getList
()
}
const
handleExport
=
()
=>
{
ElMessageBox
.
confirm
(
'是否确认导出所有加密日志数据?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(
async
()
=>
{
try
{
const
response
=
await
getEncryptionLogExcel
(
queryParams
.
value
)
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
(
'数据完整性校验完成'
)
}
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
)
}
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
)
}
getList
()
})
</
script
>
<
style
lang=
"scss"
scoped
>
//
.app-container
{
//
padding
:
20px
;
//
.page-title
{
//
display
:
flex
;
//
align-items
:
center
;
//
margin-bottom
:
20px
;
//
font-size
:
16px
;
//
font-weight
:
bold
;
//
.title-icon
{
//
margin-right
:
8px
;
//
font-size
:
20px
;
//
color
:
#409EFF
;
//
}
//
}
//
.search-box
{
//
margin-bottom
:
20px
;
//
background-color
:
#fff
;
//
padding
:
20px
;
//
border-radius
:
4px
;
//
text-align
:
left
;
//
:deep(.el-form)
{
//
justify-content
:
flex-start
;
//
}
//
:deep
(
.el-form--inline
.el-form-item
)
{
//
margin-right
:
20px
;
//
}
//
}
//
.el-table
{
//
margin-top
:
20px
;
//
}
//
:deep
(
.el-table
)
{
//
text-align
:
left
;
//
}
//
:deep
(
.el-cascader
)
{
//
width
:
100%
;
//
}
//
}
</
style
>
src/views/logSet/operationLog/list.vue
View file @
14c7602a
...
...
@@ -12,41 +12,40 @@
</PageTitle>
<div
class=
"app-container__body"
>
<query-form
ref=
"QueryFormRef"
v-model=
"queryParams"
@
query=
"handleQuery"
@
reset=
"onReset"
@
handleAdd=
"handleExport"
/>
<div
style=
"flex: 1;"
>
<el-table
v-loading=
"loading"
:data=
"logList"
stripe
height=
"100%"
style=
"width: 100%"
>
<el-table-column
prop=
"user"
label=
"用户"
width=
"200"
align=
"left"
/>
<el-table-column
prop=
"operationtime"
label=
"时间"
align=
"left"
width=
"180"
/>
<el-table-column
prop=
"operationObject"
label=
"模块编号"
align=
"left"
width=
"120"
/>
<el-table-column
prop=
"module"
label=
"操作模块"
align=
"left"
width=
"150"
/>
<el-table-column
prop=
"logmessage"
label=
"操作信息"
align=
"left"
show-overflow-tooltip
/>
</el-table>
<query-form
ref=
"QueryFormRef"
v-model=
"queryParams"
@
query=
"handleQuery"
@
reset=
"onReset"
@
handleAdd=
"handleExport"
/>
<div
style=
"flex: 1;"
>
<el-table
v-loading=
"loading"
:data=
"logList"
stripe
height=
"100%"
style=
"width: 100%"
>
<el-table-column
prop=
"user"
label=
"用户"
width=
"200"
align=
"left"
/>
<el-table-column
prop=
"operationtime"
label=
"时间"
align=
"left"
width=
"180"
/>
<el-table-column
prop=
"operationObject"
label=
"模块编号"
align=
"left"
width=
"120"
/>
<el-table-column
prop=
"module"
label=
"操作模块"
align=
"left"
width=
"150"
/>
<el-table-column
prop=
"logmessage"
label=
"操作信息"
align=
"left"
show-overflow-tooltip
/>
</el-table>
</div>
<pagination
v-show=
"total > 0"
:total=
"total"
v-model:page=
"queryParams.page"
v-model:limit=
"queryParams.rows"
@
pagination=
"getList"
/>
</div>
</div>
<pagination
v-show=
"total > 0"
:total=
"total"
v-model:page=
"queryParams.page"
v-model:limit=
"queryParams.rows"
@
pagination=
"getList"
/>
</div>
</div>
</template>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论