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 |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/views/monitor/online/index.vue b/src/views/monitor/online/index.vue
index 1a25dc5..d105cd7 100644
--- a/src/views/monitor/online/index.vue
+++ b/src/views/monitor/online/index.vue
@@ -63,6 +63,8 @@
 <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"));
@@ -100,10 +102,12 @@
 }
 /** 寮洪��鎸夐挳鎿嶄綔 */
 const handleForceLogout = async (row: OnlineVO) => {
-  await proxy?.$modal.confirm('鏄惁纭寮洪��鍚嶇О涓�"' + row.userName + '"鐨勭敤鎴�?');
-  await forceLogout(row.tokenId);
-  await 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