nitrogen.data.blt.ts 8.5 KB

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