瀏覽代碼

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

周立森 5 年之前
父節點
當前提交
ff5eeeb87a

+ 2
- 2
src/global.less 查看文件

108
   padding: 0;
108
   padding: 0;
109
 }
109
 }
110
 .antd-pro-pages-index-echarts-styles-pie,.antd-pro-pages-index-echarts-styles-bar{
110
 .antd-pro-pages-index-echarts-styles-pie,.antd-pro-pages-index-echarts-styles-bar{
111
-  padding: 26px;
112
-  margin-bottom: 25px;
111
+  padding: 40px;
112
+  margin-bottom: 40px;
113
 }
113
 }
114
 .ant-breadcrumb{
114
 .ant-breadcrumb{
115
   font-size: 0.1rem;
115
   font-size: 0.1rem;

+ 42
- 47
src/pages/Welcome.jsx 查看文件

7
 import request from '../utils/request';
7
 import request from '../utils/request';
8
 import apis from '../services/apis';
8
 import apis from '../services/apis';
9
 
9
 
10
-const header = props => {
10
+const welcome = (props) => {
11
 
11
 
12
- const [data, setData] = useState([])
12
+  const [data, setData] = useState([])
13
 
13
 
14
-useEffect(() => {
15
-  getIndexEcharts()
16
-}, [])
17
-
18
-function getIndexEcharts (params) {
19
-  request({
20
-    ...apis.indexEcharts.list,
21
-    params
22
-  }).then((data) => {
23
-   setData(data)
24
-    console.log(data, '11111')
25
-  })
26
-}
27
-  
14
+  useEffect(() => {
15
+    getIndexEcharts()
16
+  }, [])
28
 
17
 
18
+  function getIndexEcharts(params) {
19
+    request({
20
+      ...apis.indexEcharts.list,
21
+      params
22
+    }).then((data) => {
23
+      setData(data)
24
+      console.log(data, '11111')
25
+    })
26
+  }
29
   return (
27
   return (
30
     <>
28
     <>
31
-       <div style={{ display: 'flex',marginBottom:'28px' }}>
32
-           <div style={{
33
-            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',
34
-            boxShadow: '0px  0.11rem 14px -15px rgba(241,43,62,1)',
35
-            borderRadius: '12px', width: '32%', marginRight: '2%'
36
-          }}>
37
-            <span style={{ fontSize: '24px', color: '#fff' }}>总用户 </span>
38
-            <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{data.selectUserCount}</span>
39
-          </div>
40
-          <div style={{
41
-            textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: 'linear-gradient(144deg,rgba(255,126,74,1) 0%,rgba(255,196,168,1) 100%)', height: '100px',
42
-            boxShadow: '0px  0.11rem 14px -15px rgba(255,126,74,1)',
43
-            borderRadius: '12px', width: '32%', marginRight: '2%'
44
-          }}>
45
-            <span style={{ fontSize: '24px', color: '#fff' }}>总注册用户 </span>
46
-            <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{data.selectRegisteredCount}</span>
47
-          </div>
48
-          <div onClick={()=>router.push('/indexEcharts/newUsers')} style={{
49
-            textAlign: 'center', display: 'flex', justifyContent: 'center', background: 'linear-gradient(137deg,rgba(107,130,230,1) 0%,rgba(152,175,251,1) 100%)', height: '100px',
50
-            boxShadow: '0px  0.11rem 14px -15px rgba(107,130,230,1)',
51
-            borderRadius: '12px', width: '32%',
52
-          }}>
53
-            <span style={{ fontSize: '24px', color: '#fff',borderBottom:'1px solid #fff',margin:'30px 0' }}>最近7天新增 </span>
54
-            <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy', lineHeight: '100px' }}>{data.selectRecentlyCount}</span>
55
-          </div>
29
+      <div style={{ display: 'flex', marginBottom: '33px' }}>
30
+        <div style={{
31
+          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',
32
+          boxShadow: '0px  0.11rem 14px -15px rgba(241,43,62,1)',
33
+          borderRadius: '12px', width: '32%', marginRight: '2%'
34
+        }}>
35
+          <span style={{ fontSize: '24px', color: '#fff' }}>总用户 </span>
36
+          <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{data.selectUserCount || '0'}</span>
37
+        </div>
38
+        <div style={{
39
+          textAlign: 'center', display: 'flex', justifyContent: 'center', lineHeight: '100px', background: 'linear-gradient(144deg,rgba(255,126,74,1) 0%,rgba(255,196,168,1) 100%)', height: '100px',
40
+          boxShadow: '0px  0.11rem 14px -15px rgba(255,126,74,1)',
41
+          borderRadius: '12px', width: '32%', marginRight: '2%'
42
+        }}>
43
+          <span style={{ fontSize: '24px', color: '#fff' }}>总注册用户 </span>
44
+          <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy' }}>{data.selectRegisteredCount || '0'}</span>
45
+        </div>
46
+        <div onClick={() => router.push('/indexEcharts/newUsers')} style={{
47
+          textAlign: 'center', display: 'flex', justifyContent: 'center', background: 'linear-gradient(137deg,rgba(107,130,230,1) 0%,rgba(152,175,251,1) 100%)', height: '100px',
48
+          boxShadow: '0px  0.11rem 14px -15px rgba(107,130,230,1)',
49
+          borderRadius: '12px', width: '32%',
50
+        }}>
51
+          <span style={{ fontSize: '24px', color: '#fff', borderBottom: '1px solid #fff', margin: '30px 0' }}>最近7天新增 </span>
52
+          <span style={{ fontSize: '52px', color: '#fff', marginLeft: '26px', fontFamily: 'fantasy', lineHeight: '100px' }}>{data.selectRecentlyCount || '0'}</span>
56
         </div>
53
         </div>
57
-        <IndexEcharts style={{ width: '100%'}} onReData={(e) => redata(e)} ></IndexEcharts>
58
-    
59
-        {/* <EchartsTest style={{ width: 500, height: 500 }}></EchartsTest> */}
60
-    
61
-      </>
54
+      </div>
55
+      <IndexEcharts style={{ width: '100%' }} onReData={(e) => redata(e)} ></IndexEcharts>
56
+    </>
62
   )
57
   )
63
 
58
 
64
 }
59
 }
60
+export default welcome
65
 
61
 
66
-export default  header

+ 3
- 3
src/pages/charts/CityNums.jsx 查看文件

6
   backgroundColor: '#fff',
6
   backgroundColor: '#fff',
7
   title: {
7
   title: {
8
     text: '城市分布',
8
     text: '城市分布',
9
-    left: 20,
10
-    top: 20
9
+    left: 40,
10
+    top: 40
11
   },
11
   },
12
   tooltip : {
12
   tooltip : {
13
       trigger: 'item',
13
       trigger: 'item',
128
   }
128
   }
129
 
129
 
130
   return (
130
   return (
131
-    <div style={{ margin: ' 0 0 20px  0', width: '100%', borderRadius: '12px', boxShadow: '0px 0px 9px 1px rgba(0,0,0,0.12)', overflow: 'hidden' }}>
131
+    <div style={{ marginBottom:'40px', width: '100%', borderRadius: '12px', boxShadow: '0px 0px 9px 1px rgba(0,0,0,0.12)', overflow: 'hidden' }}>
132
       <Echart options={options} style={{ width: '100%', height: '600px' }} ></Echart>
132
       <Echart options={options} style={{ width: '100%', height: '600px' }} ></Echart>
133
     </div>
133
     </div>
134
   )
134
   )

+ 1
- 1
src/pages/indexEcharts/components/UserSourcepie.jsx 查看文件

54
     series: [
54
     series: [
55
       {
55
       {
56
         type: 'pie',
56
         type: 'pie',
57
-        center: ['44%', '65%'],
57
+        center: ['40%', '65%'],
58
         radius: ['34%', '52%'],
58
         radius: ['34%', '52%'],
59
       },
59
       },
60
     ],
60
     ],

+ 3
- 3
src/pages/indexEcharts/styles.less 查看文件

23
   background: rgba(255, 255, 255, 1);
23
   background: rgba(255, 255, 255, 1);
24
   box-shadow: 0px 0px 16px 2px rgba(0, 0, 0, 0.12);
24
   box-shadow: 0px 0px 16px 2px rgba(0, 0, 0, 0.12);
25
   border-radius: 12px;
25
   border-radius: 12px;
26
-  margin-bottom: 25px;
27
-  padding: 26px;
26
+  margin-bottom: 40px;
27
+  padding: 40px;
28
 }
28
 }
