|
|
|
|
@ -29,7 +29,7 @@
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<section class="score-table-wrap" aria-label="模块成绩明细">
|
|
|
|
|
<el-table :data="participatingModules" stripe border class="score-table" empty-text="暂无已发布的实训模块">
|
|
|
|
|
<el-table :data="displayModules" stripe border class="score-table" empty-text="暂无实训模块">
|
|
|
|
|
<el-table-column type="index" label="序号" width="64" align="center" />
|
|
|
|
|
<el-table-column prop="moduleName" label="实训模块" min-width="210" />
|
|
|
|
|
<el-table-column label="成绩占比" width="116" align="center">
|
|
|
|
|
@ -69,7 +69,7 @@
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<section class="module-progress-list" aria-label="模块实训进度列表">
|
|
|
|
|
<article v-for="(module, index) in participatingModules" :key="module.moduleName" class="module-progress-item">
|
|
|
|
|
<article v-for="(module, index) in displayModules" :key="module.moduleName" class="module-progress-item">
|
|
|
|
|
<div class="module-progress-head">
|
|
|
|
|
<span class="module-color" :style="{ backgroundColor: moduleColor(index) }"></span>
|
|
|
|
|
<strong>{{ module.moduleName }}</strong>
|
|
|
|
|
@ -106,9 +106,7 @@ const MODULE_COLORS = ["#6958e7", "#3698ee", "#ffb83e", "#ff6f4a", "#45b982", "#
|
|
|
|
|
let scoreChart;
|
|
|
|
|
let progressChart;
|
|
|
|
|
|
|
|
|
|
const participatingModules = computed(() =>
|
|
|
|
|
(report.value.modules || []).filter((module) => module && module.participating !== false)
|
|
|
|
|
);
|
|
|
|
|
const displayModules = computed(() => report.value.modules || []);
|
|
|
|
|
|
|
|
|
|
const totalStudyMinutes = computed(() =>
|
|
|
|
|
Object.values(studyTime.value || {}).reduce((total, value) => total + (Number(value) || 0), 0)
|
|
|
|
|
@ -139,7 +137,7 @@ const renderScoreChart = () => {
|
|
|
|
|
center: ["34%", "50%"],
|
|
|
|
|
avoidLabelOverlap: true,
|
|
|
|
|
label: { formatter: "{b}" },
|
|
|
|
|
data: participatingModules.value.map((module, index) => ({
|
|
|
|
|
data: displayModules.value.map((module, index) => ({
|
|
|
|
|
name: module.moduleName,
|
|
|
|
|
value: Number(module.score) || 0,
|
|
|
|
|
itemStyle: { color: moduleColor(index) }
|
|
|
|
|
@ -151,7 +149,7 @@ const renderScoreChart = () => {
|
|
|
|
|
const renderProgressChart = () => {
|
|
|
|
|
if (!progressChartRef.value) return;
|
|
|
|
|
progressChart = progressChart || echarts.init(progressChartRef.value);
|
|
|
|
|
const modules = participatingModules.value;
|
|
|
|
|
const modules = displayModules.value;
|
|
|
|
|
progressChart.setOption({
|
|
|
|
|
tooltip: { trigger: "axis", axisPointer: { type: "shadow" } },
|
|
|
|
|
legend: { top: 0, data: ["已完成", "待完成"] },
|
|
|
|
|
|