1
0

gasPump.data.ts 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  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 function getComponent() {
  285. const { sysOrgCode } = useGlobSetting();
  286. let gasPumpHome;
  287. switch (sysOrgCode) {
  288. case 'sdmtjtbetmk': // 布尔台
  289. gasPumpHome = defineAsyncComponent(() => import('./components/gasPumpHome.vue'));
  290. return gasPumpHome;
  291. default:
  292. gasPumpHome = defineAsyncComponent(() => import('./components/gasPumpHomeCC.vue'));
  293. return gasPumpHome;
  294. }
  295. }
  296. export async function getMonitorData(deviceType) {
  297. const globSetting = useGlobSetting();
  298. switch (globSetting.sysOrgCode) {
  299. case 'sdmtjtcctmk':
  300. return await import('./gasPump.dataCc');
  301. case 'sdmtjtcctrk':
  302. if (deviceType == 'pump_under') {
  303. return await import('./gasPump.dataCc2_1');
  304. } else if (deviceType == 'pump_under_31') {
  305. return await import('./gasPump.dataCc2_2');
  306. }
  307. default: //默认
  308. if (deviceType == 'pump_over') {
  309. return await import('./gasPump.dataCc2_1');
  310. } else if (deviceType == 'pump_under') {
  311. return await import('./gasPump.dataCc2_2');
  312. }
  313. }
  314. }
  315. interface deviceChildType {
  316. title: string;
  317. key: string[];
  318. childTitle: string[];
  319. }
  320. interface propertyListType {
  321. title: string;
  322. type: string;
  323. code: string;
  324. }
  325. export interface devicePropertyType {
  326. type: string;
  327. title: string;
  328. stateHeader: [];
  329. children: deviceChildType[];
  330. list: propertyListType[];
  331. }