gasPump.data.ts 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489
  1. import { reactive, defineAsyncComponent } from 'vue';
  2. import { useGlobSetting } from '/@/hooks/setting';
  3. import { Interface } from 'readline';
  4. export const warningConfig = reactive({
  5. header: ['设备名称', '预警信息', '时间'],
  6. data: [
  7. ['火焰6', '严重报警', '03-05'],
  8. ['测点43', '一般预警', '03-05'],
  9. ['CO23', '一般预警', '03-05'],
  10. ['测点6', '超高预警', '03-05'],
  11. ['测点65', '超高预警', '03-05'],
  12. ['温度4', '一般预警', '03-05'],
  13. ['测点61', '一般预警', '03-05'],
  14. ['测点87', '一般信息', '03-05'],
  15. ],
  16. index: false,
  17. // columnWidth: [150, 80, 150, 150],
  18. headerBGC: '#3d9dd45d',
  19. oddRowBGC: '#009acd10',
  20. evenRowBGC: '#009acd05',
  21. align: ['center', 'center', 'center'],
  22. });
  23. // export const pumpMonitorData = [
  24. // {
  25. // title: '运行状态',
  26. // code: 'CentrifugalPump_PU_CBStatus',
  27. // type: 'sign',
  28. // },
  29. // {
  30. // title: '启动准备',
  31. // code: 'CentrifugalPump_PU_Ready',
  32. // type: 'sign',
  33. // },
  34. // {
  35. // title: '电压(V)',
  36. // code: 'CentrifugalPump_PU_SysVoltage',
  37. // type: '',
  38. // },
  39. // {
  40. // title: 'A相电流(A)',
  41. // code: 'CentrifugalPump_PU_Ia',
  42. // type: '',
  43. // },
  44. // {
  45. // title: 'B相电流(A)',
  46. // code: 'CentrifugalPump_PU_Ib',
  47. // type: '',
  48. // },
  49. // {
  50. // title: 'C相电流(A)',
  51. // code: 'CentrifugalPump_PU_Ic',
  52. // type: '',
  53. // },
  54. // ];
  55. export const pumpMonitorData = [
  56. {
  57. title: '断路器状态',
  58. code: 'Starter_CBStatus',
  59. type: 'sign',
  60. },
  61. {
  62. title: '合闸失败',
  63. code: 'Starter_CloseFail',
  64. type: 'warning',
  65. },
  66. {
  67. title: 'A相电流(A)',
  68. code: 'Starter_Ia',
  69. type: '',
  70. },
  71. {
  72. title: 'B相电流(A)',
  73. code: 'Starter_Ib',
  74. type: '',
  75. },
  76. {
  77. title: 'C相电流(A)',
  78. code: 'Starter_Ic',
  79. type: '',
  80. },
  81. {
  82. title: 'AB电压(V)',
  83. code: 'Starter_Uab',
  84. type: '',
  85. },
  86. {
  87. title: '健康信号',
  88. code: 'Starter_Ready',
  89. type: 'sign',
  90. },
  91. ];
  92. export const waterPumpData = [
  93. {
  94. title: '运行状态',
  95. code: 'WaterfloodPump_CBStatus',
  96. type: 'sign',
  97. },
  98. {
  99. title: '启动准备',
  100. code: 'WaterfloodPump_Ready',
  101. type: 'sign',
  102. },
  103. {
  104. title: '电压(V)',
  105. code: 'WaterfloodPump_SysVoltage',
  106. type: '',
  107. },
  108. ];
  109. export const dewateringPumpData = [
  110. {
  111. title: '运行状态',
  112. code: 'DewateringPump_CBStatus',
  113. type: 'sign',
  114. },
  115. {
  116. title: '启动准备',
  117. code: 'DewateringPump_Ready',
  118. type: 'sign',
  119. },
  120. {
  121. title: '电压(V)',
  122. code: 'DewateringPump_SysVoltage',
  123. type: '',
  124. },
  125. ];
  126. export const valveCtrlType = [
  127. {
  128. title: '进水阀',
  129. code: 'WaterInValve1',
  130. },
  131. {
  132. title: '排水阀',
  133. code: 'WaterOutValve2',
  134. },
  135. {
  136. title: '进气阀',
  137. code: 'AirInValve1',
  138. },
  139. {
  140. title: '排气阀',
  141. code: 'AirOutValve2',
  142. },
  143. ];
  144. export const valveCtrl = [
  145. {
  146. title: '开启',
  147. code: '_HMIOpen',
  148. },
  149. {
  150. title: '关闭',
  151. code: '_HMIClose',
  152. },
  153. {
  154. title: '停止',
  155. code: '_HMIStop',
  156. },
  157. {
  158. title: '复位',
  159. code: '_Reset',
  160. },
  161. ];
  162. export const stateWarningHeader = ['设备名称', '开限位', '关限位', '开输出', '关输出'];
  163. export const stateHeader = ['设备名称', '是否健康', '开失败', '关失败', '控制方式'];
  164. export const valveWarningState = [
  165. {
  166. title: '开限位',
  167. code: '_OpenLimit',
  168. defaultValue: '-',
  169. },
  170. {
  171. title: '关限位',
  172. code: '_CloseLimit',
  173. defaultValue: '-',
  174. },
  175. {
  176. title: '开输出',
  177. code: '_OnOutput',
  178. defaultValue: '-',
  179. },
  180. {
  181. title: '关输出',
  182. code: '_OffOutput',
  183. defaultValue: '-',
  184. },
  185. ];
  186. export const valveState = [
  187. {
  188. title: '是否健康',
  189. code: '_Healthy',
  190. defaultValue: '-',
  191. },
  192. {
  193. title: '开失败',
  194. code: '_OpenFail',
  195. defaultValue: '-',
  196. },
  197. {
  198. title: '关失败',
  199. code: '_CloseFail',
  200. defaultValue: '-',
  201. },
  202. {
  203. title: '控制方式',
  204. code: '_CtrlMode',
  205. defaultValue: '-',
  206. },
  207. ];
  208. export const pumpCtrlType = [
  209. {
  210. title: '瓦斯泵',
  211. code: 'CentrifugalPump',
  212. },
  213. {
  214. title: '排水泵',
  215. code: 'DewateringPump',
  216. },
  217. ];
  218. export const publicPumpCtrlType = [
  219. {
  220. title: '注水泵',
  221. code: 'WaterfloodPump',
  222. },
  223. ];
  224. export const PumpCtrlItems = [
  225. {
  226. title: '启动',
  227. code: '_SwitchOn',
  228. },
  229. {
  230. title: '停止',
  231. code: '_SwitchOff',
  232. },
  233. {
  234. title: '短路测试',
  235. code: '_HMIShortTest',
  236. },
  237. {
  238. title: '漏电测试',
  239. code: '_HMILeakageTest',
  240. },
  241. ];
  242. export const modelMonitor = [
  243. {
  244. title: '泵站输入管道内工混流量(m³/min)',
  245. code: 'mixedTraffic',
  246. },
  247. {
  248. title: '泵站内瓦斯(%CH₄)',
  249. code: 'gas2',
  250. },
  251. {
  252. title: '泵站输入管道内标况流量(m³/min)',
  253. code: 'standardTraffic',
  254. },
  255. {
  256. title: '泵站输入管道内瓦斯(%CH₄)',
  257. code: 'gas3',
  258. },
  259. {
  260. title: '泵站输入管道内工混累计(m³)',
  261. code: 'totalGasDrainage',
  262. },
  263. {
  264. title: '泵站管道输出瓦斯(%CH₄)',
  265. code: 'gas4',
  266. },
  267. {
  268. title: '泵站输入管道内一氧化碳(ppm)',
  269. code: 'coVal',
  270. },
  271. {
  272. title: '泵站管路出口30米处瓦斯(%CH₄)',
  273. code: 'gas1',
  274. },
  275. {
  276. title: '泵站内温度(℃)',
  277. code: 'temp',
  278. },
  279. {
  280. title: '泵站输入管道内温度(℃)',
  281. code: 'pipeTemp',
  282. },
  283. ];
  284. export const getModelMonitorTags = () => {
  285. const { sysOrgCode } = useGlobSetting();
  286. // const sysOrgCode = 'sdmtjtcctrk';
  287. if (sysOrgCode !== 'sdmtjtcctrk') {
  288. return [
  289. {
  290. domId: 'jsf1',
  291. title: '进水阀1#',
  292. code: 'CentrifugalPump1_WaterInValve1_OpenLimit',
  293. type: 'sign',
  294. // value: '0',
  295. position: [-5.26, 0.28, 0.6],
  296. },
  297. {
  298. domId: 'jsf2',
  299. title: '进水阀2#',
  300. code: 'CentrifugalPump2_WaterInValve1_OpenLimit',
  301. type: 'sign',
  302. // value: '0',
  303. position: [-8.75, 0.3, 0.6],
  304. },
  305. {
  306. domId: 'csf1',
  307. title: '出水阀1#',
  308. code: 'CentrifugalPump1_WaterOutValve2_OpenLimit',
  309. type: 'sign',
  310. // value: '0',
  311. position: [-5.74, 0.35, 0.27],
  312. },
  313. {
  314. domId: 'csf2',
  315. title: '出水阀2#',
  316. code: 'CentrifugalPump2_WaterOutValve2_OpenLimit',
  317. type: 'sign',
  318. // value: '0',
  319. position: [-9.42, 0.35, 0.3],
  320. },
  321. {
  322. domId: 'jqf1',
  323. title: '进气阀1#',
  324. code: 'CentrifugalPump1_AirInValve1_OpenLimit',
  325. type: 'sign',
  326. // value: '0',
  327. position: [-4.41, 1.28, 0.03],
  328. },
  329. {
  330. domId: 'jqf2',
  331. title: '进气阀2#',
  332. code: 'CentrifugalPump2_AirInValve1_OpenLimit',
  333. type: 'sign',
  334. // value: '0',
  335. position: [-7.7, 1.31, -0.14],
  336. },
  337. {
  338. domId: 'cqf1',
  339. title: '出气阀1#',
  340. code: 'CentrifugalPump1_AirOutValve2_OpenLimit',
  341. type: 'sign',
  342. // value: '0',
  343. position: [-6.2, 1.55, 0.06],
  344. },
  345. {
  346. domId: 'cqf2',
  347. title: '出气阀2#',
  348. code: 'CentrifugalPump2_AirOutValve2_OpenLimit',
  349. type: 'sign',
  350. // value: '0',
  351. position: [-9.58, 1.55, -0.13],
  352. },
  353. ];
  354. } else {
  355. return [
  356. {
  357. domId: 'jsf1',
  358. title: '进水阀1#',
  359. code: 'CentrifugalPump1_WaterInValve1_OpenLimit',
  360. type: 'sign',
  361. // value: '0',
  362. position: [-5.26, 0.28, 0.6],
  363. },
  364. {
  365. domId: 'jsf2',
  366. title: '进水阀2#',
  367. code: 'CentrifugalPump2_WaterInValve1_OpenLimit',
  368. type: 'sign',
  369. // value: '0',
  370. position: [-8.75, 0.3, 0.6],
  371. },
  372. {
  373. domId: 'csf1',
  374. title: '出水阀1#',
  375. code: 'CentrifugalPump1_WaterOutValve2_OpenLimit',
  376. type: 'sign',
  377. // value: '0',
  378. position: [-5.74, 0.35, 0.27],
  379. },
  380. {
  381. domId: 'csf2',
  382. title: '出水阀2#',
  383. code: 'CentrifugalPump2_WaterOutValve2_OpenLimit',
  384. type: 'sign',
  385. // value: '0',
  386. position: [-9.42, 0.35, 0.3],
  387. },
  388. {
  389. domId: 'jqf1',
  390. title: '进气阀1#开度',
  391. code: 'CentrifugalPump1_AirInValve1_OpenLimit',
  392. type: 'value',
  393. // value: '0',
  394. position: [-4.41, 1.28, 0.03],
  395. },
  396. {
  397. domId: 'jqf2',
  398. title: '进气阀2#开度',
  399. code: 'CentrifugalPump2_AirInValve1_OpenLimit',
  400. type: 'value',
  401. // value: '0',
  402. position: [-7.7, 1.31, -0.14],
  403. },
  404. {
  405. domId: 'cqf1',
  406. title: '出气阀1#开度',
  407. code: 'CentrifugalPump1_AirOutValve2_OpenLimit',
  408. type: 'value',
  409. // value: '0',
  410. position: [-6.2, 1.55, 0.06],
  411. },
  412. {
  413. domId: 'cqf2',
  414. title: '出气阀2#开度',
  415. code: 'CentrifugalPump2_AirOutValve2_OpenLimit',
  416. type: 'value',
  417. // value: '0',
  418. position: [-9.58, 1.55, -0.13],
  419. },
  420. ];
  421. }
  422. };
  423. export function getComponent() {
  424. const { sysOrgCode } = useGlobSetting();
  425. // const sysOrgCode = 'sdmtjtcctrk';
  426. let gasPumpHome;
  427. switch (sysOrgCode) {
  428. case 'sdmtjtbetmk': // 布尔台
  429. gasPumpHome = defineAsyncComponent(() => import('./components/gasPumpHome.vue'));
  430. return gasPumpHome;
  431. case 'sdmtjtcctrk': // 布尔台
  432. gasPumpHome = defineAsyncComponent(() => import('./components/gasPumpHomeCC.vue'));
  433. return gasPumpHome;
  434. default:
  435. gasPumpHome = defineAsyncComponent(() => import('./components/gasPumpHome.vue'));
  436. return gasPumpHome;
  437. }
  438. }
  439. export async function getMonitorData(deviceType) {
  440. const { sysOrgCode } = useGlobSetting();
  441. // const sysOrgCode = 'sdmtjtcctrk';
  442. switch (sysOrgCode) {
  443. case 'sdmtjtcctmk':
  444. return await import('./gasPump.dataCc');
  445. case 'sdmtjtcctrk':
  446. if (deviceType == 'pump_under') {
  447. return await import('./gasPump.dataCc2_1');
  448. } else if (deviceType == 'pump_under_31') {
  449. return await import('./gasPump.dataCc2_2');
  450. }
  451. default: //默认
  452. if (deviceType == 'pump_over') {
  453. return await import('./gasPump.dataCc2_1');
  454. } else if (deviceType == 'pump_under') {
  455. return await import('./gasPump.dataCc2_2');
  456. }
  457. }
  458. }
  459. interface deviceChildType {
  460. title: string;
  461. key: string[];
  462. childTitle: string[];
  463. }
  464. interface propertyListType {
  465. title: string;
  466. type: string;
  467. code: string;
  468. }
  469. export interface devicePropertyType {
  470. type: string;
  471. title: string;
  472. stateHeader: [];
  473. children: deviceChildType[];
  474. list: propertyListType[];
  475. }