merge: improve student report header contrast

bugfix/ai-assessment-evidence-rescore
陈沅 1 month ago
commit cbab3d95be

@ -1,6 +1,6 @@
<template>
<div class="test-report app-container">
<h2>实验报告</h2>
<h2 class="report-title">实验报告</h2>
<el-row class="student-info"><el-col :span="6">姓名:{{ userInfo.name }}</el-col><el-col :span="6">学号:{{ userInfo.username }}</el-col><el-col :span="8">班级:{{ report.teachingClassName || userInfo.className }}</el-col></el-row>
<el-card><template #header><span>实训总成绩:{{ report.totalScore || 0 }} 分</span><span class="rank">班级排名:{{ report.rank || '-' }}</span></template>
<el-table :data="report.modules || []" border><el-table-column prop="moduleName" label="实训模块"/><el-table-column label="权重"><template #default="{row}">{{ percent(row.weight) }}</template></el-table-column><el-table-column prop="score" label="模块成绩"/><el-table-column label="任务完成"><template #default="{row}">{{ row.completedTaskCount }} / {{ row.totalTaskCount }}</template></el-table-column></el-table>
@ -17,4 +17,9 @@ const userInfo=useUserStore().userInfo; const report=ref({modules:[],tasks:[]});
const percent=(weight)=>weight==null?'-':`${Number(weight)*100}%`;
onMounted(async()=>{const res=await getCurrentExperimentReport(); report.value=res?.data||{modules:[],tasks:[]};});
</script>
<style lang="scss" scoped>.student-info{margin:20px 0}.rank{margin-left:24px}.tasks{margin-top:20px}</style>
<style lang="scss" scoped>
.report-title { margin: 0; color: #fff; font-size: 26px; text-shadow: 0 2px 8px rgba(0, 88, 166, 0.55); }
.student-info { margin: 20px 0; color: #d9ecff; }
.rank { margin-left: 24px; }
.tasks { margin-top: 20px; }
</style>

@ -0,0 +1,10 @@
const assert = require("assert");
const fs = require("fs");
const path = require("path");
const page = fs.readFileSync(path.resolve(__dirname, "../src/views/test-report/index.vue"), "utf8");
assert(/<h2 class="report-title">实验报告<\/h2>/.test(page));
assert(/\.report-title\s*\{[^}]*color:\s*#fff/.test(page));
console.log("student experiment report title contrast static checks passed");
Loading…
Cancel
Save