From 0082fa417fb2af9add3406bf05ab3e3e45890c34 Mon Sep 17 00:00:00 2001
From: rain <1679827795@qq.com>
Date: Thu, 12 Jun 2025 14:30:02 +0800
Subject: [PATCH] Merge branch 'master' of http://139.196.74.78:10010/r/drone/drone-web-manage

---
 src/views/monitor/log/api.vue |   94 ++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 77 insertions(+), 17 deletions(-)

diff --git a/src/views/monitor/log/api.vue b/src/views/monitor/log/api.vue
index be4fbb8..5e74765 100644
--- a/src/views/monitor/log/api.vue
+++ b/src/views/monitor/log/api.vue
@@ -37,8 +37,8 @@
         total: 0,
       },
       option: {
-        height: 'auto',
-        calcHeight: 32,
+        // height: 'auto',
+        // calcHeight: 32,
         tip: false,
         searchShow: true,
         searchMenuSpan: 6,
@@ -52,30 +52,45 @@
         dialogType: 'drawer',
         column: [
           {
-            label: '服务id',
+            label: '操作名称',
+            prop: 'title',
+            search: true,
+            searchSpan: 4,
+          },
+          {
+            label: '操作人',
+            prop: 'createBy',
+            search: true,
+            width: 120,
+            searchSpan: 4,
+          },
+          {
+            label: '操作人IP',
+            prop: 'remoteIp',
+            width: 130,
+          },
+          {
+            label: '服务模块',
             prop: 'serviceId',
             width: '120',
-            search: true,
           },
           {
             label: '服务host',
             prop: 'serverHost',
-            search: true,
+            hide: true,
           },
           {
             label: '服务ip',
             prop: 'serverIp',
             width: '160',
+            hide: true,
           },
           {
-            label: '软件环境',
+            label: '服务环境',
             prop: 'env',
             width: '85',
           },
-          {
-            label: '日志名',
-            prop: 'title',
-          },
+
           {
             label: '请求方法',
             prop: 'method',
@@ -84,11 +99,8 @@
           {
             label: '请求接口',
             prop: 'requestUri',
-          },
-          {
-            label: '日志时间',
-            prop: 'createTime',
-            width: '180',
+            search: true,
+            searchSpan: 4,
           },
           {
             label: '用户代理',
@@ -103,6 +115,32 @@
             span: 24,
             minRows: 2,
             hide: true,
+          },
+          {
+            label: '操作时间',
+            prop: 'daterange',
+            type: 'daterange',
+            search:true,
+            searchRange: true,
+            searchSpan:6,
+            format: 'YYYY-MM-DD',
+            valueFormat: 'YYYY-MM-DD',
+            startPlaceholder: '开始时间',
+            endPlaceholder: '结束时间',
+            viewDisplay:false,
+            hide: true,
+            rules: [
+              {
+                required: true,
+                message: '请选择操作时间',
+                trigger: 'blur',
+              },
+            ],
+          },
+          {
+            label: '操作时间',
+            prop: 'createTime',
+            width: '180',
           },
         ],
       },
@@ -147,8 +185,21 @@
       this.onLoad(this.page, this.query);
     },
     onLoad(page, params = {}) {
+      const { daterange } = this.query;
+      let values = {
+        ...params,
+        ...this.query,
+      };
+      if (daterange) {
+        values = {
+          ...values,
+          startTime: daterange[0],
+          endTime: daterange[1],
+        };
+        values.daterange = null;
+      }
       this.loading = true;
-      getApiList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+      getApiList(page.currentPage, page.pageSize, values).then(res => {
         const data = res.data.data;
         this.page.total = data.total;
         this.data = data.records;
@@ -159,4 +210,13 @@
 };
 </script>
 
-<style></style>
+<style scoped lang="scss">
+  :deep(){
+    .avue-crud__body{
+      .el-form{
+        height: 745px;
+        overflow: auto;
+      }
+    }
+  }
+</style>

--
Gitblit v1.9.3