tableColumns.data.ts 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. import { BasicColumn } from '/@/components/Table';
  2. import { FormSchema } from '/@/components/Table';
  3. import { selectDevice } from './tableColumns.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',
  10. width: 120,
  11. },
  12. {
  13. title: '显示字段',
  14. dataIndex: 'des',
  15. width: 120,
  16. },
  17. {
  18. title: '字段code',
  19. dataIndex: 'monitorcode',
  20. width: 100,
  21. },
  22. {
  23. title: '数据类型',
  24. dataIndex: 'datatype_dictText',
  25. width: 100,
  26. },
  27. {
  28. title: '排序',
  29. dataIndex: 'sort',
  30. width: 80,
  31. // sorter: true,
  32. // customRender: ({ text }) => {
  33. // return render.renderDict(text, 'sex');
  34. // },
  35. },
  36. ];
  37. export const searchFormSchema: FormSchema[] = [
  38. {
  39. label: '设备类型',
  40. field: 'devicekind',
  41. component: 'MTreeSelect',
  42. colProps: { span: 6 },
  43. },
  44. {
  45. label: '值名称',
  46. field: 'valuename',
  47. component: 'Input',
  48. colProps: { span: 6 },
  49. },
  50. {
  51. label: '值code',
  52. field: 'monitorcode',
  53. component: 'Input',
  54. colProps: { span: 6 },
  55. },
  56. ];
  57. export const formSchema: FormSchema[] = [
  58. {
  59. label: '',
  60. field: 'id',
  61. component: 'Input',
  62. show: false,
  63. },
  64. {
  65. label: '设备类型',
  66. field: 'monitorflag',
  67. component: 'JDictSelectTag',
  68. componentProps: {
  69. dictCode: 'devicekind',
  70. placeholder: '请选择状态',
  71. },
  72. },
  73. {
  74. label: '数据类型',
  75. field: 'datatype',
  76. component: 'Input',
  77. },
  78. {
  79. label: '图表名',
  80. field: 'legend',
  81. component: 'Input',
  82. },
  83. {
  84. label: '样式',
  85. field: 'linetype',
  86. component: 'Input',
  87. // customRender: render.renderAvatar,
  88. },
  89. {
  90. label: '显示范围',
  91. field: 'maxshow',
  92. component: 'Input',
  93. // sorter: true,
  94. // customRender: ({ text }) => {
  95. // return render.renderDict(text, 'sex');
  96. // },
  97. },
  98. {
  99. label: '是否显示',
  100. field: 'showflag',
  101. component: 'Input',
  102. },
  103. {
  104. label: '编辑规则',
  105. field: 'rules',
  106. component: 'Input',
  107. },
  108. {
  109. label: '单位',
  110. field: 'unit',
  111. component: 'Input',
  112. },
  113. {
  114. label: '宽度',
  115. field: 'width',
  116. component: 'Input',
  117. },
  118. {
  119. label: '坐标轴位置显示',
  120. field: 'yaxispos',
  121. component: 'Input',
  122. },
  123. {
  124. label: 'y轴名称',
  125. field: 'yname',
  126. component: 'Input',
  127. },
  128. {
  129. label: 'y轴最大值',
  130. field: 'ymax',
  131. component: 'Input',
  132. },
  133. ];