Forráskód Böngészése

考生编辑新增考场名称

zhangjie 3 éve
szülő
commit
391f03f5a4

+ 2 - 0
src/api/examwork-examstudent.js

@@ -71,6 +71,7 @@ export function saveExamStudent({
   examId = "",
   examActivityId = "",
   roomCode = "",
+  roomName = "",
   courseCode = "",
   name = "",
   identity = "",
@@ -84,6 +85,7 @@ export function saveExamStudent({
       examId,
       examActivityId,
       roomCode,
+      roomName,
       name,
       courseCode,
       identity,

+ 4 - 1
src/components/ExamRoomSelect.vue

@@ -65,7 +65,10 @@ export default {
     },
     select() {
       this.$emit("input", this.selected);
-      this.$emit("change", this.selected);
+      this.$emit(
+        "change",
+        this.optionList.find((item) => item.roomCode === this.selected)
+      );
     },
   },
 };

+ 6 - 0
src/features/examwork/ExamStudentManagement/ExamStudentManagementDialog.vue

@@ -33,6 +33,7 @@
             :examId="form.examId"
             v-model="form.roomCode"
             styles="width: 100%"
+            @change="roomCodeChange"
           />
         </el-form-item>
       </el-row>
@@ -108,6 +109,7 @@ export default {
         examId: "",
         examActivityId: "",
         roomCode: "",
+        roomName: "",
         courseCode: "",
         name: "",
         identity: "",
@@ -134,6 +136,7 @@ export default {
           examId: "",
           examActivityId: "",
           roomCode: "",
+          roomName: "",
           courseCode: "",
           name: "",
           identity: "",
@@ -151,6 +154,9 @@ export default {
     closeDialog() {
       this.visible = false;
     },
+    roomCodeChange(val) {
+      this.form.roomName = val ? val.roomName : "";
+    },
     async submitForm() {
       try {
         const valid = await this.$refs.form.validate();