ソースを参照

change route"

张延森 5 年 前
コミット
29417d1b4a

+ 38
- 34
config/routes.js ファイルの表示

36
           //   name: '首页',
36
           //   name: '首页',
37
           //   component: './Welcome',
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
             path: '/building',
40
             path: '/building',
65
             name: '项目管理',
41
             name: '项目管理',
561
             component: '../layouts/BlankLayout',
537
             component: '../layouts/BlankLayout',
562
             routes: [
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
                 name: '活动统计',
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
                 path: '/statistical/building/detail',
583
                 path: '/statistical/building/detail',
576
                 component: './statistical/building/detail',
585
                 component: './statistical/building/detail',
577
                 hideInMenu: true,
586
                 hideInMenu: true,
578
               },
587
               },
579
-              {
580
-                path: '/statistical/consultant/index',
581
-                name: '置业顾问KPI',
582
-                component: './statistical/consultant/index',
583
-              },
584
               {
588
               {
585
                 path: '/statistical/consultant/table',
589
                 path: '/statistical/consultant/table',
586
                 name: '拓客统计',
590
                 name: '拓客统计',

+ 1
- 1
src/layouts/BasicLayout.jsx ファイルの表示

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

src/pages/Welcome.jsx → src/pages/Monitor.jsx ファイルの表示

8
 import request from '../utils/request';
8
 import request from '../utils/request';
9
 import apis from '../services/apis';
9
 import apis from '../services/apis';
10
 
10
 
11
-const welcome = (props) => {
11
+const Monitor = props => {
12
 
12
 
13
   const [data, setData] = useState([])
13
   const [data, setData] = useState([])
14
 
14
 
59
           </div>
59
           </div>
60
         }
60
         }
61
         {checkData.includes('number_of_new_users') &&
61
         {checkData.includes('number_of_new_users') &&
62
-          <div onClick={() => router.push('/indexEcharts/newUsers')} style={{
62
+          <div onClick={() => router.push('/statistical/newUsers')} style={{
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',
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
             boxShadow: '0px  0.106rem 14px -15px rgba(107,130,230,1)',
64
             boxShadow: '0px  0.106rem 14px -15px rgba(107,130,230,1)',
65
             borderRadius: '12px', width: '32%',
65
             borderRadius: '12px', width: '32%',
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
     <>
92
     <>
93
       <div>
93
       <div>
94
         <div >
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
        </div>
96
        </div>
97
         <EChart options={options} style={piestyles}  />
97
         <EChart options={options} style={piestyles}  />
98
       </div>
98
       </div>

+ 1
- 1
src/pages/indexEcharts/components/UserBehavior.jsx ファイルの表示

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

+ 1
- 1
src/pages/indexEcharts/components/UserBehaviorIndex.jsx ファイルの表示

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

+ 1
- 1
src/pages/indexEcharts/components/UserSource.jsx ファイルの表示

112
   return (
112
   return (
113
     <>
113
     <>
114
       <div>
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
         <EChart options={baroptions} style={barstyle} />
117
         <EChart options={baroptions} style={barstyle} />
118
 
118
 

+ 1
- 1
src/pages/indexEcharts/components/UserSourceDetail.jsx ファイルの表示

126
   return (
126
   return (
127
     <>
127
     <>
128
       <div>
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
         <EChart options={baroptions} style={barstyle} />
131
         <EChart options={baroptions} style={barstyle} />
132
 
132
 

+ 1
- 1
src/pages/indexEcharts/components/UserSourcepie.jsx ファイルの表示

32
 
32
 
33
   function toEdit() {
33
   function toEdit() {
34
     router.push({
34
     router.push({
35
-      pathname: '/indexEcharts/userSource',
35
+      pathname: '/statistical/userSource',
36
     });
36
     });
37
   }
37
   }
38
 
38