routes.ts 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757
  1. export const routes = [
  2. {
  3. path: '/user',
  4. // component: '../layouts/UserLayout',
  5. routes: [
  6. {
  7. name: 'login',
  8. path: '/user/login',
  9. component: './user/login2',
  10. },
  11. ],
  12. },
  13. {
  14. path: '/',
  15. component: '../layouts/SecurityLayout',
  16. routes: [
  17. {
  18. path: '/',
  19. component: '../layouts/BasicLayout',
  20. Routes: ['src/pages/Authorized'],
  21. routes: [
  22. {
  23. path: '/',
  24. redirect: '/analysis',
  25. },
  26. // {
  27. // name: '数据表格',
  28. // path: '/demo',
  29. // icon: 'table',
  30. // component: './demo'
  31. // },
  32. {
  33. name: '统计分析',
  34. path: '/analysis',
  35. icon: 'dashboard',
  36. tenant: ['admin', 'member'],
  37. iconfont: 'icon-tongjifenxi',
  38. component: './analysis',
  39. },
  40. {
  41. path: 'system',
  42. name: '系统设置',
  43. iconfont: 'icon-shezhi',
  44. icon: 'setting',
  45. tenant: ['admin', 'member'],
  46. authority: [
  47. 'user',
  48. 'permission',
  49. 'organization',
  50. 'dictionary',
  51. 'open-api',
  52. 'admin',
  53. 'system-config',
  54. 'dimension',
  55. 'tenant-side-manager',
  56. 'tenant-manager',
  57. ],
  58. routes: [
  59. {
  60. path: '/system/user',
  61. name: '用户管理',
  62. iconfont: 'icon-yonghuguanli',
  63. icon: 'user',
  64. authority: ['user', 'admin'],
  65. tenant: ['admin', 'member'],
  66. component: './system/users',
  67. },
  68. {
  69. path: '/system/permission',
  70. name: '权限管理',
  71. icon: 'key',
  72. iconfont: 'icon-quanxianguanli',
  73. authority: ['permission', 'admin'],
  74. component: './system/permission',
  75. },
  76. {
  77. path: '/system/open-api',
  78. name: '第三方平台',
  79. icon: 'share-alt',
  80. iconfont: 'icon-APIguanli',
  81. authority: ['open-api', 'admin'],
  82. version: 'pro',
  83. component: './system/open-api',
  84. },
  85. // {
  86. // path: '/system/org',
  87. // name: '机构管理',
  88. // icon: 'apartment',
  89. // iconfont: 'icon-jigoubianzhi',
  90. // authority: ['organization', 'admin'],
  91. // component: './system/org',
  92. // },
  93. {
  94. path: '/system/org-chart',
  95. name: '机构管理',
  96. icon: 'apartment',
  97. authority: ['organization', 'admin'],
  98. tenant: ['admin', 'member'],
  99. component: './system/org-chart',
  100. },
  101. {
  102. path: '/system/role',
  103. name: '角色管理',
  104. icon: 'usergroup-add',
  105. iconfont: 'icon-jiaoseguanli1',
  106. authority: ['dimension', 'admin'],
  107. component: './system/role',
  108. },
  109. {
  110. path: '/system/config',
  111. name: '系统配置',
  112. icon: 'tool',
  113. iconfont: 'icon-xitongpeizhi',
  114. authority: ['system-config', 'admin'],
  115. component: './system/config',
  116. },
  117. {
  118. path: '/system/tenant',
  119. name: '租户管理',
  120. icon: 'team',
  121. iconfont: 'icon-erji-zuhuguanli',
  122. tenant: ['admin'],
  123. authority: ['tenant-side-manager', 'tenant-manager', 'admin'],
  124. version: 'pro',
  125. component: './system/tenant',
  126. },
  127. {
  128. hideInMenu: true,
  129. path: '/system/tenant/detail/:id',
  130. name: '租户详情',
  131. tenant: ['admin'],
  132. authority: ['tenant-side-manager', 'tenant-manager', 'admin'],
  133. // version: 'pro',
  134. component: './system/tenant/detail',
  135. },
  136. {
  137. path:'/system/datasource',
  138. name:'数据源管理',
  139. icon:'database',
  140. authority:['datasource-config','admin'],
  141. version:'pro',
  142. component:'./system/datasource'
  143. }
  144. ],
  145. },
  146. {
  147. path: 'device',
  148. name: '设备管理',
  149. icon: 'box-plot',
  150. tenant: ['admin', 'member'],
  151. iconfont: 'icon-device-manage',
  152. authority: [
  153. 'device-product',
  154. 'device-instance',
  155. 'device-category',
  156. 'device-group',
  157. 'device-gateway',
  158. 'geo-manager',
  159. 'firmware-manager',
  160. 'device-alarm',
  161. 'admin',
  162. ],
  163. routes: [
  164. {
  165. path: '/device/product',
  166. name: '产品',
  167. icon: 'laptop',
  168. iconfont: 'icon-shebei',
  169. tenant: ['admin', 'member'],
  170. authority: ['device-product', 'admin'],
  171. component: './device/product',
  172. },
  173. {
  174. path: '/device/product-category',
  175. name: '产品分类',
  176. icon: 'appstore',
  177. iconfont: 'icon-shebei',
  178. tenant: ['admin', 'member'],
  179. // version: 'pro',
  180. authority: ['device-category', 'admin'],
  181. component: './device/product-category',
  182. },
  183. {
  184. hideInMenu: true,
  185. path: '/device/product/save/:id',
  186. name: '产品详情',
  187. tenant: ['admin', 'member'],
  188. iconfont: 'icon-shebei',
  189. authority: ['device-product', 'admin'],
  190. component: './device/product/save/Detail',
  191. },
  192. {
  193. hideInMenu: true,
  194. path: '/device/product/add',
  195. name: '新建产品',
  196. tenant: ['admin', 'member'],
  197. iconfont: 'icon-shebei',
  198. authority: ['device-product', 'admin'],
  199. component: './device/product/save/add/index.tsx',
  200. },
  201. {
  202. path: '/device/instance',
  203. name: '设备',
  204. icon: 'desktop',
  205. tenant: ['admin', 'member'],
  206. iconfont: 'icon-shebei1',
  207. authority: ['device-instance', 'admin'],
  208. component: './device/instance',
  209. },
  210. {
  211. hideInMenu: true,
  212. path: '/device/instance/save/:id',
  213. name: '设备详情',
  214. tenant: ['admin', 'member'],
  215. iconfont: 'icon-shebei1',
  216. authority: ['device-instance', 'admin'],
  217. component: './device/instance/editor',
  218. },
  219. {
  220. hideInMenu: true,
  221. path: '/device/group',
  222. name: '分组',
  223. icon: 'gold',
  224. tenant: ['admin', 'member'],
  225. authority: ['device-group', 'admin'],
  226. // version: 'pro',
  227. iconfont: 'icon-shebeifenzuguanli',
  228. component: './device/group',
  229. },
  230. {
  231. // hideInMenu: true,
  232. path: '/device/tree',
  233. name: '分组',
  234. tenant: ['admin', 'member'],
  235. authority: ['device-group', 'admin'],
  236. // version: 'pro',
  237. icon: 'gold',
  238. component: './device/tree',
  239. },
  240. {
  241. hideInMenu: true,
  242. path: '/device/tree/detail',
  243. name: '分组详情',
  244. authority: ['device-group', 'admin'],
  245. component: './device/tree/DeviceTree',
  246. },
  247. {
  248. hideInMenu: true,
  249. path: '/device/instance/add',
  250. name: '添加设备',
  251. tenant: ['admin', 'member'],
  252. authority: ['device-instance', 'admin'],
  253. iconfont: 'icon-shebeifenzuguanli',
  254. component: './device/instance/editor',
  255. },
  256. {
  257. path: '/device/gateway',
  258. name: '网关',
  259. icon: 'global',
  260. tenant: ['admin', 'member'],
  261. iconfont: 'icon-Group',
  262. authority: ['device-gateway', 'admin'],
  263. component: './device/gateway',
  264. },
  265. {
  266. path: '/device/location',
  267. name: '地理位置',
  268. icon: 'compass',
  269. tenant: ['admin'],
  270. authority: ['geo-manager', 'admin'],
  271. // version: 'pro',
  272. iconfont: 'icon-diliweizhi',
  273. component: './device/location',
  274. },
  275. {
  276. path: '/device/firmware',
  277. name: '固件升级',
  278. icon: 'cloud-sync',
  279. tenant: ['admin', 'member'],
  280. authority: ['firmware-manager', 'admin'],
  281. // version: 'pro',
  282. iconfont: 'icon-gujianshengji',
  283. component: './device/firmware',
  284. },
  285. {
  286. hideInMenu: true,
  287. tenant: ['admin', 'member'],
  288. path: '/device/firmware/save/:id',
  289. name: '固件详情',
  290. authority: ['firmware-manager', 'admin'],
  291. iconfont: 'icon-gujianshengji',
  292. component: './device/firmware/editor',
  293. },
  294. {
  295. path: '/device/alarm',
  296. name: '设备告警',
  297. icon: 'alert',
  298. tenant: ['admin', 'member'],
  299. authority: ['device-alarm', 'admin'],
  300. component: './device/alarmlog',
  301. },
  302. {
  303. path:'/device/command',
  304. name:'指令下发',
  305. icon:'arrow-down',
  306. authority:['device-msg-task','admin'],
  307. // version: 'pro',
  308. component:'./device/command'
  309. }
  310. ],
  311. },
  312. {
  313. path: 'network',
  314. name: '设备接入',
  315. iconfont: 'icon-shebei',
  316. icon: 'login',
  317. authority: [
  318. 'certificate',
  319. 'network-config',
  320. 'device-gateway',
  321. 'protocol-supports',
  322. 'opc-client',
  323. 'admin',
  324. ],
  325. routes: [
  326. {
  327. path: '/network/certificate',
  328. name: '证书管理',
  329. icon: 'book',
  330. iconfont: 'icon-zhengshuguanli-',
  331. authority: ['certificate', 'admin'],
  332. component: './network/certificate',
  333. },
  334. {
  335. path: '/network/protocol',
  336. name: '协议管理',
  337. icon: 'wallet',
  338. iconfont: 'icon-xieyiguanli',
  339. authority: ['protocol-supports', 'admin'],
  340. component: './device/protocol',
  341. },
  342. {
  343. path: '/network/type',
  344. name: '网络组件',
  345. icon: 'deployment-unit',
  346. iconfont: 'icon-zujian',
  347. authority: ['network-config', 'admin'],
  348. component: './network/type',
  349. },
  350. {
  351. path: '/network/gateway',
  352. name: '设备网关',
  353. icon: 'cloud-server',
  354. iconfont: 'icon-shebei',
  355. authority: ['device-gateway', 'admin'],
  356. component: './network/gateway',
  357. },
  358. {
  359. path: '/network/opcua',
  360. name: 'OPC UA',
  361. icon: 'file-ppt',
  362. iconfont: 'icon-fileppt',
  363. authority: ['opc-client', 'admin'],
  364. component: './network/opc-ua',
  365. },
  366. ],
  367. },
  368. {
  369. path: 'notice',
  370. name: '通知管理',
  371. iconfont: 'icon-tongzhiguanli',
  372. icon: 'message',
  373. tenant: ['admin', 'member'],
  374. authority: ['template', 'notifier', 'admin'],
  375. routes: [
  376. {
  377. path: '/notice/config',
  378. name: '通知配置',
  379. icon: 'alert',
  380. tenant: ['admin', 'member'],
  381. iconfont: 'icon-SUI_tongzhipeizhi',
  382. authority: ['notifier', 'admin'],
  383. component: './notice/config',
  384. },
  385. {
  386. path: '/notice/template',
  387. name: '通知模版',
  388. icon: 'bell',
  389. tenant: ['admin', 'member'],
  390. iconfont: 'icon-tongzhiguanli',
  391. authority: ['template', 'admin'],
  392. component: './notice/template',
  393. },
  394. ],
  395. },
  396. {
  397. path: 'rule-engine',
  398. name: '规则引擎',
  399. icon: 'retweet',
  400. iconfont: 'icon-guizeyinqing',
  401. // tenant: ['admin', 'member'],
  402. authority: ['rule-instance', 'rule-scene', 'admin'],
  403. routes: [
  404. // {
  405. // path: '/rule-engine/model',
  406. // name: '规则模型',
  407. // icon: 'gateway',
  408. // tenant: ['admin'],
  409. // iconfont: 'icon-xian-buguize-moxing',
  410. // authority: ['rule-model', 'admin'],
  411. // version: 'pro',
  412. // component: './rule-engine/model',
  413. // },
  414. {
  415. path: '/rule-engine/instance',
  416. name: '规则实例',
  417. icon: 'block',
  418. tenant: ['admin', 'member'],
  419. iconfont: 'icon-hangweiguizeshili',
  420. authority: ['rule-instance', 'admin'],
  421. version: 'pro',
  422. component: './rule-engine/instance',
  423. },
  424. {
  425. path: '/rule-engine/sqlRule',
  426. name: '数据转发',
  427. icon: 'rise',
  428. tenant: ['admin', 'member'],
  429. iconfont: 'icon-datatransfer',
  430. authority: ['rule-instance', 'admin'],
  431. component: './rule-engine/sqlRule',
  432. },
  433. {
  434. path: '/rule-engine/scene',
  435. name: '场景联动',
  436. icon: 'codeSandbox',
  437. // authority: ['rule-scene', 'admin'],
  438. // version: 'pro',
  439. component: './rule-engine/scene',
  440. },
  441. // {
  442. // path: '/rule-engine/email',
  443. // name: 'email',
  444. // icon: 'mail',
  445. // component: './rule-engine/email',
  446. // },
  447. // {
  448. // path: '/rule-engine/sms',
  449. // name: 'sms',
  450. // icon: 'message',
  451. // component: './rule-engine/sms',
  452. // },
  453. ],
  454. },
  455. {
  456. path: 'data-screen',
  457. name: '可视化',
  458. icon: 'desktop',
  459. tenant: ['admin'],
  460. iconfont: 'icon-icon-',
  461. // version: 'pro',
  462. authority: ['big-screen', 'admin', 'vis-configuration'],
  463. routes: [
  464. {
  465. path: '/data-screen/category',
  466. name: '分类管理',
  467. icon: 'appstore',
  468. tenant: ['admin'],
  469. iconfont: 'icon-category-search-fill',
  470. authority: ['big-screen', 'admin'],
  471. // version: 'pro',
  472. component: './data-screen/category',
  473. },
  474. {
  475. path: '/data-screen/screen',
  476. name: '大屏管理',
  477. icon: 'fund',
  478. tenant: ['admin', 'big-screen'],
  479. iconfont: 'icon-screen',
  480. authority: ['big-screen', 'admin'],
  481. // version: 'pro',
  482. component: './data-screen/screen',
  483. },
  484. {
  485. path: '/data-screen/configuration',
  486. name: '组态管理',
  487. icon: 'fund',
  488. iconfont: 'icon-screen',
  489. authority: ['vis-configuration', 'admin'],
  490. // version: 'pro',
  491. component: './data-screen/visConfiguration',
  492. },
  493. {
  494. path: '/data-screen/node',
  495. name: '组件管理',
  496. icon: 'fund',
  497. component: './data-screen/node',
  498. },
  499. ],
  500. },
  501. {
  502. path: 'simulator',
  503. name: '模拟测试',
  504. icon: 'bug',
  505. // version: 'pro',
  506. authority: ['network-simulator', 'admin'],
  507. routes: [
  508. {
  509. path: '/simulator/device',
  510. name: '设备模拟器',
  511. // version: 'pro',
  512. icon: 'paper-clip',
  513. authority: ['network-simulator', 'admin'],
  514. component: './simulator/device',
  515. },
  516. ],
  517. },
  518. {
  519. path: 'logger',
  520. name: '日志管理',
  521. icon: 'calendar',
  522. iconfont: 'icon-rizhiguanli',
  523. authority: ['system-logger', 'access-logger', 'admin'],
  524. routes: [
  525. {
  526. path: '/logger/access',
  527. name: '访问日志',
  528. icon: 'dash',
  529. iconfont: 'icon-yonghufangwenrizhi',
  530. authority: ['access-logger', 'admin'],
  531. component: './logger/access',
  532. },
  533. {
  534. path: '/logger/system',
  535. name: '系统日志',
  536. icon: 'ordered-list',
  537. iconfont: 'icon-xitongrizhi',
  538. authority: ['system-logger', 'admin'],
  539. component: './logger/system',
  540. },
  541. ],
  542. },
  543. {
  544. path: 'cloud',
  545. name: '云云对接',
  546. icon: 'cloud',
  547. // version: 'pro',
  548. authority: ['dueros-product', 'aliyun-bridge', 'onenet-product', 'ctwing-product', 'admin'],
  549. routes: [
  550. {
  551. path: '/cloud/duer',
  552. name: 'DuerOS',
  553. // version: 'pro',
  554. authority: ['dueros-product', 'admin'],
  555. icon: 'cloud',
  556. component: './cloud/dueros',
  557. },
  558. {
  559. path: '/cloud/aliyun',
  560. name: '阿里云',
  561. version: 'pro',
  562. authority: ['aliyun-bridge', 'admin'],
  563. icon: 'aliyun',
  564. component: './cloud/aliyun',
  565. },
  566. {
  567. path: '/cloud/onenet',
  568. name: '移动OneNet',
  569. // version: 'pro',
  570. authority: ['onenet-product', 'admin'],
  571. icon: 'mobile',
  572. component: './cloud/onenet',
  573. },
  574. {
  575. path: '/cloud/ctwing',
  576. name: '电信CTWing',
  577. // version: 'pro',
  578. authority: ['ctwing-product', 'admin'],
  579. icon: 'phone',
  580. component: './cloud/ctwing',
  581. },
  582. ],
  583. },
  584. {
  585. path: 'media',
  586. name: '视频网关',
  587. icon: 'youtube',
  588. // version: 'pro',
  589. authority: [
  590. 'gb28181-gateway',
  591. 'media-gateway',
  592. 'media-channel',
  593. 'media-server',
  594. 'media-stream',
  595. 'gb28181-cascade',
  596. 'admin'
  597. ],
  598. routes: [
  599. {
  600. path: '/media/basic',
  601. name: '基本配置',
  602. // version: 'pro',
  603. authority: ['gb28181-gateway', 'media-gateway', 'media-server', 'admin'],
  604. icon: 'video-camera',
  605. component: './media/basic',
  606. },
  607. // {
  608. // path: '/media/media-server',
  609. // name: '流媒体服务',
  610. // version: 'pro',
  611. // authority: ['media-server','admin'],
  612. // icon: 'video-camera',
  613. // component: './media/media-server',
  614. // },
  615. // {
  616. // path: '/media/gateway',
  617. // name: '信令服务',
  618. // version: 'pro',
  619. // authority: ['gb28181-gateway','admin'],
  620. // icon: 'gateway',
  621. // component: './media/gateway',
  622. // },
  623. {
  624. path: '/media/device',
  625. name: '视频设备',
  626. // version: 'pro',
  627. authority: ['media-device', 'admin'],
  628. icon: 'gateway',
  629. component: './media/device',
  630. },
  631. {
  632. hideInMenu: true,
  633. path: '/media/device/channel/:id',
  634. name: '通道列表',
  635. // version: 'pro',
  636. tenant: ['admin', 'member'],
  637. iconfont: 'icon-shebei1',
  638. component: './media/device/channel',
  639. },
  640. {
  641. path: '/media/reveal',
  642. name: '分屏展示',
  643. // version: 'pro',
  644. authority: ['media-stream', 'admin'],
  645. icon: 'appstore',
  646. component: './media/reveal',
  647. },
  648. {
  649. path: '/media/cascade',
  650. name: '国标级联',
  651. // version: 'pro',
  652. authority: ['gb28181-cascade', 'admin'],
  653. icon: 'cloud-upload',
  654. component: './media/cascade',
  655. },
  656. ],
  657. },
  658. {
  659. path: 'edge-gateway',
  660. name: '边缘网关',
  661. icon: 'gateway',
  662. version: 'pro',
  663. authority: ['edge-product', 'edge-device', 'admin'],
  664. routes: [
  665. {
  666. path: '/edge-gateway/product',
  667. name: '产品',
  668. icon: 'laptop',
  669. authority: ['edge-product', 'admin'],
  670. component: './edge-gateway/product',
  671. },
  672. {
  673. path: '/edge-gateway/device',
  674. name: '设备',
  675. icon: 'desktop',
  676. authority: ['edge-device', 'admin'],
  677. component: './edge-gateway/device',
  678. },
  679. {
  680. hideInMenu: true,
  681. path: '/edge-gateway/device/detail/:id',
  682. name: '设备详情',
  683. authority: ['edge-device', 'admin'],
  684. component: './edge-gateway/device/detail',
  685. },
  686. {
  687. hideInMenu: true,
  688. path: '/edge-gateway/device/detail/:id/save/:id',
  689. name: '网关设备详情',
  690. authority: ['edge-device', 'admin'],
  691. component: './edge-gateway/device/detail/network/device/editor',
  692. },
  693. ],
  694. },
  695. {
  696. path: 'account',
  697. name: '个人中心',
  698. icon: 'user',
  699. hideInMenu: true,
  700. routes: [
  701. // {
  702. // path: '/account/center',
  703. // name: '个人中心',
  704. // icon: 'smile',
  705. // component: './account/center'
  706. // },
  707. {
  708. path: '/account/settings',
  709. name: '个人设置',
  710. icon: 'setting',
  711. component: './account/settings',
  712. },
  713. {
  714. path: '/account/notification',
  715. name: '通知订阅',
  716. icon: 'bell',
  717. component: './account/notification',
  718. },
  719. ],
  720. },
  721. // {
  722. // name: 'paramter',
  723. // path: '/properties',
  724. // inco: 'bar-chart',
  725. // component: './script-demo',
  726. // },
  727. {
  728. name: 'exception',
  729. icon: 'smile',
  730. path: '/exception',
  731. hideInMenu: true,
  732. routes: [
  733. {
  734. path: './500',
  735. name: '500',
  736. component: './exception/500',
  737. },
  738. {
  739. path: './404',
  740. name: '404',
  741. component: './exception/404',
  742. },
  743. {
  744. path: './403',
  745. name: '403',
  746. component: './exception/403',
  747. },
  748. ],
  749. },
  750. ],
  751. },
  752. {
  753. component: './404',
  754. },
  755. ],
  756. },
  757. ];