Browse Source

Merge branch 'master' of http://git.ycjcjy.com/nanyang/machinery-admin

李志伟 3 years ago
parent
commit
80def21f80

+ 11
- 0
src/components/ScreenBox/ScreenHeader/index.jsx View File

1
+import Styles from './style.less';
2
+
3
+export default () => {
4
+  return (
5
+    <div className={Styles['screen-header-box']}>
6
+      <div className={Styles['screen-header-left']}></div>
7
+      <div className={Styles['screen-header-content']}></div>
8
+      <div className={Styles['screen-header-right']}></div>
9
+    </div>
10
+  );
11
+};

+ 12
- 0
src/components/ScreenBox/ScreenHeader/style.less View File

1
+.screen-header-box {
2
+  display: flex;
3
+
4
+  .screen-header-left,
5
+  .screen-header-right {
6
+    flex: 1;
7
+  }
8
+
9
+  .screen-header-content {
10
+    flex: 6;
11
+  }
12
+}

+ 2
- 2
src/components/ScreenBox/SquareBox/index.jsx View File

5
 
5
 
6
 
6
 
7
   return (
7
   return (
8
-    <div className="win">
8
+    <div className="SquareBox-box">
9
       <div className="border_corner border_corner_left_top" />
9
       <div className="border_corner border_corner_left_top" />
10
       <div className="border_corner border_corner_right_top" />
10
       <div className="border_corner border_corner_right_top" />
11
       <div className="border_corner border_corner_left_bottom" />
11
       <div className="border_corner border_corner_left_bottom" />
12
       <div className="border_corner border_corner_right_bottom" />
12
       <div className="border_corner border_corner_right_bottom" />
13
       {/* 内容 */}
13
       {/* 内容 */}
14
-      <div className="main">
14
+      <div className="SquareBox-body">
15
         {props.children}
15
         {props.children}
16
       </div>
16
       </div>
17
     </div>
17
     </div>

+ 4
- 6
src/components/ScreenBox/SquareBox/style.less View File

1
-.win {
1
+.SquareBox-box {
2
   position: relative;
2
   position: relative;
3
-  display: inline-block;
4
-  margin: 20px;
5
 }
3
 }
6
-.main {
4
+.SquareBox-body {
5
+  padding: 20px;
7
   color: #fff;
6
   color: #fff;
8
-  border: 1px solid rgba(61, 129, 240, 0.5);
9
-  border-radius: 4px;
7
+  border: 2px solid rgba(61, 129, 240, 0.5);
10
 }
8
 }
11
 .border_corner {
9
 .border_corner {
12
   position: absolute;
10
   position: absolute;

+ 2
- 2
src/components/ScreenBox/TitleBox/index.jsx View File

6
   const { value } = props
6
   const { value } = props
7
   return (
7
   return (
8
     <div className='TitleBox'>
8
     <div className='TitleBox'>
9
-      <div className='TitleBox-ListBox' />
10
-      <span>{value}</span>
9
+      <span className='TitleBox-ListBox' />
10
+      <span className='TitleBox-ListBox-value'>{value}</span>
11
     </div>
11
     </div>
12
   )
12
   )
13
 }
13
 }

+ 5
- 4
src/components/ScreenBox/TitleBox/style.less View File

1
 .TitleBox {
1
 .TitleBox {
2
-  display: flex;
2
+  // width: 163px;
3
+  display: inline-block;
3
   align-items: center;
4
   align-items: center;
4
-  width: 163px;
5
-  padding: 11px 9px 9px 11px;
5
+  padding: 11px 11px 9px 11px;
6
   border-radius: 4px;
6
   border-radius: 4px;
7
   box-shadow: 0px 0px 10px 0px #3d81f0 inset;
7
   box-shadow: 0px 0px 10px 0px #3d81f0 inset;
8
 
8
 
9
   .TitleBox-ListBox {
9
   .TitleBox-ListBox {
10
+    display: inline-block;
10
     width: 13px;
11
     width: 13px;
11
     height: 13px;
12
     height: 13px;
12
     margin-right: 10px;
13
     margin-right: 10px;
13
     background: linear-gradient(0deg, #0c49c6, #3bd6e8);
14
     background: linear-gradient(0deg, #0c49c6, #3bd6e8);
14
   }
15
   }
15
-  > span {
16
+  .TitleBox-ListBox-value {
16
     color: transparent;
17
     color: transparent;
17
     font-weight: 800;
18
     font-weight: 800;
18
     font-size: 17px;
19
     font-size: 17px;

+ 45
- 0
src/pages/MonitoringScreen/DateCommponets.jsx View File

1
+
2
+
3
+
4
+import SquareBox from '@/components/ScreenBox/SquareBox'
5
+import TitleBox from '@/components/ScreenBox/TitleBox'
6
+import { Bar } from '@ant-design/plots';
7
+// import ba from './a.png'
8
+
9
+export default (props) => {
10
+
11
+  const data = [
12
+    {
13
+      year: '收割机',
14
+      value: 200,
15
+    },
16
+    {
17
+      year: '播种机',
18
+      value: 150,
19
+    },
20
+    {
21
+      year: '农药机',
22
+      value: 50,
23
+    },
24
+  ];
25
+  const config = {
26
+    data,
27
+    xField: 'value',
28
+    yField: 'year',
29
+    seriesField: 'year',
30
+
31
+    legend: {
32
+      position: 'top-left',
33
+    },
34
+    color: [' #FB9900', '#23E8AE', '#E63404'],
35
+  };
36
+
37
+  return (
38
+    <div  >
39
+      <TitleBox value='农机类型统计' />
40
+      <SquareBox>
41
+        <Bar  {...config} />
42
+      </SquareBox>
43
+    </div>
44
+  )
45
+}

+ 15
- 4
src/pages/MonitoringScreen/index.jsx View File

6
 import { FullscreenOutlined } from '@ant-design/icons';
6
 import { FullscreenOutlined } from '@ant-design/icons';
7
 import { Button } from 'antd';
7
 import { Button } from 'antd';
8
 import { useFullScreen } from './hook';
8
 import { useFullScreen } from './hook';
9
+import DateCommponets from './DateCommponets';
9
 import Styles from './style.less';
10
 import Styles from './style.less';
11
+import SquareBox from '@/components/ScreenBox/SquareBox';
12
+import ScreenHeader from '@/components/ScreenBox/ScreenHeader';
10
 
13
 
11
 export default (props) => {
14
 export default (props) => {
12
   const { style, isFullScreen, onFullScreen } = useFullScreen();
15
   const { style, isFullScreen, onFullScreen } = useFullScreen();
24
         style={style}
27
         style={style}
25
       >
28
       >
26
         <div className={Styles['grail-layout']}>
29
         <div className={Styles['grail-layout']}>
27
-          <div className={Styles['grail-header']}></div>
30
+          <div className={Styles['grail-header']}>
31
+            <ScreenHeader weather="多云 21-28 °C" />
32
+          </div>
28
           <div className={Styles['grail-container']}>
33
           <div className={Styles['grail-container']}>
29
-            <div className={Styles['grail-left']}></div>
30
-            <div className={Styles['grail-content']}></div>
31
-            <div className={Styles['grail-right']}></div>
34
+            <div className={Styles['grail-left']}>
35
+              <SquareBox>asdfasdf</SquareBox>
36
+            </div>
37
+            <div className={Styles['grail-content']}>
38
+              <DateCommponets />
39
+            </div>
40
+            <div className={Styles['grail-right']}>
41
+              <SquareBox>asdfasdf</SquareBox>
42
+            </div>
32
           </div>
43
           </div>
33
           <div className={Styles['grail-footer']}></div>
44
           <div className={Styles['grail-footer']}></div>
34
         </div>
45
         </div>

+ 2
- 49
src/pages/SystemManagement/UserRights/index.jsx View File

1
 
1
 
2
-
3
-
4
-import SquareBox from '@/components/ScreenBox/SquareBox'
5
-import TitleBox from '@/components/ScreenBox/TitleBox'
6
-import { Bar } from '@ant-design/plots';
7
-// import ba from './a.png'
8
-
9
 export default (props) => {
2
 export default (props) => {
10
 
3
 
11
-
12
-  const style = {
13
-    bgd: {
14
-      color: 'rgba(0,0,0,.25)',
15
-      height: '100vh',
16
-      // backgroundImage: `url(${ba})`,
17
-      backgroundSize: '100%,100%',
18
-      padding: '5em 10em'
19
-    }
20
-  }
21
-  const data = [
22
-    {
23
-      year: '收割机',
24
-      value: 200,
25
-    },
26
-    {
27
-      year: '播种机',
28
-      value: 150,
29
-    },
30
-    {
31
-      year: '农药机',
32
-      value: 50,
33
-    },
34
-  ];
35
-  const config = {
36
-    data,
37
-    xField: 'value',
38
-    yField: 'year',
39
-    seriesField: 'year',
40
-    legend: {
41
-      position: 'top-left',
42
-    },
43
-    color: [' #FB9900', '#23E8AE', '#E63404'],
44
-  };
45
-
46
   return (
4
   return (
47
-    <div style={style.bgd} >
48
-      <TitleBox value='农机类型统计' />
49
-      <SquareBox>
50
-        <Bar  {...config} />
51
-      </SquareBox>
52
-    </div>
5
+    <div>角色权限</div>
53
   )
6
   )
54
-}
7
+}