魏超 il y a 5 ans
Parent
révision
dad7a49e41

+ 1
- 1
src/pages/activity/ActivityList.jsx Voir le fichier

@@ -115,7 +115,7 @@ const header = props => {
115 115
       render: (x, row) => <><span>{`${moment(row.startDate).format('YYYY-MM-DD')} —— ${moment(row.endDate).format('YYYY-MM-DD')}`}</span></>,
116 116
     },
117 117
     {
118
-      title: '已参人数',
118
+      title: '已参人数',
119 119
       dataIndex: 'count',
120 120
       key: 'count',
121 121
       align: 'center',

+ 1
- 1
src/pages/activity/helpActivity/list.jsx Voir le fichier

@@ -93,7 +93,7 @@ const getJoinPeople = (helpActivityId) => () => {
93 93
       render: (x, row) => <><span>{`${moment(row.startDate).format('YYYY-MM-DD HH:mm:ss')} —— ${moment(row.endDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>,
94 94
     },
95 95
     {
96
-      title: '已参人数',
96
+      title: '已参人数',
97 97
       dataIndex: 'enlistNum',
98 98
       key: 'enlistNum',
99 99
       align: 'center',

+ 3
- 16
src/pages/statistical/activity/compenents/Content.jsx Voir le fichier

@@ -225,7 +225,7 @@ class OverView extends React.Component {
225 225
   constructor(props) {
226 226
     super(props)
227 227
 
228
-    const defaultDays = 7
228
+    const defaultDays = 6
229 229
     dateType = defaultDays
230 230
     console.log(dateType)
231 231
     this.state = {
@@ -295,7 +295,6 @@ class OverView extends React.Component {
295 295
         activityName: activityName
296 296
       }
297 297
     }, this.getTableList)
298
-    // this.setState({ startDate: startDate, endDate: endDate, buildingId: this.props.form.getFieldValue("buildingId"), targetType: this.props.form.getFieldValue("targetType") })
299 298
   }
300 299
 
301 300
   //重置搜索
@@ -319,18 +318,6 @@ class OverView extends React.Component {
319 318
     }).catch()
320 319
   }
321 320
 
322
-  getDataOf = (days) => {
323
-    this.setState({ endDate: new Date(), startDate: moment().subtract(days, 'day').toDate() })
324
-    this.getList({ endDate: new Date(), startDate: moment().subtract(days, 'day').toDate() })
325
-  }
326
-
327
-  datalist = () => {
328
-    this.setState({
329
-      endDate: daterange[1] === '' ? new Date() : daterange[1],
330
-      startDate: daterange[0] === '' ? moment().subtract(7, 'day').toDate() : daterange[0],
331
-    })
332
-  }
333
-
334 321
   //排序
335 322
   handleTableChange = (pagination, filters, sorter) => {
336 323
     console.log(pagination, filters, sorter)
@@ -377,7 +364,7 @@ class OverView extends React.Component {
377 364
       <div >
378 365
         <Radio.Group buttonStyle="solid" value={radioVal} onChange={this.handleRadioChange}>
379 366
           <Radio.Button value={0}>今日</Radio.Button>
380
-          <Radio.Button value={7}>最近7天</Radio.Button>
367
+          <Radio.Button value={6}>最近7天</Radio.Button>
381 368
           <Radio.Button value={30}>最近1月</Radio.Button>
382 369
         </Radio.Group>
383 370
         <Form layout="inline" onSubmit={e => this.handleSubmit(e, this.props)}>
@@ -415,7 +402,7 @@ class OverView extends React.Component {
415 402
             </Form.Item>
416 403
             <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
417 404
               <Button type="primary" htmlType="submit" style={{ marginLeft: '30px' }}>
418
-                查询
405
+                搜索
419 406
             </Button>
420 407
             <Button onClick={e => this.handleReset()} style={{ marginLeft: '30px' }}>重置</Button>
421 408
           </Form.Item>

+ 0
- 21
src/pages/statistical/activity/compenents/ContentDesc.jsx Voir le fichier

@@ -1,21 +0,0 @@
1
-import React, { PureComponent } from 'react'
2
-import { Modal, Row, Col } from 'antd'
3
-
4
-import Style from './style.less'
5
-
6
-
7
-export default function SaleBatchListHelpDoc(props) {
8
-  return (
9
-    <Modal footer={null} title="相关说明" visible={props.visible} onCancel={props.onCancel} width={800}>
10
-      <div className={Style.article}>
11
-        <div className={Style.section}>
12
-          <div>
13
-          1.楼盘多次开盘加推等销售行为,记录为多个“销售批次”,每个批次销售当前楼盘的一批不同房源。同一楼盘不同批次中房源不能重叠。<br/><br/>
14
-          2.发布状态为销售批次的发布状态,若为未发布,则小程序端无法查看房源、预选认筹。<br/><br/>
15
-          3.房源预选功能在预选管理中管理。房源认筹功能在认筹管理中管理。如果看不到左侧相关菜单或功能,请联系管理员配置。</div>
16
-        </div>
17
-        
18
-      </div>
19
-    </Modal>
20
-  );
21
-}

+ 17
- 17
src/pages/statistical/activity/compenents/NewUsers.jsx Voir le fichier

@@ -58,7 +58,7 @@ const NewUsers = (props) => {
58 58
       },
59 59
       icon: "rect",
60 60
       legend: {
61
-        data: ["分享次数", "分享人数", "访问次数", "访问人数", "新增注册用户"]
61
+        data: ["访问人数", "访问次数", "新增注册用户", "分享人数", "分享次数"]
62 62
       },
63 63
       toolbox: {},
64 64
       xAxis: {
@@ -68,7 +68,17 @@ const NewUsers = (props) => {
68 68
       dataZoom,
69 69
       series: [
70 70
         {
71
-          name: "分享次数",
71
+          name: "访问人数",
72
+          type: "line",
73
+          smooth:true, 
74
+        },
75
+        {
76
+          name: "访问次数",
77
+          type: "line",
78
+          smooth:true, 
79
+        },
80
+        {
81
+          name: "新增注册用户",
72 82
           type: "line",
73 83
           smooth:true, 
74 84
         },
@@ -78,23 +88,13 @@ const NewUsers = (props) => {
78 88
           smooth:true, 
79 89
         },
80 90
         {
81
-            name: "访问次数",
82
-            type: "line",
83
-            smooth:true, 
84
-          },
85
-          {
86
-            name: "访问人数",
87
-            type: "line",
88
-            smooth:true, 
89
-          },
90
-          {
91
-            name: "新增注册用户",
92
-            type: "line",
93
-            smooth:true, 
94
-          }
91
+          name: "分享次数",
92
+          type: "line",
93
+          smooth:true, 
94
+        },
95 95
       ],
96 96
       dataset: {
97
-        dimensions: ['date', 'shareCount', 'sharePersonCount', 'visitCount', 'visitPersonCount', 'addregistCount'],
97
+        dimensions: ['date', 'visitPersonCount', 'visitCount', 'addregistCount', 'sharePersonCount',  'shareCount'],
98 98
         source: dataset
99 99
       }
100 100
     

+ 44
- 52
src/pages/statistical/activity/compenents/OverView.jsx Voir le fichier

@@ -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
           

+ 0
- 1
src/pages/statistical/activity/index.jsx Voir le fichier

@@ -7,7 +7,6 @@ import { router } from 'umi';
7 7
 
8 8
 import OverView from './compenents/OverView'
9 9
 import Content from './compenents/Content'
10
-import ContentDesc from './compenents/ContentDesc'
11 10
 
12 11
 
13 12