123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <template>
- <Modal
- class="check-data-result"
- v-model="modalIsShow"
- title="校验详情"
- :mask-closable="false"
- width="800"
- @on-visible-change="visibleChange"
- >
- <Table
- ref="TableList"
- :columns="columns"
- :data="students"
- disabled-hover
- border
- ></Table>
- <div class="part-page">
- <Page
- :current="current"
- :total="total"
- :page-size="size"
- show-total
- show-elevator
- @on-change="toPage"
- ></Page>
- </div>
- </Modal>
- </template>
- <script>
- export default {
- name: "check-data-result",
- props: {
- content: {
- type: Array,
- default() {
- return [];
- }
- }
- },
- data() {
- return {
- modalIsShow: false,
- students: [],
- columns: [
- {
- type: "index",
- title: "序号",
- width: 80,
- align: "center",
- indexMethod: row => {
- return (this.current - 1) * this.size + row._index + 1;
- }
- },
- {
- title: "姓名",
- key: "studentName",
- width: 100
- },
- {
- title: "考号",
- key: "examNumber",
- width: 120
- },
- {
- title: "错误原因",
- key: "errorMessage"
- },
- {
- title: "操作",
- key: "action",
- width: 100,
- align: "center",
- className: "table-action",
- render: (h, param) => {
- let actions = [];
- actions.push({
- icon: "ios-paper",
- attrs: {
- title: "查看"
- },
- action: () => {
- this.toView(param.row);
- }
- });
- return h("div", this.$tableIconAction(h, actions));
- }
- }
- ],
- current: 1,
- size: this.GLOBAL.pageSize,
- total: 0
- };
- },
- methods: {
- visibleChange(visible) {
- if (visible) {
- this.toPage(1);
- } else {
- this.$emit("on-close");
- }
- },
- toPage(page) {
- this.current = page;
- this.students = this.content.slice((page - 1) * this.size, this.size);
- },
- toView(row) {
- window.open(
- this.getRouterPath({
- name: "StudentScore",
- query: {
- examNumber: row.examNumber
- }
- })
- );
- },
- cancel() {
- this.modalIsShow = false;
- },
- open() {
- this.modalIsShow = true;
- }
- }
- };
- </script>
|