|
@@ -58,6 +58,9 @@
|
|
|
<el-tab-pane label="第三方应用" name="thirdParty">
|
|
<el-tab-pane label="第三方应用" name="thirdParty">
|
|
|
<thirdParty :auths="state.auths" />
|
|
<thirdParty :auths="state.auths" />
|
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
|
|
|
+ <el-tab-pane label="在线设备" name="onlinDevice">
|
|
|
|
|
+ <onlinDevice :devices="state.devices" />
|
|
|
|
|
+ </el-tab-pane>
|
|
|
</el-tabs>
|
|
</el-tabs>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -70,8 +73,10 @@ import UserAvatar from './userAvatar.vue';
|
|
|
import UserInfo from './userInfo.vue';
|
|
import UserInfo from './userInfo.vue';
|
|
|
import ResetPwd from './resetPwd.vue';
|
|
import ResetPwd from './resetPwd.vue';
|
|
|
import ThirdParty from './thirdParty.vue';
|
|
import ThirdParty from './thirdParty.vue';
|
|
|
|
|
+import OnlinDevice from './onlineDevice.vue';
|
|
|
import { getAuthList } from '@/api/system/social/auth';
|
|
import { getAuthList } from '@/api/system/social/auth';
|
|
|
import { getUserProfile } from '@/api/system/user';
|
|
import { getUserProfile } from '@/api/system/user';
|
|
|
|
|
+import { getOnline } from '@/api/monitor/online';
|
|
|
import { UserVO } from '@/api/system/user/types';
|
|
import { UserVO } from '@/api/system/user/types';
|
|
|
|
|
|
|
|
const activeTab = ref('userinfo');
|
|
const activeTab = ref('userinfo');
|
|
@@ -80,12 +85,14 @@ interface State {
|
|
|
roleGroup: string;
|
|
roleGroup: string;
|
|
|
postGroup: string;
|
|
postGroup: string;
|
|
|
auths: any;
|
|
auths: any;
|
|
|
|
|
+ devices: any;
|
|
|
}
|
|
}
|
|
|
const state = ref<State>({
|
|
const state = ref<State>({
|
|
|
user: {},
|
|
user: {},
|
|
|
roleGroup: '',
|
|
roleGroup: '',
|
|
|
postGroup: '',
|
|
postGroup: '',
|
|
|
- auths: []
|
|
|
|
|
|
|
+ auths: [],
|
|
|
|
|
+ devices: []
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const userForm = ref({});
|
|
const userForm = ref({});
|
|
@@ -102,9 +109,14 @@ const getAuths = async () => {
|
|
|
const res = await getAuthList();
|
|
const res = await getAuthList();
|
|
|
state.value.auths = res.data;
|
|
state.value.auths = res.data;
|
|
|
};
|
|
};
|
|
|
|
|
+const getOnlines = async () => {
|
|
|
|
|
+ const res = await getOnline();
|
|
|
|
|
+ state.value.devices = res.rows;
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
getUser();
|
|
getUser();
|
|
|
getAuths();
|
|
getAuths();
|
|
|
|
|
+ getOnlines();
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|