Bladeren bron

feat: adminLayout样式逻辑调整

touchitvoid 3 jaren geleden
bovenliggende
commit
cc35963305
56 gewijzigde bestanden met toevoegingen van 232 en 165 verwijderingen
  1. 5 0
      .idea/.gitignore
  2. 8 0
      .idea/modules.xml
  3. 12 0
      .idea/site-front-dev.iml
  4. 6 0
      .idea/vcs.xml
  5. 0 2
      dist/assest/css/26.e27502eb.chunk.css
  6. 0 0
      dist/assest/css/268.dab18d96.chunk.css
  7. 0 0
      dist/assest/css/5.d899072f.chunk.css
  8. 0 2
      dist/assest/css/521.736b0a02.chunk.css
  9. 0 0
      dist/assest/css/527.872f898e.chunk.css
  10. 0 2
      dist/assest/css/55.055d369d.chunk.css
  11. 0 2
      dist/assest/css/607.7677fc48.chunk.css
  12. 0 2
      dist/assest/css/69.7e8cff8f.chunk.css
  13. 0 0
      dist/assest/css/746.fae09edd.chunk.css
  14. 0 0
      dist/assest/css/843.0e413b0d.chunk.css
  15. 0 0
      dist/assest/css/main.3bcd62e0.css
  16. 0 0
      dist/assest/js/101.bc80ede1.chunk.js
  17. 0 0
      dist/assest/js/123.8b3e5144.chunk.js
  18. 0 0
      dist/assest/js/26.6e155402.chunk.js
  19. 0 0
      dist/assest/js/268.d5fe69ec.chunk.js
  20. 0 0
      dist/assest/js/269.3bdcc66d.chunk.js
  21. 0 0
      dist/assest/js/383.77743c17.chunk.js
  22. 0 0
      dist/assest/js/50.a69cbbbf.chunk.js
  23. 0 1
      dist/assest/js/505.750c6f27.chunk.js
  24. 0 0
      dist/assest/js/51.815561aa.chunk.js
  25. 0 0
      dist/assest/js/527.250a3f42.chunk.js
  26. 0 0
      dist/assest/js/587.c1ad3408.chunk.js
  27. 0 0
      dist/assest/js/588.0768c595.chunk.js
  28. 0 0
      dist/assest/js/607.5145f6ae.chunk.js
  29. 0 0
      dist/assest/js/613.ef774b73.chunk.js
  30. 0 0
      dist/assest/js/764.e46df141.chunk.js
  31. 0 0
      dist/assest/js/798.db433720.chunk.js
  32. BIN
      dist/assest/media/imgs/aqi-chart-bg.7723427d.png
  33. BIN
      dist/assest/media/imgs/attendance-today.6633eb9b.png
  34. BIN
      dist/assest/media/imgs/bg.2982f490.png
  35. BIN
      dist/assest/media/imgs/device-info-bg.3c4e0a2f.png
  36. BIN
      dist/assest/media/imgs/floor-plan-bg.eecc99c6.png
  37. BIN
      dist/assest/media/imgs/header-bg.7ddf065a.png
  38. BIN
      dist/assest/media/imgs/login-box-bg.c099ec15.png
  39. BIN
      dist/assest/media/imgs/logo.e927513b.png
  40. BIN
      dist/assest/media/imgs/no-floor-plan.93b010ed.png
  41. BIN
      dist/assest/media/imgs/process-time-bg.109fc280.png
  42. BIN
      dist/assest/media/imgs/real-person-total.1c7a647f.png
  43. BIN
      dist/assest/media/imgs/video-icon.6178eab8.png
  44. 0 1
      dist/index.html
  45. 38 47
      src/config/menuConfig.tsx
  46. 59 53
      src/hooks/iot.ts
  47. 15 7
      src/layout/adminLayout/index.scss
  48. 54 36
      src/layout/adminLayout/index.tsx
  49. 0 0
      src/layout/adminLayout/static/blue-bg.png
  50. 18 0
      src/pages/hard/index.scss
  51. 10 4
      src/pages/hard/index.tsx
  52. BIN
      src/pages/hard/static/head-mast-arrow.png
  53. BIN
      src/pages/hard/static/head-mast-component.png
  54. BIN
      src/pages/hard/static/head-mast.png
  55. 2 1
      src/pages/person/index.tsx
  56. 5 5
      src/router/config.tsx

