|
@@ -1,126 +1,106 @@
|
1
|
|
-import React, { Component, useState, useEffect } from 'react';
|
2
|
|
-import { Card, Typography, Alert, Row, Col, Button } from 'antd';
|
3
|
|
-import router from 'umi/router';
|
4
|
|
-import request from '../utils/request';
|
5
|
|
-import bgImg from '../assets/picture.png';
|
6
|
|
-import itemsImg from '../assets/items.png';
|
7
|
|
-import consultantImg from '../assets/consultantKPI.png';
|
8
|
|
-import projectImg from '../assets/project.png';
|
9
|
|
-import reportImg from '../assets/report.png';
|
10
|
|
-import customerImg from '../assets/customer.png';
|
11
|
|
-import statisticsImg from '../assets/statistics.png';
|
12
|
|
-import borderImg from '../assets/border.png';
|
13
|
|
-
|
14
|
|
-const index = (props) => {
|
15
|
|
-
|
16
|
|
- const [data, setData] = useState([])
|
17
|
|
-
|
18
|
|
-
|
19
|
|
- useEffect(() => {
|
20
|
|
-
|
21
|
|
- }, [])
|
22
|
|
- const list = [
|
23
|
|
- {
|
24
|
|
- title: '项目列表',
|
25
|
|
- img: itemsImg,
|
26
|
|
- path: '/building/list',
|
27
|
|
- value: '1',
|
28
|
|
- },
|
29
|
|
- {
|
30
|
|
- title: '客户列表',
|
31
|
|
- img: customerImg,
|
32
|
|
- path: '/customer/customerlist/list',
|
33
|
|
- value: '2',
|
34
|
|
- },
|
35
|
|
- {
|
36
|
|
- title: '数据报表',
|
37
|
|
- img: reportImg,
|
38
|
|
- path: '/statistical/monitor',
|
39
|
|
- value: '3',
|
40
|
|
- },
|
41
|
|
-
|
42
|
|
- {
|
43
|
|
- title: '项目统计',
|
44
|
|
- img: projectImg,
|
45
|
|
- path: '/statistical/building',
|
46
|
|
- value: '4',
|
47
|
|
- },
|
48
|
|
- {
|
49
|
|
- title: '活动统计',
|
50
|
|
- img: statisticsImg,
|
51
|
|
- path: '/statistical/activity',
|
52
|
|
- value: '5',
|
53
|
|
- },
|
54
|
|
- {
|
55
|
|
- title: '置业顾问KPI',
|
56
|
|
- img: consultantImg,
|
57
|
|
- path: '/statistical/consultant',
|
58
|
|
- value: '6',
|
59
|
|
- },
|
60
|
|
-
|
61
|
|
- ]
|
62
|
|
- const goNow = (path) => {
|
63
|
|
- router.push({
|
64
|
|
- pathname: path,
|
65
|
|
- });
|
66
|
|
- }
|
67
|
|
-
|
68
|
|
-
|
69
|
|
-
|
70
|
|
- return (
|
71
|
|
- <>
|
72
|
|
- <div style={{
|
73
|
|
- width: 'calc(100% + 48px)',
|
74
|
|
- height: '0',
|
75
|
|
- paddingBottom: 'calc(29.64% + 14.23px)',
|
76
|
|
- position: 'relative',
|
77
|
|
- top: '-24px',
|
78
|
|
- left: '-24px',
|
79
|
|
- backgroundImage: 'url(https://njcj.oss-cn-shanghai.aliyuncs.com/images/picture.png)',
|
80
|
|
- backgroundRepeat: 'no-repeat',
|
81
|
|
- backgroundSize: '100% 100%',
|
82
|
|
- }} >
|
83
|
|
- </div>
|
84
|
|
- <div style={{
|
85
|
|
- backgroundColor: '#fff',
|
86
|
|
- margin: '-24px -24px 0.24rem -24px',
|
87
|
|
- paddingBottom: '0.2rem',
|
88
|
|
-
|
89
|
|
- }} >
|
90
|
|
- <h2 style={{
|
91
|
|
- fontSize: '0.11rem',
|
92
|
|
- padding: '0.2rem 0 16px 24px'
|
93
|
|
- }}>快捷入口</h2>
|
94
|
|
- <Row style={{ textAlign: 'center' }}>
|
95
|
|
- {list.map(item => (
|
96
|
|
- <Col span={4} key={item.value} onClick={() => goNow(item.path)}>
|
97
|
|
- <div style={{
|
98
|
|
- width: '1.2rem',
|
99
|
|
- height: '0px',
|
100
|
|
- margin: '0 auto',
|
101
|
|
- paddingBottom: '0.66rem',
|
102
|
|
- position: 'relative',
|
103
|
|
- backgroundImage: 'url(https://njcj.oss-cn-shanghai.aliyuncs.com/images/border.png)',
|
104
|
|
- backgroundRepeat: 'no-repeat',
|
105
|
|
- backgroundSize: '100% 100%',
|
106
|
|
- paddingTop: '0.12rem'
|
107
|
|
- }}>
|
108
|
|
- <p style={{ color: '#FF7F49', fontSize: '0.11rem', letterSpacing: '0.026rem', fontWeight: '600', }}>{item.title}</p>
|
109
|
|
- <img style={{ position: 'absolute', left: '0.08rem', bottom: '0.1rem', width: '0.3rem' }} src={item.img} alt="" />
|
110
|
|
- </div>
|
111
|
|
- </Col>
|
112
|
|
- ))}
|
113
|
|
-
|
114
|
|
-
|
115
|
|
-
|
116
|
|
- </Row>
|
117
|
|
-
|
118
|
|
- </div>
|
119
|
|
-
|
120
|
|
-
|
121
|
|
- </>
|
122
|
|
- )
|
123
|
|
-
|
124
|
|
-}
|
125
|
|
-export default index
|
126
|
|
-
|
|
1
|
+import React from 'react';
|
|
2
|
+import { Row, Col } from 'antd';
|
|
3
|
+import router from 'umi/router';
|
|
4
|
+import itemsImg from '@/assets/items.png';
|
|
5
|
+import consultantImg from '@/assets/consultantKPI.png';
|
|
6
|
+import projectImg from '@/assets/project.png';
|
|
7
|
+import reportImg from '@/assets/report.png';
|
|
8
|
+import customerImg from '@/assets/customer.png';
|
|
9
|
+import statisticsImg from '@/assets/statistics.png';
|
|
10
|
+
|
|
11
|
+export default () => {
|
|
12
|
+ const list = [
|
|
13
|
+ {
|
|
14
|
+ title: '项目列表',
|
|
15
|
+ img: itemsImg,
|
|
16
|
+ path: '/building/list',
|
|
17
|
+ value: '1',
|
|
18
|
+ },
|
|
19
|
+ {
|
|
20
|
+ title: '客户列表',
|
|
21
|
+ img: customerImg,
|
|
22
|
+ path: '/customer/customerlist/list',
|
|
23
|
+ value: '2',
|
|
24
|
+ },
|
|
25
|
+ {
|
|
26
|
+ title: '数据报表',
|
|
27
|
+ img: reportImg,
|
|
28
|
+ path: '/statistical/monitor',
|
|
29
|
+ value: '3',
|
|
30
|
+ },
|
|
31
|
+
|
|
32
|
+ {
|
|
33
|
+ title: '项目统计',
|
|
34
|
+ img: projectImg,
|
|
35
|
+ path: '/statistical/building',
|
|
36
|
+ value: '4',
|
|
37
|
+ },
|
|
38
|
+ {
|
|
39
|
+ title: '活动统计',
|
|
40
|
+ img: statisticsImg,
|
|
41
|
+ path: '/statistical/activity',
|
|
42
|
+ value: '5',
|
|
43
|
+ },
|
|
44
|
+ {
|
|
45
|
+ title: '置业顾问KPI',
|
|
46
|
+ img: consultantImg,
|
|
47
|
+ path: '/statistical/consultant',
|
|
48
|
+ value: '6',
|
|
49
|
+ },
|
|
50
|
+
|
|
51
|
+ ]
|
|
52
|
+ const goNow = path => {
|
|
53
|
+ router.push({
|
|
54
|
+ pathname: path,
|
|
55
|
+ });
|
|
56
|
+ }
|
|
57
|
+
|
|
58
|
+ return (
|
|
59
|
+ <>
|
|
60
|
+ <div style={{
|
|
61
|
+ width: 'calc(100% + 48px)',
|
|
62
|
+ height: '0',
|
|
63
|
+ paddingBottom: 'calc(29.64% + 14.23px)',
|
|
64
|
+ position: 'relative',
|
|
65
|
+ top: '-24px',
|
|
66
|
+ left: '-24px',
|
|
67
|
+ backgroundImage: 'url(https://njcj.oss-cn-shanghai.aliyuncs.com/images/picture.png)',
|
|
68
|
+ backgroundRepeat: 'no-repeat',
|
|
69
|
+ backgroundSize: '100% 100%',
|
|
70
|
+ }} >
|
|
71
|
+ </div>
|
|
72
|
+ <div style={{
|
|
73
|
+ backgroundColor: '#fff',
|
|
74
|
+ margin: '-24px -24px 0.24rem -24px',
|
|
75
|
+ paddingBottom: '0.2rem',
|
|
76
|
+
|
|
77
|
+ }} >
|
|
78
|
+ <h2 style={{
|
|
79
|
+ fontSize: '0.11rem',
|
|
80
|
+ padding: '0.2rem 0 16px 24px',
|
|
81
|
+ }}>快捷入口</h2>
|
|
82
|
+ <Row style={{ textAlign: 'center' }}>
|
|
83
|
+ {list.map(item => (
|
|
84
|
+ <Col span={4} key={item.value} onClick={() => goNow(item.path)}>
|
|
85
|
+ <div style={{
|
|
86
|
+ width: '1.2rem',
|
|
87
|
+ height: '0px',
|
|
88
|
+ margin: '0 auto',
|
|
89
|
+ paddingBottom: '0.66rem',
|
|
90
|
+ position: 'relative',
|
|
91
|
+ backgroundImage: 'url(https://njcj.oss-cn-shanghai.aliyuncs.com/images/border.png)',
|
|
92
|
+ backgroundRepeat: 'no-repeat',
|
|
93
|
+ backgroundSize: '100% 100%',
|
|
94
|
+ paddingTop: '0.12rem',
|
|
95
|
+ }}>
|
|
96
|
+ <p style={{ color: '#FF7F49', fontSize: '0.11rem', letterSpacing: '0.026rem', fontWeight: '600' }}>{item.title}</p>
|
|
97
|
+ <img style={{ position: 'absolute', left: '0.08rem', bottom: '0.1rem', width: '0.3rem' }} src={item.img} alt="" />
|
|
98
|
+ </div>
|
|
99
|
+ </Col>
|
|
100
|
+ ))}
|
|
101
|
+
|
|
102
|
+ </Row>
|
|
103
|
+ </div>
|
|
104
|
+ </>
|
|
105
|
+ )
|
|
106
|
+}
|