config.js 8.53 KB
Newer Older
1 2 3 4 5 6
import React from 'react';
import {
  DatabaseOutlined,
  UsergroupAddOutlined,
  SettingOutlined,
  HomeOutlined,
7
  SolutionOutlined,
8 9
  //   AndroidOutlined,
  //   CommentOutlined,
陈前坚's avatar
陈前坚 committed
10
  TableOutlined,
11 12
  CopyOutlined,
} from '@ant-design/icons';
dengxiaofeng's avatar
dengxiaofeng committed
13 14 15
import UserLayout from '../layouts/UserLayout';
import Login from '../pages/user/login';
import BasicLayout from '../layouts/BasicLayout';
16
import BlankLayout from '../layouts/BlankLayout';
赵吉's avatar
赵吉 committed
17
import RequestTest from '../pages/testPages/request';
陈前坚's avatar
陈前坚 committed
18 19
import InitDataBase from '../pages/database/InitDataBase';
import ManagementDataBase from '../pages/database/ManagementDataBase';
20
import DatabaseConnectConfig from '@/pages/database/databaseConfig/DatabaseConfig';
21
import CurrentSolution from '@/pages/database/CurrentSolution';
陈前坚's avatar
陈前坚 committed
22
import UserManage from '../pages/userCenter/userManage/UserManage';
Maofei94's avatar
Maofei94 committed
23
import RoleManage from '@/pages/userCenter/roleManage/RoleManage';
24
import SiteManage from '../pages/userCenter/siteManage/SiteManage';
陈前坚's avatar
陈前坚 committed
25
import Dictionary from '../pages/dataCenter/dictionary';
陈前坚's avatar
陈前坚 committed
26 27
import ServiceLog from '../pages/log/serviceLog';
import LoginLog from '../pages/log/loginLog';
陈前坚's avatar
陈前坚 committed
28
import OmsLog from '../pages/log/omsLog';
陈前坚's avatar
陈前坚 committed
29
// import DefaultComponent from '../pages/orgnazation/DefaultComponent';
30
import TestTable from '../pages/orgnazation/TestTable';
31
import WebConfigPage from '@/pages/webConfig';
32
// import AppConfigPage from '@/pages/appConfig';
33
import MobileConfigPage from '@/pages/mobileConfig';
张烨's avatar
张烨 committed
34
import { USER_MODE } from '@/utils/constants';
陈前坚's avatar
陈前坚 committed
35
import BaseFrameContainer from '@/components/BaseFrameContainer';
Maofei94's avatar
Maofei94 committed
36
import JumpContainer from '@/components/JumpContainer';
Maofei94's avatar
Maofei94 committed
37 38
// import ColConen from '@/components/Colophon/colContent';

39
const iconStyle = { verticalAlign: '0.125em' };
张烨's avatar
张烨 committed
40 41 42

const superAuthority = [USER_MODE.SUPER];
const adminAuthority = [...superAuthority, USER_MODE.ADMIN];
43
// const commonAuthority = [...adminAuthority, USER_MODE.COMMON];
张烨's avatar
张烨 committed
44

