pressureDiffAnalysis.data.ts 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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: '监测压差(Pa)',
  61. dataIndex: 'sourcePressure',
  62. width: 100,
  63. },
  64. {
  65. title: '日差压差均值(Pa)',
  66. dataIndex: 'dailyYaCha',
  67. width: 100,
  68. },
  69. {
  70. title: '绝对压差变化(%)',
  71. dataIndex: 'yaChaChange',
  72. width: 100,
  73. },
  74. {
  75. title: '风险分析',
  76. dataIndex: 'alarmName',
  77. width: 100,
  78. customRender: ({ record }) => {
  79. const riskMap = {
  80. '1': '低风险',
  81. '2': '一般风险',
  82. '3': '较高风险',
  83. '4': '高风险',
  84. };
  85. return alarmCellRender(record, (r) => riskMap[r.alarmName] || r.alarmName);
  86. // if (typeof text !== 'string') {
  87. // return '-';
  88. // }
  89. // return riskMap[text] || text;
  90. },
  91. },
  92. {
  93. title: '预警时间',
  94. dataIndex: 'createTime',
  95. width: 100,
  96. },
  97. {
  98. title: '是否解决',
  99. customRender: () => '未解决',
  100. width: 100,
  101. },
  102. ];
  103. export const searchFormSchema: FormSchema[] = [
  104. {
  105. field: 'mineName',
  106. label: '所属执法处',
  107. component: 'Select',
  108. componentProps: {
  109. options: [
  110. { label: '执法一处', value: '0' },
  111. { label: '执法二处', value: '1' },
  112. { label: '执法三处', value: '2' },
  113. ],
  114. },
  115. colProps: { span: 6 },
  116. },
  117. {
  118. field: 'mineName',
  119. label: '所属区域',
  120. component: 'Select',
  121. componentProps: {
  122. options: [
  123. { label: '执法一处', value: '0' },
  124. { label: '执法二处', value: '1' },
  125. { label: '执法三处', value: '2' },
  126. ],
  127. },
  128. colProps: { span: 6 },
  129. },
  130. {
  131. field: 'mineName',
  132. label: '煤矿名称',
  133. component: 'Input',
  134. colProps: { span: 6 },
  135. },
  136. {
  137. field: 'mineNameAbbr',
  138. label: '煤矿简称',
  139. component: 'Input',
  140. colProps: { span: 6 },
  141. },
  142. {
  143. field: 'productStatus',
  144. label: '生产状态',
  145. component: 'Select',
  146. componentProps: {
  147. options: [
  148. { label: '拟建矿井', value: '0' },
  149. { label: '正常生产矿井', value: '1' },
  150. { label: '长期停产矿井', value: '2' },
  151. ],
  152. },
  153. colProps: { span: 6 },
  154. },
  155. {
  156. field: 'riskLevel',
  157. label: '自燃情况',
  158. component: 'Select',
  159. componentProps: {
  160. options: [
  161. { label: 'Ⅰ类容易自燃', value: '0' },
  162. { label: 'Ⅱ类自燃', value: '1' },
  163. { label: 'Ⅲ类不易自燃', value: '2' },
  164. ],
  165. },
  166. colProps: { span: 6 },
  167. },
  168. ];