From b1cb0925184e4426b93306cb4c290586126383c7 Mon Sep 17 00:00:00 2001
From: 13404089107 <puwei@sinata.cn>
Date: 星期一, 02 六月 2025 17:44:10 +0800
Subject: [PATCH] Merge branch 'main' of http://120.76.84.145:10101/gitblit/r/H5/leshan-laboratory
---
laboratory/src/views/system/operation-log/index.vue | 42 +++++++++++++++++++++++++-----------------
1 files changed, 25 insertions(+), 17 deletions(-)
diff --git a/laboratory/src/views/system/operation-log/index.vue b/laboratory/src/views/system/operation-log/index.vue
index 2204c39..45e5747 100644
--- a/laboratory/src/views/system/operation-log/index.vue
+++ b/laboratory/src/views/system/operation-log/index.vue
@@ -1,7 +1,7 @@
<template>
<div class="operationLog">
- <TableCustom :queryForm="queryForm" :tableData="list" :total="total"
- @currentChange="handleCurrentChange" @sizeChange="handleSizeChange">
+ <TableCustom :tableData="list" :total="total" :heigth="null"
+ @handleCurrentChange="handleCurrentChange" @handleSizeChange="handleSizeChange">
<template #table>
<el-table-column label="序号" type="index" show-overflow-tooltip />
<el-table-column label="操作时间" prop="operTime" show-overflow-tooltip />
@@ -13,26 +13,22 @@
</template>
<script>
-// import { getOperlogList } from '@/api/systemSettings'
+import { getList } from './service'
export default {
name: 'operationLog',
data() {
return {
list: [],
total: 0,
+ listLoading: false,
queryForm: {
pageNum: 1,
- pageSize: 10,
- },
+ pageSize: 10
+ }
}
},
- computed: {
- height() {
- return this.$baseTableHeight()
- },
- },
created() {
- // this.fetchData()
+ this.fetchData()
},
methods: {
handleSizeChange(val) {
@@ -44,12 +40,24 @@
this.fetchData()
},
async fetchData() {
- this.listLoading = true
- const { data } = await getOperlogList(this.queryForm)
- this.list = data.data.records
- this.total = data.data.total
- },
- },
+ try {
+ this.listLoading = true
+ getList(this.queryForm).then(res => {
+ if (res) {
+ this.list = res.records
+ this.total = res.total
+ } else {
+ this.$message.error('获取数据失败')
+ }
+ })
+ } catch (error) {
+ console.error('获取操作日志列表失败:', error)
+ this.$message.error('获取操作日志列表失败')
+ } finally {
+ this.listLoading = false
+ }
+ }
+ }
}
</script>
<style scoped lang="less">
--
Gitblit v1.7.1