+ 5 - 0
.idea/.gitignore

@@ -0,0 +1,5 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/site-front-dev.iml" filepath="$PROJECT_DIR$/.idea/site-front-dev.iml" />
+    </modules>
+  </component>
+</project>

+ 12 - 0
.idea/site-front-dev.iml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$">
+      <excludeFolder url="file://$MODULE_DIR$/temp" />
+      <excludeFolder url="file://$MODULE_DIR$/.tmp" />
+      <excludeFolder url="file://$MODULE_DIR$/tmp" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

File diff suppressed because it is too large
+ 0 - 2
dist/assest/css/26.e27502eb.chunk.css


File diff suppressed because it is too large
+ 0 - 0
dist/assest/css/268.dab18d96.chunk.css


File diff suppressed because it is too large
+ 0 - 0
dist/assest/css/5.d899072f.chunk.css


+ 0 - 2
dist/assest/css/521.736b0a02.chunk.css

@@ -1,2 +0,0 @@
-.admin-layout{width:100%;min-height:100vh;display:flex}.admin-layout .admin-header{display:flex;justify-content:space-between;align-items:center;padding:0px 1.11111rem;background-color:#0085ae;color:#ffffff}.admin-layout .admin-header .admin-logo{color:inherit;font-size:1.77778rem}.admin-layout .admin-sider{min-height:100vh;background-color:#0085ae}.admin-layout .admin-sider .ant-menu{color:#ffffff;background-color:inherit}.admin-layout .admin-sider .ant-menu .ant-menu-submenu-title{color:#ffffff;background-color:#0090bc;margin:0;line-height:2.44444rem;height:2.44444rem}.admin-layout .admin-sider .ant-menu .ant-menu-submenu-title .ant-menu-submenu-arrow{color:inherit}.admin-layout .admin-sider .ant-layout-sider-trigger{background-color:inherit}
-

File diff suppressed because it is too large
+ 0 - 0
dist/assest/css/527.872f898e.chunk.css


File diff suppressed because it is too large
+ 0 - 2
dist/assest/css/55.055d369d.chunk.css


File diff suppressed because it is too large
+ 0 - 2
dist/assest/css/607.7677fc48.chunk.css


+ 0 - 2
dist/assest/css/69.7e8cff8f.chunk.css

@@ -1,2 +0,0 @@
-.project-wrappaer{background-color:#ffffff}
-

File diff suppressed because it is too large
+ 0 - 0
dist/assest/css/746.fae09edd.chunk.css


File diff suppressed because it is too large
+ 0 - 0
dist/assest/css/843.0e413b0d.chunk.css


File diff suppressed because it is too large
+ 0 - 0
dist/assest/css/main.3bcd62e0.css


File diff suppressed because it is too large
+ 0 - 0
dist/assest/js/101.bc80ede1.chunk.js


File diff suppressed because it is too large
+ 0 - 0
dist/assest/js/123.8b3e5144.chunk.js


File diff suppressed because it is too large
+ 0 - 0
dist/assest/js/26.6e155402.chunk.js


File diff suppressed because it is too large
+ 0 - 0
dist/assest/js/268.d5fe69ec.chunk.js


File diff suppressed because it is too large
+ 0 - 0
dist/assest/js/269.3bdcc66d.chunk.js


File diff suppressed because it is too large
+ 0 - 0
dist/assest/js/383.77743c17.chunk.js


File diff suppressed because it is too large
+ 0 - 0
dist/assest/js/50.a69cbbbf.chunk.js


+ 0 - 1
dist/assest/js/505.750c6f27.chunk.js

@@ -1 +0,0 @@
-(self.webpackChunksite_front=self.webpackChunksite_front||[]).push([[505],{91505:function(t,e,r){"use strict";r.r(e);var n=r(67294),o=r(80993),i=r(46802);function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}e.default=function(t){var e,r,l=t.history,s=(e=(0,o.f4)(),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,l=t[Symbol.iterator]();!(n=(a=l.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==l.return||l.return()}finally{if(o)throw i}}return r}}(e,r)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=(s[0],s[1]);return n.useEffect((function(){var t=location.search,e="";if(t.split("?").length>0)for(var r=0;r<t.split("?")[1].split("&").length;r++){var n=t.split("?")[1].split("&")[r].split("=");if("token"===n[0]&&n[1]){e=n[1];break}}u({user:"",password:"",rember_password:!1},{token:e}).then((function(t){i.Z.setItem("uid",t.uid),i.Z.setItem("token",t.token),i.Z.setItem("username",t.username),i.Z.setItem("refresh_token",t.refresh_token),l.push("/")})).catch((function(){localStorage.clear(),location.href="/login"}))}),[]),null}}}]);

