device.data.ts 12 KB

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