|
@@ -33,7 +33,18 @@
|
|
|
}}</span>
|
|
|
</el-table-column>
|
|
|
<el-table-column width="120" label="照片">
|
|
|
- <span slot-scope="scope">{{ scope.row.basePhotoPath }}</span>
|
|
|
+ <span slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ @click="openBasePhotoDialog(scope.row.basePhotoPath)"
|
|
|
+ v-if="scope.row.basePhotoPath"
|
|
|
+ >
|
|
|
+ 查看底照
|
|
|
+ </el-button>
|
|
|
+ <span v-else>无底照</span>
|
|
|
+ </span>
|
|
|
</el-table-column>
|
|
|
<el-table-column width="120" label="更新人">
|
|
|
<span slot-scope="scope">{{ scope.row.updateName }}</span>
|
|
@@ -45,7 +56,12 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column :context="_self" label="操作" width="260">
|
|
|
<div slot-scope="scope">
|
|
|
- <el-button size="mini" type="primary" plain @click="edit(scope.row)">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ @click="openExamRecord(scope.row)"
|
|
|
+ >
|
|
|
考试记录
|
|
|
</el-button>
|
|
|
<el-button
|
|
@@ -78,6 +94,16 @@
|
|
|
:total="total"
|
|
|
/>
|
|
|
</div>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ title="底照"
|
|
|
+ :visible.sync="basePhotoDialogVisible"
|
|
|
+ destroy-on-close
|
|
|
+ >
|
|
|
+ <img :src="selectedBasePhoto" style="width: 400px;" />
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <StudentManagementDialog ref="theDialog" :student="selectedStudent" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -87,6 +113,7 @@ import {
|
|
|
toggleEnableStudent,
|
|
|
resetStudentPassword,
|
|
|
} from "@/api/examwork-student";
|
|
|
+import StudentManagementDialog from "./StudentManagementDialog";
|
|
|
|
|
|
export default {
|
|
|
name: "StudentManagement",
|
|
@@ -101,9 +128,12 @@ export default {
|
|
|
currentPage: 1,
|
|
|
pageSize: 10,
|
|
|
total: 10,
|
|
|
- selectedUser: {},
|
|
|
+ basePhotoDialogVisible: false,
|
|
|
+ selectedBasePhoto: null,
|
|
|
+ selectedStudent: {},
|
|
|
};
|
|
|
},
|
|
|
+ components: { StudentManagementDialog },
|
|
|
async created() {},
|
|
|
methods: {
|
|
|
async searchForm() {
|
|
@@ -114,6 +144,11 @@ export default {
|
|
|
pageSize: this.pageSize,
|
|
|
});
|
|
|
this.tableData = res.data.data.records.records;
|
|
|
+ // this.tableData.forEach(
|
|
|
+ // (v) =>
|
|
|
+ // (v.basePhotoPath =
|
|
|
+ // "https://ecs-test-static.qmth.com.cn/org_logo/0/1597046412749.png")
|
|
|
+ // );
|
|
|
this.total = res.data.data.records.total;
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
@@ -125,12 +160,12 @@ export default {
|
|
|
this.currentPage = 1;
|
|
|
this.searchForm();
|
|
|
},
|
|
|
- add() {
|
|
|
- this.selectedUser = {};
|
|
|
- this.$refs.theDialog.openDialog();
|
|
|
+ openBasePhotoDialog(url) {
|
|
|
+ this.selectedBasePhoto = url;
|
|
|
+ this.basePhotoDialogVisible = true;
|
|
|
},
|
|
|
- edit(user) {
|
|
|
- this.selectedUser = user;
|
|
|
+ openExamRecord(user) {
|
|
|
+ this.selectedStudent = user;
|
|
|
this.$refs.theDialog.openDialog();
|
|
|
},
|
|
|
async toggleEnableStudent(user) {
|