2
0
Michael Wang 3 жил өмнө
parent
commit
97b681997a

+ 93 - 19
src/features/library/inspect/MarkBoardInspect.vue

@@ -1,22 +1,36 @@
 <template>
-  <div v-if="store.currentTask" class="mark-board-track-container">
-    <div>
-      <h1 class="tw-text-3xl tw-text-center">试卷总分:{{ markerScore }}</h1>
+  <div
+    v-if="store.currentTask"
+    class="mark-board-track-container"
+    :class="[store.setting.uiSetting['score.board.collapse'] ? 'hide' : 'show']"
+  >
+    <div class="top-container tw-flex-shrink-0 tw-flex tw-items-center">
+      <div class="tw-flex tw-flex-col tw-flex-1 tw-text-center">
+        <div class="tw-flex tw-justify-center">
+          <img
+            src="../../mark/images/总分.png"
+            style="width: 13px; height: 16px"
+          />
+        </div>
+        <div>试卷总分</div>
+      </div>
+      <div class="tw-flex-1" style="font-size: 40px">
+        {{ markerScore > 0 ? markerScore : 0 }}
+      </div>
     </div>
 
-    <div v-if="groups">
+    <div class="tw-flex-grow tw-overflow-auto tw-my-5" v-if="groups">
       <template v-for="(groupNumber, index) in groups" :key="index">
-        <div class="tw-mb-4">
+        <div class="tw-mb-4 tw-bg-white tw-p-4">
           <div
             class="
               tw-flex tw-justify-between tw-place-items-center
               hover:tw-bg-gray-200
             "
-            style="border-bottom: 1px solid grey"
             @mouseover="addFocusTrack(groupNumber, undefined, undefined)"
             @mouseleave="removeFocusTrack"
           >
-            分组 {{ groupNumber }}
+            <span class="secondary-text">分组 {{ groupNumber }}</span>
             <input
               class="tw-my-auto"
               title="打回"
@@ -31,7 +45,7 @@
                 v-if="question.groupNumber === groupNumber"
                 class="
                   question
-                  tw-flex tw-place-items-center tw-mb-1 tw-ml-2
+                  tw-flex tw-place-items-center tw-mb-1 tw-font-bold
                   hover:tw-bg-gray-200
                 "
                 @mouseover="
@@ -49,9 +63,10 @@
                   }}
                 </span>
                 <span class="tw-flex-1 tw-text-center">
-                  {{ question.score || 0 }}
+                  {{ question.score === -1 ? "未选做" : question.score || 0 }}
                 </span>
                 <input
+                  :disabled="question.score === -1"
                   title="打回"
                   type="checkbox"
                   @change="questionCheckChanged(question)"
@@ -64,9 +79,10 @@
       </template>
     </div>
 
-    <div class="tw-flex tw-justify-center">
+    <div class="tw-flex tw-flex-shrink-0 tw-justify-center">
       <qm-button
         type="primary"
+        class="full-width-btn undo-btn"
         v-if="
           store.currentTask.inspectTime && store.currentTask.inspectTime > 0
         "
@@ -78,10 +94,17 @@
         v-else-if="checkedQuestions.length === 0"
         @click="inspect"
         type="primary"
+        class="full-width-btn"
       >
         复核
       </qm-button>
-      <qm-button v-else @click="reject" type="primary">打回</qm-button>
+      <qm-button
+        v-else
+        @click="reject"
+        type="primary"
+        class="full-width-btn undo-btn"
+        >打回</qm-button
+      >
     </div>
   </div>
 </template>
