point.data.ts 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. import { BasicColumn } from '/@/components/Table';
  2. import { FormSchema } from '/@/components/Table';
  3. import { selectDevice } from './point.api';
  4. import { rules } from '/@/utils/helper/validator';
  5. import { render } from '/@/utils/common/renderUtils';
  6. export const columns: BasicColumn[] = [
  7. {
  8. title: '设备类型',
  9. dataIndex: 'devicekind_dictText',
  10. width: 120,
  11. },
  12. {
  13. title: '设备类型code',
  14. dataIndex: 'devicekind',
  15. width: 120,
  16. },
  17. {
  18. title: 'plc地址',
  19. dataIndex: 'plcaddr',
  20. width: 100,
  21. },
  22. {
  23. title: 'plc读写位数',
  24. dataIndex: 'floatnum',
  25. width: 100,
  26. // customRender: render.renderAvatar,
  27. },
  28. {
  29. title: '读写类型',
  30. dataIndex: 'datakind_dictText',
  31. width: 80,
  32. // sorter: true,
  33. // customRender: ({ text }) => {
  34. // return render.renderDict(text, 'sex');
  35. // },
  36. },
  37. {
  38. title: '值名称',
  39. dataIndex: 'valuename',
  40. width: 100,
  41. },
  42. {
  43. title: '值code',
  44. dataIndex: 'valuecode',
  45. width: 100,
  46. },
  47. {
  48. title: '值类型',
  49. width: 150,
  50. dataIndex: 'valuetype_dictText',
  51. },
  52. {
  53. title: '最小值',
  54. width: 100,
  55. dataIndex: 'fmin',
  56. },
  57. {
  58. title: '最大值',
  59. dataIndex: 'fmax',
  60. width: 100,
  61. },
  62. {
  63. title: '模拟最小值',
  64. dataIndex: 'testlow',
  65. width: 100,
  66. },
  67. {
  68. title: '模拟最大值',
  69. width: 100,
  70. dataIndex: 'testup',
  71. },
  72. {
  73. title: '小数位数',
  74. width: 100,
  75. dataIndex: 'floatnum',
  76. },
  77. {
  78. title: '是否保存',
  79. dataIndex: 'saveflag_dictText',
  80. width: 80,
  81. },
  82. ];
  83. export const searchFormSchema: FormSchema[] = [
  84. {
  85. label: '设备类型',
  86. field: 'devicekind',
  87. component: 'MTreeSelect',
  88. colProps: { span: 6 },
  89. },
  90. {
  91. label: '值名称',
  92. field: 'valuename',
  93. component: 'Input',
  94. colProps: { span: 6 },
  95. },
  96. {
  97. label: '值code',
  98. field: 'valuecode',
  99. component: 'Input',
  100. colProps: { span: 6 },
  101. },
  102. ];
  103. export const formSchema: FormSchema[] = [
  104. {
  105. label: '',
  106. field: 'id',
  107. component: 'Input',
  108. show: false,
  109. },
  110. {
  111. label: '设备类型',
  112. field: 'devicekind',
  113. component: 'MTreeSelect',
  114. },
  115. {
  116. label: '值名称',
  117. field: 'valuename',
  118. component: 'Input',
  119. },
  120. {
  121. label: '值code',
  122. field: 'valuecode',
  123. component: 'Input',
  124. },
  125. ];