瀏覽代碼

feat: AI智能评卷待复核

zhangjie 2 月之前
父節點
當前提交
45078b3f84
共有 2 個文件被更改,包括 33 次插入1 次删除
  1. 4 1
      src/modules/mark/api.js
  2. 29 0
      src/modules/mark/components/ScoreCheckDetail.vue

+ 4 - 1
src/modules/mark/api.js

@@ -214,7 +214,10 @@ export const scoreDetailHistoryExport = (datas) => {
     responseType: "blob",
   });
 };
-
+// AI智能评卷待复核列表
+export const scoreDetailAiCheckList = (datas) => {
+  return $postParam("/api/admin/mark/inspected/ai/mark/getTask/count", datas);
+};
 // score manage --------->
 export const scoreListPage = (datas) => {
   return $postParam("/api/admin/mark/archive/score/list", datas);

+ 29 - 0
src/modules/mark/components/ScoreCheckDetail.vue

@@ -247,6 +247,14 @@
             >
           </el-dropdown-menu>
         </el-dropdown>
+        <el-button
+          v-if="checkPrivilege('button', 'BatchInspectedSubjective')"
+          class="ml-2"
+          type="primary"
+          @click="toAiCheck"
+        >
+          AI智能评卷待复核({{ aiCheckList.length }})
+        </el-button>
         <el-button
           v-if="checkPrivilege('button', 'ScoreExport')"
           class="ml-2"
@@ -430,6 +438,7 @@ import {
   objectiveScoreCalculate,
   scoreDetailListExport,
   scoreDetailHistoryExport,
+  scoreDetailAiCheckList,
 } from "../api";
 import SimpleImagePreview from "@/components/SimpleImagePreview";
 import markMinxin from "../markMinxin";
@@ -480,6 +489,7 @@ export default {
       loading: false,
       multipleSelection: [],
       downloading: false,
+      aiCheckList: [],
       // img view
       curImage: {},
       curImageIndex: 0,
@@ -503,6 +513,7 @@ export default {
     },
     initData() {
       this.search();
+      this.getAiCheckList();
     },
     async getList() {
       const datas = {
@@ -575,6 +586,24 @@ export default {
         });
       }
     },
+    async getAiCheckList() {
+      const res = await scoreDetailAiCheckList({
+        examId: this.instance.examId,
+        paperNumber: this.instance.paperNumber,
+      });
+      this.aiCheckList = (res || []).map((item) => item.studentId);
+    },
+    toAiCheck() {
+      if (!this.aiCheckList.length) {
+        this.$message.error("当前无待复核数据");
+        return;
+      }
+      this.toMarkSubjectiveAnswer({
+        examId: this.instance.examId,
+        paperNumber: this.instance.paperNumber,
+        studentIds: this.aiCheckList,
+      });
+    },
     toCheckQuestion(row, type) {
       if (type === "objective") {
         this.toMarkObjectiveAnswer([row.studentId]);