魏超 5 gadus atpakaļ
vecāks
revīzija
dad7a49e41

+ 1
- 1
src/pages/activity/ActivityList.jsx Parādīt failu

115
       render: (x, row) => <><span>{`${moment(row.startDate).format('YYYY-MM-DD')} —— ${moment(row.endDate).format('YYYY-MM-DD')}`}</span></>,
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
       dataIndex: 'count',
119
       dataIndex: 'count',
120
       key: 'count',
120
       key: 'count',
121
       align: 'center',
121
       align: 'center',

+ 1
- 1
src/pages/activity/helpActivity/list.jsx Parādīt failu

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></>,
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
       dataIndex: 'enlistNum',
97
       dataIndex: 'enlistNum',
98
       key: 'enlistNum',
98
       key: 'enlistNum',
99
       align: 'center',
99
       align: 'center',

+ 3
- 16
src/pages/statistical/activity/compenents/Content.jsx Parādīt failu

225
   constructor(props) {
225
   constructor(props) {
226
     super(props)
226
     super(props)
227
 
227
 
228
-    const defaultDays = 7
228
+    const defaultDays = 6
229
     dateType = defaultDays
229
     dateType = defaultDays
230
     console.log(dateType)
230
     console.log(dateType)
231
     this.state = {
231
     this.state = {
295
         activityName: activityName
295
         activityName: activityName
296
       }
296
       }
297
     }, this.getTableList)
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
     }).catch()
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
   handleTableChange = (pagination, filters, sorter) => {
322
   handleTableChange = (pagination, filters, sorter) => {
336
     console.log(pagination, filters, sorter)
323
     console.log(pagination, filters, sorter)
377
       <div >
364
       <div >
378
         <Radio.Group buttonStyle="solid" value={radioVal} onChange={this.handleRadioChange}>
365
         <Radio.Group buttonStyle="solid" value={radioVal} onChange={this.handleRadioChange}>
379
           <Radio.Button value={0}>今日</Radio.Button>
366
           <Radio.Button value={0}>今日</Radio.Button>
380
-          <Radio.Button value={7}>最近7天</Radio.Button>
367
+          <Radio.Button value={6}>最近7天</Radio.Button>
381
           <Radio.Button value={30}>最近1月</Radio.Button>
368
           <Radio.Button value={30}>最近1月</Radio.Button>
382
         </Radio.Group>
369
         </Radio.Group>
383
         <Form layout="inline" onSubmit={e => this.handleSubmit(e, this.props)}>
370
         <Form layout="inline" onSubmit={e => this.handleSubmit(e, this.props)}>
415
             </Form.Item>
402
             </Form.Item>
416
             <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
403
             <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
417
               <Button type="primary" htmlType="submit" style={{ marginLeft: '30px' }}>
404
               <Button type="primary" htmlType="submit" style={{ marginLeft: '30px' }}>
418
-                查询
405
+                搜索
419
             </Button>
406
             </Button>
420
             <Button onClick={e => this.handleReset()} style={{ marginLeft: '30px' }}>重置</Button>
407
             <Button onClick={e => this.handleReset()} style={{ marginLeft: '30px' }}>重置</Button>
421
           </Form.Item>
408
           </Form.Item>

+ 0
- 21
src/pages/statistical/activity/compenents/ContentDesc.jsx Parādīt failu

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 Parādīt failu

58
       },
58
       },
59
       icon: "rect",
59
       icon: "rect",
60
       legend: {
60
       legend: {
61
-        data: ["分享次数", "分享人数", "访问次数", "访问人数", "新增注册用户"]
61
+        data: ["访问人数", "访问次数", "新增注册用户", "分享人数", "分享次数"]
62
       },
62
       },
63
       toolbox: {},
63
       toolbox: {},
