Bläddra i källkod

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

zhoulisen 5 år sedan
förälder
incheckning
9e92041dac

+ 16
- 0
src/pages/channel/newCustomer/index.jsx Visa fil

@@ -53,12 +53,28 @@ const qrcodelist = props => {
53 53
     const toVisitNum = (record) => {
54 54
         router.push({
55 55
             pathname: '/channel/newCustomer/visitNum',
56
+            query: {
57
+                channelId: record.channelId,
58
+                targetName: record.targetName,
59
+                targetId: record.targetId,
60
+                targetType: record.targetType,
61
+                buildingId: record.buildingId,
62
+                visitNum: record.visitNum,
63
+              },
56 64
         });
57 65
     }
58 66
 
59 67
     const toPersonNum = (record) => {
60 68
         router.push({
61 69
             pathname: '/channel/newCustomer/personNum',
70
+            query: {
71
+                channelId: record.channelId,
72
+                targetName: record.targetName,
73
+                targetId: record.targetId,
74
+                targetType: record.targetType,
75
+                buildingId: record.buildingId,
76
+                visitPersons: record.visitPersons,
77
+              },
62 78
         });
63 79
     }
64 80
 

+ 11
- 14
src/pages/channel/newCustomer/personNum.jsx Visa fil

@@ -16,9 +16,8 @@ const data = [
16 16
 ]
17 17
 
18 18
 const dataRecord = props => {
19
-    //   const [data, setData] = useState({})
20
-    //   const activityId = props.id
21
-    //   const activityType = props.type
19
+      const [data, setData] = useState({})
20
+      const { targetId, targetType, channelId, targetName, buildingId, visitPersons } = props.location.query
22 21
 
23 22
     useEffect(() => {
24 23
         getList({ pageNum: 1, pageSize: 10 })
@@ -26,14 +25,12 @@ const dataRecord = props => {
26 25
     }, [])
27 26
 
28 27
     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
-        // })
28
+        console.log(params)
29
+        request({ ...apis.channelList.personNumList, params: { ...params, targetId: targetId,targetType: targetType,channelId: channelId,buildingId: buildingId} }).then(data => {
30
+          setData(data)
31
+        }).catch(e => {
32
+          console.log(e)
33
+        })
37 34
     }
38 35
 
39 36
     const columns = [
@@ -97,16 +94,16 @@ const dataRecord = props => {
97 94
     return <>
98 95
         <div>
99 96
             <div>
100
-                <span>内容{}</span>
97
+                <span>内容{targetName}</span>
101 98
                 <Button style={{ float: 'right', zIndex: 1 }} onClick={() => router.go(-1)}>
102 99
                     返回
103 100
                </Button>
104 101
             </div>
105 102
             <div style={{ marginTop: '20px'  }}>
106
-                <span>访问人数{}</span>
103
+                <span>访问人数:{visitPersons}</span>
107 104
                 <Button type="primary" style={{ float: 'right', marginBottom: '20px', zIndex: 1 }} onClick={exportActivityStats}>导出</Button>
108 105
             </div>
109
-            <Table style={{ marginTop: '30px' }} dataSource={data} columns={columns} pagination={false} rowKey="activityList" />
106
+            <Table style={{ marginTop: '30px' }} dataSource={data.records || []} columns={columns} pagination={false} rowKey="activityList" />
110 107
             {/* <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
111 108
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
112 109
       </div> */}

+ 15
- 17
src/pages/channel/newCustomer/visitNum.jsx Visa fil

@@ -16,9 +16,8 @@ const data = [
16 16
 ]
17 17
 
18 18
 const dataRecord = props => {
19
-    //   const [data, setData] = useState({})
20
-    //   const activityId = props.id
21
-    //   const activityType = props.type
19
+    const [data, setData] = useState({})
20
+    const { targetId, targetType, channelId, targetName, buildingId, visitNum } = props.location.query
22 21
 
23 22
     useEffect(() => {
24 23
         getList({ pageNum: 1, pageSize: 10 })
@@ -26,14 +25,13 @@ const dataRecord = props => {
26 25
     }, [])
27 26
 
28 27
     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
-        // })
28
+        console.log(params)
29
+        request({ ...apis.channelList.visitNumList, params: { ...params, targetId: targetId,targetType: targetType,channelId: channelId,buildingId: buildingId } }).then(data => {
30
+          console.log(data)
31
+          setData(data)
32
+        }).catch(e => {
33
+          console.log(e)
34
+        })
37 35
     }
38 36
 
39 37
     const columns = [
@@ -62,9 +60,9 @@ const dataRecord = props => {
62 60
             align: 'center',
63 61
         },
64 62
         {
65
-            title: '访问次数',
66
-            dataIndex: 'personFrom',
67
-            key: 'personFrom',
63
+            title: '访问时间',
64
+            dataIndex: 'visitDate',
65
+            key: 'visitDate',
68 66
             align: 'center',
69 67
         },
70 68
 
@@ -97,16 +95,16 @@ const dataRecord = props => {
97 95
     return <>
98 96
         <div>
99 97
             <div>
100
-                <span>内容{}</span>
98
+                <span>内容:{targetName}</span>
101 99
                 <Button style={{ float: 'right', zIndex: 1 }} onClick={() => router.go(-1)}>
102 100
                     返回
103 101
                </Button>
104 102
             </div>
105 103
             <div style={{ marginTop: '20px'  }}>
106
-                <span>访问人数{}</span>
104
+                <span>访问人数:{visitNum}</span>
107 105
                 <Button type="primary" style={{ float: 'right', marginBottom: '20px', zIndex: 1 }} onClick={exportActivityStats}>导出</Button>
108 106
             </div>
109
-            <Table style={{ marginTop: '30px' }} dataSource={data} columns={columns} pagination={false} rowKey="activityList" />
107
+            <Table style={{ marginTop: '30px' }} dataSource={data.records || []} columns={columns} pagination={false} rowKey="activityList" />
110 108
             {/* <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
111 109
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
112 110
       </div> */}

+ 10
- 0
src/services/apis.js Visa fil

@@ -893,6 +893,16 @@ export default {
893 893
       method: 'GET',
894 894
       action: 'admin.channel.introductionList.newuserList.get',
895 895
     },
896
+    visitNumList: {
897
+      url: `${prefix}/channel/introduction/visitNumList`,
898
+      method: 'GET',
899
+      action: 'admin.channel.introductionList.visitNumList.get',
900
+    },
901
+    personNumList: {
902
+      url: `${prefix}/channel/introduction/personNumList`,
903
+      method: 'GET',
904
+      action: 'admin.channel.introductionList.personNumList.get',
905
+    }
896 906
   },
897 907
   role: {
898 908
     getRoleList: {