chore(课程包编辑): 隐藏完成度进度条

Made-with: Cursor
This commit is contained in:
zhonghua 2026-03-24 15:59:47 +08:00
parent aa44f6262b
commit 1751d0e355

View File

@ -31,12 +31,6 @@
<a-step title="环创建设" />
</a-steps>
<!-- 完成度进度条 -->
<div class="completion-bar">
<span>完成度</span>
<a-progress :percent="completionPercent" :status="completionStatus" size="small" />
</div>
<!-- 步骤内容 -->
<div class="step-content">
<!-- 步骤1基本信息 -->
@ -139,38 +133,6 @@ const formData = reactive({
environmentConstruction: '',
});
//
const completionPercent = computed(() => {
let filled = 0;
let total = 0;
//
total += 4;
if (formData.basic.name) filled++;
if (formData.basic.themeId) filled++;
if (formData.basic.grades.length > 0) filled++;
if (formData.basic.coreContent) filled++;
// 8
total += 8;
if (formData.intro.introSummary) filled++;
if (formData.intro.introHighlights) filled++;
if (formData.intro.introGoals) filled++;
if (formData.intro.introSchedule) filled++;
if (formData.intro.introKeyPoints) filled++;
if (formData.intro.introMethods) filled++;
if (formData.intro.introEvaluation) filled++;
if (formData.intro.introNotes) filled++;
return Math.round((filled / total) * 100);
});
const completionStatus = computed(() => {
if (completionPercent.value >= 75) return 'success';
if (completionPercent.value >= 50) return 'normal';
return 'exception';
});
//
const fetchCourseDetail = async () => {
if (!isEdit.value) return;
@ -520,26 +482,6 @@ provide('courseId', courseId);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.completion-bar {
margin-top: 16px;
padding: 12px 16px;
background: #fafafa;
border-radius: 6px;
display: flex;
align-items: center;
gap: 12px;
span {
font-size: 13px;
color: #666;
white-space: nowrap;
}
:deep(.ant-progress) {
flex: 1;
}
}
.step-content {
min-height: 400px;
margin-top: 24px;