29
 
29
 
30
 .customers {
30
 .customers {
33
   background: rgba(255, 255, 255, 1);
33
   background: rgba(255, 255, 255, 1);
34
   box-shadow: 0px 0px 16px 2px rgba(0, 0, 0, 0.12);
34
   box-shadow: 0px 0px 16px 2px rgba(0, 0, 0, 0.12);
35
   border-radius: 12px 12px 0px 0px;
35
   border-radius: 12px 12px 0px 0px;
36
-  padding: 26px;
36
+  padding: 40px;
37
 }
37
 }

+ 1
- 7
src/pages/indexEcharts/userBehavior.jsx 查看文件

157
   const dataSource = []
157
   const dataSource = []
158
 
158
 
159
   return (<>
159
   return (<>
160
-    <div style={{
161
-      backgroundColor: '#fff',
162
-      padding: '32PX 28px',
163
-      boxShadow: '0px 0px 16px 2px rgba(0,0,0,0.12)',
164
-      borderRadius: '12px',
165
-      minHeight: '60vh'
166
-    }}>
160
+    <div>
167
       <div>
161
       <div>
168
         <Radio.Group buttonStyle="solid" defaultValue="a">
162
         <Radio.Group buttonStyle="solid" defaultValue="a">
169
           <Radio.Button value="a" onClick={getDataOf(7)}>最近7天</Radio.Button>
163
           <Radio.Button value="a" onClick={getDataOf(7)}>最近7天</Radio.Button>