Blame view

src/components/simplify/simplifyShopsHireLog.vue 3 KB
b25b036d   wuxw   v1.9 优化日期
1
  <template>
0a41b92e   wuxw   开发完成业务受理页面
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
    <div>
      <el-table :data="simplifyShopsHireLogInfo.owners" style="margin-top:10px" border>
        <el-table-column prop="name" :label="$t('simplifyShopsHireLog.ownerName')" align="center"></el-table-column>
        <el-table-column prop="link" :label="$t('simplifyShopsHireLog.ownerPhone')" align="center"></el-table-column>
        <el-table-column prop="startTime" :label="$t('simplifyShopsHireLog.startTime')" align="center"></el-table-column>
        <el-table-column prop="endTime" :label="$t('simplifyShopsHireLog.endTime')" align="center"></el-table-column>
        <el-table-column prop="createTime" :label="$t('simplifyShopsHireLog.createTime')" align="center"></el-table-column>
        <el-table-column :label="$t('simplifyShopsHireLog.operation')" align="center">
          <template slot-scope="scope">
            <el-button size="mini" @click="_openShopsOwnerFee(scope.row)">{{$t('simplifyShopsHireLog.viewFee')}}</el-button>
          </template>
        </el-table-column>
      </el-table>
      <el-pagination
        @current-change="handleCurrentChange"
        :current-page="currentPage"
        :page-size="pageSize"
        layout="total, prev, pager, next"
        :total="total"
        class="pagination"
      ></el-pagination>
    </div>
  </template>
  
  <script>
  import { queryShopsHireLog } from '@/api/simplify/simplifyShopsHireLogApi'
  import { getCommunityId } from '@/api/community/communityApi'
  
  export default {
    name: 'SimplifyShopsHireLog',
    data() {
      return {
        simplifyShopsHireLogInfo: {
          owners: [],
          ownerId: '',
          roomId: ''
        },
        currentPage: 1,
        pageSize: 10,
        total: 0,
        communityId: ''
      }
    },
    created() {
      this.communityId = getCommunityId()
0a41b92e   wuxw   开发完成业务受理页面
47
48
    },
    methods: {
92c405db   wuxw   优化业务受理中部分选项打不开bug
49
50
51
      open(params) {
        this.handleSwitch(params)
      },
0a41b92e   wuxw   开发完成业务受理页面
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
      handleSwitch(params) {
        if (!params.roomId) return
        this.clearSimplifyShopsHireLogInfo()
        Object.assign(this.simplifyShopsHireLogInfo, params)
        this.listShopsHireLog()
      },
      async listShopsHireLog() {
        try {
          const params = {
            page: this.currentPage,
            row: this.pageSize,
            communityId: this.communityId,
            roomId: this.simplifyShopsHireLogInfo.roomId
          }
          const res = await queryShopsHireLog(params)
          this.simplifyShopsHireLogInfo.owners = res.data
          this.total = res.data.total
        } catch (error) {
          console.error('Failed to load shops hire log:', error)
        }
      },
      _openShopsOwnerFee(owner) {
        this.$router.push({
92c405db   wuxw   优化业务受理中部分选项打不开bug
75
          path: '/views/owner/ownerDetail',
0a41b92e   wuxw   开发完成业务受理页面
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
          query: {
            roomId: owner.roomId,
            ownerId: owner.ownerId,
            hireOwnerFee: 1
          }
        })
      },
      clearSimplifyShopsHireLogInfo() {
        this.simplifyShopsHireLogInfo = {
          owners: [],
          ownerId: '',
          roomId: ''
        }
      },
      handleCurrentChange(val) {
        this.currentPage = val
        this.listShopsHireLog()
      }
    }
  }
  </script>
  
  <style scoped>
  .pagination {
    margin-top: 15px;
    text-align: right;
  }
  </style>