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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
  | <template> 
 |    <div class="main_app"> 
 |      <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clear"> 
 |      </QueryForm> 
 |      <el-table :height="tableHeightNew" v-loading="loading" :data="list" stripe row-key="id" class="mb20" default-expand-all> 
 |        <el-table-column prop="username" label="登录账号" min-width="100"></el-table-column> 
 |        <el-table-column prop="realname" label="姓名" min-width="100"></el-table-column> 
 |        <el-table-column prop="openid" label="微信openid" min-width="100px"></el-table-column> 
 |        <el-table-column prop="createTime" label="创建时间" sortable="custom" sort-by="CREATE_TIME" min-width="140px"></el-table-column> 
 |      </el-table> 
 |      <pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" /> 
 |    </div> 
 |  </template> 
 |    
 |  <script> 
 |  import Pagination from '@/components/common/Pagination' 
 |  import QueryForm from '@/components/common/QueryForm' 
 |  import { pageDriverList  } from '@/api/system/user.js' 
 |  import BaseComputHeight from '@/components/base/BaseComputHeight' 
 |  export default { 
 |    extends: BaseComputHeight, 
 |    components: { 
 |      QueryForm, 
 |      Pagination 
 |    }, 
 |    data() { 
 |      return { 
 |        filters: {}, 
 |        list: [], 
 |        queryFormConfig: { 
 |          formItems: [ 
 |            { 
 |              type: 'input', 
 |              filed: 'realname', 
 |              label: '姓名' 
 |            }, 
 |            { 
 |              type: 'input', 
 |              filed: 'username', 
 |              label: '手机号' 
 |            }, 
 |          ], 
 |          online: true 
 |        }, 
 |        pagination: { 
 |          capacity: 10, 
 |          page: 1, 
 |          total: 0, 
 |        }, 
 |        loading: false, 
 |      } 
 |    }, 
 |    created() { 
 |      this.getList() 
 |    }, 
 |    methods: { 
 |      getList(page) { 
 |        const { filters, pagination } = this 
 |        pagination.page = page || pagination.page 
 |        pageDriverList({ 
 |          model: { 
 |            ...filters, 
 |             type: 0 
 |          }, 
 |          ...pagination 
 |        }).then(res => { 
 |          console.log('res', res) 
 |          this.list = res.records || [] 
 |          this.pagination.total = res.total || 0 
 |        }) 
 |      }, 
 |      clear() { 
 |        this.filters = {} 
 |        this.getList(1) 
 |      }, 
 |      handleSizeChange(capacity) { 
 |        this.pagination.capacity = capacity 
 |        this.getList(1) 
 |      } 
 |    } 
 |  } 
 |  </script> 
 |    
 |  <style lang="scss" scoped> 
 |  ::v-deep .el-table{ 
 |    margin-bottom: 60px; 
 |  } 
 |    
 |  </style> 
 |  
  |