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