From 6af68085ff6615e1ec3a5dd18c761250800d6fca Mon Sep 17 00:00:00 2001
From: LiuHao <liuhaoai545@gmail.com>
Date: 星期二, 06 六月 2023 22:23:43 +0800
Subject: [PATCH] update 修改页面代码 去除ele的引入以及vue的类型声明

---
 src/views/monitor/online/index.vue |   39 +++++++++++++++++++--------------------
 1 files changed, 19 insertions(+), 20 deletions(-)

diff --git a/src/views/monitor/online/index.vue b/src/views/monitor/online/index.vue
index 72cd46e..6d7bf87 100644
--- a/src/views/monitor/online/index.vue
+++ b/src/views/monitor/online/index.vue
@@ -56,7 +56,6 @@
 
 <script setup name="Online" lang="ts">
 import { forceLogout, list as initData } from "@/api/monitor/online";
-import { ComponentInternalInstance } from "vue";
 import { OnlineQuery, OnlineVO } from "@/api/monitor/online/types";
 
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -65,42 +64,42 @@
 const loading = ref(true);
 const total = ref(0);
 
-const queryFormRef = ref(ElForm);
+const queryFormRef = ref<ElFormInstance>();
 
 const queryParams = ref<OnlineQuery>({
-    pageNum: 1,
-    pageSize: 10,
-    ipaddr: '',
-    userName: ''
+  pageNum: 1,
+  pageSize: 10,
+  ipaddr: '',
+  userName: ''
 });
 
 /** 鏌ヨ鐧诲綍鏃ュ織鍒楄〃 */
 const getList = async () => {
-    loading.value = true;
-    const res = await initData(queryParams.value);
-    onlineList.value = res.rows;
-    total.value = res.total;
-    loading.value = false;
+  loading.value = true;
+  const res = await initData(queryParams.value);
+  onlineList.value = res.rows;
+  total.value = res.total;
+  loading.value = false;
 }
 /** 鎼滅储鎸夐挳鎿嶄綔 */
 const handleQuery = () => {
-    queryParams.value.pageNum = 1;
-    getList();
+  queryParams.value.pageNum = 1;
+  getList();
 }
 /** 閲嶇疆鎸夐挳鎿嶄綔 */
 const resetQuery = () => {
-    queryFormRef.value.resetFields();
-    handleQuery();
+  queryFormRef.value?.resetFields();
+  handleQuery();
 }
 /** 寮洪��鎸夐挳鎿嶄綔 */
 const handleForceLogout = async (row: OnlineVO) => {
-    await proxy?.$modal.confirm('鏄惁纭寮洪��鍚嶇О涓�"' + row.userName + '"鐨勭敤鎴�?');
-    await forceLogout(row.tokenId);
-    getList();
-    proxy?.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+  await proxy?.$modal.confirm('鏄惁纭寮洪��鍚嶇О涓�"' + row.userName + '"鐨勭敤鎴�?');
+  await forceLogout(row.tokenId);
+  getList();
+  proxy?.$modal.msgSuccess("鍒犻櫎鎴愬姛");
 }
 
 onMounted(() => {
-    getList();
+  getList();
 })
 </script>

--
Gitblit v1.9.3