workFace.data.ts 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765
  1. import { reactive, ref } from 'vue';
  2. import { BasicColumn } from '/@/components/Table';
  3. import echarts from '/@/utils/lib/echarts';
  4. import * as THREE from 'three';
  5. export const monitorNav = [
  6. {
  7. title: '一通三防综合管控',
  8. isShow: true,
  9. },
  10. {
  11. title: '通风监测与管控',
  12. isShow: false,
  13. },
  14. {
  15. title: '防灭火监测与管控',
  16. isShow: false,
  17. },
  18. {
  19. title: '防尘监测与管控',
  20. isShow: false,
  21. },
  22. {
  23. title: '瓦斯防治监测与管控',
  24. isShow: false,
  25. },
  26. ];
  27. export const echartsOption = reactive({
  28. tooltip: { trigger: 'axis', axisPointer: { lineStyle: { color: '#fff' } } },
  29. legend: {
  30. top: '-5',
  31. icon: 'rect',
  32. data: ['进风', '回风'],
  33. right: '10px',
  34. textStyle: { fontSize: 12, color: '#fff' },
  35. },
  36. grid: { x: 50, y: 50, x2: 12, y2: 40, bottom: '25', top: '10' },
  37. xAxis: {
  38. type: 'category',
  39. boundaryGap: false,
  40. axisLine: { lineStyle: { color: '#8EAFB9' } },
  41. axisLabel: { color: '#ffffffcc' },
  42. splitLine: { show: true, lineStyle: { color: '#57617B22', type: 'dashed' } },
  43. data: [],
  44. },
  45. yAxis: [
  46. {
  47. type: 'value',
  48. name: 'm³/min',
  49. axisTick: {
  50. show: false,
  51. },
  52. axisLine: { lineStyle: { show: true, color: '#8EAFB9' } },
  53. axisLabel: { margin: 10, fontSize: 12, color: '#ffffffcc' },
  54. splitLine: { show: true, lineStyle: { color: '#57617B22', type: 'dashed' } },
  55. },
  56. ],
  57. series: [
  58. {
  59. name: '进风',
  60. type: 'line',
  61. smooth: true,
  62. lineStyle: { width: 2 },
  63. yAxisIndex: 0,
  64. // markLine: {
  65. // data: [{ yAxis: 0, name: '需风量' }],
  66. // },
  67. areaStyle: {
  68. color: new echarts.graphic.LinearGradient(
  69. 0,
  70. 0,
  71. 0,
  72. 1,
  73. [
  74. {
  75. offset: 0,
  76. color: 'rgba(185,150,248,0.3)',
  77. },
  78. {
  79. offset: 0.8,
  80. color: 'rgba(185,150,248,0)',
  81. },
  82. ],
  83. false
  84. ),
  85. shadowColor: 'rgba(0, 0, 0, 0.1)',
  86. shadowBlur: 10,
  87. },
  88. itemStyle: { color: '#B996F8' },
  89. data: [],
  90. },
  91. {
  92. name: '回风',
  93. type: 'line',
  94. smooth: true,
  95. lineStyle: { width: 2 },
  96. yAxisIndex: 0,
  97. // markLine: {
  98. // data: [{ yAxis: 0, name: '需风量' }],
  99. // },
  100. areaStyle: {
  101. color: new echarts.graphic.LinearGradient(
  102. 0,
  103. 0,
  104. 0,
  105. 1,
  106. [
  107. {
  108. offset: 0,
  109. color: 'rgba(3, 194, 236, 0.3)',
  110. },
  111. {
  112. offset: 0.8,
  113. color: 'rgba(3, 194, 236, 0)',
  114. },
  115. ],
  116. false
  117. ),
  118. shadowColor: 'rgba(0, 0, 0, 0.1)',
  119. shadowBlur: 10,
  120. },
  121. itemStyle: { color: '#03C2EC' },
  122. data: [],
  123. },
  124. ],
  125. });
  126. export const ventParam = [
  127. {
  128. title: '允许超出风量(m³/min)',
  129. value: '',
  130. type: 'input',
  131. },
  132. {
  133. title: '瓦斯浓度限值(%)',
  134. value: '',
  135. type: 'input',
  136. },
  137. {
  138. title: '瓦斯持续超限时间(s)',
  139. value: '',
  140. type: 'input',
  141. },
  142. {
  143. title: '风量调控策略',
  144. value: '1',
  145. type: 'radio',
  146. },
  147. ];
  148. export const warningConfig = reactive({
  149. header: ['设备名称', '预警信息', '时间'],
  150. data: [
  151. ['火焰6', '严重报警', '03-05'],
  152. ['测点43', '一般预警', '03-05'],
  153. ['CO23', '一般预警', '03-05'],
  154. ['测点6', '超高预警', '03-05'],
  155. ['测点65', '超高预警', '03-05'],
  156. ['温度4', '一般预警', '03-05'],
  157. ['测点61', '一般预警', '03-05'],
  158. ['测点87', '一般信息', '03-05'],
  159. ],
  160. index: false,
  161. headerBGC: '#3d9dd45d',
  162. oddRowBGC: '#009acd10',
  163. evenRowBGC: '#009acd05',
  164. align: ['center', 'center', 'center'],
  165. });
  166. export const locationConfig = reactive({
  167. header: ['人名', '所在位置', '距离'],
  168. data: [],
  169. index: false,
  170. columnWidth: [100, 200, 80],
  171. headerBGC: '#3d9dd45d',
  172. oddRowBGC: '#009acd10',
  173. evenRowBGC: '#009acd05',
  174. align: ['center', 'center', 'center'],
  175. });
  176. export const sensorColumns: BasicColumn[] = [
  177. {
  178. title: '名称',
  179. dataIndex: 'strname',
  180. width: 100,
  181. align: 'center',
  182. },
  183. {
  184. title: '实时值',
  185. dataIndex: 'smokeval',
  186. width: 80,
  187. align: 'center',
  188. },
  189. {
  190. title: '报警',
  191. dataIndex: 'warnFlag',
  192. width: 100,
  193. align: 'center',
  194. },
  195. ];
  196. export const gateColumns: BasicColumn[] = [
  197. {
  198. title: '名称',
  199. dataIndex: 'strname',
  200. width: 100,
  201. align: 'center',
  202. },
  203. {
  204. title: '前门状态',
  205. dataIndex: 'frontGateOpen',
  206. width: 80,
  207. align: 'center',
  208. },
  209. {
  210. title: '后门状态',
  211. dataIndex: 'rearGateOpen',
  212. width: 80,
  213. align: 'center',
  214. },
  215. {
  216. title: '操作',
  217. dataIndex: 'action',
  218. width: 80,
  219. align: 'center',
  220. },
  221. ];
  222. export const windowColumns: BasicColumn[] = [
  223. {
  224. title: '名称',
  225. dataIndex: 'strname',
  226. width: 100,
  227. align: 'center',
  228. },
  229. {
  230. title: '过风量',
  231. dataIndex: 'forntm3',
  232. width: 80,
  233. align: 'center',
  234. },
  235. {
  236. title: '操作',
  237. dataIndex: 'action',
  238. width: 80,
  239. align: 'center',
  240. },
  241. ];
  242. export const windColumns: BasicColumn[] = [
  243. {
  244. title: '名称',
  245. dataIndex: 'strname',
  246. width: 100,
  247. align: 'center',
  248. },
  249. {
  250. title: '风量',
  251. dataIndex: 'm3',
  252. width: 80,
  253. align: 'center',
  254. },
  255. {
  256. title: '操作',
  257. dataIndex: 'action',
  258. width: 80,
  259. align: 'center',
  260. },
  261. ];
  262. export const dustColumns: BasicColumn[] = [
  263. {
  264. title: '名称',
  265. dataIndex: 'strname',
  266. width: 100,
  267. align: 'center',
  268. },
  269. {
  270. title: '链接状态',
  271. dataIndex: 'netStatus',
  272. width: 80,
  273. align: 'center',
  274. },
  275. {
  276. title: '操作',
  277. dataIndex: 'action',
  278. width: 100,
  279. align: 'center',
  280. },
  281. ];
  282. export const beamTubeColumns = [
  283. {
  284. gasval: '甲烷(%)',
  285. ch2val: '乙烯(ppm)',
  286. },
  287. {
  288. o2val: '氧气(%)',
  289. chval: '乙炔(ppm)',
  290. },
  291. {
  292. coval: '一氧化碳(ppm)',
  293. co2val: '二氧化碳(%)',
  294. },
  295. ];
  296. export const groutColumns = [
  297. {
  298. flowRate: '流量(m³/min)',
  299. pressure: '压力(Pa)',
  300. },
  301. ];
  302. export const nitrogenColumns = [
  303. {
  304. cumulativeFlow: '流量(m³/min)',
  305. nitrogenPressure: '压力(Pa)',
  306. },
  307. ];
  308. export const sprayColumns: BasicColumn[] = [
  309. {
  310. title: '名称',
  311. dataIndex: 'strname',
  312. width: 100,
  313. align: 'center',
  314. },
  315. {
  316. title: '连接状态',
  317. dataIndex: 'netStatus',
  318. width: 80,
  319. align: 'center',
  320. },
  321. {
  322. title: '启停',
  323. dataIndex: 'action',
  324. width: 80,
  325. align: 'center',
  326. },
  327. ];
  328. export const disasterParam = ref([
  329. {
  330. title: '触发灾变传感器',
  331. value: '1',
  332. type: 'select',
  333. options: [
  334. {
  335. label: 'CO与烟雾',
  336. value: '1',
  337. },
  338. {
  339. label: 'CO',
  340. value: '2',
  341. },
  342. {
  343. label: '烟雾',
  344. value: '3',
  345. },
  346. ],
  347. },
  348. {
  349. title: 'CO浓度限值(ppm)',
  350. value: '',
  351. type: 'input',
  352. },
  353. {
  354. title: 'CO报警持续时间(s)',
  355. value: '',
  356. type: 'input',
  357. },
  358. {
  359. title: '烟雾报警持续时间(s)',
  360. value: '',
  361. type: 'input',
  362. },
  363. ]);
  364. export const compressorMonitor = [
  365. {
  366. title: '总吸风量',
  367. code: 'windQuantity2',
  368. unit: 'm³/min',
  369. },
  370. {
  371. title: '总供风量',
  372. code: 'windQuantity1',
  373. unit: 'm³/min',
  374. },
  375. {
  376. title: '局扇频率',
  377. code: 'fHz',
  378. unit: 'Hz',
  379. },
  380. {
  381. title: '进风风窗当前面积',
  382. code: 'jinArea',
  383. unit: '㎡',
  384. },
  385. {
  386. title: '回风风窗当前面积',
  387. code: 'huiArea',
  388. unit: '㎡',
  389. },
  390. ];
  391. export const compressorParam = [
  392. {
  393. title: 'O2浓度限值',
  394. value: '',
  395. type: 'input',
  396. },
  397. {
  398. title: 'CO浓度限值',
  399. value: '',
  400. type: 'input',
  401. },
  402. ];
  403. export const compressorDeviceParam = [
  404. {
  405. title: '局扇频率调节(Hz)',
  406. value: '',
  407. type: 'input',
  408. },
  409. {
  410. title: '进风风窗当前面积(㎡)',
  411. value: '',
  412. type: 'input',
  413. },
  414. {
  415. title: '回风风窗当前面积(㎡)',
  416. value: '',
  417. type: 'input',
  418. },
  419. ];
  420. export const coalMachineDustParam = [
  421. {
  422. title: '内喷雾压力',
  423. value: '',
  424. unit: 'Pa',
  425. },
  426. {
  427. title: '内喷雾流量',
  428. value: '',
  429. unit: 'm³/min',
  430. },
  431. {
  432. title: '外喷雾压力',
  433. value: '',
  434. unit: 'Pa',
  435. },
  436. {
  437. title: '外喷雾流量',
  438. value: '',
  439. unit: 'm³/min',
  440. },
  441. ];
  442. export const beltMachineDustParam = [
  443. {
  444. title: '全尘',
  445. value: '',
  446. unit: 'mg/m³',
  447. },
  448. {
  449. title: '呼尘',
  450. value: '',
  451. unit: 'mg/m³',
  452. },
  453. {
  454. title: '内喷雾压力',
  455. value: '',
  456. unit: 'Pa',
  457. },
  458. {
  459. title: '内喷雾流量',
  460. value: '',
  461. unit: 'm³/min',
  462. },
  463. {
  464. title: '外喷雾压力',
  465. value: '',
  466. unit: 'Pa',
  467. },
  468. {
  469. title: '外喷雾流量',
  470. value: '',
  471. type: 'input',
  472. unit: 'm³/min',
  473. },
  474. ];
  475. export const dustConfig = reactive({
  476. header: ['编号', '位置', '触发', '故障诊断'],
  477. data: [
  478. ['001', '0m', '是', '正常'],
  479. ['002', '2m', '是', '正常'],
  480. ['003', '4m', '是', '正常'],
  481. ['004', '6m', '是', '正常'],
  482. ['005', '8m', '是', '正常'],
  483. ['006', '10m', '是', '正常'],
  484. ['007', '12m', '是', '正常'],
  485. ],
  486. index: false,
  487. headerBGC: '#3d9dd45d',
  488. oddRowBGC: '#009acd10',
  489. evenRowBGC: '#009acd05',
  490. align: ['center', 'center', 'center', 'center'],
  491. });
  492. export const gasMonitor = [
  493. {
  494. title: '甲烷浓度T0 (%)',
  495. code: 'T0',
  496. },
  497. {
  498. title: '甲烷浓度T1 (%)',
  499. code: 'T1',
  500. },
  501. {
  502. title: '甲烷浓度T2 (%)',
  503. code: 'T2',
  504. },
  505. {
  506. title: '二氧化碳浓度 (%)',
  507. code: 'CO2',
  508. },
  509. {
  510. title: '瓦斯抽采浓度 (%)',
  511. code: 'gasC',
  512. },
  513. {
  514. title: '瓦斯抽采混量 (m³/min)',
  515. code: 'gasMixMass',
  516. },
  517. {
  518. title: '瓦斯抽采纯量 (m³/min)',
  519. code: 'gasMass',
  520. },
  521. {
  522. title: '残余瓦斯含量 (m³/t)',
  523. code: 'gasMass',
  524. },
  525. {
  526. title: '累计抽采量 (m³)',
  527. code: 'gasTotalMass',
  528. },
  529. {
  530. title: '风压 (kPa)',
  531. code: 'windPressure',
  532. },
  533. ];
  534. export const gasParamData = [
  535. {
  536. title: '走向长度 (m)',
  537. code: 'lenH',
  538. },
  539. {
  540. title: '倾向长度 (m)',
  541. code: 'lenDip',
  542. },
  543. {
  544. title: '煤层厚度 (m)',
  545. code: 'thickness',
  546. },
  547. {
  548. title: '煤层倾角 (°)',
  549. code: 'angleDip',
  550. },
  551. {
  552. title: '吸附常数a (cm³/gdaf)',
  553. code: 'adsorbA',
  554. },
  555. {
  556. title: '吸附常数b (MPa-l)',
  557. code: 'adsorbB',
  558. },
  559. {
  560. title: '水分Mad (%)',
  561. code: 'waterMad',
  562. },
  563. {
  564. title: '灰分Ad (%)',
  565. code: 'dustAd',
  566. },
  567. {
  568. title: '挥发分Vdaf (%)',
  569. code: 'volatilizeAd',
  570. },
  571. {
  572. title: '孔隙率 (m³)',
  573. code: 'poreRate',
  574. },
  575. {
  576. title: '真相对密度',
  577. code: 'trueDensity',
  578. },
  579. {
  580. title: '视相对密度',
  581. code: 'apparentDensity',
  582. },
  583. ];
  584. export const currentGasMonitor = [
  585. {
  586. title: '原始瓦斯含量 (m³/t)',
  587. code: 'gasOriginalMass',
  588. },
  589. {
  590. title: '残余瓦斯含量 (m³/t)',
  591. code: 'gasRemnantMass',
  592. },
  593. {
  594. title: '残存瓦斯含量 (m³/t)',
  595. code: 'gasSurviveMass',
  596. },
  597. {
  598. title: '瓦斯压力 (MPa)',
  599. code: 'gasTotalMass',
  600. },
  601. {
  602. title: '煤层厚度 (m)',
  603. code: 'currentThickness',
  604. },
  605. {
  606. title: '煤层倾角 (°)',
  607. code: 'currentAngleDip',
  608. },
  609. {
  610. title: '地质构造',
  611. code: 'geologicStructure',
  612. },
  613. ];
  614. export const gasPumpValve = [
  615. {
  616. title: '1#智能阀门',
  617. code: 'valve1Val',
  618. inputNum: 0,
  619. },
  620. {
  621. title: '2#智能阀门',
  622. code: 'valve2Val',
  623. inputNum: 0,
  624. },
  625. {
  626. title: '3#智能阀门',
  627. code: 'valve3Val',
  628. inputNum: 0,
  629. },
  630. {
  631. title: '4#智能阀门',
  632. code: 'valve4Val',
  633. inputNum: 0,
  634. },
  635. {
  636. title: '5#智能阀门',
  637. code: 'valve5Val',
  638. inputNum: 0,
  639. },
  640. ];
  641. export const highTensionNum = 3;
  642. export const lowTensionNum = 1;
  643. export const gasExtractionUnit = [
  644. {
  645. title: '负压 (kPa)',
  646. code: 'nPressure',
  647. },
  648. {
  649. title: 'CH4 (%)',
  650. code: 'CH4 ',
  651. },
  652. {
  653. title: '流量 (m³/min)',
  654. code: 'flowRate',
  655. },
  656. {
  657. title: '纯量 (m³/min)',
  658. code: 'scalarRate',
  659. },
  660. // {
  661. // title: '累计抽采量 (m³)',
  662. // code: 'unitTotalMass',
  663. // },
  664. ];
  665. export const gasPump = [
  666. {
  667. title: '1#抽采泵',
  668. code: 'extractionPump1',
  669. value: '0',
  670. ctrCode: 'gasPump1Open',
  671. },
  672. {
  673. title: '1#抽采泵',
  674. code: 'extractionPump1',
  675. value: '0',
  676. ctrCode: 'gasPump2Open',
  677. },
  678. ];
  679. export const gasPumpCtr = reactive({
  680. gasPump1Open: '0',
  681. gasPump2Open: '0',
  682. });
  683. export const gasUnitDetail = [
  684. {
  685. title: '抽采负压(kPa)',
  686. code: 'nPressure',
  687. // unit: 'kPa',
  688. },
  689. {
  690. title: '甲烷浓度(%)',
  691. code: 'CH4 ',
  692. // unit: '%',
  693. },
  694. {
  695. title: '气体温度(℃)',
  696. code: 'temperature',
  697. // unit: '℃',
  698. },
  699. {
  700. title: '瞬时流量(万m³)',
  701. code: 'flowRate',
  702. // unit: '万m³',
  703. },
  704. {
  705. title: '实时累计纯量(万m³)',
  706. code: 'scalarRate',
  707. // unit: '万m³',
  708. },
  709. // {
  710. // title: '累计抽采量 (m³)',
  711. // code: 'unitTotalMass',
  712. // },
  713. ];
  714. export function getBezierControlPoint(A = { x: 1, y: 1 }, alpha_degrees = 45, d = 10) {
  715. // 转换角度为弧度
  716. const alpha_radians = (alpha_degrees * Math.PI) / 180;
  717. // 计算 C 点的坐标
  718. const C = {
  719. x: A.x + d * Math.cos(alpha_radians),
  720. y: A.y + d * Math.sin(alpha_radians),
  721. };
  722. return C;
  723. }
  724. function getBezierLine() {
  725. const curve = new THREE.CubicBezierCurve(new THREE.Vector2(-10, 0), new THREE.Vector2(-5, 15), new THREE.Vector2(20, 15), new THREE.Vector2(10, 0));
  726. const points = curve.getPoints(50);
  727. const geometry = new THREE.BufferGeometry().setFromPoints(points);
  728. const material = new THREE.LineBasicMaterial({ color: 0xff0000 });
  729. // Create the final object to add to the scene
  730. const curveObject = new THREE.Line(geometry, material);
  731. return curveObject;
  732. }
  733. function getShape() {}