zlisen пре 3 година
родитељ
комит
8bfaacd7a2

+ 7
- 0
config/routes.js Прегледај датотеку

@@ -616,6 +616,13 @@ export default [
616 616
                 component: './statistics/dataReport',
617 617
                 menuCode: '/statistics/dataReport',
618 618
               },
619
+              {
620
+                path: '/statistics/dataReport/newAdd',
621
+                name: '新增用户',
622
+                hideInMenu: true,
623
+                component: './statistics/dataReport/newAdd',
624
+                menuCode: '/statistics/dataReport',
625
+              },
619 626
               {
620 627
                 path: '/statistics/activity',
621 628
                 name: '活动统计',

+ 4
- 4
src/pages/statistics/compents/TimeSelect.jsx Прегледај датотеку

@@ -5,7 +5,7 @@ import moment from 'moment';
5 5
 
6 6
 const { RangePicker } = DatePicker;
7 7
 const TimeSelect = props => {
8
-  const { value, onChange=()=>{} } = props;
8
+  const { value, onChange=()=>{},buttonType='link' } = props;
9 9
 
10 10
   const [rangePickerValue, setRangePickerValue] = useState();
11 11
   const [type, setType] = useState('week');
@@ -53,9 +53,9 @@ const TimeSelect = props => {
53 53
   return (
54 54
     <div style={{ display: 'flex' }}>
55 55
       <div>
56
-        <Button type='link' style={type==='today'?undefined:{color:'rgba(0,0,0,0.65)'}} onClick={() => setType('today')}>今日</Button>
57
-        <Button type='link' style={type==='week'?undefined:{color:'rgba(0,0,0,0.65)'}} onClick={() => setType('week')}>最近一周</Button>
58
-        <Button type='link' style={type==='month'?undefined:{color:'rgba(0,0,0,0.65)'}} onClick={() => setType('month')}>最近一月</Button>
56
+        <Button type={buttonType} style={type==='today'?undefined:{color:'rgba(0,0,0,0.65)'}} onClick={() => setType('today')}>今日</Button>
57
+        <Button type={buttonType} style={type==='week'?undefined:{color:'rgba(0,0,0,0.65)'}} onClick={() => setType('week')}>最近一周</Button>
58
+        <Button type={buttonType} style={type==='month'?undefined:{color:'rgba(0,0,0,0.65)'}} onClick={() => setType('month')}>最近一月</Button>
59 59
       </div>
60 60
       <RangePicker
61 61
         value={rangePickerValue}

+ 2
- 2
src/pages/statistics/dataReport/components/Count.jsx Прегледај датотеку

@@ -68,9 +68,9 @@ const Count = props => {
68 68
           </Card>
69 69
         </Col>
70 70
         <Col span={4}>
71
-          <Card>
71
+          <Card onClick={()=>router.push('/statistics/dataReport/newAdd')} style={{cursor:'pointer'}}>
72 72
             <Statistic
73
-              title="今日新增用户"
73
+              title={<u>今日新增用户</u>}
74 74
               value={data.todayAddPersonNum || 0}
75 75
               //   valueStyle={{ color: '#cf1322' }}
76 76
             />

+ 148
- 0
src/pages/statistics/dataReport/components/IntentionalCustomers.jsx Прегледај датотеку

@@ -0,0 +1,148 @@
1
+import React, { Component, useMemo, useState, useEffect } from 'react';
2
+import {
3
+  Form,
4
+  Icon,
5
+  Input,
6
+  Button,
7
+  DatePicker,
8
+  Select,
9
+  Card,
10
+  Row,
11
+  Col,
12
+  Pagination,
13
+  Alert,
14
+  Table,
15
+  Avatar,
16
+  Radio,
17
+  Modal,
18
+  Descriptions,
19
+} from 'antd';
20
+import BuildingSelect from '@/components/SelectButton/BuildSelect';
21
+import { func } from 'prop-types';
22
+import request from '@/utils/request';
23
+import apis from '@/services/apis';
24
+// const { Option } = Select;
25
+
26
+const Layout = prop =>
27
+prop.simple ? (
28
+    prop.children
29
+  ) : (
30
+    <Card title="意向客户" headStyle={{ textAlign: 'left' }}>
31
+      {prop.children}
32
+    </Card>
33
+  );
34
+
35
+const UserBehavior = props => {
36
+  const { simple = false } = props;
37
+  const [data, setData] = useState({ records: [] });
38
+  const [buildingId, setBuildingId] = useState();
39
+
40
+  useEffect(() => {
41
+    IntentionUsers({ pageNum: 1, pageSize: 5 });
42
+    // getUserBehaviorProfile(formatDate(props.startDate, props.endDate))
43
+  }, []);
44
+  function IntentionUsers(params) {
45
+    request({
46
+      ...apis.indexEcharts.intentionUsers,
47
+      params: { ...params },
48
+    }).then(data => {
49
+      console.log(data, 'datadata');
50
+      setData(data);
51
+    });
52
+  }
53
+
54
+  // 分页
55
+  function onChange(pageNum) {
56
+    // eslint-disable-next-line react-hooks/rules-of-hooks
57
+    IntentionUsers({ pageNum: pageNum, pageSize: 5, buildingId });
58
+  }
59
+
60
+  const columns = [
61
+    {
62
+      title: '用户姓名',
63
+      dataIndex: 'personName',
64
+      key: 'personName',
65
+      width: '25%',
66
+    },
67
+    {
68
+      title: '手机号',
69
+      dataIndex: 'phone',
70
+      key: 'phone',
71
+      width: '25%',
72
+    },
73
+    {
74
+      title: '意向楼盘',
75
+      dataIndex: 'buildingName',
76
+      key: 'buildingName',
77
+      width: '25%',
78
+    },
79
+    {
80
+      title: '意向值',
81
+      dataIndex: 'intention',
82
+      key: 'intention',
83
+      width: '25%',
84
+    },
85
+  ];
86
+
87
+  function handleBuildingChange(e) {
88
+    console.log(e, '-----');
89
+    IntentionUsers({ pageNum: 1, pageSize: 5, buildingId: e });
90
+    setBuildingId(e);
91
+  }
92
+
93
+  //意向客户导出
94
+  function exportIntentionUsers() {
95
+    request({
96
+      ...apis.indexEcharts.exportIntentionUsers,
97
+      params: { buildingId },
98
+    }).then(data => {
99
+      if (!data) {
100
+        return;
101
+      }
102
+      const url = window.URL.createObjectURL(new Blob([data]));
103
+      const link = document.createElement('a');
104
+      link.style.display = 'none';
105
+      link.href = url;
106
+      link.setAttribute('download', '意向客户.xlsx');
107
+      document.body.append(link);
108
+      link.click();
109
+    });
110
+  }
111
+
112
+  return (
113
+    <Layout simple={simple}>
114
+      <div>
115
+        <Row>
116
+          <Col span={22}>
117
+            <BuildingSelect
118
+              value={buildingId}
119
+              // slot="action"
120
+              // value={buildingId}
121
+              onChange={e => handleBuildingChange(e)}
122
+            ></BuildingSelect>
123
+          </Col>
124
+          <Col span={2} style={{ textAlign: 'right' }}>
125
+            <Button type="primary" onClick={exportIntentionUsers}>
126
+              导出
127
+            </Button>
128
+          </Col>
129
+        </Row>
130
+        <Table
131
+          rowKey="IntentionalCustomers"
132
+          dataSource={data.records}
133
+          columns={columns}
134
+          style={{ marginTop: '15px' }}
135
+          pagination={{
136
+            total: data.total,
137
+            defaultPageSize: 5,
138
+            current: data.current || 1,
139
+            onChange: e => onChange(e),
140
+          }}
141
+          scroll={{ y: 500 }}
142
+        />
143
+      </div>
144
+    </Layout>
145
+  );
146
+};
147
+
148
+export default UserBehavior;

+ 109
- 0
src/pages/statistics/dataReport/components/NewUsers.jsx Прегледај датотеку

@@ -0,0 +1,109 @@
1
+import React, { Component, useState, useEffect } from 'react';
2
+import echarts from 'echarts/lib/echarts';
3
+import EChart from '@/components/EchartsTest/EChart';
4
+import request from '@/utils/request';
5
+import apis from '@/services/apis';
6
+import moment from 'moment';
7
+import router from 'umi/router';
8
+import { Table, Select, Row, Col, Menu, Dropdown, Button, Icon, Card } from 'antd';
9
+
10
+// import styles from '../styles.less'
11
+const formatDate = (start, end) => {
12
+  const startDate = moment(start).format('YYYY-MM-DDT00:00:00.000') + 'Z';
13
+  const endDate = moment(end).format('YYYY-MM-DDT23:59:59.999') + 'Z';
14
+  return { startDate, endDate };
15
+};
16
+const NewUsers = props => {
17
+  const {
18
+    startDate = moment()
19
+      .subtract(7, 'day')
20
+      .format('YYYY-MM-DD'),
21
+    endDate = moment().format('YYYY-MM-DD'),
22
+    simple = false,
23
+  } = props;
24
+  const [data, setData] = useState({ records: [] });
25
+
26
+  useEffect(() => {
27
+    NewsUserCount(formatDate(startDate, endDate));
28
+  }, [startDate, endDate]);
29
+
30
+  function NewsUserCount(params) {
31
+    request({
32
+      ...apis.indexEcharts.changeNewUser,
33
+      params,
34
+    }).then(data => {
35
+      setData(data);
36
+    });
37
+  }
38
+
39
+  const dataZoom = props.dataZoom
40
+    ? [
41
+        {
42
+          type: 'inside',
43
+          start: 0,
44
+          end: 100,
45
+        },
46
+        {
47
+          type: 'slider',
48
+          start: 0,
49
+          end: 100,
50
+        },
51
+      ]
52
+    : undefined;
53
+  const dataset = data || [];
54
+  const options = {
55
+    color: ['#FF814C', '#F02B3E'],
56
+    tooltip: {
57
+      trigger: 'axis',
58
+    },
59
+    icon: 'rect',
60
+    legend: {
61
+      data: ['新用户数', '授权注册'],
62
+    },
63
+    toolbox: {},
64
+    xAxis: {
65
+      type: 'category',
66
+    },
67
+    yAxis: {},
68
+    dataZoom,
69
+    series: [
70
+      {
71
+        name: '新用户数',
72
+        type: 'line',
73
+        smooth: true,
74
+      },
75
+      {
76
+        name: '授权注册',
77
+        type: 'line',
78
+        smooth: true,
79
+      },
80
+    ],
81
+    dataset: {
82
+      dimensions: ['createTime', 'fromNum', 'registeredNum'],
83
+      source: dataset,
84
+    },
85
+  };
86
+
87
+  const piestyles = {
88
+    width: '100%',
89
+    // height: '400px',
90
+  };
91
+
92
+  const Layout = prop =>
93
+    simple ? (
94
+      prop.children
95
+    ) : (
96
+      <Card title="新增用户" headStyle={{ textAlign: 'left' }}>
97
+        {prop.children}
98
+      </Card>
99
+    );
100
+
101
+  return (
102
+    <Layout>
103
+      {' '}
104
+      <EChart options={options} style={piestyles} />
105
+    </Layout>
106
+  );
107
+};
108
+
109
+export default NewUsers;

+ 110
- 0
src/pages/statistics/dataReport/components/UserActive.jsx Прегледај датотеку

@@ -0,0 +1,110 @@
1
+import React, { Component, useState, useEffect } from 'react';
2
+import echarts from 'echarts/lib/echarts';
3
+import EChart from '@/components/EchartsTest/EChart';
4
+import request from '@/utils/request';
5
+import apis from '@/services/apis';
6
+import moment from 'moment';
7
+import router from 'umi/router';
8
+import { Table, Select, Row, Col, Menu, Dropdown, Card, Icon, message } from 'antd';
9
+
10
+const formatDate = (start, end) => {
11
+  const startDate = moment(start).format('YYYY-MM-DDT00:00:00.000') + 'Z';
12
+  const endDate = moment(end).format('YYYY-MM-DDT23:59:59.999') + 'Z';
13
+  return { startDate, endDate };
14
+};
15
+const UserSource = props => {
16
+  const [data, setData] = useState({ records: [] });
17
+  //柱图
18
+
19
+  useEffect(() => {
20
+    UserActive({ dateType: 'day' });
21
+  }, []);
22
+
23
+  function UserActive(params) {
24
+    request({
25
+      ...apis.indexEcharts.userActive,
26
+      params: { pageSize: 9999, ...params },
27
+    }).then(data => {
28
+      setData(data);
29
+    });
30
+  }
31
+
32
+  const dataset = data.selectActiveUserCount || [];
33
+  const options = {
34
+    tooltip: {},
35
+    xAxis: { type: 'category' },
36
+    yAxis: {},
37
+    series: {
38
+      type: 'bar',
39
+      name: '活跃用户',
40
+      barWidth: 50,
41
+      data: dataset.map(x => [x.date, !x.activityCount ? 0 : x.activityCount]),
42
+      itemStyle: {
43
+        normal: {
44
+          barBorderRadius: [50, 50, 0, 0],
45
+          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
46
+            {
47
+              offset: 0,
48
+              color: '#FD8A95',
49
+            },
50
+            {
51
+              offset: 1,
52
+              color: '#F13043',
53
+            },
54
+          ]),
55
+          shadowColor: 'rgba(0, 0, 0, 0.4)',
56
+        },
57
+      },
58
+    },
59
+  };
60
+
61
+  function onChange(value) {
62
+    UserActive({ dateType: value });
63
+  }
64
+
65
+  const piestyles = {
66
+    width: '100%',
67
+    height: '400px',
68
+  };
69
+
70
+  return (
71
+    <>
72
+      <Card
73
+        title="用户活跃"
74
+        headStyle={{ textAlign: 'left' }}
75
+        extra={
76
+          <Select
77
+            style={{ width: 100 }}
78
+            defaultValue='day'
79
+            onChange={onChange}
80
+            size={'small'}
81
+          >
82
+            <Option value="day">日活跃</Option>
83
+            <Option value="month">月活跃</Option>
84
+          </Select>
85
+        }
86
+      >
87
+        {/* <div >
88
+        <p><span style={{fontSize:'0.12rem',fontWeight:'600'}}>用户活跃数</span></p>
89
+
90
+          <Select
91
+            showSearch
92
+            style={{ width: 100 }}
93
+            placeholder="日活跃"
94
+            optionFilterProp="children"
95
+            onChange={onChange}
96
+          >
97
+            <Option value="day">日活跃</Option>
98
+            <Option value="month">月活跃</Option>
99
+
100
+          </Select>
101
+        
102
+       </div> */}
103
+
104
+        <EChart options={options} style={piestyles} />
105
+      </Card>
106
+    </>
107
+  );
108
+};
109
+
110
+export default UserSource;

+ 149
- 0
src/pages/statistics/dataReport/components/UserBehavior.jsx Прегледај датотеку

@@ -0,0 +1,149 @@
1
+import React, { Component, useState, useEffect } from 'react';
2
+import EChart from '@/components/EchartsTest/EChart';
3
+import request from '@/utils/request';
4
+import apis from '@/services/apis';
5
+import moment from 'moment';
6
+import router from 'umi/router';
7
+import 'echarts/lib/component/dataZoom'
8
+import { Table, Select, Row, Col, Menu, Dropdown, Button, Icon, message, Modal, Card } from 'antd';
9
+import BuildSelect from '@/components/SelectButton/BuildSelect'
10
+
11
+const { Option } = Select;
12
+
13
+
14
+const eventcolumns = [
15
+  {
16
+    title: '编号',
17
+    dataIndex: 'recordId',
18
+    key: 'recordId',
19
+    align: 'center',
20
+    width: '16%',
21
+  },
22
+  {
23
+    title: '访问时间',
24
+    dataIndex: 'visitTime',
25
+    key: 'visitTime',
26
+    align: 'center',
27
+    width: '18%',
28
+    render: (x, row) => (
29
+      <>
30
+        <span>{moment(row.visitTime).format('YYYY-MM-DD hh:mm:ss')}</span>
31
+      </>
32
+    ),
33
+  },
34
+  {
35
+    title: '离开时间',
36
+    dataIndex: 'leaveTime',
37
+    key: 'leaveTime',
38
+    align: 'center',
39
+    width: '18%',
40
+    render: (x, row) => (
41
+      <>
42
+        <span>{row.leaveTime && moment(row.leaveTime).format('YYYY-MM-DD hh:mm:ss')}</span>
43
+      </>
44
+    ),
45
+  },
46
+]
47
+
48
+
49
+
50
+const formatDate = (start, end) => {
51
+  const startDate = `${moment(start).format('YYYY-MM-DDT00:00:00.000')}Z`
52
+  const endDate = `${moment(end).format('YYYY-MM-DDT23:59:59.999')}Z`
53
+  return { startDate, endDate }
54
+}
55
+const UserBehaviorIndex = props => {
56
+    const { startDate = moment().subtract(7, 'day').format('YYYY-MM-DD'), endDate = moment().format('YYYY-MM-DD') } = props;
57
+  const [data, setData] = useState({ records: [] })
58
+  const [visibleData, setVisibleData] = useState({ visible: false, row: {} })
59
+  const [buildingId, setBuildingId] = useState('')
60
+
61
+  // 柱图
62
+  useEffect(() => {
63
+    const date = formatDate(startDate, endDate)
64
+    getUserBehaviorSummary({
65
+      ...date,
66
+      activity: props.activity,
67
+      event: props.event,
68
+      eventType: props.eventType,
69
+      buildingId: props.buildingId,
70
+    })
71
+    // getUserBehaviorProfile(formatDate(props.startDate, props.endDate))
72
+  }, [startDate, endDate, props.activity, props.event, props.eventType, props.buildingId])
73
+
74
+  const [recordList, setList] = useState([])
75
+  function getUserBehaviorSummary(params) {
76
+    request({
77
+      ...apis.indexEcharts.userBehavior.tsUserBehavior,
78
+      params,
79
+    }).then(data => {
80
+      setData(data || {})
81
+      // setList((data.data.records || []).filter(e => e.activity !== '客户'))
82
+    })
83
+  }
84
+
85
+
86
+  const seriesMaker = (data.selectUserBehavior || []).filter(e => e.activity !== '客户' && e.activity !== '首页').reduce((series, item) => {
87
+    let { date, activityCount, activity } = item
88
+    date = moment(date).format('YYYY-MM-DD')
89
+    if (!activityCount) activityCount = 0
90
+
91
+    // 使用对象, 可以去重
92
+    series[`${activity}`] = (series[`${activity}`] || []).concat([[date, activityCount]])
93
+
94
+    return series;
95
+  }, {})
96
+
97
+
98
+  const dataZoom = props.dataZoom ? [
99
+    {
100
+      type: 'inside',
101
+      start: 0,
102
+      end: 100,
103
+    },
104
+    {
105
+      type: 'slider',
106
+      start: 0,
107
+      end: 100,
108
+    },
109
+  ] : undefined
110
+
111
+
112
+  const options = {
113
+    title: {},
114
+    icon: 'rect',
115
+    legend: {
116
+      show: true,
117
+      zlevel: 10,
118
+      itemGap: 100,
119
+    },
120
+    color: ['#F12B3E', '#FE929C', '#647CE1', '#A2B9FF', '#FF844F', '#FFBB9D'],
121
+    tooltip: {
122
+      trigger: 'axis',
123
+    },
124
+    xAxis: { type: 'category' },
125
+    yAxis: {},
126
+    dataZoom,
127
+    series: Object.keys(seriesMaker).map(x => ({
128
+      type: 'line',
129
+      smooth: true,
130
+      name: x,
131
+      data: seriesMaker[x],
132
+    })),
133
+  }
134
+
135
+
136
+
137
+
138
+  return (
139
+    <>
140
+       <Card title="用户行为" headStyle={{ textAlign: 'left' }}>
141
+
142
+        <EChart options={options}  />
143
+      </Card>
144
+      
145
+    </>
146
+  )
147
+}
148
+
149
+export default UserBehaviorIndex

+ 126
- 0
src/pages/statistics/dataReport/components/userSource.jsx Прегледај датотеку

@@ -0,0 +1,126 @@
1
+import React, { Component, useState, useEffect } from 'react';
2
+import echarts from 'echarts/lib/echarts';
3
+import { Card } from 'antd';
4
+import EChart from '@/components/EchartsTest/EChart';
5
+import request from '@/utils/request';
6
+import apis from '@/services/apis';
7
+import moment from 'moment';
8
+import router from 'umi/router';
9
+
10
+const formatDate = (start, end) => {
11
+  const startDate = moment(start).format('YYYY-MM-DDT00:00:00.000') + 'Z';
12
+  const endDate = moment(end).format('YYYY-MM-DDT23:59:59.999') + 'Z';
13
+  return { startDate, endDate };
14
+};
15
+
16
+const UserSource = props => {
17
+  const { startDate = moment().subtract(7, 'day').format('YYYY-MM-DD'), endDate = moment().format('YYYY-MM-DD') } = props;
18
+  const [xData, setxData] = useState([]);
19
+  const [fromData, setFromData] = useState([]);
20
+  const [registerData, setRegisterData] = useState([]);
21
+  //柱图
22
+  useEffect(() => {
23
+    userResource(formatDate(startDate, endDate));
24
+  }, []);
25
+
26
+  function userResource(params) {
27
+    request({
28
+      ...apis.indexEcharts.selectPersonFrom,
29
+      params,
30
+    }).then(data => {
31
+      console.log(data, '222222');
32
+      setxData(data.tdWxDicts.map(x => x.sceneAlias));
33
+      setFromData(data.tdWxDicts.map(x => x.fromData));
34
+      setRegisterData(data.tdWxDicts.map(x => x.registerSum));
35
+      // props.onSuccess(data)
36
+    });
37
+  }
38
+
39
+  const subtitle = '最近7天';
40
+  const baroptions = {
41
+    title: {},
42
+    xAxis: {
43
+      type: 'category',
44
+      data: xData,
45
+      axisLabel: { rotate: 45 },
46
+    },
47
+    legend: {
48
+      left: '20%',
49
+      data: ['所有用户', '注册用户'],
50
+    },
51
+
52
+    tooltip: {},
53
+
54
+    yAxis: {},
55
+    series: [
56
+      {
57
+        type: 'bar',
58
+        name: '所有用户',
59
+        datasetIndex: 0,
60
+        barWidth: 20,
61
+        data: fromData,
62
+        itemStyle: {
63
+          normal: {
64
+            barBorderRadius: [20, 20, 0, 0],
65
+            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
66
+              {
67
+                offset: 0,
68
+                color: '#FFC4A8',
69
+              },
70
+              {
71
+                offset: 1,
72
+                color: '#FF7E49',
73
+              },
74
+            ]),
75
+            shadowColor: 'rgba(0, 0, 0, 0.4)',
76
+          },
77
+        },
78
+      },
79
+      {
80
+        type: 'bar',
81
+        name: '注册用户',
82
+        barWidth: 20,
83
+        data: registerData,
84
+        itemStyle: {
85
+          normal: {
86
+            barBorderRadius: [20, 20, 0, 0],
87
+            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
88
+              {
89
+                offset: 0,
90
+                color: '#FE939D',
91
+              },
92
+              {
93
+                offset: 1,
94
+                color: '#F0293C',
95
+              },
96
+            ]),
97
+            shadowColor: 'rgba(0, 0, 0, 0.4)',
98
+          },
99
+        },
100
+      },
101
+    ],
102
+    // dataset: {
103
+    //   id: 'bar',
104
+    //   dimensions: ['fromName', 'userCount', 'registered'],
105
+    //   source: source,
106
+    // },
107
+  };
108
+
109
+  const barstyle = {
110
+    width: '100%',
111
+    // height: '480px',
112
+    // minWidth: '400px'
113
+  };
114
+
115
+  return (
116
+    <>
117
+      <Card title="用户来源" headStyle={{ textAlign: 'left' }}>
118
+        {/* <p onClick={()=>router.push('/statistical/userSource')}><span style={{borderBottom:'1px solid #f02d40',cursor: 'pointer',color:'#333',fontSize:'0.12rem',fontWeight:'600'}}>用户来源</span> {!props.BuildSelectHide && <span style={{ fontSize: '0.09rem', color: '#888', marginLeft: '0.06rem' }}>最近七天</span>}</p> */}
119
+
120
+        <EChart options={baroptions} style={barstyle} />
121
+      </Card>
122
+    </>
123
+  );
124
+};
125
+
126
+export default UserSource;

