process.ts 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. import { useUserStore } from "@/store/modules/user";
  2. const Layout = () => import("@/layout/index.vue");
  3. export default {
  4. path: "/",
  5. name: "/",
  6. component: Layout,
  7. redirect: "/process",
  8. children: [
  9. {
  10. path: "process",
  11. component: () => import("@/views/process/main.vue"),
  12. name: "ProcessMain",
  13. meta: {
  14. title: "process",
  15. },
  16. },
  17. {
  18. path: "pro-steps",
  19. component: () => import("@/views/pro-steps/index.vue"),
  20. name: "ProSteps",
  21. meta: {
  22. title: "",
  23. keepAlive: true,
  24. back: true,
  25. },
  26. children: [
  27. {
  28. path: "dianjian",
  29. component: () => import("@/views/pro-steps/components/dianjian.vue"),
  30. name: "Dianjian",
  31. meta: {
  32. back: true,
  33. },
  34. },
  35. {
  36. path: "duomeiticaiji",
  37. component: () =>
  38. import("@/views/pro-steps/components/duomeiticaiji.vue"),
  39. name: "Duomeiticaiji",
  40. meta: {
  41. back: true,
  42. },
  43. },
  44. {
  45. path: "esop",
  46. component: () => import("@/views/pro-steps/components/ESOP.vue"),
  47. name: "Esop",
  48. meta: {
  49. back: true,
  50. },
  51. },
  52. {
  53. path: "jingu",
  54. component: () => import("@/views/pro-steps/components/jingu.vue"),
  55. name: "Jingu",
  56. meta: {
  57. back: true,
  58. },
  59. },
  60. {
  61. path: "excel",
  62. component: () => import("@/views/pro-steps/components/excel.vue"),
  63. name: "Excel",
  64. meta: {
  65. back: true,
  66. },
  67. },
  68. {
  69. path: "mingpaibangding",
  70. component: () =>
  71. import("@/views/pro-steps/components/mingpaibangding.vue"),
  72. name: "Mingpaibangding",
  73. meta: {
  74. back: true,
  75. },
  76. },
  77. {
  78. path: "jiluxiang",
  79. component: () => import("@/views/pro-steps/components/jiluxiang.vue"),
  80. name: "Jiluxiang",
  81. meta: {
  82. back: true,
  83. keepAlive: true,
  84. },
  85. },
  86. {
  87. path: "shebeijilu",
  88. component: () =>
  89. import("@/views/pro-steps/components/shebeijilu.vue"),
  90. name: "Shebeijilu",
  91. meta: {
  92. back: true,
  93. },
  94. },
  95. {
  96. path: "tiaoshipipei",
  97. component: () =>
  98. import("@/views/pro-steps/components/tiaoshipipei.vue"),
  99. name: "Tiaoshipipei",
  100. meta: {
  101. back: true,
  102. },
  103. },
  104. {
  105. path: "wuliaocaiji",
  106. component: () =>
  107. import("@/views/pro-steps/components/wuliaocaiji.vue"),
  108. name: "Wuliaocaiji",
  109. meta: {
  110. back: true,
  111. keepAlive: true,
  112. },
  113. },
  114. ],
  115. },
  116. {
  117. path: "call-materiel",
  118. component: () => import("@/views/pro-operation/call-materiel/index.vue"),
  119. name: "call-materiel",
  120. meta: {
  121. title: "叫料",
  122. back: true,
  123. },
  124. },
  125. {
  126. path: "drawing",
  127. component: () => import("@/views/pro-operation/drawing/index.vue"),
  128. name: "drawing-list",
  129. meta: {
  130. title: "图纸",
  131. back: true,
  132. },
  133. },
  134. {
  135. path: "appoint",
  136. component: () => import("@/views/pro-operation/appoint-out/index.vue"),
  137. name: "appoint-out",
  138. meta: {
  139. title: "委外",
  140. back: true,
  141. },
  142. },
  143. {
  144. path: "material-flow",
  145. component: () => import("@/views/material-flow/index.vue"),
  146. name: "material-flow",
  147. meta: {
  148. title: "物料流转",
  149. back: true,
  150. },
  151. },
  152. {
  153. path: "station-up-material",
  154. component: () =>
  155. import("@/views/pro-operation/station-up-material/index.vue"),
  156. name: "station-up-material",
  157. meta: {
  158. title: "工位上料",
  159. back: true,
  160. },
  161. },
  162. {
  163. path: "traceability/:id?",
  164. component: () => import("@/views/traceability/index.vue"),
  165. name: "traceability",
  166. meta: {
  167. title: "生产履历",
  168. back: true,
  169. },
  170. },
  171. {
  172. path: "checkOut",
  173. component: () => import("@/views/pro-operation/check-out/index.vue"),
  174. name: "checkOut",
  175. meta: {
  176. title: "检验",
  177. back: true,
  178. },
  179. },
  180. {
  181. path: "rework",
  182. component: () => import("@/views/pro-operation/rework/index.vue"),
  183. name: "rework",
  184. meta: {
  185. title: "返工/剔除",
  186. back: true,
  187. },
  188. },
  189. ],
  190. beforeEnter: (to, from, next) => {
  191. const store = useUserStore();
  192. if (store.user.stationType == "5") {
  193. next({ path: "/prepare" });
  194. } else {
  195. next();
  196. }
  197. },
  198. };