device.data.ts 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. import { BasicColumn } from '/@/components/Table';
  2. import { FormSchema } from '/@/components/Table';
  3. import { list } from '../substationTabel/substation.api';
  4. export const columns: BasicColumn[] = [
  5. {
  6. title: '名称',
  7. dataIndex: 'strname',
  8. width: 120,
  9. },
  10. {
  11. title: '安装位置',
  12. dataIndex: 'strinstallpos',
  13. width: 100,
  14. },
  15. {
  16. title: '风筒长度(m)',
  17. dataIndex: 'flength',
  18. width: 100,
  19. },
  20. {
  21. title: '风筒直径(m)',
  22. dataIndex: 'fclearwidth',
  23. width: 80,
  24. },
  25. {
  26. title: '风机类型',
  27. dataIndex: 'ntype_dictText',
  28. width: 100,
  29. },
  30. {
  31. title: '所属分站',
  32. width: 150,
  33. dataIndex: 'stationname',
  34. },
  35. ];
  36. export const recycleColumns: BasicColumn[] = [
  37. {
  38. title: '名称',
  39. dataIndex: 'strname',
  40. width: 100,
  41. },
  42. {
  43. title: '是否为常闭型',
  44. dataIndex: 'bnormalclose',
  45. width: 100,
  46. },
  47. ];
  48. export const searchFormSchema: FormSchema[] = [
  49. {
  50. label: '设备类型',
  51. field: 'strtype',
  52. component: 'JDictSelectTag',
  53. componentProps: {
  54. dictCode: '',
  55. placeholder: '请选择设备类型',
  56. },
  57. colProps: { span: 6 },
  58. },
  59. {
  60. label: '安装位置',
  61. field: 'strinstallpos',
  62. component: 'Input',
  63. colProps: { span: 6 },
  64. },
  65. {
  66. label: '所属分站',
  67. field: 'nsubstationid',
  68. component: 'ApiSelect',
  69. componentProps: {
  70. api: list,
  71. labelField: 'strname',
  72. valueField: 'id',
  73. },
  74. },
  75. ];
  76. export const formSchema: FormSchema[] = [
  77. {
  78. label: '',
  79. field: 'id',
  80. component: 'Input',
  81. show: false,
  82. },
  83. {
  84. label: '名称',
  85. field: 'strname',
  86. component: 'Input',
  87. },
  88. {
  89. label: '安装位置',
  90. field: 'strinstallpos',
  91. component: 'Input',
  92. },
  93. {
  94. label: '风筒长度(m)',
  95. field: 'flength',
  96. component: 'InputNumber',
  97. },
  98. {
  99. label: '风筒直径(m)',
  100. field: 'fclearwidth',
  101. component: 'InputNumber',
  102. },
  103. {
  104. label: '风机类型',
  105. field: 'ntype',
  106. component: 'JDictSelectTag',
  107. componentProps: {
  108. dictCode: 'fantype',
  109. placeholder: '请选择状态',
  110. // stringToNumber: true,
  111. },
  112. },
  113. {
  114. label: '所属分站',
  115. field: 'nsubstationid',
  116. component: 'ApiSelect',
  117. componentProps: {
  118. api: list,
  119. labelField: 'strname',
  120. valueField: 'id',
  121. },
  122. },
  123. {
  124. label: '点表',
  125. field: 'strtype',
  126. component: 'JDictSelectTag',
  127. componentProps: {
  128. dictCode: 'fanlocalkind',
  129. placeholder: '请选择状态',
  130. },
  131. },
  132. {
  133. label: '监测类型',
  134. field: 'monitorflag_dictText',
  135. component: 'JDictSelectTag',
  136. componentProps: {
  137. dictCode: 'monitorflag',
  138. placeholder: '请选择状态',
  139. },
  140. },
  141. {
  142. label: '是否模拟数据',
  143. field: 'testflag',
  144. component: 'RadioGroup',
  145. defaultValue: 1,
  146. componentProps: () => {
  147. return {
  148. options: [
  149. { label: '是', value: 1, key: '1' },
  150. { label: '否', value: 0, key: '2' },
  151. ],
  152. };
  153. },
  154. },
  155. ];