feat: show new training modules on student home

dev-QQq
chenyuan 4 weeks ago
parent 2a8610b8da
commit 24ba0d069c

@ -1,692 +1,350 @@
<!--
* @Author: qinzhenpen qzp1807@126.com
* @Date: 2025-03-03 14:13:35
* @LastEditors: qinzhenpen qzp1807@126.com
* @LastEditTime: 2025-05-16 17:43:18
* @FilePath: \financial-big-data\src\components\Ai\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template> <template>
<div class="index app-container"> <div class="student-home app-container">
<el-card> <el-alert
v-if="loadError"
class="load-error"
type="error"
:title="loadError"
:closable="false"
show-icon
/>
<el-card class="dashboard-card score-card" v-loading="loading">
<template #header> <template #header>
<div class="card-header"> <div class="card-header">
<span>我的成绩</span> <span>我的实训成绩</span>
<small>按当前教学班发布的实训模块统计</small>
</div> </div>
</template> </template>
<div class="Achievement Achievement1">
<div class="left"> <div v-if="!loadError" class="score-layout">
<div> <section class="score-visual" aria-label="">
<div class="AchievementChart" ref="AchievementChartRefs" style="width: 40rem; min-width: none; min-height: 300px"></div> <div ref="scoreChartRef" class="score-chart"></div>
</div> <div class="score-summary">
<div class="gradeDetails"> <span class="summary-label">综合成绩</span>
<div class="detalis-item"> <strong>{{ formatScore(report.totalScore) }}</strong>
<!-- <img src="../assets/images/旗帜.webp" alt="" /> --> <span class="summary-unit"></span>
<label>成绩</label> <span class="rank-copy">当前排名--</span>
<span>{{ scoreInfo.totalScore || 0 }}</span>
</div>
<div class="detalis-item">
<!-- <img src="../assets/images/旗帜.webp" alt="" /> -->
<label>排名</label>
<span>{{ scoreInfo.stuRank || "--" }}</span>
</div>
</div> </div>
</div> </section>
<div class="right">
<el-table :data="tableData" stripe border style="width: 45rem"> <section class="score-table-wrap" aria-label="">
<el-table-column type="index" label="序号" align="center" /> <el-table :data="participatingModules" stripe border class="score-table" empty-text="">
<el-table-column prop="model" label="项目" align="center" /> <el-table-column type="index" label="序号" width="64" align="center" />
<el-table-column prop="scoce" label="成绩占比" align="center"> <el-table-column prop="moduleName" label="实训模块" min-width="210" />
<template #default="scope">{{ scope.row.scoce }}%</template> <el-table-column label="成绩占比" width="116" align="center">
<template #default="scope">{{ formatWeight(scope.row.weight) }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="address" label="成绩" align="center"> <el-table-column label="模块得分" width="110" align="center">
<template #default="scope"> <template #default="scope">{{ formatScore(scope.row.score) }}</template>
{{ scope.row.address || 0 }} </el-table-column>
</template> <el-table-column label="完成进度" width="138" align="center">
<template #default="scope">{{ progressText(scope.row) }}</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </section>
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px">
<el-card class="dashboard-card progress-card" v-loading="loading">
<template #header> <template #header>
<div class="card-header"> <div class="card-header">
<span>我的成绩</span> <span>实训进度概览</span>
<small>完成任务越多模块进度越靠前</small>
</div> </div>
</template> </template>
<div class="Achievement">
<div class="left"> <div v-if="!loadError" class="progress-layout">
<div class="chartMain"> <section class="learning-time" aria-label="">
<div id="echart3" style="width: 45vw; height: 36.14vh"></div> <div class="time-orbit">
<div class="time-value">{{ studyHours }}</div>
<div class="time-unit">HRS</div>
</div> </div>
</div> <strong>有效学习时间</strong>
<div class="right"> <span>累计投入 {{ totalStudyMinutes }} 分钟</span>
<div class="timeContent"> </section>
<div class="activeTime">
<div class="ring"> <section class="progress-chart-wrap" aria-label="">
<div class="ringIn"> <div ref="progressChartRef" class="progress-chart"></div>
<div class="ringText"> </section>
<div style="text-align: center; padding-top: 15px">
<div> <section class="module-progress-list" aria-label="">
{{ totalTime || "0" }} <article v-for="(module, index) in participatingModules" :key="module.moduleName" class="module-progress-item">
</div> <div class="module-progress-head">
<div class="line"></div> <span class="module-color" :style="{ backgroundColor: moduleColor(index) }"></span>
<div>HRS</div> <strong>{{ module.moduleName }}</strong>
</div> <span>{{ progressText(module) }}</span>
</div>
</div>
</div>
<div class="profile">
<div class="num"></div>
<div class="text">有效时间</div>
<div class="text">有效学习时间的投入概况</div>
</div>
</div>
<div class="detail">
<div id="echart2" style="width: 11.979vw; height: 21.296vh"></div>
<div class="timeList">
<div class="listItem">
<img src="@/assets/images/x1.png" alt="" />
<span>市场需求挖掘</span>
<span>{{ statistic.marketResearchTime || "0" }}分钟</span>
</div>
<div class="listItem">
<img src="@/assets/images/x2.png" alt="" />
<span>产品规划</span>
<span>{{ statistic.productPlanningTime || "0" }}分钟</span>
</div>
<div class="listItem">
<img src="@/assets/images/x3.png" alt="" />
<span>产品投放测试</span>
<span>{{ statistic.productLaunchTestTime || "0" }}分钟</span>
</div>
<div class="listItem">
<img src="@/assets/images/x4.png" alt="" />
<span>供应渠道管理</span>
<span>{{ statistic.supplyChannelTime || "0" }}分钟</span>
</div>
<div class="listItem">
<img src="@/assets/images/x5.png" alt="" />
<span>产品评估与考核</span>
<span>{{ statistic.productEvaluationTime || "0" }} 分钟</span>
</div>
</div>
</div> </div>
</div> <el-progress
</div> :percentage="progressPercent(module)"
:stroke-width="8"
:show-text="false"
:color="moduleColor(index)"
/>
</article>
</section>
</div> </div>
</el-card> </el-card>
</div> </div>
</template> </template>
<script setup> <script setup>
import useUserStore from "@/store/modules/user";
const userStore = useUserStore();
import * as echarts from "echarts"; import * as echarts from "echarts";
import useUserStore from "@/store/modules/user";
import * as indexApi from "@/api/index"; import * as indexApi from "@/api/index";
const AchievementChartRefs = ref(null);
const statistic = ref({}); const userStore = useUserStore();
const currentTeachingClassId = ref(""); const scoreChartRef = ref(null);
const scoreTrend = ref([ const progressChartRef = ref(null);
{ const report = ref({ totalScore: 0, modules: [] });
title: "我", const studyTime = ref({});
scores: [0, 0, 0, 0, 0], const loading = ref(true);
times: ["2025-05-09", "2025-05-10", "2025-05-11", "2025-05-12", "2025-05-13"], const loadError = ref("");
},
{ const MODULE_COLORS = ["#6958e7", "#3698ee", "#ffb83e", "#ff6f4a", "#45b982", "#39b8ce"];
title: "第一名",
scores: [0, 0, 0, 0, 0], let scoreChart;
times: ["2025-05-09", "2025-05-10", "2025-05-11", "2025-05-12", "2025-05-13"], let progressChart;
},
{ const participatingModules = computed(() =>
title: "最后一名", (report.value.modules || []).filter((module) => module && module.participating !== false)
scores: [0, 0, 0, 0, 0], );
times: ["2025-05-09", "2025-05-10", "2025-05-11", "2025-05-12", "2025-05-13"],
}, const totalStudyMinutes = computed(() =>
]); Object.values(studyTime.value || {}).reduce((total, value) => total + (Number(value) || 0), 0)
const list = ref([]); );
const tableData = ref([
{ const studyHours = computed(() => (totalStudyMinutes.value / 60).toFixed(1));
date: "2016-05-03",
model: "市场需求挖掘", const formatScore = (value) => Number(value || 0).toFixed(2).replace(/\.00$/, "");
address: "20", const formatWeight = (weight) => `${(Number(weight || 0) * 100).toFixed(0)}%`;
scoce: "20", const moduleColor = (index) => MODULE_COLORS[index % MODULE_COLORS.length];
key: "oneScore", const progressPercent = (module) => {
key1: "oneWeight", const total = Number(module.totalTaskCount) || 0;
}, const completed = Number(module.completedTaskCount) || 0;
{ return total > 0 ? Math.min(100, Math.round((completed / total) * 100)) : 0;
date: "2016-05-02",
model: "产品规划",
address: "20",
scoce: "20",
key: "twoScore",
key1: "twoWeight",
},
{
date: "2016-05-04",
model: "产品投放测试",
scoce: "20",
address: "20",
key: "threeScore",
key1: "threeWeight",
},
{
date: "2016-05-01",
model: "供应渠道管理",
address: "20",
scoce: "20",
key: "fourScore",
key1: "fourWeight",
},
{
date: "2016-05-01",
model: "产品评估与考核",
address: "20",
scoce: "15",
key: "fiveScore",
key1: "fiveWeight",
},
]);
const corList = ["#795ef3", "#419af2", "#f7b844", "red", "pink"];
const scoreInfo = ref({});
const timeKey = ref({
marketResearchTime: 0,
productPlanningTime: 0,
productLaunchTestTime: 0,
supplyChannelTime: 0,
productEvaluationTime: 0,
});
//
const totalTime = computed(() => {
let time = 0;
for (let key in timeKey.value) {
time += timeKey.value[key];
}
return time;
});
const getgrade = () => {
let myChart = echarts.init(AchievementChartRefs.value);
let option;
option = {
legend: {
orient: "vertical",
right: 30,
top: "40%",
bottom: 20,
},
series: [
{
name: "Access From",
type: "pie",
radius: "80%",
center: ["35%", "50%"],
data: list.value,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: "rgba(0, 0, 0, 0.5)",
},
},
},
],
};
option && myChart.setOption(option);
//
const handleResize = () => {
myChart.resize();
};
window.addEventListener("resize", handleResize);
// Vue 3
onUnmounted(() => {
window.removeEventListener("resize", handleResize);
myChart.dispose(); //
});
}; };
const echart3Init = () => { const progressText = (module) => `${Number(module.completedTaskCount) || 0}/${Number(module.totalTaskCount) || 0}`;
var chartDom = document.getElementById("echart3");
var myChart = echarts.init(chartDom);
console.log(userStore.userInfo, "userStore.userInfo");
var option;
option = {
// title: {
// text: "Stacked Area Chart"
// },
tooltip: {
trigger: "axis",
axisPointer: {
type: "cross",
label: {
backgroundColor: "#6a7985",
},
},
},
legend: {
data: ["第一名", "我的成绩", "最后一名"],
top: 10,
},
grid: { const renderScoreChart = () => {
left: "3%", if (!scoreChartRef.value) return;
right: "4%", scoreChart = scoreChart || echarts.init(scoreChartRef.value);
bottom: "3%", scoreChart.setOption({
containLabel: true, tooltip: { trigger: "item", valueFormatter: (value) => `${formatScore(value)}` },
}, legend: { orient: "vertical", right: 8, top: "middle", itemWidth: 12, itemHeight: 12 },
xAxis: [ series: [{
{ name: "模块得分",
type: "category", type: "pie",
boundaryGap: false, radius: ["42%", "72%"],
data: scoreTrend.value[0].times, center: ["34%", "50%"],
// data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] avoidLabelOverlap: true,
}, label: { formatter: "{b}" },
], data: participatingModules.value.map((module, index) => ({
yAxis: [ name: module.moduleName,
{ value: Number(module.score) || 0,
type: "value", itemStyle: { color: moduleColor(index) }
}, }))
], }]
series: [ }, true);
{
name: "最后一名",
type: "line",
// stack: "Total",
areaStyle: {
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgba(66,209,216,0.6)", // 0%
},
{
offset: 1,
color: "rgba(255,255,255,0)", // 100%
},
],
global: false, // false
},
},
lineStyle: {
color: "#42D1D8",
},
itemStyle: {
color: "#42D1D8",
},
emphasis: {
focus: "series",
},
data: scoreTrend.value[2].scores,
// data: [120, 132, 101, 134, 90, 230, 210]
},
{
name: "我的成绩",
type: "line",
// stack: "Total",
areaStyle: {
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgba(133,64,251,0.6)", // 0%
},
{
offset: 1,
color: "rgba(255,255,255,0)", // 100%
},
],
global: false, // false
},
},
lineStyle: {
color: "#8540FB",
},
itemStyle: {
color: "#8540FB",
},
emphasis: {
focus: "series",
},
data: scoreTrend.value[0].scores,
// data: [220, 182, 191, 234, 290, 330, 310]
},
{
name: "第一名",
type: "line",
// stack: "Total",
areaStyle: {
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgba(255,185,0,0.6)", // 0%
},
{
offset: 1,
color: "rgba(255,255,255,0)", // 100%
},
],
global: false, // false
},
},
lineStyle: {
color: "#FFB900",
},
itemStyle: {
color: "#FFB900",
},
emphasis: {
focus: "series",
},
data: scoreTrend.value[1].scores,
// data: [220, 182, 191, 234, 290, 330, 310]
},
],
};
option && myChart.setOption(option);
//
const handleResize = () => {
myChart.resize();
};
window.addEventListener("resize", handleResize);
// Vue 3
onUnmounted(() => {
window.removeEventListener("resize", handleResize);
myChart.dispose(); //
});
}; };
const echart2Init = () => {
var chartDom = document.getElementById("echart2"); const renderProgressChart = () => {
var myChart = echarts.init(chartDom); if (!progressChartRef.value) return;
var option; progressChart = progressChart || echarts.init(progressChartRef.value);
option = { const modules = participatingModules.value;
title: { progressChart.setOption({
text: "时间占比", tooltip: { trigger: "axis", axisPointer: { type: "shadow" } },
left: "center", legend: { top: 0, data: ["已完成", "待完成"] },
top: "center", grid: { left: 24, right: 24, top: 40, bottom: 22, containLabel: true },
textStyle: { xAxis: { type: "value", minInterval: 1 },
fontSize: 14, yAxis: {
fontWeight: "normal", type: "category",
}, inverse: true,
}, axisLabel: { width: 132, overflow: "truncate" },
tooltip: { data: modules.map((module) => module.moduleName)
trigger: "item",
},
legend: {
top: "5%",
left: "center",
show: false,
}, },
series: [ series: [
{ {
name: "时间占比", name: "已完成",
type: "pie", type: "bar",
radius: ["40%", "70%"], stack: "tasks",
avoidLabelOverlap: false, barMaxWidth: 18,
label: { itemStyle: { color: "#3e9cf4", borderRadius: [9, 0, 0, 9] },
show: false, data: modules.map((module) => Number(module.completedTaskCount) || 0)
position: "center",
},
emphasis: {
// label: {
// show: true,
// formatter: ''
// // fontSize: 40,
// // fontWeight: "bold"
// }
},
labelLine: {
show: false,
},
data: [
{ value: 0, name: "收益与风险" },
{ value: 0, name: "现值和价值评估" },
{ value: 0, name: "投资决策" },
{ value: 0, name: "融资决策" },
{ value: 0, name: "营运资本管理" },
{ value: 0, name: "财务分析及估值" },
{ value: 0, name: "财务预警及风险管理" },
],
}, },
], {
}; name: "待完成",
option && myChart.setOption(option); type: "bar",
}; stack: "tasks",
const loadCurrentTeachingClassId = async () => { barMaxWidth: 18,
const res = await indexApi.getCurrentTeachingClass({ userId: userStore.userInfo.userId }); itemStyle: { color: "#e8eef8", borderRadius: [0, 9, 9, 0] },
currentTeachingClassId.value = res?.data?.schoolClassId || ""; data: modules.map((module) => Math.max(0, (Number(module.totalTaskCount) || 0) - (Number(module.completedTaskCount) || 0)))
return currentTeachingClassId.value; }
]
}, true);
}; };
const getScoreTrend = async () => {
const classId = currentTeachingClassId.value || (await loadCurrentTeachingClassId()); const renderCharts = () => {
if (!classId) return; renderScoreChart();
indexApi renderProgressChart();
.getRouters({
userId: userStore.userInfo.userId,
classId,
schoolId: userStore.userInfo.schoolId,
})
.then((res) => {
if(!res.data) return;
scoreTrend.value = res.data;
echart3Init();
});
}; };
//
const getwight = async () => { const resizeCharts = () => {
const classId = currentTeachingClassId.value || (await loadCurrentTeachingClassId()); scoreChart?.resize();
if (!classId) return; progressChart?.resize();
indexApi
.getStuWeightScore({
userId: userStore.userInfo.userId,
classId,
schoolId: userStore.userInfo.schoolId,
})
.then((res) => {
if (!res.data) return;
scoreInfo.value = res.data ;
tableData.value.forEach((item) => {
item.scoce = res.data[item.key1] * 100;
item.address = res.data[item.key];
});
list.value = tableData.value.map((item, index) => ({
name: item.model,
value: [item.address],
itemStyle: { color: corList[index] },
}));
console.log(list.value, "list");
getgrade();
});
}; };
//
const getStudyTime = () => { const loadDashboard = async () => {
indexApi loading.value = true;
.getStudyTime({ loadError.value = "";
userId: userStore.userInfo.userId, const [reportResult, timeResult] = await Promise.allSettled([
}) indexApi.getCurrentExperimentReport(),
.then((res) => { indexApi.getStudyTime({ userId: userStore.userInfo.userId })
if (!res.data) return; ]);
statistic.value = res.data;
Object.keys(res.data).forEach((key) => { if (reportResult.status !== "fulfilled") {
if (key in timeKey.value) { loadError.value = "新版实训报告加载失败,请刷新页面后重试。";
timeKey.value[key] = res.data[key]; loading.value = false;
} return;
}); }
});
report.value = reportResult.value?.data || { totalScore: 0, modules: [] };
studyTime.value = timeResult.status === "fulfilled" ? (timeResult.value?.data || {}) : {};
loading.value = false;
await nextTick();
renderCharts();
}; };
onMounted(() => { onMounted(() => {
getwight(); window.addEventListener("resize", resizeCharts);
getScoreTrend(); loadDashboard();
getStudyTime(); });
echart2Init();
console.log(userStore.userInfo, "54455445"); onBeforeUnmount(() => {
window.removeEventListener("resize", resizeCharts);
scoreChart?.dispose();
progressChart?.dispose();
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.app-container { .student-home {
background: #fff; min-height: calc(100vh - 70px);
background: #f5f8fd;
padding: 20px;
} }
.index {
height: calc(100vh - 70px); .load-error { margin-bottom: 14px; }
// padding: 20px 40px;
.Achievement { .dashboard-card {
display: flex; margin-bottom: 16px;
.left { border: 0;
display: flex; box-shadow: 0 10px 30px rgba(37, 77, 135, 0.08);
flex: 1;
.AchievementChart { :deep(.el-card__header) { padding: 17px 20px; }
border-right: 2px dashed #e4e7ed; }
}
.gradeDetails { .card-header {
padding-left: 20px; display: flex;
.detalis-item { align-items: baseline;
label { justify-content: space-between;
display: inline-block; gap: 12px;
width: 3rem !important;
margin-left: 0.8rem; span { color: #1d2b4a; font-size: 18px; font-weight: 700; }
} small { color: #8a98af; font-size: 13px; }
span { }
font-family: Source Han Sans CN;
font-weight: 400; .score-layout { display: grid; grid-template-columns: minmax(400px, 0.9fr) minmax(540px, 1.3fr); min-height: 330px; }
color: #3c38b8;
} .score-visual {
margin-bottom: 1rem; position: relative;
} display: flex;
} min-width: 0;
} border-right: 1px dashed #d8e2f1;
.right { }
padding-top: 20px;
// float: right; .score-chart { width: 100%; min-height: 330px; }
.timeContent {
display: flex; .score-summary {
align-items: center; position: absolute;
.detail { left: 28px;
display: flex; top: 26px;
align-items: center; display: flex;
margin-top: 15px; flex-direction: column;
height: 31vh; color: #72809a;
border-radius: 10px;
border: 1px solid #3c38b8; strong { color: #5645d5; font-size: 34px; line-height: 1.1; }
margin-left: 10px; .summary-unit { color: #5645d5; font-weight: 600; }
padding: 10px; .rank-copy { margin-top: 18px; font-size: 13px; }
.listItem { }
width: 13vw;
display: flex; .summary-label { margin-bottom: 4px; font-size: 13px; }
align-items: center; .score-table-wrap { display: flex; align-items: center; min-width: 0; padding: 8px 0 8px 24px; }
margin-right: 30px; .score-table { width: 100%; }
position: relative;
span { .progress-layout { display: grid; grid-template-columns: 190px minmax(370px, 1fr) minmax(320px, 0.9fr); gap: 24px; align-items: stretch; }
margin-top: -10px;
} .learning-time {
span:nth-of-type(2) { display: flex;
position: absolute; flex-direction: column;
right: 0; align-items: center;
color: #3c38b8; justify-content: center;
font-weight: bold; min-height: 270px;
font-size: 16px; color: #fff;
} border-radius: 14px;
} background: linear-gradient(150deg, #5fa9fa 0%, #387ee2 100%);
} box-shadow: 0 14px 24px rgba(57, 126, 226, 0.24);
}
.activeTime { strong { margin-top: 18px; font-size: 17px; }
width: 160px; span { margin-top: 7px; font-size: 13px; opacity: 0.88; }
min-width: 160px; }
// width: 8.333vw;
height: 240px; .time-orbit {
background: url("@/assets/images/有效时间.png"); display: grid;
background-size: 160px 240px; place-content: center;
margin-top: 15px; width: 108px;
padding-top: 20px; height: 108px;
.ring { text-align: center;
margin: 0 auto; border: 4px solid rgba(255, 255, 255, 0.4);
width: 100px; border-radius: 50%;
height: 100px; box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.16);
background: #b2d6fb; }
border-radius: 50%;
padding-top: 4px; .time-value { font-size: 25px; font-weight: 800; line-height: 1; }
.ringIn { .time-unit { margin-top: 5px; font-size: 13px; letter-spacing: 0.08em; }
width: 92px; .progress-chart-wrap { min-width: 0; }
height: 92px; .progress-chart { min-height: 270px; width: 100%; }
background: #64acf8;
border-radius: 50%; .module-progress-list {
margin-left: 4px; display: flex;
padding-top: 7px; flex-direction: column;
.ringText { justify-content: center;
width: 78px; gap: 14px;
height: 78px; min-width: 0;
background: #fff; padding: 8px 4px;
border-radius: 50%; }
margin-left: 7px;
font-weight: bold; .module-progress-item { min-width: 0; }
font-size: 17px; .module-progress-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; color: #6f7b91; font-size: 13px; }
color: #3c38b8; .module-progress-head strong { flex: 1; overflow: hidden; color: #273858; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.line { .module-color { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; }
width: 50px;
height: 1px; @media (max-width: 1320px) {
border-bottom: 1px solid #4568ee; .score-layout { grid-template-columns: 1fr; }
margin: 0 auto; .score-visual { border-right: 0; border-bottom: 1px dashed #d8e2f1; }
margin-bottom: 3px; .score-table-wrap { padding: 20px 0 0; }
margin-top: 3px; .progress-layout { grid-template-columns: 180px 1fr; }
} .module-progress-list { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
} }
}
} @media (max-width: 760px) {
.profile { .student-home { padding: 12px; }
text-align: center; .card-header { align-items: flex-start; flex-direction: column; }
margin-top: 10px; .score-visual { min-height: 290px; }
margin: 0px 5px; .score-chart { min-height: 290px; }
.num { .score-summary { left: 18px; top: 18px; }
font-weight: bold; .progress-layout { grid-template-columns: 1fr; }
font-size: 35px; .learning-time { min-height: 210px; }
color: #ffeec0; .module-progress-list { grid-column: auto; grid-template-columns: 1fr; }
height: 35px;
}
.text {
color: #fff;
line-height: 23px;
}
}
}
}
}
.Achievement1 {
display: flex;
.left {
display: flex;
.AchievementChart {
border-right: 2px dashed #e4e7ed;
}
.gradeDetails {
padding-left: 20px;
.detalis-item {
label {
display: inline-block;
width: 3rem !important;
margin-left: 0.8rem;
}
span {
font-family: Source Han Sans CN;
font-weight: 400;
color: #3c38b8;
}
margin-bottom: 1rem;
}
}
}
}
} }
</style> </style>

@ -0,0 +1,17 @@
const assert = require('assert');
const fs = require('fs');
const path = require('path');
const root = path.resolve(__dirname, '..');
const page = fs.readFileSync(path.join(root, 'src/views/student/index.vue'), 'utf8');
assert(/getCurrentExperimentReport/.test(page));
assert(/participatingModules/.test(page));
assert(/completedTaskCount/.test(page));
assert(/totalTaskCount/.test(page));
assert(/moduleName/.test(page));
assert(!/getStuWeightScore\(/.test(page));
assert(!/getRouters\(/.test(page));
assert(!/市场需求挖掘|产品投放测试|供应渠道管理|产品评估与考核/.test(page));
console.log('student home new module static checks passed');
Loading…
Cancel
Save