Pārlūkot izejas kodu

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/estateagents-admin-manager into dev

# Conflicts:
#	src/pages/statistical/activity/compenents/OverView.jsx
魏超 5 gadus atpakaļ
vecāks
revīzija
a49d4ed321
27 mainītis faili ar 1457 papildinājumiem un 130 dzēšanām
  1. 30
    0
      config/routes.js
  2. 15
    0
      src/pages/activity/ActivityList.jsx
  3. 16
    0
      src/pages/activity/activityRecord.jsx
  4. 140
    0
      src/pages/activity/dataRecord/index.jsx
  5. 150
    0
      src/pages/activity/dataRecord/table/newuser.jsx
  6. 148
    0
      src/pages/activity/dataRecord/table/shareNum.jsx
  7. 179
    0
      src/pages/activity/dataRecord/table/shares.jsx
  8. 168
    0
      src/pages/activity/dataRecord/table/visitNum.jsx
  9. 176
    0
      src/pages/activity/dataRecord/table/visitors.jsx
  10. 11
    0
      src/pages/activity/drainage/DrainageList.jsx
  11. 16
    0
      src/pages/activity/drainage/drainageRecord.jsx
  12. 16
    0
      src/pages/activity/groupActivity/groupActivityRecord.jsx
  13. 10
    1
      src/pages/activity/groupActivity/list.jsx
  14. 15
    0
      src/pages/activity/helpActivity/helpActivityRecord.jsx
  15. 121
    111
      src/pages/activity/helpActivity/list.jsx
  16. 15
    1
      src/pages/activity/liveActivity/list/index.jsx
  17. 16
    0
      src/pages/activity/liveActivity/list/liveActivityRecord.jsx
  18. 0
    1
      src/pages/indexEcharts/index.jsx
  19. 28
    0
      src/pages/statistical/activity/addRegistNum.jsx
  20. 24
    0
      src/pages/statistical/activity/compenents/OverView.jsx
  21. 32
    0
      src/pages/statistical/activity/shareNum.jsx
  22. 38
    0
      src/pages/statistical/activity/sharePersonNum.jsx
  23. 31
    0
      src/pages/statistical/activity/visitNum.jsx
  24. 32
    0
      src/pages/statistical/activity/visitPersonNum.jsx
  25. 13
    7
      src/pages/statistical/building/detail.jsx
  26. 12
    9
      src/pages/statistical/building/index.jsx
  27. 5
    0
      src/services/apis.js

+ 30
- 0
config/routes.js Parādīt failu

@@ -261,6 +261,12 @@ export default [
261 261
                 hideInMenu: true,
262 262
                 component: './activity/SignList',
263 263
               },
264
+              {     
265
+                path: '/activity/activityRecord',
266
+                name: '数据记录',
267
+                hideInMenu: true,
268
+                component: './activity/activityRecord',
269
+            },
264 270
               {
265 271
                 path: '/activity/helpActivity/list',
266 272
                 name: '助力活动',
@@ -284,6 +290,12 @@ export default [
284 290
                 hideInMenu: true,
285 291
                 component: './activity/helpActivity/signList',
286 292
               },
293
+              {     
294
+                path: '/activity/helpActivity/helpActivityRecord',
295
+                name: '数据记录',
296
+                hideInMenu: true,
297
+                component: './activity/helpActivity/helpActivityRecord',
298
+            },
287 299
               {
288 300
                 path: '/activity/groupActivity/list',
289 301
                 name: '拼团活动',
@@ -307,6 +319,12 @@ export default [
307 319
                 hideInMenu: true,
308 320
                 component: './activity/groupActivity/detailActivity',
309 321
               },
322
+              {     
323
+                path: '/activity/groupActivity/groupActivityRecord',
324
+                name: '数据记录',
325
+                hideInMenu: true,
326
+                component: './activity/groupActivity/groupActivityRecord',
327
+            },
310 328
               {
311 329
                 path: '/activity/drainage/DrainageList',
312 330
                 name: 'H5活动',
@@ -330,6 +348,12 @@ export default [
330 348
                 hideInMenu: true,
331 349
                 component: './activity/helpActivity/detailActivity',
332 350
               },
351
+              {     
352
+                path: '/activity/drainage/drainageRecord',
353
+                name: '数据记录',
354
+                hideInMenu: true,
355
+                component: './activity/drainage/drainageRecord',
356
+            },
333 357
               {
334 358
                 path: '/activity/liveActivity/list/index',
335 359
                 name: '直播活动',
@@ -347,6 +371,12 @@ export default [
347 371
                 hideInMenu: true,
348 372
                 component: './activity/liveActivity/edit',
349 373
               },
374
+              {     
375
+                path: '/activity/liveActivity/liveActivityRecord',
376
+                name: '数据记录',
377
+                hideInMenu: true,
378
+                component: './activity/liveActivity/list/liveActivityRecord',
379
+            },
350 380
             ],
351 381
           },
352 382
           {

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

@@ -85,6 +85,17 @@ const header = props => {
85 85
       },
86 86
     });
87 87
   }
88
+
89
+  const toDataReacord = (id) => () => {
90
+    router.push({
91
+      pathname: '/activity/activityRecord',
92
+      query: {
93
+        
94
+        id,
95
+      },
96
+    });
97
+  }
98
+  
88 99
   /**
89 100
    *
90 101
    *
@@ -181,9 +192,13 @@ const header = props => {
181 192
           <AuthButton name="admin.buildingDynamic.tag" noRight={null}>
182 193
             <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={homeDynamic(row)}>{row.home === 1 ? '取消推首页' : '推首页'}<Icon type="vertical-align-top" className={styles.edit} /></span>
183 194
           </AuthButton>
195
+          {/* <AuthButton name="admin.buildingDynamic.update.put" noRight={null}> */}
196
+          {<span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={toDataReacord(row.dynamicId)}>数据记录<Icon type="form" className={styles.edit} /></span>}
197
+          {/* </AuthButton> */}
184 198
           <AuthButton name="admin.buildingDynamic.update.put" noRight={null}>
185 199
             {(row.activityStatus === 0 || row.activityStatus === 1) && <span style={{ color: '#FF925C', marginRight: '20px', cursor: 'pointer' }} onClick={toEditGoods(row.dynamicId)}>编辑<Icon type="form" className={styles.edit} /></span>}
186 200
           </AuthButton>
201
+          
187 202
           {/* {(row.activityStatus === 0 || row.activityStatus === 2) &&<span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={newQrcode.bind(this, row)}>{'下载二维码'} {<Icon type="qrcode" className={styles.shoppingCart} />}</span>} */}
188 203
         </>
189 204
       ),

+ 16
- 0
src/pages/activity/activityRecord.jsx Parādīt failu

@@ -0,0 +1,16 @@
1
+import React from 'react';
2
+import DataRecord from './dataRecord/index'
3
+import Prompt from 'umi/prompt';
4
+
5
+const header = props =>{
6
+    const id = props.location.query.id
7
+    // type:'activity',
8
+    return <><DataRecord id = {id} activeType = "activity"/>
9
+    <Prompt message={location =>
10
+        location.pathname.startsWith("/activity/ActivityList")
11
+          ? true
12
+          : location.pathname.startsWith("/activity/detailActivity") ? true : localStorage.removeItem("activePageParams")} />
13
+          </>
14
+}
15
+
16
+export default header

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

