fix(log): 优化API日志记录和查询功能
- 实现响应体结构化解析,根据RTYPE字段判断请求状态 - 修复前端查询条件触发时机和日期格式化问题
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
placeholder="请输入关键字查询"
|
||||
class="filter-item"
|
||||
style="width: 200px;"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="接口走向">
|
||||
@@ -27,7 +26,6 @@
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option label="出站" :value="0" />
|
||||
<el-option label="入站" :value="1" />
|
||||
@@ -56,7 +54,6 @@
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in bizCodeList"
|
||||
@@ -73,7 +70,6 @@
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option label="SUCCESS" value="SUCCESS" />
|
||||
<el-option label="FAIL" value="FAIL" />
|
||||
@@ -83,11 +79,10 @@
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
value-format="yyyy-MM-dd"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
@@ -212,11 +207,16 @@ export default {
|
||||
name: 'SysApiLog',
|
||||
components: { rrOperation, crudOperation, pagination },
|
||||
cruds() {
|
||||
const today = new Date()
|
||||
const year = today.getFullYear()
|
||||
const month = String(today.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(today.getDate()).padStart(2, '0')
|
||||
const dateStr = `${year}-${month}-${day}`
|
||||
return CRUD({
|
||||
title: '接口日志',
|
||||
url: 'api/sysApiLog',
|
||||
query: {
|
||||
createTime: [new Date(), new Date()]
|
||||
createTime: [dateStr, dateStr]
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user