autoFireAnalysis.data.ts 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. import { BasicColumn } from '/@/components/Table';
  2. import { FormSchema } from '/@/components/Table';
  3. import { alarmCellRender } from '/@/views/monitor/sealedMonitor/monitor.data';
  4. export const boardData = [
  5. {
  6. label: '存在风险情况数量',
  7. value: '10',
  8. },
  9. {
  10. label: '低风险',
  11. value: '27',
  12. },
  13. {
  14. label: '一般风险',
  15. value: '27',
  16. },
  17. {
  18. label: '较高风险',
  19. value: '27',
  20. },
  21. {
  22. label: '高风险',
  23. value: '27',
  24. },
  25. ];
  26. // 实时数据相关
  27. export const columns: BasicColumn[] = [
  28. {
  29. title: '序号',
  30. align: 'center',
  31. width: 80,
  32. customRender: ({ index }: { index: number }) => `${index + 1}`,
  33. },
  34. {
  35. title: '区域',
  36. dataIndex: 'areaName',
  37. width: 100,
  38. },
  39. {
  40. title: '煤矿名称',
  41. dataIndex: 'mineName',
  42. width: 200,
  43. },
  44. {
  45. title: '密闭名称',
  46. dataIndex: 'devicePos',
  47. width: 100,
  48. },
  49. {
  50. title: '所属煤层',
  51. dataIndex: 'coalSeamName',
  52. width: 100,
  53. },
  54. {
  55. title: '自燃倾向性',
  56. dataIndex: 'coalSeamLevel',
  57. width: 100,
  58. },
  59. {
  60. title: 'CO浓度(ppm)',
  61. dataIndex: 'coVal',
  62. width: 100,
  63. },
  64. {
  65. title: 'CO日增率',
  66. dataIndex: 'coRzl',
  67. width: 100,
  68. },
  69. {
  70. title: 'O2浓度(ppm)',
  71. dataIndex: 'o2Val',
  72. width: 100,
  73. },
  74. {
  75. title: '温度(℃)',
  76. dataIndex: 'temperature',
  77. width: 100,
  78. },
  79. {
  80. title: '温差(℃)',
  81. dataIndex: 'temperatureDiff',
  82. width: 100,
  83. },
  84. {
  85. title: '风险分析',
  86. dataIndex: 'alarmName',
  87. width: 100,
  88. customRender: ({ record }) => {
  89. const riskMap = {
  90. '1': '低风险',
  91. '2': '一般风险',
  92. '3': '较高风险',
  93. '4': '高风险',
  94. };
  95. return alarmCellRender(record, (r) => riskMap[r.alarmName] || r.alarmName);
  96. // if (typeof text !== 'string') {
  97. // return '-';
  98. // }
  99. // return riskMap[text] || text;
  100. },
  101. },
  102. {
  103. title: '预警时间',
  104. dataIndex: 'createTime',
  105. width: 100,
  106. },
  107. {
  108. title: '是否解决',
  109. customRender: () => '未解决',
  110. width: 100,
  111. },
  112. ];
  113. export const searchFormSchema: FormSchema[] = [
  114. {
  115. field: 'mineName',
  116. label: '所属执法处',
  117. component: 'Select',
  118. componentProps: {
  119. options: [
  120. { label: '执法一处', value: '0' },
  121. { label: '执法二处', value: '1' },
  122. { label: '执法三处', value: '2' },
  123. ],
  124. },
  125. colProps: { span: 6 },
  126. },
  127. {
  128. field: 'mineName',
  129. label: '所属区域',
  130. component: 'Select',
  131. componentProps: {
  132. options: [
  133. { label: '执法一处', value: '0' },
  134. { label: '执法二处', value: '1' },
  135. { label: '执法三处', value: '2' },
  136. ],
  137. },
  138. colProps: { span: 6 },
  139. },
  140. {
  141. field: 'mineName',
  142. label: '煤矿名称',
  143. component: 'Input',
  144. colProps: { span: 6 },
  145. },
  146. {
  147. field: 'mineNameAbbr',
  148. label: '煤矿简称',
  149. component: 'Input',
  150. colProps: { span: 6 },
  151. },
  152. {
  153. field: 'productStatus',
  154. label: '生产状态',
  155. component: 'Select',
  156. componentProps: {
  157. options: [
  158. { label: '拟建矿井', value: '0' },
  159. { label: '正常生产矿井', value: '1' },
  160. { label: '长期停产矿井', value: '2' },
  161. ],
  162. },
  163. colProps: { span: 6 },
  164. },
  165. {
  166. field: 'riskLevel',
  167. label: '自燃情况',
  168. component: 'Select',
  169. componentProps: {
  170. options: [
  171. { label: 'Ⅰ类容易自燃', value: '0' },
  172. { label: 'Ⅱ类自燃', value: '1' },
  173. { label: 'Ⅲ类不易自燃', value: '2' },
  174. ],
  175. },
  176. colProps: { span: 6 },
  177. },
  178. ];