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/components/DictTag/index.vue | 2
src/views/system/dict/data.vue | 4 +-
src/views/monitor/logininfor/index.vue | 26 +++++++++----
src/views/monitor/operlog/index.vue | 75 ++++++++++++++++++++++++++++++++-----
src/views/system/dict/index.vue | 4 +-
5 files changed, 87 insertions(+), 24 deletions(-)
diff --git a/src/components/DictTag/index.vue b/src/components/DictTag/index.vue
index c9ffadd..5f0806b 100644
--- a/src/components/DictTag/index.vue
+++ b/src/components/DictTag/index.vue
@@ -85,4 +85,4 @@
.el-tag + .el-tag {
margin-left: 10px;
}
-</style>
\ No newline at end of file
+</style>
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(() => {
diff --git a/src/views/monitor/operlog/index.vue b/src/views/monitor/operlog/index.vue
index 2d756bc..0e8a4e0 100644
--- a/src/views/monitor/operlog/index.vue
+++ b/src/views/monitor/operlog/index.vue
@@ -36,7 +36,7 @@
style="width: 240px"
>
<el-option
- v-for="dict in sys_oper_type"
+ v-for="dict in data.sysTypeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@@ -51,7 +51,7 @@
style="width: 240px"
>
<el-option
- v-for="dict in sys_common_status"
+ v-for="dict in data.sysStatus"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@@ -109,18 +109,18 @@
<el-table ref="operlogRef" v-loading="loading" :data="operlogList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column type="selection" width="50" align="center" />
- <el-table-column label="日志编号" align="center" prop="operId" />
+ <el-table-column label="日志编号" align="center" prop="id" />
<el-table-column label="系统模块" align="center" prop="title" :show-overflow-tooltip="true" />
<el-table-column label="操作类型" align="center" prop="businessType">
<template #default="scope">
- <dict-tag :options="sys_oper_type" :value="scope.row.businessType" />
+ <dict-tag :options="data.sysTypeList" :value="scope.row.businessType" />
</template>
</el-table-column>
<el-table-column label="操作人员" align="center" width="110" prop="operName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
<el-table-column label="操作地址" align="center" prop="operIp" width="130" :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="data.sysStatus" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="操作日期" align="center" prop="operTime" width="180" sortable="custom" :sort-orders="['descending', 'ascending']">
@@ -213,7 +213,7 @@
const total = ref(0);
const title = ref("");
const dateRange = ref([]);
-const defaultSort = ref({ prop: "operTime", order: "descending" });
+const defaultSort = ref({ prop: "operTime", order: "desc" });
const data = reactive({
form: {},
@@ -225,7 +225,60 @@
operName: undefined,
businessType: undefined,
status: undefined
- }
+ },
+ sysTypeList:[
+ {
+ label:'其他',
+ value:'0'
+ },
+ {
+ label:'新增',
+ value:'1'
+ },
+ {
+ label:'修改',
+ value:'2'
+ },
+ {
+ label:'删除',
+ value:'3'
+ },
+ {
+ label:'授权',
+ value:'4'
+ },
+ {
+ label:'导出',
+ value:'5'
+ },
+ {
+ label:'导入',
+ value:'6'
+ },
+ {
+ label:'强退',
+ value:'7'
+ },
+ {
+ label:'生成代码',
+ value:'8'
+ },
+ {
+ label:'清空数据',
+ value:'9'
+ },
+
+ ],
+ sysStatus:[
+ {
+ label:'正常',
+ value:'0'
+ },
+ {
+ label:'异常',
+ value:'1'
+ },
+ ]
});
const { queryParams, form } = toRefs(data);
@@ -234,8 +287,8 @@
function getList() {
loading.value = true;
list(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
- operlogList.value = response.rows;
- total.value = response.total;
+ operlogList.value = response.data.list;
+ total.value = response.data.total;
loading.value = false;
});
}
@@ -257,7 +310,7 @@
}
/** 多选框选中数据 */
function handleSelectionChange(selection) {
- ids.value = selection.map(item => item.operId);
+ ids.value = selection.map(item => item.id);
multiple.value = !selection.length;
}
/** 排序触发事件 */
@@ -273,7 +326,7 @@
}
/** 删除按钮操作 */
function handleDelete(row) {
- const operIds = row.operId || ids.value;
+ const operIds = row.id || ids.value;
proxy.$modal.confirm('是否确认删除日志编号为"' + operIds + '"的数据项?').then(function () {
return delOperlog(operIds);
}).then(() => {
diff --git a/src/views/system/dict/data.vue b/src/views/system/dict/data.vue
index b54668f..a7f7ede 100644
--- a/src/views/system/dict/data.vue
+++ b/src/views/system/dict/data.vue
@@ -197,8 +197,8 @@
const route = useRoute();
// 数据标签回显样式
const listClassOptions = ref([
- { value: "default", label: "默认" },
- { value: "primary", label: "主要" },
+ { value: "default", label: "默认" },
+ { value: "primary", label: "主要" },
{ value: "success", label: "成功" },
{ value: "info", label: "信息" },
{ value: "warning", label: "警告" },
diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue
index 56fea59..c17d475 100644
--- a/src/views/system/dict/index.vue
+++ b/src/views/system/dict/index.vue
@@ -210,8 +210,8 @@
function getList() {
loading.value = true;
listType(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
- typeList.value = response.rows;
- total.value = response.total;
+ typeList.value = response.data.list;
+ total.value = response.data.total;
loading.value = false;
});
}
--
Gitblit v1.9.2