jichoi / lms_front star
이은진 이은진 2024-08-20
240820 이은진 대시보드 오류 수정
@3bf9d97a71af49d6a13b70cd6ee60dae4ecf23f0
client/views/pages/main/Dashboard.vue
--- client/views/pages/main/Dashboard.vue
+++ client/views/pages/main/Dashboard.vue
@@ -5,8 +5,8 @@
     <div v-else class="main">
         <div class="race-wrap">
             <div class="title-box">
-                <p class="title" style="margin-top: 7rem;">{{ roadmapData[0].unit_nm }}</p>
-                <p class="subtitle">{{ roadmapData[0].book_nm }}</p>
+                <p class="title" style="margin-top: 7rem;">{{ titleUnitName }}</p>
+                <p class="subtitle">{{ titleBookName }}</p>
             </div>
             <div class="race-box">
 
@@ -280,6 +280,9 @@
             rabbitCompl: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
             rabbitEnd: false,
 
+            titleUnitName: "",
+            titleBookName: "",
+
             images: [],
             unit_id: "",
             book_id: "",
@@ -357,8 +360,6 @@
             }
 
             if (this.$route.query.value) {
-                console.log(`자리 : ${this.$route.query.value}`);
-
                 this.rabbitPos[parseInt(this.$route.query.value, 10) + 1] = true
                 for (var i = 0; i < this.$route.query.value; i++) {
                     this.rabbitCompl[i + 1] = true
@@ -404,7 +405,6 @@
                         }
                     }
                 }
-                console.log(this.state);
             })
                 .catch(error => {
                     console.error("Error fetching roadmap data:", error);
@@ -455,6 +455,8 @@
                 .then(response => {
                     if (response.data.length != 0) {
                         this.roadmapData = response.data;
+                        this.titleUnitName = this.roadmapData[0].unit_nm
+                        this.titleBookName = this.roadmapData[0].book_nm
                         this.labeledItems = this.processedRoadmap;
                     } else {
                         this.state = "noProblem"
@@ -566,7 +568,6 @@
         this.fetchRoadmapData(unit_id, book_id);
         this.fetchRabbit();
 
-        this.onVideoLoaded();
         this.unit_id = unit_id
         this.book_id = book_id
 
Add a comment
List