columns.ts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. import { useDictionaryStoreHook } from "@/store";
  2. const { dicts } = useDictionaryStoreHook();
  3. export const columns = [
  4. {
  5. label: "物料编号",
  6. prop: "materialCode",
  7. search: true,
  8. rules: [{
  9. required: true,
  10. message: "请选择物料编号",
  11. trigger: "blur"
  12. }],
  13. },
  14. {
  15. label: "产能",
  16. prop: "capacity",
  17. search: true,
  18. rules: [{
  19. required: true,
  20. message: "请填写产能",
  21. trigger: "blur"
  22. }],
  23. },
  24. {
  25. label: "工位类型",
  26. prop: "stationDictValue",
  27. search: true,
  28. rules: [{
  29. required: true,
  30. message: "请选择工位类型",
  31. trigger: "blur"
  32. }],
  33. type: 'select',
  34. dicData:dicts.station_type,
  35. searchClearable: false, //可清空的输入框,默认为true
  36. filterable: true, //添加filterable属性即可启用搜索功能
  37. props: {
  38. label: "dictLabel", // 下拉菜单显示的字段
  39. value: "dictValue" // 下拉菜单值的字段
  40. },
  41. },
  42. {
  43. label: "工位操作方式",
  44. prop: "operateDictValue",
  45. rules: [{
  46. required: true,
  47. message: "请选择工位方式",
  48. trigger: "blur"
  49. }],
  50. type: 'select',
  51. dicData:dicts.station_operate_type,
  52. props: {
  53. label: "dictLabel", // 下拉菜单显示的字段
  54. value: "dictValue" // 下拉菜单值的字
  55. },
  56. },
  57. {
  58. label: "工位负责人",
  59. prop: "manager",
  60. rules: [{
  61. required: true,
  62. message: "请选择工位负责人",
  63. trigger: "blur"
  64. }],
  65. type: 'select',
  66. dicUrl:import.meta.env.VITE_APP_BASE_API+"/api/v1/sys/user/list",
  67. dicMethod:"post",
  68. props: {
  69. label: "userName", // 下拉菜单显示的字段
  70. value: "userName" // 下拉菜单值的字段
  71. },
  72. },
  73. {
  74. label: "所属产线",
  75. prop: "productionLineName",
  76. display:false
  77. },
  78. {
  79. label: "工位地址",
  80. prop: "position",
  81. rules: [{
  82. required: true,
  83. message: "请填写工位地址",
  84. trigger: "blur"
  85. }],
  86. },
  87. {
  88. label: "工位IP地址",
  89. prop: "stationIp",
  90. rules: [{
  91. required: true,
  92. message: "请填写工位IP地址",
  93. trigger: "blur",
  94. }],
  95. },
  96. {
  97. label: "工位描述",
  98. prop: "remark",
  99. type: 'textarea',
  100. span: 24,
  101. },
  102. {
  103. label: "创建人",
  104. prop: "creator",
  105. display:false
  106. },
  107. {
  108. label: "创建时间",
  109. prop: "created",
  110. display:false
  111. },
  112. ]