qirong
2023-11-28 d44a2361fa5173f0421ec05921bde28d59614d45
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<template>
  <div class="app-container">
        <el-form :model="queryParam" ref="queryForm" :inline="true">
          <el-form-item label="用户名:">
            <el-input v-model="queryParam.userName" clearable></el-input>
          </el-form-item>
          <el-form-item label="模板名:">
            <el-input v-model="queryParam.templatesName" clearable></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="submitForm">查询</el-button>
          </el-form-item>
        </el-form>
 
    <el-table v-loading="listLoading" :data="tableData" border fit highlight-current-row style="width: 100%">
 
      <el-table-column prop="name" label="名称"  />
      <el-table-column prop="userName" label="用户名"  width="120px" />
      <el-table-column prop="count" label="数量"  width="120px" />
      <el-table-column  label="操作" align="center"  width="160px">
        <template slot-scope="{row}">
          <el-button size="mini" @click="$router.push({path:'/exam/personalSimulation/list/mathList',query:{id:row.id,userId:row.userId}})" >详情</el-button>
 
        </template>
      </el-table-column>
    </el-table>
    <pagination v-show="total>0" :total="total" :page.sync="queryParam.pageIndex" :limit.sync="queryParam.pageSize"
                @pagination="search"/>
  </div>
</template>
 
<script>
import { mapGetters, mapState, mapActions } from 'vuex'
import Pagination from '@/components/Pagination'
import examPaperApi from '@/api/examPaper'
 
export default {
  components: { Pagination },
  data () {
    return {
      queryParam: {
        pageIndex: 1,
        pageSize: 10,
        templatesName:'',
        userName:''
      },
      subjectFilter: null,
      listLoading: true,
      tableData: [],
      total: 0
    }
  },
  created () {
    this.search()
  },
  methods: {
    submitForm () {
      this.queryParam.pageIndex = 1
      this.search()
    },
    search () {
      this.listLoading = true
      examPaperApi.selfPaList(this.queryParam).then(data => {
        const re = data.response
        this.tableData = re.list
        this.total = re.total
        this.queryParam.pageIndex = re.pageNum
        this.listLoading = false
      })
    },
 
  },
 
}
</script>