2024-12-10 10:28:55 +08:00
|
|
|
import React, { lazy, useEffect } from 'react'
|
|
|
|
|
import { useDispatch } from 'react-redux'
|
|
|
|
|
import { Navigate, useRoutes } from 'react-router'
|
|
|
|
|
import DashboardLayout from '../components/DashboardLayout'
|
|
|
|
|
import { Dispatch } from '../models/store'
|
|
|
|
|
import LoginPage from './Login/index1'
|
2024-12-18 17:53:30 +08:00
|
|
|
import HomePage from './Home'
|
2024-12-11 17:56:03 +08:00
|
|
|
import Whfabz from "./Sbwh/Whfabz";
|
|
|
|
|
import Ssgcjl from "./Sbwh/Ssgcjl";
|
|
|
|
|
import Whxmys from "./Sbwh/Whxmys";
|
|
|
|
|
import Cgtzgl from "./Sbwh/Cgtzgl";
|
|
|
|
|
import Kchsgl from "./Sbwh/Kchsgl";
|
2024-12-17 17:42:56 +08:00
|
|
|
import Spbjgl from "./Sbwh/Spbjgl";
|
2024-12-26 15:10:07 +08:00
|
|
|
import Zhfxkh from './Sbwh/Zhfxkh';
|
2024-12-11 17:56:03 +08:00
|
|
|
import BasicSituation from "./Gcyx/InformationSearch/BasicSituation";
|
|
|
|
|
import RunSituation from "./Gcyx/InformationSearch/RunSituation";
|
|
|
|
|
import StaticTable from "./Gcyx/InformationSearch/StaticTable";
|
|
|
|
|
import OperateLog from "./Gcyx/InformationSearch/OperateLog";
|
2024-12-20 17:39:29 +08:00
|
|
|
import Sbgzjl from "./Gcyx/WatchWarn/Sbgzjl";
|
2024-12-13 17:49:08 +08:00
|
|
|
import Jcsj from './WatchData/Jcsj';
|
2024-12-11 17:56:03 +08:00
|
|
|
import PoliceRecord from './WatchData/PoliceMangant/PoliceRecord'
|
|
|
|
|
import PoliceRuleConfig from './WatchData/PoliceMangant/PoliceRuleConfig'
|
2024-12-18 17:53:30 +08:00
|
|
|
import UserInfo from './SystemMangant/UserInfo1'
|
|
|
|
|
import Dept from './SystemMangant/dept'
|
|
|
|
|
import Role from './SystemMangant/role'
|
|
|
|
|
import MenuM from './SystemMangant/menuM'
|
2024-12-26 15:10:07 +08:00
|
|
|
import Bxjc from './SafeWatch/TransformWatch'
|
|
|
|
|
import Sljc from './SafeWatch/SlWatch'
|
|
|
|
|
import Yjjl from './SafeWatch/WarnRecord'
|
|
|
|
|
import Yjgzpz from './SafeWatch/WarnRuleConfig'
|
|
|
|
|
import Xjrw from "./Gcyx/xcxj/xjrw"
|
|
|
|
|
import Xjwtcl from "./Gcyx/xcxj/xjwtcl"
|
|
|
|
|
import Xjxpz from "./Gcyx/xcxj/xjxpz"
|
2024-12-25 13:48:51 +08:00
|
|
|
import TestLine from './TestLine'
|
2024-12-18 17:53:30 +08:00
|
|
|
// const HomePage = lazy(() => import('./Home'))
|
2024-12-10 10:28:55 +08:00
|
|
|
|
|
|
|
|
const AppRouters: React.FC = () => {
|
|
|
|
|
const dispatch = useDispatch<Dispatch>()
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
;(window as any).__dispatch__ = dispatch
|
|
|
|
|
return () => {
|
|
|
|
|
delete (window as any).__dispatch__
|
|
|
|
|
}
|
|
|
|
|
}, [dispatch])
|
|
|
|
|
|
|
|
|
|
let element = useRoutes([
|
|
|
|
|
{ path: '/', element: <LoginPage /> },
|
2024-12-12 17:53:28 +08:00
|
|
|
{ path: '/home', element: <HomePage /> },
|
2024-12-10 10:28:55 +08:00
|
|
|
{
|
|
|
|
|
path: '/mgr',
|
|
|
|
|
element: <DashboardLayout />,
|
|
|
|
|
children: [
|
2024-12-12 17:53:28 +08:00
|
|
|
// { path: 'home', element: <HomePage /> },
|
2024-12-11 17:56:03 +08:00
|
|
|
// 监测数据
|
|
|
|
|
{ path: 'jcsj/jcsj', element: <Jcsj /> },
|
|
|
|
|
{ path: 'jcsj/bjgl/bjjl', element: <PoliceRecord /> },
|
|
|
|
|
{ path: 'jcsj/bjgl/bjgzpz', element: <PoliceRuleConfig /> },
|
2024-12-10 10:28:55 +08:00
|
|
|
|
2024-12-26 15:10:07 +08:00
|
|
|
// 安全监测
|
|
|
|
|
{ path: 'aqjc/bxjc', element: <Bxjc /> },
|
|
|
|
|
{ path: 'aqjc/sljc', element: <Sljc /> },
|
|
|
|
|
{ path: 'aqjc/yjjl', element: <Yjjl /> },
|
|
|
|
|
{ path: 'aqjc/yjgzpz', element: <Yjgzpz /> },
|
2024-12-11 17:56:03 +08:00
|
|
|
// 设备维护
|
|
|
|
|
{ path: 'sbwh/wxyhgl/wxfabz', element: <Whfabz /> },
|
|
|
|
|
{ path: 'sbwh/wxyhgl/ssgcjl', element: <Ssgcjl /> },
|
|
|
|
|
{ path: 'sbwh/wxyhgl/whxmys', element: <Whxmys /> },
|
|
|
|
|
{ path: 'sbwh/sbwzgl/cgtzgl', element: <Cgtzgl /> },
|
|
|
|
|
{ path: 'sbwh/sbwzgl/kchsgl', element: <Kchsgl /> },
|
2024-12-17 17:42:56 +08:00
|
|
|
{ path: 'sbwh/sbwzgl/bpbjgl', element: <Spbjgl /> },
|
2024-12-26 15:10:07 +08:00
|
|
|
{ path: 'sbwh/sbwzgl/zhfxkh', element: <Zhfxkh /> },
|
2024-12-11 17:56:03 +08:00
|
|
|
// 工程运行
|
2024-12-26 15:10:07 +08:00
|
|
|
{ path: 'gcyx/xxcx/jbqk', element: <BasicSituation /> },
|
|
|
|
|
{ path: 'gcyx/xxcx/yxqk', element: <RunSituation /> },
|
|
|
|
|
{ path: 'gcyx/xxcx/tjbb', element: <StaticTable /> },
|
|
|
|
|
{ path: 'gcyx/xxcx/czrz', element: <OperateLog /> },
|
|
|
|
|
{ path: 'gcyx/jsyj/sbgzjl', element: <Sbgzjl /> },
|
|
|
|
|
{ path: 'gcyx/xcxj/xcrw', element: <Xjrw /> },
|
|
|
|
|
{ path: 'gcyx/xcxj/xjwtcl', element: <Xjwtcl /> },
|
|
|
|
|
{ path: 'gcyx/xcxj/xjxpz', element: <Xjxpz/> },
|
2024-12-13 17:49:08 +08:00
|
|
|
// 系统管理
|
|
|
|
|
{ path: 'xtgl/yhxx', element: <UserInfo /> },
|
2024-12-18 17:53:30 +08:00
|
|
|
{ path: 'xtgl/bmgl', element: <Dept /> },
|
|
|
|
|
{ path: 'xtgl/jsgl', element: <Role /> },
|
|
|
|
|
{ path: 'xtgl/cdgl', element: <MenuM /> },
|
2024-12-13 17:49:08 +08:00
|
|
|
|
2024-12-25 13:48:51 +08:00
|
|
|
// 测试曲线
|
|
|
|
|
{ path: 'testLine/testLine', element: <TestLine /> },
|
|
|
|
|
|
2024-12-10 10:28:55 +08:00
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{ path: '/login', element: <LoginPage /> },
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
return element
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default AppRouters
|