chore(课程包编辑): 隐藏完成度进度条
Made-with: Cursor
This commit is contained in:
parent
aa44f6262b
commit
1751d0e355
@ -31,12 +31,6 @@
|
|||||||
<a-step title="环创建设" />
|
<a-step title="环创建设" />
|
||||||
</a-steps>
|
</a-steps>
|
||||||
|
|
||||||
<!-- 完成度进度条 -->
|
|
||||||
<div class="completion-bar">
|
|
||||||
<span>完成度</span>
|
|
||||||
<a-progress :percent="completionPercent" :status="completionStatus" size="small" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 步骤内容 -->
|
<!-- 步骤内容 -->
|
||||||
<div class="step-content">
|
<div class="step-content">
|
||||||
<!-- 步骤1:基本信息 -->
|
<!-- 步骤1:基本信息 -->
|
||||||
@ -139,38 +133,6 @@ const formData = reactive({
|
|||||||
environmentConstruction: '',
|
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 () => {
|
const fetchCourseDetail = async () => {
|
||||||
if (!isEdit.value) return;
|
if (!isEdit.value) return;
|
||||||
@ -520,26 +482,6 @@ provide('courseId', courseId);
|
|||||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
|
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 {
|
.step-content {
|
||||||
min-height: 400px;
|
min-height: 400px;
|
||||||
margin-top: 24px;
|
margin-top: 24px;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user