File diff suppressed because it is too large
+ 0 - 0
dist/assest/js/51.815561aa.chunk.js


File diff suppressed because it is too large
+ 0 - 0
dist/assest/js/527.250a3f42.chunk.js


File diff suppressed because it is too large
+ 0 - 0
dist/assest/js/587.c1ad3408.chunk.js


File diff suppressed because it is too large
+ 0 - 0
dist/assest/js/588.0768c595.chunk.js


File diff suppressed because it is too large
+ 0 - 0
dist/assest/js/607.5145f6ae.chunk.js


File diff suppressed because it is too large
+ 0 - 0
dist/assest/js/613.ef774b73.chunk.js


File diff suppressed because it is too large
+ 0 - 0
dist/assest/js/764.e46df141.chunk.js


File diff suppressed because it is too large
+ 0 - 0
dist/assest/js/798.db433720.chunk.js


BIN
dist/assest/media/imgs/aqi-chart-bg.7723427d.png


BIN
dist/assest/media/imgs/attendance-today.6633eb9b.png


BIN
dist/assest/media/imgs/bg.2982f490.png


BIN
dist/assest/media/imgs/device-info-bg.3c4e0a2f.png


BIN
dist/assest/media/imgs/floor-plan-bg.eecc99c6.png


BIN
dist/assest/media/imgs/header-bg.7ddf065a.png


BIN
dist/assest/media/imgs/login-box-bg.c099ec15.png


BIN
dist/assest/media/imgs/logo.e927513b.png


BIN
dist/assest/media/imgs/no-floor-plan.93b010ed.png


BIN
dist/assest/media/imgs/process-time-bg.109fc280.png


BIN
dist/assest/media/imgs/real-person-total.1c7a647f.png


BIN
dist/assest/media/imgs/video-icon.6178eab8.png


+ 0 - 1
dist/index.html

@@ -1 +0,0 @@
-<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="author" content="RichardSpace369"/><meta name="description" content="工地前台项目"/><title></title><link href="/assest/css/vendors.ffb7b485.css" rel="stylesheet"><link href="/assest/css/main.3bcd62e0.css" rel="stylesheet"></head><body><div id="root"></div><script src="/assest/js/runtime~main.fa4d818c.js"></script><script src="/assest/js/vendors.10f0b134.js"></script><script src="/assest/js/main.3809d94a.js"></script></body></html>

File diff suppressed because it is too large
+ 38 - 47
src/config/menuConfig.tsx


+ 59 - 53
src/hooks/iot.ts

@@ -1,71 +1,77 @@
-import {useState,useEffect} from 'react'
+import {useState, useEffect} from 'react'
 import Request from "../utils/request"
+
 interface IotCopumns {
-    id:number
-    type_code:number
-    type_name:string
+  id: number
+  type_code: number
+  type_name: string
 }
+
 /**
  * @description 获取IOT 设备类型列表
  */
