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