zhoulisen 5 vuotta sitten
vanhempi
commit
c90d049617

+ 5
- 0
config/routes.js Näytä tiedosto

@@ -550,6 +550,11 @@ export default [
550 550
                 name: '活动统计',
551 551
                 component: './statistical/activity'
552 552
               },
553
+              {
554
+                path: '/statistical/activity/detail',
555
+                name: '查看详情',
556
+                component: './statistical/activity/detail'
557
+              },
553 558
               {
554 559
                 path: '/statistical/activity/sharePersonNum',
555 560
                 name: '分享统计',

BIN
src/assets/picture.png Näytä tiedosto


+ 5
- 5
src/pages/Index.jsx Näytä tiedosto

@@ -29,32 +29,32 @@ const index = (props) => {
29 29
         {
30 30
             title: '客户列表',
31 31
             img: customerImg,
32
-            path: '',
32
+            path: '/customer/customerlist/list',
33 33
             value: '2',
34 34
         },
35 35
         {
36 36
             title: '数据报表',
37 37
             img: reportImg,
38
-            path: '',
38
+            path: '/statistical/monitor',
39 39
             value: '3',
40 40
         },
41 41
 
42 42
         {
43 43
             title: '项目统计',
44 44
             img: projectImg,
45
-            path: '',
45
+            path: '/statistical/building',
46 46
             value: '4',
47 47
         },
48 48
         {
49 49
             title: '活动统计',
50 50
             img: statisticsImg,
51
-            path: '',
51
+            path: '/statistical/activity',
52 52
             value: '5',
53 53
         },
54 54
         {
55 55
             title: '置业顾问KPI',
56 56
             img: consultantImg,
57
-            path: '',
57
+            path: '/statistical/consultant',
58 58
             value: '6',
59 59
         },
60 60
 

+ 1
- 0
src/pages/carouselFigure/advertisingList.jsx Näytä tiedosto

@@ -210,6 +210,7 @@ const handleSubmit = (e, props) => {
210 210
    //重置搜索
211 211
    function handleReset() {
212 212
     props.form.resetFields();
213
+    getList({ pageNum: 1, pageSize: 10, showType: 'screen' });
213 214
   }
214 215
 
215 216
 

+ 1
- 0
src/pages/carouselFigure/carouselFigureList.jsx Näytä tiedosto

@@ -208,6 +208,7 @@ const handleSubmit = (e, props) => {
208 208
    //重置搜索
209 209
    function handleReset() {
210 210
     props.form.resetFields();
211
+    getList({ pageNum: 1, pageSize: 10, showType: 'banner' });
211 212
   }
212 213
 
213 214
   const { getFieldDecorator } = props.form

+ 1
- 0
src/pages/carouselFigure/propagandaList.jsx Näytä tiedosto

@@ -210,6 +210,7 @@ const handleSubmit = (e, props) => {
210 210
    //重置搜索
211 211
    function handleReset() {
212 212
     props.form.resetFields();
213
+    getList({ pageNum: 1, pageSize: 10, showType: 'propaganda' });
213 214
   }
214 215
 
215 216
 

+ 1
- 1
src/pages/charts/CityNums.jsx Näytä tiedosto

@@ -40,7 +40,7 @@ const geoOptions = {
40 40
   },
41 41
 }
42 42
 
43
-const getCityData = fetch(apis.indexEcharts.userCity)
43
+const getCityData = fetch(apis.indexEcharts.personCity)
44 44
 
45 45
 const mapDataRange = x => {
46 46
   // 映射区间 [1, 100000] => [rangeStart, rangeEnd]

+ 1
- 1
src/pages/news/list/NewsList.jsx Näytä tiedosto

@@ -270,7 +270,7 @@ function body(props) {
270 270
   function handleReset() {
271 271
     props.form.resetFields();
272 272
     localStorage.setItem("newsPageParams",JSON.stringify({ pageNum: 1, pageSize: 6 }));
273
-    // getList({ pageNum: 1, pageSize: 6 })
273
+    getList({ pageNum: 1, pageSize: 6 })
274 274
   }
275 275
 
276 276
   function getDate(value, dateString) {

+ 5
- 3
src/pages/statistical/activity/addRegistNum.jsx Näytä tiedosto

@@ -97,8 +97,7 @@ class SharePersonNum extends React.Component {
97 97
       dataSoures: [],
98 98
       tableData: [],
99 99
       userType: 'all',
100
-      buildingId: [],
101
-      targetType: []
100
+      activityName:  props.location.query.activityName
102 101
     }
103 102
   }
104 103
 
@@ -169,6 +168,9 @@ class SharePersonNum extends React.Component {
169 168
 
170 169
     return (
171 170
     <>
171
+        <div>
172
+          <span style={{marginLeft:'20px'}}>分享内容:{this.state.activityName}</span>
173
+        </div>
172 174
         <Form layout="inline" onSubmit={e => this.handleSubmit(e, this.props)}>
173 175
         <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
174 176
           {getFieldDecorator('personFrom')(
@@ -183,7 +185,7 @@ class SharePersonNum extends React.Component {
183 185
           </Form.Item>
184 186
           </Form>     
185 187
         <div>
186
-        <AuthButton name="admin.customer.import" noRight={null}>
188
+        <AuthButton name="admin.statistical.activity.export" noRight={null}>
187 189
             <Button type="primary" style={{ float: 'right', margin: '20px 0', zIndex: 1 }} onClick={this.exportActivityStats}>
188 190
                 导出
189 191
             </Button>

+ 89
- 68
src/pages/statistical/activity/compenents/Content.jsx Näytä tiedosto

@@ -15,10 +15,10 @@ const { RangePicker } = DatePicker;
15 15
 const { Option } = Select
16 16
 
17 17
 const formItemLayout = {
18
-    labelCol: { span: 10},
19
-    wrapperCol: { span: 14 },
20
-  };
21
-  
18
+  labelCol: { span: 10 },
19
+  wrapperCol: { span: 14 },
20
+};
21
+
22 22
 let daterange = []
23 23
 let tableTitle = ['类型']
24 24
 let dateType = ''
@@ -27,7 +27,7 @@ const toSharePersonNum = rowData => () => {
27 27
   const startDate = moment().subtract(dateType, 'day').toDate()
28 28
   const endDate = new Date()
29 29
 
30
-  if(rowData) {
30
+  if (rowData) {
31 31
     router.push({
32 32
     pathname: '/statistical/activity/sharePersonNum',
33 33
     query: {
@@ -35,6 +35,7 @@ const toSharePersonNum = rowData => () => {
35 35
       endDate: endDate,
36 36
       activityId: rowData.activityId,
37 37
       activityType: rowData.activityType,
38
+      activityName: rowData.activityName
38 39
     },
39 40
   });
40 41
     return
@@ -44,7 +45,7 @@ const toSharePersonNum = rowData => () => {
44 45
 const toShareNum = rowData => () => {
45 46
   const startDate = moment().subtract(dateType, 'day').toDate()
46 47
   const endDate = new Date()
47
-  if(rowData) {
48
+  if (rowData) {
48 49
     router.push({
49 50
     pathname: '/statistical/activity/shareNum',
50 51
     query: {
@@ -52,17 +53,18 @@ const toShareNum = rowData => () => {
52 53
       endDate: endDate,
53 54
       activityId: rowData.activityId,
54 55
       activityType: rowData.activityType,
56
+      activityName: rowData.activityName
55 57
     },
56 58
   });
57 59
     return
58 60
   }
59
-} 
61
+}
60 62
 
61 63
 const toAddRegistNum = rowData => () => {
62 64
   const startDate = moment().subtract(dateType, 'day').toDate()
63 65
   const endDate = new Date()
64 66
   console.log(rowData, 'rowData')
65
-  if(rowData) {
67
+  if (rowData) {
66 68
     router.push({
67 69
     pathname: '/statistical/activity/addRegistNum',
68 70
     query: {
@@ -70,17 +72,18 @@ const toAddRegistNum = rowData => () => {
70 72
       endDate: endDate,
71 73
       activityId: rowData.activityId,
72 74
       activityType: rowData.activityType,
75
+      activityName: rowData.activityName
73 76
     },
74 77
   });
75 78
     return
76 79
   }
77
-} 
80
+}
78 81
 
79 82
 const toAddVisitNum = rowData => () => {
80 83
   const startDate = moment().subtract(dateType, 'day').toDate()
81 84
   const endDate = new Date()
82 85
   console.log(rowData, 'rowData')
83
-  if(rowData) {
86
+  if (rowData) {
84 87
     router.push({
85 88
     pathname: '/statistical/activity/visitNum',
86 89
     query: {
@@ -88,16 +91,17 @@ const toAddVisitNum = rowData => () => {
88 91
       endDate: endDate,
89 92
       activityId: rowData.activityId,
90 93
       activityType: rowData.activityType,
94
+      activityName: rowData.activityName
91 95
     },
92 96
   });
93 97
     return
94 98
   }
95
-} 
99
+}
96 100
 
97 101
 const toAddVisitPersonNum = rowData => () => {
98 102
   const startDate = moment().subtract(dateType, 'day').toDate()
99 103
   const endDate = new Date()
100
-  if(rowData) {
104
+  if (rowData) {
101 105
     router.push({
102 106
     pathname: '/statistical/activity/visitPersonNum',
103 107
     query: {
@@ -105,12 +109,34 @@ const toAddVisitPersonNum = rowData => () => {
105 109
       endDate: endDate,
106 110
       activityId: rowData.activityId,
107 111
       activityType: rowData.activityType,
112
+      activityName: rowData.activityName
108 113
     },
109 114
   });
110 115
     return
111 116
   }
112 117
 }
113 118
 
119
+const toDetail = rowData => {
120
+  const startDate = moment().subtract(dateType, 'day').format('YYYY-MM-DD')
121
+  const endDate = moment().format('YYYY-MM-DD')
122
+  // const { formData } = this.state
123
+  if (rowData) {
124
+    router.push({
125
+      pathname: '/statistical/activity/detail',
126
+      query: {
127
+        startDate: startDate,
128
+        endDate: endDate,
129
+        targetId: rowData.activityId,
130
+        targetType: rowData.activityType,
131
+        targetName: rowData.activityName,
132
+        buildingId: '',
133
+      },
134
+    });
135
+  
136
+    return
137
+  }
138
+}
139
+
114 140
 let columns = [
115 141
   {
116 142
     title: '活动类型',
@@ -178,7 +204,7 @@ let columns = [
178 204
     title: '详情',
179 205
     align: 'center',
180 206
     render: (text, record) => (
181
-        <a style={{ color: '#66B3FF' }}>查看</a>
207
+      <a style={{ color: '#66B3FF' }} onClick={() => toDetail(record)}>查看</a>
182 208
     ),
183 209
   },
184 210
 ]
@@ -205,18 +231,18 @@ class OverView extends React.Component {
205 231
     this.state = {
206 232
       radioVal: defaultDays,
207 233
       formData: {
208
-        
234
+
209 235
         startDate: moment().subtract(7, 'day').toDate(),
210 236
         endDate: new Date,
211 237
         buildingId: '',
212 238
         targetType: '',
213
-        pageNum:'',
214
-        pageSize:'',
215
-        activityName:'',
216
-        sort:null,
217
-        colKey:null
239
+        pageNum: '',
240
+        pageSize: '',
241
+        activityName: '',
242
+        sort: null,
243
+        colKey: null
218 244
       },
219
-      personData: [],  
245
+      personData: [],
220 246
       dataSoures: [],
221 247
       tableData: [],
222 248
       barData: {},
@@ -232,11 +258,11 @@ class OverView extends React.Component {
232 258
     this.getTableList()
233 259
   }
234 260
 
235
-  getTableList () {
261
+  getTableList() {
236 262
     const { formData } = this.state
237 263
     request({ ...apis.activityDataStatis.activityDetailTableData, params: formData }).then(data => {
238 264
       console.log(data)
239
-      this.setState({ tableData: data.records, total: data.total})
265
+      this.setState({ tableData: data.records, total: data.total })
240 266
     }).catch()
241 267
   }
242 268
 
@@ -252,10 +278,10 @@ class OverView extends React.Component {
252 278
     const buildingId = this.props.form.getFieldValue("buildingId");
253 279
     const targetType = this.props.form.getFieldValue("targetType");
254 280
     const activityName = this.props.form.getFieldValue("activityName");
255
-    if (this.props.form.getFieldValue("startDate") != undefined){
281
+    if (this.props.form.getFieldValue("startDate") != undefined) {
256 282
       startDate = this.props.form.getFieldValue("startDate").toDate()
257 283
     }
258
-    if (this.props.form.getFieldValue("endDate") != undefined){
284
+    if (this.props.form.getFieldValue("endDate") != undefined) {
259 285
       endDate = this.props.form.getFieldValue("endDate").toDate()
260 286
     }
261 287
     const { formData } = this.state
@@ -284,12 +310,12 @@ class OverView extends React.Component {
284 310
         return
285 311
       }
286 312
       const url = window.URL.createObjectURL(new Blob([data]))
287
-        const link = document.createElement('a')
288
-        link.style.display = 'none'
289
-        link.href = url
290
-        link.setAttribute('download', '活动统计.xlsx')
291
-        document.body.append(link)
292
-        link.click()
313
+      const link = document.createElement('a')
314
+      link.style.display = 'none'
315
+      link.href = url
316
+      link.setAttribute('download', '活动统计.xlsx')
317
+      document.body.append(link)
318
+      link.click()
293 319
     }).catch()
294 320
   }
295 321
 
@@ -299,7 +325,7 @@ class OverView extends React.Component {
299 325
   }
300 326
 
301 327
   datalist = () => {
302
-    this.setState({ 
328
+    this.setState({
303 329
       endDate: daterange[1] === '' ? new Date() : daterange[1],
304 330
       startDate: daterange[0] === '' ? moment().subtract(7, 'day').toDate() : daterange[0],
305 331
     })
@@ -342,19 +368,13 @@ class OverView extends React.Component {
342 368
   render() {
343 369
     const { radioVal } = this.state
344 370
     const { getFieldDecorator } = this.props.form;
345
-    console.log(this.state.formData,'this.state.formData')
371
+    console.log(this.state.formData, 'this.state.formData')
346 372
     const startDate = this.state.formData.startDate
347 373
     const endDate = this.state.formData.endDate
348 374
 
349 375
     return (
350 376
     <>
351
-      <div style={{
352
-        backgroundColor: '#fff',
353
-        padding: '32PX 28px',
354
-        boxShadow: '0px 0px 16px 2px rgba(0,0,0,0.12)',
355
-        borderRadius: '12px',
356
-        minHeight: '60vh'
357
-      }}>
377
+      <div >
358 378
         <Radio.Group buttonStyle="solid" value={radioVal} onChange={this.handleRadioChange}>
359 379
           <Radio.Button value={0}>今日</Radio.Button>
360 380
           <Radio.Button value={7}>最近7天</Radio.Button>
@@ -368,49 +388,50 @@ class OverView extends React.Component {
368 388
                 <DatePicker placeholder="开始日期"/>,
369 389
             )}
370 390
             </Form.Item>
371
-            <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
372
-            {getFieldDecorator('endDate', {initialValue: moment(endDate)
373
-              
374
-            })(
375
-                <DatePicker placeholder="结束日期"/>,
376
-            )}
391
+            <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
392
+              {getFieldDecorator('endDate', {
393
+                initialValue: moment(endDate)
394
+
395
+              })(
396
+                <DatePicker placeholder="结束日期" />,
397
+              )}
377 398
             </Form.Item>
378
-          <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
399
+            <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
379 400
               {getFieldDecorator('buildingId')(<BuildingSelect />)}
380
-          </Form.Item>
381
-          <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
382
-            {getFieldDecorator('targetType')(
383
-                <Select placeholder="活动类型" style={{ width: 150, marginLeft:'20px'  }}>
384
-                <Option value="activity">报名活动</Option>
385
-                <Option value="help">助力活动</Option>
386
-                <Option value="group">拼团活动</Option>
387
-                <Option value="h5">H5活动</Option>
388
-                <Option value="live">直播</Option>
389
-            </Select>
390
-            )}
391
-          </Form.Item>
392
-          <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
393
-              {getFieldDecorator('activityName')(<Input placeholder="请输入活动名称"/>)}
394
-          </Form.Item>
395
-          <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
396
-            <Button type="primary" htmlType="submit" style={{ marginLeft: '30px' }}>
401
+            </Form.Item>
402
+            <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
403
+              {getFieldDecorator('targetType')(
404
+                <Select placeholder="活动类型" style={{ width: 150, marginLeft: '20px' }}>
405
+                  <Option value="activity">报名活动</Option>
406
+                  <Option value="help">助力活动</Option>
407
+                  <Option value="group">拼团活动</Option>
408
+                  <Option value="h5">H5活动</Option>
409
+                  <Option value="live">直播</Option>
410
+                </Select>
411
+              )}
412
+            </Form.Item>
413
+            <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
414
+              {getFieldDecorator('activityName')(<Input placeholder="请输入活动名称" />)}
415
+            </Form.Item>
416
+            <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
417
+              <Button type="primary" htmlType="submit" style={{ marginLeft: '30px' }}>
397 418
                 查询
398 419
             </Button>
399 420
             <Button onClick={e => this.handleReset()} style={{ marginLeft: '30px' }}>重置</Button>
400 421
           </Form.Item>
401 422
           </Form>     
402 423
         <div>
403
-            <AuthButton name="admin.customer.import" noRight={null}>
424
+            <AuthButton name="admin.statistical.activity.export" noRight={null}>
404 425
             <Button type="primary" style={{ float: 'right', margin: '20px 0', zIndex: 1 }} onClick={this.exportActivityStats}>
405 426
                 导出
406 427
             </Button>
407 428
             </AuthButton>
408
-          <Table style={{marginTop:'20px'}} dataSource={this.state.tableData} columns={columns} pagination={{ total: this.state.total}} onChange={this.handleTableChange} scroll={{ y: 500 }}></Table>
429
+            <Table style={{ marginTop: '20px' }} dataSource={this.state.tableData} columns={columns} pagination={{ total: this.state.total }} onChange={this.handleTableChange} scroll={{ y: 500 }}></Table>
430
+          </div>
409 431
         </div>
410
-      </div>
411
-    </>
432
+      </>
412 433
     )
413
-    
434
+
414 435
   }
415 436
 }
416 437
 const WrappedTypeForm = Form.create()(OverView);

+ 29
- 23
src/pages/statistical/activity/compenents/OverView.jsx Näytä tiedosto

@@ -22,6 +22,9 @@ const formItemLayout = {
22 22
 let daterange = []
23 23
 let tableTitle = ['类型']
24 24
 
25
+let buildingId = ''
26
+let activityType = ''
27
+
25 28
 const toSharePersonNum = rowData => () => {
26 29
   console.log(rowData, 'rowData')
27 30
   if(rowData) {
@@ -29,6 +32,8 @@ const toSharePersonNum = rowData => () => {
29 32
     pathname: '/statistical/activity/sharePersonNum',
30 33
     query: {
31 34
       queryDate: rowData.date,
35
+      buildingId: buildingId, 
36
+      acticvityType: activityType
32 37
     },
33 38
   });
34 39
     return
@@ -42,6 +47,8 @@ const toShareNum = rowData => () => {
42 47
     pathname: '/statistical/activity/shareNum',
43 48
     query: {
44 49
       queryDate: rowData.date,
50
+      buildingId: buildingId, 
51
+      acticvityType: activityType
45 52
     },
46 53
   });
47 54
     return
@@ -55,6 +62,8 @@ const toAddRegistNum = rowData => () => {
55 62
     pathname: '/statistical/activity/addRegistNum',
56 63
     query: {
57 64
       queryDate: rowData.date,
65
+      buildingId: buildingId, 
66
+      acticvityType: activityType
58 67
     },
59 68
   });
60 69
     return
@@ -68,6 +77,8 @@ const toAddVisitNum = rowData => () => {
68 77
     pathname: '/statistical/activity/visitNum',
69 78
     query: {
70 79
       queryDate: rowData.date,
80
+      buildingId: buildingId, 
81
+      acticvityType: activityType
71 82
     },
72 83
   });
73 84
     return
@@ -81,6 +92,8 @@ const toAddVisitPersonNum = rowData => () => {
81 92
     pathname: '/statistical/activity/visitPersonNum',
82 93
     query: {
83 94
       queryDate: rowData.date,
95
+      buildingId: buildingId, 
96
+      acticvityType: activityType
84 97
     },
85 98
   });
86 99
     return
@@ -221,7 +234,10 @@ class OverView extends React.Component {
221 234
   handleSubmit = (e, props) => {
222 235
     let startDate = null
223 236
     let endDate = null
224
-    const buildingId = this.props.form.getFieldValue("buildingId");
237
+    buildingId = this.props.form.getFieldValue("buildingId");
238
+    activityType = this.props.form.getFieldValue("targetType");
239
+
240
+    const buildingIdSearch = this.props.form.getFieldValue("buildingId");
225 241
     const targetType = this.props.form.getFieldValue("targetType");
226 242
     if (this.props.form.getFieldValue("startDate") != undefined){
227 243
       startDate = this.props.form.getFieldValue("startDate").toDate()
@@ -235,7 +251,7 @@ class OverView extends React.Component {
235 251
         ...formData,
236 252
         startDate: startDate,
237 253
         endDate: endDate,
238
-        buildingId: buildingId,
254
+        buildingId: buildingIdSearch,
239 255
         targetType: targetType
240 256
       }
241 257
     }, this.getAllList)
@@ -321,13 +337,7 @@ class OverView extends React.Component {
321 337
 
322 338
     return (
323 339
     <>
324
-      <div style={{
325
-        backgroundColor: '#fff',
326
-        padding: '32PX 28px',
327
-        boxShadow: '0px 0px 16px 2px rgba(0,0,0,0.12)',
328
-        borderRadius: '12px',
329
-        minHeight: '60vh'
330
-      }}>
340
+      <div >
331 341
         <Radio.Group buttonStyle="solid" value={radioVal} onChange={this.handleRadioChange}>
332 342
           <Radio.Button value={0}>今日</Radio.Button>
333 343
           <Radio.Button value={7}>最近7天</Radio.Button>
@@ -364,7 +374,7 @@ class OverView extends React.Component {
364 374
           </Form.Item>
365 375
           <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
366 376
             <Button type="primary" htmlType="submit" style={{ marginLeft: '30px' }}>
367
-                查询
377
+                搜索
368 378
             </Button>
369 379
             <Button onClick={e => this.handleReset()} style={{ marginLeft: '30px' }}>重置</Button>
370 380
           </Form.Item>
@@ -373,36 +383,32 @@ class OverView extends React.Component {
373 383
 
374 384
             <div style={{ display: 'flex', marginBottom: '33px' }}>
375 385
             <div style={{
376
-                textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: 'linear-gradient(144deg,rgba(255,126,74,1) 0%,rgba(255,196,168,1) 100%)', height: '100px',
377
-                boxShadow: '0px  0.106rem 14px -15px rgba(255,126,74,1)',
386
+                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',
378 387
                 borderRadius: '12px', width: '32%', marginRight: '2%'
379 388
             }}>
380 389
                 <span style={{ fontSize: '24px', color: '#fff' }}>分享总次数 </span>
381
-                <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{ this.state.personData.sharePersonNum || '0'}</span>
390
+                <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{ this.state.personData.shareNum || '0'}</span>
382 391
             </div>
383 392
             <div style={{
384
-                textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: 'linear-gradient(144deg,rgba(255,126,74,1) 0%,rgba(255,196,168,1) 100%)', height: '100px',
385
-                boxShadow: '0px  0.106rem 14px -15px rgba(255,126,74,1)',
393
+                textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: '#FFC6AA', height: '100px',
386 394
                 borderRadius: '12px', width: '32%', marginRight: '2%'
387 395
             }}>
388 396
                 <span style={{ fontSize: '24px', color: '#fff' }}>分享总人数 </span>
389
-                <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{ this.state.personData.shareNum || '0'}</span>
397
+                <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{ this.state.personData.sharePersonNum || '0'}</span>
390 398
             </div>
391 399
             <div style={{
392
-                textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: 'linear-gradient(144deg,rgba(255,126,74,1) 0%,rgba(255,196,168,1) 100%)', height: '100px',
393
-                boxShadow: '0px  0.106rem 14px -15px rgba(255,126,74,1)',
400
+                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',
394 401
                 borderRadius: '12px', width: '32%', marginRight: '2%'
395 402
             }}>
396 403
                 <span style={{ fontSize: '24px', color: '#fff' }}>访问总次数 </span>
397
-                <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{ this.state.personData.visitPersonNum || '0'}</span>
404
+                <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{ this.state.personData.visitNum || '0'}</span>
398 405
             </div>
399 406
             <div style={{
400
-                textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: 'linear-gradient(144deg,rgba(255,126,74,1) 0%,rgba(255,196,168,1) 100%)', height: '100px',
401
-                boxShadow: '0px  0.106rem 14px -15px rgba(255,126,74,1)',
407
+                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',
402 408
                 borderRadius: '12px', width: '32%', marginRight: '2%'
403 409
             }}>
404 410
                 <span style={{ fontSize: '24px', color: '#fff' }}>访问总人数 </span>
405
-                <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{ this.state.personData.visitNum || '0'}</span>
411
+                <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{ this.state.personData.visitPersonNum || '0'}</span>
406 412
             </div>
407 413
             </div>
408 414
           
@@ -411,7 +417,7 @@ class OverView extends React.Component {
411 417
                     <NewUsers startDate={this.state.formData.startDate} endDate={this.state.formData.endDate} buildingId={this.state.buildingId} targetType={this.state.targetType} dataZoom={false}></NewUsers>
412 418
                 </div>
413 419
             </div >
414
-            <AuthButton name="admin.customer.import" noRight={null}>
420
+            <AuthButton name="admin.statistical.activity.export" noRight={null}>
415 421
             <Button type="primary" style={{ float: 'right', margin: '20px 0', zIndex: 1 }} onClick={this.exportActivityStats}>
416 422
                 导出
417 423
             </Button>

+ 1
- 1
src/pages/statistical/activity/compenents/style.less Näytä tiedosto

@@ -1,5 +1,5 @@
1 1
 .bar {
2
-    width: 70%;
2
+    width: 100%;
3 3
     min-width: 400px;
4 4
     min-height: 560px;
5 5
     background: rgba(255, 255, 255, 1);

+ 377
- 0
src/pages/statistical/activity/detail.jsx Näytä tiedosto

@@ -0,0 +1,377 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Button, DatePicker, Table, Pagination, Radio, Typography } from 'antd';
3
+import sortBy from 'lodash/sortBy';
4
+import router from 'umi/router';
5
+import moment from 'moment';
6
+import apis from '../../../services/apis';
7
+import request from '../../../utils/request'
8
+import AuthButton from '../../../components/AuthButton';
9
+import echarts from 'echarts/lib/echarts';
10
+import EChart from '../../../components/EchartsTest/EChart';
11
+
12
+/**
13
+  @param {*} props
14
+  @returns
15
+ */
16
+const { RangePicker } = DatePicker;
17
+const { Text } = Typography;
18
+
19
+function record(props) {
20
+    const [radioVal, updateRadioVal] = useState(7)
21
+    const [formData, updateFormData] = useState({
22
+        pageNum: 1,
23
+        pageSize: 10,
24
+        ...props.location.query,
25
+    })
26
+
27
+    // 获取初始化数据
28
+    const [data, setData] = useState([])
29
+    const [chartsData, setChartsData] = useState([])
30
+    const [loading, updataLoading] = useState(true)
31
+    const [btnloading, updataBtnloading] = useState(false)
32
+
33
+    useEffect(() => {
34
+        getList(formData);
35
+    }, [])
36
+
37
+    // 查询列表
38
+    const getList = (params) => {
39
+        request({ ...apis.stats.activityDetail, params: { ...params }, }).then((data) => {
40
+            setData(data)
41
+            setChartsData(data)
42
+            updataLoading(false)
43
+        }).catch(err => {
44
+            updataLoading(false)
45
+        })
46
+    }
47
+
48
+    //重置搜索
49
+    function handleReset() {
50
+        props.form.resetFields();
51
+    }
52
+
53
+    // 提交事件
54
+    const handleSubmit = (e) => {
55
+        e.preventDefault();
56
+        getList(formData);
57
+    }
58
+    // 更新页码
59
+    const changePageNum = (pageNumber) => {
60
+        props.form.validateFields((err, values) => {
61
+            if (!err) {
62
+                getList({ ...formData, pageNum: pageNumber });
63
+            }
64
+        });
65
+    }
66
+    // 切换日期 与picker联动
67
+    function setFormData(e) {
68
+        updateRadioVal(e.target.value)
69
+        updateFormData({
70
+            ...formData,
71
+            startDate: moment().subtract(e.target.value, 'day').format('YYYY-MM-DD'),
72
+            endDate: moment().format('YYYY-MM-DD'),
73
+        })
74
+        getList({
75
+            ...formData, startDate: moment().subtract(e.target.value, 'day').format('YYYY-MM-DD'),
76
+            endDate: moment().format('YYYY-MM-DD'),
77
+        });
78
+
79
+    }
80
+    // 选择日期
81
+    const handleDateChange = (val) => {
82
+        updateFormData({
83
+            ...formData,
84
+            startDate: val[0].format('YYYY-MM-DD'),
85
+            endDate: val[1].format('YYYY-MM-DD'),
86
+        })
87
+    }
88
+    const clickCon = (val, record, type) => {
89
+        if (val == 0) {
90
+            return <><span>{val}</span></>
91
+        }
92
+        return <><span style={{ color: 'blue', cursor: 'pointer' }} onClick={() => toDetail(record, type)} >{val}</span></>
93
+    }
94
+
95
+    //排序
96
+    const handleChange = (pagination, filters, sorter) => {
97
+        const keyValue = sorter.columnKey
98
+
99
+        if (sorter.order == 'ascend') {
100
+            setData(sortBy(data, function (item) {
101
+                return item[keyValue];
102
+            }))
103
+
104
+        } else if (sorter.order == 'descend') {
105
+
106
+            setData(sortBy(data, function (item) {
107
+                return -item[keyValue];
108
+            }))
109
+
110
+        } else {
111
+            setData(sortBy(data, function (item) {
112
+                return item.statisDate;
113
+            }))
114
+        }
115
+    };
116
+
117
+    const toSharePersons = rowData => () => {
118
+        console.log(rowData, 'rowData')
119
+        if (rowData) {
120
+            router.push({
121
+                pathname: '/statistical/activity/sharePersonNum',
122
+                query: {
123
+                    queryDate: rowData.statisDate,
124
+                },
125
+            });
126
+            return
127
+        }
128
+    }
129
+
130
+    const toShareNum = rowData => () => {
131
+        console.log(rowData, 'rowData')
132
+        if (rowData) {
133
+            router.push({
134
+                pathname: '/statistical/activity/shareNum',
135
+                query: {
136
+                    queryDate: rowData.statisDate,
137
+                },
138
+            });
139
+            return
140
+        }
141
+    }
142
+
143
+    const toAddVisitNum = rowData => () => {
144
+        console.log(rowData, 'statisDate')
145
+        if (rowData) {
146
+            router.push({
147
+                pathname: '/statistical/activity/visitNum',
148
+                query: {
149
+                    queryDate: rowData.date,
150
+                },
151
+            });
152
+            return
153
+        }
154
+    }
155
+
156
+    const toAddVisitPersonNum = rowData => () => {
157
+        console.log(rowData, 'rowData')
158
+        if (rowData) {
159
+            router.push({
160
+                pathname: '/statistical/activity/visitPersonNum',
161
+                query: {
162
+                    queryDate: rowData.statisDate,
163
+                },
164
+            });
165
+            return
166
+        }
167
+    }
168
+
169
+    const toAddRegistNum = rowData => () => {
170
+        console.log(rowData, 'rowData')
171
+        if (rowData) {
172
+            router.push({
173
+                pathname: '/statistical/activity/addRegistNum',
174
+                query: {
175
+                    queryDate: rowData.statisDate,
176
+                },
177
+            });
178
+            return
179
+        }
180
+    }
181
+
182
+    // 表格数据
183
+    const columns = [
184
+        {
185
+            title: '日期',
186
+            dataIndex: 'statisDate',
187
+            key: 'statisDate',
188
+            align: 'center',
189
+        },
190
+        {
191
+            title: '分享人数',
192
+            dataIndex: 'sharePersons',
193
+            key: 'sharePersons',
194
+            sorter: true,
195
+            render: (text, record) => (
196
+                <a style={{ color: '#66B3FF' }} onClick={toSharePersons(record)}><span>{record.sharePersons}</span></a>
197
+            ),
198
+        },
199
+        {
200
+            title: '分享次数',
201
+            dataIndex: 'shareNum',
202
+            key: 'shareNum',
203
+            sorter: true,
204
+            render: (text, record) => (
205
+                <a style={{ color: '#66B3FF' }} onClick={toShareNum(record)}><span>{record.shareNum}</span></a>
206
+            ),
207
+        },
208
+        {
209
+            title: '访问人数',
210
+            dataIndex: 'visitPersons',
211
+            key: 'visitPersons',
212
+            sorter: true,
213
+            render: (text, record) => (
214
+                <a style={{ color: '#66B3FF' }} onClick={toAddVisitPersonNum(record)}><span>{record.visitPersons}</span></a>
215
+            ),
216
+        },
217
+        {
218
+            title: '访问次数',
219
+            dataIndex: 'visitNum',
220
+            key: 'visitNum',
221
+            sorter: true,
222
+            render: (text, record) => (
223
+                <a style={{ color: '#66B3FF' }} onClick={toAddVisitNum(record)}><span>{record.visitNum}</span></a>
224
+            ),
225
+        },
226
+        {
227
+            title: '新增注册用户',
228
+            dataIndex: 'newCustomers',
229
+            key: 'newCustomers',
230
+            sorter: true,
231
+            render: (text, record) => (
232
+                <a style={{ color: '#66B3FF' }} onClick={toAddRegistNum(record)}><span>{record.newCustomers}</span></a>
233
+            ),
234
+        },
235
+    ];
236
+    // 下载文档
237
+    function download(data) {
238
+        if (!data) {
239
+            return
240
+        }
241
+        const url = window.URL.createObjectURL(new Blob([data]))
242
+        const link = document.createElement('a')
243
+        link.style.display = 'none'
244
+        link.href = url
245
+        link.setAttribute('download', `${props.location.query.targetName}.xlsx`)
246
+        document.body.append(link)
247
+        link.click()
248
+    }
249
+    // 导出
250
+    function exportRecord() {
251
+        updataBtnloading(true)
252
+        request({ ...apis.stats.exportActivityDetail, responseType: 'blob', params: { ...props.location.query, startDate: formData.startDate, endDate: formData.endDate, } })
253
+            .then(response => {
254
+                download(response)
255
+                updataBtnloading(false)
256
+            }).catch(error => {
257
+                updataBtnloading(false)
258
+            })
259
+    }
260
+    // 默认日期
261
+    const dateRange = [
262
+        moment(formData.startDate),
263
+        moment(formData.endDate),
264
+    ]
265
+
266
+    const dataZoom = props.dataZoom ? [
267
+        {
268
+            type: 'inside',
269
+            start: 0,
270
+            end: 100
271
+        },
272
+        {
273
+            type: 'slider',
274
+            start: 0,
275
+            end: 100
276
+        },
277
+    ] : undefined
278
+    const dataset = chartsData || []
279
+    const options = {
280
+
281
+        color: ["#FF814C", "#F02B3E", "#FD9FFF", "#7BFF82", "#95CCFF", "#8C4FFF"],
282
+        tooltip: {
283
+            trigger: "axis"
284
+        },
285
+        icon: "rect",
286
+        legend: {
287
+            data: ["分享次数", "分享人数", "访问次数", "访问人数", "新增注册用户"]
288
+        },
289
+        toolbox: {},
290
+        xAxis: {
291
+            type: "category",
292
+        },
293
+        yAxis: {},
294
+        dataZoom,
295
+        series: [
296
+            {
297
+                name: "分享次数",
298
+                type: "line",
299
+            },
300
+            {
301
+                name: "分享人数",
302
+                type: "line",
303
+            },
304
+            {
305
+                name: "访问次数",
306
+                type: "line",
307
+            },
308
+            {
309
+                name: "访问人数",
310
+                type: "line",
311
+            },
312
+            {
313
+                name: "新增注册用户",
314
+                type: "line",
315
+            }
316
+        ],
317
+        dataset: {
318
+            dimensions: ['statisDate', 'shareNum', 'sharePersons', 'visitNum', 'visitPersons', 'newCustomers'],
319
+            source: dataset
320
+        }
321
+    }
322
+
323
+
324
+    const piestyles = {
325
+        width: '100%',
326
+        height: '400px',
327
+    }
328
+    return (
329
+
330
+        <>
331
+            <Button type="danger" style={{ marginBottom: '18px' }} onClick={() => router.go(-1)}>返回</Button>
332
+            <Form layout="inline">
333
+                <div style={{ display: 'flex', alignItems: 'center' }}>
334
+                    <Radio.Group buttonStyle="solid" value={radioVal} onChange={setFormData} style={{ marginRight: '16px', }}>
335
+                        <Radio.Button value={7}>最近7天</Radio.Button>
336
+                        <Radio.Button value={30}>最近1月</Radio.Button>
337
+                    </Radio.Group>
338
+                    <Form.Item>
339
+                        <RangePicker value={dateRange} onChange={handleDateChange} placeholder={['开始日期', '结束日期']} />
340
+                    </Form.Item>
341
+                    <Form.Item style={{ position: 'absolute', right: '38px' }}>
342
+                        <Button type="primary" onClick={handleSubmit}>查询</Button>
343
+                        <Button style={{ marginLeft: 8 }} onClick={handleReset}>重置</Button>
344
+                    </Form.Item>
345
+                </div>
346
+            </Form>
347
+            <div style={{ fontSize: '0.12rem', lineHeight: '2.6', fontWeight: '600' }}>趋势图:{props.location.query.targetName}</div>
348
+            <div>
349
+                <EChart options={options} style={piestyles} />
350
+            </div>
351
+
352
+            <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
353
+                <h4 style={{ fontSize: '0.12rem', fontWeight: '600' }}>详细数据</h4>
354
+                <AuthButton name="admin.statistical.consultant.export" noRight={null}>
355
+                    <Button type="primary" onClick={exportRecord} loading={btnloading} style={{ zIndex: 1 }}>
356
+                        导出
357
+                </Button>
358
+                </AuthButton>
359
+            </div>
360
+
361
+            <Table rowKey={(index => { index })}
362
+                style={{ marginTop: '30px' }}
363
+                dataSource={data}
364
+                columns={columns}
365
+                pagination={{ pageSize: 10 }}
366
+                onChange={handleChange}
367
+                loading={loading}
368
+            />
369
+            {/* < div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
370
+                <Pagination size={2} showQuickJumper defaultCurrent={1}  total={data.total} onChange={changePageNum} current={data.current} />
371
+            </div> */}
372
+        </>
373
+    )
374
+}
375
+const WrappedHeader = Form.create({ name: 'record' })(record);
376
+
377
+export default WrappedHeader

+ 1
- 0
src/pages/statistical/activity/index.jsx Näytä tiedosto

@@ -51,6 +51,7 @@ function EditHouse(props) {
51 51
       <Tabs type="card" value={ tab } buttonStyle="solid" onChange={e => tabsCallback(e)}>
52 52
         <TabPane tab="统计总况" key="overView" ></TabPane>
53 53
         <TabPane tab="统计内容" key="content" ></TabPane>
54
+        {/* <Icon type="question-circle" theme="filled" style={{ fontSize: '25px', color: '#F00', marginLeft:'30px'}} /> */}
54 55
       </Tabs>
55 56
       <div style={{ marginTop: '20px' }}>
56 57
         { (tab === 'overView' && <OverView />)}

+ 9
- 4
src/pages/statistical/activity/shareNum.jsx Näytä tiedosto

@@ -19,6 +19,7 @@ const formItemLayout = {
19 19
   
20 20
 let daterange = []
21 21
 let tableTitle = ['类型']
22
+let queryDate = ''
22 23
 
23 24
 let columns = [
24 25
   {
@@ -60,6 +61,7 @@ class SharePersonNum extends React.Component {
60 61
   constructor(props) {
61 62
     super(props)
62 63
     console.log(props)
64
+    queryDate = props.location.query.queryDate
63 65
     let startDate;
64 66
     let endDate;
65 67
     if (props.location.query.queryDate){
@@ -81,14 +83,14 @@ class SharePersonNum extends React.Component {
81 83
         startDate: startDate,
82 84
         endDate: endDate,
83 85
         activityId: props.location.query.activityId,
84
-        activityType:props.location.query.activityType   
86
+        activityType:props.location.query.activityType,
87
+        personId: props.location.query.personId   
85 88
       },
86 89
       personData: [],  
87 90
       dataSoures: [],
88 91
       tableData: [],
89 92
       userType: 'all',
90
-      buildingId: [],
91
-      targetType: []
93
+      activityName:  props.location.query.activityName
92 94
     }
93 95
   }
94 96
 
@@ -167,6 +169,9 @@ class SharePersonNum extends React.Component {
167 169
 
168 170
     return (
169 171
     <>
172
+        <div>
173
+          <span style={{marginLeft:'20px'}}>分享内容:{this.state.activityName}</span>
174
+        </div>
170 175
         <Form layout="inline" onSubmit={e => this.handleSubmit(e, this.props)}>
171 176
           <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
172 177
             {getFieldDecorator('sharePersonType')(
@@ -191,7 +196,7 @@ class SharePersonNum extends React.Component {
191 196
           </Form.Item>
192 197
           </Form>     
193 198
         <div>
194
-        <AuthButton name="admin.customer.import" noRight={null}>
199
+        <AuthButton name="admin.statistical.activity.export" noRight={null}>
195 200
             <Button type="primary" style={{ float: 'right', margin: '20px 0', zIndex: 1 }} onClick={this.exportActivityStats}>
196 201
                 导出
197 202
             </Button>

+ 75
- 6
src/pages/statistical/activity/sharePersonNum.jsx Näytä tiedosto

@@ -20,6 +20,59 @@ const formItemLayout = {
20 20
 let daterange = []
21 21
 let tableTitle = ['类型']
22 22
 
23
+let staticStartDate = ''
24
+let staticEndDate = ''
25
+let queryDate = ''
26
+let activityName = ''
27
+
28
+const toShareNum = rowData => () => {
29
+  if(rowData) {
30
+    router.push({
31
+    pathname: '/statistical/activity/shareNum',
32
+    query: {
33
+      queryDate: queryDate,
34
+      personId: rowData.personId,
35
+      startDate: staticStartDate,
36
+      endDate: staticEndDate,
37
+      activityName: activityName
38
+    },
39
+  });
40
+    return
41
+  }
42
+}
43
+
44
+const toVisitPersonNum = rowData => () => {
45
+  if(rowData) {
46
+    router.push({
47
+    pathname: '/statistical/activity/visitPersonNum',
48
+    query: {
49
+      queryDate: queryDate,
50
+      personId: rowData.personId,
51
+      startDate: staticStartDate,
52
+      endDate: staticEndDate,
53
+      activityName: activityName
54
+    },
55
+  });
56
+    return
57
+  }
58
+} 
59
+
60
+const toVisitNum = rowData => () => {
61
+  if(rowData) {
62
+    router.push({
63
+    pathname: '/statistical/activity/visitNum',
64
+    query: {
65
+      queryDate: queryDate,
66
+      personId: rowData.personId,
67
+      startDate: staticStartDate,
68
+      endDate: staticEndDate,
69
+      activityName: activityName
70
+    },
71
+  });
72
+    return
73
+  }
74
+} 
75
+
23 76
 let columns = [
24 77
   {
25 78
     title: '分享者姓名',
@@ -46,18 +99,27 @@ let columns = [
46 99
     dataIndex: 'shareNum',
47 100
     key: 'shareNum',
48 101
     sorter: true,
49
-  },
102
+    render: (text, record) => (
103
+      <a style={{ color: '#66B3FF' }} onClick={toShareNum(record)}><span>{record.shareNum}</span></a>
104
+      ),
105
+    },
50 106
   {
51 107
     title: '访问人数',
52 108
     dataIndex: 'visitPersonNum',
53 109
     key: 'visitPersonNum',
54 110
     sorter: true,
111
+    render: (text, record) => (
112
+      <a style={{ color: '#66B3FF' }} onClick={toVisitPersonNum(record)}><span>{record.visitPersonNum}</span></a>
113
+      ),
55 114
   },
56 115
   {
57 116
     title: '访问次数',
58 117
     dataIndex: 'visitNum',
59 118
     key: 'visitNum',
60 119
     sorter: true,
120
+    render: (text, record) => (
121
+      <a style={{ color: '#66B3FF' }} onClick={toVisitNum(record)}><span>{record.visitNum}</span></a>
122
+      ),
61 123
   },
62 124
 ]
63 125
 
@@ -67,7 +129,11 @@ class SharePersonNum extends React.Component {
67 129
     super(props)
68 130
     let startDate;
69 131
     let endDate;
70
-    console.log(props)
132
+    queryDate = props.location.query.queryDate
133
+    activityName = props.location.query.activityName
134
+    staticStartDate = props.location.query.startDate;
135
+    staticEndDate = props.location.query.endDate;
136
+    
71 137
     if (props.location.query.queryDate){
72 138
       startDate = moment(props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).toDate();
73 139
       endDate = moment(props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).toDate();
@@ -89,14 +155,14 @@ class SharePersonNum extends React.Component {
89 155
         startDate: startDate,
90 156
         endDate: endDate,
91 157
         activityId: props.location.query.activityId,
92
-        activityType:props.location.query.activityType        
158
+        activityType: props.location.query.activityType,
159
+        buildingId: props.location.query.buildingId,         
93 160
       },
94 161
       personData: [],  
95 162
       dataSoures: [],
96 163
       tableData: [],
97 164
       userType: 'all',
98
-      buildingId: [],
99
-      targetType: []
165
+      activityName:  props.location.query.activityName
100 166
     }
101 167
   }
102 168
 
@@ -175,6 +241,9 @@ class SharePersonNum extends React.Component {
175 241
 
176 242
     return (
177 243
     <>
244
+        <div>
245
+          <span style={{marginLeft:'20px'}}>分享内容:{this.state.activityName}</span>
246
+        </div>
178 247
         <Form layout="inline" onSubmit={e => this.handleSubmit(e, this.props)}>
179 248
           <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
180 249
             {getFieldDecorator('sharePersonType')(
@@ -199,7 +268,7 @@ class SharePersonNum extends React.Component {
199 268
           </Form.Item>
200 269
           </Form>     
201 270
         <div>
202
-        <AuthButton name="admin.customer.import" noRight={null}>
271
+        <AuthButton name="admin.statistical.activity.export" noRight={null}>
203 272
             <Button type="primary" style={{ float: 'right', margin: '20px 0', zIndex: 1 }} onClick={this.exportActivityStats}>
204 273
                 导出
205 274
             </Button>

+ 10
- 4
src/pages/statistical/activity/visitNum.jsx Näytä tiedosto

@@ -20,6 +20,7 @@ const formItemLayout = {
20 20
   
21 21
 let daterange = []
22 22
 let tableTitle = ['类型']
23
+let queryDate = ''
23 24
 
24 25
 let columns = [
25 26
   {
@@ -79,6 +80,8 @@ class SharePersonNum extends React.Component {
79 80
 
80 81
   constructor(props) {
81 82
     super(props)
83
+    queryDate = props.location.query.queryDate
84
+
82 85
     let startDate;
83 86
     let endDate;
84 87
     if (props.location.query.queryDate){
@@ -100,14 +103,14 @@ class SharePersonNum extends React.Component {
100 103
         realtyConsultant:'',
101 104
         realtyConsultantPhone:'',
102 105
         activityId: props.location.query.activityId,
103
-        activityType:props.location.query.activityType  
106
+        activityType: props.location.query.activityType,
107
+        personId: props.location.query.personId,
104 108
       },
105 109
       personData: [],  
106 110
       dataSoures: [],
107 111
       tableData: [],
108 112
       userType: 'all',
109
-      buildingId: [],
110
-      targetType: []
113
+      activityName:  props.location.query.activityName
111 114
     }
112 115
   }
113 116
 
@@ -185,6 +188,9 @@ class SharePersonNum extends React.Component {
185 188
 
186 189
     return (
187 190
     <>
191
+        <div>
192
+          <span style={{marginLeft:'20px'}}>分享内容:{this.state.activityName}</span>
193
+        </div>
188 194
         <Form layout="inline" onSubmit={e => this.handleSubmit(e, this.props)}>
189 195
         <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
190 196
           {getFieldDecorator('personFrom')(
@@ -208,7 +214,7 @@ class SharePersonNum extends React.Component {
208 214
           </Form.Item>
209 215
           </Form>     
210 216
         <div>
211
-        <AuthButton name="admin.customer.import" noRight={null}>
217
+        <AuthButton name="admin.statistical.activity.export" noRight={null}>
212 218
             <Button type="primary" style={{ float: 'right', margin: '20px 0', zIndex: 1 }} onClick={this.exportActivityStats}>
213 219
                 导出
214 220
             </Button>

+ 11
- 4
src/pages/statistical/activity/visitPersonNum.jsx Näytä tiedosto

@@ -20,6 +20,7 @@ const formItemLayout = {
20 20
   
21 21
 let daterange = []
22 22
 let tableTitle = ['类型']
23
+let queryDate = ''
23 24
 
24 25
 let columns = [
25 26
   {
@@ -78,8 +79,11 @@ class SharePersonNum extends React.Component {
78 79
 
79 80
   constructor(props) {
80 81
     super(props)
82
+    queryDate = props.location.query.queryDate
83
+
81 84
     let startDate;
82 85
     let endDate;
86
+    
83 87
     if (props.location.query.queryDate){
84 88
       startDate = moment(props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).toDate();
85 89
       endDate = moment(props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).toDate();
@@ -99,14 +103,14 @@ class SharePersonNum extends React.Component {
99 103
         realtyConsultant:'',
100 104
         realtyConsultantPhone:'',
101 105
         activityId: props.location.query.activityId,
102
-        activityType:props.location.query.activityType  
106
+        activityType:props.location.query.activityType ,
107
+        personId:  props.location.query.personId
103 108
       },
104 109
       personData: [],  
105 110
       dataSoures: [],
106 111
       tableData: [],
107 112
       userType: 'all',
108
-      buildingId: [],
109
-      targetType: []
113
+      activityName:  props.location.query.activityName
110 114
     }
111 115
   }
112 116
 
@@ -184,6 +188,9 @@ class SharePersonNum extends React.Component {
184 188
 
185 189
     return (
186 190
     <>
191
+        <div>
192
+          <span style={{marginLeft:'20px'}}>分享内容:{this.state.activityName}</span>
193
+        </div>
187 194
         <Form layout="inline" onSubmit={e => this.handleSubmit(e, this.props)}>
188 195
         <Form.Item style={{marginTop:'20px', marginBottom:'20px'}}>
189 196
           {getFieldDecorator('personFrom')(
@@ -207,7 +214,7 @@ class SharePersonNum extends React.Component {
207 214
           </Form.Item>
208 215
           </Form>     
209 216
         <div>
210
-        <AuthButton name="admin.customer.import" noRight={null}>
217
+        <AuthButton name="admin.statistical.activity.export" noRight={null}>
211 218
             <Button type="primary" style={{ float: 'right', margin: '20px 0', zIndex: 1 }} onClick={this.exportActivityStats}>
212 219
                 导出
213 220
             </Button>

+ 15
- 0
src/services/apis.js Näytä tiedosto

@@ -424,6 +424,11 @@ export default {
424 424
       url: `${prefix}/selectCityUser`,
425 425
       action: 'admin.selectCityUser.get',
426 426
     },
427
+    personCity: {
428
+      method: 'get',
429
+      url: `${prefix}/selectCityPerson`,
430
+      action: 'admin.selectCityPerson.get',
431
+    },
427 432
     indexBanner: {
428 433
       method: 'get',
429 434
       url: `${prefix}/listNoticeByCondition`,
@@ -1687,6 +1692,16 @@ export default {
1687 1692
       url: `${prefix}/stats/tableList`,
1688 1693
       action: 'admin.contract.list.get',
1689 1694
     },
1695
+    activityDetail: {
1696
+      method: 'GET',
1697
+      url: `${prefix}/stats/activity/detail`,
1698
+      action: 'admin.contract.list.get',
1699
+    },
1700
+    exportActivityDetail: {
1701
+      method: 'POST',
1702
+      url: `${prefix}/stats/activity/detail`,
1703
+      action: 'admin.contract.list.post',
1704
+    },
1690 1705
     consultantKPI: {
1691 1706
       method: 'GET',
1692 1707
       url: `${prefix}/stats/consultant/kpi`,