config.js 12 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,
邓超's avatar
邓超 committed
8 9 10 11
  CreditCardOutlined,
  FileTextOutlined,
  AppstoreOutlined,
  FundProjectionScreenOutlined,
12
  ReadOutlined,
13
} from '@ant-design/icons';
14 15 16 17 18 19 20
// 菜单
import UserLayout from '@/layouts/UserLayout';
import BasicLayout from '@/layouts/BasicLayout';
import BlankLayout from '@/layouts/BlankLayout';
// 登录
import Login from '@/pages/user/login';
// 解决方案管理
21
import CurrentSolution from '@/pages/currentSolution/CurrentSolution';
22 23 24 25 26 27
// 数据库管理
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';
Maofei94's avatar
Maofei94 committed
28
import RoleManage from '@/pages/userCenter/roleManage/RoleManage';
29 30 31
import SiteManage from '@/pages/userCenter/siteManage/SiteManage';
// 数据中心
import Dictionary from '@/pages/dataCenter/dictionary';
32

33
// 组态平台
皮倩雯's avatar
皮倩雯 committed
34

35 36 37
// 平台中心
import SchemeConfig from '@/pages/platformCenter/gis/schemeConfig/SchemeConfig';
import DimensionsConfig from '@/pages/platformCenter/gis/dimensionsConfig/dimensionsConfig';
38
import MessageManager from '@/pages/platformCenter/messageManage';
39 40
import SchemeDetail from '@/pages/platformCenter/messageManage/schemeDetail/schemeDetail';
import HostManager from '@/pages/platformCenter/hostmanager';
41
import VideoManager from '@/pages/platformCenter/videoManager';
皮倩雯's avatar
皮倩雯 committed
42
import BaseFrameContainer from '@/pages/platformCenter/baseFrameContainer';
43 44 45 46 47 48 49 50 51 52 53
// 业务中心
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';
54

55 56 57 58
// 应用中心
import ProductConfig from '@/pages/productCenter/productConfig/productConfig';
import WebConfigPage from '@/pages/productCenter/webConfig';
import MobileConfigPage from '@/pages/productCenter/mobileConfig';
Maofei94's avatar
Maofei94 committed
59

60 61 62 63 64 65
// 系统日志
import ServiceLog from '@/pages/log/serviceLog';
import LoginLog from '@/pages/log/loginLog';
import OmsLog from '@/pages/log/omsLog';

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

