增加编辑任务按钮

This commit is contained in:
2025-09-22 17:00:30 +08:00
parent 35152ea3fe
commit 932c88ea75

View File

@@ -62,9 +62,10 @@
{{ formatNextExecutionTime(scope.row.cron_expression) }} {{ formatNextExecutionTime(scope.row.cron_expression) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="200"> <el-table-column label="操作" width="300">
<template #default="scope"> <template #default="scope">
<el-button size="small" @click="editPlan(scope.row)">编辑</el-button> <el-button size="small" @click="editPlan(scope.row)">编辑计划</el-button>
<el-button size="small" @click="editTask(scope.row)">编辑任务</el-button>
<el-button v-if="scope.row.status === 1" size="small" type="warning" @click="stopPlan(scope.row)" :loading="stoppingPlanId === scope.row.id"> <el-button v-if="scope.row.status === 1" size="small" type="warning" @click="stopPlan(scope.row)" :loading="stoppingPlanId === scope.row.id">
停止 停止
</el-button> </el-button>
@@ -212,6 +213,12 @@ export default {
this.isEdit = false; this.isEdit = false;
this.dialogVisible = true; this.dialogVisible = true;
}, },
editTask(plan) {
// TODO: Implement task editing logic
console.log("Editing task for plan:", plan);
this.$message.info('该功能正在开发中');
},
editPlan(plan) { editPlan(plan) {
this.currentPlan = { ...plan }; this.currentPlan = { ...plan };