device.data.ts 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  1. import { defineAsyncComponent } from 'vue';
  2. import { BasicColumn } from '/@/components/Table';
  3. import { useGlobSetting } from '/@/hooks/setting';
  4. export const locationList = [
  5. {
  6. title: '风门',
  7. deviceType: 'gate',
  8. isVisible: 0,
  9. },
  10. {
  11. title: '风窗',
  12. deviceType: 'gate1',
  13. isVisible: 0,
  14. },
  15. {
  16. title: '测风装置',
  17. deviceType: 'gate2',
  18. isVisible: 0,
  19. },
  20. {
  21. title: '传感器',
  22. deviceType: 'gate3',
  23. isVisible: 0,
  24. },
  25. {
  26. title: '局部风机',
  27. deviceType: 'gate4',
  28. isVisible: 0,
  29. },
  30. {
  31. title: '主风机',
  32. deviceType: 'gate5',
  33. isVisible: 0,
  34. },
  35. {
  36. title: '风筒',
  37. deviceType: 'gate6',
  38. isVisible: 0,
  39. },
  40. {
  41. title: '密闭墙',
  42. deviceType: 'gate7',
  43. isVisible: 0,
  44. },
  45. ];
  46. export function getMonitorComponent() {
  47. const { sysOrgCode } = useGlobSetting();
  48. // const sysOrgCode = 'sdmtjtswmk';
  49. let FiberModal;
  50. switch (sysOrgCode) {
  51. case 'sdmtjtsgtmk': //石圪台
  52. case 'sdmtjthlgmk': //哈拉沟
  53. FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.hlg.vue'));
  54. break;
  55. case 'sdmtjtcctmk': // 寸草塔
  56. FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.cct.vue'));
  57. break;
  58. case 'shsddlsjh': //沙吉海
  59. FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.sjh.vue'));
  60. break;
  61. case 'sdmtjtbdmk': //保德
  62. FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.bd.vue'));
  63. break;
  64. case 'sdmtjtbetmk': //布尔台
  65. FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal-Gx.vue'));
  66. break;
  67. case 'sdmtjtyjlmk': //榆家梁
  68. case 'sdmtjtswmk': //上湾
  69. FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.sw.vue'));
  70. break;
  71. default:
  72. FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.hlg.vue'));
  73. // FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.sw.vue'));
  74. // FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.vue'));
  75. // FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal-Gx.vue'));
  76. // FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.cct.vue'));
  77. }
  78. const BundleModal = defineAsyncComponent(() => import('./modal/bundle.modal.vue'));
  79. const FiremonModal = defineAsyncComponent(() => import('./modal/firemon.modal.vue'));
  80. const DustModal = defineAsyncComponent(() => import('./modal/dust.modal.vue'));
  81. const BallvalveModal = defineAsyncComponent(() => import('./modal/ballvalve.modal.vue'));
  82. const AtomizingModal = defineAsyncComponent(() => import('./modal/atomizing.modal.vue'));
  83. const GaspatrolModal = defineAsyncComponent(() => import('./modal/gaspatrol.modal.vue'));
  84. const WisdomBallModal = defineAsyncComponent(() => import('./modal/wisdomball.modal.vue'));
  85. return { FiberModal, BundleModal, DustModal, BallvalveModal, AtomizingModal, GaspatrolModal, WisdomBallModal };
  86. }
  87. export const chartsColumnList = [
  88. {
  89. legend: '一氧化碳',
  90. seriesName: '(ppm)',
  91. ymax: 15,
  92. yname: 'ppm',
  93. linetype: 'line',
  94. yaxispos: 'left',
  95. color: '#FDB146',
  96. sort: 1,
  97. xRotate: 0,
  98. dataIndex: 'coval',
  99. },
  100. {
  101. legend: '乙炔',
  102. seriesName: '',
  103. ymax: 15,
  104. yname: 'ppm',
  105. linetype: 'line',
  106. yaxispos: 'left',
  107. color: '#00FFA8',
  108. sort: 1,
  109. xRotate: 0,
  110. dataIndex: 'chval',
  111. },
  112. {
  113. legend: '乙烯',
  114. seriesName: '',
  115. ymax: 15,
  116. yname: 'ppm',
  117. linetype: 'line',
  118. yaxispos: 'left',
  119. color: '#AE19FF',
  120. sort: 1,
  121. xRotate: 0,
  122. dataIndex: 'ch2val',
  123. },
  124. {
  125. legend: '二氧化碳',
  126. seriesName: '(%)',
  127. ymax: 20,
  128. yname: '%',
  129. linetype: 'line',
  130. yaxispos: 'right',
  131. color: '#9C83D9',
  132. sort: 2,
  133. xRotate: 0,
  134. dataIndex: 'co2val',
  135. },
  136. {
  137. legend: '甲烷',
  138. seriesName: '',
  139. ymax: 20,
  140. yname: '%',
  141. linetype: 'line',
  142. yaxispos: 'right',
  143. color: '#DA3914',
  144. sort: 2,
  145. xRotate: 0,
  146. dataIndex: 'gasval',
  147. },
  148. {
  149. legend: '氧气',
  150. seriesName: '(%)',
  151. ymax: 30,
  152. yname: '%',
  153. linetype: 'line',
  154. yaxispos: 'right',
  155. color: '#03C2EC',
  156. sort: 3,
  157. xRotate: 0,
  158. dataIndex: 'o2val',
  159. },
  160. ];
  161. export const chartsColumnListGx = [
  162. {
  163. legend: '最高温度',
  164. seriesName: '( °C)',
  165. ymax: 100,
  166. yname: ' °C',
  167. linetype: 'line',
  168. yaxispos: 'left',
  169. color: '#FDB146',
  170. sort: 1,
  171. xRotate: 0,
  172. dataIndex: 'hightemperature',
  173. },
  174. {
  175. legend: '平均温度',
  176. seriesName: '( °C)',
  177. ymax: 100,
  178. yname: ' °C',
  179. linetype: 'line',
  180. yaxispos: 'left',
  181. color: '#00FFA8',
  182. sort: 1,
  183. xRotate: 0,
  184. dataIndex: 'avgtemperature',
  185. },
  186. ];
  187. export const chartsColumnListBall = [
  188. {
  189. legend: '一氧化碳',
  190. seriesName: '(ppm)',
  191. ymax: 30,
  192. yname: 'ppm',
  193. linetype: 'line',
  194. yaxispos: 'left',
  195. color: '#FDB146',
  196. sort: 1,
  197. xRotate: 0,
  198. dataIndex: 'coValue',
  199. },
  200. {
  201. legend: '氧气',
  202. seriesName: '',
  203. ymax: 30,
  204. yname: '%',
  205. linetype: 'line',
  206. yaxispos: 'right',
  207. color: '#00FFA8',
  208. sort: 2,
  209. xRotate: 0,
  210. dataIndex: 'o2Value',
  211. },
  212. {
  213. legend: '温度',
  214. seriesName: '(℃)',
  215. ymax: 30,
  216. yname: '℃',
  217. linetype: 'line',
  218. yaxispos: 'right',
  219. color: '#AE19FF',
  220. sort: 3,
  221. xRotate: 0,
  222. dataIndex: 'tempValue',
  223. },
  224. {
  225. legend: '二氧化碳',
  226. seriesName: '(%)',
  227. ymax: 30,
  228. yname: '%',
  229. linetype: 'line',
  230. yaxispos: 'right',
  231. color: '#9C83D9',
  232. sort: 2,
  233. xRotate: 0,
  234. dataIndex: 'co2val',
  235. },
  236. ];
  237. export const majorColumns: BasicColumn[] = [
  238. {
  239. title: '序号',
  240. dataIndex: '',
  241. key: 'rowIndex',
  242. width: 60,
  243. align: 'center',
  244. customRender: ({ index }) => {
  245. return `${index + 1}`;
  246. },
  247. },
  248. {
  249. title: '测段名称',
  250. align: 'center',
  251. dataIndex: 'name',
  252. width: 110,
  253. },
  254. {
  255. title: '始点',
  256. children: [
  257. {
  258. title: '测点位置',
  259. align: 'center',
  260. dataIndex: 'name1',
  261. width: 140,
  262. },
  263. {
  264. title: '风压(Pa)',
  265. align: 'center',
  266. dataIndex: 'pressure1',
  267. width: 100,
  268. },
  269. // {
  270. // title:'风压(kPa)',
  271. // align:"center",
  272. // dataIndex: 'name1'
  273. // },
  274. {
  275. title: '密度(kg/m³)',
  276. align: 'center',
  277. dataIndex: 'density1',
  278. width: 100,
  279. },
  280. {
  281. title: '标高(m)',
  282. align: 'center',
  283. dataIndex: 'elevation1',
  284. width: 100,
  285. },
  286. ],
  287. },
  288. {
  289. title: '末点',
  290. children: [
  291. {
  292. title: '测点位置',
  293. align: 'center',
  294. dataIndex: 'name2',
  295. width: 140,
  296. },
  297. {
  298. title: '风压(Pa)',
  299. align: 'center',
  300. dataIndex: 'pressure2',
  301. width: 100,
  302. },
  303. // {
  304. // title:'风压(kPa)',
  305. // align:"center",
  306. // dataIndex: 'name1'
  307. // },
  308. {
  309. title: '密度(kg/m³)',
  310. align: 'center',
  311. dataIndex: 'density2',
  312. width: 100,
  313. },
  314. {
  315. title: '标高(m)',
  316. align: 'center',
  317. dataIndex: 'elevation2',
  318. width: 100,
  319. },
  320. ],
  321. },
  322. {
  323. title: '风量(m³/min)',
  324. align: 'center',
  325. dataIndex: 'm3',
  326. width: 110,
  327. },
  328. {
  329. title: '阻力(Pa)',
  330. align: 'center',
  331. dataIndex: 'drag',
  332. width: 100,
  333. },
  334. {
  335. title: '风阻(Ns²/m⁸)',
  336. align: 'center',
  337. dataIndex: 'wdrag',
  338. width: 110,
  339. },
  340. {
  341. title: '更新时间',
  342. dataIndex: 'datatime',
  343. align: 'center',
  344. width: 127,
  345. },
  346. ];
  347. export const surfaceChartsColumns = [
  348. {
  349. legend: '进风',
  350. seriesName: '(m³/min)',
  351. ymax: 5000,
  352. yname: 'm³/min',
  353. linetype: 'line',
  354. yaxispos: 'left',
  355. color: '#00FFA8',
  356. sort: 1,
  357. xRotate: 0,
  358. dataIndex: 'jin',
  359. },
  360. {
  361. legend: '回风',
  362. seriesName: '',
  363. ymax: 5000,
  364. yname: 'm³/min',
  365. linetype: 'line',
  366. yaxispos: 'left',
  367. color: '#F07070',
  368. sort: 1,
  369. xRotate: 0,
  370. dataIndex: 'hui',
  371. },
  372. ];
  373. export const ballvalveColumns: BasicColumn[] = [
  374. {
  375. title: '设备编号',
  376. dataIndex: 'deviceNum',
  377. width: 60,
  378. align: 'center',
  379. },
  380. {
  381. title: '温度(℃)',
  382. dataIndex: 'tempRealtime',
  383. align: 'center',
  384. width: 60,
  385. },
  386. {
  387. title: 'CO(ppm)',
  388. dataIndex: 'CORealtime',
  389. align: 'center',
  390. width: 50,
  391. },
  392. {
  393. title: '压力(Pa)',
  394. dataIndex: 'PressureRealtime',
  395. align: 'center',
  396. width: 50,
  397. },
  398. {
  399. title: '烟雾(%)',
  400. dataIndex: 'SmokeRealtime485',
  401. align: 'center',
  402. width: 50,
  403. },
  404. {
  405. title: '是否报警',
  406. dataIndex: 'isWarn',
  407. align: 'center',
  408. width: 50,
  409. // customRender: () => {
  410. // return `正常`;
  411. // },
  412. },
  413. ];
  414. export const noDetailArr = ['nitrogen', 'forcFan']; // 前端详情的,
  415. // 棋盘井球阀监测数据只有温度
  416. export const haveDetailArr = [
  417. 'windrect',
  418. 'window',
  419. 'gate',
  420. 'fanlocal',
  421. 'fanmain',
  422. 'fiber',
  423. 'bundletube',
  424. 'gaspatrol',
  425. // 'dusting', // 保德要求去掉
  426. // 'ballvalve',
  427. 'pump',
  428. 'safetymonitor',
  429. 'nitrogen',
  430. 'atomizing',
  431. 'firemon',
  432. 'forcFan',
  433. 'pulping',
  434. ];
  435. export const locationFormConfig = {
  436. labelAlign: 'left',
  437. showAdvancedButton: false,
  438. showResetButton: true,
  439. showSubmitButton: false,
  440. size: 'small',
  441. // baseColProps: {
  442. // // offset: 0.5,
  443. // xs: 24,
  444. // sm: 24,
  445. // md: 24,
  446. // lg: 9,
  447. // xl: 7,
  448. // xxl: 4,
  449. // },
  450. schemas: [
  451. {
  452. label: '人员名称',
  453. field: 'strname',
  454. component: 'Input',
  455. },
  456. {
  457. label: '所属部门',
  458. field: 'department',
  459. component: 'MTreeSelect',
  460. componentProps: {
  461. placeholder: '请选择所属部门',
  462. virtual: false,
  463. api: '/monitor/getDepartmentInfo',
  464. },
  465. },
  466. {
  467. label: '分站名称',
  468. field: 'stationname',
  469. component: 'Input',
  470. },
  471. ],
  472. colProps: {
  473. span: 4,
  474. },
  475. };
  476. export const vehicleFormConfig = {
  477. labelAlign: 'left',
  478. showAdvancedButton: false,
  479. showResetButton: true,
  480. showSubmitButton: false,
  481. // size: 'small',
  482. // baseColProps: {
  483. // // offset: 0.5,
  484. // xs: 24,
  485. // sm: 24,
  486. // md: 24,
  487. // lg: 9,
  488. // xl: 7,
  489. // xxl: 4,
  490. // },
  491. schemas: [
  492. {
  493. label: '车辆名称',
  494. field: 'strname',
  495. component: 'Input',
  496. },
  497. {
  498. label: '分站名称',
  499. field: 'stationname',
  500. component: 'Input',
  501. },
  502. ],
  503. colProps: {
  504. span: 4,
  505. },
  506. };
  507. export const haveHandlerArr = [
  508. 'windrect',
  509. 'window',
  510. 'gate',
  511. 'fanlocal',
  512. // 'fanmain',
  513. 'pump',
  514. 'obfurage',
  515. 'nitrogen',
  516. 'pulping',
  517. 'spray',
  518. 'dustdev',
  519. 'gate_linkdlfm',
  520. // 'firemon',
  521. ]; // table无操作
  522. export const noWarningArr = [
  523. 'location',
  524. 'vehicle',
  525. 'cheliang',
  526. 'majorpath',
  527. 'gasDayReport',
  528. 'dustDayReport',
  529. 'bundleDayReport',
  530. 'bundleSpyDayReport',
  531. 'gate_linkdlfm',
  532. 'substation_normal',
  533. ]; // 无预警详情的
  534. export const haveSysDetailArr = ['forcFan', 'pulping']; //有场景详情的
  535. // export const haveSysDetailArr = ['']; //有场景详情的
  536. export const noHistoryArr = () =>
  537. History_Type['type'] == 'remote'
  538. ? ['surface_history', 'majorpath', 'gasDayReport', 'dustDayReport', 'bundleDayReport', 'bundleSpyDayReport', 'gasDay', 'gate_linkdlfm']
  539. : ['majorpath', 'gasDayReport', 'dustDayReport', 'bundleDayReport', 'bundleSpyDayReport', 'gate_linkdlfm', 'gasDay', 'substation_normal'];