Ver código fonte

操作日志列表新增IP地址查询

RuoYi 2 anos atrás
pai
commit
e067c04464

+ 3 - 0
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml

@@ -36,6 +36,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
36 36
 	<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">
37 37
 		<include refid="selectOperLogVo"/>
38 38
 		<where>
39
+			<if test="operIp != null and operIp != ''">
40
+				AND oper_ip like concat('%', #{operIp}, '%')
41
+			</if>
39 42
 			<if test="title != null and title != ''">
40 43
 				AND title like concat('%', #{title}, '%')
41 44
 			</if>

+ 12 - 2
ruoyi-ui/src/views/system/operlog/index.vue

@@ -1,6 +1,15 @@
1 1
 <template>
2 2
   <div class="app-container">
3 3
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
4
+      <el-form-item label="操作地址" prop="operIp">
5
+        <el-input
6
+          v-model="queryParams.operIp"
7
+          placeholder="请输入操作地址"
8
+          clearable
9
+          style="width: 240px;"
10
+          @keyup.enter.native="handleQuery"
11
+        />
12
+      </el-form-item>
4 13
       <el-form-item label="系统模块" prop="title">
5 14
         <el-input
6 15
           v-model="queryParams.title"
@@ -105,7 +114,7 @@
105 114
     <el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
106 115
       <el-table-column type="selection" width="50" align="center" />
107 116
       <el-table-column label="日志编号" align="center" prop="operId" />
108
-      <el-table-column label="系统模块" align="center" prop="title" />
117
+      <el-table-column label="系统模块" align="center" prop="title" :show-overflow-tooltip="true" />
109 118
       <el-table-column label="操作类型" align="center" prop="businessType">
110 119
         <template slot-scope="scope">
111 120
           <dict-tag :options="dict.type.sys_oper_type" :value="scope.row.businessType"/>
@@ -113,7 +122,7 @@
113 122
       </el-table-column>
114 123
       <el-table-column label="请求方式" align="center" prop="requestMethod" />
115 124
       <el-table-column label="操作人员" align="center" prop="operName" width="110" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']"/>
116
-      <el-table-column label="主机" align="center" prop="operIp" width="130" :show-overflow-tooltip="true" />
125
+      <el-table-column label="操作地址" align="center" prop="operIp" width="130" :show-overflow-tooltip="true" />
117 126
       <el-table-column label="操作状态" align="center" prop="status">
118 127
         <template slot-scope="scope">
119 128
           <dict-tag :options="dict.type.sys_common_status" :value="scope.row.status"/>
@@ -229,6 +238,7 @@ export default {
229 238
       queryParams: {
230 239
         pageNum: 1,
231 240
         pageSize: 10,
241
+        operIp: undefined,
232 242
         title: undefined,
233 243
         operName: undefined,
234 244
         businessType: undefined,