From cdbbca43c4466d36e9cef08b81cb0fe689c6da25 Mon Sep 17 00:00:00 2001
From: dap <15891557205@163.com>
Date: 星期四, 14 十一月 2024 16:23:16 +0800
Subject: [PATCH] chore: 锁定vue-json-pretty版本

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

diff --git a/src/views/system/user/profile/index.vue b/src/views/system/user/profile/index.vue
index 75e1fde..7c1389a 100644
--- a/src/views/system/user/profile/index.vue
+++ b/src/views/system/user/profile/index.vue
@@ -27,7 +27,7 @@
               </li>
               <li class="list-group-item">
                 <svg-icon icon-class="tree" />鎵�灞為儴闂�
-                <div v-if="state.user.dept" class="pull-right">{{ state.user.dept.deptName }} / {{ state.postGroup }}</div>
+                <div v-if="state.user.deptName" class="pull-right">{{ state.user.deptName }} / {{ state.postGroup }}</div>
               </li>
               <li class="list-group-item">
                 <svg-icon icon-class="peoples" />鎵�灞炶鑹�
@@ -58,6 +58,9 @@
             <el-tab-pane label="绗笁鏂瑰簲鐢�" name="thirdParty">
               <thirdParty :auths="state.auths" />
             </el-tab-pane>
+            <el-tab-pane label="鍦ㄧ嚎璁惧" name="onlineDevice">
+              <onlineDevice :devices="state.devices" />
+            </el-tab-pane>
           </el-tabs>
         </el-card>
       </el-col>
@@ -70,15 +73,26 @@
 import UserInfo from './userInfo.vue';
 import ResetPwd from './resetPwd.vue';
 import ThirdParty from './thirdParty.vue';
+import OnlineDevice 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');
-const state = ref<Record<string, any>>({
+interface State {
+  user: Partial<UserVO>;
+  roleGroup: string;
+  postGroup: string;
+  auths: any;
+  devices: any;
+}
+const state = ref<State>({
   user: {},
   roleGroup: '',
   postGroup: '',
-  auths: []
+  auths: [],
+  devices: []
 });
 
 const userForm = ref({});
@@ -95,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