From 70e78853b25954c916f3a31aa868faea869fce34 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: Tue, 10 Feb 2026 11:08:18 +0800
Subject: [PATCH] 修改
---
src/views/monitor/logininfor/index.vue | 26 ++++++++++++++++++--------
1 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/src/views/monitor/logininfor/index.vue b/src/views/monitor/logininfor/index.vue
index bd58a5d..fb71d2c 100644
--- a/src/views/monitor/logininfor/index.vue
+++ b/src/views/monitor/logininfor/index.vue
@@ -27,7 +27,7 @@
style="width: 240px"
>
<el-option
- v-for="dict in sys_common_status"
+ v-for="dict in sysStatus"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@@ -95,7 +95,7 @@
<el-table ref="logininforRef" v-loading="loading" :data="logininforList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column type="selection" width="55" align="center" />
- <el-table-column label="访问编号" align="center" prop="infoId" />
+ <el-table-column label="访问编号" align="center" prop="id" />
<el-table-column label="用户名称" align="center" prop="userName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
<el-table-column label="地址" align="center" prop="ipaddr" :show-overflow-tooltip="true" />
<el-table-column label="登录地点" align="center" prop="loginLocation" :show-overflow-tooltip="true" />
@@ -103,7 +103,7 @@
<el-table-column label="浏览器" align="center" prop="browser" :show-overflow-tooltip="true" />
<el-table-column label="登录状态" align="center" prop="status">
<template #default="scope">
- <dict-tag :options="sys_common_status" :value="scope.row.status" />
+ <dict-tag :options="sysStatus" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="描述" align="center" prop="msg" :show-overflow-tooltip="true" />
@@ -139,7 +139,7 @@
const selectName = ref("");
const total = ref(0);
const dateRange = ref([]);
-const defaultSort = ref({ prop: "loginTime", order: "descending" });
+const defaultSort = ref({ prop: "loginTime", order: "desc" });
// 查询参数
const queryParams = ref({
@@ -151,13 +151,23 @@
orderByColumn: undefined,
isAsc: undefined
});
+const sysStatus = ref([
+ {
+ label:'正常',
+ value:'0'
+ },
+ {
+ label:'异常',
+ value:'1'
+ },
+])
/** 查询登录日志列表 */
function getList() {
loading.value = true;
list(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
- logininforList.value = response.rows;
- total.value = response.total;
+ logininforList.value = response.data.list;
+ total.value = response.data.total;
loading.value = false;
});
}
@@ -175,7 +185,7 @@
}
/** 多选框选中数据 */
function handleSelectionChange(selection) {
- ids.value = selection.map(item => item.infoId);
+ ids.value = selection.map(item => item.id);
multiple.value = !selection.length;
single.value = selection.length != 1;
selectName.value = selection.map(item => item.userName);
@@ -188,7 +198,7 @@
}
/** 删除按钮操作 */
function handleDelete(row) {
- const infoIds = row.infoId || ids.value;
+ const infoIds = row.id || ids.value;
proxy.$modal.confirm('是否确认删除访问编号为"' + infoIds + '"的数据项?').then(function () {
return delLogininfor(infoIds);
}).then(() => {
--
Gitblit v1.9.2