micro-app.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. import store from './store';
  2. import fileMain from '@/components/addDoc/index.vue';
  3. const microApps = [
  4. {
  5. name: 'wt',
  6. entry: '/wt/',
  7. activeRule: '/page-wt'
  8. },
  9. {
  10. name: 'page-main-data',
  11. // entry: 'http://localhost:8081/main-data/',
  12. entry: '/main-data/',
  13. activeRule: '/page-main-data'
  14. },
  15. {
  16. name: 'mes',
  17. entry: '/mes/',
  18. activeRule: '/page-mes'
  19. },
  20. {
  21. name: 'eam',
  22. // entry: 'http://localhost:8083/eam/',
  23. entry: '/eam/',
  24. activeRule: '/page-eam'
  25. },
  26. {
  27. name: 'aps',
  28. entry: '/aps/',
  29. activeRule: '/page-aps'
  30. },
  31. {
  32. name: 'wms',
  33. entry: '/wms/',
  34. activeRule: '/page-wms'
  35. },
  36. {
  37. name: 'qms',
  38. entry: '/qms/',
  39. activeRule: '/page-qms'
  40. },
  41. {
  42. name: 'eos',
  43. entry: '/eos/',
  44. activeRule: '/page-eos'
  45. },
  46. {
  47. name: 'vis',
  48. entry: '/vis/',
  49. activeRule: '/page-vis'
  50. },
  51. {
  52. name: 'pro',
  53. entry: '/pro/',
  54. activeRule: '/page-pro'
  55. },
  56. {
  57. name: 'fm',
  58. entry: '/fm/',
  59. activeRule: '/page-fm'
  60. },
  61. {
  62. name: 'pcs',
  63. // entry: 'http://localhost:8080/pcs/',
  64. entry: '/pcs/',
  65. activeRule: '/page-pcs'
  66. }
  67. ];
  68. const apps = microApps.map((item) => {
  69. return {
  70. ...item,
  71. container: '#micro-container', // 子应用挂载的div
  72. props: {
  73. routerBase: item.activeRule, // 下发基础路由
  74. parentWindow: window,
  75. fileMain, //文档上传组件 下发给子应用
  76. store
  77. }
  78. };
  79. });
  80. export default apps;