Michael Wang 3 лет назад
Родитель
Сommit
4aef4a3711

+ 1 - 6
src/features/library/inspect/MarkBoardInspect.vue

@@ -134,12 +134,7 @@ const questions = computed(() => {
   return qs;
 });
 
-const markerScore = computed(
-  () =>
-    (questions.value
-      ?.map((q) => Math.round((q.score || 0) * 100))
-      .reduce((acc, s) => acc + s) || 0) / 100
-);
+const markerScore = computed(() => store.currentTask?.markerScore || 0);
 
 function addToCheckedQuestion(question: Question) {
   checkedQuestions.push(question);

+ 1 - 0
src/features/library/inspect/MarkHeader.vue

@@ -15,6 +15,7 @@
         tw-overflow-hidden
         tw-whitespace-nowrap
         header-big-text
+        tw-ml-4
       "
     >
       {{

+ 1 - 6
src/features/student/importInspect/MarkBoardInspect.vue

@@ -116,12 +116,7 @@ const questions = computed(() => {
   return qs;
 });
 
-const markerScore = computed(
-  () =>
-    (questions.value
-      ?.map((q) => Math.round((q.score || 0) * 100))
-      .reduce((acc, s) => acc + s) || 0) / 100
-);
+const markerScore = computed(() => store.currentTask?.markerScore || 0);
 
 function addToCheckedQuestion(question: Question) {
   checkedQuestions.push(question);

+ 1 - 0
src/features/student/inspect/Inspect.vue

@@ -116,6 +116,7 @@ async function updateTask() {
     );
     rawTask.jsonUrl = store.setting.fileServer + rawTask.jsonUrl;
     store.currentTask = res.data;
+    if (res.data.subject) store.setting.subject = res.data.subject;
     // if (store.currentTask)
     //   Object.assign(store.setting.subject, store.currentTask.subject);
   } else {

+ 1 - 6
src/features/student/inspect/MarkBoardInspect.vue

@@ -134,12 +134,7 @@ const questions = computed(() => {
   return qs;
 });
 
-const markerScore = computed(
-  () =>
-    (questions.value
-      ?.map((q) => Math.round((q.score || 0) * 100))
-      .reduce((acc, s) => acc + s) || 0) / 100
-);
+const markerScore = computed(() => store.currentTask?.markerScore || 0);
 
 function addToCheckedQuestion(question: Question) {
   checkedQuestions.push(question);

+ 4 - 3
src/features/student/inspect/MarkHeader.vue

@@ -25,11 +25,12 @@
         tw-overflow-hidden
         tw-whitespace-nowrap
         header-big-text
+        tw-ml-4
       "
     >
       {{
-        `${store.setting.subject.code ?? ""}-${
-          store.setting.subject.name ?? ""
+        `${store.setting.subject?.code ?? ""}-${
+          store.setting.subject?.name ?? ""
         }`
       }}
     </div>
@@ -51,7 +52,7 @@
       </span>
     </div>
     <ZoomPaper v-if="isScanImage()" :store="store" />
-    <div class="tw-flex tw-place-items-center tw-justify-end">
+    <div class="tw-flex tw-place-items-center tw-justify-end tw-ml-auto">
       {{ store.setting.userName }}
     </div>
     <div