From cc9b67d4676dd51a6b2d88e92607aca2629ee54d Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期五, 22 十二月 2023 13:26:26 +0800 Subject: [PATCH] !72 发布 vue 版本 5.1.2 与 cloud 版本 2.1.2 Merge pull request !72 from 疯狂的狮子Li/temp --- src/views/monitor/online/index.vue | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/views/monitor/online/index.vue b/src/views/monitor/online/index.vue index 6d7bf87..d105cd7 100644 --- a/src/views/monitor/online/index.vue +++ b/src/views/monitor/online/index.vue @@ -29,6 +29,12 @@ </el-table-column> <el-table-column label="浼氳瘽缂栧彿" align="center" prop="tokenId" :show-overflow-tooltip="true" /> <el-table-column label="鐧诲綍鍚嶇О" align="center" prop="userName" :show-overflow-tooltip="true" /> + <el-table-column label="瀹㈡埛绔�" align="center" prop="clientKey" :show-overflow-tooltip="true" /> + <el-table-column label="璁惧绫诲瀷" align="center"> + <template #default="scope"> + <dict-tag :options="sys_device_type" :value="scope.row.deviceType" /> + </template> + </el-table-column> <el-table-column label="鎵�灞為儴闂�" align="center" prop="deptName" :show-overflow-tooltip="true" /> <el-table-column label="涓绘満" align="center" prop="ipaddr" :show-overflow-tooltip="true" /> <el-table-column label="鐧诲綍鍦扮偣" align="center" prop="loginLocation" :show-overflow-tooltip="true" /> @@ -57,8 +63,11 @@ <script setup name="Online" lang="ts"> import { forceLogout, list as initData } from "@/api/monitor/online"; import { OnlineQuery, OnlineVO } from "@/api/monitor/online/types"; +import api from "@/api/system/user"; +import {to} from "await-to-js"; const { proxy } = getCurrentInstance() as ComponentInternalInstance; +const { sys_device_type } = toRefs<any>(proxy?.useDict("sys_device_type")); const onlineList = ref<OnlineVO[]>([]); const loading = ref(true); @@ -93,10 +102,12 @@ } /** 寮洪��鎸夐挳鎿嶄綔 */ const handleForceLogout = async (row: OnlineVO) => { - await proxy?.$modal.confirm('鏄惁纭寮洪��鍚嶇О涓�"' + row.userName + '"鐨勭敤鎴�?'); - await forceLogout(row.tokenId); - getList(); - proxy?.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + const [err] = await to(proxy?.$modal.confirm('鏄惁纭寮洪��鍚嶇О涓�"' + row.userName + '"鐨勭敤鎴�?') as any); + if (!err) { + await forceLogout(row.tokenId); + await getList(); + proxy?.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + } } onMounted(() => { -- Gitblit v1.9.3