+ 35
- 4
src/pages/statistics/dataReport/index.jsx Прегледај датотеку

@@ -7,10 +7,17 @@ import request from '@/utils/request';
7 7
 import apis from '@/services/apis';
8 8
 import Count from './components/Count';
9 9
 import SourceRole from './components/SourceRole';
10
+import UserSource from './components/UserSource';
11
+import UserBehavior from './components/UserBehavior';
12
+import UserActive from './components/UserActive';
13
+
10 14
 import UserSex from './components/UserSex';
11 15
 import UserConversion from './components/UserConversion';
16
+import NewUsers from './components/NewUsers';
17
+
12 18
 import BuildingStatistic from './BuildingStatistic';
13 19
 import CityNums from './CityNums';
20
+import IntentionalCustomers from './components/IntentionalCustomers';
14 21
 
15 22
 const DataReport = props => {
16 23
   const [data, setData] = useState([]);
@@ -20,25 +27,49 @@ const DataReport = props => {
20 27
       <div style={{ marginBottom: '20px' }}>
21 28
         <Count></Count>
22 29
       </div>
30
+      <div style={{ marginBottom: '20px' }}>
31
+        <Row gutter={16} style={{ textAlign: 'center' }}>
32
+          <Col span={16}>
33
+            <UserSource></UserSource>
34
+          </Col>
35
+          <Col span={8}>
36
+            <SourceRole></SourceRole>
37
+          </Col>
38
+        </Row>
39
+      </div>
23 40
       <div style={{ marginBottom: '20px' }}>
24 41
         <CityNums></CityNums>
25 42
       </div>
43
+      <div style={{ marginBottom: '20px' }}>
44
+        <UserBehavior></UserBehavior>
45
+      </div>
26 46
       <div style={{ marginBottom: '20px' }}>
27 47
         <Row gutter={16} style={{ textAlign: 'center' }}>
28
-          <Col span={8}>
29
-            <SourceRole></SourceRole>
48
+          <Col span={16}>
49
+            <UserActive></UserActive>
30 50
           </Col>
31 51
           <Col span={8}>
32 52
             <UserSex></UserSex>
33 53
           </Col>
54
+        </Row>
55
+      </div>
56
+      <div style={{ marginBottom: '20px' }}>
57
+        <Row gutter={16} style={{ textAlign: 'center' }}>
58
+          <Col span={16}>
59
+            <NewUsers></NewUsers>
60
+          </Col>
34 61
           <Col span={8}>
35 62
             <UserConversion></UserConversion>
36 63
           </Col>
37 64
         </Row>
38 65
       </div>
39
-      <div style={{ marginBottom: '20px' }}>
40
-        <BuildingStatistic></BuildingStatistic>
66
+       <div style={{ marginBottom: '20px' }}>
67
+        <IntentionalCustomers></IntentionalCustomers>
41 68
       </div>
69
+      
70
+      {/* <div style={{ marginBottom: '20px' }}>
71
+        <BuildingStatistic></BuildingStatistic>
72
+      </div> */}
42 73
     </>
43 74
   );
44 75
 };

