gasPump.data.ts 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  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 = 'sdmtjtcctmk';
  287. switch (sysOrgCode) {
  288. case 'sdmtjtcctmk': // 寸草塔1
  289. return [
  290. {
  291. domId: 'jsf1',
  292. title: '进水阀1#',
  293. code: 'DRS13_GVL1_OpenLimit',
  294. type: 'sign',
  295. // value: '0',
  296. position: [-5.26, 0.28, 0.6],
  297. },
  298. {
  299. domId: 'jsf2',
  300. title: '进水阀2#',
  301. code: 'DRS13_GVL2_OpenLimit',
  302. type: 'sign',
  303. // value: '0',
  304. position: [-8.75, 0.3, 0.6],
  305. },
  306. {
  307. domId: 'csf1',
  308. title: '出水阀1#',
  309. code: 'DRS13_GVL1_OpenLimit',
  310. type: 'sign',
  311. // value: '0',
  312. position: [-5.74, 0.35, 0.27],
  313. },
  314. {
  315. domId: 'csf2',
  316. title: '出水阀2#',
  317. code: 'DRS13_GVL2_OpenLimit',
  318. type: 'sign',
  319. // value: '0',
  320. position: [-9.42, 0.35, 0.3],
  321. },
  322. {
  323. domId: 'jqf1',
  324. title: '进气阀1#开度',
  325. code: 'DRS13_GVL4_OpenLimit',
  326. type: 'value',
  327. // value: '0',
  328. position: [-4.41, 1.28, 0.03],
  329. },
  330. {
  331. domId: 'jqf2',
  332. title: '进气阀2#开度',
  333. code: 'DRS13_GVL6_OpenLimit',
  334. type: 'value',
  335. // value: '0',
  336. position: [-7.7, 1.31, -0.14],
  337. },
  338. {
  339. domId: 'cqf1',
  340. title: '出气阀1#开度',
  341. code: 'DRS13_GVL43_OpenLimit',
  342. type: 'value',
  343. // value: '0',
  344. position: [-6.2, 1.55, 0.06],
  345. },
  346. {
  347. domId: 'cqf2',
  348. title: '出气阀2#开度',
  349. code: 'DRS13_GVL5_OpenLimit',
  350. type: 'value',
  351. // value: '0',
  352. position: [-9.58, 1.55, -0.13],
  353. },
  354. ];
  355. case 'sdmtjtcctrk': // 布尔台
  356. return [
  357. {
  358. domId: 'jsf1',
  359. title: '进水阀1#',
  360. code: 'CentrifugalPump1_WaterInValve1_OpenLimit',
  361. type: 'sign',
  362. // value: '0',
  363. position: [-5.26, 0.28, 0.6],
  364. },
  365. {
  366. domId: 'jsf2',
  367. title: '进水阀2#',
  368. code: 'CentrifugalPump2_WaterInValve1_OpenLimit',
  369. type: 'sign',
  370. // value: '0',
  371. position: [-8.75, 0.3, 0.6],
  372. },
  373. {
  374. domId: 'csf1',
  375. title: '出水阀1#',
  376. code: 'CentrifugalPump1_WaterOutValve2_OpenLimit',
  377. type: 'sign',
  378. // value: '0',
  379. position: [-5.74, 0.35, 0.27],
  380. },
  381. {
  382. domId: 'csf2',
  383. title: '出水阀2#',
  384. code: 'CentrifugalPump2_WaterOutValve2_OpenLimit',
  385. type: 'sign',
  386. // value: '0',
  387. position: [-9.42, 0.35, 0.3],
  388. },
  389. {
  390. domId: 'jqf1',
  391. title: '进气阀1#开度',
  392. code: 'CentrifugalPump1_AirInValve1_OpenLimit',
  393. type: 'value',
  394. // value: '0',
  395. position: [-4.41, 1.28, 0.03],
  396. },
  397. {
  398. domId: 'jqf2',
  399. title: '进气阀2#开度',
  400. code: 'CentrifugalPump2_AirInValve1_OpenLimit',
  401. type: 'value',
  402. // value: '0',
  403. position: [-7.7, 1.31, -0.14],
  404. },
  405. {
  406. domId: 'cqf1',
  407. title: '出气阀1#开度',
  408. code: 'CentrifugalPump1_AirOutValve2_OpenLimit',
  409. type: 'value',
  410. // value: '0',
  411. position: [-6.2, 1.55, 0.06],
  412. },
  413. {
  414. domId: 'cqf2',
  415. title: '出气阀2#开度',
  416. code: 'CentrifugalPump2_AirOutValve2_OpenLimit',
  417. type: 'value',
  418. // value: '0',
  419. position: [-9.58, 1.55, -0.13],
  420. },
  421. ];
  422. default:
  423. return [
  424. {
  425. domId: 'jsf1',
  426. title: '进水阀1#',
  427. code: 'CentrifugalPump1_WaterInValve1_OpenLimit',
  428. type: 'sign',
  429. // value: '0',
  430. position: [-5.26, 0.28, 0.6],
  431. },
  432. {
  433. domId: 'jsf2',
  434. title: '进水阀2#',
  435. code: 'CentrifugalPump2_WaterInValve1_OpenLimit',
  436. type: 'sign',
  437. // value: '0',
  438. position: [-8.75, 0.3, 0.6],
  439. },
  440. {
  441. domId: 'csf1',
  442. title: '出水阀1#',
  443. code: 'CentrifugalPump1_WaterOutValve2_OpenLimit',
  444. type: 'sign',
  445. // value: '0',
  446. position: [-5.74, 0.35, 0.27],
  447. },
  448. {
  449. domId: 'csf2',
  450. title: '出水阀2#',
  451. code: 'CentrifugalPump2_WaterOutValve2_OpenLimit',
  452. type: 'sign',
  453. // value: '0',
  454. position: [-9.42, 0.35, 0.3],
  455. },
  456. {
  457. domId: 'jqf1',
  458. title: '进气阀1#',
  459. code: 'CentrifugalPump1_AirInValve1_OpenLimit',
  460. type: 'sign',
  461. // value: '0',
  462. position: [-4.41, 1.28, 0.03],
  463. },
  464. {
  465. domId: 'jqf2',
  466. title: '进气阀2#',
  467. code: 'CentrifugalPump2_AirInValve1_OpenLimit',
  468. type: 'sign',
  469. // value: '0',
  470. position: [-7.7, 1.31, -0.14],
  471. },
  472. {
  473. domId: 'cqf1',
  474. title: '出气阀1#',
  475. code: 'CentrifugalPump1_AirOutValve2_OpenLimit',
  476. type: 'sign',
  477. // value: '0',
  478. position: [-6.2, 1.55, 0.06],
  479. },
  480. {
  481. domId: 'cqf2',
  482. title: '出气阀2#',
  483. code: 'CentrifugalPump2_AirOutValve2_OpenLimit',
  484. type: 'sign',
  485. // value: '0',
  486. position: [-9.58, 1.55, -0.13],
  487. },
  488. ];
  489. }
  490. };
  491. export function getComponent() {
  492. const { sysOrgCode } = useGlobSetting();
  493. // const sysOrgCode = 'sdmtjtcctmk';
  494. let gasPumpHome;
  495. switch (sysOrgCode) {
  496. case 'sdmtjtbetmk': // 布尔台
  497. gasPumpHome = defineAsyncComponent(() => import('./components/gasPumpHome.vue'));
  498. return gasPumpHome;
  499. case 'sdmtjtcctmk': // 寸草塔1
  500. gasPumpHome = defineAsyncComponent(() => import('./components/gasPumpHomeCC.vue'));
  501. return gasPumpHome;
  502. case 'sdmtjtcctrk': // 布尔台
  503. gasPumpHome = defineAsyncComponent(() => import('./components/gasPumpHomeCC.vue'));
  504. return gasPumpHome;
  505. default:
  506. gasPumpHome = defineAsyncComponent(() => import('./components/gasPumpHome.vue'));
  507. return gasPumpHome;
  508. }
  509. }
  510. export async function getMonitorData(deviceType) {
  511. // const { sysOrgCode } = useGlobSetting();
  512. const sysOrgCode = 'sdmtjtcctmk';
  513. switch (sysOrgCode) {
  514. case 'sdmtjtcctmk':
  515. return await import('./gasPump.dataCc');
  516. case 'sdmtjtcctrk':
  517. if (deviceType == 'pump_under') {
  518. return await import('./gasPump.dataCc2_1');
  519. } else if (deviceType == 'pump_under_31') {
  520. return await import('./gasPump.dataCc2_2');
  521. }
  522. default: //默认
  523. if (deviceType == 'pump_over') {
  524. return await import('./gasPump.dataCc2_1');
  525. } else if (deviceType == 'pump_under') {
  526. return await import('./gasPump.dataCc2_2');
  527. }
  528. }
  529. }
  530. interface deviceChildType {
  531. title: string;
  532. key: string[];
  533. childTitle: string[];
  534. }
  535. interface propertyListType {
  536. title: string;
  537. type: string;
  538. code: string;
  539. }
  540. export interface devicePropertyType {
  541. type: string;
  542. title: string;
  543. stateHeader: [];
  544. children: deviceChildType[];
  545. list: propertyListType[];
  546. }