浏览代码

无用代码 & $computed let

Michael Wang 3 年之前
父节点
当前提交
25c7b486d3

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

@@ -33,7 +33,6 @@ import { store } from "@/store/store";
 import MarkHeader from "./MarkHeader.vue";
 import MarkHeader from "./MarkHeader.vue";
 import { useRoute } from "vue-router";
 import { useRoute } from "vue-router";
 import MarkBody from "./MarkBody.vue";
 import MarkBody from "./MarkBody.vue";
-
 import MarkBoardKeyBoard from "@/features/mark/MarkBoardKeyBoard.vue";
 import MarkBoardKeyBoard from "@/features/mark/MarkBoardKeyBoard.vue";
 import MarkBoardMouse from "@/features/mark/MarkBoardMouse.vue";
 import MarkBoardMouse from "@/features/mark/MarkBoardMouse.vue";
 import MinimapModal from "@/features/mark/MinimapModal.vue";
 import MinimapModal from "@/features/mark/MinimapModal.vue";

+ 0 - 2
src/features/arbitrate/MarkBody.vue

@@ -14,5 +14,3 @@ import { store } from "@/store/store";
 
 
 defineEmits(["error"]);
 defineEmits(["error"]);
 </script>
 </script>
-
-<style scoped></style>

+ 4 - 19
src/features/library/inspect/LibraryInspect.vue

@@ -15,14 +15,14 @@
 </template>
 </template>
 
 
 <script setup lang="ts">
 <script setup lang="ts">
-import { computed, onMounted, watch } from "vue";
+import { onMounted, watch } from "vue";
 import { store } from "@/store/store";
 import { store } from "@/store/store";
 import MarkHeader from "./MarkHeader.vue";
 import MarkHeader from "./MarkHeader.vue";
 import { useRoute } from "vue-router";
 import { useRoute } from "vue-router";
 import MarkBody from "./MarkBody.vue";
 import MarkBody from "./MarkBody.vue";
 import MarkHistory from "@/features/mark/MarkHistory.vue";
 import MarkHistory from "@/features/mark/MarkHistory.vue";
 import MarkBoardInspect from "./MarkBoardInspect.vue";
 import MarkBoardInspect from "./MarkBoardInspect.vue";
