Browse Source

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

RuoYi 1 year ago
parent
commit
207a9ce855

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

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

+ 10 - 0
ruoyi-ui/src/views/monitor/operlog/index.vue

@@ -1,6 +1,15 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="操作地址" prop="operIp">
+        <el-input
+          v-model="queryParams.operIp"
+          placeholder="请输入操作地址"
+          clearable
+          style="width: 240px;"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
       <el-form-item label="系统模块" prop="title">
         <el-input
           v-model="queryParams.title"
@@ -229,6 +238,7 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
+        operIp: undefined,
         title: undefined,
         operName: undefined,
         businessType: undefined,