刘洋 1 年之前
父節點
當前提交
7a460129f4

+ 18 - 18
src/devLoginParams.ts

@@ -20,16 +20,16 @@
 //   markerId: "147",
 //   markerId: "147",
 // };
 // };
 /** 244 评卷员 */
 /** 244 评卷员 */
-export const LOGIN_CONFIG = {
-  isAdmin: false,
-  forceChange: true,
-  loginName: "6-111-1-11",
-  // loginName: "liuyang",
-  password: "123456",
-  examId: "365",
-  // markerId: "438",
-  markerId: "3799",
-};
+// export const LOGIN_CONFIG = {
+//   isAdmin: false,
+//   forceChange: true,
+//   loginName: "6-111-1-11",
+//   // loginName: "liuyang",
+//   password: "123456",
+//   examId: "365",
+//   // markerId: "438",
+//   markerId: "3799",
+// };
 // export const LOGIN_CONFIG = {
 // export const LOGIN_CONFIG = {
 //   isAdmin: false,
 //   isAdmin: false,
 //   forceChange: true,
 //   forceChange: true,
@@ -77,14 +77,14 @@ export const LOGIN_CONFIG = {
 //   // markerId: "483",
 //   // markerId: "483",
 // };
 // };
 /** 224 管理员 */
 /** 224 管理员 */
-// export const LOGIN_CONFIG = {
-//   isAdmin: true,
-//   forceChange: true,
-//   loginName: "admin-test",
-//   password: "123456",
-//   examId: "1",
-//   markerId: null,
-// };
+export const LOGIN_CONFIG = {
+  isAdmin: true,
+  forceChange: true,
+  loginName: "admin-test",
+  password: "123456",
+  examId: "1",
+  markerId: null,
+};
 // export const LOGIN_CONFIG = {
 // export const LOGIN_CONFIG = {
 //   isAdmin: true,
 //   isAdmin: true,
 //   forceChange: true,
 //   forceChange: true,

+ 0 - 1
src/features/arbitrate/MarkHeader.vue

@@ -3,7 +3,6 @@
     :isSingleStudent="isSingleStudent"
     :isSingleStudent="isSingleStudent"
     :clearTasks="clearTasks"
     :clearTasks="clearTasks"
     showPaperAndAnswer
     showPaperAndAnswer
-    showScoreBoard
   >
   >
     <span>
     <span>
       <span class="header-small-text">待处理</span>
       <span class="header-small-text">待处理</span>

+ 1 - 1
src/features/mark/Mark.vue

@@ -2,7 +2,7 @@
   <div class="my-container">
   <div class="my-container">
     <mark-header :showTotalScore="store.isMultiMedia" />
     <mark-header :showTotalScore="store.isMultiMedia" />
     <div class="tw-flex tw-gap-1">
     <div class="tw-flex tw-gap-1">
-      <mark-history showSearch showOrder :getHistory="getHistoryTask" />
+      <mark-history showSearch showOrder hasJump :getHistory="getHistoryTask" />
       <mark-body @error="removeBrokenTask" />
       <mark-body @error="removeBrokenTask" />
       <mark-board-track
       <mark-board-track
         v-if="store.isTrackMode"
         v-if="store.isTrackMode"

+ 32 - 10
src/features/mark/MarkBoardKeyBoard.vue

@@ -101,13 +101,11 @@
         <div
         <div
           :id="'bq-' + question.mainNumber + '-' + question.subNumber"
           :id="'bq-' + question.mainNumber + '-' + question.subNumber"
           class="question tw-rounded tw-p-1 tw-mb-2 tw-cursor-pointer tw-relative"
           class="question tw-rounded tw-p-1 tw-mb-2 tw-cursor-pointer tw-relative"
-          :class="isCurrentQuestion(question) && 'current-question'"
-          @click="
-            () => {
-              chooseQuestion(question);
-              scrollToQuestion(question);
-            }
-          "
+          :class="{
+            'current-question': isCurrentQuestion(question),
+            disabled: notInActive(index),
+          }"
+          @click="willChooseQuestion(question, index)"
         >
         >
           <div class="tw-flex tw-justify-between">
           <div class="tw-flex tw-justify-between">
             <div>
             <div>
@@ -152,13 +150,23 @@
 <script setup lang="ts">
 <script setup lang="ts">
 import type { Question } from "@/types";
 import type { Question } from "@/types";
 import { isNumber } from "lodash-es";
 import { isNumber } from "lodash-es";
