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 | 160 | description: '接口日志管理页面', |
161 | 161 | apiNameList: [], |
162 | 162 | queryParam: { |
163 | - requestTime_begin: this.getDefaultDate() | |
163 | + requestTime_begin: this.getDefaultDate(), | |
164 | + requestTime_end: this.getEndDefaultDate() | |
164 | 165 | }, |
165 | 166 | // 表头 |
166 | 167 | columns: [ |
... | ... | @@ -247,11 +248,19 @@ export default { |
247 | 248 | methods: { |
248 | 249 | searchQuery() { |
249 | 250 | if (!!this.queryParam.requestBody && this.queryParam.requestBody != '**' && !this.queryParam.apiName) { |
250 | - this.$message.warning('请选择接口名称!'); | |
251 | + this.$message.warning('请选择接口名称!'); | |
251 | 252 | return |
252 | 253 | } |
253 | 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 | 264 | return |
256 | 265 | } |
257 | 266 | this.loadData(1, this.value) |
... | ... | @@ -262,12 +271,18 @@ export default { |
262 | 271 | that.queryParam[key] = ''; |
263 | 272 | }); |
264 | 273 | that.queryParam['requestTime_begin'] = this.getDefaultDate() |
274 | + that.queryParam['requestTime_end'] = this.getEndDefaultDate() | |
265 | 275 | }, |
266 | 276 | getDefaultDate() { |
267 | 277 | var tempDate = new Date() |
268 | 278 | tempDate.setDate(tempDate.getDate() - 7) |
269 | 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 | 286 | loadFrom() { |
272 | 287 | getApiNameList().then((res) => { |
273 | 288 | if (res.success) { |
... | ... |