From 8c6cf5bc434f1f236b9a12c45c05636a3903f8c7 Mon Sep 17 00:00:00 2001
From: AprilWind <2100166581@qq.com>
Date: 星期五, 19 四月 2024 13:02:14 +0800
Subject: [PATCH] !104 add 新增在线登录设备管理 * update 在线登录设备管理删除权限 * add 新增在线登录设备管理

---
 src/views/system/user/profile/index.vue |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/src/views/system/user/profile/index.vue b/src/views/system/user/profile/index.vue
index 0c8b527..426fca8 100644
--- a/src/views/system/user/profile/index.vue
+++ b/src/views/system/user/profile/index.vue
@@ -58,6 +58,9 @@
             <el-tab-pane label="绗笁鏂瑰簲鐢�" name="thirdParty">
               <thirdParty :auths="state.auths" />
             </el-tab-pane>
+            <el-tab-pane label="鍦ㄧ嚎璁惧" name="onlinDevice">
+              <onlinDevice :devices="state.devices" />
+            </el-tab-pane>
           </el-tabs>
         </el-card>
       </el-col>
@@ -70,8 +73,10 @@
 import UserInfo from './userInfo.vue';
 import ResetPwd from './resetPwd.vue';
 import ThirdParty from './thirdParty.vue';
+import OnlinDevice from './onlineDevice.vue';
 import { getAuthList } from '@/api/system/social/auth';
 import { getUserProfile } from '@/api/system/user';
+import { getOnline } from '@/api/monitor/online';
 import { UserVO } from '@/api/system/user/types';
 
 const activeTab = ref('userinfo');
@@ -80,12 +85,14 @@
   roleGroup: string;
   postGroup: string;
   auths: any;
+  devices: any;
 }
 const state = ref<State>({
   user: {},
   roleGroup: '',
   postGroup: '',
-  auths: []
+  auths: [],
+  devices: []
 });
 
 const userForm = ref({});
@@ -102,9 +109,14 @@
   const res = await getAuthList();
   state.value.auths = res.data;
 };
+const getOnlines = async () => {
+  const res = await getOnline();
+  state.value.devices = res.rows;
+};
 
 onMounted(() => {
   getUser();
   getAuths();
+  getOnlines();
 });
 </script>

--
Gitblit v1.9.3