config.js 19.9 KB
Newer Older
皮倩雯's avatar
皮倩雯 committed
1
/* eslint-disable import/no-unresolved */
2 3 4 5
import React from 'react';
import {
  DatabaseOutlined,
  UsergroupAddOutlined,
6
  SolutionOutlined,
陈前坚's avatar
陈前坚 committed
7
  TableOutlined,
8
  HomeOutlined,
邓超's avatar
邓超 committed
9 10 11 12
  CreditCardOutlined,
  FileTextOutlined,
  AppstoreOutlined,
  FundProjectionScreenOutlined,
13
  ReadOutlined,
14
} from '@ant-design/icons';
15
import asyncComponent from './importComponent';
16
// 菜单
17 18 19
// import UserLayout from '@/layouts/UserLayout';
// import BasicLayout from '@/layouts/BasicLayout';
// import BlankLayout from '@/layouts/BlankLayout';
20
// 登录
21
// import Login from '@/pages/user/login';
22
// 解决方案管理
23
// import CurrentSolution from '@/pages/currentSolution/CurrentSolution';
24
// 数据库管理
25 26 27 28
// import InitDataBase from '@/pages/database/InitDataBase/InitDataBase';
// import DatabaseInitialization from '@/pages/database/databaseInitialization/DatabaseInitialization';
// import ManagementDataBase from '@/pages/database/ManagementDataBase/ManagementDataBase';
// import DatabaseConnectConfig from '@/pages/database/databaseConfig/DatabaseConfig';
29
// 用户中心
30 31 32 33 34
// import UserManage from '@/pages/userCenter/userManage/UserManage';
// import UserManage from '@/pages/userCenter/userManage/UserManage';

// import RoleManage from '@/pages/userCenter/roleManage/RoleManage';
// import SiteManage from '@/pages/userCenter/siteManage/SiteManage';
35
// 数据中心
36
// import Dictionary from '@/pages/dataCenter/dictionary';
37

38
// 组态平台
皮倩雯's avatar
皮倩雯 committed
39

40
// 平台中心
41 42 43 44 45 46 47 48
// 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 IntegratedLogin from '@/pages/platformCenter/integratedLogin/integrate';
49
// 业务中心
50 51
// import TableManager from '@/pages/bsmanager/base/tablemanager';
import FiledConfig from '@/pages/bsmanager/base/tablemanager/filedConfig/filedConfig';
52 53 54 55 56 57 58 59 60
// 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/patrolMaintenance/maintenance/maintenance';
// import PatrolFeedback from '@/pages/bsmanager/patrolMaintenance/patrolFeedback/patrolFeedback';
61

62
// 应用中心
63 64 65
// import ProductConfig from '@/pages/productCenter/productConfig/productConfig';
// import WebConfigPage from '@/pages/productCenter/webConfig';
// import MobileConfigPage from '@/pages/productCenter/mobileConfig';
Maofei94's avatar
Maofei94 committed
66

67
// 系统日志
68 69 70
// import ServiceLog from '@/pages/log/serviceLog';
// import LoginLog from '@/pages/log/loginLog';
// import OmsLog from '@/pages/log/omsLog';
71 72

import { USER_MODE } from '@/utils/constants';
张烨's avatar
张烨 committed
73

