/* eslint-disable import/no-unresolved */ import React from 'react'; import { DatabaseOutlined, UsergroupAddOutlined, SolutionOutlined, TableOutlined, CreditCardOutlined, FileTextOutlined, AppstoreOutlined, FundProjectionScreenOutlined, ReadOutlined, } from '@ant-design/icons'; // 菜单 import UserLayout from '@/layouts/UserLayout'; import BasicLayout from '@/layouts/BasicLayout'; import BlankLayout from '@/layouts/BlankLayout'; // 登录 import Login from '@/pages/user/login'; // 解决方案管理 import CurrentSolution from '@/pages/currentSolution/CurrentSolution'; // 数据库管理 import InitDataBase from '@/pages/database/InitDataBase/InitDataBase'; import ManagementDataBase from '@/pages/database/ManagementDataBase/ManagementDataBase'; import DatabaseConnectConfig from '@/pages/database/databaseConfig/DatabaseConfig'; // 用户中心 import UserManage from '@/pages/userCenter/userManage/UserManage'; import RoleManage from '@/pages/userCenter/roleManage/RoleManage'; import SiteManage from '@/pages/userCenter/siteManage/SiteManage'; // 数据中心 import Dictionary from '@/pages/dataCenter/dictionary'; // 组态平台 // 平台中心 import SchemeConfig from '@/pages/platformCenter/gis/schemeConfig/SchemeConfig'; import DimensionsConfig from '@/pages/platformCenter/gis/dimensionsConfig/dimensionsConfig'; import MessageManager from '@/pages/platformCenter/messageManage'; import SchemeDetail from '@/pages/platformCenter/messageManage/schemeDetail/schemeDetail'; import HostManager from '@/pages/platformCenter/hostmanager'; import VideoManager from '@/pages/platformCenter/videoManager'; import BaseFrameContainer from '@/pages/platformCenter/baseFrameContainer'; // 业务中心 import TableManager from '@/pages/bsmanager/base/tablemanager'; import FiledConfig from '@/pages/bsmanager/base/tablemanager/filedConfig/filedConfig'; import StandingBook from '@/pages/bsmanager/base/standingBook/standingBook'; import Incident from '@/pages/bsmanager/workOrder/incident/incident'; import IncidentFlow from '@/pages/bsmanager/workOrder/incident/incidentFlow'; import IncidentView from '@/pages/bsmanager/workOrder/incident/incidentView'; import Flow from '@/pages/bsmanager/workOrder/workFlow/flow'; import FlowNode from '@/pages/bsmanager/workOrder/workFlow/flowNode/flowNode'; import Workflow from '@/pages/bsmanager/workOrder/workflowEdit/Workflow'; import Maintenance from '@/pages/bsmanager/maintenance/maintenance'; // 应用中心 import ProductConfig from '@/pages/productCenter/productConfig/productConfig'; import WebConfigPage from '@/pages/productCenter/webConfig'; import MobileConfigPage from '@/pages/productCenter/mobileConfig'; // 系统日志 import ServiceLog from '@/pages/log/serviceLog'; import LoginLog from '@/pages/log/loginLog'; import OmsLog from '@/pages/log/omsLog'; import { USER_MODE } from '@/utils/constants'; const superAuthority = [USER_MODE.SUPER]; const adminAuthority = [...superAuthority, USER_MODE.ADMIN]; const iconStyle = { verticalAlign: 'middle' }; export default { routes: [ { path: '/user', component: UserLayout, hideMenu: true, routes: [ { name: 'login', path: '/user/login', component: Login, }, ], }, { path: '/', component: BasicLayout, routes: [ { path: '/solution', name: '解决方案', icon: <SolutionOutlined style={iconStyle} />, authority: superAuthority, component: CurrentSolution, }, { path: '/dbm', name: '数据库', icon: <DatabaseOutlined style={iconStyle} />, component: BlankLayout, authority: superAuthority, routes: [ { path: '/dbm/dbInit', name: '数据库连接', authority: superAuthority, component: InitDataBase, }, { path: '/dbm/dbUpdate', name: '数据库升级', authority: superAuthority, component: ManagementDataBase, }, { path: '/dbm/dbSource', name: '多数据源', authority: superAuthority, component: DatabaseConnectConfig, }, ], }, { path: '/authority', name: '组织架构', component: BlankLayout, icon: <UsergroupAddOutlined style={iconStyle} />, routes: [ { path: '/authority/user', name: '机构管理', component: UserManage, }, { path: '/authority/role', name: '角色管理', component: RoleManage, }, { path: '/authority/station', name: '站点管理', component: SiteManage, }, ], }, { path: '/application', component: BlankLayout, name: '应用搭建', icon: <AppstoreOutlined style={iconStyle} />, routes: [ { path: '/application/product', name: '产品授权', component: ProductConfig, }, { path: '/application/web', name: 'Web搭建', component: WebConfigPage, }, { path: '/application/mobile', name: 'Mobile搭建', component: MobileConfigPage, }, ], }, { path: '/biz', component: BlankLayout, name: '台账/工作流', icon: <CreditCardOutlined style={iconStyle} />, routes: [ { path: '/biz/account', name: '台账', component: BlankLayout, routes: [ { path: '/biz/account/table', name: '表/字段', component: TableManager, }, { path: '/biz/account/fieldConfig', name: '字段配置', component: FiledConfig, hideMenu: true, }, { path: '/biz/account/list', name: '台账列表', component: StandingBook, }, ], }, { path: '/biz/workflow', name: '工作流', component: BlankLayout, routes: [ { path: '/biz/workflow/event', name: '事件', component: Incident, }, { path: '/biz/workflow/eventFlow', name: '事件受理流程', hideMenu: true, component: IncidentFlow, }, { path: '/biz/workflow/eventView', name: '事件辅助视图', hideMenu: true, component: IncidentView, }, { path: '/biz/workflow/case', name: '工单', component: Flow, }, { path: '/biz/workflow/caseNode', name: '流程节点', hideMenu: true, component: FlowNode, }, { path: '/biz/workflow/editor', name: '工作流编辑', component: Workflow, }, ], }, { path: '/biz/maintenance', name: '巡维保', component: Maintenance, }, ], }, { path: '/platform', component: BlankLayout, name: '平台管理', icon: <FundProjectionScreenOutlined style={iconStyle} />, routes: [ { path: '/platform/gis', name: 'GIS平台', component: BlankLayout, routes: [ { path: '/platform/gis/map', name: '地图配置', component: SchemeConfig, }, { path: '/platform/gis/3Dmap', name: '三维配置', component: DimensionsConfig, }, ], // routes: [{ // path: '/platformCenter/schemeConfig', // name: '方案配置', // component: SchemeConfig, // }] // tabs: [ // { // tabName: '范围配置', // url: // '/web4/?widget=product/Tool/EditBoundary/EditBoundary&serverCollextion=JiangNing_JNGW&solution=熊猫智慧水务平台', // }, // { // tabName: '方案配置', // url: // '/web4/?widget=product/Tool/MapSettings/MapSettings|hideMap=true', // }, // { // tabName: '七参数配置', // type: 'sevenParams', // }, // ], }, { path: '/platform/notification', name: '消息中心', component: MessageManager, }, { path: '/platform/schemeDetail', name: '模板编辑', component: SchemeDetail, hideMenu: true, }, { path: '/platform/video', name: '视频', component: VideoManager, }, { path: '/platform/configuration', name: '组态', component: BaseFrameContainer, // tabs: [ // { // tabName: '模型类型', // url: // '/web4/?widget=configuration/ConfigurationsOperationV1/ModelTypeManage/ModelTypeManage|hideMap=true', // }, // { // tabName: '模型文件', // url: // '/web4/?widget=configuration/ConfigurationsOperationV1/ModelFileManage/ModelFileManage|hideMap=true', // }, // { // tabName: '画板管理', // url: // '/web4/?widget=configuration/ConfigurationsOperationV1/DrawBoardManage/DrawBoardManage|hideMap=true', // }, // ], }, { path: '/platform/host', name: '宿主管理', url: '/web4/?widget=product/oms/MqttConfig/MqttConfig.js|hideMap=true', component: HostManager, }, ], }, { path: '/data/dic', name: '数据字典', icon: <ReadOutlined style={iconStyle} />, component: Dictionary, }, // { // path: '/dataCenter', // name: '数据中心', // icon: <TableOutlined style={iconStyle} />, // component: BlankLayout, // routes: [ // { // path: '/dataCenter/dictionary', // name: '数据字典', // component: Dictionary, // }, // ], // }, { path: '/system', component: BlankLayout, name: '系统日志', icon: <FileTextOutlined style={iconStyle} />, routes: [ { path: '/system/apiService', name: '服务监控', component: ServiceLog, }, { path: '/system/loginLog', name: '登录日志', component: LoginLog, }, { path: '/system/omsLog', name: '运维痕迹', component: OmsLog, }, ], }, ], }, ], };