@@ -0,0 +1,140 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Input, Menu, Dropdown, Button, Icon, Modal, message, Table, Divider, Tabs, Tag, Select, Pagination } from 'antd';
3
+import router from 'umi/router';
4
+import apis from '../../../services/apis';
5
+import request from '../../../utils/request';
6
+import Visitors from './table/visitors'
7
+import VisitNum from './table/visitNum'
8
+import Newuser from './table/newuser'
9
+import Shares from './table/shares'
10
+import ShareNum from './table/shareNum'
11
+import moment from 'moment';
12
+
13
+const { TabPane } = Tabs;
14
+
15
+
16
+
17
+const DataRecord = props => {
18
+
19
+    const [showHelp, setShowHelp] = useState(false)
20
+    const [tab, setTab] = useState('1')
21
+    const [data, setData] = useState({})
22
+
23
+    const id = props.id
24
+    const type = props.activeType
25
+
26
+
27
+    useEffect(() => {
28
+
29
+        getData({ id: id, type: type })
30
+
31
+    }, [])
32
+
33
+    const getData = (params) => {
34
+  
35
+        request({ ...apis.activityDataStatis.getStatisticData, params: { ...params, } }).then((data) => {
36
+            console.log(data)
37
+            setData(data)
38
+        })
39
+    }
40
+
41
+    function tabsCallback(e) {
42
+        setTab(e)
43
+    }
44
+
45
+    return <>
46
+        <div>
47
+            <div>
48
+                <Icon type="question-circle" theme="filled" style={{ fontSize: '25px', color: '#F00', marginLeft: '30px' }} onClick={() => setShowHelp(true)} />
49
+                <Modal
50
+                    title="指标说明(数据会存在一定时间延迟)"
51
+                    centered
52
+                    visible={showHelp}
53
+                    footer={null}
54
+                    onCancel={() => setShowHelp(false)}
55
+                >
56
+                    <p style={{ fontSize: '0.106rem', color: '#333', marginBottom: '8px' }}>分享人数:</p>
57
+                    <p style={{ fontSize: '0.106rem', color: '#999', marginBottom: '8px' }}>分享小程序活动的总人数</p>
58
+                    <p style={{ fontSize: '0.106rem', color: '#333', marginBottom: '8px' }}>分享次数:</p>
59
+                    <p style={{ fontSize: '0.106rem', color: '#999', marginBottom: '8px' }}>触发小程序活动分享的总次数</p>
60
+                    <p style={{ fontSize: '0.106rem', color: '#333', marginBottom: '8px' }}>新增注册用户:</p>
61
+                    <p style={{ fontSize: '0.106rem', color: '#999', marginBottom: '8px' }}>通过当前活动授权手机号的总人数</p>
62
+                    <p style={{ fontSize: '0.106rem', color: '#333', marginBottom: '8px' }}>访问人数:</p>
63
+                    <p style={{ fontSize: '0.106rem', color: '#999', marginBottom: '8px' }}>访问小程序活动的总人数</p>
64
+                    <p style={{ fontSize: '0.106rem', color: '#333', marginBottom: '8px' }}>访问次数:</p>
65
+                    <p style={{ fontSize: '0.106rem', color: '#999', marginBottom: '8px' }}>访问小程序活动的总次数</p>
66
+                </Modal>
67
+                <Button type="primary" style={{ float: 'right', marginLeft: '20px', zIndex: 1 }} onClick={() => router.go(-1)}>
68
+                    返回
69
+               </Button>
70
+            </div>
71
+            <div>
72
+
73
+                <div style={{ display: 'flex', marginBottom: '33px', marginTop: '20px' }}>
74
+                    <div style={{
75
+                        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',
76
+                        borderRadius: '12px', width: '32%', marginRight: '2%'
77
+                    }}>
78
+                        <span style={{ fontSize: '24px', color: '#fff' }}>访问总人数 </span>
79
+                        <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{data.visitPersons || '0'}人</span>
80
+                    </div>
81
+                    <div style={{
82
+                        textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: '#FFC6AA', height: '100px',
83
+                        borderRadius: '12px', width: '32%', marginRight: '2%'
84
+                    }}>
85
+                        <span style={{ fontSize: '24px', color: '#fff' }}>访问总次数 </span>
86
+                        <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{data.visitNum || '0'}人</span>
87
+                    </div>
88
+                    <div style={{
89
+                        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',
90
+                        borderRadius: '12px', width: '32%', marginRight: '2%'
91
+                    }}>
92
+                        <span style={{ fontSize: '24px', color: '#fff' }}>新增注册用户 </span>
93
+                        <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{data.newPersons || '0'}人</span>
94
+                    </div>
95
+                    <div style={{
96
+                        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',
97
+                        borderRadius: '12px', width: '32%', marginRight: '2%'
98
+                    }}>
99
+                        <span style={{ fontSize: '24px', color: '#fff' }}>分享总人数 </span>
100
+                        <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{data.sharePersons || '0'}人</span>
101
+                    </div>
102
+                    <div style={{
103
+                        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',
104
+                        borderRadius: '12px', width: '32%'
105
+                    }}>
106
+                        <span style={{ fontSize: '24px', color: '#fff' }}>分享总次数 </span>
107
+                        <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{data.shareNum || '0'}人</span>
108
+                    </div>
109
+                </div>
110
+            </div>
111
+
112
+        </div>
113
+        <div>
114
+            <Tabs type="card" value={tab} buttonStyle="solid" onChange={e => tabsCallback(e)}>
115
+                <TabPane tab="访问人数" key="1" ></TabPane>
116
+                <TabPane tab="访问次数" key="2" ></TabPane>
117
+                <TabPane tab="新增注册用户" key="3" ></TabPane>
118
+                <TabPane tab="分享人数" key="4" ></TabPane>
119
+                <TabPane tab="分享次数" key="5" ></TabPane>
120
+            </Tabs>
121
+            <div style={{ marginTop: '20px' }}>
122
+                {/* 访问人数 */}
123
+                {(tab === '1' && < Visitors id={id} type={type} />)}
124
+                {/* 访问次数 */}
125
+                {(tab === '2' && <VisitNum id={id} type={type}/>)}
126
+                {/* 新增注册用户 */}
127
+                {(tab === '3' && <Newuser id={id} type={type}/>)}
128
+                {/* 分享人数 */}
129
+                {(tab === '4' && <Shares id={id} type={type}/>)}
130
+                {/* 分享次数 */}
131
+                {(tab === '5' && <ShareNum id={id} type={type}/>)}
132
+
133
+                {/* { (tab === 'desc' && <Icon type="question-circle" theme="filled" style={{ fontSize: '25px', color: '#F00', marginLeft:'30px'}} />)} */}
134
+
135
+            </div>
136
+        </div>
137
+    </>
138
+}
139
+
140
+export default DataRecord

+ 150
- 0
src/pages/activity/dataRecord/table/newuser.jsx Parādīt failu

@@ -0,0 +1,150 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker } from 'antd';
3
+import router from 'umi/router';
4
+import apis from '../../../../services/apis';
5
+import request from '../../../../utils/request';
6
+import AuthButton from '../../../../components/AuthButton';
7
+import WxDictSelect from '@/components/SelectButton/WxDictSelect';
8
+import moment from 'moment';
9
+
10
+const date = {
11
+  startDate: moment().year(1000).hours(0).minutes(0).seconds(0).milliseconds(0).toDate(),
12
+  endDate: moment().year(3000).hours(0).minutes(0).seconds(0).milliseconds(0).toDate()
13
+}
14
+
15
+const header = props => {
16
+
17
+  const [data, setData] = useState({})
18
+  const activityId = props.id
19
+  const activityType = props.type
20
+
21
+  useEffect(() => {
22
+    console.log(activityId, activityType)
23
+    getList({pageNum: 1, pageSize: 10 })
24
+
25
+  }, [])
26
+
27
+  const getList = params => {
28
+    console.log(params)
29
+    request({ ...apis.activityDataStatis.activityAddRegist, params: {...params,activityId: activityId, activityType: activityType,...date  }}).then( data=> {
30
+      console.log(data)
31
+      setData(data)
32
+    }).catch(e=>{
33
+      console.log(e)
34
+    })
35
+  }
36
+  
37
+  const columns = [
38
+        {
39
+          title: '姓名',
40
+          dataIndex: 'nickName',
41
+          key: 'nickName',
42
+        },
43
+        {
44
+          title: '电话',
45
+          dataIndex: 'phone',
46
+          key: 'phone',
47
+        },
48
+        {
49
+          title: '性别',
50
+          dataIndex: 'gender',
51
+          key: 'gender',
52
+        },
53
+        {
54
+          title: '归属地',
55
+          dataIndex: 'province',
56
+          key: 'province',
57
+        },
58
+        {
59
+          title: '来源渠道',
60
+          dataIndex: 'personFrom',
61
+          key: 'personFrom',
62
+        },
63
+        {
64
+          title: '置业顾问',
65
+          dataIndex: 'realtyConsultant',
66
+          key: 'realtyConsultant',
67
+        },
68
+        {
69
+          title: '置业顾问电话',
70
+          dataIndex: 'realtyConsultantPhone',
71
+          key: 'realtyConsultantPhone',
72
+        },
73
+        {
74
+          title: '分享者',
75
+          dataIndex: 'sharePersonName',
76
+          key: 'sharePersonName',
77
+        },
78
+        {
79
+          title: '分享者电话',
80
+          dataIndex: 'sharePersonPhone',
81
+          key: 'sharePersonPhone',
82
+        },
83
+      ]
84
+
85
+    function handleReset() {
86
+        props.form.resetFields();
87
+        getList({ pageNum: 1, pageSize: 10 })
88
+    }
89
+
90
+    const changePageNum = pageNumber => {
91
+        getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
92
+      }
93
+
94
+      const handleSubmit = e => {
95
+        e.preventDefault();
96
+        props.form.validateFields((err, values) => {
97
+          if (!err) {
98
+            console.log('提交数据: ', values)
99
+           
100
+            getList({ pageNum: 1, pageSize: 10, ...values })
101
+          }
102
+        });
103
+      }
104
+    
105
+      const exportActivityStats = () => {
106
+        
107
+        request({ ...apis.activityDataStatis.activityAddRegistNumExport, params: {activityId: activityId, activityType: activityType,...props.form.getFieldsValue(),...date} }).then(data => {
108
+          if (!data) {
109
+            return
110
+          }
111
+          const url = window.URL.createObjectURL(new Blob([data]))
112
+            const link = document.createElement('a')
113
+            link.style.display = 'none'
114
+            link.href = url
115
+            link.setAttribute('download', '访问统计.xlsx')
116
+            document.body.append(link)
117
+            link.click()
118
+        }).catch()
119
+      }
120
+
121
+    const { getFieldDecorator } = props.form
122
+    return <>
123
+        <div>
124
+            <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
125
+                <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
126
+                    {getFieldDecorator('personFrom')(
127
+                        <WxDictSelect />,
128
+                    )}
129
+                </Form.Item>
130
+                <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
131
+                    {getFieldDecorator('province')(<Input placeholder="请输入归属地" />)}
132
+                </Form.Item>
133
+                <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
134
+                    <Button type="primary" htmlType="submit" style={{ marginLeft: '30px' }}> 查询</Button>
135
+                    <Button onClick={handleReset} style={{ marginLeft: '30px' }}>重置</Button>
136
+                </Form.Item>
137
+            </Form>
138
+            <div>
139
+                <Button type="primary" style={{ float: 'right', marginBottom: '20px', zIndex: 1 }} onClick={exportActivityStats}>导出</Button>
140
+            </div>
141
+            <Table style={{ marginTop: '30px' }} dataSource={data.records} columns={columns} pagination={false} rowKey="activityList" />
142
+            <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
143
+                <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
144
+            </div>
145
+        </div>
146
+    </>
147
+}
148
+
149
+const WrappedTypeForm = Form.create()(header);
150
+export default WrappedTypeForm

+ 148
- 0
src/pages/activity/dataRecord/table/shareNum.jsx Parādīt failu

