|
@@ -0,0 +1,156 @@
|
|
1
|
+<template>
|
|
2
|
+ <div class="list">
|
|
3
|
+ <el-table :data="list || []"
|
|
4
|
+ border
|
|
5
|
+ style="width: 100%">
|
|
6
|
+ <el-table-column
|
|
7
|
+ type="index"
|
|
8
|
+ width="50">
|
|
9
|
+ </el-table-column>
|
|
10
|
+ <el-table-column
|
|
11
|
+ label="头像">
|
|
12
|
+ <template slot-scope="scope">
|
|
13
|
+ <div class="header">
|
|
14
|
+ <img :src="scope.row.avatarurl" alt="" />
|
|
15
|
+ </div>
|
|
16
|
+ </template>
|
|
17
|
+ </el-table-column>
|
|
18
|
+ <el-table-column
|
|
19
|
+ prop="nickname"
|
|
20
|
+ label="姓名">
|
|
21
|
+ </el-table-column>
|
|
22
|
+ <el-table-column
|
|
23
|
+ prop="sex"
|
|
24
|
+ label="性别">
|
|
25
|
+ <template slot-scope="scope">{{ scope.row.sex === 1 ? '男' : '女' }}</template>
|
|
26
|
+ </el-table-column>
|
|
27
|
+ </el-table>
|
|
28
|
+ <el-pagination
|
|
29
|
+ small
|
|
30
|
+ style="margin-top:10px;"
|
|
31
|
+ layout="prev, pager, next"
|
|
32
|
+ :current-page.sync="form.pageNumber"
|
|
33
|
+ :pageSize="form.pageSize"
|
|
34
|
+ @current-change="getList"
|
|
35
|
+ >
|
|
36
|
+ </el-pagination>
|
|
37
|
+
|
|
38
|
+ </div>
|
|
39
|
+</template>
|
|
40
|
+<script>
|
|
41
|
+ import { createNamespacedHelpers } from "vuex";
|
|
42
|
+ import dayjs from 'dayjs'
|
|
43
|
+ const {
|
|
44
|
+ mapState: mapDynamicState,
|
|
45
|
+ mapActions: mapDynamicActions
|
|
46
|
+ } = createNamespacedHelpers("dynamic");
|
|
47
|
+ const {
|
|
48
|
+ mapState: mapCustomerState,
|
|
49
|
+ mapActions: mapCustomerActions
|
|
50
|
+ } = createNamespacedHelpers("customer");
|
|
51
|
+ export default {
|
|
52
|
+ data() {
|
|
53
|
+ return {
|
|
54
|
+ form: {
|
|
55
|
+ pageSize: 10,
|
|
56
|
+ pageNumber: 1,
|
|
57
|
+ buildingId: ''
|
|
58
|
+ },
|
|
59
|
+ list: [],
|
|
60
|
+ total: 0,
|
|
61
|
+
|
|
62
|
+ };
|
|
63
|
+ },
|
|
64
|
+ computed: {
|
|
65
|
+ ...mapCustomerState({
|
|
66
|
+ customers: x => x.customers
|
|
67
|
+ }),
|
|
68
|
+ ...mapDynamicState({
|
|
69
|
+ dynamics: x => x.dynamics
|
|
70
|
+ })
|
|
71
|
+ },
|
|
72
|
+ created() {
|
|
73
|
+ this.getList();
|
|
74
|
+ },
|
|
75
|
+ methods: {
|
|
76
|
+ ...mapCustomerActions(["getCustomers", "getDetail", "getRecommendCustomers", 'getRecommendDrift']),
|
|
77
|
+ ...mapDynamicActions([
|
|
78
|
+ "getDynamics",
|
|
79
|
+ "setDetailNull",
|
|
80
|
+ "deleteDynamics",
|
|
81
|
+ "publicDynamic",
|
|
82
|
+ "cancelDynamic"
|
|
83
|
+ ]),
|
|
84
|
+ GetIndex(inx) {
|
|
85
|
+ return (this.currentPage - 1) * this.pageSize + inx + 1;
|
|
86
|
+ },
|
|
87
|
+ formateDate(dt) {
|
|
88
|
+ return !dt ? '' : dayjs(dt).format('YYYY-MM-DD HH:mm')
|
|
89
|
+ },
|
|
90
|
+ getList() {
|
|
91
|
+ this.getRecommendDrift(this.form).then((res) => {
|
|
92
|
+ this.list = res.records
|
|
93
|
+ this.form.pageSize = res.size
|
|
94
|
+ this.form.pageNumber = res.current
|
|
95
|
+ this.total = res.total
|
|
96
|
+ }).catch(() => {
|
|
97
|
+ console.log('getRecommendCustomers err')
|
|
98
|
+ });
|
|
99
|
+ },
|
|
100
|
+ }
|
|
101
|
+ };
|
|
102
|
+</script>
|
|
103
|
+<style lang="scss" scoped>
|
|
104
|
+ .list {
|
|
105
|
+ .header {
|
|
106
|
+ width: 50px;
|
|
107
|
+ height: 50px;
|
|
108
|
+ img {
|
|
109
|
+ width: 100%;
|
|
110
|
+ height: 100%;
|
|
111
|
+ }
|
|
112
|
+ }
|
|
113
|
+ }
|
|
114
|
+
|
|
115
|
+ .system-table-search {
|
|
116
|
+ width: calc(100% - 40px);
|
|
117
|
+ margin: 16px auto 0;
|
|
118
|
+ }
|
|
119
|
+
|
|
120
|
+ .system-table-search ul > li {
|
|
121
|
+ margin-right: 20px;
|
|
122
|
+ display: flex;
|
|
123
|
+ float: left;
|
|
124
|
+ align-items: center;
|
|
125
|
+ margin-bottom: 10px;
|
|
126
|
+ span {
|
|
127
|
+ margin-right: 10px;
|
|
128
|
+ }
|
|
129
|
+ }
|
|
130
|
+
|
|
131
|
+ .system-table-search ul {
|
|
132
|
+ font-size: 15px;
|
|
133
|
+ white-space: nowrap;
|
|
134
|
+ padding: 0;
|
|
135
|
+ }
|
|
136
|
+
|
|
137
|
+ .flex-h {
|
|
138
|
+ display: flex;
|
|
139
|
+ align-items: center;
|
|
140
|
+ }
|
|
141
|
+ .el-dialog__body {
|
|
142
|
+ text-align: center;
|
|
143
|
+ .close-btn {
|
|
144
|
+ margin: 20px auto 0 auto;
|
|
145
|
+ }
|
|
146
|
+ }
|
|
147
|
+
|
|
148
|
+ .flex-item {
|
|
149
|
+ flex: 1;
|
|
150
|
+ -webkit-flex: 1;
|
|
151
|
+ position: relative;
|
|
152
|
+ overflow: hidden;
|
|
153
|
+ }
|
|
154
|
+</style>
|
|
155
|
+
|
|
156
|
+
|