Pārlūkot izejas kodu

命题任务uuid调整

zhangjie 1 gadu atpakaļ
vecāks
revīzija
2eed428a29

+ 3 - 2
src/modules/card/components/CardBuildDialog.vue

@@ -132,6 +132,7 @@ export default {
       const res = await tikuPaperDetail({
         examId: this.presetData.examId,
         paperId: this.presetData.paperId,
+        uuid: this.presetData.uuid,
       }).catch(() => {});
       if (!res) {
         this.emitResult({ success: false, message: "试卷内容获取失败" });
@@ -141,7 +142,7 @@ export default {
       // 构建题卡
       try {
         this.paperInfo = {
-          uuid: res.uuid,
+          uuid: this.presetData.uuid,
           attachmentId: res.attachmentId,
         };
         const paperJson = res.paperJson ? JSON.parse(res.paperJson) : {};
@@ -238,7 +239,7 @@ export default {
       });
     },
     emitResult(data) {
-      console.log(data);
+      // console.log(data);
       this.loading = false;
       this.$emit("confirm", data);
       this.cancel();

+ 2 - 5
src/modules/exam/api.js

@@ -174,11 +174,8 @@ export const uploadOrFindExamTaskStudent = (datas) => {
 export const tikuPaperListQuery = (datas) => {
   return $postParam("/api/admin/exam/task/page_tiku_paper", datas);
 };
-export const tikuPaperDetail = ({ examId, paperId }) => {
-  return $postParam("/api/admin/exam/task/get_tiku_paper_data", {
-    examId,
-    paperId,
-  });
+export const tikuPaperDetail = (datas) => {
+  return $postParam("/api/admin/exam/task/get_tiku_paper_data", datas);
 };
 
 // task-review-manage

+ 3 - 1
src/modules/exam/components/createExamAndPrintTask/CreateExamAndPrintTask.vue

@@ -100,6 +100,7 @@ import { teacherSubmitTaskApply } from "../../api";
 import InfoExamTask from "./InfoExamTask";
 import InfoPrintTask from "./InfoPrintTask";
 import SelectUserDialog from "../../../base/components/SelectUserDialog";
+import { randomCode } from "@/plugins/utils";
 
 const initExamTask = {
   semesterId: "",
@@ -112,6 +113,7 @@ const initExamTask = {
   teachingRoomId: "",
   teacherName: "",
   paperName: "",
+  uuid: "",
 };
 
 const initExamTaskDetail = {
@@ -250,7 +252,7 @@ export default {
       });
 
       const infos = {
-        infoExamTask: { ...initExamTask },
+        infoExamTask: { ...initExamTask, uuid: randomCode(32) },
         infoExamTaskDetail,
         infoPrintTask: { ...initPrintTask },
         infoExamPrintPlan: { ...initPrintPlan },

+ 1 - 0
src/modules/exam/components/createExamAndPrintTask/InfoExamTask.vue

@@ -808,6 +808,7 @@ export default {
         createMethod: "STANDARD",
         paperId: data.id,
         paperName: data.name,
+        uuid: this.examTask.uuid,
       };
       this.$refs.CardBuildDialog.open();
     },