From 7c6ad1674921b5b370bfd439790d0f068b515236 Mon Sep 17 00:00:00 2001
From: 董国庆 <364620639@qq.com>
Date: 星期五, 30 五月 2025 15:44:35 +0800
Subject: [PATCH] 管理后台日历和操作日志

---
 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