From ba24afce52bcdffdbccf6475544c79c4eefcd14e Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期二, 09 七月 2024 11:02:34 +0800 Subject: [PATCH] !131 ♥️发布 vue 版本 5.2.1 与 cloud 版本 2.2.0 Merge pull request !131 from 疯狂的狮子Li/dev --- src/views/system/user/profile/index.vue | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/views/system/user/profile/index.vue b/src/views/system/user/profile/index.vue index ae8fa0f..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,8 +73,10 @@ 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'); @@ -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