日志添加关键词搜索

This commit is contained in:
浅念
2025-10-24 16:28:37 +08:00
parent 37e75014d0
commit 926823df32
2 changed files with 44 additions and 24 deletions
+2 -1
View File
@@ -147,7 +147,8 @@
const { records, current, size, total } = await logService.getChangelogList({
current: currentPage,
size: pageSize
size: pageSize,
keyword: keyword.value
})
tableData.value = records.map((item: any) => ({
...item
+20 -1
View File
@@ -1,5 +1,13 @@
<template>
<div class="page-content">
<div class="customer-toolbar boxshadow">
<div class="customer-search-group">
<el-form-item label="关键字:" label-width="70px">
<el-input style="min-width: 120px" v-model="keyword" placeholder="请输入关键字" />
</el-form-item>
</div>
</div>
<div class="boxshadow">
<ArtTable
ref="tableRef"
row-key="id"
@@ -23,6 +31,7 @@
</template>
</ArtTable>
</div>
</div>
</template>
<script setup lang="ts">
@@ -31,6 +40,7 @@
import { useAuth } from '@/composables/useAuth'
const { hasAuth } = useAuth()
defineOptions({ name: 'Operationlog' })
const keyword = ref('')
const loading = ref(false)
const pagination = reactive({
currentPage: 1,
@@ -46,6 +56,10 @@
onMounted(() => {
getWorkList()
})
watch([keyword], () => {
pagination.currentPage = 1
getWorkList()
})
// 处理表格分页变化
const handleSizeChange = (newPageSize: number) => {
pagination.pageSize = newPageSize
@@ -63,7 +77,8 @@
const { records, current, size, total } = await logService.getOperationLogList({
current: currentPage,
size: pageSize
size: pageSize,
keyword: keyword.value
})
tableData.value = records.map((item: any) => ({
...item
@@ -94,4 +109,8 @@
fill: currentcolor;
}
}
.customer-search-group {
display: flex;
gap: 12px;
}
</style>