|
@@ -65,6 +65,25 @@ class InviteTable extends React.Component {
|
65
|
65
|
})
|
66
|
66
|
}
|
67
|
67
|
|
|
68
|
+ exportHelp() {
|
|
69
|
+ request({ ...apis.helpActivity.gethelpRecordExport, responseType: 'blob', params: { } })
|
|
70
|
+ .then(data => {
|
|
71
|
+ if (!data) {
|
|
72
|
+ return
|
|
73
|
+ }
|
|
74
|
+ const url = window.URL.createObjectURL(new Blob([data]))
|
|
75
|
+ const link = document.createElement('a')
|
|
76
|
+ link.style.display = 'none'
|
|
77
|
+ link.href = url
|
|
78
|
+ link.setAttribute('download', '助力者记录.xlsx')
|
|
79
|
+ document.body.append(link)
|
|
80
|
+ link.click()
|
|
81
|
+ }).catch(() => {
|
|
82
|
+
|
|
83
|
+ })
|
|
84
|
+ }
|
|
85
|
+
|
|
86
|
+
|
68
|
87
|
// 分页
|
69
|
88
|
onChange (pageNum) {
|
70
|
89
|
this.getList({ pageNumber: pageNum, pageSize: 5 })
|
|
@@ -104,7 +123,9 @@ class InviteTable extends React.Component {
|
104
|
123
|
onCancel={(e) => this.handleCancel(e)}
|
105
|
124
|
>
|
106
|
125
|
|
107
|
|
-
|
|
126
|
+ <Button type="primary" onClick={() => this.exportHelp()} style={{ float: 'right', margin: '20px 0', zIndex: 1 }}>
|
|
127
|
+ 导出
|
|
128
|
+ </Button>
|
108
|
129
|
<Table rowKey="independent" dataSource={this.state.dataSource.records} columns={columns} pagination={{ total: this.state.dataSource.total, onChange: e => this.onChange(e) }} />
|
109
|
130
|
</Modal>
|
110
|
131
|
</>
|
|
@@ -176,31 +197,6 @@ class Verifier extends React.Component {
|
176
|
197
|
this.getList({ helpRecordInitiateId: this.state.visibleData.customerId, verifyCode: this.state.visibleData.verificationCode })
|
177
|
198
|
}
|
178
|
199
|
|
179
|
|
- // exportCustomer() {
|
180
|
|
- // const code = customerType === 'helpSucceed' ? 1 : 0
|
181
|
|
- // request({ ...apis.helpActivity.HelpInitiateRecordSucceed, responseType: 'blob', params: { ...fieldsValue, customerType, helpActivityId, code } })
|
182
|
|
- // .then(response => {
|
183
|
|
- // download(response)
|
184
|
|
- // }).catch(() => {
|
185
|
|
-
|
186
|
|
- // })
|
187
|
|
- // }
|
188
|
|
-
|
189
|
|
- // download(data) {
|
190
|
|
- // if (!data) {
|
191
|
|
- // return
|
192
|
|
- // }
|
193
|
|
- // const url = window.URL.createObjectURL(new Blob([data]))
|
194
|
|
- // const link = document.createElement('a')
|
195
|
|
- // link.style.display = 'none'
|
196
|
|
- // link.href = url
|
197
|
|
- // link.setAttribute('download', '助力记录.xlsx')
|
198
|
|
- // document.body.append(link)
|
199
|
|
- // link.click()
|
200
|
|
- // }
|
201
|
|
-
|
202
|
|
-
|
203
|
|
-
|
204
|
200
|
render () {
|
205
|
201
|
return (
|
206
|
202
|
<>
|