<style>

</style>
<!--考试管理-->
<template>
  <div class="page-body">
    <div class="page-search row items-center">
      <div class="col row wrap q-mr-lg q-col-gutter-md">
        <div class="col-3">
          <q-input @change="getList" clearable filled v-model="msg.PaperName" @clear="getList" maxlength="20"
            label="输入试卷名称" />
        </div>
      </div>
      <div class="page-option"></div>
    </div>
    <div class="page-content">
      <exampublishlist :dataList="dataList" :loading="loading" @close="closeExamPublishForm" @success="refreshPage">
      </exampublishlist>
      <q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
        :input="true" @input="changePage" />
    </div>
  </div>
</template>
<script>
  import {
    queryPublishExamPage,
  } from "../../api/teacher/index";
  import exampublishlist from "../../components/exam/exampublishlist"
  export default {
    components: {
      exampublishlist
    },
    meta: {
      title: "考试管理",
    },
    data() {
      return {
        data: [],
        msg: {
          pageIndex: 1,
          pageSize: 10,
          rowsPerPage: 10,
          PaperName: "", //试卷名称
        },
        pageCount: 0,
        loading: false,
        dataList: [],
      };
    },
    created() {},
    mounted() {
      this.getList();
    },
    methods: {
      //翻页
      changePage(val) {
        this.msg.pageIndex = val;
        this.getList();
      },
      //获取菜单分页列表
      getList() {
        this.loading = true;
        this.dataList = [];
        queryPublishExamPage(this.msg)
          .then((res) => {
            this.loading = false;
            this.dataList = res.Data.PageData;
            this.pageCount = res.Data.PageCount;
          })
          .catch(() => {
            this.loading = false;
          });
      },
      //刷新页面
      refreshPage() {
        this.getList();
      },
      //关闭弹窗
      closeExamPublishForm() {

      },
    },
  };

</script>
<style lang="sass">
  @import url('~assets/css/table.sass')

</style>