-import { onMounted, onUnmounted, watch } from "vue";
+import { onMounted, onUnmounted, watch, computed } from "vue";
 import { store } from "@/store/store";
 import { store } from "@/store/store";
 import { keyMouse } from "./use/keyboardAndMouse";
 import { keyMouse } from "./use/keyboardAndMouse";
 import { autoChooseFirstQuestion } from "./use/autoChooseFirstQuestion";
 import { autoChooseFirstQuestion } from "./use/autoChooseFirstQuestion";
 import { message } from "ant-design-vue";
 import { message } from "ant-design-vue";
 import { DownOutlined } from "@ant-design/icons-vue";
 import { DownOutlined } from "@ant-design/icons-vue";
 
 
+const props = defineProps<{ arbitrateIndex?: string }>();
+const activeIndex = computed(() => {
+  return (
+    props.arbitrateIndex ? props.arbitrateIndex?.split(",") || [] : []
+  ).map((indexStr: string) => Number(indexStr) - 1);
+});
+const notInActive = (index: number) => {
+  return activeIndex.value.length && activeIndex.value.indexOf(index) == -1;
+};
+
 const emit = defineEmits(["submit", "allZeroSubmit", "unselectiveSubmit"]);
 const emit = defineEmits(["submit", "allZeroSubmit", "unselectiveSubmit"]);
 
 
 const { toggleKeyMouse } = keyMouse();
 const { toggleKeyMouse } = keyMouse();
@@ -180,7 +188,13 @@ watch(
   },
   },
   { immediate: true }
   { immediate: true }
 );
 );
