device.data.ts 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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. colProps: { span: 6 },
  70. componentProps: {
  71. api: list,
  72. labelField: 'strname',
  73. valueField: 'id',
  74. },
  75. },
  76. ];
  77. export const formSchema: FormSchema[] = [
  78. {
  79. label: '',
  80. field: 'id',
  81. component: 'Input',
  82. show: false,
  83. },
  84. {
  85. label: '名称',
  86. field: 'strname',
  87. component: 'Input',
  88. },
  89. {
  90. label: '安装位置',
  91. field: 'strinstallpos',
  92. component: 'Input',
  93. },
  94. {
  95. label: '风筒长度(m)',
  96. field: 'flength',
  97. component: 'InputNumber',
  98. },
  99. {
  100. label: '风筒直径(m)',
  101. field: 'fclearwidth',
  102. component: 'InputNumber',
  103. },
  104. {
  105. label: '风机类型',
  106. field: 'ntype',
  107. component: 'JDictSelectTag',
  108. componentProps: {
  109. dictCode: 'fantype',
  110. placeholder: '请选择状态',
  111. // stringToNumber: true,
  112. },
  113. },
  114. {
  115. label: '所属分站',
  116. field: 'nsubstationid',
  117. component: 'ApiSelect',
  118. componentProps: {
  119. api: list,
  120. labelField: 'strname',
  121. valueField: 'id',
  122. },
  123. },
  124. {
  125. label: '点表',
  126. field: 'strtype',
  127. component: 'JDictSelectTag',
  128. componentProps: {
  129. dictCode: 'fanlocalkind',
  130. placeholder: '请选择状态',
  131. },
  132. },
  133. {
  134. label: '监测类型',
  135. field: 'monitorflag_dictText',
  136. component: 'JDictSelectTag',
  137. componentProps: {
  138. dictCode: 'monitorflag',
  139. placeholder: '请选择状态',
  140. },
  141. },
  142. {
  143. label: '是否模拟数据',
  144. field: 'testflag',
  145. component: 'RadioGroup',
  146. defaultValue: 1,
  147. componentProps: () => {
  148. return {
  149. options: [
  150. { label: '是', value: 1, key: '1' },
  151. { label: '否', value: 0, key: '2' },
  152. ],
  153. };
  154. },
  155. },
  156. ];