From f2a30ff604b495e3b58eaee54c6cbd8dfe836f5c Mon Sep 17 00:00:00 2001
From: 田源 <tianyuan@vci-tech.com>
Date: 星期四, 02 一月 2025 14:57:44 +0800
Subject: [PATCH] 在线人员信息接口名称调整

---
 Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue |   77 +++++++++++++++++++++++++++++++++++++-
 1 files changed, 74 insertions(+), 3 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue
index 54b19c1..0c0351c 100644
--- a/Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue
@@ -1,13 +1,84 @@
 <template>
-
+  <basic-container>
+    <div style="display: flex;justify-content: space-between;align-items: center">
+      <h3>褰撳墠鍦ㄧ嚎浜哄憳淇℃伅</h3>
+      <el-button type="primary" size="small" plain style="margin-right: 10px" @click="getOnlinUsersHandler">鍒锋柊</el-button>
+    </div>
+    <avue-crud :data="data" :option="option" :table-loading="loading" ></avue-crud>
+  </basic-container>
 </template>
 
 <script>
+import {
+  getOnlinUsers
+} from "@/api/systemModel/systemConfig/api"
+import basicOption from '@/util/basic-option';
+import func from "@/util/func";
 export default {
-  name: "index"
+  name: "index",
+  data() {
+    return {
+      loading:false,
+      data:[],
+      option:{
+        ...basicOption,
+        refreshBtn:false,
+        addBtn:false,
+        menu:false,
+        column:[
+          {
+            label:'鐢ㄦ埛OID',
+            prop:'oid',
+            overHidden:true,
+          },
+          {
+            label:'鐢ㄦ埛璐﹀彿',
+            prop:'userId'
+          },
+          {
+            label:'鐢ㄦ埛濮撳悕',
+            prop:'userName'
+          },
+          {
+            label:'鏈哄櫒ip',
+            prop:'ip'
+          },
+          {
+            label:'鐧诲綍鏃堕棿',
+            prop:'loginTime'
+          },
+          {
+            label:'鏈�鍚庢搷浣滄椂闂�',
+            prop:'lastRequestTs'
+          }
+        ]
+      }
+    }
+  },
+  created() {
+    this.getOnlinUsersHandler();
+  },
+  methods: {
+    // 宸︿晶鏍戞煡璇�
+    getOnlinUsersHandler() {
+      this.loading = true;
+      getOnlinUsers().then(res => {
+        if (res.data.code === 200) {
+          const data = res.data.data;
+          this.data = data.map(item => {
+            return{
+              ...item,
+              loginTime:func.formattedDate(item.loginTime),
+              lastRequestTs:func.formattedDate(item.lastRequestTs),
+            }
+          })
+          this.loading = false;
+        }
+      })
+    }
+  }
 }
 </script>
 
 <style scoped>
-
 </style>

--
Gitblit v1.9.3