device.data.ts 12 KB

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