@@ -0,0 +1,148 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker } from 'antd';
3
+import router from 'umi/router';
4
+import apis from '../../../../services/apis';
5
+import request from '../../../../utils/request';
6
+import AuthButton from '../../../../components/AuthButton';
7
+import WxDictSelect from '@/components/SelectButton/WxDictSelect';
8
+import moment from 'moment';
9
+
10
+
11
+const date = {
12
+    startDate: moment().year(1000).hours(0).minutes(0).seconds(0).milliseconds(0).toDate(),
13
+    endDate: moment().year(3000).hours(0).minutes(0).seconds(0).milliseconds(0).toDate()
14
+  }
15
+  
16
+  const header = props => {
17
+  
18
+    const [data, setData] = useState({})
19
+
20
+    const activityId = props.id
21
+    const activityType = props.type
22
+  
23
+    useEffect(() => {
24
+      console.log(activityId, activityType)
25
+      getList({pageNum: 1, pageSize: 10 })
26
+  
27
+    }, [])
28
+  
29
+    const getList = params => {
30
+      console.log(params)
31
+      request({ ...apis.activityDataStatis.activityShareNum, params: {...params, activityId: activityId, activityType: activityType,...date  }}).then( data=> {
32
+        console.log(data)
33
+        setData(data)
34
+      }).catch(e=>{
35
+        console.log(e)
36
+      })
37
+    }
38
+   
39
+    const columns = [
40
+        {
41
+          title: '分享者姓名',
42
+          dataIndex: 'sharePersonName',
43
+          key: 'sharePersonName',
44
+        },
45
+        {
46
+          title: '分享者类型',
47
+          dataIndex: 'shareType',
48
+          key: 'shareType',
49
+          render: (text, records) => {
50
+            if (records.sharePersonType === 'drift') { return '游客' }
51
+            if (records.sharePersonType === 'customer') { return '普通客户' }
52
+            if (records.sharePersonType === 'Realty Consultant') { return '置业顾问' }
53
+          },
54
+        },
55
+        {
56
+          title: '分享时间',
57
+          dataIndex: 'shareTime',
58
+          key: 'shareTime',
59
+          render: (x, row) => <><span>{`${moment(row.shareTime).format('YYYY-MM-DD HH:mm:ss')}`}</span></>,
60
+        },
61
+        {
62
+          title: '分享者电话',
63
+          dataIndex: 'sharePersonPhone',
64
+          key: 'sharePersonPhone',
65
+        },
66
+        {
67
+          title: '访问人数',
68
+          dataIndex: 'visitPersonNum',
69
+          key: 'visitPersonNum',
70
+        },
71
+      ]
72
+
73
+    function handleReset() {
74
+        props.form.resetFields();
75
+        getList({ pageNum: 1, pageSize: 10 })
76
+    }
77
+
78
+    const changePageNum = pageNumber => {
79
+        getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
80
+    }
81
+
82
+    const handleSubmit = e => {
83
+      e.preventDefault();
84
+      props.form.validateFields((err, values) => {
85
+        if (!err) {
86
+         
87
+          getList({ pageNum: 1, pageSize: 10, ...values })
88
+        }
89
+      });
90
+    }
91
+
92
+
93
+  
94
+    const exportActivityStats = () => {
95
+      
96
+      request({ ...apis.activityDataStatis.activityShareNumExport, params: {activityId: activityId, activityType: activityType,...props.form.getFieldsValue(),...date} }).then(data => {
97
+        if (!data) {
98
+          return
99
+        }
100
+        const url = window.URL.createObjectURL(new Blob([data]))
101
+          const link = document.createElement('a')
102
+          link.style.display = 'none'
103
+          link.href = url
104
+          link.setAttribute('download', '访问统计.xlsx')
105
+          document.body.append(link)
106
+          link.click()
107
+      }).catch()
108
+    }
109
+  
110
+
111
+    const { getFieldDecorator } = props.form
112
+    return <>
113
+        <div>
114
+            <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
115
+                <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
116
+                    {getFieldDecorator('sharePersonType')(
117
+                        <Select placeholder="分享者类型" style={{ width: 150, marginLeft: '20px' }}>
118
+                            <Option value="">全部</Option>
119
+                            <Option value="drift">游客</Option>
120
+                            <Option value="customer">普通客户</Option>
121
+                            <Option value="Realty Consultant">置业顾问</Option>
122
+                        </Select>
123
+                    )}
124
+                </Form.Item>
125
+                <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
126
+                    {getFieldDecorator('sharePersonPhone')(<Input placeholder="分享者电话" />)}
127
+                </Form.Item>
128
+                <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
129
+                    {getFieldDecorator('sharePersonName')(<Input placeholder="分享者姓名" />)}
130
+                </Form.Item>
131
+                <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
132
+                    <Button type="primary" htmlType="submit" style={{ marginLeft: '30px' }}> 查询</Button>
133
+                    <Button onClick={handleReset} style={{ marginLeft: '30px' }}>重置</Button>
134
+                </Form.Item>
135
+            </Form>
136
+            <div>
137
+                <Button type="primary" style={{ float: 'right', marginBottom: '20px', zIndex: 1 }} onClick={exportActivityStats}>导出</Button>
138
+            </div>
139
+            <Table style={{ marginTop: '30px' }} dataSource={data.records} columns={columns} pagination={false} onChange={handleTableChange} rowKey="activityList" />
140
+            <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
141
+                <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
142
+            </div>
143
+        </div>
144
+    </>
145
+}
146
+
147
+const WrappedTypeForm = Form.create()(header);
148
+export default WrappedTypeForm

+ 179
- 0
src/pages/activity/dataRecord/table/shares.jsx Parādīt failu

@@ -0,0 +1,179 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker } from 'antd';
3
+import router from 'umi/router';
4
+import apis from '../../../../services/apis';
5
+import request from '../../../../utils/request';
6
+import AuthButton from '../../../../components/AuthButton';
7
+import WxDictSelect from '@/components/SelectButton/WxDictSelect';
8
+import moment from 'moment';
9
+
10
+const date = {
11
+  startDate: moment().year(1000).hours(0).minutes(0).seconds(0).milliseconds(0).toDate(),
12
+  endDate: moment().year(3000).hours(0).minutes(0).seconds(0).milliseconds(0).toDate()
13
+}
14
+
15
+const header = props => {
16
+
17
+  const [data, setData] = useState({})
18
+  const [sort, setSort] = useState({})
19
+
20
+  const activityId = props.id
21
+  const activityType = props.type
22
+
23
+  useEffect(() => {
24
+    console.log(activityId, activityType)
25
+    getList({pageNum: 1, pageSize: 10 })
26
+
27
+  }, [])
28
+
29
+  const getList = params => {
30
+    console.log(params)
31
+    request({ ...apis.activityDataStatis.activitySharePersonNum, params: { ...params, activityId: activityId, activityType: activityType, ...date } }).then(data => {
32
+      console.log(data)
33
+      setData(data)
34
+    }).catch(e => {
35
+      console.log(e)
36
+    })
37
+  }
38
+
39
+  const columns = [
40
+    {
41
+      title: '分享者姓名',
42
+      dataIndex: 'sharePersonName',
43
+      key: 'sharePersonName',
44
+    },
45
+    {
46
+      title: '分享者类型',
47
+      dataIndex: 'sharePersonType',
48
+      key: 'sharePersonType',
49
+      render: (text, records) => {
50
+        if (records.sharePersonType === 'drift') { return '游客' }
51
+        if (records.sharePersonType === 'customer') { return '普通客户' }
52
+        if (records.sharePersonType === 'Realty Consultant') { return '置业顾问' }
53
+      },
54
+    },
55
+    {
56
+      title: '分享者电话',
57
+      dataIndex: 'sharePersonPhone',
58
+      key: 'sharePersonPhone',
59
+    },
60
+    {
61
+      title: '分享次数',
62
+      dataIndex: 'shareNum',
63
+      key: 'shareNum',
64
+      sorter: true,
65
+      // render: (text, record) => (
66
+      //   <a style={{ color: '#66B3FF' }} onClick={toShareNum(record)}><span>{record.shareNum}</span></a>
67
+      // ),
68
+    },
69
+    {
70
+      title: '访问人数',
71
+      dataIndex: 'visitPersonNum',
72
+      key: 'visitPersonNum',
73
+      sorter: true,
74
+      // render: (text, record) => (
75
+      //   <a style={{ color: '#66B3FF' }} onClick={toVisitPersonNum(record)}><span>{record.visitPersonNum}</span></a>
76
+      // ),
77
+    },
78
+    {
79
+      title: '访问次数',
80
+      dataIndex: 'visitNum',
81
+      key: 'visitNum',
82
+      sorter: true,
83
+      // render: (text, record) => (
84
+      //   <a style={{ color: '#66B3FF' }} onClick={toVisitNum(record)}><span>{record.visitNum}</span></a>
85
+      // ),
86
+    },
87
+  ]
88
+
89
+  const handleTableChange = (pagination, filters, sorter) => {
90
+    console.log(pagination, filters, sorter)
91
+    setSort({
92
+      sort: sorter.order,
93
+      colKey: sorter.columnKey,
94
+    })
95
+    const query = {
96
+      pageNum: pagination.current,
97
+        pageSize: pagination.pageSize,
98
+        sort: sorter.order,
99
+        colKey: sorter.columnKey,
100
+        ...props.form.getFieldsValue()
101
+    }
102
+    getList(query)
103
+  };
104
+
105
+  function handleReset() {
106
+    props.form.resetFields();
107
+    getList({ pageNum: 1, pageSize: 10 })
108
+  }
109
+
110
+  const changePageNum = pageNumber => {
111
+    getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue(),...sort })
112
+  }
113
+
114
+  const handleSubmit = e => {
115
+    e.preventDefault();
116
+    props.form.validateFields((err, values) => {
117
+      if (!err) {
118
+        console.log('提交数据: ', values)
119
+       
120
+        getList({ pageNum: 1, pageSize: 10, ...values })
121
+      }
122
+    });
123
+  }
124
+
125
+  const exportActivityStats = () => {
126
+    
127
+    request({ ...apis.activityDataStatis.activitySharePersonNumExport, params: {activityId: activityId, activityType: activityType,...props.form.getFieldsValue(),...date} }).then(data => {
128
+      if (!data) {
129
+        return
130
+      }
131
+      const url = window.URL.createObjectURL(new Blob([data]))
132
+        const link = document.createElement('a')
133
+        link.style.display = 'none'
134
+        link.href = url
135
+        link.setAttribute('download', '访问统计.xlsx')
136
+        document.body.append(link)
137
+        link.click()
138
+    }).catch()
139
+  }
140
+
141
+
142
+  const { getFieldDecorator } = props.form
143
+  return <>
144
+    <div>
145
+      <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
146
+        <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
147
+          {getFieldDecorator('sharePersonType')(
148
+            <Select placeholder="分享者类型" style={{ width: 150, marginLeft: '20px' }}>
149
+              <Option value="">全部</Option>
150
+              <Option value="drift">游客</Option>
151
+              <Option value="customer">普通客户</Option>
152
+              <Option value="Realty Consultant">置业顾问</Option>
153
+            </Select>
154
+          )}
155
+        </Form.Item>
156
+        <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
157
+          {getFieldDecorator('sharePersonPhone')(<Input placeholder="分享者电话" />)}
158
+        </Form.Item>
159
+        <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
160
+          {getFieldDecorator('sharePersonName')(<Input placeholder="分享者姓名" />)}
161
+        </Form.Item>
162
+        <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
163
+          <Button type="primary" htmlType="submit" style={{ marginLeft: '30px' }}> 查询</Button>
164
+          <Button onClick={handleReset} style={{ marginLeft: '30px' }}>重置</Button>
165
+        </Form.Item>
166
+      </Form>
167
+      <div>
168
+        <Button type="primary" style={{ float: 'right', marginBottom: '20px', zIndex: 1 }} onClick={exportActivityStats} >导出</Button>
169
+      </div>
170
+      <Table style={{ marginTop: '30px' }} dataSource={data.records} columns={columns} pagination={false} onChange={handleTableChange} rowKey="activityList" />
171
+      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
172
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum}  current={data.current} />
173
+      </div>
174
+    </div>
175
+  </>
176
+}
177
+
178
+const WrappedTypeForm = Form.create()(header);
179
+export default WrappedTypeForm

