nitrogen.data.blt.ts 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. import { ref, reactive } from 'vue';
  2. import echarts from '/@/utils/lib/echarts';
  3. export const preMonitorList = [
  4. {
  5. title: `累计流量`,
  6. code: `FluxTotal`,
  7. unit: 'm³',
  8. child: [],
  9. },
  10. {
  11. title: `瞬时流量`,
  12. code: `InputFlux`,
  13. unit: 'm³/min',
  14. child: [],
  15. },
  16. {
  17. title: `氮气浓度`,
  18. code: `NitrogenPurity`,
  19. unit: '%',
  20. child: [],
  21. },
  22. {
  23. title: `运行时间`,
  24. code: `AirCompressor_RunTime`,
  25. unit: 'h',
  26. child: [],
  27. },
  28. {
  29. code: 'signal',
  30. child: [
  31. {
  32. title: `加载/卸载`,
  33. code: `AirCompressor_LoadorUnload`,
  34. isFault: -1,
  35. },
  36. {
  37. title: `重故障`,
  38. code: `AirCompressor_TotalFailureSignal`,
  39. isFault: true,
  40. },
  41. ],
  42. },
  43. {
  44. code: 'signal',
  45. child: [
  46. {
  47. title: `电源信号`,
  48. code: `AirCompressor_PowerFault`,
  49. isFault: false,
  50. },
  51. {
  52. title: `运行信号`,
  53. code: `AirCompressor_Status`,
  54. isFault: false,
  55. },
  56. ],
  57. },
  58. {
  59. code: 'signal',
  60. child: [
  61. {
  62. title: '风机过载',
  63. code: 'AirCompressor_Fan_OverloadFault',
  64. isFault: true,
  65. },
  66. {
  67. title: '排气压力过高',
  68. code: 'AirCompressor_ExhaustPreHighFault',
  69. isFault: true,
  70. },
  71. ],
  72. },
  73. ];
  74. export const preFanMonitorData = [
  75. {
  76. title: '膜前温度',
  77. code: 'PreMembraneTemperature',
  78. unit: '℃',
  79. },
  80. {
  81. title: '排气温度',
  82. code: 'AirCompressor_ExhaustTemp',
  83. unit: '℃',
  84. },
  85. {
  86. title: '排气高温',
  87. code: 'AirCompressor_ExhaustTemp1',
  88. unit: '℃',
  89. },
  90. {
  91. title: '排气压力',
  92. code: 'AirCompressor_ExhaustPre',
  93. unit: 'Mpa',
  94. },
  95. {
  96. title: '电机电压',
  97. code: 'AirCompressor_SysVoltage',
  98. unit: 'V',
  99. },
  100. {
  101. title: '电机电压',
  102. code: 'AirCompressor_SysVoltage',
  103. unit: 'V',
  104. },
  105. {
  106. title: '电机电流',
  107. code: 'AirCompressor_MainMotor_Current',
  108. unit: 'A',
  109. },
  110. {
  111. title: '三相不平衡',
  112. code: 'AirCompressor_UnbalanceFault',
  113. unit: 'signal',
  114. },
  115. {
  116. title: ' 断相',
  117. code: 'AirCompressor_PhaseFailureFault',
  118. unit: 'signal',
  119. },
  120. {
  121. title: '相序故障',
  122. code: 'AirCompressor_PhaseSequenceFault',
  123. unit: 'signal',
  124. },
  125. {
  126. title: '接线错误',
  127. code: 'AirCompressor_PhaseSequenceFault1',
  128. unit: 'signal',
  129. },
  130. {
  131. title: '短路故障',
  132. code: 'AirCompressor_ShortCutFaul',
  133. unit: 'signal',
  134. },
  135. {
  136. title: '主电机高温',
  137. code: 'AirCompressor_MainMotor_OverTempFault',
  138. unit: 'signal',
  139. },
  140. {
  141. title: '主机过载',
  142. code: 'AirCompressor_MainMotor_OverloadFault',
  143. unit: 'signal',
  144. },
  145. {
  146. title: '欠压故障',
  147. code: 'AirCompressor_LowVoltageFault',
  148. unit: 'signal',
  149. },
  150. {
  151. title: '过压故障',
  152. code: 'AirCompressor_OverVoltageFault',
  153. unit: 'signal',
  154. },
  155. ];
  156. export const deviceFault = [
  157. {
  158. title: '分闸失败',
  159. code: 'AirCompressor_OpenFail',
  160. },
  161. {
  162. title: '合闸失败',
  163. code: 'AirCompressor_CloseFail',
  164. },
  165. {
  166. title: '油细分离器故障',
  167. code: 'AirCompressor_OilGasBarrel_SeparatorFault',
  168. },
  169. {
  170. title: '油压过低',
  171. code: 'AirCompressor_OilPressureLowFault',
  172. },
  173. {
  174. title: '油气桶高温',
  175. code: 'AirCompressor_OilGasBarrel_OverTempAlarm',
  176. },
  177. // {
  178. // title: '油气桶高温预警预留',
  179. // code: 'AirCompressor_OilGasBarrel_OverTempAlarm1',
  180. // },
  181. {
  182. title: '油过滤器堵塞',
  183. code: 'AirCompressor_OilGasBarrel_FilterBlockageFault',
  184. },
  185. {
  186. title: '油气桶高压',
  187. code: 'AirCompressor_OilGasBarrel_HighPressureFault',
  188. },
  189. {
  190. title: '失水故障',
  191. code: 'AirCompressor_NoWaterFault',
  192. },
  193. {
  194. title: '漏电闭锁故障',
  195. code: 'AirCompressor_LeakageLock',
  196. },
  197. {
  198. title: '轻故障预留',
  199. code: 'AirCompressor_TotalFailureSignal1',
  200. },
  201. ];
  202. export const zhudanOption = reactive({
  203. tooltip: { trigger: 'axis', axisPointer: { lineStyle: { color: '#fff' } } },
  204. legend: {
  205. top: '0',
  206. icon: 'rect',
  207. data: ['瞬时流量'],
  208. right: '10px',
  209. textStyle: { fontSize: 12, color: '#fff' },
  210. },
  211. grid: { x: 45, y: 60, x2: 45, y2: 60 },
  212. xAxis: {
  213. type: 'category',
  214. boundaryGap: false,
  215. axisLine: { lineStyle: { color: '#57617B' } },
  216. axisLabel: {
  217. color: '#ffffffcc',
  218. formatter: function (params) {
  219. const newParamsName = ref(''); // 最终拼接成的字符串
  220. const paramsNameNumber = ref(params.length); // 实际标签的个数
  221. const provideNumber = ref(10); // 每行能显示的字的个数
  222. const rowNumber = Math.ceil(paramsNameNumber.value / provideNumber.value); // 换行的话,需要显示几行,向上取整
  223. /**
  224. * 判断标签的个数是否大于规定的个数, 如果大于,则进行换行处理 如果不大于,即等于或小于,就返回原标签
  225. */
  226. // 条件等同于rowNumber>1
  227. if (paramsNameNumber.value > provideNumber.value) {
  228. /** 循环每一行,p表示行 */
  229. for (let p = 0; p < rowNumber; p++) {
  230. let tempStr = ''; // 表示每一次截取的字符串
  231. const start = p * provideNumber.value; // 开始截取的位置
  232. const end = start + provideNumber.value; // 结束截取的位置
  233. // 此处特殊处理最后一行的索引值
  234. if (p == rowNumber - 1) {
  235. // 最后一次不换行
  236. tempStr = params.substring(start, paramsNameNumber.value);
  237. } else {
  238. // 每一次拼接字符串并换行
  239. tempStr = params.substring(start, end) + '\n';
  240. }
  241. newParamsName.value += tempStr; // 最终拼成的字符串
  242. }
  243. } else {
  244. // 将旧标签的值赋给新标签
  245. newParamsName.value = params;
  246. }
  247. //将最终的字符串返回
  248. return newParamsName.value;
  249. },
  250. },
  251. splitLine: { show: true, lineStyle: { color: '#57617B22', type: 'dashed' } },
  252. data: [],
  253. },
  254. yAxis: [
  255. // {
  256. // type: 'value',
  257. // name: 'm³/h',
  258. // max: 6000,
  259. // axisTick: {
  260. // show: false,
  261. // },
  262. // position: 'left',
  263. // axisLine: { lineStyle: { show: true, color: '#57617B' } },
  264. // axisLabel: { margin: 10, fontSize: 12, color: '#ffffffcc' },
  265. // splitLine: { show: true, lineStyle: { color: '#57617B22', type: 'dashed' } },
  266. // },
  267. {
  268. type: 'value',
  269. name: 'm³/h',
  270. max: 2000,
  271. axisTick: {
  272. show: false,
  273. },
  274. position: 'right',
  275. axisLine: { lineStyle: { show: true, color: '#57617B' } },
  276. axisLabel: { margin: 10, fontSize: 12, color: '#ffffffcc' },
  277. splitLine: { show: true, lineStyle: { color: '#57617B22', type: 'dashed' } },
  278. },
  279. ],
  280. series: [
  281. // {
  282. // name: '累计流量',
  283. // type: 'line',
  284. // smooth: true,
  285. // lineStyle: { width: 2 },
  286. // yAxisIndex: 0,
  287. // areaStyle: {
  288. // color: new echarts.graphic.LinearGradient(
  289. // 0,
  290. // 0,
  291. // 0,
  292. // 1,
  293. // [
  294. // {
  295. // offset: 0,
  296. // color: 'rgba(185,150,248,0.3)',
  297. // },
  298. // {
  299. // offset: 0.8,
  300. // color: 'rgba(185,150,248,0)',
  301. // },
  302. // ],
  303. // false
  304. // ),
  305. // shadowColor: 'rgba(0, 0, 0, 0.1)',
  306. // shadowBlur: 10,
  307. // },
  308. // itemStyle: { color: '#B996F8' },
  309. // data: [],
  310. // },
  311. {
  312. name: '瞬时流量',
  313. type: 'line',
  314. smooth: true,
  315. lineStyle: { width: 2 },
  316. yAxisIndex: 0,
  317. areaStyle: {
  318. color: new echarts.graphic.LinearGradient(
  319. 0,
  320. 0,
  321. 0,
  322. 1,
  323. [
  324. {
  325. offset: 0,
  326. color: 'rgba(3, 194, 236, 0.3)',
  327. },
  328. {
  329. offset: 0.8,
  330. color: 'rgba(3, 194, 236, 0)',
  331. },
  332. ],
  333. false
  334. ),
  335. shadowColor: 'rgba(0, 0, 0, 0.1)',
  336. shadowBlur: 10,
  337. },
  338. itemStyle: { color: '#03C2EC' },
  339. data: [],
  340. },
  341. ],
  342. });