|
@@ -30,6 +30,9 @@
|
|
|
<el-form-item label="教学班级">
|
|
|
<el-input v-model.trim="form.classNo"></el-input>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="相片">
|
|
|
+ <BasePhotoStateSelect v-model="form.hasPhoto" />
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="handleCurrentChange(0)"
|
|
|
>查询</el-button
|
|
@@ -51,7 +54,12 @@
|
|
|
@click="toggleEnableExamStudentArray({ enable: 0 })"
|
|
|
>禁用</el-button
|
|
|
>
|
|
|
- <!-- <el-button>导入</el-button> -->
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="icon icon-upload"
|
|
|
+ @click="exportExamStudent"
|
|
|
+ >导出</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -93,8 +101,18 @@
|
|
|
<el-table-column width="170" label="教学班级">
|
|
|
<span slot-scope="scope">{{ scope.row.classNo }}</span>
|
|
|
</el-table-column>
|
|
|
- <el-table-column :context="_self" label="操作" width="210">
|
|
|
+ <el-table-column :context="_self" label="操作" width="260">
|
|
|
<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>
|
|
@@ -122,6 +140,14 @@
|
|
|
/>
|
|
|
</div>
|
|
|
|
|
|
+ <el-dialog
|
|
|
+ title="底照"
|
|
|
+ :visible.sync="basePhotoDialogVisible"
|
|
|
+ destroy-on-close
|
|
|
+ >
|
|
|
+ <img :src="selectedBasePhoto" style="width: 400px;" />
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
<ExamStudentManagementDialog
|
|
|
ref="theDialog"
|
|
|
:examId="examId"
|
|
@@ -133,6 +159,7 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
+ exportExamStudent,
|
|
|
searchExamStudents,
|
|
|
toggleEnableExamStudent,
|
|
|
toggleEnableExamStudentArray,
|
|
@@ -160,6 +187,7 @@ export default {
|
|
|
identity: "",
|
|
|
grade: "",
|
|
|
classNo: "",
|
|
|
+ hasPhoto: null,
|
|
|
},
|
|
|
rules: {
|
|
|
examId: [{ required: true, message: "批次必选" }],
|
|
@@ -169,6 +197,8 @@ export default {
|
|
|
pageSize: 10,
|
|
|
total: 10,
|
|
|
selected: {},
|
|
|
+ selectedBasePhoto: null,
|
|
|
+ basePhotoDialogVisible: false,
|
|
|
};
|
|
|
},
|
|
|
async created() {},
|
|
@@ -228,6 +258,21 @@ export default {
|
|
|
this.$notify({ title: "操作成功", type: "success" });
|
|
|
this.searchForm();
|
|
|
},
|
|
|
+ openBasePhotoDialog(url) {
|
|
|
+ this.selectedBasePhoto = url;
|
|
|
+ this.basePhotoDialogVisible = true;
|
|
|
+ },
|
|
|
+ async exportExamStudent() {
|
|
|
+ try {
|
|
|
+ const valid = await this.$refs.form.validate();
|
|
|
+ if (!valid) return;
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ await exportExamStudent(this.form);
|
|
|
+ this.$notify({ title: "导出任务已成功启动", type: "success" });
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|