+ 168
- 0
src/pages/activity/dataRecord/table/visitNum.jsx Parādīt failu

@@ -0,0 +1,168 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker } from 'antd';
3
+import router from 'umi/router';
4
+import apis from '../../../../services/apis';
5
+import request from '../../../../utils/request';
6
+import AuthButton from '../../../../components/AuthButton';
7
+import WxDictSelect from '@/components/SelectButton/WxDictSelect';
8
+import moment from 'moment';
9
+
10
+const date = {
11
+  startDate: moment().year(1000).hours(0).minutes(0).seconds(0).milliseconds(0).toDate(),
12
+  endDate: moment().year(3000).hours(0).minutes(0).seconds(0).milliseconds(0).toDate()
13
+}
14
+
15
+const header = props => {
16
+
17
+  const [data, setData] = useState({})
18
+  const activityId = props.id
19
+  const activityType = props.type
20
+
21
+  useEffect(() => {
22
+    console.log(activityId, activityType)
23
+    getList({ pageNum: 1, pageSize: 10 })
24
+
25
+  }, [])
26
+
27
+  const getList = params => {
28
+    console.log(params)
29
+    request({ ...apis.activityDataStatis.activityVisitNum, params: { ...params, activityId: activityId, activityType: activityType, ...date } }).then(data => {
30
+      console.log(data)
31
+      setData(data)
32
+    }).catch(e => {
33
+      console.log(e)
34
+    })
35
+  }
36
+
37
+
38
+  let columns = [
39
+    {
40
+      title: '姓名',
41
+      dataIndex: 'nickName',
42
+      key: 'nickName',
43
+    },
44
+    {
45
+      title: '电话',
46
+      dataIndex: 'phone',
47
+      key: 'phone',
48
+    },
49
+    {
50
+      title: '性别',
51
+      dataIndex: 'gender',
52
+      key: 'gender',
53
+    },
54
+    {
55
+      title: '归属地',
56
+      dataIndex: 'province',
57
+      key: 'province',
58
+    },
59
+    {
60
+      title: '来源渠道',
61
+      dataIndex: 'personFrom',
62
+      key: 'personFrom',
63
+    },
64
+    {
65
+      title: '置业顾问',
66
+      dataIndex: 'realtyConsultant',
67
+      key: 'realtyConsultant',
68
+    },
69
+    {
70
+      title: '置业顾问电话',
71
+      dataIndex: 'realtyConsultantPhone',
72
+      key: 'realtyConsultantPhone',
73
+    },
74
+    {
75
+      title: '分享者',
76
+      dataIndex: 'sharePersonName',
77
+      key: 'sharePersonName',
78
+    },
79
+    {
80
+      title: '分享者电话',
81
+      dataIndex: 'sharePersonPhone',
82
+      key: 'sharePersonPhone',
83
+    },
84
+    {
85
+      title: '访问时间',
86
+      dataIndex: 'visitDate',
87
+      key: 'visitDate',
88
+      render: (x, row) => <><span>{`${moment(row.visitDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>,
89
+    },
90
+  ]
91
+
92
+  function handleReset() {
93
+    props.form.resetFields();
94
+    getList({ pageNum: 1, pageSize: 10 })
95
+  }
96
+
97
+  const changePageNum = pageNumber => {
98
+    getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
99
+  }
100
+
101
+  const handleSubmit = e => {
102
+    e.preventDefault();
103
+    props.form.validateFields((err, values) => {
104
+      if (!err) {
105
+        getList({ pageNum: 1, pageSize: 10, ...values })
106
+      }
107
+    });
108
+  }
109
+
110
+  const exportActivityStats = () => {
111
+
112
+    request({ ...apis.activityDataStatis.activityVisitNumExport, params: { activityId: activityId, activityType: activityType, ...props.form.getFieldsValue(), ...date } }).then(data => {
113
+      if (!data) {
114
+        return
115
+      }
116
+      const url = window.URL.createObjectURL(new Blob([data]))
117
+      const link = document.createElement('a')
118
+      link.style.display = 'none'
119
+      link.href = url
120
+      link.setAttribute('download', '访问统计.xlsx')
121
+      document.body.append(link)
122
+      link.click()
123
+    }).catch()
124
+  }
125
+
126
+  const { getFieldDecorator } = props.form
127
+  return <>
128
+    <div>
129
+      <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
130
+        <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
131
+          {getFieldDecorator('personFrom')(
132
+            <WxDictSelect />,
133
+          )}
134
+        </Form.Item>
135
+        <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
136
+          {getFieldDecorator('province')(<Input placeholder="请输入归属地" />)}
137
+        </Form.Item>
138
+        <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
139
+          {getFieldDecorator('realtyConsultant')(<Input placeholder="置业顾问" />)}
140
+        </Form.Item>
141
+        <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
142
+          {getFieldDecorator('realtyConsultantPhone')(<Input placeholder="置业顾问电话" />)}
143
+        </Form.Item>
144
+        <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
145
+          <Button type="primary" htmlType="submit" style={{ marginLeft: '30px' }}>
146
+            查询
147
+            </Button>
148
+          <Button onClick={handleReset} style={{ marginLeft: '30px' }}>重置</Button>
149
+        </Form.Item>
150
+      </Form>
151
+      <div>
152
+
153
+
154
+        <Button type="primary" style={{ float: 'right', marginBottom: '20px', zIndex: 1 }} onClick={exportActivityStats} >
155
+          导出
156
+            </Button>
157
+
158
+      </div>
159
+      <Table style={{ marginTop: '30px' }} dataSource={data.records} columns={columns} pagination={false} rowKey="activityList" />
160
+      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
161
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
162
+      </div>
163
+    </div>
164
+  </>
165
+}
166
+
167
+const WrappedTypeForm = Form.create()(header);
168
+export default WrappedTypeForm

+ 176
- 0
src/pages/activity/dataRecord/table/visitors.jsx Parādīt failu

@@ -0,0 +1,176 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker } from 'antd';
3
+import router from 'umi/router';
4
+import apis from '../../../../services/apis';
5
+import request from '../../../../utils/request';
6
+import AuthButton from '../../../../components/AuthButton';
7
+import WxDictSelect from '@/components/SelectButton/WxDictSelect';
8
+import moment from 'moment';
9
+
10
+const date = {
11
+  startDate: moment().year(1000).hours(0).minutes(0).seconds(0).milliseconds(0).toDate(),
12
+  endDate: moment().year(3000).hours(0).minutes(0).seconds(0).milliseconds(0).toDate()
13
+}
14
+// 2020-04-18T16:00:00.000Z
15
+
16
+const header = props => {
17
+
18
+  // const [id,type] = props
19
+
20
+  const [data, setData] = useState({})
21
+  const activityId = props.id
22
+  const activityType = props.type
23
+  
24
+
25
+  useEffect(() => {
26
+
27
+    getList({pageNum: 1, pageSize: 10 })
28
+
29
+  }, [])
30
+
31
+  const getList = params => {
32
+    console.log(params)
33
+    request({ ...apis.activityDataStatis.activityVisitPersonNum, params: {...params, activityId: activityId, activityType: activityType ,...date  }}).then( data=> {
34
+      console.log(data)
35
+      setData(data)
36
+    }).catch(e=>{
37
+      console.log(e)
38
+    })
39
+  }
40
+
41
+  // getTableList () {
42
+
43
+  //   console.log(formData)
44
+  //   request({ ...apis.activityDataStatis.activityVisitPersonNum, params: formData }).then(data => {
45
+  //     console.log(data)
46
+  //     this.setState({ tableData: data.records, total: data.total})
47
+  //   }).catch()
48
+  // }
49
+
50
+  const columns = [
51
+    {
52
+      title: '姓名',
53
+      dataIndex: 'nickName',
54
+      key: 'nickName',
55
+    },
56
+    {
57
+      title: '电话',
58
+      dataIndex: 'phone',
59
+      key: 'phone',
60
+    },
61
+    {
62
+      title: '性别',
63
+      dataIndex: 'gender',
64
+      key: 'gender',
65
+    },
66
+    {
67
+      title: '归属地',
68
+      dataIndex: 'province',
69
+      key: 'province',
70
+    },
71
+    {
72
+      title: '来源渠道',
73
+      dataIndex: 'personFrom',
74
+      key: 'personFrom',
75
+    },
76
+    {
77
+      title: '置业顾问',
78
+      dataIndex: 'realtyConsultant',
79
+      key: 'realtyConsultant',
80
+    },
81
+    {
82
+      title: '置业顾问电话',
83
+      dataIndex: 'realtyConsultantPhone',
84
+      key: 'realtyConsultantPhone',
85
+    },
86
+    {
87
+      title: '推广人',
88
+      dataIndex: 'sharePersonName',
89
+      key: 'sharePersonName',
90
+    },
91
+    {
92
+      title: '访问次数',
93
+      dataIndex: 'visitNum',
94
+      key: 'visitNum',
95
+    },
96
+  ]
97
+
98
+  function handleReset() {
99
+    props.form.resetFields();
100
+    getList({ pageNum: 1, pageSize: 10 })
101
+  }
102
+
103
+  const changePageNum = pageNumber => {
104
+    getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
105
+  }
106
+
107
+  const handleSubmit = e => {
108
+    e.preventDefault();
109
+    props.form.validateFields((err, values) => {
110
+      if (!err) {
111
+        console.log('提交数据: ', values)
112
+       
113
+        getList({ pageNum: 1, pageSize: 10, ...values })
114
+      }
115
+    });
116
+  }
117
+
118
+  const exportActivityStats = () => {
119
+    
120
+    request({ ...apis.activityDataStatis.activityVisitPersonNumExport, params: {activityId: activityId, activityType: activityType,...props.form.getFieldsValue(),...date} }).then(data => {
121
+      if (!data) {
122
+        return
123
+      }
124
+      const url = window.URL.createObjectURL(new Blob([data]))
125
+        const link = document.createElement('a')
126
+        link.style.display = 'none'
127
+        link.href = url
128
+        link.setAttribute('download', '访问统计.xlsx')
129
+        document.body.append(link)
130
+        link.click()
131
+    }).catch()
132
+  }
133
+
134
+  const { getFieldDecorator } = props.form
135
+  return <>
136
+    <div>
137
+      <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
138
+        <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
139
+          {getFieldDecorator('personFrom')(
140
+            <WxDictSelect />,
141
+          )}
142
+        </Form.Item>
143
+        <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
144
+          {getFieldDecorator('province')(<Input placeholder="请输入归属地" />)}
145
+        </Form.Item>
146
+        <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
147
+          {getFieldDecorator('realtyConsultant')(<Input placeholder="置业顾问" />)}
148
+        </Form.Item>
149
+        <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
150
+          {getFieldDecorator('realtyConsultantPhone')(<Input placeholder="置业顾问电话" />)}
151
+        </Form.Item>
152
+        <Form.Item style={{ marginTop: '20px', marginBottom: '20px' }}>
153
+          <Button type="primary" htmlType="submit" style={{ marginLeft: '30px' }}>
154
+            查询
155
+            </Button>
156
+          <Button onClick={handleReset} style={{ marginLeft: '30px' }}>重置</Button>
157
+        </Form.Item>
158
+      </Form>
159
+      <div>
160
+
161
+
162
+        <Button type="primary" style={{ float: 'right', marginBottom: '20px', zIndex: 1 }} onClick={exportActivityStats}>
163
+          导出
164
+            </Button>
165
+
166
+      </div>
167
+      <Table style={{ marginTop: '30px' }} dataSource={data.records} columns={columns} pagination={false} rowKey="activityList" />
168
+      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
169
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
170
+      </div>
171
+    </div>
172
+  </>
173
+}
174
+
175
+const WrappedTypeForm = Form.create()(header);
176
+export default WrappedTypeForm

+ 11
- 0
src/pages/activity/drainage/DrainageList.jsx Parādīt failu

@@ -22,6 +22,14 @@ const toEditList = (row) => () => {
22 22
   });
23 23
 }
24 24
 
25
+const toDataReacord = (row) => () => {
26
+  router.push({
27
+    pathname: '/activity/drainage/drainageRecord',
28
+    query: {
29
+      id: row.drainageId,
30
+    },
31
+  });
32
+}
25 33
 const header = (props) => {
26 34
   // const [data, setData] = useState({ data: [] })
27 35
   const [datas, setDatas] = useState([])//表格数据
@@ -234,6 +242,9 @@ const header = (props) => {
234 242
               数据
235 243
             </span>
236 244
           </AuthButton>
245
+          <span style={{ right: '20px', top: '20px', fontSize: ' 0.106rem', zIndex: 1, color: '#FF7E48', cursor: 'pointer', marginLeft: 20  }} onClick={toDataReacord(datas)}>
246
+              数据记录
247
+            </span>
237 248
           <AuthButton name="admin.taDrainage.id.delete" noRight={null}>
238 249
             <span>{datas.isMiniapp === false ? "" : <span style={{ right: '20px', bottom: ' 10px', fontSize: ' 0.106rem', color: '#FF7E48', cursor: 'pointer', marginLeft: 20 }} onClick={newQrcode.bind(this, datas)}>
239 250
               下载二维码

+ 16
- 0
src/pages/activity/drainage/drainageRecord.jsx Parādīt failu

@@ -0,0 +1,16 @@
1
+import React from 'react';
2
+import DataRecord from '../dataRecord/index'
3
+import Prompt from 'umi/prompt';
4
+
5
+const header = props =>{
6
+    const id = props.location.query.id
7
+    // type:'h5',
8
+    return <><DataRecord  id ={id} activeType="h5"/>
9
+    <Prompt message={location =>
10
+        location.pathname.startsWith("/activity/drainage")
11
+          ? true
12
+          : localStorage.removeItem("drainageActivePageParams")} />
13
+    </>
14
+}
15
+
16
+export default header

+ 16
- 0
src/pages/activity/groupActivity/groupActivityRecord.jsx Parādīt failu

@@ -0,0 +1,16 @@
1
+import React from 'react';
2
+import DataRecord from '../dataRecord/index'
3
+import Prompt from 'umi/prompt';
4
+
5
+const header = props =>{
6
+    const id = props.location.query.id
7
+    // type:'group',
8
+    return <><DataRecord id ={id} activeType="group" />
9
+    <Prompt message={location =>
10
+        location.pathname.startsWith("/activity/groupActivity")
11
+          ? true
12
+          : localStorage.removeItem("groupActivePageParams")} />
13
+          </>
14
+}
15
+
16
+export default header

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

@@ -69,6 +69,15 @@ const header = props => {
69 69
     });
70 70
   } 
71 71
 
72
+  const toDataReacord = id => {
73
+    router.push({
74
+      pathname: '/activity/groupActivity/groupActivityRecord',
75
+      query: {
76
+        id,
77
+      },
78
+    });
79
+  }
80
+
72 81
   /**
73 82
    *
74 83
    *
@@ -151,7 +160,7 @@ const header = props => {
151 160
             <AuthButton name="admin.taShareActivity.top" noRight={null}>
152 161
               <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={recommendGroupActivity(row)}>{row.sort === true ? '取消推荐首页' : '推荐首页'}<Icon type="vertical-align-top" className={styles.edit} /></span>
153 162
             </AuthButton>}
154
-
163
+            {<span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={() => toDataReacord(row.groupActivityId)}>数据记录<Icon type="form" className={styles.edit} /></span>}
155 164
           {(row.activityStatus === 0 || row.activityStatus === 1) &&
156 165
             <AuthButton name="admin.taShareActivity.update.put" noRight={null}>
157 166
               <span style={{ color: '#FF925C', marginRight: '20px', cursor: 'pointer' }} onClick={toEditActivity(row.groupActivityId)}>编辑<Icon type="form" className={styles.edit} /></span>

+ 15
- 0
src/pages/activity/helpActivity/helpActivityRecord.jsx Parādīt failu

@@ -0,0 +1,15 @@
1
+import React from 'react';
2
+import DataRecord from '../dataRecord/index'
3
+import Prompt from 'umi/prompt';
4
+
5
+const header = props =>{
6
+    const id = props.location.query.id
7
+    // type:'help;',
8
+    return <><DataRecord  id = {id} activeType = "help"/>
9
+    <Prompt message={location =>
10
+        location.pathname.startsWith("/activity/helpActivity")
11
+          ? true
12
+          : localStorage.removeItem("helpActivePageParams")} /></>
13
+}
14
+
15
+export default header

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

@@ -15,11 +15,11 @@ const { Option } = Select;
15 15
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
16 16
 
17 17
 const header = props => {
18
-  const [ data, setData ] = useState({})
19
-//   const [page, changePage] = useState({})
18
+  const [data, setData] = useState({})
19
+  //   const [page, changePage] = useState({})
20 20
 
21 21
   useEffect(() => {
22
-    
22
+
23 23
     if (localStorage.getItem("helpActivePageParams")) {
24 24
       props.form.setFieldsValue(JSON.parse(localStorage.getItem("helpActivePageParams")));
25 25
       // const { getFieldDecorator } = JSON.parse(localStorage.getItem("pageParams"))
@@ -29,19 +29,19 @@ const header = props => {
29 29
       localStorage.setItem("helpActivePageParams", JSON.stringify({ pageNum: 1, pageSize: 10 }));
30 30
       getList({ pageNum: 1, pageSize: 10 });
31 31
     }
32
-  },[])
32
+  }, [])
33 33
 
34 34
   // 查询列表
35 35
   const getList = (params) => {
36 36
     request({ ...apis.helpActivity.list, params: { ...params } }).then((data) => {
37
-        console.log(data)
38
-        setData(data)
37
+      console.log(data)
38
+      setData(data)
39 39
     })
40 40
   }
41 41
 
42
-  
43
-// 跳转到助力新增
44
-const toEditGoods = (helpActivityId) => () => {
42
+
43
+  // 跳转到助力新增
44
+  const toEditGoods = (helpActivityId) => () => {
45 45
     router.push({
46 46
       pathname: '/activity/helpActivity/edithelpActivity',
47 47
       query: {
@@ -49,41 +49,41 @@ const toEditGoods = (helpActivityId) => () => {
49 49
       },
50 50
     });
51 51
   }
52
-  
53
-const getActivityDetail = (helpActivityId) => () => {
54
-  router.push({
55
-    pathname: '/activity/helpActivity/detailActivity',
56
-    query: {
57
-      helpActivityId,
58
-    },
59
-  });
60
-}
61 52
 
62
-const getJoinPeople = (helpActivityId) => () => {
63
-  router.push({
64
-    pathname: '/activity/helpActivity/helpRecord',
65
-    query: {
66
-      helpActivityId,
67
-    },
68
-  });
69
-}
70
-  
71
-  
53
+  const getActivityDetail = (helpActivityId) => () => {
54
+    router.push({
55
+      pathname: '/activity/helpActivity/detailActivity',
56
+      query: {
57
+        helpActivityId,
58
+      },
59
+    });
60
+  }
61
+
62
+  const getJoinPeople = (helpActivityId) => () => {
63
+    router.push({
64
+      pathname: '/activity/helpActivity/helpRecord',
65
+      query: {
66
+        helpActivityId,
67
+      },
68
+    });
69
+  }
70
+
71
+
72 72
   /**
73 73
    *
74 74
    *
75 75
    * @param {*} props
76 76
    * @returns
77 77
    */
78
-  
78
+
79 79
   const columns = [
80 80
     {
81 81
       title: '活动标题',
82 82
       dataIndex: 'title',
83 83
       key: 'title',
84 84
       align: 'center',
85
-      render:  (x, row) => <><div style={{overflow: 'hidden',textOverflow: 'ellipsis',whiteSpace: 'nowrap', width: '201px',title:'content'}}>
86
-                              <span style={{color: 'blue',cursor: 'pointer'}} onClick={getActivityDetail(row.helpActivityId)}>{row.title}</span></div></>,
85
+      render: (x, row) => <><div style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', width: '201px', title: 'content' }}>
86
+        <span style={{ color: 'blue', cursor: 'pointer' }} onClick={getActivityDetail(row.helpActivityId)}>{row.title}</span></div></>,
87 87
     },
88 88
     {
89 89
       title: '活动时间',
@@ -97,8 +97,8 @@ const getJoinPeople = (helpActivityId) => () => {
97 97
       dataIndex: 'enlistNum',
98 98
       key: 'enlistNum',
99 99
       align: 'center',
100
-      render:  (x, row) => <><div style={{overflow: 'hidden',textOverflow: 'ellipsis',whiteSpace: 'nowrap', width: '201px',title:'content'}}>
101
-                              <span style={{color: 'blue',cursor: 'pointer'}} onClick={getJoinPeople(row.helpActivityId)}>{row.enlistNum}</span></div></>,
100
+      render: (x, row) => <><div style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', width: '201px', title: 'content' }}>
101
+        <span style={{ color: 'blue', cursor: 'pointer' }} onClick={getJoinPeople(row.helpActivityId)}>{row.enlistNum}</span></div></>,
102 102
     },
103 103
     {
104 104
       title: '助力成功数',
@@ -132,86 +132,96 @@ const getJoinPeople = (helpActivityId) => () => {
132 132
         <>
133 133
           {
134 134
             <AuthButton name="admin.help.publish" noRight={null}>
135
-              <span style={{ color: '#1990FF',marginRight: '20px', cursor: 'pointer' }} onClick={sendOrPublicDynamic.bind(this, row)}>{row.status === 1 ? '取消发布' : '发布'}<Icon type="close-circle" className={styles.edit} /></span>
135
+              <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={sendOrPublicDynamic.bind(this, row)}>{row.status === 1 ? '取消发布' : '发布'}<Icon type="close-circle" className={styles.edit} /></span>
136 136
             </AuthButton>
137 137
           }
138 138
           {row.activityStatus === 0 &&
139 139
             <AuthButton name="admin.help.finish" noRight={null}>
140
-            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 2)}>结束活动<Icon type="poweroff" style={{color:'#bebebe'}} className={styles.edit} /></span> </AuthButton>
140
+              <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 2)}>结束活动<Icon type="poweroff" style={{ color: '#bebebe' }} className={styles.edit} /></span> </AuthButton>
141 141
           }
142 142
           {
143
-          <AuthButton name="admin.help.tag" noRight={null}>
144
-            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 0)}>{ row.weight === 1 ? '取消标签' : '添加标签' }<Icon type="vertical-align-top"  style={{color:'#bebebe'}} className={styles.edit} /></span>
145
-          </AuthButton>}{
146
-          <AuthButton name="admin.help.top" noRight={null}>
147
-            <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 1)}>{ row.isMain === true ? '取消推首页' : '推首页' }<Icon type="vertical-align-top" style={{color:'#bebebe'}} className={styles.edit} /></span>
148
-          </AuthButton> }
149
-
143
+            <AuthButton name="admin.help.tag" noRight={null}>
144
+              <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 0)}>{row.weight === 1 ? '取消标签' : '添加标签'}<Icon type="vertical-align-top" style={{ color: '#bebebe' }} className={styles.edit} /></span>
145
+            </AuthButton>}{
146
+            <AuthButton name="admin.help.top" noRight={null}>
147
+              <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={topDynamic(row, 1)}>{row.isMain === true ? '取消推首页' : '推首页'}<Icon type="vertical-align-top" style={{ color: '#bebebe' }} className={styles.edit} /></span>
148
+            </AuthButton>}
149
+          {<span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={() => toDataReacord(row.helpActivityId)}>数据记录<Icon type="form" className={styles.edit} /></span>}
150 150
           {(row.activityStatus === 1 || row.activityStatus === 0) &&
151
-          <AuthButton name="admin.helpActivity.update.put" noRight={null}>
152
-            <span style={{ color: '#FF925C', marginRight: '20px', cursor: 'pointer' }} onClick={toEditGoods(row.helpActivityId)}>编辑<Icon type="form" style={{color:'#bebebe'}} className={styles.edit} /></span>
153
-          </AuthButton>
151
+            <AuthButton name="admin.helpActivity.update.put" noRight={null}>
152
+              <span style={{ color: '#FF925C', marginRight: '20px', cursor: 'pointer' }} onClick={toEditGoods(row.helpActivityId)}>编辑<Icon type="form" style={{ color: '#bebebe' }} className={styles.edit} /></span>
153
+            </AuthButton>
154 154
           }
155 155
         </>
156 156
       ),
157 157
     },
158 158
   ];
159
+
160
+  const toDataReacord = id => {
161
+    router.push({
162
+      pathname: '/activity/helpActivity/helpActivityRecord',
163
+      query: {
164
+        id,
165
+      },
166
+    });
167
+  }
168
+
159 169
   const getSignList = helpActivityId => {
160
-      router.push({
161
-          pathname: '/activity/helpActivity/helpRecord',
162
-          query: {
163
-            helpActivityId,
164
-          },
165
-        });
170
+    router.push({
171
+      pathname: '/activity/helpActivity/helpRecord',
172
+      query: {
173
+        helpActivityId,
174
+      },
175
+    });
166 176
   }
167
-  
177
+
168 178
   const finishDynamic = (row) => {
169
-      Modal.confirm({
170
-          title: '结束以后将无法编辑, 是否继续?',
171
-          okText: '确定',
172
-          cancelText: '取消',
173
-          onOk() {
174
-              request({ ...apis.activity.finish, data: {dynamicId: row.dynamicId, top: ""} }).then((data) => {
175
-                  console.log(data)
176
-                  message.info('操作成功!')
177
-                  getList(JSON.parse(localStorage.getItem("helpActivePageParams")))
178
-              }).catch((err) => {
179
-                  console.log(err)
180
-                  message.info(err.msg || err.message)
181
-              })
182
-          },
183
-        });
179
+    Modal.confirm({
180
+      title: '结束以后将无法编辑, 是否继续?',
181
+      okText: '确定',
182
+      cancelText: '取消',
183
+      onOk() {
184
+        request({ ...apis.activity.finish, data: { dynamicId: row.dynamicId, top: "" } }).then((data) => {
185
+          console.log(data)
186
+          message.info('操作成功!')
187
+          getList(JSON.parse(localStorage.getItem("helpActivePageParams")))
188
+        }).catch((err) => {
189
+          console.log(err)
190
+          message.info(err.msg || err.message)
191
+        })
192
+      },
193
+    });
184 194
   }
185
-  
186
-//   置顶
195
+
196
+  //   置顶
187 197
   const topDynamic = (row, code) => () => {
188
-    const title = code === 2 ? '活动会被强制结束,小程序端无法再发起或参与此拼团,如果不想让客户看到活动,请再点击取消发布按钮':'是否进行该操作'
198
+    const title = code === 2 ? '活动会被强制结束,小程序端无法再发起或参与此拼团,如果不想让客户看到活动,请再点击取消发布按钮' : '是否进行该操作'
189 199
 
190 200
     Modal.confirm({
191 201
       title: title,
192 202
       okText: '确定',
193 203
       cancelText: '取消',
194
-      onOk () {
204
+      onOk() {
195 205
         request({ ...apis.helpActivity.top, data: { helpActivityId: row.helpActivityId, status: code } }).then((data) => {
196 206
           console.log(data)
197 207
           message.info('操作成功!')
198 208
           getList(JSON.parse(localStorage.getItem("helpActivePageParams")))
199
-          }).catch((err) => {
200
-              console.log(err)
201
-              message.info(err.msg || err.message)
202
-          })
209
+        }).catch((err) => {
210
+          console.log(err)
211
+          message.info(err.msg || err.message)
212
+        })
203 213
       },
204 214
     });
205 215
   }
206
-  
216
+
207 217
   const sendOrPublicDynamic = (row) => {
208
-      if (row.status === 1) {
209
-          cancelDynamic(row)
210
-      } else {
211
-          sendDynamic(row)
212
-      }
218
+    if (row.status === 1) {
219
+      cancelDynamic(row)
220
+    } else {
221
+      sendDynamic(row)
222
+    }
213 223
   }
214
-  
224
+
215 225
   // 取消活动
216 226
   const cancelDynamic = (row) => {
217 227
     Modal.confirm({
@@ -219,17 +229,17 @@ const getJoinPeople = (helpActivityId) => () => {
219 229
       okText: '确认',
220 230
       cancelText: '取消',
221 231
       onOk() {
222
-        request({ ...apis.helpActivity.cancel, urlData: {id: row.helpActivityId}}).then((data) => {
232
+        request({ ...apis.helpActivity.cancel, urlData: { id: row.helpActivityId } }).then((data) => {
223 233
           message.info('操作成功!')
224 234
           getList(JSON.parse(localStorage.getItem("helpActivePageParams")))
225
-      }).catch((err) => {
235
+        }).catch((err) => {
226 236
           console.log(err)
227 237
           message.info(err.msg || err.message)
228
-      })
238
+        })
229 239
       }
230 240
     });
231 241
   }
232
-  
242
+
233 243
   //发布活动
234 244
   const sendDynamic = (row) => {
235 245
     Modal.confirm({
@@ -237,24 +247,24 @@ const getJoinPeople = (helpActivityId) => () => {
237 247
       okText: '确认',
238 248
       cancelText: '取消',
239 249
       onOk() {
240
-        request({ ...apis.helpActivity.send, urlData: {id: row.helpActivityId}}).then((data) => {
241
-        message.info('操作成功!')
242
-        getList(JSON.parse(localStorage.getItem("helpActivePageParams")))
243
-    }).catch(err => {
244
-        console.log(err)
245
-        message.info(err.msg || err.message)
246
-    })
250
+        request({ ...apis.helpActivity.send, urlData: { id: row.helpActivityId } }).then((data) => {
251
+          message.info('操作成功!')
252
+          getList(JSON.parse(localStorage.getItem("helpActivePageParams")))
253
+        }).catch(err => {
254
+          console.log(err)
255
+          message.info(err.msg || err.message)
256
+        })
247 257
       }
248 258
     });
249 259
   }
250
-  
260
+
251 261
   const changePageNum = pageNumber => {
252
-    localStorage.setItem("helpActivePageParams", JSON.stringify({pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() }));
253
-      getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
262
+    localStorage.setItem("helpActivePageParams", JSON.stringify({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() }));
263
+    getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
254 264
   }
255 265
 
256 266
   // 提交事件
257
-const handleSubmit = (e, props) => {
267
+  const handleSubmit = (e, props) => {
258 268
     e.preventDefault();
259 269
     props.form.validateFields((err, values) => {
260 270
       const startDate = values.startTime === undefined ? null : moment(values.startTime).format('YYYY-MM-DD')
@@ -263,16 +273,16 @@ const handleSubmit = (e, props) => {
263 273
 
264 274
       if (!err) {
265 275
         console.log('提交数据: ', values)
266
-        localStorage.setItem("helpActivePageParams", JSON.stringify({  pageNum: 1, pageSize: 10, ...values, endDate, startDate  }));
267
-        
276
+        localStorage.setItem("helpActivePageParams", JSON.stringify({ pageNum: 1, pageSize: 10, ...values, endDate, startDate }));
277
+
268 278
         getList({ pageNum: 1, pageSize: 10, ...values, endDate, startDate })
269 279
       }
270 280
     });
271 281
   }
272
-   // 重置搜索
273
-   function handleReset() {
282
+  // 重置搜索
283
+  function handleReset() {
274 284
     props.form.resetFields();
275
-    localStorage.setItem("helpActivePageParams", JSON.stringify({  pageNum: 1, pageSize: 10 }));
285
+    localStorage.setItem("helpActivePageParams", JSON.stringify({ pageNum: 1, pageSize: 10 }));
276 286
     getList({ pageNum: 1, pageSize: 10 })
277 287
   }
278 288
 
@@ -302,12 +312,12 @@ const handleSubmit = (e, props) => {
302 312
         </Form.Item>
303 313
         <Form.Item>
304 314
           {getFieldDecorator('startTime')(
305
-            <DatePicker placeholder="活动开始时间"/>,
315
+            <DatePicker placeholder="活动开始时间" />,
306 316
           )}
307 317
         </Form.Item>
308 318
         <Form.Item>
309 319
           {getFieldDecorator('endTime')(
310
-            <DatePicker placeholder="活动结束时间"/>,
320
+            <DatePicker placeholder="活动结束时间" />,
311 321
           )}
312 322
         </Form.Item>
313 323
         <Form.Item>
@@ -320,28 +330,28 @@ const handleSubmit = (e, props) => {
320 330
           )}
321 331
         </Form.Item>
322 332
         <Form.Item>
323
-        <AuthButton name="admin.help.search" noRight={null}>
324
-          <Button type="primary" htmlType="submit" className={styles.searchBtn}>
325
-            搜索
333
+          <AuthButton name="admin.help.search" noRight={null}>
334
+            <Button type="primary" htmlType="submit" className={styles.searchBtn}>
335
+              搜索
326 336
           </Button>
327 337
           </AuthButton>
328 338
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
329
-              重置
339
+            重置
330 340
             </Button>
331 341
         </Form.Item>
332 342
       </Form>
333 343
       <AuthButton name="admin.help.add.post" noRight={null}>
334 344
         <Button name="admin.helpActivity.add.post" noRight={null} type="danger" className={styles.addBtn} onClick={toEditGoods()}>新增</Button>
335 345
       </AuthButton>
336
-      <Table 
346
+      <Table
337 347
         // onRow={record => {
338 348
         //   return {
339 349
         //     onClick: getActivityDetail(record.helpActivityId),
340 350
         //   };
341 351
         // }}
342
-      dataSource={data.records} columns={columns} pagination={false} rowKey="activityList"/>
352
+        dataSource={data.records} columns={columns} pagination={false} rowKey="activityList" />
343 353
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
344
-        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current}/>
354
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
345 355
       </div>
346 356
       <Prompt message={location =>
347 357
         location.pathname.startsWith("/activity/helpActivity")

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

@@ -63,6 +63,16 @@ const header = props => {
63 63
     });
64 64
   }
65 65
 
66
+  const toDataReacord = rowData => () => {
67
+  
68
+      router.push({
69
+      pathname: '/activity/liveActivity/liveActivityRecord',
70
+      query: {
71
+        id: rowData.liveActivityId,
72
+      },
73
+    });
74
+  }
75
+
66 76
   function openNotificationWithIcon(type, message) {
67 77
     notification[type]({
68 78
       message,
@@ -179,10 +189,14 @@ const header = props => {
179 189
       dataIndex: '',
180 190
       key: '',
181 191
       align: 'center',
182
-      render: (text, record) => (
192
+      render: (text, record) => (<>
193
+     
194
+        <a style={{ color: '#66B3FF' ,marginRight:20}} onClick={toDataReacord(record)} >数据记录</a>
195
+ 
183 196
         <AuthButton name="admin.live.detail.get" noRight={null}>
184 197
           <a style={{ color: '#66B3FF' }} onClick={toAddLive(record)} >查看详情</a>
185 198
         </AuthButton>
199
+        </>
186 200
       ),
187 201
     },
188 202
   ];

+ 16
- 0
src/pages/activity/liveActivity/list/liveActivityRecord.jsx Parādīt failu

@@ -0,0 +1,16 @@
1
+import React from 'react';
2
+import DataRecord from '../../dataRecord/index'
3
+import Prompt from 'umi/prompt';
4
+
5
+const header = props =>{
6
+    const id = props.location.query.id
7
+    // type:'live',
8
+    return <><DataRecord id ={id} activeType="live"/>
9
+    <Prompt message={location =>
10
+        location.pathname.startsWith("/activity/liveActivity")
11
+          ? true
12
+          : localStorage.removeItem("liveActivePageParams")} />
13
+          </>
14
+}
15
+
16
+export default header

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

@@ -27,7 +27,6 @@ const indexEcharts = props => {
27 27
 
28 28
   const endDate = new Date()
29 29
 
30
-  // 为了观察数据先设30天
31 30
   const startDate = moment().subtract(7, 'day').toDate()
32 31
 
33 32
   function onTabledatas (e) {

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

@@ -134,6 +134,34 @@ class SharePersonNum extends React.Component {
134 134
   //重置搜索
135 135
   handleReset = e => {
136 136
     this.props.form.resetFields()
137
+    let startDate;
138
+    let endDate;
139
+    if (this.props.location.query.queryDate){
140
+      startDate = moment(this.props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).toDate();
141
+      endDate = moment(this.props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).toDate();
142
+    }else{
143
+      startDate = moment(this.props.location.query.startDate).hours(0).minutes(0).seconds(0).milliseconds(0).toDate();
144
+      endDate = moment(this.props.location.query.endDate).hours(23).minutes(59).seconds(59).milliseconds(999).toDate();
145
+    }
146
+    this.setState({
147
+      formData: {
148
+        personFrom: '',
149
+        province: '',
150
+        pageNum:'',
151
+        pageSize:'',
152
+        startDate: startDate,
153
+        endDate: endDate,
154
+        activityId: this.props.location.query.activityId,
155
+        activityType:this.props.location.query.activityType,
156
+        buildingId: this.props.location.query.buildingId,      
157
+      },
158
+      personData: [],  
159
+      dataSoures: [],
160
+      tableData: [],
161
+      userType: 'all',
162
+      activityName:  this.props.location.query.activityName
163
+    })
164
+    this.getTableList()
137 165
   }
138 166
 
139 167
   goback = () => {

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

@@ -267,6 +267,30 @@ class OverView extends React.Component {
267 267
   //重置搜索
268 268
   handleReset = e => {
269 269
     this.props.form.resetFields()
270
+    this.setState( {
271
+      radioVal: 6,
272
+      formData: {
273
+        startDate: moment().subtract(6, 'day').toDate(),
274
+        endDate: new Date,
275
+        buildingId: '',
276
+        targetType: '',
277
+        pageNum:'',
278
+        pageSize:'',
279
+        sort:null,
280
+        colKey:null
281
+      },
282
+      personData: [],  
283
+      dataSoures: [],
284
+      tableData: [],
285
+      barData: {},
286
+      userType: 'all',
287
+      endDate: '',
288
+      startDate: '',
289
+      buildingId: [],
290
+      targetType: [],
291
+      helpVisible: false,
292
+    })
293
+    this.getAllList()
270 294
   }
271 295
 
272 296
   exportActivityStats = () => {

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

@@ -127,6 +127,38 @@ class SharePersonNum extends React.Component {
127 127
   //重置搜索
128 128
   handleReset = e => {
129 129
     this.props.form.resetFields()
130
+    let startDate;
131
+    let endDate;
132
+    if (this.props.location.query.queryDate){
133
+      startDate = moment(this.props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).toDate();
134
+      endDate = moment(this.props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).toDate();
135
+    }else{
136
+      startDate = moment(this.props.location.query.startDate).hours(0).minutes(0).seconds(0).milliseconds(0).toDate();
137
+      endDate = moment(this.props.location.query.endDate).hours(23).minutes(59).seconds(59).milliseconds(999).toDate();
138
+    }
139
+    this.setState({
140
+      formData: {
141
+        sharePhone: '',
142
+        sharePersonType: '',
143
+        pageNum:'',
144
+        pageSize:'',
145
+        shareName:'',
146
+        sort:null,
147
+        colKey:null,
148
+        startDate: startDate,
149
+        endDate: endDate,
150
+        activityId: this.props.location.query.activityId,
151
+        activityType:this.props.location.query.activityType,
152
+        personId: this.props.location.query.personId,
153
+        buildingId: this.props.location.query.buildingId   
154
+      },
155
+      personData: [],  
156
+      dataSoures: [],
157
+      tableData: [],
158
+      userType: 'all',
159
+      activityName:  this.props.location.query.activityName
160
+    })
161
+    this.getTableList()
130 162
   }
131 163
 
132 164
   goback = () => {

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

@@ -209,6 +209,44 @@ class SharePersonNum extends React.Component {
209 209
   //重置搜索
210 210
   handleReset = e => {
211 211
     this.props.form.resetFields()
212
+    let startDate;
213
+    let endDate;
214
+    queryDate = this.props.location.query.queryDate
215
+    activityName = this.props.location.query.activityName
216
+    staticStartDate = this.props.location.query.startDate;
217
+    staticEndDate = this.props.location.query.endDate;
218
+    activityId = this.props.location.query.activityId;
219
+    activityType = this.props.location.query.activityType;
220
+    
221
+    if (this.props.location.query.queryDate){
222
+      startDate = moment(this.props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).toDate();
223
+      endDate = moment(this.props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).toDate();
224
+    }else{
225
+      startDate = moment(this.props.location.query.startDate).hours(0).minutes(0).seconds(0).milliseconds(0).toDate();
226
+      endDate = moment(this.props.location.query.endDate).hours(23).minutes(59).seconds(59).milliseconds(999).toDate();
227
+    }
228
+    this.setState({
229
+      formData: {
230
+        sharePhone: '',
231
+        sharePersonType: '',
232
+        pageNum:'',
233
+        pageSize:'',
234
+        shareName:'',
235
+        sort:null,
236
+        colKey:null,
237
+        startDate: startDate,
238
+        endDate: endDate,
239
+        activityId: this.props.location.query.activityId,
240
+        activityType: this.props.location.query.activityType,
241
+        buildingId: this.props.location.query.buildingId,         
242
+      },
243
+      personData: [],  
244
+      dataSoures: [],
245
+      tableData: [],
246
+      userType: 'all',
247
+      activityName:  this.props.location.query.activityName
248
+    }) 
249
+    this.getTableList()
212 250
   }
213 251
 
214 252
   goback = () => {

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

@@ -151,6 +151,37 @@ class SharePersonNum extends React.Component {
151 151
   //重置搜索
152 152
   handleReset = e => {
153 153
     this.props.form.resetFields()
154
+    let startDate;
155
+    let endDate;
156
+    if (this.props.location.query.queryDate){
157
+      startDate = moment(this.props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).toDate();
158
+      endDate = moment(this.props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).toDate();
159
+    }else{
160
+      startDate = moment(this.props.location.query.startDate).hours(0).minutes(0).seconds(0).milliseconds(0).toDate();
161
+      endDate = moment(this.props.location.query.endDate).hours(23).minutes(59).seconds(59).milliseconds(999).toDate();
162
+    }
163
+    this.setState({
164
+      formData: {
165
+        personFrom: '',
166
+        pageNum:'',
167
+        pageSize:'',
168
+        startDate: startDate,
169
+        endDate: endDate,
170
+        province:'',
171
+        realtyConsultant:'',
172
+        realtyConsultantPhone:'',
173
+        activityId: this.props.location.query.activityId,
174
+        activityType:this.props.location.query.activityType,
175
+        personId: this.props.location.query.personId,
176
+        buildingId: this.props.location.query.buildingId
177
+      },
178
+      personData: [],  
179
+      dataSoures: [],
180
+      tableData: [],
181
+      userType: 'all',
182
+      activityName:  this.props.location.query.activityName
183
+    })
184
+    this.getTableList()
154 185
   }
155 186
 
156 187
   goback = () => {

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

@@ -146,6 +146,38 @@ class SharePersonNum extends React.Component {
146 146
   //重置搜索
147 147
   handleReset = e => {
148 148
     this.props.form.resetFields()
149
+    let startDate;
150
+    let endDate;
151
+    
152
+    if (this.props.location.query.queryDate){
153
+      startDate = moment(this.props.location.query.queryDate).hours(0).minutes(0).seconds(0).milliseconds(0).toDate();
154
+      endDate = moment(this.props.location.query.queryDate).hours(23).minutes(59).seconds(59).milliseconds(999).toDate();
155
+    }else{
156
+      startDate = moment(this.props.location.query.startDate).hours(0).minutes(0).seconds(0).milliseconds(0).toDate();
157
+      endDate = moment(this.props.location.query.endDate).hours(23).minutes(59).seconds(59).milliseconds(999).toDate();
158
+    }
159
+    this.setState({
160
+      formData: {
161
+        personFrom: '',
162
+        pageNum:'',
163
+        pageSize:'',
164
+        startDate: startDate,
165
+        endDate: endDate,
166
+        province:'',
167
+        realtyConsultant:'',
168
+        realtyConsultantPhone:'',
169
+        activityId: this.props.location.query.activityId,
170
+        activityType: this.props.location.query.activityType ,
171
+        personId:  this.props.location.query.personId,
172
+        buildingId: this.props.location.query.buildingId
173
+      },
174
+      personData: [],  
175
+      dataSoures: [],
176
+      tableData: [],
177
+      userType: 'all',
178
+      activityName: this.props.location.query.activityName
179
+    })
180
+    this.getTableList()
149 181
   }
150 182
 
151 183
   goback = () => {

+ 13
- 7
src/pages/statistical/building/detail.jsx Parādīt failu

@@ -29,6 +29,7 @@ class buildingDetailStats extends React.Component {
29 29
       startDate: {},
30 30
       buildingId: props.location.query.buildingId,
31 31
       buildingName: props.location.query.buildingName,
32
+      radioValue: 'a'
32 33
     }
33 34
   }
34 35
 
@@ -66,10 +67,10 @@ class buildingDetailStats extends React.Component {
66 67
   }
67 68
 
68 69
   //切换三个标签页
69
-  getDataOf = (days) => {
70
+  getDataOf = (days,val) => {
70 71
     this.getTimeBarDate(moment().subtract(days, 'day').toDate(),new Date())
71 72
     this.getTimeTableData(moment().subtract(days, 'day').toDate(),new Date())
72
-    this.setState({ ...this.state, endDate: new Date(), startDate: moment().subtract(days, 'day').toDate() })
73
+    this.setState({ ...this.state, endDate: new Date(), startDate: moment().subtract(days, 'day').toDate(), radioValue: val })
73 74
   }
74 75
 
75 76
   //点击查询
@@ -113,6 +114,9 @@ class buildingDetailStats extends React.Component {
113 114
   handleReset = () => {
114 115
     daterange = []
115 116
     this.props.form.resetFields();
117
+    this.setState({ ...this.state, endDate: new Date(), startDate: moment().subtract(6, 'day').toDate(), radioValue: "a" })
118
+    this.getTimeBarDate(moment().subtract(6, 'day').toDate(),new Date())
119
+    this.getTimeTableData(moment().subtract(6, 'day').toDate(),new Date())
116 120
   }
117 121
 
118 122
   render() {
@@ -152,15 +156,14 @@ class buildingDetailStats extends React.Component {
152 156
     return (
153 157
     <div>
154 158
       <Form layout="inline">
155
-      <Radio.Group buttonStyle="solid" defaultValue="a">
156
-          <Radio.Button value="c" onClick={() => this.getDataOf(0)}>今日</Radio.Button>
157
-          <Radio.Button value="a" onClick={() => this.getDataOf(6)}>最近7天</Radio.Button>
158
-          <Radio.Button value="b" onClick={() => this.getDataOf(30)}>最近1月</Radio.Button>
159
+      <Radio.Group buttonStyle="solid" value={this.state.radioValue}>
160
+          <Radio.Button value="c" onClick={() => this.getDataOf(0,"c")}>今日</Radio.Button>
161
+          <Radio.Button value="a" onClick={() => this.getDataOf(6,"a")}>最近7天</Radio.Button>
162
+          <Radio.Button value="b" onClick={() => this.getDataOf(30,"b")}>最近1月</Radio.Button>
159 163
         </Radio.Group>
160 164
         <Form.Item>
161 165
         {getFieldDecorator('time', {
162 166
             initialValue: [],
163
-            rules: [{ required: true, message: '请上传封面图1' }],
164 167
         })(
165 168
           <RangePicker
166 169
             style={{ paddingLeft: '30px' }}
@@ -176,6 +179,9 @@ class buildingDetailStats extends React.Component {
176 179
           搜索
177 180
         </Button>
178 181
         <Button onClick={this.handleReset} style={{ marginBottom: '18px', marginLeft: '30px' }}>重置</Button>
182
+        <Button type="primary" style={{ marginLeft: '30px' }} onClick={() => router.go(-1)}>
183
+                返回
184
+            </Button>
179 185
         </Form>
180 186
         <StatsChartLine title={this.state.buildingName} data={this.state.barData} />
181 187
         <Row>

+ 12
- 9
src/pages/statistical/building/index.jsx Parādīt failu

@@ -27,14 +27,15 @@ class buildingStats extends React.Component {
27 27
       userType: 'all',
28 28
       endDate: {},
29 29
       startDate: {},
30
-      buildingId: ''
30
+      buildingId: '',
31
+      radioValue: 'a'
31 32
     }
32 33
   }
33 34
 
34 35
   componentDidMount() {
35 36
     this.getBarData(moment().subtract(6, 'day').toDate(), new Date())
36 37
     this.getTableData(moment().subtract(6, 'day').toDate(), new Date(), this.state.buildingId)
37
-    this.setState({ ...this.state, endDate: new Date(), startDate: moment().subtract(7, 'day').toDate() })
38
+    this.setState({ ...this.state, endDate: new Date(), startDate: moment().subtract(6, 'day').toDate() })
38 39
 
39 40
   }
40 41
 
@@ -65,10 +66,10 @@ class buildingStats extends React.Component {
65 66
   }
66 67
 
67 68
   //切换三个标签页
68
-  getDataOf = (days) => {
69
+  getDataOf = (days,val) => {
69 70
     this.getBarData(moment().subtract(days, 'day').toDate(), new Date())
70 71
     this.getTableData(moment().subtract(days, 'day').toDate(), new Date(), this.state.buildingId)
71
-    this.setState({ ...this.state, endDate: new Date(), startDate: moment().subtract(days, 'day').toDate() })
72
+    this.setState({ ...this.state, endDate: new Date(), startDate: moment().subtract(days, 'day').toDate(), radioValue: val })
72 73
   }
73 74
 
74 75
   //点击查询
@@ -129,6 +130,9 @@ class buildingStats extends React.Component {
129 130
   handleReset = () => {
130 131
     daterange = []
131 132
     this.props.form.resetFields();
133
+    this.setState({ ...this.state, endDate: new Date(), startDate: moment().subtract(6, 'day').toDate(), radioValue: "a" })
134
+    this.getBarData(moment().subtract(6, 'day').toDate(), new Date())
135
+    this.getTableData(moment().subtract(6, 'day').toDate(), new Date(), this.state.buildingId)
132 136
   }
133 137
 
134 138
   render() {
@@ -181,15 +185,14 @@ class buildingStats extends React.Component {
181 185
 
182 186
     <div>
183 187
       <Form layout="inline">
184
-      <Radio.Group buttonStyle="solid" defaultValue="a">
185
-          <Radio.Button value="c" onClick={() => this.getDataOf(0)}>今日</Radio.Button>
186
-          <Radio.Button value="a" onClick={() => this.getDataOf(6)}>最近7天</Radio.Button>
187
-          <Radio.Button value="b" onClick={() => this.getDataOf(30)}>最近1月</Radio.Button>
188
+      <Radio.Group buttonStyle="solid" value={this.state.radioValue}>
189
+          <Radio.Button value="c" onClick={() => this.getDataOf(0,"c")}>今日</Radio.Button>
190
+          <Radio.Button value="a" onClick={() => this.getDataOf(6,"a")}>最近7天</Radio.Button>
191
+          <Radio.Button value="b" onClick={() => this.getDataOf(30,"b")}>最近1月</Radio.Button>
188 192
         </Radio.Group>
189 193
         <Form.Item>
190 194
         {getFieldDecorator('time', {
191 195
             initialValue: [],
192
-            rules: [{ required: true, message: '请上传封面图1' }],
193 196
         })(
194 197
           <RangePicker
195 198
               style={{ paddingLeft: '30px' }}

+ 5
- 0
src/services/apis.js Parādīt failu

@@ -1680,6 +1680,11 @@ export default {
1680 1680
       url: `${prefix}/activityStatistical/selectActivityVisitPersonNumExport`,
1681 1681
       action: 'admin.contract.list.get',
1682 1682
     },
1683
+    getStatisticData: {
1684
+      method: 'GET',
1685
+      url: `${prefix}/activityManage/getStatisticData`,
1686
+      action: 'admin.activityManage.getStatisticData.get',
1687
+    },
1683 1688
   },
1684 1689
   stats: {
1685 1690
     barList: {