index.vue 31 KB

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