dengxiaofeng's avatar
dengxiaofeng committed
45 46 47 48 49
export default {
  routes: [
    {
      path: '/user',
      component: UserLayout,
50
      hideMenu: true,
dengxiaofeng's avatar
dengxiaofeng committed
51 52 53 54 55 56 57 58
      routes: [
        {
          name: 'login',
          path: '/user/login',
          component: Login,
        },
      ],
    },
张烨's avatar
张烨 committed
59 60
    {
      path: '/test/request',
61
      hideMenu: true,
张烨's avatar
张烨 committed
62 63
      component: RequestTest,
    },
dengxiaofeng's avatar
dengxiaofeng committed
64 65 66 67
    {
      path: '/',
      component: BasicLayout,
      routes: [
68 69 70 71 72 73 74
        {
          path: '/solution',
          name: '解决方案管理',
          icon: <SolutionOutlined style={iconStyle} />,
          authority: superAuthority,
          component: CurrentSolution,
        },
dengxiaofeng's avatar
dengxiaofeng committed
75
        {
76 77 78 79
          path: '/dbm',
          name: '数据库管理',
          icon: <DatabaseOutlined style={iconStyle} />,
          component: BlankLayout,
张烨's avatar
张烨 committed
80
          authority: adminAuthority,
81 82 83
          routes: [
            {
              path: '/dbm/dbInit',
Maofei94's avatar
Maofei94 committed
84
              name: '数据库连接',
张烨's avatar
张烨 committed
85
              authority: adminAuthority,
86 87 88 89 90
              component: InitDataBase,
            },
            {
              path: '/dbm/dbsm',
              name: '数据库标准化管理',
陈前坚's avatar
陈前坚 committed
91
              authority: adminAuthority,
92 93
              component: ManagementDataBase,
            },
94 95 96
            {
              path: '/dbm/connectConfig',
              name: '数据库连接配置',
陈前坚's avatar
陈前坚 committed
97
              authority: adminAuthority,
98 99
              component: DatabaseConnectConfig,
            },
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
          ],
        },
        {
          path: '/userCenter',
          name: '用户中心',
          component: BlankLayout,
          icon: <UsergroupAddOutlined style={iconStyle} />,
          routes: [
            {
              path: '/userCenter/UserManage',
              name: '用户管理',
              component: UserManage,
            },
            {
              path: '/userCenter/RoleManage',
              name: '角色管理',
              component: RoleManage,
            },
            {
              path: '/userCenter/SiteManage',
              name: '站点管理',
              component: SiteManage,
            },
          ],
124
        },
125 126 127
        {
          path: '/userCenter/testTable',
          name: '测试表格',
128
          hideMenu: true,
129 130
          component: TestTable,
        },
131
        {
132 133 134 135 136 137 138 139
          path: '/platformCenter',
          component: BlankLayout,
          name: '平台中心',
          icon: <SettingOutlined style={iconStyle} />,
          routes: [
            {
              path: '/platformCenter/gis',
              name: 'GIS平台',
陈前坚's avatar
陈前坚 committed
140 141 142 143 144 145 146 147 148 149 150 151
              component: BaseFrameContainer,
              tabs: [
                {
                  tabName: '范围配置',
                  url:
                    '/web4/?widget=product/Tool/EditBoundary/EditBoundary&amp;serverCollextion=JiangNing&amp;solution=熊猫智慧水务平台',
                },
                {
                  tabName: '方案配置',
                  url:
                    '/web4/?widget=product/Tool/MapSettings/MapSettings|hideMap=true',
                },
Maofei94's avatar
Maofei94 committed
152 153 154 155
                {
                  tabName: '七参数配置',
                  type: 'sevenParams',
                },
陈前坚's avatar
陈前坚 committed
156
              ],
157
            },
陈前坚's avatar
陈前坚 committed
158 159
            {
              path: '/platformCenter/iot',
Maofei94's avatar
Maofei94 committed
160
              name: '物联平台',
陈前坚's avatar
陈前坚 committed
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
              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',
                },
              ],
            },
Maofei94's avatar
Maofei94 committed
180 181 182 183 184
            {
              path: '/platformCenter/order',
              name: '业务平台',
              component: JumpContainer,
            },
185 186 187
            {
              path: '/platformCenter/notify',
              name: '消息平台',
陈前坚's avatar
陈前坚 committed
188
              component: BaseFrameContainer,
张烨's avatar
张烨 committed
189 190 191 192 193 194 195 196 197 198 199 200
              tabs: [
                {
                  tabName: '推送模板配置',
                  url:
                    '/web4/?widget=product/oms/MessageTem/MessageTem|hideMap=true&state=scan',
                },
                {
                  tabName: '推送方案配置',
                  url:
                    '/web4/?widget=product/oms/MessageConfig/MessageConfig|hideMap=true',
                },
              ],
201 202 203 204
            },
            {
              path: '/platformCenter/emq',
              name: '宿主管理',
205 206
              url:
                '/web4/?widget=product/oms/MqttConfig/MqttConfig.js|hideMap=true',
陈前坚's avatar
陈前坚 committed
207
              component: BaseFrameContainer,
208 209 210 211 212 213
            },
          ],
        },
        {
          path: '/productCenter',
          component: BlankLayout,
张烨's avatar
张烨 committed
214
          name: '应用中心',
215 216 217 218
          icon: <HomeOutlined style={iconStyle} />,
          routes: [
            {
              path: '/productCenter/web',
陈前坚's avatar
陈前坚 committed
219
              name: 'Web配置',
220
              component: WebConfigPage,
221 222 223
            },
            {
              path: '/productCenter/app',
张烨's avatar
张烨 committed
224
              name: '移动应用配置',
225
              component: MobileConfigPage,
226
            },
陈前坚's avatar
陈前坚 committed
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246
          ],
        },
        {
          path: '/dataCenter',
          name: '数据中心',
          icon: <TableOutlined style={iconStyle} />,
          component: BlankLayout,
          routes: [
            {
              path: '/dataCenter/dictionary',
              name: '数据字典',
              component: Dictionary,
            },
            {
              path: '/dataCenter/video',
              name: '视频管理',
              url:
                '/web4/?widget=product/oms/VideoConfig/VideoConfig|hideMap=true&videoType=萤石云',
              component: BaseFrameContainer,
            },
247
          ],
248 249 250
        },
        {
          path: '/log',
251
          component: BlankLayout,
252
          name: '系统日志',
253 254 255 256
          icon: <CopyOutlined style={iconStyle} />,
          routes: [
            {
              path: '/log/service',
Maofei94's avatar
Maofei94 committed
257
              name: '服务监控',
陈前坚's avatar
陈前坚 committed
258
              component: ServiceLog,
259 260 261 262
            },
            {
              path: '/log/login',
              name: '登录日志',
陈前坚's avatar
陈前坚 committed
263
              component: LoginLog,
264 265
            },
            {
陈前坚's avatar
陈前坚 committed
266
              path: '/log/omsLog',
Maofei94's avatar
Maofei94 committed
267
              name: '运维痕迹',
陈前坚's avatar
陈前坚 committed
268
              component: OmsLog,
269 270
            },
          ],
陈前坚's avatar
陈前坚 committed
271
        },
dengxiaofeng's avatar
dengxiaofeng committed
272 273 274 275
      ],
    },
  ],
};