index.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <!-- eslint-disable vue/multi-word-component-names -->
  2. <template>
  3. <div class="scene-box" style="position: relative">
  4. <CustomHeader> 瓦斯抽采综合管控系统 </CustomHeader>
  5. <template v-if="activeKey == 'gasHome'">
  6. <VentModal />
  7. <div class="gas-container">
  8. <CustomBadges class="w-1710px ml-100px mt-50px" :badges="headerBadges" />
  9. <GasMonitor v-if="dataSource" :dataSource="dataSource" />
  10. </div>
  11. </template>
  12. <template v-if="activeKey == 'gasStandard'">
  13. <GasAssessment />
  14. </template>
  15. <BottomMenu :navList="navList" @change="changeActive" />
  16. </div>
  17. </template>
  18. <script lang="ts" setup>
  19. import { ref, onBeforeMount, onBeforeUnmount, onMounted } from 'vue';
  20. import CustomHeader from '/@/components/vent/customHeader.vue';
  21. import CustomBadges from './components/customHeader.vue';
  22. import GasMonitor from './components/gasMonitor.vue';
  23. import VentModal from '/@/components/vent/micro/ventModal.vue';
  24. import GasAssessment from '../gasAssessment/index.vue';
  25. import { gasSystem } from './gasHome.api';
  26. import { unmountMicroApps } from '/@/qiankun';
  27. import BottomMenu from '/@/views/vent/comment/components/bottomMenu.vue';
  28. import { navList } from './gasHome.data';
  29. const activeKey = ref('gasHome');
  30. const dataSource = ref<any | null>(null);
  31. function changeActive(activeValue) {
  32. activeKey.value = activeValue;
  33. }
  34. const headerBadges = ref([
  35. {
  36. title: 'T1',
  37. desc: '累积瓦斯抽采量',
  38. },
  39. {
  40. title: 'T2',
  41. desc: '平均瓦斯抽采率',
  42. },
  43. {
  44. title: 'T3',
  45. desc: '抽采达标工作面数量',
  46. },
  47. {
  48. title: 'T4',
  49. desc: '抽采钻孔类型',
  50. },
  51. {
  52. title: 'T5',
  53. desc: '回采中工作面数量',
  54. },
  55. {
  56. title: 'T6',
  57. desc: '抽采钻孔总进尺',
  58. },
  59. ]);
  60. onBeforeMount(async () => {
  61. dataSource.value = await gasSystem();
  62. });
  63. onMounted(() => {});
  64. onBeforeUnmount(() => {
  65. unmountMicroApps(['/micro-vent-3dModal']);
  66. });
  67. </script>
  68. <style lang="less" scoped>
  69. .gas-container {
  70. width: 100%;
  71. position: absolute;
  72. z-index: 999;
  73. }
  74. .modal-box {
  75. width: 100%;
  76. height: calc(100%);
  77. position: absolute;
  78. top: 0;
  79. left: 0;
  80. }
  81. :deep(.vent-home-header) {
  82. background-color: var(--vent-base-color) !important;
  83. }
  84. </style>