warning.data.ts 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. import { BasicColumn } from '/@/components/Table';
  2. import { initDictOptions } from '/@/utils/dict';
  3. export const levelColumns: BasicColumn[] = [
  4. {
  5. title: '上限',
  6. dataIndex: 'fmax',
  7. width: 100,
  8. editRow: true,
  9. editComponent: 'InputNumber',
  10. },
  11. {
  12. title: '下限',
  13. width: 100,
  14. editRow: true,
  15. dataIndex: 'fmin',
  16. editComponent: 'InputNumber',
  17. },
  18. {
  19. title: '持续时间(s)',
  20. dataIndex: 'timelength',
  21. editRow: true,
  22. width: 100,
  23. editComponent: 'InputNumber',
  24. },
  25. {
  26. title: '报警等级',
  27. dataIndex: 'leveltype',
  28. editRow: true,
  29. editRule: true,
  30. width: 100,
  31. editComponent: 'ApiSelect',
  32. editComponentProps: {
  33. api: initDictOptions.bind(null, 'leveltype'),
  34. labelField: 'label',
  35. valueField: 'value',
  36. },
  37. },
  38. {
  39. title: '报警描述',
  40. width: 180,
  41. editRow: true,
  42. dataIndex: 'des',
  43. editComponent: 'Input',
  44. },
  45. ];
  46. export const warningColumns: BasicColumn[] = [
  47. {
  48. title: '',
  49. dataIndex: 'id',
  50. ifShow: false,
  51. },
  52. {
  53. title: '监测参数',
  54. dataIndex: 'monitorcode',
  55. width: 150,
  56. editRow: true,
  57. editRule: true,
  58. },
  59. {
  60. title: '模拟最小值',
  61. width: 150,
  62. dataIndex: 'ftestmin',
  63. editRow: true,
  64. editComponent: 'InputNumber',
  65. },
  66. {
  67. title: '模拟最大值',
  68. dataIndex: 'ftestmax',
  69. editRow: true,
  70. width: 150,
  71. editComponent: 'InputNumber',
  72. },
  73. {
  74. title: '备注',
  75. dataIndex: 'des',
  76. editRow: true,
  77. width: 200,
  78. editComponent: 'Input',
  79. },
  80. ];
  81. export const deviceColumns: BasicColumn[] = [
  82. {
  83. title: '名称',
  84. dataIndex: 'deviceName',
  85. align: 'center',
  86. width: 120,
  87. },
  88. {
  89. title: '安装位置',
  90. dataIndex: 'devicePos',
  91. align: 'center',
  92. width: 100,
  93. },
  94. {
  95. title: '设备类型',
  96. dataIndex: 'deviceType',
  97. align: 'center',
  98. width: 100,
  99. },
  100. {
  101. title: '所属分站',
  102. width: 150,
  103. align: 'center',
  104. dataIndex: 'subStationName',
  105. },
  106. ];
  107. export const workFaceColumns: BasicColumn[] = [
  108. {
  109. title: '安装位置',
  110. dataIndex: 'devicePos',
  111. width: 100,
  112. },
  113. {
  114. title: '排序',
  115. width: 100,
  116. dataIndex: 'sort',
  117. edit: true,
  118. editComponent: 'InputNumber',
  119. },
  120. {
  121. title: '是否在关键通风路线上',
  122. width: 100,
  123. dataIndex: 'pathflag',
  124. edit: true,
  125. editComponent: 'Switch',
  126. editValueMap: (value) => {
  127. return value ? '是' : '否';
  128. },
  129. },
  130. {
  131. title: '传感器类型',
  132. width: 100,
  133. dataIndex: 'sensorType',
  134. edit: true,
  135. editComponent: 'Select',
  136. editComponentProps: {
  137. options: [
  138. {
  139. label: '多参',
  140. value: '1',
  141. },
  142. {
  143. label: '测风',
  144. value: '2',
  145. },
  146. ],
  147. },
  148. },
  149. {
  150. title: '风向',
  151. width: 100,
  152. dataIndex: 'winddir',
  153. edit: true,
  154. editComponent: 'Select',
  155. editComponentProps: {
  156. options: [
  157. {
  158. label: '多参',
  159. value: '1',
  160. },
  161. {
  162. label: '测风',
  163. value: '2',
  164. },
  165. ],
  166. },
  167. },
  168. {
  169. title: '是否参与计算风量',
  170. width: 100,
  171. dataIndex: 'windflag',
  172. edit: true,
  173. editComponent: 'Switch',
  174. editValueMap: (value) => {
  175. return value ? '是' : '否';
  176. },
  177. },
  178. ];