refactor(quartz): 重构定时任务日志查询接口参数处理

This commit is contained in:
2026-01-12 18:54:31 +08:00
parent 5aa5624350
commit f41f436dd8
8 changed files with 55 additions and 40 deletions
+17 -5
View File
@@ -19,6 +19,8 @@ export default {
url: '',
// 查询数据的参数
params: {},
// 是否自定义参数
isCustomParams: false,
// 待查询的对象
query: {},
// 等待时间
@@ -76,11 +78,21 @@ export default {
Object.keys(this.params).length !== 0 && Object.keys(this.params).forEach(item => {
if (this.params[item] === null || this.params[item] === '') this.params[item] = undefined
})
return {
page: this.page,
size: this.size,
...this.query,
...this.params
if (this.isCustomParams) {
return {
page: this.page,
size: this.size,
args: {
...this.params
}
}
} else {
return {
page: this.page,
size: this.size,
...this.query,
...this.params
}
}
},
// 改变页码
@@ -73,7 +73,7 @@
<el-pagination
:total="total"
:current-page="page"
:page-size="6"
:page-size="size"
style="margin-top:8px;"
layout="total, prev, pager, next"
@size-change="sizeChange"
@@ -110,7 +110,13 @@ export default {
// 获取数据前设置好接口地址
beforeInit() {
this.url = 'api/quartzJob/searchQuartzLog'
this.size = 6
this.page = 1
this.isCustomParams = true
this.params = {
jobName: this.query.jobName,
createTime: this.query.createTime,
isSuccess: this.query.isSuccess
}
return true
},
// 异常详情