Przeglądaj źródła

修改任务完成率错误问题

zengyicheng 2 lat temu
rodzic
commit
b64d0f3749
1 zmienionych plików z 10 dodań i 2 usunięć
  1. 10 2
      src/components/courseDetail.vue

+ 10 - 2
src/components/courseDetail.vue

@@ -186,7 +186,9 @@
                             :content="item.name"
                             placement="top"
                           >
-                            <div class="titleCss" style="max-width: 260px">{{ item.name }}</div>
+                            <div class="titleCss" style="max-width: 260px">
+                              {{ item.name }}
+                            </div>
                           </el-tooltip>
                         </div>
                       </div>
@@ -631,7 +633,13 @@
                                           (item3.works.length /
                                             chaptersJson.studentCount) *
                                           100
-                                        ).toFixed(2) + "%"
+                                        ).toFixed(2) > 100.00
+                                          ? 100 + "%"
+                                          : (
+                                              (item3.works.length /
+                                                chaptersJson.studentCount) *
+                                              100
+                                            ).toFixed(2) + "%"
                                       }}
                                     </div>
                                     <div class="blueBtn">