jiangping
2023-12-29 f9691d544e62d6c04dbfe45d05a6c7bc5e004291
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
90
91
92
93
94
<template>
  <TableLayout :permissions="['business:actionLog:query']">
    <!-- 搜索表单 -->
    <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
 
      <el-form-item label="用户" prop="openid">
        <el-input v-model="searchForm.openid" placeholder="请输入用户" @keypress.enter.native="search"></el-input>
      </el-form-item>
      <el-form-item label="车辆编码" prop="bikeCode">
        <el-input v-model="searchForm.bikeCode" placeholder="请输入车辆编码" @keypress.enter.native="search"></el-input>
      </el-form-item>
      <el-form-item label="操作人" prop="creatorName">
        <el-input v-model="searchForm.creatorName" placeholder="请输入操作人" @keypress.enter.native="search"></el-input>
      </el-form-item>
      <section>
        <el-button type="primary" @click="search">搜索</el-button>
        <el-button @click="reset">重置</el-button>
      </section>
    </el-form>
    <!-- 表格和分页 -->
    <template v-slot:table-wrap>
      <ul class="toolbar" v-permissions="['business:actionLog:exportExcel']">
        <li>
          <el-button type="primary" :loading="isWorking.export" v-permissions="['business:actionLog:exportExcel']"
            @click="exportExcel">导出</el-button>
        </li>
      </ul>
      <el-table v-loading="isWorking.search" :data="tableData.list" stripe border>
        <el-table-column prop="ridesObj.memberId" label="用户" min-width="180px" align="center">
          <template slot-scope="{row}">
            {{ row.ridesObj ? row.ridesObj.memberOpenid : '' }}
          </template>
        </el-table-column>
        <el-table-column prop="bikeCode" label="车辆编码" min-width="100px" align="center">
          <template slot-scope="{row}">
            {{ row.ridesObj ? row.ridesObj.bikeCode : '' }}
          </template>
        </el-table-column>
        <el-table-column prop="rentSiteId" label="借出站点" min-width="100px" align="center">
          <template slot-scope="{row}">
            {{ row.ridesObj ? row.ridesObj.rentSiteId : '' }}
          </template>
        </el-table-column>
        <el-table-column prop="rentDate" label="借出时间" min-width="140px" align="center">
          <template slot-scope="{row}">
            {{ row.ridesObj ? row.ridesObj.rentDate : '' }}
          </template>
        </el-table-column>
        <el-table-column prop="type" label="调整类型" min-width="100px" align="center">
          <template slot-scope="{row}">
            <div>{{ row.type == 0 ? '强制还车' : '骑行时长修改' }}</div>
          </template>
        </el-table-column>
        <el-table-column prop="createDate" label="操作时间" min-width="140px" align="center"></el-table-column>
        <el-table-column prop="creatorName" label="操作人" min-width="100px" align="center"></el-table-column>
        <el-table-column prop="actReason" label="原因" min-width="100px" align="center"></el-table-column>
        <el-table-column prop="actInfo" label="备注" min-width="100px" align="center"></el-table-column>
      </el-table>
      <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="tableData.pagination">
      </pagination>
    </template>
  </TableLayout>
</template>
 
<script>
import BaseTable from '@/components/base/BaseTable'
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
export default {
  name: 'MemberRides',
  extends: BaseTable,
  components: { TableLayout, Pagination },
  data() {
    return {
      // 搜索
      searchForm: {
        openid: '',
        creator: '',
        bikeCode: '',
        typeList: [0, 1]
      },
    }
  },
  created() {
    this.config({
      module: '用户骑行记录表',
      api: '/business/actionLog',
      'field.id': 'id',
      'field.main': 'id'
    })
    this.search()
  }
}
</script>