zhoulisen 5 gadus atpakaļ
vecāks
revīzija
b6d14c10b7

+ 13
- 1
config/routes.js Parādīt failu

@@ -210,10 +210,22 @@ export default [
210 210
               },
211 211
               {
212 212
                 path: '/channel/newCustomer/dataRecord',
213
-                name: '引进注册用户',
213
+                name: '注册用户',
214 214
                 hideInMenu: true,
215 215
                 component: './channel/newCustomer/dataRecord',
216 216
               },
217
+              {
218
+                path: '/channel/newCustomer/visitNum',
219
+                name: '访问次数',
220
+                hideInMenu: true,
221
+                component: './channel/newCustomer/visitNum',
222
+              },
223
+              {
224
+                path: '/channel/newCustomer/personNum',
225
+                name: '访问人数',
226
+                hideInMenu: true,
227
+                component: './channel/newCustomer/personNum',
228
+              },
217 229
             ],
218 230
           },
219 231
           {

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

@@ -188,7 +188,9 @@ const header = props => {
188 188
 
189 189
         <EditIcon type={row.home === 1 ? 'cancel' : 'top'} text={row.home === 1 ? '取消推首页' : '推荐首页'} onClick={homeDynamic(row)} />,
190 190
 
191
-        <EditIcon type="record" text="数据记录" onClick={toDataReacord(row.dynamicId)} />,
191
+        <AuthButton name="admin.buildingDynamic.dataRecord" noRight={null}>
192
+          <EditIcon type="record" text="数据记录" onClick={toDataReacord(row.dynamicId)} />
193
+        </AuthButton>,
192 194
 
193 195
         (row.activityStatus === 0 || row.activityStatus === 1) ?
194 196
           <AuthButton name="admin.buildingDynamic.update.put" noRight={null}>

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

@@ -237,8 +237,9 @@ const header = (props) => {
237 237
           <EditIcon text="数据" type="data" onClick={toEditList(datas.drainageId)} />
238 238
         </AuthButton>,
239 239
 
240
-
241
-        <EditIcon type="record" text="数据记录" onClick={toDataReacord(datas)} />,
240
+        <AuthButton name="admin.drainageActivity.dataRecord" noRight={null}>
241
+          <EditIcon type="record" text="数据记录" onClick={toDataReacord(datas)} />
242
+        </AuthButton>,
242 243
 
243 244
         <AuthButton name="admin.taDrainage.id.delete" noRight={null}>
244 245
           <EditIcon text="下载二维码" type="download" onClick={newQrcode.bind(this, datas)} />

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

@@ -166,7 +166,9 @@ const header = props => {
166 166
             <EditIcon type={row.sort ? 'cancel' : 'top'} text={row.sort ? '取消推首页' : '推荐首页'} onClick={recommendGroupActivity(row)} />
167 167
           </AuthButton>,
168 168
 
169
-          <EditIcon type="record" text="数据记录" onClick={() => toDataReacord(row.groupActivityId)} />,
169
+          <AuthButton name="admin.groupActivity.dataRecord" noRight={null}>
170
+            <EditIcon type="record" text="数据记录" onClick={() => toDataReacord(row.groupActivityId)} />
171
+          </AuthButton>,
170 172
 
171 173
           (row.activityStatus === 0 || row.activityStatus === 1) ?
172 174
             <AuthButton name="admin.taShareActivity.update.put" noRight={null}>

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

@@ -152,7 +152,9 @@ const header = props => {
152 152
           <EditIcon type={row.isMain ? 'cancel' : 'top'} text={row.isMain ? '取消推首页' : '推荐首页'} onClick={topDynamic(row, 1)} />
153 153
         </AuthButton>,
154 154
 
155
-        <EditIcon type="record" text="数据记录" onClick={() => toDataReacord(row.helpActivityId)} />,
155
+        <AuthButton name="admin.helpActivity.dataRecord" noRight={null}>
156
+          <EditIcon type="record" text="数据记录" onClick={() => toDataReacord(row.helpActivityId)} />
157
+        </AuthButton>,
156 158
 
157 159
         (row.activityStatus === 1 || row.activityStatus === 0) ?
158 160
           <AuthButton name="admin.helpActivity.update.put" noRight={null}>

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

@@ -189,8 +189,10 @@ const header = props => {
189 189
       title: '操作',
190 190
       align: 'center',
191 191
       width: 240,
192
-      render: withActions((text, record) => [     
193
-        <EditIcon type="record" text="数据记录" onClick={toDataReacord(record)} />,
192
+      render: withActions((text, record) => [    
193
+        <AuthButton name="admin.liveActivity.dataRecord" noRight={null}>
194
+          <EditIcon type="record" text="数据记录" onClick={toDataReacord(record)} />
195
+        </AuthButton>,
194 196
  
195 197
         <AuthButton name="admin.live.detail.get" noRight={null}>
196 198
           <EditIcon type="look" text="查看详情" onClick={toAddLive(record)} />

+ 10
- 10
src/pages/carouselFigure/advertisingList.jsx Parādīt failu

@@ -71,13 +71,13 @@ const header = (props) => {
71 71
       render: (contentType) => <span>{contentType === 'project' ? '项目' : contentType === 'activity' ? '活动' : contentType === 'news' ? '资讯' : contentType === 'other' ? '其他' :
72 72
         contentType === 'help' ? '助力' : contentType === 'group' ? '拼团' : contentType === 'h5' ? 'H5活动' : contentType === 'salesBatch' ? '销售批次详情' : contentType === 'live' ? '直播活动详情' : '无'}</span>
73 73
     },
74
-    // {
75
-    //   title: '发布位置',
76
-    //   dataIndex: 'showPosition',
77
-    //   key: 'showPosition',
78
-    //   align: 'center',
79
-    //   render: (showPosition) => <span>{ showPosition === 'index' ? '首页' : showPosition === 'mall' ? '商城' : '' }</span>
80
-    // },
74
+    {
75
+      title: '发布位置',
76
+      dataIndex: 'showPosition',
77
+      key: 'showPosition',
78
+      align: 'center',
79
+      render: (showPosition) => <span>{ showPosition === 'index' ? '首页' : showPosition === 'building' ? '项目' : '' }</span>
80
+    },
81 81
     {
82 82
       title: '发布时间',
83 83
       dataIndex: 'createDate',
@@ -242,14 +242,14 @@ const header = (props) => {
242 242
             </Select>,
243 243
           )}
244 244
         </Form.Item>
245
-        {/* <Form.Item>
245
+        <Form.Item>
246 246
           {getFieldDecorator('showPosition')(
247 247
             <Select style={{ width: '180px' }} placeholder="发布位置">
248
-              <Option value="mall">商城</Option>
249 248
               <Option value="index">首页</Option>
249
+              <Option value="building">项目</Option>
250 250
             </Select>,
251 251
           )}
252
-        </Form.Item> */}
252
+        </Form.Item>
253 253
         <Form.Item>
254 254
           {getFieldDecorator('status')(
255 255
             <Select style={{ width: '180px' }} placeholder="状态">

+ 35
- 10
src/pages/carouselFigure/editAdvertising.jsx Parādīt failu

@@ -36,6 +36,7 @@ import LiveGroup from './LiveGroup';
36 36
   let cityId = ''
37 37
   let isHaveActive=false
38 38
   let isCanChoose=true
39
+  let isHavePosition = false
39 40
 
40 41
   const setExtraData = (data) => {
41 42
     if(data.isHaveActive!=undefined){
@@ -46,6 +47,12 @@ import LiveGroup from './LiveGroup';
46 47
       }
47 48
     }
48 49
 
50
+    if (data.showPosition == 'index'){
51
+      isHavePosition = true;
52
+    }else{
53
+      isHavePosition = false;
54
+    }
55
+
49 56
     contentVisible = data.contentType === 'other';
50 57
     activityVisible = data.contentType === 'activity';
51 58
     newsVisible = data.contentType === 'news';
@@ -123,12 +130,30 @@ import LiveGroup from './LiveGroup';
123 130
           { required: true,message: '是否城市活动' },
124 131
         ],
125 132
       },
133
+      {
134
+        label: '发布位置',
135
+        name: 'showPosition',
136
+        type: FieldTypes.Select,
137
+        value:isHaveActive,
138
+        dict: [{
139
+          label: '首页',
140
+          value: 'index',
141
+        },
142
+        {
143
+          label: '项目',
144
+          value: 'building',
145
+        }],
146
+        value: data.showPosition,
147
+        rules: [
148
+          { required: true, message: '请选择发布位置' },
149
+        ],
150
+      },
126 151
       {
127 152
         label: '所属项目',
128 153
         name: 'buildingId',
129 154
         render: <BuildSelect />,
130 155
         value: data.buildingId,
131
-        hidden: () => !isHaveActive,
156
+        hidden: () => !isHaveActive && isHavePosition,
132 157
         rules: [
133 158
           { required: true, message: '请选择所属项目' },
134 159
         ],
@@ -137,7 +162,7 @@ import LiveGroup from './LiveGroup';
137 162
         label: '展示城市',
138 163
         name: 'cityId',
139 164
         render: <CitySelect />,
140
-        hidden: () => isHaveActive,
165
+        hidden: () => !isHavePosition || isHaveActive,
141 166
         value: data.cityId,
142 167
         rules: [
143 168
           { required: true, message: '请选择展示城市' },
@@ -159,7 +184,7 @@ import LiveGroup from './LiveGroup';
159 184
         type: FieldTypes.Select,
160 185
         hidden: () => isHaveActive,
161 186
         dict: [{
162
-          label: 'h5',
187
+          label: 'H5活动详情',
163 188
           value: 'h5',
164 189
         },
165 190
         {
@@ -187,31 +212,31 @@ import LiveGroup from './LiveGroup';
187 212
         hidden: () => !isHaveActive,
188 213
         type: FieldTypes.Select,
189 214
         dict: [{
190
-          label: '常规活动',
215
+          label: '报名活动详情',
191 216
           value: 'activity'
192 217
         },
193 218
         {
194
-          label: '项目',
219
+          label: '项目详情',
195 220
           value: 'project'
196 221
         },
197 222
         {
198
-          label: '资讯',
223
+          label: '资讯详情',
199 224
           value: 'news'
200 225
         },
201 226
         {
202
-          label: '拼团',
227
+          label: '拼团活动详情',
203 228
           value: 'group'
204 229
         },
205 230
         {
206
-          label: '助力',
231
+          label: '助力活动详情',
207 232
           value: 'help'
208 233
         },
209 234
         {
210
-          label: 'h5',
235
+          label: 'H5活动详情',
211 236
           value: 'h5',
212 237
         },
213 238
         {
214
-          label: '销售批次详情',
239
+          label: '在线选房详情',
215 240
           value: 'salesBatch',
216 241
         },
217 242
         {

+ 3
- 2
src/pages/channel/channelList.jsx Parādīt failu

@@ -59,8 +59,8 @@ const columns = [
59 59
   },
60 60
   {
61 61
     title: '引进注册客户',
62
-    dataIndex: 'brokerCount',
63
-    key: 'brokerCount',
62
+    dataIndex: 'customerNum',
63
+    key: 'customerNum',
64 64
     align: 'center',
65 65
     render: (text, record) => <Navigate onClick={() => toNewCustomer(record)}>{text}</Navigate>,
66 66
   },
@@ -120,6 +120,7 @@ function toNewCustomer(record) {
120 120
     query: {
121 121
       id: record.channelId,
122 122
       name: record.channelName,
123
+      customerNum: record.customerNum,
123 124
     },
124 125
   });
125 126
 }

+ 14
- 26
src/pages/channel/newCustomer/dataRecord.jsx Parādīt failu

@@ -6,19 +6,9 @@ import request from '../../../utils/request';
6 6
 import AuthButton from '../../../components/AuthButton';
7 7
 
8 8
 
9
-const data = [
10
-    {
11
-        nickName: '2342',
12
-        phone: '2342',
13
-        gender: '2342',
14
-        province: '2342',
15
-    },
16
-]
17
-
18 9
 const dataRecord = props => {
19
-    //   const [data, setData] = useState({})
20
-    //   const activityId = props.id
21
-    //   const activityType = props.type
10
+    const [data, setData] = useState({})
11
+    const { targetId, targetType, channelId, targetName, buildingId, newCustomers } = props.location.query
22 12
 
23 13
     useEffect(() => {
24 14
         getList({ pageNum: 1, pageSize: 10 })
@@ -26,14 +16,12 @@ const dataRecord = props => {
26 16
     }, [])
27 17
 
28 18
     const getList = params => {
29
-        // console.log(params)
30
-        // request({ ...apis.activityDataStatis.activityAddRegist, params: { ...params, activityId: activityId, activityType: activityType, ...date } }).then(data => {
31
-        //   console.log(data)
32
-        //   props.getData()
33
-        //   setData(data)
34
-        // }).catch(e => {
35
-        //   console.log(e)
36
-        // })
19
+        request({ ...apis.channelList.newuserList, params: { ...params, targetId: targetId,targetType: targetType,channelId: channelId,buildingId: buildingId } }).then(data => {
20
+            console.log(data,"dddddddddddd")
21
+          setData(data)
22
+        }).catch(e => {
23
+          console.log(e)
24
+        })
37 25
     }
38 26
 
39 27
     const columns = [
@@ -62,9 +50,9 @@ const dataRecord = props => {
62 50
             align: 'center',
63 51
         },
64 52
         {
65
-            title: '访问次数',
66
-            dataIndex: 'personFrom',
67
-            key: 'personFrom',
53
+            title: '注册时间',
54
+            dataIndex: 'createDate',
55
+            key: 'createDate',
68 56
             align: 'center',
69 57
         },
70 58
 
@@ -97,16 +85,16 @@ const dataRecord = props => {
97 85
     return <>
98 86
         <div>
99 87
             <div>
100
-                <span>内容{}</span>
88
+                <span>内容:{targetName}</span>
101 89
                 <Button style={{ float: 'right', zIndex: 1 }} onClick={() => router.go(-1)}>
102 90
                     返回
103 91
                </Button>
104 92
             </div>
105 93
             <div style={{ marginTop: '20px'  }}>
106
-                <span>访问人数{}</span>
94
+                <span>注册用户:{newCustomers}</span>
107 95
                 <Button type="primary" style={{ float: 'right', marginBottom: '20px', zIndex: 1 }} onClick={exportActivityStats}>导出</Button>
108 96
             </div>
109
-            <Table style={{ marginTop: '30px' }} dataSource={data} columns={columns} pagination={false} rowKey="activityList" />
97
+            <Table style={{ marginTop: '30px' }} dataSource={data.records || []} columns={columns} pagination={false} rowKey="activityList" />
110 98
             {/* <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
111 99
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
112 100
       </div> */}

+ 56
- 44
src/pages/channel/newCustomer/index.jsx Parādīt failu

@@ -17,36 +17,48 @@ import request from '../../../utils/request';
17 17
 
18 18
 const { RangePicker } = DatePicker
19 19
 
20
-const data = [{
21
-    id: '1',
22
-    newuser: 3,
23
-    visitnum: 3,
24
-    visitpersons: 3,
25
-    
26
-}]
27
-
28 20
 const qrcodelist = props => {
29
-    const { id, name } = props.location.query
30
-    // const [data, setData] = useState([])
21
+    const { id, name, customerNum } = props.location.query
22
+    const [data, setData] = useState([])
31 23
     const [showHelp, setShowHelp] = useState(false)
32 24
 
33 25
     // 查询列表
34
-    //   const getList = params => {
35
-    //     request({ ...apis.taEcontract.listContractTemplate, params: { ...params } }).then(data => {
36
-    //       console.log(data)
37
-    //       setData(data)
38
-    //     })
39
-    //   }
26
+      const getList = params => {
27
+        request({ ...apis.channelList.getIntroductionList, params: { ...params,channelId: id } }).then(data => {
28
+          console.log(data)
29
+          setData(data)
30
+        })
31
+      }
40 32
 
41 33
     // eslint-disable-next-line react-hooks/rules-of-hooks
42
-    //   useEffect(() => {
43
-    //     getList({ pageNum: 1, pageSize: 10 });
44
-    //   }, [])
34
+      useEffect(() => {
35
+        getList({ pageNum: 1, pageSize: 10 });
36
+      }, [])
45 37
 
46 38
 
47
-    const toNewuser = () => {
39
+    const toNewuser = (record) => {
48 40
         router.push({
49 41
             pathname: '/channel/newCustomer/dataRecord',
42
+            query: {
43
+                channelId: record.channelId,
44
+                targetName: record.targetName,
45
+                targetId: record.targetId,
46
+                targetType: record.targetType,
47
+                buildingId: record.buildingId,
48
+                newCustomers: record.newCustomers,
49
+              },
50
+        });
51
+    }
52
+
53
+    const toVisitNum = (record) => {
54
+        router.push({
55
+            pathname: '/channel/newCustomer/visitNum',
56
+        });
57
+    }
58
+
59
+    const toPersonNum = (record) => {
60
+        router.push({
61
+            pathname: '/channel/newCustomer/personNum',
50 62
         });
51 63
     }
52 64
 
@@ -59,53 +71,53 @@ const qrcodelist = props => {
59 71
     const columns = [
60 72
         {
61 73
             title: '类型',
62
-            dataIndex: 'contractTemplateName',
63
-            key: 'contractTemplateName',
74
+            dataIndex: 'targetType',
75
+            key: 'targetType',
64 76
             align: 'center',
65 77
         },
66 78
         {
67 79
             title: '内容',
68
-            dataIndex: 'createDate',
69
-            key: 'createDate',
80
+            dataIndex: 'targetName',
81
+            key: 'targetName',
70 82
             align: 'center',
71 83
 
72 84
         },
73 85
         {
74 86
             title: '关联项目',
75
-            dataIndex: 'createDate',
76
-            key: 'createDate',
87
+            dataIndex: 'buildingName',
88
+            key: 'buildingName',
77 89
             align: 'center',
78 90
 
79 91
         },
80 92
         {
81 93
             title: '注册用户',
82
-            dataIndex: 'newuser',
83
-            key: 'newuser',
94
+            dataIndex: 'newCustomers',
95
+            key: 'newCustomers',
84 96
             align: 'center',
85 97
             render: (text, record) => <Navigate onClick={() => toNewuser(record)}>{text}</Navigate>,
86 98
 
87 99
         },
88 100
         {
89 101
             title: '访问人数',
90
-            dataIndex: 'visitpersons',
91
-            key: 'visitpersons',
102
+            dataIndex: 'visitPersons',
103
+            key: 'visitPersons',
92 104
             align: 'center',
93
-            render: (text, record) => <Navigate onClick={() => toNewuser(record)}>{text}</Navigate>,
105
+            render: (text, record) => <Navigate onClick={() => toPersonNum(record)}>{text}</Navigate>,
94 106
 
95 107
         },
96 108
         {
97 109
             title: '访问次数',
98
-            dataIndex: 'visitnum',
99
-            key: 'visitnum',
110
+            dataIndex: 'visitNum',
111
+            key: 'visitNum',
100 112
             align: 'center',
101
-            render: (text, record) => <Navigate onClick={() => toNewuser(record)}>{text}</Navigate>,
113
+            render: (text, record) => <Navigate onClick={() => toVisitNum(record)}>{text}</Navigate>,
102 114
         },
103 115
     ];
104 116
 
105 117
 
106
-    //   const changePageNum = pageNumber => {
107
-    //     getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
108
-    //   }
118
+      const changePageNum = pageNumber => {
119
+        getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
120
+      }
109 121
 
110 122
 
111 123
     // 提交事件
@@ -114,7 +126,7 @@ const qrcodelist = props => {
114 126
         props.form.validateFields((err, values) => {
115 127
             if (!err) {
116 128
                 console.log(values, 'values')
117
-                // getList({ pageNum: 1, pageSize: 10, ...values })
129
+                getList({ pageNum: 1, pageSize: 10, ...values })
118 130
             }
119 131
         });
120 132
     }
@@ -122,8 +134,8 @@ const qrcodelist = props => {
122 134
     //   // 重置搜索
123 135
     function handleReset() {
124 136
         props.form.resetFields();
125
-        // setTime('')
126
-        // getList({ pageNum: 1, pageSize: 10 })
137
+        setTime('')
138
+        getList({ pageNum: 1, pageSize: 10 })
127 139
     }
128 140
 
129 141
     const { getFieldDecorator } = props.form
@@ -131,7 +143,7 @@ const qrcodelist = props => {
131 143
 
132 144
         <>
133 145
             <div>
134
-                <span> 渠道{name}总计引进{}个注册用户</span>
146
+                <span> 渠道{name}总计引进{customerNum}个注册用户</span>
135 147
                 <Icon type="question-circle" theme="filled" style={{ fontSize: '25px', color: '#F00', marginLeft: '30px' }} onClick={() => setShowHelp(true)} />
136 148
                 <Button style={{ float: 'right', zIndex: 1 }} onClick={() => router.go(-1)}>
137 149
                     返回
@@ -192,10 +204,10 @@ const qrcodelist = props => {
192 204
                 </Form.Item>
193 205
             </Form>
194 206
             <Button type="primary" style={{ float: 'right', marginBottom: '20px', zIndex: 1 }} onClick={() => { }}>导出</Button>
195
-            <Table dataSource={data} columns={columns} pagination={false} rowKey={r => r.id} />
196
-            {/* <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
207
+            <Table dataSource={data.records} columns={columns} pagination={false} rowKey={r => r.serialNo} />
208
+            <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
197 209
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={e => changePageNum(e)} current={data.current}/>
198
-      </div> */}
210
+      </div>
199 211
         </>
200 212
     )
201 213
 }

+ 117
- 0
src/pages/channel/newCustomer/personNum.jsx Parādīt failu

@@ -0,0 +1,117 @@
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
+
8
+
9
+const data = [
10
+    {
11
+        nickName: '2342',
12
+        phone: '2342',
13
+        gender: '2342',
14
+        province: '2342',
15
+    },
16
+]
17
+
18
+const dataRecord = props => {
19
+    //   const [data, setData] = useState({})
20
+    //   const activityId = props.id
21
+    //   const activityType = props.type
22
+
23
+    useEffect(() => {
24
+        getList({ pageNum: 1, pageSize: 10 })
25
+
26
+    }, [])
27
+
28
+    const getList = params => {
29
+        // console.log(params)
30
+        // request({ ...apis.activityDataStatis.activityAddRegist, params: { ...params, activityId: activityId, activityType: activityType, ...date } }).then(data => {
31
+        //   console.log(data)
32
+        //   props.getData()
33
+        //   setData(data)
34
+        // }).catch(e => {
35
+        //   console.log(e)
36
+        // })
37
+    }
38
+
39
+    const columns = [
40
+        {
41
+            title: '姓名',
42
+            dataIndex: 'nickName',
43
+            key: 'nickName',
44
+            align: 'center',
45
+        },
46
+        {
47
+            title: '电话',
48
+            dataIndex: 'phone',
49
+            key: 'phone',
50
+            align: 'center',
51
+        },
52
+        {
53
+            title: '性别',
54
+            dataIndex: 'gender',
55
+            key: 'gender',
56
+            align: 'center',
57
+        },
58
+        {
59
+            title: '归属地',
60
+            dataIndex: 'province',
61
+            key: 'province',
62
+            align: 'center',
63
+        },
64
+        {
65
+            title: '访问次数',
66
+            dataIndex: 'personFrom',
67
+            key: 'personFrom',
68
+            align: 'center',
69
+        },
70
+
71
+    ]
72
+
73
+
74
+
75
+    const changePageNum = pageNumber => {
76
+        getList({ pageNum: pageNumber, pageSize: 10 })
77
+    }
78
+
79
+
80
+
81
+    const exportActivityStats = () => {
82
+
83
+        // request({ ...apis.activityDataStatis.activityAddRegistNumExport, params: { activityId: activityId, activityType: activityType, ...props.form.getFieldsValue(), ...date } }).then(data => {
84
+        //   if (!data) {
85
+        //     return
86
+        //   }
87
+        //   const url = window.URL.createObjectURL(new Blob([data]))
88
+        //   const link = document.createElement('a')
89
+        //   link.style.display = 'none'
90
+        //   link.href = url
91
+        //   link.setAttribute('download', '访问统计.xlsx')
92
+        //   document.body.append(link)
93
+        //   link.click()
94
+        // }).catch()
95
+    }
96
+
97
+    return <>
98
+        <div>
99
+            <div>
100
+                <span>内容{}</span>
101
+                <Button style={{ float: 'right', zIndex: 1 }} onClick={() => router.go(-1)}>
102
+                    返回
103
+               </Button>
104
+            </div>
105
+            <div style={{ marginTop: '20px'  }}>
106
+                <span>访问人数{}</span>
107
+                <Button type="primary" style={{ float: 'right', marginBottom: '20px', zIndex: 1 }} onClick={exportActivityStats}>导出</Button>
108
+            </div>
109
+            <Table style={{ marginTop: '30px' }} dataSource={data} columns={columns} pagination={false} rowKey="activityList" />
110
+            {/* <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
111
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
112
+      </div> */}
113
+        </div>
114
+    </>
115
+}
116
+
117
+export default dataRecord

+ 117
- 0
src/pages/channel/newCustomer/visitNum.jsx Parādīt failu

@@ -0,0 +1,117 @@
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
+
8
+
9
+const data = [
10
+    {
11
+        nickName: '2342',
12
+        phone: '2342',
13
+        gender: '2342',
14
+        province: '2342',
15
+    },
16
+]
17
+
18
+const dataRecord = props => {
19
+    //   const [data, setData] = useState({})
20
+    //   const activityId = props.id
21
+    //   const activityType = props.type
22
+
23
+    useEffect(() => {
24
+        getList({ pageNum: 1, pageSize: 10 })
25
+
26
+    }, [])
27
+
28
+    const getList = params => {
29
+        // console.log(params)
30
+        // request({ ...apis.activityDataStatis.activityAddRegist, params: { ...params, activityId: activityId, activityType: activityType, ...date } }).then(data => {
31
+        //   console.log(data)
32
+        //   props.getData()
33
+        //   setData(data)
34
+        // }).catch(e => {
35
+        //   console.log(e)
36
+        // })
37
+    }
38
+
39
+    const columns = [
40
+        {
41
+            title: '姓名',
42
+            dataIndex: 'nickName',
43
+            key: 'nickName',
44
+            align: 'center',
45
+        },
46
+        {
47
+            title: '电话',
48
+            dataIndex: 'phone',
49
+            key: 'phone',
50
+            align: 'center',
51
+        },
52
+        {
53
+            title: '性别',
54
+            dataIndex: 'gender',
55
+            key: 'gender',
56
+            align: 'center',
57
+        },
58
+        {
59
+            title: '归属地',
60
+            dataIndex: 'province',
61
+            key: 'province',
62
+            align: 'center',
63
+        },
64
+        {
65
+            title: '访问次数',
66
+            dataIndex: 'personFrom',
67
+            key: 'personFrom',
68
+            align: 'center',
69
+        },
70
+
71
+    ]
72
+
73
+
74
+
75
+    const changePageNum = pageNumber => {
76
+        getList({ pageNum: pageNumber, pageSize: 10 })
77
+    }
78
+
79
+
80
+
81
+    const exportActivityStats = () => {
82
+
83
+        // request({ ...apis.activityDataStatis.activityAddRegistNumExport, params: { activityId: activityId, activityType: activityType, ...props.form.getFieldsValue(), ...date } }).then(data => {
84
+        //   if (!data) {
85
+        //     return
86
+        //   }
87
+        //   const url = window.URL.createObjectURL(new Blob([data]))
88
+        //   const link = document.createElement('a')
89
+        //   link.style.display = 'none'
90
+        //   link.href = url
91
+        //   link.setAttribute('download', '访问统计.xlsx')
92
+        //   document.body.append(link)
93
+        //   link.click()
94
+        // }).catch()
95
+    }
96
+
97
+    return <>
98
+        <div>
99
+            <div>
100
+                <span>内容{}</span>
101
+                <Button style={{ float: 'right', zIndex: 1 }} onClick={() => router.go(-1)}>
102
+                    返回
103
+               </Button>
104
+            </div>
105
+            <div style={{ marginTop: '20px'  }}>
106
+                <span>访问人数{}</span>
107
+                <Button type="primary" style={{ float: 'right', marginBottom: '20px', zIndex: 1 }} onClick={exportActivityStats}>导出</Button>
108
+            </div>
109
+            <Table style={{ marginTop: '30px' }} dataSource={data} columns={columns} pagination={false} rowKey="activityList" />
110
+            {/* <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
111
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
112
+      </div> */}
113
+        </div>
114
+    </>
115
+}
116
+
117
+export default dataRecord

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

@@ -883,6 +883,16 @@ export default {
883 883
       method: 'GET',
884 884
       action: 'admin.channel.InviteClientsList.get',
885 885
     },
886
+    getIntroductionList: {
887
+      url: `${prefix}/channel/introductionList`,
888
+      method: 'GET',
889
+      action: 'admin.channel.introductionList.get',
890
+    },
891
+    newuserList: {
892
+      url: `${prefix}/channel/introduction/newuserList`,
893
+      method: 'GET',
894
+      action: 'admin.channel.introductionList.newuserList.get',
895
+    },
886 896
   },
887 897
   role: {
888 898
     getRoleList: {