改样式

This commit is contained in:
2025-09-22 17:16:05 +08:00
parent a67f55d7c8
commit 3a250e8d73
2 changed files with 19 additions and 15 deletions

View File

@@ -18,7 +18,7 @@
<template #header>
<div class="card-header">
<span>{{ plan.name }} - 内容</span>
<el-button class="button" text>操作按钮</el-button>
<el-button class="button" @click="handleEdit">编辑</el-button>
</div>
</template>
<div v-if="plan.content_type === 'tasks'">
@@ -112,6 +112,10 @@ export default {
this.loading = false;
}
},
handleEdit() {
// Placeholder for future implementation
this.$message.info('编辑功能正在开发中');
},
editTask(task) {
console.log('编辑任务:', task);
this.$message.info('编辑任务功能正在开发中');

View File

@@ -62,10 +62,10 @@
{{ formatNextExecutionTime(scope.row.cron_expression) }}
</template>
</el-table-column>
<el-table-column label="操作" width="300">
<el-table-column label="操作" width="280">
<template #default="scope">
<el-button size="small" @click="editPlan(scope.row)">编辑计划</el-button>
<el-button size="small" @click="editTask(scope.row)">编辑任务</el-button>
<el-button size="small" @click="editPlan(scope.row)">编辑</el-button>
<el-button size="small" @click="showDetails(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>
@@ -88,20 +88,20 @@
@cancel="handlePlanCancel"
/>
<!-- 任务/子计划编辑器 -->
<!-- 计划详情 -->
<el-dialog
v-model="taskEditorVisible"
title="编辑计划内容"
v-model="detailsVisible"
title="计划详情"
width="70%"
top="5vh"
>
<plan-content-editor
v-if="taskEditorVisible"
:plan-id="selectedPlanIdForTasks"
v-if="detailsVisible"
:plan-id="selectedPlanIdForDetails"
/>
<template #footer>
<span class="dialog-footer">
<el-button @click="taskEditorVisible = false">关闭</el-button>
<el-button @click="detailsVisible = false">关闭</el-button>
</span>
</template>
</el-dialog>
@@ -128,7 +128,7 @@ export default {
plans: [],
originalPlans: [], // Store the original unsorted list
dialogVisible: false,
taskEditorVisible: false, // 控制任务编辑器对话框
detailsVisible: false, // 控制详情对话框
isEdit: false,
loading: false,
error: null,
@@ -140,7 +140,7 @@ export default {
execute_num: 0,
cron_expression: ''
},
selectedPlanIdForTasks: null, // 当前要编辑任务的计划ID
selectedPlanIdForDetails: null, // 当前要查看详情的计划ID
startingPlanId: null,
stoppingPlanId: null
};
@@ -237,9 +237,9 @@ export default {
this.dialogVisible = true;
},
editTask(plan) {
this.selectedPlanIdForTasks = plan.id;
this.taskEditorVisible = true;
showDetails(plan) {
this.selectedPlanIdForDetails = plan.id;
this.detailsVisible = true;
},
editPlan(plan) {