|
|
@@ -19,7 +19,37 @@
|
|
|
@keyup.enter="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="类型" prop="businessType">
|
|
|
+ <el-form-item label="事件类型" prop="eventType">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.eventType"
|
|
|
+ placeholder="事件类型"
|
|
|
+ clearable
|
|
|
+ style="width: 240px"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in event_type"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="事件级别" prop="eventLevel">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.eventLevel"
|
|
|
+ placeholder="事件级别"
|
|
|
+ clearable
|
|
|
+ style="width: 240px"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in event_level"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="类型" prop="businessType">
|
|
|
<el-select
|
|
|
v-model="queryParams.businessType"
|
|
|
placeholder="操作类型"
|
|
|
@@ -67,7 +97,7 @@
|
|
|
</el-form>
|
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
- <el-col :span="1.5">
|
|
|
+ <!-- <el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="danger"
|
|
|
plain
|
|
|
@@ -85,7 +115,7 @@
|
|
|
@click="handleClean"
|
|
|
v-hasPermi="['monitor:operlog:remove']"
|
|
|
>清空</el-button>
|
|
|
- </el-col>
|
|
|
+ </el-col> -->
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="warning"
|
|
|
@@ -102,7 +132,17 @@
|
|
|
<el-table-column type="selection" width="50" align="center" />
|
|
|
<el-table-column label="日志编号" align="center" prop="operId" />
|
|
|
<el-table-column label="系统模块" align="center" prop="title" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="操作类型" align="center" prop="businessType">
|
|
|
+ <el-table-column label="事件类型" align="center" prop="eventType">
|
|
|
+ <template #default="scope">
|
|
|
+ <dict-tag :options="event_type" :value="scope.row.eventType" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label=" 事件级别" align="center" prop="eventLevel">
|
|
|
+ <template #default="scope">
|
|
|
+ <dict-tag :options="event_level" :value="scope.row.eventLevel" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作类型" align="center" prop="businessType">
|
|
|
<template #default="scope">
|
|
|
<dict-tag :options="sys_oper_type" :value="scope.row.businessType" />
|
|
|
</template>
|
|
|
@@ -144,7 +184,7 @@
|
|
|
<el-form :model="form" label-width="100px">
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="操作模块:">{{ form.title }} / {{ typeFormat(form) }}</el-form-item>
|
|
|
+ <el-form-item label="操作模块:">{{ form.title }} / {{ typeFormat(form) }} / {{ eventTypeFormat(form) }} / {{ eventLevelFormat(form) }}</el-form-item>
|
|
|
<el-form-item
|
|
|
label="登录信息:"
|
|
|
>{{ form.operName }} / {{ form.operIp }} / {{ form.operLocation }}</el-form-item>
|
|
|
@@ -192,7 +232,7 @@
|
|
|
import { list, delOperlog, cleanOperlog } from "@/api/monitor/operlog";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
-const { sys_oper_type, sys_common_status } = proxy.useDict("sys_oper_type","sys_common_status");
|
|
|
+const { sys_oper_type, sys_common_status,event_type,event_level} = proxy.useDict("sys_oper_type","sys_common_status","event_type","event_level");
|
|
|
|
|
|
const operlogList = ref([]);
|
|
|
const open = ref(false);
|
|
|
@@ -233,6 +273,14 @@ function getList() {
|
|
|
function typeFormat(row, column) {
|
|
|
return proxy.selectDictLabel(sys_oper_type.value, row.businessType);
|
|
|
}
|
|
|
+/** 事件类型字典翻译 */
|
|
|
+function eventTypeFormat(row, column) {
|
|
|
+ return proxy.selectDictLabel(event_type.value, row.eventType);
|
|
|
+}
|
|
|
+/** 事件级别类型字典翻译 */
|
|
|
+function eventLevelFormat(row, column) {
|
|
|
+ return proxy.selectDictLabel(event_level.value, row.eventLevel);
|
|
|
+}
|
|
|
/** 搜索按钮操作 */
|
|
|
function handleQuery() {
|
|
|
queryParams.value.pageNum = 1;
|