|
@@ -107,24 +107,6 @@ let columns = [
|
107
|
107
|
dataIndex: 'date',
|
108
|
108
|
key: 'date',
|
109
|
109
|
},
|
110
|
|
- {
|
111
|
|
- title: '分享人数',
|
112
|
|
- dataIndex: 'sharePersonNum',
|
113
|
|
- key: 'sharePersonNum',
|
114
|
|
- sorter: true,
|
115
|
|
- render: (text, record) => (
|
116
|
|
- <a style={{ color: '#66B3FF' }} onClick={toSharePersonNum(record)}><span>{record.sharePersonNum}</span></a>
|
117
|
|
- ),
|
118
|
|
- },
|
119
|
|
- {
|
120
|
|
- title: '分享次数',
|
121
|
|
- dataIndex: 'shareNum',
|
122
|
|
- key: 'shareNum',
|
123
|
|
- sorter: true,
|
124
|
|
- render: (text, record) => (
|
125
|
|
- <a style={{ color: '#66B3FF' }} onClick={toShareNum(record)}><span>{record.shareNum}</span></a>
|
126
|
|
- ),
|
127
|
|
- },
|
128
|
110
|
{
|
129
|
111
|
title: '访问人数',
|
130
|
112
|
dataIndex: 'visitPersonNum',
|
|
@@ -152,6 +134,24 @@ let columns = [
|
152
|
134
|
<a style={{ color: '#66B3FF' }} onClick={toAddRegistNum(record)}><span>{record.addRegistNum}</span></a>
|
153
|
135
|
),
|
154
|
136
|
},
|
|
137
|
+ {
|
|
138
|
+ title: '分享人数',
|
|
139
|
+ dataIndex: 'sharePersonNum',
|
|
140
|
+ key: 'sharePersonNum',
|
|
141
|
+ sorter: true,
|
|
142
|
+ render: (text, record) => (
|
|
143
|
+ <a style={{ color: '#66B3FF' }} onClick={toSharePersonNum(record)}><span>{record.sharePersonNum}</span></a>
|
|
144
|
+ ),
|
|
145
|
+ },
|
|
146
|
+ {
|
|
147
|
+ title: '分享次数',
|
|
148
|
+ dataIndex: 'shareNum',
|
|
149
|
+ key: 'shareNum',
|
|
150
|
+ sorter: true,
|
|
151
|
+ render: (text, record) => (
|
|
152
|
+ <a style={{ color: '#66B3FF' }} onClick={toShareNum(record)}><span>{record.shareNum}</span></a>
|
|
153
|
+ ),
|
|
154
|
+ },
|
155
|
155
|
]
|
156
|
156
|
|
157
|
157
|
|
|
@@ -170,12 +170,12 @@ class OverView extends React.Component {
|
170
|
170
|
constructor(props) {
|
171
|
171
|
super(props)
|
172
|
172
|
|
173
|
|
- const defaultDays = 7
|
|
173
|
+ const defaultDays = 6
|
174
|
174
|
|
175
|
175
|
this.state = {
|
176
|
176
|
radioVal: defaultDays,
|
177
|
177
|
formData: {
|
178
|
|
- startDate: moment().subtract(7, 'day').toDate(),
|
|
178
|
+ startDate: moment().subtract(6, 'day').toDate(),
|
179
|
179
|
endDate: new Date,
|
180
|
180
|
buildingId: '',
|
181
|
181
|
targetType: '',
|
|
@@ -245,7 +245,7 @@ class OverView extends React.Component {
|
245
|
245
|
if (this.props.form.getFieldValue("startDate") != undefined){
|
246
|
246
|
startDate = this.props.form.getFieldValue("startDate").toDate()
|
247
|
247
|
}else{
|
248
|
|
- startDate = moment().subtract(7, 'day').toDate()
|
|
248
|
+ startDate = moment().subtract(6, 'day').toDate()
|
249
|
249
|
}
|
250
|
250
|
if (this.props.form.getFieldValue("endDate") != undefined){
|
251
|
251
|
endDate = this.props.form.getFieldValue("endDate").toDate()
|
|
@@ -262,7 +262,7 @@ class OverView extends React.Component {
|
262
|
262
|
targetType: targetType
|
263
|
263
|
}
|
264
|
264
|
}, this.getAllList)
|
265
|
|
- this.setState({ startDate: startDate, endDate: endDate, buildingId: this.props.form.getFieldValue("buildingId"), targetType: this.props.form.getFieldValue("targetType") })
|
|
265
|
+ // this.setState({ startDate: startDate, endDate: endDate, buildingId: this.props.form.getFieldValue("buildingId"), targetType: this.props.form.getFieldValue("targetType") })
|
266
|
266
|
}
|
267
|
267
|
|
268
|
268
|
//重置搜索
|
|
@@ -287,18 +287,6 @@ class OverView extends React.Component {
|
287
|
287
|
}).catch()
|
288
|
288
|
}
|
289
|
289
|
|
290
|
|
- getDataOf = (days) => {
|
291
|
|
- this.setState({ endDate: new Date(), startDate: moment().subtract(days, 'day').toDate() })
|
292
|
|
- this.getList({ endDate: new Date(), startDate: moment().subtract(days, 'day').toDate() })
|
293
|
|
- }
|
294
|
|
-
|
295
|
|
- datalist = () => {
|
296
|
|
- this.setState({
|
297
|
|
- endDate: daterange[1] === '' ? new Date() : daterange[1],
|
298
|
|
- startDate: daterange[0] === '' ? moment().subtract(7, 'day').toDate() : daterange[0],
|
299
|
|
- })
|
300
|
|
- }
|
301
|
|
-
|
302
|
290
|
//排序
|
303
|
291
|
handleTableChange = (pagination, filters, sorter) => {
|
304
|
292
|
console.log(pagination, filters, sorter)
|
|
@@ -337,7 +325,6 @@ class OverView extends React.Component {
|
337
|
325
|
}
|
338
|
326
|
|
339
|
327
|
setShowHelp = (e) => {
|
340
|
|
- console.log(e,"sssssssssssssssss")
|
341
|
328
|
this.setState({ ...this.state, helpVisible: e })
|
342
|
329
|
}
|
343
|
330
|
|
|
@@ -352,17 +339,22 @@ class OverView extends React.Component {
|
352
|
339
|
<div >
|
353
|
340
|
<Radio.Group buttonStyle="solid" value={radioVal} onChange={this.handleRadioChange}>
|
354
|
341
|
<Radio.Button value={0}>今日</Radio.Button>
|
355
|
|
- <Radio.Button value={7}>最近7天</Radio.Button>
|
|
342
|
+ <Radio.Button value={6}>最近7天</Radio.Button>
|
356
|
343
|
<Radio.Button value={30}>最近1月</Radio.Button>
|
357
|
344
|
</Radio.Group>
|
358
|
345
|
<Form layout="inline" onSubmit={e => this.handleSubmit(e, this.props)}>
|
359
|
346
|
<Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
|
360
|
|
- {getFieldDecorator('startDate')(
|
|
347
|
+ {getFieldDecorator('startDate', {initialValue: moment(startDate)
|
|
348
|
+
|
|
349
|
+ })(
|
361
|
350
|
<DatePicker placeholder="开始日期"/>,
|
362
|
351
|
)}
|
363
|
352
|
</Form.Item>
|
364
|
353
|
<Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
|
365
|
|
- {getFieldDecorator('endDate')(
|
|
354
|
+ {getFieldDecorator('endDate', {
|
|
355
|
+ initialValue: moment(endDate)
|
|
356
|
+
|
|
357
|
+ })(
|
366
|
358
|
<DatePicker placeholder="结束日期"/>,
|
367
|
359
|
)}
|
368
|
360
|
</Form.Item>
|
|
@@ -394,32 +386,32 @@ class OverView extends React.Component {
|
394
|
386
|
|
395
|
387
|
<div style={{ display: 'flex', marginBottom: '33px' }}>
|
396
|
388
|
<div style={{
|
397
|
|
- textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: 'linear-gradient(144deg,rgba(241,43,62,1) 0%,rgba(254,144,155,1) 100%)', height: '100px',
|
398
|
|
- borderRadius: '12px', width: '32%', marginRight: '2%'
|
399
|
|
- }}>
|
400
|
|
- <span style={{ fontSize: '24px', color: '#fff' }}>分享总次数 </span>
|
401
|
|
- <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{ this.state.personData.shareNum || '0'}</span>
|
402
|
|
- </div>
|
403
|
|
- <div style={{
|
404
|
|
- textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: '#FFC6AA', height: '100px',
|
|
389
|
+ textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: 'linear-gradient(137deg,rgba(150,83,215,1) 0%,rgba(208,160,255,1) 100%)', height: '100px',
|
405
|
390
|
borderRadius: '12px', width: '32%', marginRight: '2%'
|
406
|
391
|
}}>
|
407
|
|
- <span style={{ fontSize: '24px', color: '#fff' }}>分享总人数 </span>
|
408
|
|
- <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{ this.state.personData.sharePersonNum || '0'}</span>
|
409
|
|
- </div>
|
|
392
|
+ <span style={{ fontSize: '24px', color: '#fff' }}>访问总人数 </span>
|
|
393
|
+ <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{ this.state.personData.visitPersonNum || '0'}</span>
|
|
394
|
+ </div>
|
410
|
395
|
<div style={{
|
411
|
396
|
textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: 'linear-gradient(137deg,rgba(107,130,230,1) 0%,rgba(152,175,251,1) 100%)', height: '100px',
|
412
|
397
|
borderRadius: '12px', width: '32%', marginRight: '2%'
|
413
|
398
|
}}>
|
414
|
399
|
<span style={{ fontSize: '24px', color: '#fff' }}>访问总次数 </span>
|
415
|
400
|
<span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{ this.state.personData.visitNum || '0'}</span>
|
|
401
|
+ </div>
|
|
402
|
+ <div style={{
|
|
403
|
+ textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: '#FFC6AA', height: '100px',
|
|
404
|
+ borderRadius: '12px', width: '32%', marginRight: '2%'
|
|
405
|
+ }}>
|
|
406
|
+ <span style={{ fontSize: '24px', color: '#fff' }}>分享总人数 </span>
|
|
407
|
+ <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{ this.state.personData.sharePersonNum || '0'}</span>
|
416
|
408
|
</div>
|
417
|
409
|
<div style={{
|
418
|
|
- textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: 'linear-gradient(137deg,rgba(150,83,215,1) 0%,rgba(208,160,255,1) 100%)', height: '100px',
|
|
410
|
+ textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: 'linear-gradient(144deg,rgba(241,43,62,1) 0%,rgba(254,144,155,1) 100%)', height: '100px',
|
419
|
411
|
borderRadius: '12px', width: '32%', marginRight: '2%'
|
420
|
412
|
}}>
|
421
|
|
- <span style={{ fontSize: '24px', color: '#fff' }}>访问总人数 </span>
|
422
|
|
- <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{ this.state.personData.visitPersonNum || '0'}</span>
|
|
413
|
+ <span style={{ fontSize: '24px', color: '#fff' }}>分享总次数 </span>
|
|
414
|
+ <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{ this.state.personData.shareNum || '0'}</span>
|
423
|
415
|
</div>
|
424
|
416
|
</div>
|
425
|
417
|
|