-export const useIotList=()=>{
-    const [state,setState]=useState<{loading:boolean;dataSource:IotCopumns[]}>({loading:false,dataSource:[]})
-    const request=()=>{
-        Request.sendRequest({
-            url:'/v1/iot/type_list'
-        }).then((data:any)=>{
-            setState(preState=>({...preState,loading:false,dataSource:data.list}))
-        }).catch(error=>{
-            setState(preState=>({...preState,loading:false}))
-        })
-    }
-    return {state,request} as const
+export const useIotList = () => {
+  const [state, setState] = useState<{ loading: boolean; dataSource: IotCopumns[] }>({loading: false, dataSource: []})
+  const request = () => {
+    Request.sendRequest({
+      url: '/v1/iot/type_list'
+    }).then((data: any) => {
+      setState(preState => ({...preState, loading: false, dataSource: data.list}))
+    }).catch(error => {
+      setState(preState => ({...preState, loading: false}))
+    })
+  }
+  return {state, request} as const
 }
 /**
  * @description 获取验Iot 设备列表
  */
-export const useDeviceList=()=>{
-    const [state,setState]=useState<{
-        loading:boolean;
-        dataSource:IotCopumns[];
-        online:number;
-        offline:number;
-        total:number}>({loading:false,dataSource:[],online:0,offline:0,total:0})
-    const request=(params:{page:number,page_size:number;device_code :number})=>{
-        Request.sendRequest({
-            url:'/v1/iot/list',
-            params
-        }).then((data:any)=>{
-            setState(preState=>({...preState,loading:false,...data,dataSource:data.list}))
-        }).catch(error=>{
-            setState(preState=>({...preState,loading:false}))
-        })
-    }
-    return {state,request} as const
+export const useDeviceList = () => {
+  const [state, setState] = useState<{
+    loading: boolean;
+    dataSource: IotCopumns[];
+    online: number;
+    offline: number;
+    total: number
+  }>({loading: false, dataSource: [], online: 0, offline: 0, total: 0})
+  const request = (params: { page: number, page_size: number; device_code: number }) => {
+    Request.sendRequest({
+      url: '/v1/iot/list',
+      params
+    }).then((data: any) => {
+      setState(preState => ({...preState, loading: false, ...data, dataSource: data.list}))
+    }).catch(error => {
+      setState(preState => ({...preState, loading: false}))
+    })
+  }
+  return {state, request} as const
 }
+
 interface IotLastInfoRecord {
-    name:string;
-    unit:string;
-    value:string;
+  name: string;
+  unit: string;
+  value: string;
 }
+
 /**
  * @description 获取 IOT 设备实时数据
  */
-export const useDeviceInfo=()=>{
-    const [state,setState]=useState<{list:IotLastInfoRecord[];loading:boolean;pic:string}>({
-        loading:false,
-        list:[],
-        pic:""
+
+export const useDeviceInfo = () => {
+  const [state, setState] = useState<{ list: IotLastInfoRecord[]; loading: boolean; pic: string }>({
+    loading: false,
+    list: [],
+    pic: ""
+  })
+  const request = (params: { sn: number; device_code: number }) => {
+    Request.sendRequest({
+      url: '/v1/iot/last',
+      params
+    }).then((data: any) => {
+      setState(preState => ({...preState, loading: false, ...data, dataSource: data.list}))
+    }).catch(error => {
+      setState(preState => ({...preState, loading: false}))
     })
-    const request=(params:{sn:number;device_code:number})=>{
-           Request.sendRequest({
-            url:'/v1/iot/last',
-            params
-        }).then((data:any)=>{
-            setState(preState=>({...preState,loading:false,...data,dataSource:data.list}))
-        }).catch(error=>{
-            setState(preState=>({...preState,loading:false}))
-        })
-    }
-    return {state,request} as const
+  }
+  return {state, request} as const
 }

+ 15 - 7
src/layout/adminLayout/index.scss

@@ -7,23 +7,32 @@
     justify-content: space-between;
     align-items: center;
     padding: 0px 20px;
-    background-color: #0085ae;
+    //background-color: #0085ae;
+    background-color: transparent;
     color: #ffffff;
     .admin-logo{
       color: inherit;
-      font-size: 32px;
+      font-size: 26px;
+    }
+    .back-home-icon {
+      margin-right: 14px;
+      font-size: 14px;
+    }
+    .header-right-info {
+      font-size: 14px;
     }
- 
   }
   .admin-sider {
    min-height: 100vh;
-    background-color: #0085ae;
+    //background-color: #0085ae;
+    background-color: transparent;
     .ant-menu{
       color: #ffffff;
       background-color: inherit;
       .ant-menu-submenu-title{
         color: #ffffff;
-        background-color: #0090bc;
+        //background-color: #0090bc;
+        background-color: transparent;
         margin: 0;
         line-height: 44px;
         height: 44px;
@@ -35,8 +44,7 @@
     }
  
     .ant-layout-sider-trigger{
-            background-color: inherit;
-
+      background-color: inherit;
     }
   }
 }

+ 54 - 36
src/layout/adminLayout/index.tsx

@@ -1,10 +1,13 @@
 import * as React from 'react';
 import { Layout, Menu, Space, Dropdown } from 'antd';
 import StoreContext from '../../hooks/StoreContext';
+import BlueBackground from './static/blue-bg.png'
 import {
 	LoginOutlined,
 	SettingOutlined,
 	DownOutlined,
+  UserOutlined,
+  HomeOutlined
 } from '@ant-design/icons';
 import { Switch, Route, RouteComponentProps, Link } from 'react-router-dom';
 import { adminMenuConfig } from '../../config/menuConfig';
@@ -56,46 +59,61 @@ const AdminLayout: React.FC<RouteComponentProps & { routes: any[] }> = ({
 	};
 	return (
 		<Layout className='admin-layout'>
-			<Header className='admin-header'>
+			<Header className='admin-header' style={{
+			  backgroundImage: `url(${BlueBackground})`
+      }}>
 				<div className='admin-logo'>
-					<Link to='/'>{value.projectInfo.name}</Link>
+					{/*<Link to='/'>{value.projectInfo.name}</Link>*/}
+          <span>管理中心</span>
 				</div>
-				<Dropdown
-					overlay={() => {
-						return (
-							<Menu>
-								<Menu.Item>
-									<Link to='/admin/setup'>
-										<SettingOutlined /> 个人中心
-									</Link>
-								</Menu.Item>
-								<Menu.Item>
-									<a
-										target='_blank'
-										rel='noopener noreferrer'
-										onClick={() => {
-											localStorage.clear();
-											sessionStorage.clear();
-											location.href = '/login';
-										}}>
-										<LoginOutlined></LoginOutlined> 退出
-									</a>
-								</Menu.Item>
-							</Menu>
-						);
-					}}>
-					<a className='ant-dropdown-link' onClick={(e) => e.preventDefault()}>
-						<Space>
-							<span className='layout-header-username'>
-								{value.userInfo.username}
-							</span>
-							<DownOutlined></DownOutlined>
-						</Space>
-					</a>
-				</Dropdown>
+        <div>
+          <HomeOutlined
+            className="back-home-icon"
+            onClick={() => history.push('/')}
+            title="返回首页"
+          />
+          <Dropdown
+            overlay={() => {
+              return (
+                <Menu>
+                  <Menu.Item>
+                    <Link to='/admin/setup'>
+                      <SettingOutlined /> 个人中心
+                    </Link>
+                  </Menu.Item>
+                  <Menu.Item>
+                    <a
+                      target='_blank'
+                      rel='noopener noreferrer'
+                      onClick={() => {
+                        localStorage.clear();
+                        sessionStorage.clear();
+                        location.href = '/login';
+                      }}>
+                      <LoginOutlined></LoginOutlined> 退出
+                    </a>
+                  </Menu.Item>
+                </Menu>
+              );
+            }}>
+            <a className='ant-dropdown-link' style={{
+              color: 'white'
+            }} onClick={(e) => e.preventDefault()}>
+              <Space className="header-right-info">
+                <UserOutlined />
+                <span className='layout-header-username'>
+								  {value.userInfo.username}
+							  </span>
+                <DownOutlined></DownOutlined>
+              </Space>
+            </a>
+          </Dropdown>
+        </div>
 			</Header>
 			<Layout className='site-layout'>
-				<Sider collapsible className='admin-sider'>
+				<Sider style={{
+          backgroundImage: `url(${BlueBackground})`
+        }} collapsible className='admin-sider'>
 					<Menu
 						theme='light'
 						mode='inline'

+ 0 - 0
dist/assest/media/imgs/layout-bg.d3170f33.png → src/layout/adminLayout/static/blue-bg.png


+ 18 - 0
src/pages/hard/index.scss

@@ -105,6 +105,24 @@
                 justify-content: space-between;
                 color: #ffffff;
                 font-size: 14px;
+                .hard-head-mast {
+                  position: relative;
+                  img {
+                    width: 520px;
+                    display: block;
+                    &.arrow {
+                      width: 38px;
+                      position: relative;
+                      left: 78px;
+                    }
+                    &.component {
+                      width: 43px;
+                      position: absolute;
+                      top: 80px;
+                      right: 170px;
+                    }
+                  }
+                }
                 .info-record{
                     width: 222px;
                     height: 40px;

+ 10 - 4
src/pages/hard/index.tsx

@@ -3,6 +3,10 @@ import Table from '../../compontens/table';
 import { useIotList, useDeviceList, useDeviceInfo } from '../../hooks/iot';
 import BoxContainer from './components/boxContainer';
 import './index.scss';
+import HeadMast from './static/head-mast.png'
+import HeadMastArrow from './static/head-mast-arrow.png'
+import HeadMastComponent from './static/head-mast-component.png'
+
 const { useEffect, useState } = React;
 const hard: React.FC = (props) => {
 	const [state, setstate] = useState<{
@@ -17,7 +21,7 @@ const hard: React.FC = (props) => {
 			{ name: '实时数据', checked: true, key: 'real' },
 			{ name: '历史数据', key: 'history' },
 			{ name: '报警数据', key: 'warn' },
-		],
+		]
 	});
 	const { state: iotListState, request: requestIotList } = useIotList();
 	const { state: deviceState, request: requestDeviceList } = useDeviceList();
@@ -123,7 +127,7 @@ const hard: React.FC = (props) => {
 								},
 							},
 						]}
-						dataSource={deviceState.dataSource}></Table>
+						dataSource={deviceState.dataSource}/>
 				</BoxContainer>
 			</div>
 			<div className='hard-right'>
@@ -151,8 +155,10 @@ const hard: React.FC = (props) => {
 						})}
 					</div>
 					<div className='hard-info-wrapper'>
-						<div>
-							<img src={infoState.pic} alt='' />
+						<div className="hard-head-mast">
+              <img className="arrow" src={HeadMastArrow} alt='' />
+              <img src={HeadMast} alt='' />
+              <img className="component" src={HeadMastComponent} alt='' />
 						</div>
 						<div>
 							{infoState.list.map((element) => {

BIN
src/pages/hard/static/head-mast-arrow.png


BIN
src/pages/hard/static/head-mast-component.png


BIN
src/pages/hard/static/head-mast.png


+ 2 - 1
src/pages/person/index.tsx

@@ -1,4 +1,5 @@
 import * as React from 'react';
+// @ts-ignore
 import { EChartsFullOption } from 'echarts/lib/options';
 import moment from 'moment';
 import BoxWrapper from '../../compontens/box';
@@ -31,7 +32,7 @@ const person: React.FC = (props) => {
 	}, []);
 	React.useEffect(() => {
 		mycharts = echarts.init(
-			document.querySelector('.company-statistics-charts') as HTMLElement
+			document.querySelector('.company-statistics-charts') as HTMLCanvasElement
 		);
 	}, []);
 	React.useEffect(() => {

+ 5 - 5
src/router/config.tsx

@@ -220,11 +220,11 @@ export const routerConfig = [
 			// 	path: '/cars',
 			// 	component: wrapperLoading(carMangement),
 			// },
-			// {
-			// 	title: '智能硬件',
-			// 	path: '/hard',
-			// 	component: wrapperLoading(hard),
-			// },
+			{
+				title: '智能硬件',
+				path: '/hard',
+				component: wrapperLoading(hard),
+			},
 		],
 	},
 ];

Some files were not shown because too many files changed in this diff