nitrogen.dataYJ.ts 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. export const monitorDataGroupArr = [
  2. [1, 2],
  3. [3, 4],
  4. [5, 6],
  5. ];
  6. export const prefix = ['Compressor', 'Compressor', 'PreFan'];
  7. export const preMonitorList = [
  8. {
  9. title: `供气压力`,
  10. code: `CompressorGasSupplyPressure`,
  11. unit: 'MPa',
  12. child: [],
  13. },
  14. {
  15. title: `排气温度`,
  16. code: `CompressorExhaustTemp`,
  17. unit: '℃',
  18. child: [],
  19. },
  20. {
  21. title: `电机电流`,
  22. code: `CompressorCurrentA`,
  23. unit: 'A',
  24. child: [],
  25. },
  26. {
  27. title: `加载时间`,
  28. code: `CompressorLoadTime`,
  29. unit: 'h',
  30. child: [],
  31. },
  32. {
  33. title: `运行时间`,
  34. code: `CompressorRunTime`,
  35. unit: 'h',
  36. child: [],
  37. },
  38. {
  39. code: 'signal',
  40. child: [
  41. {
  42. title: `运行信号`,
  43. code: `CompressorWorking`,
  44. },
  45. {
  46. title: `故障信号`,
  47. code: `CompressorFault`,
  48. },
  49. ],
  50. },
  51. {
  52. code: 'signal',
  53. child: [
  54. {
  55. title: `闸阀关到位`,
  56. code: `CompressorGateValveOpen`,
  57. },
  58. {
  59. title: `闸阀关到位`,
  60. code: `CompressorGateValveShut`,
  61. },
  62. ],
  63. },
  64. ];
  65. export const cqgMonitorList = [
  66. {
  67. title: `风包压力`,
  68. code: `CompressorWindBagPressure`,
  69. unit: '℃',
  70. child: [],
  71. },
  72. {
  73. title: `风包温度`,
  74. code: `CompressorWindBagTemp`,
  75. unit: 'MPa',
  76. child: [],
  77. },
  78. ];
  79. export const preFanMonitorData = [
  80. {
  81. title: '前轴温度',
  82. code: 'PreFanFrontTemp',
  83. unit: '℃',
  84. },
  85. {
  86. title: '后轴温度',
  87. code: 'PreFanBehindTemp',
  88. unit: '℃',
  89. },
  90. {
  91. title: '垂直振动值',
  92. code: 'PreFanVerticalVibration',
  93. unit: 'mm',
  94. },
  95. {
  96. title: '水平振动值',
  97. code: 'PreFanLevelVibration',
  98. unit: 'mm',
  99. },
  100. {
  101. title: '外壳温度',
  102. code: 'PreFanShellTemp',
  103. unit: '℃',
  104. },
  105. {
  106. title: '系统故障',
  107. code: 'PreFanSystemFault',
  108. unit: 'signal',
  109. },
  110. {
  111. title: '启动故障',
  112. code: 'PreFanStartFault',
  113. unit: 'signal',
  114. },
  115. {
  116. title: '阀门故障',
  117. code: 'PreFanValveFault',
  118. unit: 'signal',
  119. },
  120. ];
  121. export const totalData = [
  122. {
  123. title: '总压力',
  124. code: 'MainPipePressure',
  125. unit: 'bar',
  126. },
  127. ];
  128. export type State = {
  129. isRun: boolean;
  130. fault: boolean;
  131. };
  132. export function getSysState(monitorData) {
  133. const stateArr = <State[]>[];
  134. monitorDataGroupArr.forEach((group) => {
  135. const stateObj = { isRun: false, fault: false };
  136. group.forEach((item) => {
  137. if (monitorData['CompressorWorking'.replace('Compressor', 'Compressor' + item)]) {
  138. stateObj.isRun = monitorData['CompressorWorking'.replace('Compressor', 'Compressor' + item)] == '1';
  139. }
  140. monitorData['CompressorFault'.replace('Compressor', 'Compressor' + item)] === undefined
  141. ? '-'
  142. : monitorData['CompressorFault'.replace('Compressor', 'Compressor' + item)];
  143. monitorData['PreFanSystemFault'.replace('PreFan', 'PreFan' + item)] === undefined
  144. ? '-'
  145. : monitorData['PreFanSystemFault'.replace('PreFan', 'PreFan' + item)];
  146. monitorData['PreFanStartFault'.replace('PreFan', 'PreFan' + item)] === undefined
  147. ? '-'
  148. : monitorData['PreFanStartFault'.replace('PreFan', 'PreFan' + item)];
  149. monitorData['PreFanValveFault'.replace('PreFan', 'PreFan' + item)] === undefined
  150. ? '-'
  151. : monitorData['PreFanValveFault'.replace('PreFan', 'PreFan' + item)];
  152. stateObj.fault =
  153. monitorData['CompressorFault'.replace('Compressor', 'Compressor' + item)] == '1' ||
  154. monitorData['PreFanSystemFault'.replace('PreFan', 'PreFan' + item)] == '1' ||
  155. monitorData['PreFanStartFault'.replace('PreFan', 'PreFan' + item)] == '1' ||
  156. monitorData['PreFanValveFault'.replace('PreFan', 'PreFan' + item)] == '1';
  157. });
  158. stateArr.push(stateObj);
  159. });
  160. return stateArr;
  161. }