mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-10-16 22:51:14 +00:00
feat(任务调度): 添加立即执行定时任务功能
refactor(前端): 统一调整表格高度为500px style(前端): 优化用户管理页面布局 fix(前端): 修复验证码未开启时的登录验证规则 perf(任务调度): 优化任务状态更新逻辑 fix(后端): 修复字符类型映射问题 docs(后端): 更新数据库配置为MySQL feat(登录): 添加登录/登出成功通知
This commit is contained in:
@@ -20,8 +20,8 @@
|
||||
clearable
|
||||
style="width: 167.5px"
|
||||
>
|
||||
<el-option value="true" label="运行中" />
|
||||
<el-option value="false" label="暂停" />
|
||||
<el-option value="0" label="运行中" />
|
||||
<el-option value="1" label="暂停" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 时间范围,收起状态下隐藏 -->
|
||||
@@ -167,8 +167,8 @@
|
||||
:data="pageTableData"
|
||||
class="data-table__content"
|
||||
highlight-current-row
|
||||
height="450"
|
||||
max-height="450px"
|
||||
height="500"
|
||||
max-height="500"
|
||||
border
|
||||
stripe
|
||||
@selection-change="handleSelectionChange"
|
||||
@@ -218,7 +218,7 @@
|
||||
<el-table-column label="状态" prop="status" min-width="100">
|
||||
<template #default="scope">
|
||||
<el-tag :type="scope.row.status === '0' ? 'success' : 'danger'">
|
||||
{{ scope.row.status === true ? "运行中" : "暂停" }}
|
||||
{{ scope.row.status === "0" ? "运行中" : "暂停" }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -238,6 +238,16 @@
|
||||
>
|
||||
日志
|
||||
</el-button>
|
||||
<el-button
|
||||
v-hasPerm="['module_application:job:update']"
|
||||
type="primary"
|
||||
size="small"
|
||||
link
|
||||
icon="smoking"
|
||||
@click="handleRunJob(scope.row.id)"
|
||||
>
|
||||
立即执行
|
||||
</el-button>
|
||||
<el-button
|
||||
type="info"
|
||||
size="small"
|
||||
@@ -272,14 +282,14 @@
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item
|
||||
:disabled="scope.row.status === false"
|
||||
:disabled="scope.row.status === '1'"
|
||||
icon="Check"
|
||||
@click="handleOption(scope.row.id, 1)"
|
||||
>
|
||||
暂停
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
:disabled="scope.row.status === true"
|
||||
:disabled="scope.row.status === '0'"
|
||||
icon="CircleClose"
|
||||
@click="handleOption(scope.row.id, 2)"
|
||||
>
|
||||
@@ -363,8 +373,8 @@
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="状态" :span="2">
|
||||
<el-tag :type="detailFormData.status ? 'success' : 'danger'">
|
||||
{{ detailFormData.status ? "运行中" : "暂停" }}
|
||||
<el-tag :type="detailFormData.status === '0' ? 'success' : 'danger'">
|
||||
{{ detailFormData.status === "0" ? "运行中" : "暂停" }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="最大实例数" :span="2">
|
||||
@@ -541,7 +551,7 @@
|
||||
</template>
|
||||
<vue3CronPlus
|
||||
i18n="cn"
|
||||
max-height="500px"
|
||||
max-height="500"
|
||||
@change="handlechangeCron"
|
||||
@close="openCron = false"
|
||||
/>
|
||||
@@ -961,6 +971,13 @@ function handleOpenLogDrawer(jobId: number, jobName: string) {
|
||||
drawerVisible.value = true;
|
||||
}
|
||||
|
||||
// 立即执行定时任务
|
||||
const handleRunJob = (id: number) => {
|
||||
JobAPI.runJob(id).then(() => {
|
||||
loadingData();
|
||||
});
|
||||
};
|
||||
|
||||
// 导出字段
|
||||
const exportColumns = [
|
||||
{ prop: "name", label: "任务名称" },
|
||||
|
||||
Reference in New Issue
Block a user