|
@ -1,5 +1,6 @@ |
|
|
<script lang="ts" setup> |
|
|
<script lang="ts" setup> |
|
|
import { sendCmd, syncSendCmd } from 'apis/system' |
|
|
import { sendCmd, syncSendCmd } from 'apis/system' |
|
|
|
|
|
import type { TableColumnCtx } from 'element-plus' |
|
|
import { onMounted, ref } from 'vue' |
|
|
import { onMounted, ref } from 'vue' |
|
|
|
|
|
|
|
|
import { FtMessage } from '@/libs/message' |
|
|
import { FtMessage } from '@/libs/message' |
|
@ -16,7 +17,6 @@ const totle = ref(0) // 总记录数 |
|
|
|
|
|
|
|
|
// 表格数据 |
|
|
// 表格数据 |
|
|
const tableData = ref<Audit.AuditItem[]>([]) // 审计日志表格数据 |
|
|
const tableData = ref<Audit.AuditItem[]>([]) // 审计日志表格数据 |
|
|
const selectedUserList = ref<Audit.AuditItem[]>([]) // 选中的日志记录 |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @hook 生命周期钩子 - 组件挂载完成时执行 |
|
|
* @hook 生命周期钩子 - 组件挂载完成时执行 |
|
@ -51,7 +51,7 @@ const getAuditList = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @function 导出选中的审计记录 |
|
|
|
|
|
|
|
|
* @function 导出全部审计记录 |
|
|
* @desc 导出单条审计记录,需先选择一条记录 |
|
|
* @desc 导出单条审计记录,需先选择一条记录 |
|
|
*/ |
|
|
*/ |
|
|
const onExportRecord = () => { |
|
|
const onExportRecord = () => { |
|
@ -84,13 +84,13 @@ const handleCurrentChange = (page: number) => { |
|
|
getAuditList() |
|
|
getAuditList() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @function 表格选择变更处理 |
|
|
|
|
|
* @param {Audit.AuditItem[]} users - 选中的记录列表 |
|
|
|
|
|
* @desc 更新选中的记录 |
|
|
|
|
|
*/ |
|
|
|
|
|
const handleSelectionChange = (users: Audit.AuditItem[]) => { |
|
|
|
|
|
selectedUserList.value = users |
|
|
|
|
|
|
|
|
const formatIndex = ( |
|
|
|
|
|
_row: unknown, |
|
|
|
|
|
_column: TableColumnCtx<unknown>, |
|
|
|
|
|
_cellValue: unknown, |
|
|
|
|
|
index: number, |
|
|
|
|
|
): number => { |
|
|
|
|
|
return (pageNum.value - 1) * pageSize.value + index + 1 |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
@ -101,8 +101,8 @@ const handleSelectionChange = (users: Audit.AuditItem[]) => { |
|
|
<bt-button type="primary" button-text="全部导出" @click="onExportRecord" /> |
|
|
<bt-button type="primary" button-text="全部导出" @click="onExportRecord" /> |
|
|
</div> |
|
|
</div> |
|
|
<div class="audit-table"> |
|
|
<div class="audit-table"> |
|
|
<el-table :data="tableData" style="width: 100%" height="100%" @selection-change="handleSelectionChange"> |
|
|
|
|
|
<el-table-column type="selection" width="55" /> |
|
|
|
|
|
|
|
|
<el-table :data="tableData" style="width: 100%" height="100%"> |
|
|
|
|
|
<el-table-column label="序号" width="100" :formatter="formatIndex" /> |
|
|
<el-table-column prop="usrName" label="操作人" width="250" /> |
|
|
<el-table-column prop="usrName" label="操作人" width="250" /> |
|
|
<el-table-column prop="behaviorinfo" label="操作内容" /> |
|
|
<el-table-column prop="behaviorinfo" label="操作内容" /> |
|
|
<el-table-column prop="date" label="操作时间" width="250" /> |
|
|
<el-table-column prop="date" label="操作时间" width="250" /> |
|
|