|
@@ -3,6 +3,7 @@ import { computed, onMounted, onUnmounted, watch, ref } from "vue";
|
|
|
import { useRouter } from 'vue-router';
|
|
|
const router = useRouter();
|
|
|
import UserRight from "@/components/user/UserRight.vue";
|
|
|
+import { studentTaskGetSelfCourse, studentTaskLearningAchievementStatistics } from "@/api/studentTask.ts";
|
|
|
|
|
|
let menuList = ref([
|
|
|
{
|
|
@@ -99,6 +100,73 @@ const menuListEvent = (json, index) => {
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+const studentTaskGetSelfCourseEvent = () => {
|
|
|
+ studentTaskGetSelfCourse().then(res => {
|
|
|
+ console.log("studentTaskGetSelfCourse ---", res);
|
|
|
+ }).catch(error => {
|
|
|
+
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+const studentTaskLearningAchievementStatisticsEvent = () => {
|
|
|
+
|
|
|
+ // 根据顺序替换展示的UI
|
|
|
+ let uiList = [
|
|
|
+ {
|
|
|
+ "topImg" : new URL("../../../assets/res/img/main/yuan_1.svg", import.meta.url).href,
|
|
|
+ "bgImg" : new URL("../../../assets/res/img/main/time_01.png", import.meta.url).href,
|
|
|
+ "style_1" : "color:#5B6EDD;",
|
|
|
+ "style_2" : "color:#5B6EDD;",
|
|
|
+ "style_3" : "color:#5B6EDD;",
|
|
|
+ "style_4" : "color:#a3aeec;",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "topImg" : new URL("../../../assets/res/img/main/yuan_2.svg", import.meta.url).href,
|
|
|
+ "bgImg" : new URL("../../../assets/res/img/main/time_02.png", import.meta.url).href,
|
|
|
+ "style_1" : "color:#28A47E;",
|
|
|
+ "style_2" : "color:#28A47E;",
|
|
|
+ "style_3" : "color:#28A47E;",
|
|
|
+ "style_4" : "color:#93d3c0;",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "topImg" : new URL("../../../assets/res/img/main/yuan_3.svg", import.meta.url).href,
|
|
|
+ "bgImg" : new URL("../../../assets/res/img/main/time_03.png", import.meta.url).href,
|
|
|
+ "style_1" : "color:#D47571;",
|
|
|
+ "style_2" : "color:#D47571;",
|
|
|
+ "style_3" : "color:#D47571;",
|
|
|
+ "style_4" : "color:#e8b3b0;",
|
|
|
+ },
|
|
|
+ ];
|
|
|
+
|
|
|
+ let uiListIndex = 0;
|
|
|
+
|
|
|
+ studentTaskLearningAchievementStatistics().then(res => {
|
|
|
+
|
|
|
+ // console.log("studentTaskLearningAchievementStatistics ---", res);
|
|
|
+ let array = res?.data?.data?.courseStats;
|
|
|
+ for (let i = 0; i < array.length; i++) {
|
|
|
+ let objArray = array[i];
|
|
|
+ console.log("objArray ---", objArray);
|
|
|
+
|
|
|
+ let addJson = JSON.parse(JSON.stringify(uiList[uiListIndex]));
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+onMounted(function() {
|
|
|
+ studentTaskGetSelfCourseEvent();
|
|
|
+ studentTaskLearningAchievementStatisticsEvent();
|
|
|
+});
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<template>
|