-import type { Question, Setting, Task } from "@/types";
+import type { Question, Task } from "@/types";
 import { message } from "ant-design-vue";
 import { message } from "ant-design-vue";
 import {
 import {
   clearInspectedTask,
   clearInspectedTask,
@@ -72,12 +72,7 @@ async function updateStatus() {
 async function updateTask() {
 async function updateTask() {
   const mkey = "fetch_task_key";
   const mkey = "fetch_task_key";
   message.info({ content: "获取任务中...", duration: 1.5, key: mkey });
   message.info({ content: "获取任务中...", duration: 1.5, key: mkey });
-  let res;
-  // if (isSingleStudent) {
-  //   res = await getSingleStuTask();
-  // } else {
-  res = await getOneOfStuTask();
-  // }
+  let res = await getOneOfStuTask();
   message.success({
   message.success({
     content: res.data.libraryId ? "获取成功" : "无任务",
     content: res.data.libraryId ? "获取成功" : "无任务",
     key: mkey,
     key: mkey,
@@ -91,17 +86,11 @@ async function updateTask() {
   }
   }
 }
 }
 
 
-// async function reloadAndfetchTask() {
-//   await updateClearTask();
-//   await updateSetting();
-//   await fetchTask();
-// }
 watch(
 watch(
   () => store.historyOpen,
   () => store.historyOpen,
   async () => {
   async () => {
     if (!store.historyOpen) {
     if (!store.historyOpen) {
       await updateClearTask();
       await updateClearTask();
-      await updateSetting();
       await fetchTask();
       await fetchTask();
     }
     }
   }
   }
@@ -118,15 +107,11 @@ onMounted(async () => {
   await fetchTask();
   await fetchTask();
 });
 });
 
 
-async function getSingleStuTask() {
-  // return getSingleInspectedTask(libraryId);
-}
-
 async function getOneOfStuTask() {
 async function getOneOfStuTask() {
   return getOneOfInspectedTask(subjectCode, groupNumber);
   return getOneOfInspectedTask(subjectCode, groupNumber);
 }
 }
 
 
-const realLibraryId = $computed(
+let realLibraryId = $computed(
   () => (isSingleStudent ? libraryId : store.currentTask?.libraryId) as string
   () => (isSingleStudent ? libraryId : store.currentTask?.libraryId) as string
 );
 );
 const saveTaskToServer = async () => {
 const saveTaskToServer = async () => {

+ 4 - 25
src/features/library/inspect/MarkBoardInspect.vue

@@ -112,7 +112,7 @@
 <script setup lang="ts">
 <script setup lang="ts">
 import type { Question } from "@/types";
 import type { Question } from "@/types";
 import { message } from "ant-design-vue";
 import { message } from "ant-design-vue";
-import { computed, reactive, watch } from "vue";
+import { reactive, watch } from "vue";
 import { store } from "@/store/store";
 import { store } from "@/store/store";
 
 
 const emit = defineEmits(["inspect", "reject"]);
 const emit = defineEmits(["inspect", "reject"]);
@@ -124,17 +124,17 @@ watch(
     checkedQuestions.splice(0);
     checkedQuestions.splice(0);
   }
   }
 );
 );
-const groups = computed(() => {
+let groups = $computed(() => {
   const gs = store.currentTask?.questionList.map((q) => q.groupNumber);
   const gs = store.currentTask?.questionList.map((q) => q.groupNumber);
   return [...new Set(gs)].sort((a, b) => a - b);
   return [...new Set(gs)].sort((a, b) => a - b);
 });
 });
 
 
-const questions = $computed(() => {
+let questions = $computed(() => {
   const qs = store.currentTask?.questionList;
   const qs = store.currentTask?.questionList;
   return qs;
   return qs;
 });
 });
 
 
-const markerScore = computed(() => store.currentTask?.markerScore || 0);
+let markerScore = $computed(() => store.currentTask?.markerScore || 0);
 
 
 function addToCheckedQuestion(question: Question) {
 function addToCheckedQuestion(question: Question) {
   checkedQuestions.push(question);
   checkedQuestions.push(question);
@@ -265,27 +265,6 @@ function inspect() {
   min-width: 80px;
   min-width: 80px;
   background-color: var(--app-container-bg-color);
   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 {
-  border-radius: 10px;
-  padding: 7px;
-  background-color: #4db9ff;
-  border: none;
-}
 .full-width-btn {
 .full-width-btn {
   width: 100%;
   width: 100%;
   border-radius: 20px;
   border-radius: 20px;

+ 0 - 2
src/features/library/inspect/MarkBody.vue

@@ -15,5 +15,3 @@ import { store } from "@/store/store";
 
 
 defineEmits(["error"]);
 defineEmits(["error"]);
 </script>
 </script>
-
-<style scoped></style>

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

@@ -130,9 +130,6 @@ onMounted(() => {
 </script>
 </script>
 
 
 <style scoped>
 <style scoped>
-.header-bg-color {
-  background-color: var(--header-bg-color);
-}
 .header-container {
 .header-container {
   position: relative;
   position: relative;
   height: 56px;
   height: 56px;
@@ -165,20 +162,7 @@ onMounted(() => {
   color: white;
   color: white;
   font-size: var(--app-title-font-size);
   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 {
 .svg-red {
   filter: invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg)
   filter: invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg)
     brightness(104%) contrast(97%);
     brightness(104%) contrast(97%);
@@ -192,22 +176,4 @@ onMounted(() => {
   position: absolute;
   position: absolute;
   bottom: -2px;
   bottom: -2px;
 }
 }
-.dropdown-triangle {
-  background-color: #8c8d9b;
-  width: 7px;
-  height: 5px;
-  clip-path: polygon(0 0, 100% 0, 50% 100%);
-  margin-left: 4px;
-}
-.markcount-animation {
-  animation: change-color 3s ease-in-out;
-}
-@keyframes change-color {
-  0% {
-    color: red;
-  }
-  100% {
-    color: white;
-  }
-}
 </style>
 </style>

+ 1 - 1
src/features/library/libraryTrack/LibraryTrack.vue

@@ -13,7 +13,7 @@ import { store } from "@/store/store";
 import MarkHeader from "./MarkHeader.vue";
 import MarkHeader from "./MarkHeader.vue";
 import { useRoute } from "vue-router";
 import { useRoute } from "vue-router";
 import MarkBody from "./MarkBody.vue";
 import MarkBody from "./MarkBody.vue";
-import type { MarkStore, Task } from "@/types";
+import type { Task } from "@/types";
 import { message } from "ant-design-vue";
 import { message } from "ant-design-vue";
 import {
 import {
   getSingleLibraryTask,
   getSingleLibraryTask,

+ 0 - 2
src/features/library/libraryTrack/MarkBody.vue

@@ -14,5 +14,3 @@ import { store } from "@/store/store";
 
 
 defineEmits(["error"]);
 defineEmits(["error"]);
 </script>
 </script>
-
-<style scoped></style>

+ 0 - 53
src/features/library/libraryTrack/MarkHeader.vue

@@ -66,9 +66,6 @@ const closeWindow = async () => {
 </script>
 </script>
 
 
 <style scoped>
 <style scoped>
-.header-bg-color {
-  background-color: var(--header-bg-color);
-}
 .header-container {
 .header-container {
   position: relative;
   position: relative;
   height: 56px;
   height: 56px;
@@ -77,15 +74,6 @@ const closeWindow = async () => {
   background-color: var(--header-bg-color);
   background-color: var(--header-bg-color);
   color: rgba(255, 255, 255, 0.5);
   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 {
 .header-container span {
   vertical-align: middle;
   vertical-align: middle;
@@ -101,49 +89,8 @@ const closeWindow = async () => {
   color: white;
   color: white;
   font-size: var(--app-title-font-size);
   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 {
 .svg-red {
   filter: invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg)
   filter: invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg)
     brightness(104%) contrast(97%);
     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;
-}
-.markcount-animation {
-  animation: change-color 3s ease-in-out;
-}
-@keyframes change-color {
-  0% {
-    color: red;
-  }
-  100% {
-    color: white;
-  }
-}
 </style>
 </style>

+ 0 - 2
src/features/library/quality/MarkBody.vue

@@ -15,5 +15,3 @@ import { store } from "@/store/store";
 
 
 defineEmits(["error"]);
 defineEmits(["error"]);
 </script>
 </script>
-
-<style scoped></style>

+ 0 - 42
src/features/library/quality/MarkHeader.vue

@@ -100,9 +100,6 @@ const closeWindow = async () => {
 </script>
 </script>
 
 
 <style scoped>
 <style scoped>
-.header-bg-color {
-  background-color: var(--header-bg-color);
-}
 .header-container {
 .header-container {
   position: relative;
   position: relative;
   height: 56px;
   height: 56px;
@@ -111,15 +108,6 @@ const closeWindow = async () => {
   background-color: var(--header-bg-color);
   background-color: var(--header-bg-color);
   color: rgba(255, 255, 255, 0.5);
   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 {
 .header-container span {
   vertical-align: middle;
   vertical-align: middle;
@@ -135,9 +123,6 @@ const closeWindow = async () => {
   color: white;
   color: white;
   font-size: var(--app-title-font-size);
   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 {
 .assistant-table {
   z-index: 5500;
   z-index: 5500;
@@ -153,31 +138,4 @@ const closeWindow = async () => {
   filter: invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg)
   filter: invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg)
     brightness(104%) contrast(97%);
     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;
-}
-.markcount-animation {
-  animation: change-color 3s ease-in-out;
-}
-@keyframes change-color {
-  0% {
-    color: red;
-  }
-  100% {
-    color: white;
-  }
-}
 </style>
 </style>

+ 1 - 2
src/features/mark/AllPaperModal.vue

@@ -34,11 +34,10 @@
 </template>
 </template>
 
 
 <script setup lang="ts">
 <script setup lang="ts">
-import { computed } from "vue";
 import { CloseOutlined } from "@ant-design/icons-vue";
 import { CloseOutlined } from "@ant-design/icons-vue";
 import { store } from "@/store/store";
 import { store } from "@/store/store";
 
 
-const urls = computed(() => {
+let urls = $computed(() => {
   return store.currentTask?.sliceUrls ?? [];
   return store.currentTask?.sliceUrls ?? [];
 });
 });
 
 

+ 1 - 6
src/features/mark/AnswerModal.vue

@@ -8,7 +8,7 @@
     @close="close"
     @close="close"
   >
   >
     <object
     <object
-      :data="answerPDFUrl"
+      :data="store.setting.subject.answerUrl"
       type="application/pdf"
       type="application/pdf"
       frameBorder="0"
       frameBorder="0"
       scrolling="auto"
       scrolling="auto"
@@ -20,13 +20,8 @@
 </template>
 </template>
 
 
 <script setup lang="ts">
 <script setup lang="ts">
-import { computed } from "vue";
 import { store } from "@/store/store";
 import { store } from "@/store/store";
 
 
-const answerPDFUrl = computed(() => {
-  return store.setting.subject.answerUrl;
-});
-
 const close = () => {
 const close = () => {
   store.setting.uiSetting["answer.modal"] = false;
   store.setting.uiSetting["answer.modal"] = false;
 };
 };

+ 2 - 9
src/features/mark/CommonMarkBody.vue

@@ -55,14 +55,7 @@
 </template>
 </template>
 
 
 <script setup lang="ts">
 <script setup lang="ts">
-import {
-  computed,
-  onMounted,
-  onUnmounted,
-  reactive,
-  watch,
-  watchEffect,
-} from "vue";
+import { onMounted, onUnmounted, reactive, watch, watchEffect } from "vue";
 import { store } from "@/store/store";
 import { store } from "@/store/store";
 import MarkDrawTrack from "./MarkDrawTrack.vue";
 import MarkDrawTrack from "./MarkDrawTrack.vue";
 import type {
 import type {
@@ -469,7 +462,7 @@ watch(
 // end: 计算裁切图和裁切图上的分数轨迹和特殊标记轨迹
 // end: 计算裁切图和裁切图上的分数轨迹和特殊标记轨迹
 
 
 // start: 放大缩小和之后的滚动
 // start: 放大缩小和之后的滚动
-const answerPaperScale = computed(() => {
+let answerPaperScale = $computed(() => {
   // 放大、缩小不影响页面之前的滚动条定位
   // 放大、缩小不影响页面之前的滚动条定位
   let percentWidth = 0;
   let percentWidth = 0;
   let percentTop = 0;
   let percentTop = 0;

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

@@ -34,7 +34,7 @@
 </template>
 </template>
 
 
 <script setup lang="ts">
 <script setup lang="ts">
-import { computed, onMounted, watch } from "vue";
+import { onMounted, watch } from "vue";
 import {
 import {
   clearMarkTask,
   clearMarkTask,
   getGroup,
   getGroup,
@@ -194,7 +194,7 @@ watch(
   }
   }
 );
 );
 
 
-const showMarkBoardTrack = computed(() => {
+let showMarkBoardTrack = $computed(() => {
   return store.setting.mode === ModeEnum.TRACK;
   return store.setting.mode === ModeEnum.TRACK;
 });
 });
 
 

+ 2 - 2
src/features/mark/MarkBoardKeyBoard.vue

@@ -150,7 +150,7 @@
 <script setup lang="ts">
 <script setup lang="ts">
 import type { Question } from "@/types";
 import type { Question } from "@/types";
 import { isNumber } from "lodash";
 import { isNumber } from "lodash";
-import { computed, onMounted, onUnmounted, watch } from "vue";
+import { onMounted, onUnmounted, watch } 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";
@@ -378,7 +378,7 @@ function submit() {
   }
   }
 }
 }
 
 
-const buttonHeightForSelective = computed(() =>
+let buttonHeightForSelective = $computed(() =>
   store.setting.selective && store.setting.enableAllZero ? "36px" : "76px"
   store.setting.selective && store.setting.enableAllZero ? "36px" : "76px"
 );
 );
 </script>
 </script>

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

@@ -137,7 +137,6 @@ import { store } from "@/store/store";
 import { keyMouse } from "./use/keyboardAndMouse";
 import { keyMouse } from "./use/keyboardAndMouse";
 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";
-import { computed } from "vue";
 
 
 const emit = defineEmits(["submit", "allZeroSubmit", "unselectiveSubmit"]);
 const emit = defineEmits(["submit", "allZeroSubmit", "unselectiveSubmit"]);
 const { toggleKeyMouse } = keyMouse();
 const { toggleKeyMouse } = keyMouse();
@@ -201,7 +200,7 @@ function submit() {
   }
   }
 }
 }
 
 
-const buttonHeightForSelective = computed(() =>
+let buttonHeightForSelective = $computed(() =>
   store.setting.selective && store.setting.enableAllZero ? "36px" : "76px"
   store.setting.selective && store.setting.enableAllZero ? "36px" : "76px"
 );
 );
 </script>
 </script>

+ 2 - 2
src/features/mark/MarkBoardTrack.vue

@@ -180,7 +180,7 @@
 <script setup lang="ts">
 <script setup lang="ts">
 import type { Question } from "@/types";
 import type { Question } from "@/types";
 import { isNumber } from "lodash";
 import { isNumber } from "lodash";
-import { computed, onMounted, onUnmounted, watch } from "vue";
+import { onMounted, onUnmounted } from "vue";
 import { store } from "@/store/store";
 import { store } from "@/store/store";
 import { autoChooseFirstQuestion } from "./use/autoChooseFirstQuestion";
 import { autoChooseFirstQuestion } from "./use/autoChooseFirstQuestion";
 import { message } from "ant-design-vue";
 import { message } from "ant-design-vue";
@@ -363,7 +363,7 @@ function submit() {
   }
   }
 }
 }
 
 
-const buttonHeightForSelective = computed(() =>
+let buttonHeightForSelective = $computed(() =>
   store.setting.selective &&
   store.setting.selective &&
   store.setting.enableAllZero &&
   store.setting.enableAllZero &&
   !store.setting.forceSpecialTag
   !store.setting.forceSpecialTag

+ 2 - 2
src/features/mark/MarkDrawTrack.vue

@@ -26,7 +26,7 @@
 <script setup lang="ts">
 <script setup lang="ts">
 import { ModeEnum } from "@/types";
 import { ModeEnum } from "@/types";
 import type { SpecialTag, Track } from "@/types";
 import type { SpecialTag, Track } from "@/types";
-import { computed, toRefs, watch } from "vue";
+import { toRefs, watch } from "vue";
 import { store } from "@/store/store";
 import { store } from "@/store/store";
 
 
 const props = defineProps<{
 const props = defineProps<{
@@ -39,7 +39,7 @@ const props = defineProps<{
 }>();
 }>();
 const { trackList } = toRefs(props);
 const { trackList } = toRefs(props);
 
 
-const isTrackMode = computed(() => store.setting.mode === ModeEnum.TRACK);
+let isTrackMode = $computed(() => store.setting.mode === ModeEnum.TRACK);
 
 
 const computeTopAndLeft = (track: Track | SpecialTag) => {
 const computeTopAndLeft = (track: Track | SpecialTag) => {
   const topInsideSlice = track.offsetY - props.dy;
   const topInsideSlice = track.offsetY - props.dy;

+ 6 - 6
src/features/mark/MarkHeader.vue

@@ -332,7 +332,7 @@
 
 
 <script setup lang="ts">
 <script setup lang="ts">
 import { doLogout, updateUISetting } from "@/api/markPage";
 import { doLogout, updateUISetting } from "@/api/markPage";
-import { computed, watch, watchEffect } from "vue";
+import { watch, watchEffect } from "vue";
 import { store } from "@/store/store";
 import { store } from "@/store/store";
 import { ModeEnum } from "@/types";
 import { ModeEnum } from "@/types";
 import MarkChangeProfile from "./MarkChangeProfile.vue";
 import MarkChangeProfile from "./MarkChangeProfile.vue";
@@ -342,11 +342,11 @@ import { isNumber } from "lodash";
 import { Modal } from "ant-design-vue";
 import { Modal } from "ant-design-vue";
 import gsap from "gsap";
 import gsap from "gsap";
 
 
-const modeName = computed(() =>
+let modeName = $computed(() =>
   store.setting.mode === ModeEnum.TRACK ? "轨迹模式" : "普通模式"
   store.setting.mode === ModeEnum.TRACK ? "轨迹模式" : "普通模式"
 );
 );
 
 
-const exchangeModeName = computed(() =>
+let exchangeModeName = $computed(() =>
   store.setting.mode === ModeEnum.TRACK ? "普通模式" : "轨迹模式"
   store.setting.mode === ModeEnum.TRACK ? "普通模式" : "轨迹模式"
 );
 );
 
 
@@ -365,7 +365,7 @@ async function toggleSettingMode() {
   window.location.reload();
   window.location.reload();
 }
 }
 
 
-const progress = computed(() => {
+let progress = $computed(() => {
   const { totalCount, markedCount } = store.status;
   const { totalCount, markedCount } = store.status;
   if (totalCount <= 0) return 0;
   if (totalCount <= 0) return 0;
   let p = markedCount / totalCount;
   let p = markedCount / totalCount;
@@ -421,11 +421,11 @@ watchEffect(() => {
   }
   }
 });
 });
 
 
-const personCountAnimated = computed(() => {
+let personCountAnimated = $computed(() => {
   if (store.status.personCountTweenedNumber === undefined) return "-";
   if (store.status.personCountTweenedNumber === undefined) return "-";
   return Number(store.status.personCountTweenedNumber).toFixed(0);
   return Number(store.status.personCountTweenedNumber).toFixed(0);
 });
 });
-const todoMarkCountAnimated = computed(() => {
+let todoMarkCountAnimated = $computed(() => {
   if (store.status.totalCount === undefined) return "-";
   if (store.status.totalCount === undefined) return "-";
   return Number(store.status.todoMarkCountTweenedNumber).toFixed(0);
   return Number(store.status.todoMarkCountTweenedNumber).toFixed(0);
 });
 });

+ 1 - 5
src/features/mark/PaperModal.vue

@@ -8,7 +8,7 @@
     @close="close"
     @close="close"
   >
   >
     <object
     <object
-      :data="paperPDFUrl"
+      :data="store.setting.subject.paperUrl"
       type="application/pdf"
       type="application/pdf"
       frameBorder="0"
       frameBorder="0"
       scrolling="auto"
       scrolling="auto"
@@ -20,12 +20,8 @@
 </template>
 </template>
 
 
 <script setup lang="ts">
 <script setup lang="ts">
-import { computed } from "vue";
 import { store } from "@/store/store";
 import { store } from "@/store/store";
 
 
-const paperPDFUrl = computed(() => {
-  return store.setting.subject.paperUrl;
-});
 const close = () => {
 const close = () => {
   store.setting.uiSetting["paper.modal"] = false;
   store.setting.uiSetting["paper.modal"] = false;
 };
 };

+ 4 - 7
src/features/student/importInspect/ImportInspect.vue

@@ -15,7 +15,7 @@
 </template>
 </template>
 
 
 <script setup lang="ts">
 <script setup lang="ts">
-import { computed, onMounted } from "vue";
+import { onMounted } from "vue";
 import {
 import {
   getInspectedSetting,
   getInspectedSetting,
   getSingleInspectedTask,
   getSingleInspectedTask,
@@ -83,9 +83,9 @@ async function updateTask() {
   }
   }
 }
 }
 
 
-const isCurrentTagged = computed(() => tagIds.includes(currentStudentId));
-const isFirst = computed(() => studentIds.indexOf(currentStudentId) === 0);
-const isLast = computed(
+let isCurrentTagged = $computed(() => tagIds.includes(currentStudentId));
+let isFirst = $computed(() => studentIds.indexOf(currentStudentId) === 0);
+let isLast = $computed(
   () => studentIds.indexOf(currentStudentId) === studentIds.length - 1
   () => studentIds.indexOf(currentStudentId) === studentIds.length - 1
 );
 );
 
 
@@ -110,9 +110,6 @@ onMounted(async () => {
   await fetchTask(true, true);
   await fetchTask(true, true);
 });
 });
 
 
-const realStudentId = computed(
-  () => (isSingleStudent ? studentId : store.currentTask?.studentId) as string
-);
 const saveTaskToServer = async () => {
 const saveTaskToServer = async () => {
   const mkey = "save_task_key";
   const mkey = "save_task_key";
   message.loading({ content: "标记评卷任务...", key: mkey });
   message.loading({ content: "标记评卷任务...", key: mkey });

+ 4 - 13
src/features/student/importInspect/MarkBoardInspect.vue

@@ -92,7 +92,7 @@
 
 
 <script setup lang="ts">
 <script setup lang="ts">
 import type { Question } from "@/types";
 import type { Question } from "@/types";
-import { computed, reactive, watch } from "vue";
+import { reactive, watch } from "vue";
 import { store } from "@/store/store";
 import { store } from "@/store/store";
 
 
 const emit = defineEmits(["makeTag", "fetchTask"]);
 const emit = defineEmits(["makeTag", "fetchTask"]);
@@ -106,17 +106,17 @@ watch(
     checkedQuestions.splice(0);
     checkedQuestions.splice(0);
   }
   }
 );
 );
-const groups = computed(() => {
+let groups = $computed(() => {
   const gs = store.currentTask?.questionList.map((q) => q.groupNumber);
   const gs = store.currentTask?.questionList.map((q) => q.groupNumber);
   return [...new Set(gs)].sort((a, b) => a - b);
   return [...new Set(gs)].sort((a, b) => a - b);
 });
 });
 
 
-const questions = $computed(() => {
+let questions = $computed(() => {
   const qs = store.currentTask?.questionList;
   const qs = store.currentTask?.questionList;
   return qs;
   return qs;
 });
 });
 
 
-const markerScore = computed(() => store.currentTask?.markerScore || 0);
+let markerScore = $computed(() => store.currentTask?.markerScore || 0);
 
 
 function addToCheckedQuestion(question: Question) {
 function addToCheckedQuestion(question: Question) {
   checkedQuestions.push(question);
   checkedQuestions.push(question);
@@ -136,15 +136,6 @@ function questionChecked(question: Question) {
   return checkedQuestions.includes(question);
   return checkedQuestions.includes(question);
 }
 }
 
 
-function questionCheckChanged(question: Question) {
-  const checked = questionChecked(question);
-  if (checked) {
-    removeCheckedQuestion(question);
-  } else {
-    addToCheckedQuestion(question);
-  }
-}
-
 function groupClicked(groupNumber: number) {
 function groupClicked(groupNumber: number) {
   if (groupChecked(groupNumber)) {
   if (groupChecked(groupNumber)) {
     checkedQuestions
     checkedQuestions

+ 3 - 3
src/features/student/inspect/Inspect.vue

@@ -15,7 +15,7 @@
 </template>
 </template>
 
 
 <script setup lang="ts">
 <script setup lang="ts">
-import { computed, onMounted, watch } from "vue";
+import { onMounted, watch } from "vue";
 import {
 import {
   clearInspectedTask,
   clearInspectedTask,
   getInspectedSetting,
   getInspectedSetting,
@@ -31,7 +31,7 @@ import { useRoute } from "vue-router";
 import MarkBody from "./MarkBody.vue";
 import MarkBody from "./MarkBody.vue";
 import MarkHistory from "@/features/mark/MarkHistory.vue";
 import MarkHistory from "@/features/mark/MarkHistory.vue";
 import MarkBoardInspect from "./MarkBoardInspect.vue";
 import MarkBoardInspect from "./MarkBoardInspect.vue";
-import type { Question, Task, Setting } from "@/types";
+import type { Question, Task } from "@/types";
 import { message } from "ant-design-vue";
 import { message } from "ant-design-vue";
 import { getPaper } from "@/api/jsonMark";
 import { getPaper } from "@/api/jsonMark";
 import { getInspectedHistory } from "@/api/inspectPage";
 import { getInspectedHistory } from "@/api/inspectPage";
@@ -160,7 +160,7 @@ async function getOneOfStuTask() {
   });
   });
 }
 }
 
 
-const realStudentId = $computed(
+let realStudentId = $computed(
   () => (isSingleStudent ? studentId : store.currentTask?.studentId) as string
   () => (isSingleStudent ? studentId : store.currentTask?.studentId) as string
 );
 );
 const saveTaskToServer = async () => {
 const saveTaskToServer = async () => {

+ 4 - 4
src/features/student/inspect/MarkBoardInspect.vue

@@ -112,7 +112,7 @@
 <script setup lang="ts">
 <script setup lang="ts">
 import type { Question } from "@/types";
 import type { Question } from "@/types";
 import { message } from "ant-design-vue";
 import { message } from "ant-design-vue";
-import { computed, reactive, watch } from "vue";
+import { reactive, watch } from "vue";
 import { store } from "@/store/store";
 import { store } from "@/store/store";
 
 
 const emit = defineEmits(["inspect", "reject"]);
 const emit = defineEmits(["inspect", "reject"]);
@@ -124,17 +124,17 @@ watch(
     checkedQuestions.splice(0);
     checkedQuestions.splice(0);
   }
   }
 );
 );
-const groups = computed(() => {
+let groups = $computed(() => {
   const gs = store.currentTask?.questionList.map((q) => q.groupNumber);
   const gs = store.currentTask?.questionList.map((q) => q.groupNumber);
   return [...new Set(gs)].sort((a, b) => a - b);
   return [...new Set(gs)].sort((a, b) => a - b);
 });
 });
 
 
-const questions = $computed(() => {
+let questions = $computed(() => {
   const qs = store.currentTask?.questionList;
   const qs = store.currentTask?.questionList;
   return qs;
   return qs;
 });
 });
 
 
-const markerScore = computed(() => store.currentTask?.markerScore || 0);
+let markerScore = $computed(() => store.currentTask?.markerScore || 0);
 
 
 function addToCheckedQuestion(question: Question) {
 function addToCheckedQuestion(question: Question) {
   checkedQuestions.push(question);
   checkedQuestions.push(question);

+ 2 - 2
src/features/student/inspect/MarkBody.vue

@@ -26,7 +26,7 @@
 </template>
 </template>
 
 
 <script setup lang="ts">
 <script setup lang="ts">
-import { computed, reactive, watch } from "vue";
+import { reactive, watch } from "vue";
 import { store } from "@/store/store";
 import { store } from "@/store/store";
 import MarkDrawTrack from "./MarkDrawTrack.vue";
 import MarkDrawTrack from "./MarkDrawTrack.vue";
 import type { SpecialTag, Track } from "@/types";
 import type { SpecialTag, Track } from "@/types";
@@ -134,7 +134,7 @@ const renderPaperAndMark = async () => {
 
 
 watch(() => store.currentTask, renderPaperAndMark);
 watch(() => store.currentTask, renderPaperAndMark);
 
 
-const answerPaperScale = computed(() => {
+let answerPaperScale = $computed(() => {
   // 放大、缩小不影响页面之前的滚动条定位
   // 放大、缩小不影响页面之前的滚动条定位
   let percentWidth = 0;
   let percentWidth = 0;
   let percentTop = 0;
   let percentTop = 0;

+ 0 - 32
src/plugins/axiosCache.ts

@@ -1,32 +0,0 @@
-import { AxiosInstance } from "axios";
-
-export default function (axios: AxiosInstance, regexes: [RegExp] | []) {
-  // cachingGet
-  const cache = new Map();
-
-  return function cachedGet(url: string) {
-    const key = url;
-
-    if (regexes.some((regex) => url.match(regex))) {
-      if (cache.has(key)) {
-        const request = cache.get(key);
-        // console.log("cache.get(key):" + request.then(v => console.log(v)));
-        return request;
-      } else {
-        // @ts-ignore
-        const request = axios.get(...arguments);
-        return request.then((v) => {
-          if (v.status === 200) {
-            // 如果能取到数据,才缓存
-            cache.set(key, request);
-          }
-          return request;
-        });
-      }
-    } else {
-      // @ts-ignore
-      const request = axios.get(...arguments);
-      return request;
-    }
-  };
-}

+ 0 - 18
src/plugins/axiosNoAuth.ts

@@ -1,15 +1,12 @@
-import Vue from "vue";
 import axios from "axios";
 import axios from "axios";
 // @ts-ignore
 // @ts-ignore
 import { loadProgressBar } from "axios-progress-bar";
 import { loadProgressBar } from "axios-progress-bar";
-import cachingGet from "./axiosCache";
 import axiosRetry from "axios-retry";
 import axiosRetry from "axios-retry";
 import { message } from "ant-design-vue";
 import { message } from "ant-design-vue";
 
 
 const config = {
 const config = {
   timeout: 60 * 1000, // Timeout
   timeout: 60 * 1000, // Timeout
 };
 };
-const cacheGetUrls: [RegExp] | [] = [];
 
 
 const _axiosNoAuth = axios.create(config);
 const _axiosNoAuth = axios.create(config);
 axiosRetry(_axiosNoAuth);
 axiosRetry(_axiosNoAuth);
@@ -58,21 +55,6 @@ _axiosNoAuth.interceptors.response.use(
   }
   }
 );
 );
 
 
-_axiosNoAuth.get = cachingGet(_axiosNoAuth, cacheGetUrls);
 loadProgressBar(null, _axiosNoAuth);
 loadProgressBar(null, _axiosNoAuth);
 
 
-// Plugin.install = function (Vue) {
-//   Object.defineProperties(Vue.prototype, {
-//     $httpNoAuth: {
-//       get() {
-//         return _axiosNoAuth;
-//       },
-//     },
-//   });
-// };
-
-// Vue.use(Plugin);
-
-export default Plugin;
-
 export const httpNoAuth = _axiosNoAuth;
 export const httpNoAuth = _axiosNoAuth;