Commit a41890fe456167a07ddc629adcb17440cd94fb85
1 parent
80fc3ebd
接口日志查询接口根据请求内容,响应内容查询时必须选择接口名称
Signed-off-by: TanYibin <5491541@qq.com>
Showing
1 changed file
with
18 additions
and
3 deletions
ant-design-vue-jeecg/src/views/system/monitor/ApiLogList.vue
@@ -160,7 +160,8 @@ export default { | @@ -160,7 +160,8 @@ export default { | ||
160 | description: '接口日志管理页面', | 160 | description: '接口日志管理页面', |
161 | apiNameList: [], | 161 | apiNameList: [], |
162 | queryParam: { | 162 | queryParam: { |
163 | - requestTime_begin: this.getDefaultDate() | 163 | + requestTime_begin: this.getDefaultDate(), |
164 | + requestTime_end: this.getEndDefaultDate() | ||
164 | }, | 165 | }, |
165 | // 表头 | 166 | // 表头 |
166 | columns: [ | 167 | columns: [ |
@@ -247,11 +248,19 @@ export default { | @@ -247,11 +248,19 @@ export default { | ||
247 | methods: { | 248 | methods: { |
248 | searchQuery() { | 249 | searchQuery() { |
249 | if (!!this.queryParam.requestBody && this.queryParam.requestBody != '**' && !this.queryParam.apiName) { | 250 | if (!!this.queryParam.requestBody && this.queryParam.requestBody != '**' && !this.queryParam.apiName) { |
250 | - this.$message.warning('请选择接口名称!'); | 251 | + this.$message.warning('请选择接口名称!'); |
251 | return | 252 | return |
252 | } | 253 | } |
253 | if (!!this.queryParam.responseBody && this.queryParam.responseBody != '**' && !this.queryParam.apiName) { | 254 | if (!!this.queryParam.responseBody && this.queryParam.responseBody != '**' && !this.queryParam.apiName) { |
254 | - this.$message.warning('请选择接口名称!'); | 255 | + this.$message.warning('请选择接口名称!'); |
256 | + return | ||
257 | + } | ||
258 | + if (!this.queryParam.requestTime_begin) { | ||
259 | + this.$message.warning('请选择请求开始时间!'); | ||
260 | + return | ||
261 | + } | ||
262 | + if (!this.queryParam.requestTime_end) { | ||
263 | + this.$message.warning('请选择请求结束时间!'); | ||
255 | return | 264 | return |
256 | } | 265 | } |
257 | this.loadData(1, this.value) | 266 | this.loadData(1, this.value) |
@@ -262,12 +271,18 @@ export default { | @@ -262,12 +271,18 @@ export default { | ||
262 | that.queryParam[key] = ''; | 271 | that.queryParam[key] = ''; |
263 | }); | 272 | }); |
264 | that.queryParam['requestTime_begin'] = this.getDefaultDate() | 273 | that.queryParam['requestTime_begin'] = this.getDefaultDate() |
274 | + that.queryParam['requestTime_end'] = this.getEndDefaultDate() | ||
265 | }, | 275 | }, |
266 | getDefaultDate() { | 276 | getDefaultDate() { |
267 | var tempDate = new Date() | 277 | var tempDate = new Date() |
268 | tempDate.setDate(tempDate.getDate() - 7) | 278 | tempDate.setDate(tempDate.getDate() - 7) |
269 | return moment(tempDate).utcOffset(480).format('YYYY-MM-DD 00:00:00'); | 279 | return moment(tempDate).utcOffset(480).format('YYYY-MM-DD 00:00:00'); |
270 | }, | 280 | }, |
281 | + getEndDefaultDate() { | ||
282 | + var tempDate = new Date() | ||
283 | + tempDate.setDate(tempDate.getDate() + 1) | ||
284 | + return moment(tempDate).utcOffset(480).format('YYYY-MM-DD 00:00:00'); | ||
285 | + }, | ||
271 | loadFrom() { | 286 | loadFrom() { |
272 | getApiNameList().then((res) => { | 287 | getApiNameList().then((res) => { |
273 | if (res.success) { | 288 | if (res.success) { |