device.data.ts 12 KB

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