|
@@ -9,6 +9,7 @@ import apis from '../../../../services/apis';
|
9
|
9
|
import router from 'umi/router';
|
10
|
10
|
import AuthButton from '@/components/AuthButton';
|
11
|
11
|
import BuildingSelect from '@/components/SelectButton/BuildSelect';
|
|
12
|
+import Navigate from '@/components/Navigate';
|
12
|
13
|
|
13
|
14
|
|
14
|
15
|
const { RangePicker } = DatePicker;
|
|
@@ -29,15 +30,15 @@ const toSharePersonNum = rowData => () => {
|
29
|
30
|
|
30
|
31
|
if (rowData) {
|
31
|
32
|
router.push({
|
32
|
|
- pathname: '/statistical/activity/sharePersonNum',
|
33
|
|
- query: {
|
34
|
|
- startDate: startDate,
|
35
|
|
- endDate: endDate,
|
36
|
|
- activityId: rowData.activityId,
|
37
|
|
- activityType: rowData.activityType,
|
38
|
|
- activityName: rowData.activityName
|
39
|
|
- },
|
40
|
|
- });
|
|
33
|
+ pathname: '/statistical/activity/sharePersonNum',
|
|
34
|
+ query: {
|
|
35
|
+ startDate: startDate,
|
|
36
|
+ endDate: endDate,
|
|
37
|
+ activityId: rowData.activityId,
|
|
38
|
+ activityType: rowData.activityType,
|
|
39
|
+ activityName: rowData.activityName
|
|
40
|
+ },
|
|
41
|
+ });
|
41
|
42
|
return
|
42
|
43
|
}
|
43
|
44
|
}
|
|
@@ -47,15 +48,15 @@ const toShareNum = rowData => () => {
|
47
|
48
|
const endDate = new Date()
|
48
|
49
|
if (rowData) {
|
49
|
50
|
router.push({
|
50
|
|
- pathname: '/statistical/activity/shareNum',
|
51
|
|
- query: {
|
52
|
|
- startDate: startDate,
|
53
|
|
- endDate: endDate,
|
54
|
|
- activityId: rowData.activityId,
|
55
|
|
- activityType: rowData.activityType,
|
56
|
|
- activityName: rowData.activityName
|
57
|
|
- },
|
58
|
|
- });
|
|
51
|
+ pathname: '/statistical/activity/shareNum',
|
|
52
|
+ query: {
|
|
53
|
+ startDate: startDate,
|
|
54
|
+ endDate: endDate,
|
|
55
|
+ activityId: rowData.activityId,
|
|
56
|
+ activityType: rowData.activityType,
|
|
57
|
+ activityName: rowData.activityName
|
|
58
|
+ },
|
|
59
|
+ });
|
59
|
60
|
return
|
60
|
61
|
}
|
61
|
62
|
}
|
|
@@ -66,15 +67,15 @@ const toAddRegistNum = rowData => () => {
|
66
|
67
|
console.log(rowData, 'rowData')
|
67
|
68
|
if (rowData) {
|
68
|
69
|
router.push({
|
69
|
|
- pathname: '/statistical/activity/addRegistNum',
|
70
|
|
- query: {
|
71
|
|
- startDate: startDate,
|
72
|
|
- endDate: endDate,
|
73
|
|
- activityId: rowData.activityId,
|
74
|
|
- activityType: rowData.activityType,
|
75
|
|
- activityName: rowData.activityName
|
76
|
|
- },
|
77
|
|
- });
|
|
70
|
+ pathname: '/statistical/activity/addRegistNum',
|
|
71
|
+ query: {
|
|
72
|
+ startDate: startDate,
|
|
73
|
+ endDate: endDate,
|
|
74
|
+ activityId: rowData.activityId,
|
|
75
|
+ activityType: rowData.activityType,
|
|
76
|
+ activityName: rowData.activityName
|
|
77
|
+ },
|
|
78
|
+ });
|
78
|
79
|
return
|
79
|
80
|
}
|
80
|
81
|
}
|
|
@@ -85,15 +86,15 @@ const toAddVisitNum = rowData => () => {
|
85
|
86
|
console.log(rowData, 'rowData')
|
86
|
87
|
if (rowData) {
|
87
|
88
|
router.push({
|
88
|
|
- pathname: '/statistical/activity/visitNum',
|
89
|
|
- query: {
|
90
|
|
- startDate: startDate,
|
91
|
|
- endDate: endDate,
|
92
|
|
- activityId: rowData.activityId,
|
93
|
|
- activityType: rowData.activityType,
|
94
|
|
- activityName: rowData.activityName
|
95
|
|
- },
|
96
|
|
- });
|
|
89
|
+ pathname: '/statistical/activity/visitNum',
|
|
90
|
+ query: {
|
|
91
|
+ startDate: startDate,
|
|
92
|
+ endDate: endDate,
|
|
93
|
+ activityId: rowData.activityId,
|
|
94
|
+ activityType: rowData.activityType,
|
|
95
|
+ activityName: rowData.activityName
|
|
96
|
+ },
|
|
97
|
+ });
|
97
|
98
|
return
|
98
|
99
|
}
|
99
|
100
|
}
|
|
@@ -103,15 +104,15 @@ const toAddVisitPersonNum = rowData => () => {
|
103
|
104
|
const endDate = new Date()
|
104
|
105
|
if (rowData) {
|
105
|
106
|
router.push({
|
106
|
|
- pathname: '/statistical/activity/visitPersonNum',
|
107
|
|
- query: {
|
108
|
|
- startDate: startDate,
|
109
|
|
- endDate: endDate,
|
110
|
|
- activityId: rowData.activityId,
|
111
|
|
- activityType: rowData.activityType,
|
112
|
|
- activityName: rowData.activityName
|
113
|
|
- },
|
114
|
|
- });
|
|
107
|
+ pathname: '/statistical/activity/visitPersonNum',
|
|
108
|
+ query: {
|
|
109
|
+ startDate: startDate,
|
|
110
|
+ endDate: endDate,
|
|
111
|
+ activityId: rowData.activityId,
|
|
112
|
+ activityType: rowData.activityType,
|
|
113
|
+ activityName: rowData.activityName
|
|
114
|
+ },
|
|
115
|
+ });
|
115
|
116
|
return
|
116
|
117
|
}
|
117
|
118
|
}
|
|
@@ -132,7 +133,7 @@ const toDetail = rowData => {
|
132
|
133
|
buildingId: '',
|
133
|
134
|
},
|
134
|
135
|
});
|
135
|
|
-
|
|
136
|
+
|
136
|
137
|
return
|
137
|
138
|
}
|
138
|
139
|
}
|
|
@@ -161,7 +162,8 @@ let columns = [
|
161
|
162
|
key: 'visitPersonNum',
|
162
|
163
|
sorter: true,
|
163
|
164
|
render: (text, record) => (
|
164
|
|
- <a style={{ color: '#66B3FF' }} onClick={toAddVisitPersonNum(record)}><span>{record.visitPersonNum}</span></a>
|
|
165
|
+ <Navigate onClick={toAddVisitPersonNum(record)}>{record.visitPersonNum}</Navigate>
|
|
166
|
+ // <a style={{ color: '#66B3FF' }} onClick={toAddVisitPersonNum(record)}><span>{record.visitPersonNum}</span></a>
|
165
|
167
|
),
|
166
|
168
|
},
|
167
|
169
|
{
|
|
@@ -170,7 +172,8 @@ let columns = [
|
170
|
172
|
key: 'visitNum',
|
171
|
173
|
sorter: true,
|
172
|
174
|
render: (text, record) => (
|
173
|
|
- <a style={{ color: '#66B3FF' }} onClick={toAddVisitNum(record)}><span>{record.visitNum}</span></a>
|
|
175
|
+ <Navigate onClick={toAddVisitNum(record)}>{record.visitNum}</Navigate>
|
|
176
|
+ // <a style={{ color: '#66B3FF' }} onClick={toAddVisitNum(record)}><span>{record.visitNum}</span></a>
|
174
|
177
|
),
|
175
|
178
|
},
|
176
|
179
|
{
|
|
@@ -179,7 +182,8 @@ let columns = [
|
179
|
182
|
key: 'addRegistNum',
|
180
|
183
|
sorter: true,
|
181
|
184
|
render: (text, record) => (
|
182
|
|
- <a style={{ color: '#66B3FF' }} onClick={toAddRegistNum(record)}><span>{record.addRegistNum}</span></a>
|
|
185
|
+ <Navigate onClick={toAddRegistNum(record)}>{record.addRegistNum}</Navigate>
|
|
186
|
+ // <a style={{ color: '#66B3FF' }} onClick={toAddRegistNum(record)}><span>{record.addRegistNum}</span></a>
|
183
|
187
|
),
|
184
|
188
|
},
|
185
|
189
|
{
|
|
@@ -188,7 +192,8 @@ let columns = [
|
188
|
192
|
key: 'sharePersonNum',
|
189
|
193
|
sorter: true,
|
190
|
194
|
render: (text, record) => (
|
191
|
|
- <a style={{ color: '#66B3FF' }} onClick={toSharePersonNum(record)}><span>{record.sharePersonNum}</span></a>
|
|
195
|
+ <Navigate onClick={toSharePersonNum(record)}>{record.sharePersonNum}</Navigate>
|
|
196
|
+ // <a style={{ color: '#66B3FF' }} onClick={toSharePersonNum(record)}><span>{record.sharePersonNum}</span></a>
|
192
|
197
|
),
|
193
|
198
|
},
|
194
|
199
|
{
|
|
@@ -197,26 +202,28 @@ let columns = [
|
197
|
202
|
key: 'shareNum',
|
198
|
203
|
sorter: true,
|
199
|
204
|
render: (text, record) => (
|
200
|
|
- <a style={{ color: '#66B3FF' }} onClick={toShareNum(record)}><span>{record.shareNum}</span></a>
|
|
205
|
+ <Navigate onClick={toShareNum(record)}>{record.shareNum}</Navigate>
|
|
206
|
+ // <a style={{ color: '#66B3FF' }} onClick={toShareNum(record)}><span>{record.shareNum}</span></a>
|
201
|
207
|
),
|
202
|
208
|
},
|
203
|
209
|
{
|
204
|
210
|
title: '详情',
|
205
|
211
|
align: 'center',
|
206
|
212
|
render: (text, record) => (
|
207
|
|
- <a style={{ color: '#66B3FF' }} onClick={() => toDetail(record)}>查看</a>
|
|
213
|
+ <Navigate onClick={() => toDetail(record)}>查看</Navigate>
|
|
214
|
+ // <a style={{ color: '#66B3FF' }} onClick={() => toDetail(record)}>查看</a>
|
208
|
215
|
),
|
209
|
216
|
},
|
210
|
217
|
]
|
211
|
218
|
|
212
|
219
|
|
213
|
220
|
function getDayBegin(dt) {
|
214
|
|
- return moment(dt, 'day').hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss')+'.000Z';
|
|
221
|
+ return moment(dt, 'day').hours(0).minutes(0).seconds(0).milliseconds(0).format('YYYY-MM-DDTHH:mm:ss') + '.000Z';
|
215
|
222
|
}
|
216
|
223
|
|
217
|
224
|
|
218
|
225
|
function getDayEnd(dt) {
|
219
|
|
- return moment(dt, 'day').hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss')+'.999Z';
|
|
226
|
+ return moment(dt, 'day').hours(23).minutes(59).seconds(59).milliseconds(999).format('YYYY-MM-DDTHH:mm:ss') + '.999Z';
|
220
|
227
|
}
|
221
|
228
|
|
222
|
229
|
|
|
@@ -258,7 +265,7 @@ class OverView extends React.Component {
|
258
|
265
|
this.getTableList()
|
259
|
266
|
}
|
260
|
267
|
|
261
|
|
- getFormatedParams = ( params ) => {
|
|
268
|
+ getFormatedParams = (params) => {
|
262
|
269
|
return {
|
263
|
270
|
...params,
|
264
|
271
|
startDate: getDayBegin(params.startDate),
|
|
@@ -340,7 +347,7 @@ class OverView extends React.Component {
|
340
|
347
|
startDate: '',
|
341
|
348
|
buildingId: [],
|
342
|
349
|
targetType: []
|
343
|
|
- },this.getTableList)
|
|
350
|
+ }, this.getTableList)
|
344
|
351
|
}
|
345
|
352
|
|
346
|
353
|
exportActivityStats = () => {
|
|
@@ -401,20 +408,21 @@ class OverView extends React.Component {
|
401
|
408
|
const endDate = this.state.formData.endDate
|
402
|
409
|
|
403
|
410
|
return (
|
404
|
|
- <>
|
405
|
|
- <div >
|
406
|
|
- <Radio.Group buttonStyle="solid" value={radioVal} onChange={this.handleRadioChange}>
|
407
|
|
- <Radio.Button value={0}>今日</Radio.Button>
|
408
|
|
- <Radio.Button value={6}>最近7天</Radio.Button>
|
409
|
|
- <Radio.Button value={30}>最近1月</Radio.Button>
|
410
|
|
- </Radio.Group>
|
411
|
|
- <Form layout="inline" onSubmit={e => this.handleSubmit(e, this.props)}>
|
412
|
|
- <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
|
413
|
|
- {getFieldDecorator('startDate', {initialValue: moment(startDate)
|
414
|
|
-
|
415
|
|
- })(
|
416
|
|
- <DatePicker allowClear={false} placeholder="开始日期"/>,
|
417
|
|
- )}
|
|
411
|
+ <>
|
|
412
|
+ <div >
|
|
413
|
+ <Radio.Group buttonStyle="solid" value={radioVal} onChange={this.handleRadioChange}>
|
|
414
|
+ <Radio.Button value={0}>今日</Radio.Button>
|
|
415
|
+ <Radio.Button value={6}>最近7天</Radio.Button>
|
|
416
|
+ <Radio.Button value={30}>最近1月</Radio.Button>
|
|
417
|
+ </Radio.Group>
|
|
418
|
+ <Form layout="inline" onSubmit={e => this.handleSubmit(e, this.props)}>
|
|
419
|
+ <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
|
|
420
|
+ {getFieldDecorator('startDate', {
|
|
421
|
+ initialValue: moment(startDate)
|
|
422
|
+
|
|
423
|
+ })(
|
|
424
|
+ <DatePicker allowClear={false} placeholder="开始日期" />,
|
|
425
|
+ )}
|
418
|
426
|
</Form.Item>
|
419
|
427
|
<Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
|
420
|
428
|
{getFieldDecorator('endDate', {
|
|
@@ -445,12 +453,12 @@ class OverView extends React.Component {
|
445
|
453
|
<Button type="primary" htmlType="submit" style={{ marginLeft: '30px' }}>
|
446
|
454
|
搜索
|
447
|
455
|
</Button>
|
448
|
|
- <Button onClick={e => this.handleReset()} style={{ marginLeft: '30px' }}>重置</Button>
|
449
|
|
- </Form.Item>
|
450
|
|
- </Form>
|
451
|
|
- <div>
|
|
456
|
+ <Button onClick={e => this.handleReset()} style={{ marginLeft: '30px' }}>重置</Button>
|
|
457
|
+ </Form.Item>
|
|
458
|
+ </Form>
|
|
459
|
+ <div>
|
452
|
460
|
<AuthButton name="admin.statistical.activity.export" noRight={null}>
|
453
|
|
- <Button type="primary" style={{ float: 'right', margin: '20px 0', zIndex: 1 }} onClick={this.exportActivityStats}>
|
|
461
|
+ <Button type="primary" style={{ float: 'right', margin: '20px 0', zIndex: 1 }} onClick={this.exportActivityStats}>
|
454
|
462
|
导出
|
455
|
463
|
</Button>
|
456
|
464
|
</AuthButton>
|