|
@@ -204,10 +204,21 @@ class OverView extends React.Component {
|
204
|
204
|
this.getTableList()
|
205
|
205
|
}
|
206
|
206
|
|
|
207
|
+ getFormatedParams = ( params ) => {
|
|
208
|
+ return {
|
|
209
|
+ ...params,
|
|
210
|
+ startDate: getDayBegin(params.startDate),
|
|
211
|
+ endDate: getDayEnd(params.endDate),
|
|
212
|
+ }
|
|
213
|
+ }
|
|
214
|
+
|
207
|
215
|
getList () {
|
208
|
216
|
const { formData } = this.state
|
209
|
|
- console.log(formData,'formData')
|
210
|
|
- request({ ...apis.activityDataStatis.total, params: formData }).then(res => {
|
|
217
|
+
|
|
218
|
+ request({
|
|
219
|
+ ...apis.activityDataStatis.total,
|
|
220
|
+ params: this.getFormatedParams(formData),
|
|
221
|
+ }).then(res => {
|
211
|
222
|
this.setState({ personData: res })
|
212
|
223
|
}).catch(err => {
|
213
|
224
|
<Alert
|
|
@@ -223,7 +234,7 @@ class OverView extends React.Component {
|
223
|
234
|
|
224
|
235
|
getTableList () {
|
225
|
236
|
const { formData } = this.state
|
226
|
|
- request({ ...apis.activityDataStatis.tableData, params: formData }).then(data => {
|
|
237
|
+ request({ ...apis.activityDataStatis.tableData, params: this.getFormatedParams(formData) }).then(data => {
|
227
|
238
|
console.log(data)
|
228
|
239
|
this.setState({ tableData: data.records, total: data.total})
|
229
|
240
|
}).catch()
|
|
@@ -299,7 +310,7 @@ class OverView extends React.Component {
|
299
|
310
|
|
300
|
311
|
exportActivityStats = () => {
|
301
|
312
|
const { formData } = this.state
|
302
|
|
- request({ ...apis.activityDataStatis.tableDataExport, params: formData }).then(data => {
|
|
313
|
+ request({ ...apis.activityDataStatis.tableDataExport, params: this.getFormatedParams(formData) }).then(data => {
|
303
|
314
|
if (!data) {
|
304
|
315
|
return
|
305
|
316
|
}
|