2
0
zhangjie 1 сар өмнө
parent
commit
aa4f7ea674

+ 2 - 1
.env.development

@@ -1 +1,2 @@
-VUE_APP_DEV_PROXY = "http://192.168.10.225";
+VUE_APP_DEV_PROXY = "http://192.168.10.225";
+VUE_APP_DEV_BASE_URL = "/web/"

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "stmms-web",
-  "version": "1.5.2",
+  "version": "1.6.0",
   "private": "true",
   "scripts": {
     "start": "vite --host 0.0.0.0",

BIN
public/1-1.jpg


+ 36 - 22
src/features/mark/MarkBoardTrack.vue

@@ -68,6 +68,17 @@
           </a-popconfirm> -->
         </div>
 
+        <qm-button
+          v-if="store.currentTask"
+          type="primary"
+          shape="round"
+          size="middle"
+          style="height: 76px; border-radius: 10px; padding: 12px"
+          :disabled="disabledArbitrateType"
+          @click="setAllUnselective"
+        >
+          未选做
+        </qm-button>
         <qm-button
           type="primary"
           shape="round"
@@ -98,27 +109,6 @@
           v-for="(question, index) in store.currentTask.questionList"
           :key="index"
         >
-          <!-- <div
-            :id="
-              store.isScoreBoardCollapsed
-                ? props.modal
-                  ? ['bq', question.mainNumber, question.subNumber].join('-')
-                  : ''
-                : ['bq', question.mainNumber, question.subNumber].join('-')
-            "
-            class="question tw-rounded tw-cursor-pointer tw-relative tw-mb-2"
-            :class="isCurrentQuestion(question) && 'current-question'"
-            @click="chooseQuestion(question)"
-            @mouseover="
-              addFocusTrack(
-                undefined,
-                question.mainNumber,
-                question.subNumber,
-                true
-              )
-            "
-            @mouseleave="removeFocusTrack"
-          > -->
           <div
             :id="
               store.isScoreBoardCollapsed
@@ -336,7 +326,7 @@ import { addFocusTrack, removeFocusTrack } from "./use/focusTracks";
 import EventBus from "@/plugins/eventBus";
 import { cloneDeep } from "lodash-es";
 import { useRoute } from "vue-router";
-import { message } from "ant-design-vue";
+import { message, Modal } from "ant-design-vue";
 
 const route = useRoute();
 // const curQuestionIndex = ref<number>(0);
@@ -722,6 +712,30 @@ function submit() {
   emit("submit");
 }
 
+function setAllUnselective() {
+  Modal.confirm({
+    centered: true,
+    mask: true,
+    zIndex: 6000,
+    width: "300px",
+    maskStyle: { opacity: 0.97 },
+    content: `当前界面未给分的选作题将全部设置为未选作,是或否?`,
+    okText: "是",
+    cancelText: "否",
+    onOk: () => {
+      store.currentTask.questionList.forEach((q, index) => {
+        if (
+          !q.selective ||
+          q.hasSetUnselective ||
+          store.currentTask?.markResult?.scoreList[index]
+        )
+          return;
+        setUnselect(q, index);
+      });
+    },
+  });
+}
+
 const buttonHeightForSelective = $computed(() =>
   store.setting.selective &&
   store.setting.enableAllZero &&

+ 11 - 2
src/features/student/studentInspect/MarkBoardInspect.vue

@@ -156,7 +156,7 @@
 
 <script setup lang="ts">
 import type { Question } from "@/types";
-import { message } from "ant-design-vue";
+import { message, Modal } from "ant-design-vue";
 import { MinusCircleFilled } from "@ant-design/icons-vue";
 import { reactive, watch } from "vue";
 import { store } from "@/store/store";
@@ -263,7 +263,16 @@ function reject() {
 }
 
 function inspect() {
-  emit("inspect");
+  if (!store.currentTaskEnsured.selectiveError) {
+    emit("inspect");
+    return;
+  }
+
+  Modal.warning({
+    zIndex: 2000,
+    title: "选择题合分异常",
+    content: `该试卷选作题有异常,存在合分不够的情况,请将异常题打回!`,
+  });
 }
 
 function onConfirmReturn(reason: string) {

+ 6 - 0
src/features/student/studentInspect/StudentInspect.vue

@@ -164,6 +164,12 @@ async function updateTask() {
   if (res.data.studentId && !res.data.inspectTime) {
     let rawTask = res.data;
     store.currentTask = addFileServerPrefixToTask(rawTask);
+    // store.currentTask.sliceUrls = [
+    //   `/web/1-1.jpg`,
+    //   `/web/1-1.jpg`,
+    //   `/web/1-1.jpg`,
+    //   `/web/1-1.jpg`,
+    // ];
     if (res.data.subject) {
       store.setting.subject = Object.assign(
         res.data.subject,

+ 1 - 1
src/main.ts

@@ -37,7 +37,7 @@ app.component("QmDialog", QmDialog);
  */
 initMarkStore();
 
-if (import.meta.env.DEV) {
+if (import.meta.env.DEV && window.localStorage.getItem("dev_simple")) {
   await import("./devLogin")
     .then((m) => {
       return m.initLogin();

+ 1 - 0
vite.config.ts

@@ -21,6 +21,7 @@ function mockDevLogin(): Plugin {
 
 // https://vitejs.dev/config/
 export default defineConfig({
+  base: env.VUE_APP_DEV_BASE_URL || undefined,
   plugins: [
     vue({
       reactivityTransform: true,