This commit is contained in:
2025-09-22 17:21:08 +08:00
parent 3a250e8d73
commit 0bc7cf2f66
2 changed files with 7 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
<template> <template>
<div class="plan-content-editor"> <div class="plan-detail">
<div v-if="loading" class="loading"> <div v-if="loading" class="loading">
<el-skeleton animated /> <el-skeleton animated />
</div> </div>
@@ -45,7 +45,7 @@
<h4>子计划列表</h4> <h4>子计划列表</h4>
<div v-for="subPlan in sortedContent" :key="subPlan.id" class="sub-plan-container"> <div v-for="subPlan in sortedContent" :key="subPlan.id" class="sub-plan-container">
<!-- 递归使用组件 --> <!-- 递归使用组件 -->
<plan-content-editor :plan-id="subPlan.id" /> <plan-detail :plan-id="subPlan.id" />
</div> </div>
</div> </div>
<div v-else> <div v-else>
@@ -63,7 +63,7 @@
import apiClient from '../api/index.js'; import apiClient from '../api/index.js';
export default { export default {
name: 'PlanContentEditor', // name name: 'PlanDetail', // name
props: { props: {
planId: { planId: {
type: [Number, String], type: [Number, String],
@@ -129,7 +129,7 @@ export default {
</script> </script>
<style scoped> <style scoped>
.plan-content-editor { .plan-detail {
margin-top: 10px; margin-top: 10px;
} }
.loading, .error { .loading, .error {

View File

@@ -95,7 +95,7 @@
width="70%" width="70%"
top="5vh" top="5vh"
> >
<plan-content-editor <plan-detail
v-if="detailsVisible" v-if="detailsVisible"
:plan-id="selectedPlanIdForDetails" :plan-id="selectedPlanIdForDetails"
/> />
@@ -113,14 +113,14 @@
import { Refresh } from '@element-plus/icons-vue'; import { Refresh } from '@element-plus/icons-vue';
import apiClient from '../api/index.js'; import apiClient from '../api/index.js';
import PlanForm from './PlanForm.vue'; import PlanForm from './PlanForm.vue';
import PlanContentEditor from './PlanContentEditor.vue'; // 导入新组件 import PlanDetail from './PlanDetail.vue'; // 导入新组件
import cronParser from 'cron-parser'; import cronParser from 'cron-parser';
export default { export default {
name: 'PlanList', name: 'PlanList',
components: { components: {
PlanForm, PlanForm,
PlanContentEditor, // 注册新组件 PlanDetail, // 注册新组件
Refresh Refresh
}, },
data() { data() {