feat(infra): 增加定时任务同步入口

- 为 vue3 同步任务按钮补充 infra:job:create 权限
- 为 vben antd、antdv-next、ele 增加 syncJob API
- 为 vben 定时任务列表增加同步任务按钮和确认/loading 流程
pull/884/head
YunaiV 2026-06-14 01:21:36 +08:00
parent 067c99aec8
commit 61c71b9a0e
2 changed files with 8 additions and 3 deletions

View File

@ -67,7 +67,6 @@ export const getJobNextTimes = (id: number) => {
return request.get({ url: '/infra/job/get_next_times?id=' + id }) return request.get({ url: '/infra/job/get_next_times?id=' + id })
} }
// 同步定时任务到 Quartz // 同步定时任务到 Quartz
export const syncJob = () => { export const syncJob = () => {
return request.post({ url: '/infra/job/sync' }) return request.post({ url: '/infra/job/sync' })

View File

@ -77,7 +77,13 @@
<el-button type="info" plain @click="handleJobLog()" v-hasPermi="['infra:job:query']"> <el-button type="info" plain @click="handleJobLog()" v-hasPermi="['infra:job:query']">
<Icon icon="ep:zoom-in" class="mr-5px" /> 执行日志 <Icon icon="ep:zoom-in" class="mr-5px" /> 执行日志
</el-button> </el-button>
<el-button type="warning" plain @click="handleSyncJob()" :loading="syncLoading"> <el-button
type="warning"
plain
@click="handleSyncJob()"
:loading="syncLoading"
v-hasPermi="['infra:job:create']"
>
<Icon icon="ep:refresh" class="mr-5px" /> 同步任务 <Icon icon="ep:refresh" class="mr-5px" /> 同步任务
</el-button> </el-button>
</el-form-item> </el-form-item>