😎清理在线用户相关代码
This commit is contained in:
parent
12c8e240bc
commit
3d74a0b539
@ -1,3 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div></div>
|
|
||||||
</template>
|
|
||||||
@ -61,7 +61,6 @@ const { userInfos } = storeToRefs(stores);
|
|||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
title: String,
|
title: String,
|
||||||
});
|
});
|
||||||
// const emits = defineEmits(['handleQuery']);
|
|
||||||
const ruleFormRef = ref();
|
const ruleFormRef = ref();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
isShowDialog: false,
|
isShowDialog: false,
|
||||||
|
|||||||
@ -55,10 +55,6 @@ const xGrid = ref<VxeGridInstance>();
|
|||||||
const sendMessageRef = ref<InstanceType<typeof SendMessage>>();
|
const sendMessageRef = ref<InstanceType<typeof SendMessage>>();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
isVisible: false,
|
isVisible: false,
|
||||||
lastUserState: {
|
|
||||||
online: false,
|
|
||||||
realName: '',
|
|
||||||
}, // 用户状态信息
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 表格参数配置
|
// 表格参数配置
|
||||||
@ -95,7 +91,6 @@ onMounted(async () => {
|
|||||||
signalR.on('OnlineUserList', async (data: any) => {
|
signalR.on('OnlineUserList', async (data: any) => {
|
||||||
options.data = data.userList;
|
options.data = data.userList;
|
||||||
|
|
||||||
console.log('dddddd');
|
|
||||||
// 上下线通知
|
// 上下线通知
|
||||||
if (!themeConfig.value.onlineNotice) return;
|
if (!themeConfig.value.onlineNotice) return;
|
||||||
ElNotification({
|
ElNotification({
|
||||||
@ -137,7 +132,7 @@ const forceOffline = async (row: any) => {
|
|||||||
type: 'warning',
|
type: 'warning',
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
// 调用服务器上指定的方法名称和参数
|
// 强制用户下线(对应后台Hub的方法名称)
|
||||||
await signalR.send('ForceOffline', { connectionId: row.connectionId }).catch(function (err: any) {
|
await signalR.send('ForceOffline', { connectionId: row.connectionId }).catch(function (err: any) {
|
||||||
ElMessage.error(err);
|
ElMessage.error(err);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user