safety.data.ts 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. import { FormSchema } from '/@/components/Table';
  2. import { safetyDeviceList } from './safety.api';
  3. import dayjs from 'dayjs';
  4. export const chartsColumns = (deviceType) => {
  5. if (deviceType === '') {
  6. return [];
  7. }
  8. };
  9. export const formConfig = {
  10. labelAlign: 'left',
  11. showAdvancedButton: false,
  12. showResetButton: false,
  13. schemas: [
  14. {
  15. label: '设备类型',
  16. field: 'dataTypeName',
  17. component: 'ApiSelect',
  18. componentProps: {
  19. api: safetyDeviceList.bind(null, { devicetype: 'safetymonitor', code: 'dataTypeName' }),
  20. labelField: 'name',
  21. valueField: 'code',
  22. },
  23. },
  24. {
  25. label: '设备安装地点',
  26. field: 'strinstallpos',
  27. component: 'Input',
  28. },
  29. ],
  30. };
  31. //测风装置
  32. export const chartsColumnsRect = [
  33. {
  34. legend: '风量',
  35. seriesName: '(m³/min)',
  36. ymax: 10000,
  37. yname: 'm³/min',
  38. linetype: 'bar',
  39. yaxispos: 'left',
  40. color: '#37BCF2',
  41. sort: 1,
  42. xRotate: 0,
  43. dataIndex: 'm³',
  44. },
  45. {
  46. legend: '气源压力',
  47. seriesName: '(MPa)',
  48. ymax: 50,
  49. yname: 'MPa',
  50. linetype: 'line',
  51. yaxispos: 'right',
  52. color: '#FC4327',
  53. sort: 2,
  54. xRotate: 0,
  55. dataIndex: 'sourcePressure',
  56. },
  57. ];
  58. //局部风机
  59. export const chartsColumnsFan = [
  60. {
  61. legend: '风筒风量1',
  62. seriesName: '(m³/min)',
  63. ymax: 1000,
  64. yname: 'm³/min',
  65. linetype: 'bar',
  66. yaxispos: 'left',
  67. color: '#37BCF2',
  68. sort: 1,
  69. xRotate: 0,
  70. dataIndex: 'windQuantity1',
  71. },
  72. {
  73. legend: '风筒风量2',
  74. seriesName: '(m³/min)',
  75. ymax: 1000,
  76. yname: 'm³/min',
  77. linetype: 'line',
  78. yaxispos: 'right',
  79. color: '#FC4327',
  80. sort: 2,
  81. xRotate: 0,
  82. dataIndex: 'windQuantity2',
  83. },
  84. ];
  85. //主风
  86. export const chartsColumnsMain = [
  87. {
  88. legend: '风量',
  89. seriesName: '(m³/min)',
  90. ymax: 1000,
  91. yname: 'm³/min',
  92. linetype: 'bar',
  93. yaxispos: 'left',
  94. color: '#37BCF2',
  95. sort: 1,
  96. xRotate: 0,
  97. dataIndex: 'windQuantity1',
  98. },
  99. {
  100. legend: '频率',
  101. seriesName: '(Hz)',
  102. ymax: 1000,
  103. yname: 'Hz',
  104. linetype: 'line',
  105. yaxispos: 'right',
  106. color: '#FC4327',
  107. sort: 2,
  108. xRotate: 0,
  109. dataIndex: 'windQuantity2',
  110. },
  111. ];
  112. //光钎测温
  113. export const chartsColumnsFiber = [
  114. {
  115. legend: '最高温度',
  116. seriesName: '(°C)',
  117. ymax: 100,
  118. yname: '°C',
  119. linetype: 'bar',
  120. yaxispos: 'left',
  121. color: '#37BCF2',
  122. sort: 1,
  123. xRotate: 0,
  124. dataIndex: 'fmax',
  125. },
  126. {
  127. legend: '平均温度',
  128. seriesName: '(°C)',
  129. ymax: 100,
  130. yname: '°C',
  131. linetype: 'line',
  132. yaxispos: 'right',
  133. color: '#FC4327',
  134. sort: 2,
  135. xRotate: 0,
  136. dataIndex: 'favg',
  137. },
  138. ];
  139. //密闭
  140. export const chartsColumnsObf = [
  141. {
  142. legend: '温度',
  143. seriesName: '(°C)',
  144. ymax: 100,
  145. yname: '°C',
  146. linetype: 'bar',
  147. yaxispos: 'left',
  148. color: '#37BCF2',
  149. sort: 1,
  150. xRotate: 0,
  151. dataIndex: 'temperature',
  152. },
  153. {
  154. legend: 'O2浓度',
  155. seriesName: '(%)',
  156. ymax: 100,
  157. yname: '%',
  158. linetype: 'line',
  159. yaxispos: 'right',
  160. color: '#FC4327',
  161. sort: 2,
  162. xRotate: 0,
  163. dataIndex: 'o2val',
  164. },
  165. ];
  166. //束管
  167. export const chartsColumnsBun = [
  168. {
  169. legend: 'CO浓度',
  170. seriesName: '(%)',
  171. ymax: 100,
  172. yname: '%',
  173. linetype: 'bar',
  174. yaxispos: 'left',
  175. color: '#37BCF2',
  176. sort: 1,
  177. xRotate: 0,
  178. dataIndex: 'coval',
  179. },
  180. {
  181. legend: 'CO2浓度',
  182. seriesName: '(%)',
  183. ymax: 100,
  184. yname: '%',
  185. linetype: 'line',
  186. yaxispos: 'right',
  187. color: '#FC4327',
  188. sort: 2,
  189. xRotate: 0,
  190. dataIndex: 'co2val',
  191. },
  192. ];
  193. export const chartsColumnsreal = [
  194. {
  195. legend: '压差',
  196. seriesName: '(Pa)',
  197. ymax: 100,
  198. yname: 'Pa',
  199. linetype: 'bar',
  200. yaxispos: 'left',
  201. color: '#37BCF2',
  202. sort: 1,
  203. xRotate: 0,
  204. dataIndex: 'frontRearDP',
  205. },
  206. {
  207. legend: '气源压力',
  208. seriesName: '(MPa)',
  209. ymax: 50,
  210. yname: 'MPa',
  211. linetype: 'line',
  212. yaxispos: 'right',
  213. color: '#FC4327',
  214. sort: 2,
  215. xRotate: 0,
  216. dataIndex: 'sourcePressure',
  217. },
  218. ];
  219. export const isHaveNoAction = ['safetymonitor', 'wasichoufang'];