data.ts 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. import { FormSchema } from '/@/components/Form';
  2. import { radioBoolean } from '/@/utils/filters';
  3. export const dataFormSchema: FormSchema[] = [
  4. {
  5. field: 'PlainTitle',
  6. component: 'PlainTitle',
  7. defaultValue: '检测时间',
  8. colProps: {
  9. span: 24,
  10. },
  11. },
  12. // {
  13. // field: 'PlainText',
  14. // component: 'PlainText',
  15. // label: '检测时间',
  16. // defaultValue: '2023-12-12 12:12:12',
  17. // colProps: {
  18. // span: 24,
  19. // },
  20. // },
  21. {
  22. field: 'configName',
  23. label: '参数名称',
  24. labelColor: '#818694',
  25. component: 'Input',
  26. componentProps: {
  27. placeholder: '请输入参数名称',
  28. extra: '123123',
  29. },
  30. },
  31. {
  32. field: 'configName1',
  33. label: '参数名称',
  34. labelColor: '#818694',
  35. component: 'Input',
  36. componentProps: {
  37. placeholder: '请输入参数名称',
  38. extra: '123123',
  39. },
  40. },
  41. {
  42. field: 'configName22',
  43. label: '参数名称',
  44. labelColor: '#818694',
  45. component: 'Input',
  46. componentProps: {
  47. placeholder: '请输入参数名称',
  48. extra: '123123',
  49. },
  50. },
  51. {
  52. field: 'configKey',
  53. label: '参数键名',
  54. labelColor: '#818694',
  55. subLabel: '测试',
  56. subLabelColor: '#FF5D39',
  57. component: 'Input',
  58. required: true,
  59. componentProps: {
  60. placeholder: '请输入参数键名',
  61. // style: { width: '200px' },
  62. },
  63. },
  64. {
  65. field: 'configValue',
  66. label: '参数键值',
  67. component: 'InputNumberGroup',
  68. componentProps: ({ formModel }) => {
  69. return {
  70. options: [
  71. { min: 0, max: 200, placeholder: '最小值 0', field: 'min' },
  72. { min: 0, max: 200, placeholder: '最大值 200', field: 'max' },
  73. ],
  74. onChange: e => {
  75. return (formModel['configValue'] = e);
  76. },
  77. };
  78. },
  79. },
  80. {
  81. field: 'sort',
  82. label: '排序',
  83. component: 'InputNumber',
  84. required: true,
  85. defaultValue: '1',
  86. componentProps: {
  87. placeholder: '请输入排序',
  88. min: 1,
  89. },
  90. },
  91. {
  92. field: 'sysInner',
  93. label: '系统内置',
  94. component: 'RadioGroup',
  95. componentProps: {
  96. options: radioBoolean,
  97. disabled: true,
  98. },
  99. defaultValue: '1',
  100. },
  101. // {
  102. // field: 'disable',
  103. // label: '状态',
  104. // component: 'RadioGroup',
  105. // required: true,
  106. // componentProps: {
  107. // options: radioSwitch,
  108. // },
  109. // defaultValue: '0',
  110. // },
  111. {
  112. label: '备注',
  113. field: 'remark',
  114. component: 'InputTextArea',
  115. componentProps: {
  116. placeholder: '请输入备注',
  117. },
  118. },
  119. ];