|
@@ -51,7 +51,7 @@ const columns = [
|
51
|
51
|
align: 'center',
|
52
|
52
|
|
53
|
53
|
// eslint-disable-next-line jsx-a11y/alt-text
|
54
|
|
- render: (text, record) => <img src={record.avatarurl }/>,
|
|
54
|
+ render: (text, list) => <img src={list.avatarurl }/>,
|
55
|
55
|
},
|
56
|
56
|
{
|
57
|
57
|
title: '用户姓名',
|
|
@@ -76,28 +76,41 @@ const columns = [
|
76
|
76
|
dataIndex: 'recommendCount',
|
77
|
77
|
key: 'recommendCount',
|
78
|
78
|
align: 'center',
|
|
79
|
+ render: (text, list) => <a style={ { color: '#66B3FF' } } onClick= {() => torecommend(list.personId)} >{ list.recommendCount }</a>,
|
79
|
80
|
},
|
80
|
81
|
{
|
81
|
82
|
title: '邀请经纪人',
|
82
|
|
- dataIndex: 'rest',
|
83
|
|
- key: 'rest',
|
|
83
|
+ dataIndex: 'inviteCount',
|
|
84
|
+ key: 'inviteCount',
|
84
|
85
|
align: 'center',
|
|
86
|
+ render: (text, list) => <a style={ { color: '#66B3FF' } } onClick= {() => toinvite(list.personId)} >{ list.inviteCount }</a>,
|
85
|
87
|
},
|
86
|
88
|
];
|
87
|
89
|
|
88
|
|
-// 跳转到编辑商品
|
89
|
|
-function toEditGoods() {
|
|
90
|
+// 跳转到推荐客户
|
|
91
|
+function torecommend(personId) {
|
90
|
92
|
router.push({
|
91
|
|
- pathname: '/channel/addChannel',
|
|
93
|
+ pathname: '/channel/recommendClients',
|
92
|
94
|
query: {
|
93
|
|
- a: 'b',
|
|
95
|
+ id: personId,
|
94
|
96
|
},
|
95
|
97
|
});
|
96
|
98
|
}
|
97
|
99
|
|
|
100
|
+// 跳转到邀请经纪人
|
|
101
|
+function toinvite(personId) {
|
|
102
|
+ router.push({
|
|
103
|
+ pathname: '/channel/InviteClients',
|
|
104
|
+ query: {
|
|
105
|
+ id: personId,
|
|
106
|
+ },
|
|
107
|
+ });
|
|
108
|
+}
|
|
109
|
+
|
|
110
|
+
|
98
|
111
|
const header = props => {
|
99
|
112
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
100
|
|
- const [data, setData] = useState({})
|
|
113
|
+ const [data, setData] = useState({ list: [] })
|
101
|
114
|
|
102
|
115
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
103
|
116
|
const [queryData, setQueryData] = useState({})
|
|
@@ -164,11 +177,11 @@ return (
|
164
|
177
|
<Input onChange = { onInputChangeName } style ={{ width: 150 }} />
|
165
|
178
|
</div>
|
166
|
179
|
<div>
|
167
|
|
- <Button type="primary" onClick={() => queryList() }>查询</Button>
|
|
180
|
+ <Button type="primary" onClick={() => queryList() }>查询</Button>
|
168
|
181
|
<Button onClick={() => refurbishList() }>重置</Button>
|
169
|
182
|
</div>
|
170
|
183
|
</div>
|
171
|
|
- <Table dataSource={data.records} columns={columns} pagination={{ pageSize: 10, total: data.total, onChange }} />
|
|
184
|
+ <Table dataSource={data.list} columns={columns} pagination={{ pageSize: 10, total: data.total, onChange }} />
|
172
|
185
|
</>
|
173
|
186
|
)
|
174
|
187
|
}
|