Commit 57cbd3c363a7da064afa2bd29e23f3f03583e11f
1 parent
2f616f9e
操作记录页面优化
Signed-off-by: TanYibin <5491541@qq.com>
Showing
5 changed files
with
52 additions
and
43 deletions
.gitignore
ant-design-vue-jeecg/src/views/jeecg/modules/JeecgDemoTabsModal.vue
... | ... | @@ -66,10 +66,8 @@ |
66 | 66 | |
67 | 67 | <a-tabs defaultActiveKey="1"> |
68 | 68 | <a-tab-pane tab="Tab 1" key="1"> |
69 | - | |
70 | 69 | <a-table :columns="columns" :dataSource="data" :pagination="false" size="middle"> |
71 | - <template v-for="(col, i) in ['name', 'workId', 'department']" :slot="col" | |
72 | - slot-scope="text, record, index"> | |
70 | + <template v-for="(col, i) in ['name', 'workId', 'department']" :slot="col" slot-scope="text, record"> | |
73 | 71 | <a-tooltip title="必填项" :defaultVisible="false" :overlayStyle="{ color: 'red' }"> |
74 | 72 | <a-input :key="col" v-if="record.editable" style="margin: -5px 0" :value="text" |
75 | 73 | :placeholder="columns[i].title" |
... | ... | @@ -77,7 +75,7 @@ |
77 | 75 | <template v-else>{{ text }}</template> |
78 | 76 | </a-tooltip> |
79 | 77 | </template> |
80 | - <template slot="operation" slot-scope="text, record, index"> | |
78 | + <template slot="operation" slot-scope="text, record"> | |
81 | 79 | <template v-if="record.editable"> |
82 | 80 | <span v-if="record.isNew"> |
83 | 81 | <a @click="saveRow(record.key)">添加</a> |
... | ... |
ant-design-vue-jeecg/src/views/system/monitor/OperationLog.vue
... | ... | @@ -35,7 +35,7 @@ |
35 | 35 | </a-col> |
36 | 36 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
37 | 37 | <a-form-item label="操作结果状态"> |
38 | - <a-input placeholder="请输入操作结果状态容" v-model="queryParam.operationStatus"></a-input> | |
38 | + <j-dict-select-tag placeholder="请输入操作结果状态容" v-model="queryParam.operationStatus" dictCode="operation_status"/> | |
39 | 39 | </a-form-item> |
40 | 40 | </a-col> |
41 | 41 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
... | ... | @@ -154,7 +154,7 @@ |
154 | 154 | { |
155 | 155 | title:'操作结果状态', |
156 | 156 | align:"center", |
157 | - dataIndex: 'operationStatus' | |
157 | + dataIndex: 'operationStatus_dictText' | |
158 | 158 | }, |
159 | 159 | { |
160 | 160 | title: '操作', |
... | ... | @@ -178,7 +178,7 @@ |
178 | 178 | } |
179 | 179 | }, |
180 | 180 | created() { |
181 | - this.getSuperFieldList(); | |
181 | + this.getSuperFieldList(); | |
182 | 182 | }, |
183 | 183 | computed: { |
184 | 184 | importExcelUrl: function(){ |
... | ... | @@ -207,11 +207,11 @@ |
207 | 207 | fieldList.push({type:'string',value:'bizType',text:'业务类型',dictCode:''}) |
208 | 208 | fieldList.push({type:'string',value:'operationMsg',text:'操作内容',dictCode:''}) |
209 | 209 | fieldList.push({type:'datetime',value:'operationTime',text:'操作时间'}) |
210 | - fieldList.push({type:'int',value:'operationStatus',text:'操作结果状态',dictCode:''}) | |
211 | 210 | fieldList.push({type:'int',value:'operationCostTime',text:'操作耗时',dictCode:''}) |
212 | 211 | fieldList.push({type:'string',value:'contentReturn',text:'方法返回内容',dictCode:''}) |
213 | 212 | fieldList.push({type:'string',value:'contentException',text:'方法异常内容',dictCode:''}) |
214 | 213 | fieldList.push({type:'string',value:'operatorName',text:'操作人姓名',dictCode:''}) |
214 | + fieldList.push({type:'int',value:'operationStatus',text:'操作结果状态',dictCode:'operation_status'}) | |
215 | 215 | this.superFieldList = fieldList |
216 | 216 | } |
217 | 217 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/ngalain/aop/LogRecordAspect.java
... | ... | @@ -13,7 +13,7 @@ import org.springframework.web.context.request.ServletRequestAttributes; |
13 | 13 | |
14 | 14 | import com.alibaba.druid.util.StringUtils; |
15 | 15 | |
16 | -import lombok.extern.slf4j.Slf4j;; | |
16 | +import lombok.extern.slf4j.Slf4j; | |
17 | 17 | |
18 | 18 | // 暂时注释掉,提高系统性能 |
19 | 19 | @Slf4j |
... | ... | @@ -27,7 +27,7 @@ public class LogRecordAspect { |
27 | 27 | public void excudeService() {} |
28 | 28 | |
29 | 29 | @Around("excudeService()") |
30 | - public Object doAround(ProceedingJoinPoint pjp) throws Throwable { | |
30 | + public Object doAround(ProceedingJoinPoint point) throws Throwable { | |
31 | 31 | long startTime = System.currentTimeMillis(); |
32 | 32 | // 接收到请求,记录请求内容 |
33 | 33 | ServletRequestAttributes attributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes(); |
... | ... | @@ -38,7 +38,7 @@ public class LogRecordAspect { |
38 | 38 | log.info("[Controller start] {}{}[{}][{}]", url, StringUtils.isEmpty(queryString) ? "" : "?" + queryString, request.getMethod(), |
39 | 39 | ApiLoggerAspect.getIpAddr(request)); |
40 | 40 | // result的值就是被拦截方法的返回值 |
41 | - Object result = pjp.proceed(); | |
41 | + Object result = point.proceed(); | |
42 | 42 | long callTime = System.currentTimeMillis() - startTime; |
43 | 43 | log.info("[Controller return] {}[{}ms]", url, callTime); |
44 | 44 | return result; |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/operation/entity/OperationLog.java
1 | 1 | package org.jeecg.modules.wms.monitor.operation.entity; |
2 | 2 | |
3 | 3 | import java.io.Serializable; |
4 | -import java.io.UnsupportedEncodingException; | |
5 | -import java.util.Date; | |
6 | -import java.math.BigDecimal; | |
4 | + | |
5 | +import org.jeecg.common.aspect.annotation.Dict; | |
6 | +import org.jeecgframework.poi.excel.annotation.Excel; | |
7 | + | |
7 | 8 | import com.baomidou.mybatisplus.annotation.IdType; |
8 | 9 | import com.baomidou.mybatisplus.annotation.TableId; |
9 | 10 | import com.baomidou.mybatisplus.annotation.TableName; |
10 | -import lombok.Data; | |
11 | -import com.fasterxml.jackson.annotation.JsonFormat; | |
12 | -import org.springframework.format.annotation.DateTimeFormat; | |
13 | -import org.jeecgframework.poi.excel.annotation.Excel; | |
14 | -import org.jeecg.common.aspect.annotation.Dict; | |
11 | + | |
12 | +import cn.monitor4all.logRecord.annotation.LogRecordDiffObject; | |
15 | 13 | import io.swagger.annotations.ApiModel; |
16 | 14 | import io.swagger.annotations.ApiModelProperty; |
15 | +import lombok.Data; | |
17 | 16 | import lombok.EqualsAndHashCode; |
18 | 17 | import lombok.experimental.Accessors; |
19 | 18 | |
20 | 19 | /** |
21 | 20 | * @Description: 操作记录表 |
22 | - * @Author: jeecg-boot | |
23 | - * @Date: 2023-02-20 | |
24 | - * @Version: V1.0 | |
21 | + * @Author: jeecg-boot | |
22 | + * @Date: 2023-02-20 | |
23 | + * @Version: V1.0 | |
25 | 24 | */ |
26 | 25 | @Data |
27 | 26 | @TableName("operation_log") |
... | ... | @@ -31,48 +30,59 @@ import lombok.experimental.Accessors; |
31 | 30 | public class OperationLog implements Serializable { |
32 | 31 | private static final long serialVersionUID = 1L; |
33 | 32 | |
34 | - /**主键*/ | |
35 | - @TableId(type = IdType.AUTO) | |
33 | + /** 主键 */ | |
34 | + @TableId(type = IdType.AUTO) | |
36 | 35 | @ApiModelProperty(value = "主键") |
37 | 36 | private java.lang.Integer id; |
38 | - /**业务ID*/ | |
39 | - @Excel(name = "业务ID", width = 15) | |
37 | + | |
38 | + /** 业务ID */ | |
39 | + @Excel(name = "业务ID", width = 15) | |
40 | 40 | @ApiModelProperty(value = "业务ID") |
41 | 41 | private java.lang.String bizId; |
42 | - /**业务类型*/ | |
43 | - @Excel(name = "业务类型", width = 15) | |
42 | + | |
43 | + /** 业务类型 */ | |
44 | + @Excel(name = "业务类型", width = 15) | |
44 | 45 | @ApiModelProperty(value = "业务类型") |
45 | 46 | private java.lang.String bizType; |
46 | - /**业务标签*/ | |
47 | + | |
48 | + /** 业务标签 */ | |
47 | 49 | @Excel(name = "业务标签", width = 15) |
48 | 50 | @ApiModelProperty(value = "业务标签") |
49 | 51 | private java.lang.String bizTag; |
50 | - /**操作内容*/ | |
51 | - @Excel(name = "操作内容", width = 15) | |
52 | + | |
53 | + /** 操作内容 */ | |
54 | + @Excel(name = "操作内容", width = 15) | |
52 | 55 | @ApiModelProperty(value = "操作内容") |
53 | 56 | private java.lang.String operationMsg; |
54 | - /**操作时间*/ | |
55 | - @Excel(name = "操作时间", width = 15) | |
57 | + | |
58 | + /** 操作时间 */ | |
59 | + @Excel(name = "操作时间", width = 15) | |
56 | 60 | @ApiModelProperty(value = "操作时间") |
57 | 61 | private java.util.Date operationTime; |
58 | - /**操作结果状态*/ | |
59 | - @Excel(name = "操作结果状态", width = 15) | |
62 | + | |
63 | + /** 操作结果状态 */ | |
64 | + @Excel(name = "操作结果状态", width = 15, dicCode = "operation_status") | |
65 | + @Dict(dicCode = "operation_status") | |
60 | 66 | @ApiModelProperty(value = "操作结果状态") |
61 | 67 | private java.lang.Integer operationStatus; |
62 | - /**操作耗时*/ | |
63 | - @Excel(name = "操作耗时", width = 15) | |
68 | + | |
69 | + /** 操作耗时 */ | |
70 | + @Excel(name = "操作耗时", width = 15) | |
64 | 71 | @ApiModelProperty(value = "操作耗时") |
65 | 72 | private java.lang.Long operationCostTime; |
66 | - /**方法返回内容*/ | |
67 | - @Excel(name = "方法返回内容", width = 15) | |
73 | + | |
74 | + /** 方法返回内容 */ | |
75 | + @Excel(name = "方法返回内容", width = 15) | |
68 | 76 | @ApiModelProperty(value = "方法返回内容") |
69 | 77 | private java.lang.String contentReturn; |
70 | - /**方法异常内容*/ | |
71 | - @Excel(name = "方法异常内容", width = 15) | |
78 | + | |
79 | + /** 方法异常内容 */ | |
80 | + @Excel(name = "方法异常内容", width = 15) | |
72 | 81 | @ApiModelProperty(value = "方法异常内容") |
73 | 82 | private java.lang.String contentException; |
74 | - /**操作人姓名*/ | |
75 | - @Excel(name = "操作人姓名", width = 15) | |
83 | + | |
84 | + /** 操作人姓名 */ | |
85 | + @Excel(name = "操作人姓名", width = 15) | |
76 | 86 | @ApiModelProperty(value = "操作人姓名") |
77 | 87 | private java.lang.String operatorName; |
78 | 88 | } |
... | ... |