|
@@ -27,13 +27,13 @@ class InviteTable extends React.Component {
|
27
|
27
|
// 挂载之后
|
28
|
28
|
componentDidMount () {
|
29
|
29
|
const { helpId } = this.state.visibleData
|
30
|
|
- this.getList({ helpRecordInitiateId: helpId, pageNumber: 1, pageSize: 5 })
|
|
30
|
+ this.getList({ helpRecordInitiateId: helpId, pageNum: 1, pageSize: 5 })
|
31
|
31
|
}
|
32
|
32
|
|
33
|
33
|
componentDidUpdate (preProps, preState) {
|
34
|
34
|
const { helpId } = this.state.visibleData
|
35
|
35
|
if (this.props.visibleData.visible !== preState.visibleData.visible) {
|
36
|
|
- this.getList({ helpRecordInitiateId: helpId, pageNumber: 1, pageSize: 5 })
|
|
36
|
+ this.getList({ helpRecordInitiateId: helpId, pageNum: 1, pageSize: 5 })
|
37
|
37
|
this.setState({ visibleData: this.props.visibleData });
|
38
|
38
|
}
|
39
|
39
|
}
|
|
@@ -93,7 +93,8 @@ class InviteTable extends React.Component {
|
93
|
93
|
// 分页
|
94
|
94
|
// eslint-disable-next-line react/sort-comp
|
95
|
95
|
onChange (pageNum) {
|
96
|
|
- this.getList({ helpRecordInitiateId: helpId, pageNumber: pageNum, pageSize: 5 })
|
|
96
|
+ const { helpId } = this.state.visibleData
|
|
97
|
+ this.getList({ helpRecordInitiateId: helpId, pageNum: pageNum, pageSize: 5 })
|
97
|
98
|
}
|
98
|
99
|
|
99
|
100
|
render () {
|
|
@@ -134,7 +135,7 @@ class InviteTable extends React.Component {
|
134
|
135
|
<Button name="admin.HelpInitiateRecordSucceed.export.get" noRight={null} type="primary" onClick={() => this.exportHelp()} style={{ float: 'right', margin: '20px 0', zIndex: 1 }}>
|
135
|
136
|
导出
|
136
|
137
|
</Button>
|
137
|
|
- <Table rowKey="independent" dataSource={this.state.dataSource.records} columns={columns} pagination={{ total: this.state.dataSource.total, onChange: e => this.onChange(e) }} />
|
|
138
|
+ <Table rowKey="independent" dataSource={this.state.dataSource.records} columns={columns} pagination={{pageSize: 5, total: this.state.dataSource.total, onChange: e => this.onChange(e) }} />
|
138
|
139
|
</Modal>
|
139
|
140
|
</>
|
140
|
141
|
);
|
|
@@ -266,7 +267,7 @@ function body(props) {
|
266
|
267
|
const { helpActivityId } = props.location.query
|
267
|
268
|
useEffect(() => {
|
268
|
269
|
console.log('customerType', customerType)
|
269
|
|
- getList({ pageNumber: 1, pageSize: 10, status: customerType, helpActivityId })
|
|
270
|
+ getList({ pageNum: 1, pageSize: 10, status: customerType, helpActivityId })
|
270
|
271
|
}, [])
|
271
|
272
|
|
272
|
273
|
function getList(params) {
|
|
@@ -312,7 +313,7 @@ function body(props) {
|
312
|
313
|
// 分页
|
313
|
314
|
function onChange(pageNum) {
|
314
|
315
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
315
|
|
- getList({ pageNumber: pageNum, pageSize: 10, customerType, helpActivityId })
|
|
316
|
+ getList({ pageNum: pageNum, pageSize: 10, status: customerType, helpActivityId })
|
316
|
317
|
}
|
317
|
318
|
|
318
|
319
|
// 助力成功/进行中/助力失败
|
|
@@ -324,7 +325,7 @@ function body(props) {
|
324
|
325
|
const { value } = e.target
|
325
|
326
|
setCustomerType(value)
|
326
|
327
|
// setColumns(value === 'helpSucceed' ? privateColumns : publicColumns)
|
327
|
|
- getList({ pageNumber: 1, pageSize: 10, status: value, helpActivityId })
|
|
328
|
+ getList({ pageNum: 1, pageSize: 10, status: value, helpActivityId })
|
328
|
329
|
}
|
329
|
330
|
|
330
|
331
|
function handleReset() {
|