safety.data.ts 4.2 KB

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