74 75 76 77 78 79
// 菜单
const UserLayout = asyncComponent(() => import('@/layouts/UserLayout'));
const BasicLayout = asyncComponent(() => import('@/layouts/BasicLayout'));
const BlankLayout = asyncComponent(() => import('@/layouts/BlankLayout'));
// 登录
const Login = asyncComponent(() => import('@/pages/user/login'));
皮倩雯's avatar
皮倩雯 committed
80 81
// 首页
const HomePage = asyncComponent(() => import('@/pages/homePage'));
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
// 解决方案管理
const CurrentSolution = asyncComponent(() => import('@/pages/currentSolution/CurrentSolution'));
// 数据库管理
const InitDataBase = asyncComponent(() => import('@/pages/database/InitDataBase/InitDataBase'));
const DatabaseInitialization = asyncComponent(() =>
  import('@/pages/database/databaseInitialization/DatabaseInitialization'),
);
const ManagementDataBase = asyncComponent(() =>
  import('@/pages/database/ManagementDataBase/ManagementDataBase'),
);
const DatabaseConnectConfig = asyncComponent(() =>
  import('@/pages/database/databaseConfig/DatabaseConfig'),
);
// 用户中心
const UserManage = asyncComponent(() => import('@/pages/userCenter/userManage/UserManage'));
const Workflow = asyncComponent(() => import('@/pages/bsmanager/workOrder/workflowEdit/Workflow'));
邓超's avatar
邓超 committed
98 99 100 101 102 103
const WorkflowHomePage = asyncComponent(() =>
  import('@/pages/bsmanager/workOrder/workflowEdit/WorkflowHomePage'),
);
const FlowBoard = asyncComponent(() =>
  import('@/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/FlowBoard'),
);
104 105 106 107 108 109 110 111 112 113 114
const RoleManage = asyncComponent(() => import('@/pages/userCenter/roleManage/RoleManage'));
const SiteManage = asyncComponent(() => import('@/pages/userCenter/siteManage/SiteManage'));
// 数据中心
const Dictionary = asyncComponent(() => import('@/pages/dataCenter/dictionary'));
// 平台中心
const SchemeConfig = asyncComponent(() =>
  import('@/pages/platformCenter/gis/schemeConfig/SchemeConfig'),
);
const DimensionsConfig = asyncComponent(() =>
  import('@/pages/platformCenter/gis/dimensionsConfig/dimensionsConfig'),
);
邓超's avatar
邓超 committed
115 116 117
const PanoramaConfig = asyncComponent(() =>
  import('@/pages/platformCenter/gis/panoramaConfig/index'),
);
118
const MessageManager = asyncComponent(() => import('@/pages/platformCenter/messageManage'));
119 120 121 122 123 124
const MessageManagerNew = asyncComponent(() =>
  import('@/pages/platformCenter/messageManage/indexNew'),
);
const SchemeDetailNew = asyncComponent(() =>
  import('@/pages/platformCenter/messageManage/schemeDetails/schemeDetails'),
);
125 126 127 128 129 130 131 132 133 134 135
const SchemeDetail = asyncComponent(() =>
  import('@/pages/platformCenter/messageManage/schemeDetail/schemeDetail'),
);
const HostManager = asyncComponent(() => import('@/pages/platformCenter/hostmanager'));
const VideoManager = asyncComponent(() => import('@/pages/platformCenter/videoManager'));
const BaseFrameContainer = asyncComponent(() =>
  import('@/pages/platformCenter/baseFrameContainer'),
);
const IntegratedLogin = asyncComponent(() =>
  import('@/pages/platformCenter/integratedLogin/integrate'),
);
皮倩雯's avatar
皮倩雯 committed
136
const ScheduledTasks = asyncComponent(() => import('@/pages/platformCenter/scheduledTasks/index'));
137
// 业务中心
138 139 140 141
const TableManager = asyncComponent(() => import('@/pages/bsmanager/base/tablemanager'));
// const FiledConfig = asyncComponent(() =>
//   import('@/pages/bsmanager/base/tablemanager/filedConfig/filedConfig'),
// );
142 143 144 145 146 147 148 149 150 151 152 153 154 155
const StandingBook = asyncComponent(() =>
  import('@/pages/bsmanager/base/standingBook/standingBook'),
);
const Incident = asyncComponent(() => import('@/pages/bsmanager/workOrder/incident/incident'));
const IncidentFlow = asyncComponent(() =>
  import('@/pages/bsmanager/workOrder/incident/incidentFlow'),
);
const IncidentView = asyncComponent(() =>
  import('@/pages/bsmanager/workOrder/incident/incidentView'),
);
const Flow = asyncComponent(() => import('@/pages/bsmanager/workOrder/workFlow/flow'));
const FlowNode = asyncComponent(() =>
  import('@/pages/bsmanager/workOrder/workFlow/flowNode/flowNode'),
);
156
const Holidays = asyncComponent(() => import('@/pages/bsmanager/workOrder/holidays/holidays')); // 节假日
157 158 159
const Maintenance = asyncComponent(() =>
  import('@/pages/bsmanager/patrolMaintenance/maintenance/maintenance'),
);
160 161 162
const MaintenanceOld = asyncComponent(() =>
  import('@/pages/bsmanager/patrolMaintenance/maintenance/maintenanceOld'),
);
163 164 165 166 167 168 169 170 171 172 173 174 175
const PatrolFeedback = asyncComponent(() =>
  import('@/pages/bsmanager/patrolMaintenance/patrolFeedback/patrolFeedback'),
);
// 应用中心
const ProductConfig = asyncComponent(() =>
  import('@/pages/productCenter/productConfig/productConfig'),
);
const WebConfigPage = asyncComponent(() => import('@/pages/productCenter/webConfig'));
const MobileConfigPage = asyncComponent(() => import('@/pages/productCenter/mobileConfig'));
// 系统日志
const ServiceLog = asyncComponent(() => import('@/pages/log/serviceLog'));
const LoginLog = asyncComponent(() => import('@/pages/log/loginLog'));
const OmsLog = asyncComponent(() => import('@/pages/log/omsLog'));
皮倩雯's avatar
皮倩雯 committed
176
const LogCenter = asyncComponent(() => import('@/pages/log/logCenter'));
张烨's avatar
张烨 committed
177 178
const superAuthority = [USER_MODE.SUPER];
const adminAuthority = [...superAuthority, USER_MODE.ADMIN];
邓超's avatar
邓超 committed
179
const iconStyle = { verticalAlign: 'middle' };
dengxiaofeng's avatar
dengxiaofeng committed
180 181 182 183 184
export default {
  routes: [
    {
      path: '/user',
      component: UserLayout,
185
      hideMenu: true,
dengxiaofeng's avatar
dengxiaofeng committed
186 187 188 189 190 191 192 193 194 195 196 197
      routes: [
        {
          name: 'login',
          path: '/user/login',
          component: Login,
        },
      ],
    },
    {
      path: '/',
      component: BasicLayout,
      routes: [
198 199 200 201 202 203
        {
          path: '/homePage',
          name: '首页',
          icon: <HomeOutlined style={iconStyle} />,
          component: HomePage,
        },
204 205
        {
          path: '/solution',
206
          name: '解决方案',
207 208 209 210
          icon: <SolutionOutlined style={iconStyle} />,
          authority: superAuthority,
          component: CurrentSolution,
        },
dengxiaofeng's avatar
dengxiaofeng committed
211
        {
212
          path: '/dbm',
213
          name: '数据库',
214 215
          icon: <DatabaseOutlined style={iconStyle} />,
          component: BlankLayout,
216
          authority: superAuthority,
217
          routes: [
218 219 220 221 222 223
            {
              path: '/dbm/dbInitializa',
              name: '数据库初始化',
              authority: superAuthority,
              component: DatabaseInitialization,
            },
224 225
            {
              path: '/dbm/dbInit',
Maofei94's avatar
Maofei94 committed
226
              name: '数据库连接',
227
              authority: superAuthority,
228 229 230
              component: InitDataBase,
            },
            {
231
              path: '/dbm/dbUpdate',
232
              name: '数据库升级',
233
              authority: superAuthority,
234 235
              component: ManagementDataBase,
            },
236
            {
237
              path: '/dbm/dbSource',
238
              name: '多数据源',
239
              authority: superAuthority,
240 241
              component: DatabaseConnectConfig,
            },
242 243 244
          ],
        },
        {
245
          path: '/authority',
246
          name: '组织架构',
247 248 249 250
          component: BlankLayout,
          icon: <UsergroupAddOutlined style={iconStyle} />,
          routes: [
            {
251
              path: '/authority/user',
252
              name: '机构管理',
253 254 255
              component: UserManage,
            },
            {
256
              path: '/authority/role',
257 258 259 260
              name: '角色管理',
              component: RoleManage,
            },
            {
261
              path: '/authority/station',
262
              name: '站点管理',
263
              component: SiteManage,
264 265
            },
          ],
266 267
        },
        {
268
          path: '/application',
269
          component: BlankLayout,
270 271
          name: '应用搭建',
          icon: <AppstoreOutlined style={iconStyle} />,
272 273
          routes: [
            {
274
              path: '/application/product',
275
              name: '产品授权',
276
              component: ProductConfig,
277
            },
mayongxin's avatar
mayongxin committed
278
            {
279
              path: '/application/web',
280 281
              name: 'Web搭建',
              component: WebConfigPage,
282
            },
皮倩雯's avatar
皮倩雯 committed
283
            {
284
              path: '/application/mobile',
285 286
              name: 'Mobile搭建',
              component: MobileConfigPage,
皮倩雯's avatar
皮倩雯 committed
287
            },
288 289 290
          ],
        },
        {
291
          path: '/biz',
292
          component: BlankLayout,
293
          name: '台账/工作流',
邓超's avatar
邓超 committed
294
          icon: <CreditCardOutlined style={iconStyle} />,
295 296
          routes: [
            {
297
              path: '/biz/account',
298
              name: '台账',
mayongxin's avatar
mayongxin committed
299 300 301
              component: BlankLayout,
              routes: [
                {
302
                  path: '/biz/account/table',
mayongxin's avatar
mayongxin committed
303 304 305
                  name: '表/字段',
                  component: TableManager,
                },
306 307 308 309 310 311
                // {
                //   path: '/biz/account/fieldConfig',
                //   name: '字段配置',
                //   component: FiledConfig,
                //   hideMenu: true,
                // },
312
                {
313
                  path: '/biz/account/list',
314
                  name: '台账列表',
315 316
                  component: StandingBook,
                },
317 318 319
              ],
            },
            {
320
              path: '/biz/workflow',
321
              name: '工作流',
322 323
              component: BlankLayout,
              routes: [
324
                {
325
                  path: '/biz/workflow/event',
326 327 328
                  name: '事件',
                  component: Incident,
                },
皮倩雯's avatar
皮倩雯 committed
329
                {
330
                  path: '/biz/workflow/eventFlow',
皮倩雯's avatar
皮倩雯 committed
331 332 333 334 335
                  name: '事件受理流程',
                  hideMenu: true,
                  component: IncidentFlow,
                },
                {
336
                  path: '/biz/workflow/eventView',
皮倩雯's avatar
皮倩雯 committed
337 338 339 340
                  name: '事件辅助视图',
                  hideMenu: true,
                  component: IncidentView,
                },
邓超's avatar
邓超 committed
341
                {
342
                  path: '/biz/workflow/caseNode',
邓超's avatar
邓超 committed
343 344 345 346
                  name: '流程节点',
                  hideMenu: true,
                  component: FlowNode,
                },
347 348 349 350 351
                // {
                //   path: '/biz/workflow/editor',
                //   name: '工作流编辑',
                //   component: Workflow,
                // },
邓超's avatar
邓超 committed
352 353 354 355 356 357 358 359 360 361 362
                {
                  path: '/biz/workflow/center',
                  name: '流程中心',
                  component: WorkflowHomePage,
                },
                {
                  path: '/biz/workflow/flowBoard',
                  name: '流程画板',
                  component: FlowBoard,
                  hideMenu: true,
                },
363 364 365 366 367
                {
                  path: '/biz/workflow/holidays',
                  name: '节假日管理',
                  component: Holidays,
                },
368 369
                {
                  path: '/biz/workflow/case',
涂伟's avatar
涂伟 committed
370
                  name: '流程审查',
371 372
                  component: Flow,
                },
mayongxin's avatar
mayongxin committed
373 374
              ],
            },
375
            {
皮倩雯's avatar
皮倩雯 committed
376
              path: '/biz/patrolMaintenance',
377
              name: '巡检配置',
皮倩雯's avatar
皮倩雯 committed
378 379 380 381
              component: BlankLayout,
              routes: [
                {
                  path: '/biz/patrolMaintenance/patrolFeedback',
382
                  name: '管网巡检',
皮倩雯's avatar
皮倩雯 committed
383 384 385 386
                  component: PatrolFeedback,
                },
                {
                  path: '/biz/patrolMaintenance/maintenance',
387
                  name: '设备巡检',
皮倩雯's avatar
皮倩雯 committed
388 389
                  component: Maintenance,
                },
390 391
                {
                  path: '/biz/patrolMaintenance/maintenanceOld',
392
                  name: '设备巡检(旧)',
393 394
                  component: MaintenanceOld,
                },
皮倩雯's avatar
皮倩雯 committed
395
              ],
邓超's avatar
邓超 committed
396
            },
397 398 399
          ],
        },
        {
400
          path: '/platform',
401
          component: BlankLayout,
402 403
          name: '平台管理',
          icon: <FundProjectionScreenOutlined style={iconStyle} />,
404
          routes: [
405
            {
406
              path: '/platform/gis',
407 408 409 410
              name: 'GIS平台',
              component: BlankLayout,
              routes: [
                {
411
                  path: '/platform/gis/map',
412 413 414 415
                  name: '地图配置',
                  component: SchemeConfig,
                },
                {
416
                  path: '/platform/gis/3Dmap',
417 418 419
                  name: '三维配置',
                  component: DimensionsConfig,
                },
邓超's avatar
邓超 committed
420 421 422 423 424
                {
                  path: '/platform/gis/panoramaConfig',
                  name: '全景图配置',
                  component: PanoramaConfig,
                },
425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446
              ],
              // 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',
              //   },
              // ],
447
            },
448
            {
449
              path: '/platform/notification',
450 451
              name: '消息中心',
              component: MessageManager,
452
            },
皮倩雯's avatar
皮倩雯 committed
453 454 455 456 457
            {
              path: '/platform/scheduledTasks',
              name: '定时任务',
              component: ScheduledTasks,
            },
458 459 460 461 462 463 464 465 466 467 468
            // {
            //   path: '/platform/notificationNew',
            //   name: '消息中心(新)',
            //   component: MessageManagerNew,
            // },
            {
              path: '/platform/SchemeDetailNew',
              name: '模板编辑',
              component: SchemeDetailNew,
              hideMenu: true,
            },
469
            {
470
              path: '/platform/schemeDetail',
471 472 473
              name: '模板编辑',
              component: SchemeDetail,
              hideMenu: true,
474
            },
475
            {
476
              path: '/platform/video',
477 478 479 480
              name: '视频',
              component: VideoManager,
            },
            {
481
              path: '/platform/configuration',
482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502
              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',
              // },
              // ],
            },
            {
503
              path: '/platform/host',
504 505 506
              name: '宿主管理',
              url: '/web4/?widget=product/oms/MqttConfig/MqttConfig.js|hideMap=true',
              component: HostManager,
邓超's avatar
邓超 committed
507
            },
皮倩雯's avatar
皮倩雯 committed
508 509 510 511 512
            {
              path: '/platform/integrate',
              name: '集成登录',
              component: IntegratedLogin,
            },
513
          ],
514
        },
515
        {
邓超's avatar
邓超 committed
516
          path: '/dataDic',
517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533
          name: '数据字典',
          icon: <ReadOutlined style={iconStyle} />,
          component: Dictionary,
        },
        // {
        //   path: '/dataCenter',
        //   name: '数据中心',
        //   icon: <TableOutlined style={iconStyle} />,
        //   component: BlankLayout,
        //   routes: [
        //     {
        //       path: '/dataCenter/dictionary',
        //       name: '数据字典',
        //       component: Dictionary,
        //     },
        //   ],
        // },
534
        {
535
          path: '/system',
536
          component: BlankLayout,
皮倩雯's avatar
皮倩雯 committed
537
          name: '安全审计',
邓超's avatar
邓超 committed
538
          icon: <FileTextOutlined style={iconStyle} />,
539
          routes: [
540 541 542 543 544
            // {
            //   path: '/system/apiService',
            //   name: '服务监控',
            //   component: ServiceLog,
            // },
545
            {
546
              path: '/system/loginLog',
547
              name: '登录日志',
陈前坚's avatar
陈前坚 committed
548
              component: LoginLog,
549 550
            },
            {
551
              path: '/system/omsLog',
Maofei94's avatar
Maofei94 committed
552
              name: '运维痕迹',
陈前坚's avatar
陈前坚 committed
553
              component: OmsLog,
554
            },
皮倩雯's avatar
皮倩雯 committed
555 556
            {
              path: '/system/logCenter',
皮倩雯's avatar
皮倩雯 committed
557
              name: '行为管控',
皮倩雯's avatar
皮倩雯 committed
558 559
              component: LogCenter,
            },
560
          ],
561
        },
dengxiaofeng's avatar
dengxiaofeng committed
562 563 564 565
      ],
    },
  ],
};