index.vue 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055
  1. <template>
  2. <div class="dustMonitor">
  3. <customHeader>束管日报分析</customHeader>
  4. <div class="content-container">
  5. <div class="file-list">
  6. <ul>
  7. <li v-for="item in selectList" :key="item.id" :class="{ selected: item.id === selectedFileId }" @click="handleFileClick(item)">
  8. {{ item.fileName }}
  9. </li>
  10. </ul>
  11. </div>
  12. <div class="table-container">
  13. <a-table :columns="computedColumns" :data-source="tableData" size="small" :pagination="false" :scroll="{ y: 250 }" class="tableW">
  14. <template #bodyCell="{ column, record }">
  15. <template v-if="column.dataIndex === 'action'">
  16. <a class="action-link" @click="toDetail(record)">数据分析</a>
  17. </template>
  18. <template v-else>
  19. <template v-if="record[column.dataIndex] === null">
  20. <span>-</span>
  21. </template>
  22. </template>
  23. </template>
  24. </a-table>
  25. <div class="data-container">
  26. <div id="barChart" class="bar-chart"></div>
  27. <div class="data-content">
  28. <div class="title">煤自燃阶段统计分析</div>
  29. <div class="explain">测点共计{{ total }}个</div>
  30. <div class="progress-label">潜伏期阶段:{{ qfqCount }}</div>
  31. <Progress :percent="qfqPercent" size="default" strokeColor="green" :show-info="true" :format="() => qfqCount" />
  32. <div class="progress-label">缓慢氧化升温阶段:{{ latentCount }}</div>
  33. <Progress :percent="latentPercent" size="default" strokeColor="yellow" :show-info="true" :format="() => latentCount" />
  34. <div class="progress-label">加速氧化升温阶段:{{ selfHeatingCount }}</div>
  35. <Progress :percent="selfHeatingPercent" size="default" strokeColor="orange‌" :show-info="true" :format="() => selfHeatingCount" />
  36. <div class="progress-label">剧烈氧化升温阶段:{{ combustionCount }}</div>
  37. <Progress :percent="combustionPercent" size="default" strokeColor="red" :show-info="true" :format="() => combustionCount" />
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. <a-modal style="width: 60%; height: 300px" title="爆炸三角形" v-model:visible="modalVisible" :draggable="true" :footer="null">
  43. <div class="blast-delta-container">
  44. <BlastDelta :posMonitor="posMonitor" style="width: calc(50% - 20px)" />
  45. <BlastDelta1 :posMonitor="posMonitor" style="width: calc(50% - 20px)" />
  46. </div>
  47. </a-modal>
  48. </div>
  49. </template>
  50. <script setup lang="ts">
  51. import { ref, onMounted, computed, shallowRef, reactive, nextTick } from 'vue';
  52. import { columns, Hjtcolumns, Bdcolumns, Bltcolumns, Sgtcolumns, Yjlcolumns, Cctrkcolumns } from './bundle-table.data';
  53. import { getBundleInfoList, getAllFileList, getAllFileListById } from './bundle-table.api';
  54. import customHeader from '/@/components/vent/customHeader.vue';
  55. // import { blastDelta } from './modal/blastDelta.vue';
  56. import BlastDelta from './modal/blastDelta.vue';
  57. import BlastDelta1 from './modal/blastDelta1.vue';
  58. import * as echarts from 'echarts';
  59. import { Progress } from 'ant-design-vue';
  60. import { useGlobSetting } from '/@/hooks/setting';
  61. // import 'ant-design-vue/dist/antd.css'; // 引入样式
  62. let selectList = ref<any[]>([]);
  63. let jcddArr = ref<any[]>([]);
  64. let formSearch = reactive({
  65. pageNum: 1,
  66. pageSize: 1000,
  67. id: '',
  68. fileName: '',
  69. });
  70. const total = ref(0);
  71. const { sysOrgCode } = useGlobSetting();
  72. const qfqCount = ref(0); // 潜伏期
  73. const latentCount = ref(0); // 缓慢氧化阶段(潜伏期)
  74. const selfHeatingCount = ref(0); // 加速氧化阶段(自热期)
  75. const combustionCount = ref(0); // 剧烈氧化阶段(燃烧期)
  76. const qfqPercent = ref(0); // 潜伏期(潜伏期)
  77. const latentPercent = ref(0); // 缓慢氧化阶段(潜伏期)
  78. const selfHeatingPercent = ref(0); // 加速氧化阶段(自热期)
  79. const combustionPercent = ref(0); // 剧烈氧化阶段(燃烧期)
  80. let tableData = ref<any[]>([]);
  81. let modalVisible = ref(false);
  82. let selectedFileId = ref<string | null>(null);
  83. const posMonitor = shallowRef({});
  84. const computedColumns = computed(() => {
  85. switch (sysOrgCode) {
  86. case 'sdmtjtdltmkhjtj':
  87. return Hjtcolumns; // 活鸡兔对应的列配置
  88. case 'sdmtjtBdmk':
  89. return Bdcolumns; // 保德对应的列配置
  90. case 'sdmtjtbltmk':
  91. return Bltcolumns; // 补连塔对应的列配置
  92. case 'sdmtjtsgtmk':
  93. return Sgtcolumns; // 石圪台对应的列配置
  94. case 'sdmtjtyjlmk':
  95. return Yjlcolumns; // 榆家梁对应的列配置
  96. case 'sdmtjtcctrk':
  97. return Cctrkcolumns; // 寸草塔二矿对应的列配置
  98. default:
  99. return columns; // 默认情况下返回的列配置
  100. }
  101. });
  102. function updateChart(data: any) {
  103. const chartDom = document.getElementById('barChart');
  104. const myChart = echarts.init(chartDom);
  105. const categories = data.map((item: any) => item.jcdd);
  106. const c2h2MaxValues = data.map((item: any) => parseFloat(item.c2h2_max));
  107. const c2h2MinValues = data.map((item: any) => parseFloat(item.c2h2_min));
  108. const c2h2AveValues = data.map((item: any) => parseFloat(item.c2h2_ave));
  109. const c2h4MaxValues = data.map((item: any) => parseFloat(item.c2h4_max));
  110. const c2h4MinValues = data.map((item: any) => parseFloat(item.c2h4_min));
  111. const c2h4AveValues = data.map((item: any) => parseFloat(item.c2h4_ave));
  112. const c2h6AveValues = data.map((item: any) => parseFloat(item.c2h6_ave));
  113. const ch4MaxValues = data.map((item: any) => parseFloat(item.ch4_max));
  114. const ch4MinValues = data.map((item: any) => parseFloat(item.ch4_min));
  115. const ch4AveValues = data.map((item: any) => parseFloat(item.ch4_ave));
  116. const co2MaxValues = data.map((item: any) => parseFloat(item.co2_max));
  117. const co2MinValues = data.map((item: any) => parseFloat(item.co2_min));
  118. const co2AveValues = data.map((item: any) => parseFloat(item.co2_ave));
  119. const coMaxValues = data.map((item: any) => parseFloat(item.co_max));
  120. const coMinValues = data.map((item: any) => parseFloat(item.co_min));
  121. const coAveValues = data.map((item: any) => parseFloat(item.co_ave));
  122. const o2MaxValues = data.map((item: any) => parseFloat(item.o2_max));
  123. const o2MinValues = data.map((item: any) => parseFloat(item.o2_min));
  124. const o2AveValues = data.map((item: any) => parseFloat(item.o2_ave));
  125. const n2MaxValues = data.map((item: any) => parseFloat(item.n2_max));
  126. const n2MinValues = data.map((item: any) => parseFloat(item.n2_min));
  127. const n2AveValues = data.map((item: any) => parseFloat(item.n2_ave));
  128. const no2MaxValues = data.map((item: any) => parseFloat(item.no2_max));
  129. const no2MinValues = data.map((item: any) => parseFloat(item.no2_min));
  130. const no2AveValues = data.map((item: any) => parseFloat(item.no2_ave));
  131. const h2MaxValues = data.map((item: any) => parseFloat(item.h2_max));
  132. const h2MinValues = data.map((item: any) => parseFloat(item.h2_min));
  133. const h2AveValues = data.map((item: any) => parseFloat(item.h2_ave));
  134. const getSeriesConfig = (sysOrgCode) => {
  135. switch (sysOrgCode) {
  136. case 'sdmtjtdltmkhjtj':
  137. return [
  138. {
  139. name: 'CO₂最大值',
  140. data: co2MaxValues,
  141. type: 'bar',
  142. },
  143. {
  144. name: 'CO₂平均值',
  145. data: co2AveValues,
  146. type: 'bar',
  147. },
  148. {
  149. name: 'CO最大值',
  150. data: coMaxValues,
  151. type: 'bar',
  152. },
  153. {
  154. name: 'CO平均值',
  155. data: coAveValues,
  156. type: 'bar',
  157. },
  158. {
  159. name: 'O₂最小值',
  160. data: o2MinValues,
  161. type: 'bar',
  162. },
  163. {
  164. name: 'O₂平均值',
  165. data: o2AveValues,
  166. type: 'bar',
  167. },
  168. {
  169. name: 'CH₄最大值',
  170. data: ch4MaxValues,
  171. type: 'bar',
  172. },
  173. {
  174. name: 'CH₄平均值',
  175. data: ch4AveValues,
  176. type: 'bar',
  177. },
  178. {
  179. name: 'N₂最大值',
  180. data: n2MaxValues,
  181. type: 'bar',
  182. },
  183. {
  184. name: 'N₂平均值',
  185. data: n2AveValues,
  186. type: 'bar',
  187. },
  188. {
  189. name: 'C₂H₂最大值',
  190. data: c2h2MaxValues,
  191. type: 'bar',
  192. },
  193. {
  194. name: 'C₂H₂平均值',
  195. data: c2h2AveValues,
  196. type: 'bar',
  197. },
  198. {
  199. name: 'C₂H₄最大值',
  200. data: c2h4MaxValues,
  201. type: 'bar',
  202. },
  203. {
  204. name: 'C₂H₄平均值',
  205. data: c2h4AveValues,
  206. type: 'bar',
  207. },
  208. ];
  209. case 'sdmtjtswmk':
  210. return [
  211. {
  212. name: 'C₂H₂最大值',
  213. data: c2h2MaxValues,
  214. type: 'bar',
  215. },
  216. {
  217. name: 'C₂H₂平均值',
  218. data: c2h2AveValues,
  219. type: 'bar',
  220. },
  221. {
  222. name: 'C₂H₄最大值',
  223. data: c2h4MaxValues,
  224. type: 'bar',
  225. },
  226. {
  227. name: 'C₂H₄平均值',
  228. data: c2h4AveValues,
  229. type: 'bar',
  230. },
  231. {
  232. name: 'CH₄最大值',
  233. data: ch4MaxValues,
  234. type: 'bar',
  235. },
  236. {
  237. name: 'CH₄平均值',
  238. data: ch4AveValues,
  239. type: 'bar',
  240. },
  241. {
  242. name: 'CO₂最大值',
  243. data: co2MaxValues,
  244. type: 'bar',
  245. },
  246. {
  247. name: 'CO₂平均值',
  248. data: co2AveValues,
  249. type: 'bar',
  250. },
  251. {
  252. name: 'CO最大值',
  253. data: coMaxValues,
  254. type: 'bar',
  255. },
  256. {
  257. name: 'CO平均值',
  258. data: coAveValues,
  259. type: 'bar',
  260. },
  261. {
  262. name: 'O₂最小值',
  263. data: o2MinValues,
  264. type: 'bar',
  265. },
  266. {
  267. name: 'O₂平均值',
  268. data: o2AveValues,
  269. type: 'bar',
  270. },
  271. {
  272. name: 'N₂最大值',
  273. data: n2MaxValues,
  274. type: 'bar',
  275. },
  276. {
  277. name: 'N₂平均值',
  278. data: n2AveValues,
  279. type: 'bar',
  280. },
  281. {
  282. name: 'NO₂最大值',
  283. data: no2MaxValues,
  284. type: 'bar',
  285. },
  286. {
  287. name: 'NO₂平均值',
  288. data: no2AveValues,
  289. type: 'bar',
  290. },
  291. ];
  292. case 'sdmtjtBdmk':
  293. return [
  294. {
  295. name: 'O₂最大值',
  296. data: o2MaxValues,
  297. type: 'bar',
  298. },
  299. {
  300. name: 'O₂最小值',
  301. data: o2MinValues,
  302. type: 'bar',
  303. },
  304. {
  305. name: 'O₂平均值',
  306. data: o2AveValues,
  307. type: 'bar',
  308. },
  309. {
  310. name: 'N₂最大值',
  311. data: n2MaxValues,
  312. type: 'bar',
  313. },
  314. {
  315. name: 'N₂最小值',
  316. data: n2MinValues,
  317. type: 'bar',
  318. },
  319. {
  320. name: 'N₂平均值',
  321. data: n2AveValues,
  322. type: 'bar',
  323. },
  324. {
  325. name: 'CO最大值',
  326. data: coMaxValues,
  327. type: 'bar',
  328. },
  329. {
  330. name: 'CO最小值',
  331. data: coMinValues,
  332. type: 'bar',
  333. },
  334. {
  335. name: 'CO平均值',
  336. data: coAveValues,
  337. type: 'bar',
  338. },
  339. {
  340. name: 'CO₂最大值',
  341. data: co2MaxValues,
  342. type: 'bar',
  343. },
  344. {
  345. name: 'CO₂最小值',
  346. data: co2MinValues,
  347. type: 'bar',
  348. },
  349. {
  350. name: 'CO₂平均值',
  351. data: co2AveValues,
  352. type: 'bar',
  353. },
  354. {
  355. name: 'CH₄最大值',
  356. data: ch4MaxValues,
  357. type: 'bar',
  358. },
  359. {
  360. name: 'CH₄最小值',
  361. data: ch4MinValues,
  362. type: 'bar',
  363. },
  364. {
  365. name: 'CH₄平均值',
  366. data: ch4AveValues,
  367. type: 'bar',
  368. },
  369. {
  370. name: 'C₂H₄最大值',
  371. data: c2h4MaxValues,
  372. type: 'bar',
  373. },
  374. {
  375. name: 'C₂H₄最小值',
  376. data: c2h4MinValues,
  377. type: 'bar',
  378. },
  379. {
  380. name: 'C₂H₄平均值',
  381. data: c2h4AveValues,
  382. type: 'bar',
  383. },
  384. {
  385. name: 'C₂H₂最大值',
  386. data: c2h2MaxValues,
  387. type: 'bar',
  388. },
  389. {
  390. name: 'C₂H₂最小值',
  391. data: c2h2MinValues,
  392. type: 'bar',
  393. },
  394. {
  395. name: 'C₂H₂平均值',
  396. data: c2h2AveValues,
  397. type: 'bar',
  398. },
  399. {
  400. name: 'H₂最大值',
  401. data: h2MaxValues,
  402. type: 'bar',
  403. },
  404. {
  405. name: 'H₂最小值',
  406. data: h2MinValues,
  407. type: 'bar',
  408. },
  409. {
  410. name: 'H₂平均值',
  411. data: h2AveValues,
  412. type: 'bar',
  413. },
  414. {
  415. name: 'NO₂最大值',
  416. data: no2MaxValues,
  417. type: 'bar',
  418. },
  419. {
  420. name: 'NO₂最小值',
  421. data: no2MinValues,
  422. type: 'bar',
  423. },
  424. {
  425. name: 'NO₂平均值',
  426. data: no2AveValues,
  427. type: 'bar',
  428. },
  429. ];
  430. case 'sdmtjtBltmk':
  431. return [
  432. {
  433. name: 'O₂最大值',
  434. data: o2MaxValues,
  435. type: 'bar',
  436. },
  437. {
  438. name: 'O₂最小值',
  439. data: o2MinValues,
  440. type: 'bar',
  441. },
  442. {
  443. name: 'O₂平均值',
  444. data: o2AveValues,
  445. type: 'bar',
  446. },
  447. {
  448. name: 'N₂最大值',
  449. data: n2MaxValues,
  450. type: 'bar',
  451. },
  452. {
  453. name: 'N₂最小值',
  454. data: n2MinValues,
  455. type: 'bar',
  456. },
  457. {
  458. name: 'N₂平均值',
  459. data: n2AveValues,
  460. type: 'bar',
  461. },
  462. {
  463. name: 'CO最大值',
  464. data: coMaxValues,
  465. type: 'bar',
  466. },
  467. {
  468. name: 'CO最小值',
  469. data: coMinValues,
  470. type: 'bar',
  471. },
  472. {
  473. name: 'CO平均值',
  474. data: coAveValues,
  475. type: 'bar',
  476. },
  477. {
  478. name: 'CO₂最大值',
  479. data: co2MaxValues,
  480. type: 'bar',
  481. },
  482. {
  483. name: 'CO₂最小值',
  484. data: co2MinValues,
  485. type: 'bar',
  486. },
  487. {
  488. name: 'CO₂平均值',
  489. data: co2AveValues,
  490. type: 'bar',
  491. },
  492. {
  493. name: 'CH₄最大值',
  494. data: ch4MaxValues,
  495. type: 'bar',
  496. },
  497. {
  498. name: 'CH₄最小值',
  499. data: ch4MinValues,
  500. type: 'bar',
  501. },
  502. {
  503. name: 'CH₄平均值',
  504. data: ch4AveValues,
  505. type: 'bar',
  506. },
  507. {
  508. name: 'C₂H₄最大值',
  509. data: c2h4MaxValues,
  510. type: 'bar',
  511. },
  512. {
  513. name: 'C₂H₄最小值',
  514. data: c2h4MinValues,
  515. type: 'bar',
  516. },
  517. {
  518. name: 'C₂H₄平均值',
  519. data: c2h4AveValues,
  520. type: 'bar',
  521. },
  522. {
  523. name: 'C₂H₂最大值',
  524. data: c2h2MaxValues,
  525. type: 'bar',
  526. },
  527. {
  528. name: 'C₂H₂最小值',
  529. data: c2h2MinValues,
  530. type: 'bar',
  531. },
  532. {
  533. name: 'C₂H₂平均值',
  534. data: c2h2AveValues,
  535. type: 'bar',
  536. },
  537. ];
  538. case 'sdmtjtyjlmk':
  539. return [
  540. {
  541. name: 'O₂最小值',
  542. data: o2MinValues,
  543. type: 'bar',
  544. },
  545. {
  546. name: 'O₂平均值',
  547. data: o2AveValues,
  548. type: 'bar',
  549. },
  550. {
  551. name: 'N₂最大值',
  552. data: n2MaxValues,
  553. type: 'bar',
  554. },
  555. {
  556. name: 'N₂平均值',
  557. data: n2AveValues,
  558. type: 'bar',
  559. },
  560. {
  561. name: 'CO最大值',
  562. data: coMaxValues,
  563. type: 'bar',
  564. },
  565. {
  566. name: 'CO平均值',
  567. data: coAveValues,
  568. type: 'bar',
  569. },
  570. {
  571. name: 'CO₂最大值',
  572. data: co2MaxValues,
  573. type: 'bar',
  574. },
  575. {
  576. name: 'CO₂平均值',
  577. data: co2AveValues,
  578. type: 'bar',
  579. },
  580. {
  581. name: 'CH₄最大值',
  582. data: ch4MaxValues,
  583. type: 'bar',
  584. },
  585. {
  586. name: 'CH₄平均值',
  587. data: ch4AveValues,
  588. type: 'bar',
  589. },
  590. {
  591. name: 'C₂H₄最大值',
  592. data: c2h4MaxValues,
  593. type: 'bar',
  594. },
  595. {
  596. name: 'C₂H₄平均值',
  597. data: c2h4AveValues,
  598. type: 'bar',
  599. },
  600. {
  601. name: 'C₂H₂最大值',
  602. data: c2h2MaxValues,
  603. type: 'bar',
  604. },
  605. {
  606. name: 'C₂H₂平均值',
  607. data: c2h2AveValues,
  608. type: 'bar',
  609. },
  610. ];
  611. case 'sdmtjtcctrk':
  612. return [
  613. {
  614. name: 'O₂平均值',
  615. data: o2AveValues,
  616. type: 'bar',
  617. },
  618. {
  619. name: 'N₂平均值',
  620. data: n2AveValues,
  621. type: 'bar',
  622. },
  623. {
  624. name: 'CO平均值',
  625. data: coAveValues,
  626. type: 'bar',
  627. },
  628. {
  629. name: 'CO₂平均值',
  630. data: co2AveValues,
  631. type: 'bar',
  632. },
  633. {
  634. name: 'CH₄平均值',
  635. data: ch4AveValues,
  636. type: 'bar',
  637. },
  638. {
  639. name: 'C₂H₄平均值',
  640. data: c2h4AveValues,
  641. type: 'bar',
  642. },
  643. {
  644. name: 'C₂H₂平均值',
  645. data: c2h2AveValues,
  646. type: 'bar',
  647. },
  648. {
  649. name: 'C₂H₆平均值',
  650. data: c2h6AveValues,
  651. type: 'bar',
  652. },
  653. ];
  654. default:
  655. return [
  656. {
  657. name: 'C₂H₂最大值',
  658. data: c2h2MaxValues,
  659. type: 'bar',
  660. },
  661. {
  662. name: 'C₂H₂平均值',
  663. data: c2h2AveValues,
  664. type: 'bar',
  665. },
  666. {
  667. name: 'C₂H₄最大值',
  668. data: c2h4MaxValues,
  669. type: 'bar',
  670. },
  671. {
  672. name: 'C₂H₄平均值',
  673. data: c2h4AveValues,
  674. type: 'bar',
  675. },
  676. {
  677. name: 'CH₄最大值',
  678. data: ch4MaxValues,
  679. type: 'bar',
  680. },
  681. {
  682. name: 'CH₄平均值',
  683. data: ch4AveValues,
  684. type: 'bar',
  685. },
  686. {
  687. name: 'CO₂最大值',
  688. data: co2MaxValues,
  689. type: 'bar',
  690. },
  691. {
  692. name: 'CO₂平均值',
  693. data: co2AveValues,
  694. type: 'bar',
  695. },
  696. {
  697. name: 'CO最大值',
  698. data: coMaxValues,
  699. type: 'bar',
  700. },
  701. {
  702. name: 'CO平均值',
  703. data: coAveValues,
  704. type: 'bar',
  705. },
  706. {
  707. name: 'O₂最小值',
  708. data: o2MinValues,
  709. type: 'bar',
  710. },
  711. {
  712. name: 'O₂平均值',
  713. data: o2AveValues,
  714. type: 'bar',
  715. },
  716. // {
  717. // name: 'N₂最大值',
  718. // data: n2MaxValues,
  719. // type: 'bar',
  720. // },
  721. // {
  722. // name: 'N₂平均值',
  723. // data: n2AveValues,
  724. // type: 'bar',
  725. // },
  726. // {
  727. // name: 'NO₂最大值',
  728. // data: no2MaxValues,
  729. // type: 'bar',
  730. // },
  731. // {
  732. // name: 'NO₂平均值',
  733. // data: no2AveValues,
  734. // type: 'bar',
  735. // },
  736. ];
  737. }
  738. };
  739. const seriesConfig = getSeriesConfig(sysOrgCode);
  740. const option = {
  741. tooltip: {
  742. trigger: 'axis',
  743. backgroundColor: 'rgba(28, 72, 105, 0.5)', // 设置 tooltip 背景为透明
  744. textStyle: {
  745. color: '#ffffff', // 设置 tooltip 字体颜色为白色
  746. },
  747. axisPointer: {
  748. type: 'shadow',
  749. label: {
  750. show: true,
  751. backgroundColor: '#1c4869',
  752. },
  753. },
  754. },
  755. legend: {
  756. top: '2%',
  757. textStyle: {
  758. color: '#ffffffff',
  759. },
  760. width: '80%', // 设置图例的宽度
  761. orient: 'horizontal', // 水平布局
  762. pageIconColor: '#ffffff', // 设置翻页图标颜色
  763. pageTextStyle: {
  764. color: '#ffffff', // 设置翻页文字颜色
  765. },
  766. },
  767. xAxis: {
  768. type: 'category',
  769. data: categories,
  770. splitLine: { show: true, lineStyle: { color: 'rgba(28, 72, 105, 0.5)' } },
  771. axisLabel: {
  772. interval: 0, // 显示所有标签
  773. color: '#ffffff', // 设置 x 轴字体颜色
  774. formatter: function (value: string) {
  775. return value.length > 8 ? value.slice(0, 8) + '...' : value; // 截断长标签
  776. },
  777. },
  778. },
  779. yAxis: {
  780. type: 'value',
  781. splitLine: { show: true, lineStyle: { color: 'rgba(28, 72, 105, 0.5)' } },
  782. axisLabel: {
  783. color: '#ffffff',
  784. },
  785. },
  786. dataZoom: [
  787. {
  788. type: 'slider', // 会创建一个滑块来选择要显示的区域
  789. start: 0, // 初始选中范围的起始百分比
  790. end: (5 / categories.length) * 100, // 初始选中范围的结束百分比,根据数据条数调整
  791. minSpan: (5 / categories.length) * 100, // 最小选中范围,根据数据条数调整
  792. maxSpan: (5 / categories.length) * 100, // 最大选中范围,根据数据条数调整
  793. show: true,
  794. height: 10, // 设置滑块高度
  795. bottom: 1, // 设置滑块距离容器底部的距离
  796. borderColor: 'transparent', // 设置边框颜色为透明
  797. backgroundColor: '#F6F7FB', // 设置背景颜色
  798. handleIcon: 'path://M512,512m-448,0a448,448,0,1,0,896,0a448,448,0,1,0,-896,0Z', // 设置手柄图标为圆形
  799. handleColor: '#C2D2FF', // 设置手柄颜色
  800. handleSize: 13, // 设置手柄大小
  801. handleStyle: {
  802. borderColor: '#C2D2FF', // 设置手柄边框颜色
  803. },
  804. fillerColor: '#C2D2FF', // 设置选中范围的填充颜色
  805. },
  806. ],
  807. grid: {
  808. top: '21%', // 设置 grid 距离顶部的距离,增加间隔
  809. left: '3%',
  810. right: '4%',
  811. bottom: '3%',
  812. containLabel: true,
  813. },
  814. series: seriesConfig,
  815. };
  816. myChart.setOption(option);
  817. }
  818. //跳转到爆炸三角形
  819. function toDetail(record: any) {
  820. posMonitor.value = record;
  821. modalVisible.value = true;
  822. }
  823. //获取束管日报
  824. async function getTableList(params: any) {
  825. let res = await getBundleInfoList({ type: 'bundle', ...params });
  826. const content = res.content;
  827. let contentArr = JSON.parse(content);
  828. // const contentNewArr = computed(() => {
  829. // return contentArr.map((item) => {
  830. // let internalFireWarnLevel = '';
  831. // const co = item.co_ave;
  832. // const co2 = item.co2_ave;
  833. // const c2h4 = item.c2h4_ave;
  834. // const c2h2 = item.c2h2_ave;
  835. // const coRatio = co / co2;
  836. // if (co >= 0 && co <= 13.75) {
  837. // internalFireWarnLevel = '潜伏期阶段';
  838. // } else if (co > 13.75 && co < 67.2 && coRatio < 0.095) {
  839. // internalFireWarnLevel = '缓慢氧化升温阶段';
  840. // } else if ((co >= 67.2 && co < 1606.3) || (coRatio >= 0.095 && coRatio < 0.322) || c2h4 < 2) {
  841. // internalFireWarnLevel = '加速氧化阶段';
  842. // } else if (co >= 1606.3 || coRatio >= 0.322 || c2h4 >= 2 || c2h2 > 0) {
  843. // internalFireWarnLevel = '剧烈氧化阶段';
  844. // }
  845. // return { ...item, internalFireWarnLevel };
  846. // });
  847. // });
  848. total.value = contentArr.length;
  849. qfqCount.value = contentArr.filter((item: any) => item.internalFireWarnLevel === '潜伏期阶段').length;
  850. latentCount.value = contentArr.filter((item: any) => item.internalFireWarnLevel === '缓慢氧化升温阶段').length;
  851. selfHeatingCount.value = contentArr.filter((item: any) => item.internalFireWarnLevel === '加速氧化升温阶段').length;
  852. combustionCount.value = contentArr.filter((item: any) => item.internalFireWarnLevel === '剧烈氧化升温阶段').length;
  853. qfqPercent.value = (qfqCount.value / total.value) * 100;
  854. latentPercent.value = (latentCount.value / total.value) * 100;
  855. selfHeatingPercent.value = (selfHeatingCount.value / total.value) * 100;
  856. combustionPercent.value = (combustionCount.value / total.value) * 100;
  857. tableData.value = contentArr;
  858. nextTick(() => {
  859. updateChart(contentArr);
  860. });
  861. }
  862. async function getTableListById(params: any) {
  863. let res = await getAllFileListById({ ...params });
  864. const content = res.content;
  865. let contentArr = JSON.parse(content);
  866. total.value = contentArr.length;
  867. qfqCount.value = contentArr.filter((item: any) => item.internalFireWarnLevel === '潜伏期阶段').length;
  868. latentCount.value = contentArr.filter((item: any) => item.internalFireWarnLevel === '缓慢氧化升温阶段').length;
  869. selfHeatingCount.value = contentArr.filter((item: any) => item.internalFireWarnLevel === '加速氧化升温阶段').length;
  870. combustionCount.value = contentArr.filter((item: any) => item.internalFireWarnLevel === '剧烈氧化升温阶段').length;
  871. qfqPercent.value = (qfqCount.value / total.value) * 100;
  872. latentPercent.value = (latentCount.value / total.value) * 100;
  873. selfHeatingPercent.value = (selfHeatingCount.value / total.value) * 100;
  874. combustionPercent.value = (combustionCount.value / total.value) * 100;
  875. tableData.value = contentArr;
  876. nextTick(() => {
  877. updateChart(contentArr);
  878. });
  879. }
  880. //获取所有文件列表
  881. async function getAllFile() {
  882. let res = await getAllFileList({ type: 'bundle' });
  883. selectList.value = res.records.map((item: any) => ({
  884. id: item.id,
  885. fileName: item.fileName,
  886. }));
  887. jcddArr.value = res.records.map((item: any) => ({
  888. id: item.jcdd,
  889. }));
  890. if (selectList.value.length > 0) {
  891. formSearch.id = selectList.value[0].id;
  892. getSearch();
  893. }
  894. }
  895. // 处理文件点击事件
  896. function handleFileClick(item: any) {
  897. formSearch.id = item.id;
  898. formSearch.fileName = item.fileName;
  899. selectedFileId.value = item.id;
  900. getSearch();
  901. }
  902. //查询
  903. function getSearch() {
  904. // const selectedFile = selectList.value.find((item) => item.id === formSearch.id);
  905. const params = {
  906. id: formSearch.id,
  907. // fileName: selectedFile ? selectedFile.fileName : '',
  908. };
  909. getTableListById(params);
  910. }
  911. onMounted(() => {
  912. getTableList({ type: 'bundle' });
  913. getAllFile().then(() => {
  914. if (selectList.value.length > 0) {
  915. formSearch.id = selectList.value[0].id;
  916. selectedFileId.value = selectList.value[0].id;
  917. getSearch();
  918. }
  919. });
  920. });
  921. </script>
  922. <style lang="less" scoped>
  923. @import '/@/design/theme.less';
  924. .content-container {
  925. display: flex;
  926. width: 100%;
  927. height: 100%;
  928. padding-top: 54px;
  929. }
  930. .file-list {
  931. width: 20%;
  932. padding: 10px;
  933. margin-right: 10px;
  934. margin-bottom: 50px;
  935. border: 1px solid #99e8ff66;
  936. background: #27546e1a;
  937. box-shadow: 0px 0px 20px 7px rgba(145, 233, 254, 0.7) inset;
  938. -moz-box-shadow: 0px 0px 20px 7px rgba(145, 233, 254, 0.7) inset;
  939. -webkit-box-shadow: 0px 0px 50px 1px rgb(149 235 255 / 5%) inset;
  940. }
  941. .file-list ul {
  942. list-style: none;
  943. padding: 0;
  944. }
  945. .file-list li {
  946. color: #fff;
  947. padding: 5px;
  948. cursor: pointer;
  949. }
  950. .file-list li:hover,
  951. .file-list li.selected {
  952. background: #1c4869;
  953. }
  954. .table-container {
  955. margin-top: 10px;
  956. width: 80%;
  957. box-sizing: border-box;
  958. }
  959. .data-container {
  960. margin-top: 40px;
  961. display: flex;
  962. width: 100%;
  963. height: 100%;
  964. }
  965. .bar-chart {
  966. flex: 3; /* 占据 3/4 的空间 */
  967. width: 100%;
  968. height: 400px;
  969. }
  970. .data-content {
  971. flex: 1; /* 占据 1/4 的空间 */
  972. height: 400px;
  973. display: flex;
  974. flex-direction: column; /* 垂直排列进度条 */
  975. // align-items: center; /* 水平居中 */
  976. margin: 10px;
  977. .title {
  978. font-size: 18px;
  979. font-weight: 600;
  980. color: #fff;
  981. margin-bottom: 20px;
  982. }
  983. .explain {
  984. color: var(--vent-table-action-link);
  985. margin-top: 18px;
  986. }
  987. }
  988. .dustMonitor {
  989. width: 100%;
  990. height: 100%;
  991. padding: 10px 10px 15px 10px;
  992. box-sizing: border-box;
  993. position: relative;
  994. }
  995. .yellow-progress .ant-progress-bg {
  996. background-color: yellow !important;
  997. }
  998. :deep(.zxm-table-thead > tr > th:last-child) {
  999. border-right: 1px solid #91e9fe !important;
  1000. }
  1001. :deep(.zxm-picker-input > input) {
  1002. color: #fff;
  1003. }
  1004. :deep(.zxm-select:not(.zxm-select-customize-input) .zxm-select-selector) {
  1005. border: 1px solid var(--vent-form-item-border) !important;
  1006. background-color: #ffffff00 !important;
  1007. }
  1008. :deep(.zxm-select-selection-item) {
  1009. color: #fff !important;
  1010. }
  1011. .blast-delta-container {
  1012. margin: 50px;
  1013. display: flex;
  1014. justify-content: space-between;
  1015. }
  1016. .progress {
  1017. width: 100%;
  1018. height: 20px;
  1019. margin-top: 10px;
  1020. }
  1021. .progress-label {
  1022. margin-top: 20px;
  1023. text-align: left;
  1024. margin-bottom: 5px;
  1025. color: #fff;
  1026. }
  1027. ::deep .progress-text {
  1028. color: #fff !important; /* 自定义百分比文字颜色 */
  1029. }
  1030. </style>