64
       xAxis: {
64
       xAxis: {
68
       dataZoom,
68
       dataZoom,
69
       series: [
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
           type: "line",
82
           type: "line",
73
           smooth:true, 
83
           smooth:true, 
74
         },
84
         },
78
           smooth:true, 
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
       dataset: {
96
       dataset: {
97
-        dimensions: ['date', 'shareCount', 'sharePersonCount', 'visitCount', 'visitPersonCount', 'addregistCount'],
97
+        dimensions: ['date', 'visitPersonCount', 'visitCount', 'addregistCount', 'sharePersonCount',  'shareCount'],
98
         source: dataset
98
         source: dataset
99
       }
99
       }
100
     
100
     

+ 44
- 52
src/pages/statistical/activity/compenents/OverView.jsx Parādīt failu

107
     dataIndex: 'date',
107
     dataIndex: 'date',
108
     key: 'date',
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
     title: '访问人数',
111
     title: '访问人数',
130
     dataIndex: 'visitPersonNum',
112
     dataIndex: 'visitPersonNum',
152
       <a style={{ color: '#66B3FF' }} onClick={toAddRegistNum(record)}><span>{record.addRegistNum}</span></a>
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
   constructor(props) {
170
   constructor(props) {
171
     super(props)
171
     super(props)
172
 
172
 
173
-    const defaultDays = 7
173
+    const defaultDays = 6
174
 
174
 
175
     this.state = {
175
     this.state = {
176
       radioVal: defaultDays,
176
       radioVal: defaultDays,
177
       formData: {
177
       formData: {
178
-        startDate: moment().subtract(7, 'day').toDate(),
178
+        startDate: moment().subtract(6, 'day').toDate(),
179
         endDate: new Date,
179
         endDate: new Date,
180
         buildingId: '',
180
         buildingId: '',
181
         targetType: '',
181
         targetType: '',
245
     if (this.props.form.getFieldValue("startDate") != undefined){
245
     if (this.props.form.getFieldValue("startDate") != undefined){
246
       startDate = this.props.form.getFieldValue("startDate").toDate()
246
       startDate = this.props.form.getFieldValue("startDate").toDate()
247
     }else{
247
     }else{
248
-      startDate = moment().subtract(7, 'day').toDate()
248
+      startDate = moment().subtract(6, 'day').toDate()
249
     }
249
     }
250
     if (this.props.form.getFieldValue("endDate") != undefined){
250
     if (this.props.form.getFieldValue("endDate") != undefined){
251
       endDate = this.props.form.getFieldValue("endDate").toDate()
251
       endDate = this.props.form.getFieldValue("endDate").toDate()
262
         targetType: targetType
262
         targetType: targetType
263
       }
263
       }
264
     }, this.getAllList)
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
     }).catch()
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
   handleTableChange = (pagination, filters, sorter) => {
291
   handleTableChange = (pagination, filters, sorter) => {
304
     console.log(pagination, filters, sorter)
292
     console.log(pagination, filters, sorter)
337
   }
325
   }
338
 
326
 
339
   setShowHelp = (e) => {
327
   setShowHelp = (e) => {
340
-    console.log(e,"sssssssssssssssss")
341
     this.setState({ ...this.state, helpVisible: e })
328
     this.setState({ ...this.state, helpVisible: e })
342
   }
329
   }
343
 
330
 
352
       <div >
339
       <div >
353
         <Radio.Group buttonStyle="solid" value={radioVal} onChange={this.handleRadioChange}>
340
         <Radio.Group buttonStyle="solid" value={radioVal} onChange={this.handleRadioChange}>
354
           <Radio.Button value={0}>今日</Radio.Button>
341
           <Radio.Button value={0}>今日</Radio.Button>
355
-          <Radio.Button value={7}>最近7天</Radio.Button>
342
+          <Radio.Button value={6}>最近7天</Radio.Button>
356
           <Radio.Button value={30}>最近1月</Radio.Button>
343
           <Radio.Button value={30}>最近1月</Radio.Button>
357
         </Radio.Group>
344
         </Radio.Group>
358
         <Form layout="inline" onSubmit={e => this.handleSubmit(e, this.props)}>
345
         <Form layout="inline" onSubmit={e => this.handleSubmit(e, this.props)}>
359
             <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
346
             <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
360
-            {getFieldDecorator('startDate')(
347
+            {getFieldDecorator('startDate', {initialValue: moment(startDate)
348
+              
349
+            })(
361
                 <DatePicker placeholder="开始日期"/>,
350
                 <DatePicker placeholder="开始日期"/>,
362
             )}
351
             )}
363
             </Form.Item>
352
             </Form.Item>
364
             <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
353
             <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
365
-            {getFieldDecorator('endDate')(
354
+            {getFieldDecorator('endDate', {
355
+                initialValue: moment(endDate)
356
+
357
+              })(
366
                 <DatePicker placeholder="结束日期"/>,
358
                 <DatePicker placeholder="结束日期"/>,
367
             )}
359
             )}
368
             </Form.Item>
360
             </Form.Item>
394
 
386
 
395
             <div style={{ display: 'flex', marginBottom: '33px' }}>
387
             <div style={{ display: 'flex', marginBottom: '33px' }}>
396
             <div style={{
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
                 borderRadius: '12px', width: '32%', marginRight: '2%'
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
             <div style={{
395
             <div style={{
411
                 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',
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
                 borderRadius: '12px', width: '32%', marginRight: '2%'
397
                 borderRadius: '12px', width: '32%', marginRight: '2%'
413
             }}>
398
             }}>
414
                 <span style={{ fontSize: '24px', color: '#fff' }}>访问总次数 </span>
399
                 <span style={{ fontSize: '24px', color: '#fff' }}>访问总次数 </span>
415
                 <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{ this.state.personData.visitNum || '0'}</span>
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
             </div>
408
             </div>
417
             <div style={{
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
                 borderRadius: '12px', width: '32%', marginRight: '2%'
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
             </div>
415
             </div>
424
             </div>
416
             </div>
425
           
417
           

+ 0
- 1
src/pages/statistical/activity/index.jsx Parādīt failu

7
 
7
 
8
 import OverView from './compenents/OverView'
8
 import OverView from './compenents/OverView'
9
 import Content from './compenents/Content'
9
 import Content from './compenents/Content'
10
-import ContentDesc from './compenents/ContentDesc'
11
 
10
 
12
 
11
 
13
 
12