소스 검색

保存监控老师需带上批次

Michael Wang 4 년 전
부모
커밋
a48b534ed9
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 2
      src/api/examwork-invigilate.js
  2. 1 1
      src/features/examwork/InvigilateManagement/InvigilateManagementDialog.vue

+ 2 - 2
src/api/examwork-invigilate.js

@@ -18,7 +18,7 @@ export function searchInvigilators({
   );
 }
 
-export function saveInvigilator({ roomCode = "", userIds = "" }) {
-  const data = pickBy({ roomCode, userIds }, (v) => v !== "");
+export function saveInvigilator({ examId = "", roomCode = "", userIds = "" }) {
+  const data = pickBy({ examId, roomCode, userIds }, (v) => v !== "");
   return httpApp.post("/api/admin/invigilateUser/save", data);
 }

+ 1 - 1
src/features/examwork/InvigilateManagement/InvigilateManagementDialog.vue

@@ -80,7 +80,7 @@ export default {
       let data = this.form;
       try {
         this.loading = true;
-        await saveInvigilator(data);
+        await saveInvigilator({ examId: this.examId, ...data });
         this.$emit("reload");
         this.$notify({ title: "保存成功", type: "success" });
         this.closeDialog();