瀏覽代碼

change route"

张延森 5 年之前
父節點
當前提交
29417d1b4a

+ 38
- 34
config/routes.js 查看文件

@@ -36,30 +36,6 @@ export default [
36 36
           //   name: '首页',
37 37
           //   component: './Welcome',
38 38
           // },
39
-          {
40
-            path: '/indexEcharts',
41
-            name: '图表管理',
42
-            component: '../layouts/BlankLayout',
43
-            hideInMenu: true,
44
-            routes: [
45
-              {
46
-                path: '/indexEcharts/userSource',
47
-                name: '用户来源',
48
-                component: './indexEcharts/userSource',
49
-              },
50
-              {
51
-                path: '/indexEcharts/newUsers',
52
-                name: '新增用户',
53
-                component: './indexEcharts/newUsers',
54
-              },
55
-
56
-              {
57
-                path: '/indexEcharts/userBehavior',
58
-                name: '用户行为',
59
-                component: './indexEcharts/userBehavior',
60
-              },
61
-            ],
62
-          },
63 39
           {
64 40
             path: '/building',
65 41
             name: '项目管理',
@@ -561,14 +537,47 @@ export default [
561 537
             component: '../layouts/BlankLayout',
562 538
             routes: [
563 539
               {
564
-                path: '/statistical/building/index',
565
-                name: '项目统计',
566
-                component: './statistical/building/index',
540
+                path: '/statistical',
541
+                redirect: '/statistical/monitor',
542
+              },
543
+              {
544
+                path: '/statistical/monitor',
545
+                name: '数据报表',
546
+                component: './Monitor',
567 547
               },
568 548
               {
569
-                path: '/statistical/activity/index',
549
+                path: '/statistical/activity',
570 550
                 name: '活动统计',
571
-                component: './statistical/activity/index'
551
+                component: './statistical/activity'
552
+              },
553
+              {
554
+                path: '/statistical/building',
555
+                name: '项目统计',
556
+                component: './statistical/building',
557
+              },
558
+              {
559
+                path: '/statistical/consultant',
560
+                name: '置业顾问KPI',
561
+                component: './statistical/consultant',
562
+              },
563
+
564
+              {
565
+                path: '/statistical/userSource',
566
+                name: '用户来源',
567
+                component: './indexEcharts/userSource',
568
+                hideInMenu: true,
569
+              },
570
+              {
571
+                path: '/statistical/newUsers',
572
+                name: '新增用户',
573
+                component: './indexEcharts/newUsers',
574
+                hideInMenu: true,
575
+              },
576
+              {
577
+                path: '/statistical/userBehavior',
578
+                name: '用户行为',
579
+                component: './indexEcharts/userBehavior',
580
+                hideInMenu: true,
572 581
               },
573 582
               {
574 583
                 path: '/statistical/building/detail',
@@ -576,11 +585,6 @@ export default [
576 585
                 component: './statistical/building/detail',
577 586
                 hideInMenu: true,
578 587
               },
579
-              {
580
-                path: '/statistical/consultant/index',
581
-                name: '置业顾问KPI',
582
-                component: './statistical/consultant/index',
583
-              },
584 588
               {
585 589
                 path: '/statistical/consultant/table',
586 590
                 name: '拓客统计',

+ 1
- 1
src/layouts/BasicLayout.jsx 查看文件

@@ -39,7 +39,7 @@ const footerRender = () => {
39 39
 }
40 40
 const menuHeaderRender = (logo, title) => {
41 41
   return (
42
-    <Link to="/welcome">
42
+    <Link to="/index">
43 43
       {logo}
44 44
       {title}
45 45
     </Link>

src/pages/Welcome.jsx → src/pages/Monitor.jsx 查看文件

@@ -8,7 +8,7 @@ import router from 'umi/router';
8 8
 import request from '../utils/request';
9 9
 import apis from '../services/apis';
10 10
 
11
-const welcome = (props) => {
11
+const Monitor = props => {
12 12
 
13 13
   const [data, setData] = useState([])
14 14
 
@@ -59,7 +59,7 @@ const welcome = (props) => {
59 59
           </div>
60 60
         }
61 61
         {checkData.includes('number_of_new_users') &&
62
-          <div onClick={() => router.push('/indexEcharts/newUsers')} style={{
62
+          <div onClick={() => router.push('/statistical/newUsers')} style={{
63 63
             textAlign: 'center', display: 'flex', justifyContent: 'center', background: 'linear-gradient(137deg,rgba(107,130,230,1) 0%,rgba(152,175,251,1) 100%)', height: '100px',
64 64
             boxShadow: '0px  0.106rem 14px -15px rgba(107,130,230,1)',
65 65
             borderRadius: '12px', width: '32%',
@@ -75,5 +75,5 @@ const welcome = (props) => {
75 75
   )
76 76
 
77 77
 }
78
-export default welcome
78
+export default Monitor
79 79
 

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

@@ -92,7 +92,7 @@ const NewUsers = (props) => {
92 92
     <>
93 93
       <div>
94 94
         <div >
95
-          <p onClick={()=>router.push('/indexEcharts/newUsers')}><span style={{borderBottom:'1px solid #f02d40',cursor: 'pointer',fontSize:'0.12rem',fontWeight:'600'}}>新增用户</span> {!props.BuildSelectHide && <span style={{ fontSize: '0.09rem', color: '#888', marginLeft: '0.06rem' }}>最近七天</span>}</p>
95
+          <p onClick={()=>router.push('/statistical/newUsers')}><span style={{borderBottom:'1px solid #f02d40',cursor: 'pointer',fontSize:'0.12rem',fontWeight:'600'}}>新增用户</span> {!props.BuildSelectHide && <span style={{ fontSize: '0.09rem', color: '#888', marginLeft: '0.06rem' }}>最近七天</span>}</p>
96 96
        </div>
97 97
         <EChart options={options} style={piestyles}  />
98 98
       </div>

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

@@ -269,7 +269,7 @@ const UserBehavior = props => {
269 269
   return (
270 270
     <>
271 271
       <div>
272
-        <p onClick={() => router.push('/indexEcharts/userBehavior')} style={{cursor: 'pointer'}}>
272
+        <p onClick={() => router.push('/statistical/userBehavior')} style={{cursor: 'pointer'}}>
273 273
           <span style={{ borderBottom: '1px solid #f02d40', color: '#333', fontSize: '0.12rem', fontWeight: '600' }}>用户行为</span>
274 274
           {!props.BuildSelectHide && <span style={{ fontSize: '0.09rem', color: '#888', marginLeft: '0.06rem' }}>最近七天</span>}
275 275
         </p>

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

@@ -269,7 +269,7 @@ const UserBehaviorIndex = props => {
269 269
   return (
270 270
     <>
271 271
       <div>
272
-        {/* <p onClick={() => router.push('/indexEcharts/userBehavior')} style={{cursor: 'pointer'}}> */}
272
+        {/* <p onClick={() => router.push('/statistical/userBehavior')} style={{cursor: 'pointer'}}> */}
273 273
           <span style={{ borderBottom: '1px solid #f02d40', color: '#333', fontSize: '0.12rem', fontWeight: '600' }}>用户行为</span>
274 274
           {!props.BuildSelectHide && <span style={{ fontSize: '0.09rem', color: '#888', marginLeft: '0.06rem' }}>最近七天</span>}
275 275
         {/* </p> */}

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

@@ -112,7 +112,7 @@ const UserSource = (props) => {
112 112
   return (
113 113
     <>
114 114
       <div>
115
-      <p onClick={()=>router.push('/indexEcharts/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>
115
+      <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>
116 116
 
117 117
         <EChart options={baroptions} style={barstyle} />
118 118
 

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

@@ -126,7 +126,7 @@ const UserSourceDetail = (props) => {
126 126
   return (
127 127
     <>
128 128
       <div>
129
-      <p onClick={()=>router.push('/indexEcharts/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>
129
+      <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>
130 130
 
131 131
         <EChart options={baroptions} style={barstyle} />
132 132
 

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

@@ -32,7 +32,7 @@ const UserSource = (props) => {
32 32
 
33 33
   function toEdit() {
34 34
     router.push({
35
-      pathname: '/indexEcharts/userSource',
35
+      pathname: '/statistical/userSource',
36 36
     });
37 37
   }
38 38