From 6a7ec8116847cdec2b75295708b773b1a9c57bcf Mon Sep 17 00:00:00 2001 From: 棉花 <12559203+radish-hi_0@user.noreply.gitee.com> Date: 星期五, 08 十二月 2023 17:55:11 +0800 Subject: [PATCH] fix: 删除重复环境变量ElUploadInstance --- 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