|
@@ -0,0 +1,184 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-form :model="form" inline>
|
|
|
+ <el-form-item label="批次名称">
|
|
|
+ <el-input v-model.trim="form.code"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="场次代码">
|
|
|
+ <el-input v-model.trim="form.code"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="考场名称">
|
|
|
+ <el-input v-model.trim="form.code"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="科目">
|
|
|
+ <el-input v-model.trim="form.code"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="姓名">
|
|
|
+ <el-input v-model.trim="form.code"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="证件号">
|
|
|
+ <el-input v-model.trim="form.code"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="年级">
|
|
|
+ <el-input v-model.trim="form.code"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="教学班级">
|
|
|
+ <el-input v-model.trim="form.code"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-button @click="searchForm">查询</el-button>
|
|
|
+ <el-button @click="add">新增</el-button>
|
|
|
+ <!-- <el-button>导入</el-button> -->
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <el-table :data="tableData" stripe style="width: 100%;">
|
|
|
+ <el-table-column type="selection" width="40" />
|
|
|
+ <el-table-column width="55" label="ID">
|
|
|
+ <span slot-scope="scope">{{ scope.row.id }}</span>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="200" label="场次代码">
|
|
|
+ <span slot-scope="scope">{{ scope.row.code }}</span>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="姓名">
|
|
|
+ <span slot-scope="scope">{{ scope.row.prepareSeconds / 60 }}</span>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="200" label="证件号">
|
|
|
+ <span slot-scope="scope">{{ scope.row.code }}</span>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="200" label="科目名称">
|
|
|
+ <span slot-scope="scope">{{ scope.row.code }}</span>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="200" label="科目代码">
|
|
|
+ <span slot-scope="scope">{{ scope.row.code }}</span>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="120" label="状态">
|
|
|
+ <span slot-scope="scope">{{
|
|
|
+ scope.row.enable | zeroOneEnableDisableFilter
|
|
|
+ }}</span>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="100" label="考场代码">
|
|
|
+ <span slot-scope="scope">{{
|
|
|
+ scope.row.startTime | datetimeFilter
|
|
|
+ }}</span>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="100" label="考场名称">
|
|
|
+ <span slot-scope="scope">{{ scope.row.endTime | datetimeFilter }}</span>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="120" label="年级">
|
|
|
+ <span slot-scope="scope">{{ scope.row.updateName }}</span>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column sortable width="170" label="教学班级">
|
|
|
+ <span slot-scope="scope">{{
|
|
|
+ scope.row.updateTime | datetimeFilter
|
|
|
+ }}</span>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column :context="_self" label="操作" width="210">
|
|
|
+ <div slot-scope="scope">
|
|
|
+ <el-button size="mini" type="primary" plain @click="edit(scope.row)">
|
|
|
+ 编辑
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ @click="toggleEnableActivity(scope.row)"
|
|
|
+ >
|
|
|
+ {{ scope.row.enable ? "禁用" : "启用" }}
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div class="page float-right">
|
|
|
+ <el-pagination
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="currentPage"
|
|
|
+ :page-size="pageSize"
|
|
|
+ :page-sizes="[10, 20, 50, 100, 200, 300]"
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="total"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <ExamStudentManagementDialog
|
|
|
+ ref="theDialog"
|
|
|
+ :examId="examId"
|
|
|
+ :activity="selectedActivity"
|
|
|
+ @reload="searchForm"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import {
|
|
|
+ searchActivities,
|
|
|
+ toggleEnableActivity,
|
|
|
+} from "@/api/examwork-activity";
|
|
|
+import ExamStudentManagementDialog from "./ExamStudentManagementDialog";
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: "ExamStudentManagement",
|
|
|
+ components: {
|
|
|
+ ExamStudentManagementDialog,
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ examId() {
|
|
|
+ return this.$route.params.examId;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ form: {
|
|
|
+ orgId: "",
|
|
|
+ roleCode: "",
|
|
|
+ loginName: "",
|
|
|
+ name: "",
|
|
|
+ enableState: null,
|
|
|
+ },
|
|
|
+ tableData: [],
|
|
|
+ currentPage: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ total: 10,
|
|
|
+ selectedActivity: {},
|
|
|
+ };
|
|
|
+ },
|
|
|
+ async created() {},
|
|
|
+ methods: {
|
|
|
+ async searchForm() {
|
|
|
+ const res = await searchActivities({
|
|
|
+ examId: this.examId,
|
|
|
+ code: this.form.code,
|
|
|
+ pageNumber: this.currentPage,
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ });
|
|
|
+ this.tableData = res.data.data.records.records;
|
|
|
+ this.total = res.data.data.records.total;
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.currentPage = val;
|
|
|
+ this.searchForm();
|
|
|
+ },
|
|
|
+ handleSizeChange(val) {
|
|
|
+ this.pageSize = val;
|
|
|
+ this.currentPage = 1;
|
|
|
+ this.searchForm();
|
|
|
+ },
|
|
|
+ add() {
|
|
|
+ this.selectedActivity = {};
|
|
|
+ this.$refs.theDialog.openDialog();
|
|
|
+ },
|
|
|
+ edit(activity) {
|
|
|
+ this.selectedActivity = activity;
|
|
|
+ this.$refs.theDialog.openDialog();
|
|
|
+ },
|
|
|
+ async toggleEnableActivity(activity) {
|
|
|
+ await toggleEnableActivity({
|
|
|
+ id: activity.id,
|
|
|
+ enable: activity.enable === 0 ? 1 : 0,
|
|
|
+ });
|
|
|
+ this.searchForm();
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style></style>
|