@@ -214,16 +237,67 @@ function inspect() {
 
 <style scoped>
 .mark-board-track-container {
-  max-width: 250px;
-  min-width: 250px;
-  border-left: 1px solid grey;
-  padding-left: 6px;
-  padding-right: 6px;
+  display: flex;
+  flex-direction: column;
+  max-width: 290px;
+  min-width: 290px;
   max-height: calc(100vh - 56px);
-  overflow: auto;
+  padding: 20px;
+  z-index: 1001;
+  transition: margin-right 0.5s;
+  color: var(--app-small-header-text-color);
+}
+.mark-board-track-container.show {
+  margin-right: 0;
+}
+.mark-board-track-container.hide {
+  margin-right: -290px;
+}
+
+.top-container {
+  background-color: var(--app-container-bg-color);
+  height: 86px;
+  border-radius: 5px;
+
+  color: white;
+  background-color: var(--app-primary-button-bg-color);
+}
+.total-score {
+  color: var(--app-main-text-color);
+  font-size: 32px;
 }
 .question {
-  min-width: 100px;
-  border-bottom: 1px dotted grey;
+  min-width: 80px;
+  background-color: var(--app-container-bg-color);
+}
+.current-question .score {
+  color: var(--high-light-score-color);
+}
+
+.current-score {
+  color: var(--app-score-color);
+}
+.current-score-indicator {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 5px;
+  height: 5px;
+  background-color: #5c69f6;
+}
+.all-zero-unselective-button {
+  height: v-bind(buttonHeightForSelective);
+  border-radius: 10px;
+  padding: 7px;
+  background-color: #4db9ff;
+  border: none;
+}
+.full-width-btn {
+  width: 100%;
+  border-radius: 20px;
+}
+.undo-btn {
+  background-color: var(--app-undo-button-bg-color);
+  border-color: var(--app-undo-button-bg-color);
 }
 </style>

+ 131 - 20
src/features/library/inspect/MarkHeader.vue

@@ -7,7 +7,16 @@
     "
     v-if="store.setting"
   >
-    <div>
+    <div
+      class="
+        tw-text-white
+        tw-block
+        tw-overflow-ellipsis
+        tw-overflow-hidden
+        tw-whitespace-nowrap
+        header-big-text
+      "
+    >
       {{
         `${store.setting.subject.code ?? ""}-${
           store.setting.subject.name ?? ""
@@ -16,21 +25,26 @@
     </div>
     <div class="tw-flex tw-gap-1">
       <div>
-        编号<span class="highlight-text">{{
-          store.currentTask?.secretNumber
-        }}</span>
+        <span class="header-small-text">编号</span>
+        <span class="highlight-text">
+          {{ store.currentTask?.secretNumber ?? "-" }}
+        </span>
       </div>
     </div>
-    <ul v-if="!isSingleStudent" class="tw-flex tw-gap-2 tw-mb-0">
-      <li>
-        待复核<span class="highlight-text">{{ store.status.totalCount }}</span>
-      </li>
-    </ul>
+    <div
+      v-if="!isSingleStudent"
+      class="tw-flex tw-gap-2 tw-items-center tw-flex-1"
+    >
+      <span>
+        <span class="header-small-text">待复核</span
+        ><span class="highlight-text">{{
+          store.status.totalCount ?? "-"
+        }}</span>
+      </span>
+    </div>
     <ZoomPaper v-if="isScanImage()" :store="store" />
-    <div class="tw-flex tw-place-items-center">
-      <UserOutlined class="icon-font icon-with-text" />{{
-        store.setting.userName
-      }}
+    <div class="tw-flex tw-place-items-center tw-justify-end">
+      {{ store.setting.userName }}
     </div>
     <div
       class="tw-flex tw-place-items-center tw-cursor-pointer"
@@ -38,6 +52,36 @@
     >
       <PoweroffOutlined class="icon-font icon-with-text" />关闭
     </div>
+    <div
+      class="
+        tw-flex tw-place-content-center tw-cursor-pointer tw-justify-self-end
+        menu
+      "
+      :class="[
+        !store.setting.uiSetting['score.board.collapse'] &&
+          store.currentTask &&
+          'menu-toggled',
+      ]"
+      @click="toggleScoreBoard"
+    >
+      <span
+        title="给分板"
+        class="tw-inline-flex tw-place-content-center tw-relative"
+      >
+        <img
+          src="../../mark/images/right-menu.svg"
+          :class="[
+            !store.setting.uiSetting['score.board.collapse'] && 'svg-red',
+          ]"
+        />
+      </span>
+      <div
+        v-if="
+          !store.setting.uiSetting['score.board.collapse'] && store.currentTask
+        "
+        class="triangle"
+      ></div>
+    </div>
   </div>
 </template>
 
@@ -72,25 +116,92 @@ onMounted(() => {
     updateClearTask();
   });
 });
+
+const toggleScoreBoard = () => {
+  store.setting.uiSetting["score.board.collapse"] =
+    !store.setting.uiSetting["score.board.collapse"];
+};
 </script>
 
 <style scoped>
+.header-bg-color {
+  background-color: var(--header-bg-color);
+}
 .header-container {
   position: relative;
-  font-size: 16px;
-  height: 40px;
+  height: 56px;
+  line-height: 16px;
 
   background-color: var(--header-bg-color);
   color: rgba(255, 255, 255, 0.5);
 }
+.menu {
+  width: 56px;
+  height: 56px;
+  padding: 20px;
+}
+.menu:hover,
+.menu-toggled {
+  background-color: rgba(255, 255, 255, 0.2);
+}
+
+.header-container span {
+  vertical-align: middle;
+}
+.header-big-text {
+  font-size: 20px;
+  line-height: 30px;
+}
+.header-small-text {
+  font-size: var(--app-secondary-font-size);
+}
 .highlight-text {
   color: white;
+  font-size: var(--app-title-font-size);
+}
+.header-bg-color.ant-btn:hover {
+  background-color: var(--app-ant-select-bg-override-color) !important;
+}
+
+.assistant-table {
+  z-index: 5500;
+  border-collapse: separate;
+  border-spacing: 0 1em;
+  color: var(--app-bold-text-color);
+  width: 240px;
+}
+.assistant-table tr td:nth-child(2) {
+  text-align: right;
+}
+.svg-red {
+  filter: invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg)
+    brightness(104%) contrast(97%);
+}
+.triangle {
+  background-color: white;
+  width: 10px;
+  height: 10px;
+  clip-path: polygon(0 100%, 100% 100%, 50% 0);
+
+  position: absolute;
+  bottom: -2px;
+}
+.dropdown-triangle {
+  background-color: #8c8d9b;
+  width: 7px;
+  height: 5px;
+  clip-path: polygon(0 0, 100% 0, 50% 100%);
+  margin-left: 4px;
 }
-.icon-font {
-  display: block;
+.markcount-animation {
+  animation: change-color 3s ease-in-out;
 }
-.icon-with-text {
-  font-size: 18px;
-  line-height: 18px;
+@keyframes change-color {
+  0% {
+    color: red;
+  }
+  100% {
+    color: white;
+  }
 }
 </style>

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

@@ -14,7 +14,9 @@
         </div>
         <div>试卷总分</div>
       </div>
-      <div class="tw-flex-1" style="font-size: 40px">{{ markerScore }}</div>
+      <div class="tw-flex-1" style="font-size: 40px">
+        {{ markerScore > 0 ? markerScore : 0 }}
+      </div>
     </div>
 
     <div class="tw-flex-grow tw-overflow-auto tw-my-5" v-if="groups">