configs.ts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. import { useDictionaryStoreHook } from "@/store";
  2. const { dicts } = useDictionaryStoreHook();
  3. export const getTableConfig = (id: string) => {
  4. return {
  5. // 获取工序记录项信息信息
  6. jiluxiang: {
  7. url: `/api/v1/op/operationRecord`,
  8. column: [
  9. {
  10. label: "工序id",
  11. prop: "operationId",
  12. display: false,
  13. hide: true,
  14. value: id,
  15. },
  16. { label: "记录项", prop: "thName" },
  17. {
  18. label: "单位",
  19. prop: "unit",
  20. search: true,
  21. filterable: true,
  22. type: "select",
  23. dataType: "string",
  24. dicData: dicts.danwei_type,
  25. props: { label: "dictLabel", value: "dictValue" },
  26. },
  27. { label: "标准值", prop: "standard" },
  28. { label: "上限值", prop: "upper" },
  29. { label: "下限值", prop: "lower" },
  30. ],
  31. },
  32. FACTORY: {
  33. url: "/api/v1/base/workShop",
  34. column: [
  35. {
  36. label: "车间名称",
  37. prop: "name",
  38. search: true,
  39. },
  40. {
  41. label: "车间负责人",
  42. prop: "manager",
  43. rules: [
  44. {
  45. required: true,
  46. message: "请选择厂区负责人",
  47. trigger: "blur",
  48. },
  49. ],
  50. type: "select",
  51. dicUrl: import.meta.env.VITE_APP_BASE_API + "/api/v1/sys/user/list",
  52. dicMethod: "post",
  53. props: {
  54. label: "userName", // 下拉菜单显示的字段
  55. value: "userName", // 下拉菜单值的字段
  56. },
  57. },
  58. {
  59. label: "车间位置",
  60. prop: "position",
  61. },
  62. {
  63. label: "所属工厂",
  64. prop: "factoryName",
  65. display: false,
  66. },
  67. {
  68. label: "车间描述",
  69. prop: "remark",
  70. },
  71. {
  72. label: "创建人",
  73. prop: "creator",
  74. display: false,
  75. },
  76. {
  77. label: "创建时间",
  78. prop: "created",
  79. display: false,
  80. },
  81. ],
  82. },
  83. };
  84. };
  85. // 工艺工序组件路径的组件类别
  86. interface comType {
  87. compentName: string;
  88. compentType: string;
  89. }
  90. export const comTypes: comType[] = [
  91. {
  92. compentName: "记录项",
  93. compentType: "jiluxiang",
  94. },
  95. {
  96. compentName: "物料采集",
  97. compentType: "wuliaocaiji",
  98. },
  99. {
  100. compentName: "ESOP",
  101. compentType: "ESOP",
  102. },
  103. {
  104. compentName: "点检",
  105. compentType: "dianjian",
  106. },
  107. {
  108. compentName: "设备记录",
  109. compentType: "shebeijilu",
  110. },
  111. {
  112. compentName: "紧固",
  113. compentType: "jingu",
  114. },
  115. {
  116. compentName: "调试配对",
  117. compentType: "tiaoshipipei",
  118. },
  119. {
  120. compentName: "铭牌绑定",
  121. compentType: "mingpai",
  122. },
  123. {
  124. compentName: "多媒体采集",
  125. compentType: "duomeiticaiji",
  126. },
  127. ];