-
+const willChooseQuestion = (question, index) => {
+  if (notInActive(index)) {
+    return;
+  }
+  chooseQuestion(question);
+  scrollToQuestion(question);
+};
 const questionScoreSteps = $computed(() => {
 const questionScoreSteps = $computed(() => {
   const question = store.currentQuestion;
   const question = store.currentQuestion;
   if (!question) return [];
   if (!question) return [];
@@ -347,7 +361,7 @@ const buttonHeightForSelective = $computed(() =>
 );
 );
 </script>
 </script>
 
 
-<style scoped>
+<style lang="less" scoped>
 .mark-board-track-container {
 .mark-board-track-container {
   max-width: 290px;
   max-width: 290px;
   min-width: 290px;
   min-width: 290px;
@@ -376,6 +390,14 @@ const buttonHeightForSelective = $computed(() =>
   min-width: 80px;
   min-width: 80px;
   padding: 10px;
   padding: 10px;
   background-color: var(--app-container-bg-color);
   background-color: var(--app-container-bg-color);
+  &.disabled {
+    background-color: #f5f5f5 !important;
+    // pointer-events: none;
+    cursor: not-allowed !important;
+    * {
+      color: rgba(0, 0, 0, 0.25) !important;
+    }
+  }
 }
 }
 .current-question {
 .current-question {
   color: white;
   color: white;

+ 29 - 2
src/features/mark/MarkBoardMouse.vue

@@ -113,8 +113,11 @@
                 v-for="(s, i) in questionScoreSteps(question)"
                 v-for="(s, i) in questionScoreSteps(question)"
                 :key="i"
                 :key="i"
                 class="single-score tw-cursor-pointer"
                 class="single-score tw-cursor-pointer"
-                :class="isCurrentScore(question, s) && 'current-score'"
-                @click="chooseScore(question, s)"
+                :class="{
+                  'current-score': isCurrentScore(question, s),
+                  disabled: notInActive(index),
+                }"
+                @click="willChooseQuestion(question, index, s)"
               >
               >
                 {{ s }}
                 {{ s }}
               </div>
               </div>
@@ -127,11 +130,22 @@
 </template>
 </template>
 
 
 <script setup lang="ts">
 <script setup lang="ts">
+import { computed } from "vue";
 import type { Question } from "@/types";
 import type { Question } from "@/types";
 import { store } from "@/store/store";
 import { store } from "@/store/store";
 import { keyMouse } from "./use/keyboardAndMouse";
 import { keyMouse } from "./use/keyboardAndMouse";
 import { DownOutlined } from "@ant-design/icons-vue";
 import { DownOutlined } from "@ant-design/icons-vue";
 
 
+const props = defineProps<{ arbitrateIndex?: string }>();
+const activeIndex = computed(() => {
+  return (
+    props.arbitrateIndex ? props.arbitrateIndex?.split(",") || [] : []
+  ).map((indexStr: string) => Number(indexStr) - 1);
+});
+const notInActive = (index: number) => {
+  return activeIndex.value.length && activeIndex.value.indexOf(index) == -1;
+};
+
 const emit = defineEmits(["submit", "allZeroSubmit", "unselectiveSubmit"]);
 const emit = defineEmits(["submit", "allZeroSubmit", "unselectiveSubmit"]);
 const { toggleKeyMouse } = keyMouse();
 const { toggleKeyMouse } = keyMouse();
 
 
@@ -141,6 +155,12 @@ function chooseScore(question: Question, score: number) {
   store.currentTask &&
   store.currentTask &&
     (store.currentTask.markResult.scoreList[__index] = score);
     (store.currentTask.markResult.scoreList[__index] = score);
 }
 }
+const willChooseQuestion = (question: any, index: number, score: number) => {
+  if (notInActive(index)) {
+    return;
+  }
+  chooseScore(question, score);
+};
 function isCurrentScore(question: Question, score: number) {
 function isCurrentScore(question: Question, score: number) {
   const { __index } = question;
   const { __index } = question;
   const questionScore =
   const questionScore =
@@ -217,6 +237,13 @@ const buttonHeightForSelective = $computed(() =>
   background-color: var(--app-container-bg-color);
   background-color: var(--app-container-bg-color);
 
 
   border-radius: 30px;
   border-radius: 30px;
+  &.disabled {
+    background-color: #f5f5f5 !important;
+    cursor: not-allowed;
+    * {
+      color: rgba(0, 0, 0, 0.25) !important;
+    }
+  }
 }
 }
 .current-score {
 .current-score {
   background-color: var(--app-score-color);
   background-color: var(--app-score-color);

+ 16 - 11
src/features/mark/MarkHistory.vue

@@ -153,17 +153,20 @@
       class="tw-flex tw-justify-between tw-place-content-center tw-mt-2 pager-container"
       class="tw-flex tw-justify-between tw-place-content-center tw-mt-2 pager-container"
     >
     >
       <div class="tw-font-bold" style="line-height: 30px">
       <div class="tw-font-bold" style="line-height: 30px">
-        第{{ currentPage }}页 &nbsp;跳至
-        <a-input
-          v-model:value="jumpPage"
-          style="width: 40px; font-weight: normal"
-          size="small"
-          @keypress.stop=""
-          @keydown.stop=""
-          @keyup.stop="jumpPageKeyUp"
-          @keyup.enter="toJumpPage"
-        />
-        &nbsp;页
+        第{{ currentPage }}页
+        <template v-if="hasJump"
+          >&nbsp;跳至
+          <a-input
+            v-model:value="jumpPage"
+            style="width: 40px; font-weight: normal"
+            size="small"
+            @keypress.stop=""
+            @keydown.stop=""
+            @keyup.stop="jumpPageKeyUp"
+            @keyup.enter="toJumpPage"
+          />
+          &nbsp;页</template
+        >
       </div>
       </div>
       <div class="tw-flex tw-gap-2">
       <div class="tw-flex tw-gap-2">
         <a-button
         <a-button
@@ -226,6 +229,7 @@ const {
   markerId = undefined,
   markerId = undefined,
   markerScore = undefined,
   markerScore = undefined,
   getHistory,
   getHistory,
+  hasJump = false,
 } = defineProps<{
 } = defineProps<{
   title?: string;
   title?: string;
   showOrder?: boolean;
   showOrder?: boolean;
@@ -236,6 +240,7 @@ const {
   markerId?: string;
   markerId?: string;
   markerScore?: string;
   markerScore?: string;
   getHistory: GetHistory;
   getHistory: GetHistory;
+  hasJump?: boolean;
 }>();
 }>();
 let searchType = $ref("1");
 let searchType = $ref("1");
 
 

+ 1 - 1
vite.config.ts

@@ -3,7 +3,7 @@ import vue from "@vitejs/plugin-vue";
 import ViteComponents from "unplugin-vue-components/vite";
 import ViteComponents from "unplugin-vue-components/vite";
 import { AntDesignVueResolver } from "unplugin-vue-components/resolvers";
 import { AntDesignVueResolver } from "unplugin-vue-components/resolvers";
 
 
-const SERVER_URL = "http://192.168.10.225";
+const SERVER_URL = "http://192.168.10.224";
 // const SERVER_URL = "http://192.168.11.103:8090";
 // const SERVER_URL = "http://192.168.11.103:8090";
 // const SERVER_URL = "http://192.168.11.81:8090";
 // const SERVER_URL = "http://192.168.11.81:8090";