const superAuthority = [USER_MODE.SUPER];
const adminAuthority = [...superAuthority, USER_MODE.ADMIN];
邓超's avatar
邓超 committed
69
const iconStyle = { verticalAlign: 'middle' };
dengxiaofeng's avatar
dengxiaofeng committed
70 71 72 73 74
export default {
  routes: [
    {
      path: '/user',
      component: UserLayout,
75
      hideMenu: true,
dengxiaofeng's avatar
dengxiaofeng committed
76 77 78 79 80 81 82 83 84 85 86 87
      routes: [
        {
          name: 'login',
          path: '/user/login',
          component: Login,
        },
      ],
    },
    {
      path: '/',
      component: BasicLayout,
      routes: [
88 89
        {
          path: '/solution',
90
          name: '解决方案',
91 92 93 94
          icon: <SolutionOutlined style={iconStyle} />,
          authority: superAuthority,
          component: CurrentSolution,
        },
dengxiaofeng's avatar
dengxiaofeng committed
95
        {
96
          path: '/dbm',
97
          name: '数据库',
98 99
          icon: <DatabaseOutlined style={iconStyle} />,
          component: BlankLayout,
100
          authority: superAuthority,
101 102 103
          routes: [
            {
              path: '/dbm/dbInit',
Maofei94's avatar
Maofei94 committed
104
              name: '数据库连接',
105
              authority: superAuthority,
106 107 108
              component: InitDataBase,
            },
            {
109
              path: '/dbm/dbUpdate',
110
              name: '数据库升级',
111
              authority: superAuthority,
112 113
              component: ManagementDataBase,
            },
114
            {
115
              path: '/dbm/dbSource',
116
              name: '多数据源',
117
              authority: superAuthority,
118 119
              component: DatabaseConnectConfig,
            },
120 121 122
          ],
        },
        {
123
          path: '/authority',
124
          name: '组织架构',
125 126 127 128
          component: BlankLayout,
          icon: <UsergroupAddOutlined style={iconStyle} />,
          routes: [
            {
129
              path: '/authority/user',
130
              name: '机构管理',
131 132 133
              component: UserManage,
            },
            {
134
              path: '/authority/role',
135 136 137 138
              name: '角色管理',
              component: RoleManage,
            },
            {
139
              path: '/authority/station',
140
              name: '站点管理',
141
              component: SiteManage,
142 143
            },
          ],
144 145
        },
        {
146
          path: '/application',
147
          component: BlankLayout,
148 149
          name: '应用搭建',
          icon: <AppstoreOutlined style={iconStyle} />,
150 151
          routes: [
            {
152
              path: '/application/product',
153
              name: '产品授权',
154
              component: ProductConfig,
155
            },
mayongxin's avatar
mayongxin committed
156
            {
157
              path: '/application/web',
158 159
              name: 'Web搭建',
              component: WebConfigPage,
160
            },
皮倩雯's avatar
皮倩雯 committed
161
            {
162
              path: '/application/mobile',
163 164
              name: 'Mobile搭建',
              component: MobileConfigPage,
皮倩雯's avatar
皮倩雯 committed
165
            },
166 167 168
          ],
        },
        {
169
          path: '/biz',
170
          component: BlankLayout,
171
          name: '台账/工作流',
邓超's avatar
邓超 committed
172
          icon: <CreditCardOutlined style={iconStyle} />,
173 174
          routes: [
            {
175
              path: '/biz/account',
176
              name: '台账',
mayongxin's avatar
mayongxin committed
177 178 179
              component: BlankLayout,
              routes: [
                {
180
                  path: '/biz/account/table',
mayongxin's avatar
mayongxin committed
181 182 183
                  name: '表/字段',
                  component: TableManager,
                },
184
                {
185
                  path: '/biz/account/fieldConfig',
186 187
                  name: '字段配置',
                  component: FiledConfig,
188
                  hideMenu: true,
189
                },
190
                {
191
                  path: '/biz/account/list',
192
                  name: '台账列表',
193 194
                  component: StandingBook,
                },
195 196 197
              ],
            },
            {
198
              path: '/biz/workflow',
199
              name: '工作流',
200 201
              component: BlankLayout,
              routes: [
202
                {
203
                  path: '/biz/workflow/event',
204 205 206
                  name: '事件',
                  component: Incident,
                },
皮倩雯's avatar
皮倩雯 committed
207
                {
208
                  path: '/biz/workflow/eventFlow',
皮倩雯's avatar
皮倩雯 committed
209 210 211 212 213
                  name: '事件受理流程',
                  hideMenu: true,
                  component: IncidentFlow,
                },
                {
214
                  path: '/biz/workflow/eventView',
皮倩雯's avatar
皮倩雯 committed
215 216 217 218
                  name: '事件辅助视图',
                  hideMenu: true,
                  component: IncidentView,
                },
219
                {
220 221
                  path: '/biz/workflow/case',
                  name: '工单',
222 223
                  component: Flow,
                },
邓超's avatar
邓超 committed
224
                {
225
                  path: '/biz/workflow/caseNode',
邓超's avatar
邓超 committed
226 227 228 229
                  name: '流程节点',
                  hideMenu: true,
                  component: FlowNode,
                },
230
                {
231
                  path: '/biz/workflow/editor',
232 233 234
                  name: '工作流编辑',
                  component: Workflow,
                },
mayongxin's avatar
mayongxin committed
235 236
              ],
            },
237
            {
238
              path: '/biz/maintenance',
239 240
              name: '巡维保',
              component: Maintenance,
邓超's avatar
邓超 committed
241
            },
242 243 244
          ],
        },
        {
245
          path: '/platform',
246
          component: BlankLayout,
247 248
          name: '平台管理',
          icon: <FundProjectionScreenOutlined style={iconStyle} />,
249
          routes: [
250
            {
251
              path: '/platform/gis',
252 253 254 255
              name: 'GIS平台',
              component: BlankLayout,
              routes: [
                {
256
                  path: '/platform/gis/map',
257 258 259 260
                  name: '地图配置',
                  component: SchemeConfig,
                },
                {
261
                  path: '/platform/gis/3Dmap',
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286
                  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',
              //   },
              // ],
287
            },
288
            {
289
              path: '/platform/notification',
290 291
              name: '消息中心',
              component: MessageManager,
292 293
            },
            {
294
              path: '/platform/schemeDetail',
295 296 297
              name: '模板编辑',
              component: SchemeDetail,
              hideMenu: true,
298
            },
299
            {
300
              path: '/platform/video',
301 302 303 304
              name: '视频',
              component: VideoManager,
            },
            {
305
              path: '/platform/configuration',
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326
              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',
              // },
              // ],
            },
            {
327
              path: '/platform/host',
328 329 330
              name: '宿主管理',
              url: '/web4/?widget=product/oms/MqttConfig/MqttConfig.js|hideMap=true',
              component: HostManager,
邓超's avatar
邓超 committed
331
            },
332
          ],
333
        },
334 335

        {
336
          path: '/data/dic',
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353
          name: '数据字典',
          icon: <ReadOutlined style={iconStyle} />,
          component: Dictionary,
        },
        // {
        //   path: '/dataCenter',
        //   name: '数据中心',
        //   icon: <TableOutlined style={iconStyle} />,
        //   component: BlankLayout,
        //   routes: [
        //     {
        //       path: '/dataCenter/dictionary',
        //       name: '数据字典',
        //       component: Dictionary,
        //     },
        //   ],
        // },
354
        {
355
          path: '/system',
356
          component: BlankLayout,
357
          name: '系统日志',
邓超's avatar
邓超 committed
358
          icon: <FileTextOutlined style={iconStyle} />,
359 360
          routes: [
            {
361
              path: '/system/apiService',
Maofei94's avatar
Maofei94 committed
362
              name: '服务监控',
陈前坚's avatar
陈前坚 committed
363
              component: ServiceLog,
364 365
            },
            {
366
              path: '/system/loginLog',
367
              name: '登录日志',
陈前坚's avatar
陈前坚 committed
368
              component: LoginLog,
369 370
            },
            {
371
              path: '/system/omsLog',
Maofei94's avatar
Maofei94 committed
372
              name: '运维痕迹',
陈前坚's avatar
陈前坚 committed
373
              component: OmsLog,
374 375
            },
          ],
376
        },
dengxiaofeng's avatar
dengxiaofeng committed
377 378 379 380
      ],
    },
  ],
};