From a67f55d7c86ca710166b2d3692f0ab029ea80391 Mon Sep 17 00:00:00 2001
From: huang <1724659546@qq.com>
Date: Mon, 22 Sep 2025 17:10:21 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BC=96=E8=BE=91=E4=BB=BB?=
=?UTF-8?q?=E5=8A=A1=E7=95=8C=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/PlanContentEditor.vue | 147 +++++++++++++++++++++++++++
src/components/PlanList.vue | 30 +++++-
2 files changed, 173 insertions(+), 4 deletions(-)
create mode 100644 src/components/PlanContentEditor.vue
diff --git a/src/components/PlanContentEditor.vue b/src/components/PlanContentEditor.vue
new file mode 100644
index 00000000..2b9e5d43
--- /dev/null
+++ b/src/components/PlanContentEditor.vue
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+ 重新加载
+
+
+
+
+
+
+
+
任务列表
+
+
+
+ {{ task.name }}
+ {{ task.description }}
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/PlanList.vue b/src/components/PlanList.vue
index 2a668331..8e24d956 100644
--- a/src/components/PlanList.vue
+++ b/src/components/PlanList.vue
@@ -79,7 +79,7 @@
-
+
+
+
+
+
+
+
+
+
+
@@ -94,12 +113,14 @@
import { Refresh } from '@element-plus/icons-vue';
import apiClient from '../api/index.js';
import PlanForm from './PlanForm.vue';
+import PlanContentEditor from './PlanContentEditor.vue'; // 导入新组件
import cronParser from 'cron-parser';
export default {
name: 'PlanList',
components: {
PlanForm,
+ PlanContentEditor, // 注册新组件
Refresh
},
data() {
@@ -107,6 +128,7 @@ export default {
plans: [],
originalPlans: [], // Store the original unsorted list
dialogVisible: false,
+ taskEditorVisible: false, // 控制任务编辑器对话框
isEdit: false,
loading: false,
error: null,
@@ -118,6 +140,7 @@ export default {
execute_num: 0,
cron_expression: ''
},
+ selectedPlanIdForTasks: null, // 当前要编辑任务的计划ID
startingPlanId: null,
stoppingPlanId: null
};
@@ -215,9 +238,8 @@ export default {
},
editTask(plan) {
- // TODO: Implement task editing logic
- console.log("Editing task for plan:", plan);
- this.$message.info('该功能正在开发中');
+ this.selectedPlanIdForTasks = plan.id;
+ this.taskEditorVisible = true;
},
editPlan(plan) {