123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <template>
- <el-dialog
- class="print-task-students"
- :visible.sync="modalIsShow"
- title="考生明细"
- top="10vh"
- width="700px"
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- append-to-body
- @open="visibleChange"
- >
- <el-table border ref="TableList" :data="dataList">
- <el-table-column
- type="index"
- label="序号"
- width="70"
- :index="indexMethod"
- ></el-table-column>
- <el-table-column prop="studentName" label="姓名"></el-table-column>
- <el-table-column prop="studentCode" label="学号"></el-table-column>
- <el-table-column prop="clazz" label="班级"></el-table-column>
- </el-table>
- <div class="part-page">
- <el-pagination
- v-if="dataList.length"
- background
- layout="total, sizes, prev, pager, next, jumper"
- :pager-count="5"
- :current-page="current"
- :total="total"
- :page-size="size"
- @current-change="toPage"
- @size-change="pageSizeChange"
- >
- </el-pagination>
- </div>
- <div slot="footer"></div>
- </el-dialog>
- </template>
- <script>
- import { listTaskPrintStudent } from "../api";
- export default {
- name: "print-task-students",
- props: {
- classId: {
- type: String,
- default: "",
- },
- },
- data() {
- return {
- modalIsShow: false,
- isSubmit: false,
- params: "",
- dataList: [],
- current: 1,
- size: this.GLOBAL.pageSize,
- total: 0,
- };
- },
- methods: {
- visibleChange() {
- this.toPage(1);
- },
- async getList() {
- const data = await listTaskPrintStudent({
- classId: this.classId,
- pageNumber: this.current,
- pageSize: this.size,
- });
- this.dataList = data.records;
- this.total = data.total;
- },
- toPage(page) {
- this.current = page;
- this.getList();
- },
- cancel() {
- this.modalIsShow = false;
- },
- open() {
- this.modalIsShow = true;
- },
- },
- };
- </script>
|