This commit is contained in:
2025-10-20 14:55:34 +08:00
parent 96c36f9ce1
commit a3e9465b88

View File

@@ -265,7 +265,7 @@ export default {
this.loading = true; this.loading = true;
this.error = null; this.error = null;
try { try {
const response = await apiClient.plans.get(this.planId); const response = await apiClient.plans.getPlanById(this.planId);
this.plan = { this.plan = {
...response.data, ...response.data,
sub_plans: response.data.sub_plans || [], sub_plans: response.data.sub_plans || [],
@@ -320,7 +320,7 @@ export default {
delete submitData.status; delete submitData.status;
console.log("PlanDetail: Submitting data", submitData); console.log("PlanDetail: Submitting data", submitData);
await apiClient.plans.update(this.planId, submitData); await apiClient.plans.updatePlan(this.planId, submitData);
ElMessage.success('计划内容已保存'); ElMessage.success('计划内容已保存');
this.isEditingContent = false; this.isEditingContent = false;
this.fetchPlan(); this.fetchPlan();
@@ -355,7 +355,7 @@ export default {
}, },
async fetchAvailablePlans() { async fetchAvailablePlans() {
try { try {
const response = await apiClient.plans.list(); const response = await apiClient.plans.getPlans(); // 更正此处
this.availablePlans = response.data.plans.filter(p => this.availablePlans = response.data.plans.filter(p =>
p.id !== this.planId p.id !== this.planId
); );