feat(log、post、user、project、work-report): 添加用户姓名字段并实现岗位用户导出功能
- 在API访问日志、API错误日志中新增用户姓名字段显示 - 优化日志管理页面布局样式,修复高度自适应问题 - 添加系统岗位数据导出功能及相应API接口 - 添加系统用户数据导出功能及相应API接口 - 新增通用文件下载和导出文件名生成工具函数 - 修复工作报表删除确认提示文案 - 调整项目列表默认展开状态逻辑 - 完善岗位和用户管理页面导出按钮权限控制 - 更新日志实体类型定义,增加用户昵称字段
This commit is contained in:
@@ -80,6 +80,7 @@ const detailSections: LogDetailSection[] = [
|
||||
{
|
||||
title: '业务上下文',
|
||||
fields: [
|
||||
{ label: '用户姓名', key: 'userNickname' },
|
||||
{ label: '用户编号', key: 'userId' },
|
||||
{ label: '操作模块', key: 'operateModule' },
|
||||
{ label: '操作名', key: 'operateName' },
|
||||
@@ -114,6 +115,13 @@ const { columns, columnChecks, data, loading, getData, getDataByPage, mobilePagi
|
||||
columns: () => [
|
||||
{ prop: 'index', type: 'index', label: '序号', width: 64 },
|
||||
{ prop: 'applicationName', label: '应用名', minWidth: 140, showOverflowTooltip: true },
|
||||
{
|
||||
prop: 'userNickname',
|
||||
label: '用户姓名',
|
||||
minWidth: 120,
|
||||
showOverflowTooltip: true,
|
||||
formatter: row => row.userNickname || '--'
|
||||
},
|
||||
{ prop: 'requestMethod', label: '请求方式', width: 100, align: 'center' },
|
||||
{ prop: 'requestUrl', label: '请求地址', minWidth: 220, showOverflowTooltip: true },
|
||||
{ prop: 'operateModule', label: '操作模块', minWidth: 140, showOverflowTooltip: true },
|
||||
@@ -182,7 +190,7 @@ async function handleExport() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex-col-stretch gap-16px overflow-hidden">
|
||||
<div class="h-full min-h-0 flex-col-stretch gap-16px overflow-hidden">
|
||||
<ApiAccessLogSearch v-model:model="searchParams" @reset="resetSearchParams" @search="handleSearch" />
|
||||
|
||||
<ElCard class="flex-1-hidden card-wrapper" body-class="business-table-card-body">
|
||||
|
||||
@@ -71,6 +71,7 @@ const detailSections: LogDetailSection[] = [
|
||||
{
|
||||
title: '上下文',
|
||||
fields: [
|
||||
{ label: '用户姓名', key: 'userNickname' },
|
||||
{ label: '用户编号', key: 'userId' },
|
||||
{ label: '用户IP', key: 'userIp' },
|
||||
{ label: '浏览器UA', key: 'userAgent', type: 'multiline' },
|
||||
@@ -109,6 +110,13 @@ const { columns, columnChecks, data, loading, getData, getDataByPage, mobilePagi
|
||||
columns: () => [
|
||||
{ prop: 'index', type: 'index', label: '序号', width: 64 },
|
||||
{ prop: 'applicationName', label: '应用名', minWidth: 140, showOverflowTooltip: true },
|
||||
{
|
||||
prop: 'userNickname',
|
||||
label: '用户姓名',
|
||||
minWidth: 120,
|
||||
showOverflowTooltip: true,
|
||||
formatter: row => row.userNickname || '--'
|
||||
},
|
||||
{ prop: 'requestMethod', label: '请求方式', width: 100, align: 'center' },
|
||||
{ prop: 'requestUrl', label: '请求地址', minWidth: 220, showOverflowTooltip: true },
|
||||
{ prop: 'exceptionName', label: '异常名', minWidth: 180, showOverflowTooltip: true },
|
||||
@@ -174,7 +182,7 @@ async function handleExport() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex-col-stretch gap-16px overflow-hidden">
|
||||
<div class="h-full min-h-0 flex-col-stretch gap-16px overflow-hidden">
|
||||
<ApiErrorLogSearch v-model:model="searchParams" @reset="resetSearchParams" @search="handleSearch" />
|
||||
|
||||
<ElCard class="flex-1-hidden card-wrapper" body-class="business-table-card-body">
|
||||
|
||||
@@ -67,9 +67,11 @@ watch(
|
||||
</ElCard>
|
||||
|
||||
<div v-if="activeTabMeta" class="log-management-page__content">
|
||||
<KeepAlive>
|
||||
<component :is="componentMap[activeTab]" />
|
||||
</KeepAlive>
|
||||
<div class="log-management-page__pane">
|
||||
<KeepAlive>
|
||||
<component :is="componentMap[activeTab]" class="log-management-page__tab" />
|
||||
</KeepAlive>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -157,8 +159,26 @@ watch(
|
||||
}
|
||||
|
||||
.log-management-page__content {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.log-management-page__pane {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
:deep(.log-management-page__tab) {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
@media (width <= 1200px) {
|
||||
|
||||
@@ -187,7 +187,7 @@ async function handleExport() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex-col-stretch gap-16px overflow-hidden">
|
||||
<div class="h-full min-h-0 flex-col-stretch gap-16px overflow-hidden">
|
||||
<LoginLogSearch v-model:model="searchParams" @reset="resetSearchParams" @search="handleSearch" />
|
||||
|
||||
<ElCard class="flex-1-hidden card-wrapper" body-class="business-table-card-body">
|
||||
|
||||
@@ -183,7 +183,7 @@ async function handleExport() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex-col-stretch gap-16px overflow-hidden">
|
||||
<div class="h-full min-h-0 flex-col-stretch gap-16px overflow-hidden">
|
||||
<OperateLogSearch
|
||||
v-model:model="searchParams"
|
||||
:user-options="userOptions"
|
||||
|
||||
Reference in New Issue
Block a user