Commit 3becde4d4cb02fa6c00d126979f308b4e4ae43d3

Authored by 谭毅彬
1 parent c4bb74af

接口日志页面显示优化

Signed-off-by: TanYibin <5491541@qq.com>
ant-design-vue-jeecg/src/views/jeecg/ThirdAppMessageTest.vue
... ... @@ -34,7 +34,7 @@
34 34 <div slot="action" slot-scope="text, record">
35 35 <template v-if="record.app==='DINGTALK'">
36 36 <a-popconfirm v-if="!record.recalled" title="确定吗?" @confirm="handleRecall(record)">
37   - <a @click="">撤回</a>
  37 + <a @click="null">撤回</a>
38 38 </a-popconfirm>
39 39 <span v-else>已撤回</span>
40 40 </template>
... ...
ant-design-vue-jeecg/src/views/system/monitor/ApiLogList.vue
... ... @@ -14,13 +14,13 @@
14 14 <a-input placeholder="请输入请求类型" v-model="queryParam.apiMethod"></a-input>
15 15 </a-form-item>
16 16 </a-col>
  17 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  18 + <a-form-item label="请求方地址">
  19 + <a-input placeholder="请输入请求方地址" v-model="queryParam.ip"></a-input>
  20 + </a-form-item>
  21 + </a-col>
17 22 <template v-if="toggleSearchStatus">
18 23 <a-col :xl="6" :lg="7" :md="8" :sm="24">
19   - <a-form-item label="请求方地址">
20   - <a-input placeholder="请输入请求方地址" v-model="queryParam.ip"></a-input>
21   - </a-form-item>
22   - </a-col>
23   - <a-col :xl="6" :lg="7" :md="8" :sm="24">
24 24 <a-form-item label="请求方名称">
25 25 <a-input placeholder="请输入请求方名称" v-model="queryParam.responseFrom"></a-input>
26 26 </a-form-item>
... ... @@ -93,12 +93,6 @@
93 93  
94 94 <!-- table区域-begin -->
95 95 <div>
96   - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
97   - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
98   - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
99   - <a style="margin-left: 24px" @click="onClearSelected">清空</a>
100   - </div>
101   -
102 96 <a-table
103 97 ref="table"
104 98 size="middle"
... ... @@ -109,7 +103,6 @@
109 103 :dataSource="dataSource"
110 104 :pagination="ipagination"
111 105 :loading="loading"
112   - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
113 106 class="j-table-force-nowrap"
114 107 @change="handleTableChange">
115 108  
... ... @@ -151,24 +144,23 @@ import &#39;@/assets/less/TableExpand.less&#39;
151 144 import {mixinDevice} from '@/utils/mixin'
152 145 import {JeecgListMixin} from '@/mixins/JeecgListMixin'
153 146 import ApiLogModal from './modules/ApiLogModal'
  147 +import JEllipsis from "@comp/jeecg/JEllipsis"
154 148  
155 149 export default {
156 150 name: 'ApiLogList',
157 151 mixins: [JeecgListMixin, mixinDevice],
158 152 components: {
159   - ApiLogModal
  153 + ApiLogModal,
  154 + JEllipsis
160 155 },
161 156 data() {
  157 + let ellipsis1 = (v, l = 20) => (<j-ellipsis value={v} length={l}/>)
  158 + let ellipsis2 = (v, l = 150) => (<j-ellipsis value={v} length={l}/>)
162 159 return {
163 160 description: '接口日志管理页面',
164 161 // 表头
165 162 columns: [
166 163 {
167   - title: '接口ID',
168   - align: "center",
169   - dataIndex: 'id'
170   - },
171   - {
172 164 title: '接口名称',
173 165 align: "center",
174 166 dataIndex: 'apiName'
... ... @@ -215,23 +207,27 @@ export default {
215 207 },
216 208 {
217 209 title: '请求头',
218   - align: "center",
219   - dataIndex: 'requestHeader'
  210 + align: "left",
  211 + dataIndex: 'requestHeader',
  212 + customRender: (t) => ellipsis1(t)
220 213 },
221 214 {
222 215 title: '请求内容',
223   - align: "center",
224   - dataIndex: 'requestBody'
  216 + align: "left",
  217 + dataIndex: 'requestBody',
  218 + customRender: (t) => ellipsis2(t)
225 219 },
226 220 {
227 221 title: '响应头',
228   - align: "center",
229   - dataIndex: 'responseHeader'
  222 + align: "left",
  223 + dataIndex: 'responseHeader',
  224 + customRender: (t) => ellipsis1(t)
230 225 },
231 226 {
232 227 title: '响应内容',
233   - align: "center",
234   - dataIndex: 'responseBody'
  228 + align: "left",
  229 + dataIndex: 'responseBody',
  230 + customRender: (t) => ellipsis2(t)
235 231 },
236 232 {
237 233 title: 'httpCode',
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/aspectj/ApiLoggerAspect.java
... ... @@ -471,9 +471,11 @@ public class ApiLoggerAspect {
471 471 // Class type = m.getParameterTypes()[i];
472 472 if (args[i] instanceof HttpServletRequest) {
473 473 continue;
474   - } else {
475   - map.put(name, args[i]);
476 474 }
  475 + if (args[i] instanceof HttpServletResponse) {
  476 + continue;
  477 + }
  478 + map.put(name, args[i]);
477 479 }
478 480  
479 481 if (!map.isEmpty()) {
... ...
huaheng-wms-core/src/main/resources/application-test.yml
... ... @@ -190,8 +190,8 @@ jeecg:
190 190 signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a
191 191 # 本地:local\Minio:minio\阿里云:alioss
192 192 uploadType: local
193   - # 允许上传的文件类型,使用,分割
194   - uploadFileType: apk,txt,jpg,png
  193 + # 允许上传的文件类型 使用,分割
  194 + uploadFileType: apk,txt,jpg,png,sh
195 195 path:
196 196 #文件上传根目录 设置
197 197 upload: ./upFiles
... ...