| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- <template>
- <div class="app-container">
- <div class="filter-container">
- <el-form
- :model="filter"
- v-bind:inline="true"
- label-position="left"
- label-width="100px"
- style="width: 100%;">
- <div class="filter-view">
- <div style="flex: 1; max-width: 350px;">
- <el-input
- v-model="filter.chargeBoxId"
- placeholder="Search by User ID, Email, Phone or Licence Plate"
- @keyup.enter.native="handleFilter" />
- </div>
- <div>
- <el-button
- type="primary"
- icon="el-icon-search"
- @click="handleFilter">
- Search
- </el-button>
- </div>
- </div>
- </el-form>
- </div>
- <el-table
- v-loading="listLoading"
- :data="tableList"
- fit
- style="width: 100%;">
- <el-table-column
- label="User ID"
- align="center"
- min-width="100">
- <template slot-scope="{row}">
- <span>{{ row.userPk }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="Name"
- align="center"
- min-width="100">
- <template slot-scope="{row}">
- <span>{{ row.userName }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="Email"
- align="center"
- min-width="100">
- <template slot-scope="{row}">
- <span>{{ row.email }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="Phone"
- align="center"
- min-width="100">
- <template slot-scope="{row}">
- <span>{{ row.mobile }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="Vehicle License Plate"
- align="center"
- class-name="fixed-width"
- min-width="180">
- <template slot-scope="{row}">
- <span>{{ row.mobile }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="Status"
- align="center"
- min-width="100">
- <template slot-scope="{row}">
- <span>{{ row.status }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="Action"
- align="center"
- min-width="120">
- <template slot-scope="{row}">
- <TableAction/>
- </template>
- </el-table-column>
- </el-table>
- <div class="right">
- <pagination
- v-show="total > 0"
- :total="total"
- :page.sync="listQuery.page"
- :limit.sync="listQuery.limit"
- @pagination="handlePageChange" />
- </div>
- </div>
- </template>
- <script>
- import Pagination from '@/components/Pagination'
- import TableAction from '@/components/TableAction.vue'
- export default {
- components: { Pagination, TableAction },
- data() {
- return {
- filter: {
-
- },
- listLoading: true,
- tableList: [],
- total: 0,
- listQuery: {
- page: 1,
- limit: 10,
- }
- }
- },
- created() {
- this.getList();
- },
- methods: {
- handleFilter() {
- this.listLoading = true;
- this.listQuery.page = 1;
- this.getList();
- },
- handlePageChange() {
- this.listLoading = true;
- this.getList();
- },
- getList() {
- this.listLoading = false;
- }
- }
- }
- </script>
|