Browse Source

考生管理:查看底照

Michael Wang 4 years ago
parent
commit
ba6510df24

+ 25 - 1
src/features/examwork/ExamStudentManagement/ExamStudentManagement.vue

@@ -96,8 +96,18 @@
       <el-table-column width="170" label="教学班级">
       <el-table-column width="170" label="教学班级">
         <span slot-scope="scope">{{ scope.row.classNo }}</span>
         <span slot-scope="scope">{{ scope.row.classNo }}</span>
       </el-table-column>
       </el-table-column>
-      <el-table-column :context="_self" label="操作" width="210">
+      <el-table-column :context="_self" label="操作" width="260">
         <div slot-scope="scope">
         <div slot-scope="scope">
+          <el-button
+            size="mini"
+            type="primary"
+            plain
+            @click="openBasePhotoDialog(scope.row.basePhotoUrl)"
+            v-if="scope.row.basePhotoUrl"
+          >
+            相片
+          </el-button>
+          <span v-else style="width: 66px; display: inline-block;">无相片</span>
           <el-button size="mini" type="primary" plain @click="edit(scope.row)">
           <el-button size="mini" type="primary" plain @click="edit(scope.row)">
             编辑
             编辑
           </el-button>
           </el-button>
@@ -125,6 +135,14 @@
       />
       />
     </div>
     </div>
 
 
+    <el-dialog
+      title="底照"
+      :visible.sync="basePhotoDialogVisible"
+      destroy-on-close
+    >
+      <img :src="selectedBasePhoto" style="width: 400px;" />
+    </el-dialog>
+
     <ExamStudentManagementDialog
     <ExamStudentManagementDialog
       ref="theDialog"
       ref="theDialog"
       :examId="examId"
       :examId="examId"
@@ -173,6 +191,8 @@ export default {
       pageSize: 10,
       pageSize: 10,
       total: 10,
       total: 10,
       selected: {},
       selected: {},
+      selectedBasePhoto: null,
+      basePhotoDialogVisible: false,
     };
     };
   },
   },
   async created() {},
   async created() {},
@@ -232,6 +252,10 @@ export default {
       this.$notify({ title: "操作成功", type: "success" });
       this.$notify({ title: "操作成功", type: "success" });
       this.searchForm();
       this.searchForm();
     },
     },
+    openBasePhotoDialog(url) {
+      this.selectedBasePhoto = url;
+      this.basePhotoDialogVisible = true;
+    },
   },
   },
 };
 };
 </script>
 </script>