+ 37
- 0
src/pages/statistics/dataReport/newAdd.jsx Прегледај датотеку

@@ -0,0 +1,37 @@
1
+import React, { Component, useState, useEffect } from 'react';
2
+import { Card, Row, Col, Statistic, Icon } from 'antd';
3
+// import IndexEcharts from './components/indexEcharts';
4
+// import Swiper from './swiper/index';
5
+import router from 'umi/router';
6
+import request from '@/utils/request';
7
+import apis from '@/services/apis';
8
+import Count from './components/Count';
9
+import SourceRole from './components/SourceRole';
10
+import UserSource from './components/UserSource';
11
+import UserBehavior from './components/UserBehavior';
12
+import UserActive from './components/UserActive';
13
+
14
+import UserSex from './components/UserSex';
15
+import UserConversion from './components/UserConversion';
16
+import NewUsers from './components/NewUsers';
17
+
18
+import BuildingStatistic from './BuildingStatistic';
19
+import CityNums from './CityNums';
20
+import TimeSelect from '../compents/TimeSelect';
21
+import IntentionalCustomers from './components/IntentionalCustomers';
22
+const newAdd = props => {
23
+  const [data, setData] = useState([]);
24
+
25
+  const onTimeChange=()=>{
26
+
27
+  }
28
+
29
+  return (
30
+    <Card>
31
+      <TimeSelect onChange={onTimeChange}  ></TimeSelect>
32
+      <NewUsers simple={true}></NewUsers>
33
+      <IntentionalCustomers  simple={true}></IntentionalCustomers>
34
+    </Card>
35
+  );
36
+};
37
+export default newAdd;