data.ts 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. import { FormSchema } from '/@/components/Form';
  2. const basicOptions: SelectOptions = [
  3. {
  4. label: '付晓晓',
  5. value: '1',
  6. },
  7. {
  8. label: '周毛毛',
  9. value: '2',
  10. },
  11. ];
  12. const storeTypeOptions: SelectOptions = [
  13. {
  14. label: '私密',
  15. value: '1',
  16. },
  17. {
  18. label: '公开',
  19. value: '2',
  20. },
  21. ];
  22. export const schemas: FormSchema[] = [
  23. {
  24. field: 'f1',
  25. component: 'Input',
  26. label: '仓库名',
  27. required: true,
  28. },
  29. {
  30. field: 'f2',
  31. component: 'Input',
  32. label: '仓库域名',
  33. required: true,
  34. componentProps: {
  35. addonBefore: 'http://',
  36. addonAfter: 'com',
  37. },
  38. colProps: {
  39. offset: 2,
  40. },
  41. },
  42. {
  43. field: 'f3',
  44. component: 'Select',
  45. label: '仓库管理员',
  46. componentProps: {
  47. options: basicOptions,
  48. },
  49. required: true,
  50. colProps: {
  51. offset: 2,
  52. },
  53. },
  54. {
  55. field: 'f4',
  56. component: 'Select',
  57. label: '审批人',
  58. componentProps: {
  59. options: basicOptions,
  60. },
  61. required: true,
  62. },
  63. {
  64. field: 'f5',
  65. component: 'RangePicker',
  66. label: '生效日期',
  67. required: true,
  68. colProps: {
  69. offset: 2,
  70. },
  71. },
  72. {
  73. field: 'f6',
  74. component: 'Select',
  75. label: '仓库类型',
  76. componentProps: {
  77. options: storeTypeOptions,
  78. },
  79. required: true,
  80. colProps: {
  81. offset: 2,
  82. },
  83. },
  84. ];
  85. export const taskSchemas: FormSchema[] = [
  86. {
  87. field: 't1',
  88. component: 'Input',
  89. label: '任务名',
  90. required: true,
  91. },
  92. {
  93. field: 't2',
  94. component: 'Input',
  95. label: '任务描述',
  96. required: true,
  97. colProps: {
  98. offset: 2,
  99. },
  100. },
  101. {
  102. field: 't3',
  103. component: 'Select',
  104. label: '执行人',
  105. componentProps: {
  106. options: basicOptions,
  107. },
  108. required: true,
  109. colProps: {
  110. offset: 2,
  111. },
  112. },
  113. {
  114. field: 't4',
  115. component: 'Select',
  116. label: '责任人',
  117. componentProps: {
  118. options: basicOptions,
  119. },
  120. required: true,
  121. },
  122. {
  123. field: 't5',
  124. component: 'TimePicker',
  125. label: '生效日期',
  126. required: true,
  127. componentProps: {
  128. style: { width: '100%' },
  129. },
  130. colProps: {
  131. offset: 2,
  132. },
  133. },
  134. {
  135. field: 't6',
  136. component: 'Select',
  137. label: '任务类型',
  138. componentProps: {
  139. options: storeTypeOptions,
  140. },
  141. required: true,
  142. colProps: {
  143. offset: 2,
  144. },
  145. },
  146. ];