index.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. <CustomBadges class="w-1710px ml-100px mt-50px" :badges="headerBadges" />
  8. <GasMonitor v-if="dataSource" :dataSource="dataSource" />
  9. </template>
  10. <BottomMenu :navList="navList" @change="changeActive" type="router" />
  11. </div>
  12. </template>
  13. <script lang="ts" setup>
  14. import { ref, onBeforeMount, onBeforeUnmount, onMounted } from 'vue';
  15. import CustomHeader from '/@/components/vent/customHeader.vue';
  16. import CustomBadges from './components/customHeader.vue';
  17. import GasMonitor from './components/gasMonitor.vue';
  18. import VentModal from '/@/components/vent/micro/ventModal.vue';
  19. import { gasSystem } from './gasHome.api';
  20. import { unmountMicroApps } from '/@/qiankun';
  21. import BottomMenu from '/@/views/vent/comment/components/bottomMenu.vue';
  22. import { navList } from './gasHome.data';
  23. import { useRouter } from 'vue-router';
  24. const router = useRouter();
  25. const activeKey = ref('gasHome');
  26. const dataSource = ref<any | null>(null);
  27. function changeActive(activeValue) {
  28. if (activeValue == 'gasPump') {
  29. const newPage = router.resolve({ path: '/gas/gas-pump-monitor/home' });
  30. window.open(newPage.href, '_blank');
  31. }
  32. if (activeValue == 'gasStandard') {
  33. const newPage = router.resolve({ path: '/gasAssessment/home' });
  34. window.open(newPage.href, '_blank');
  35. }
  36. if (activeValue == 'gasPiping') {
  37. const newPage = router.resolve({
  38. path: '/micro-vent-3dModal/gas-pipe-net/home',
  39. query: {
  40. type: 'sysMonitor',
  41. deviceType: 'pipingpage',
  42. },
  43. });
  44. window.open(newPage.href, '_blank');
  45. }
  46. if (activeValue == 'gasAlarm') {
  47. const newPage = router.resolve({ path: '/gas/warn/home?p=0' });
  48. window.open(newPage.href, '_blank');
  49. }
  50. if (activeValue == 'drillDesign') {
  51. const newPage = router.resolve({
  52. path: '/micro-vent-3dModal/modelchannel/model3D/home',
  53. query: {
  54. type: 'model3D',
  55. deviceType: 'model3D',
  56. kind: 'drillset',
  57. },
  58. });
  59. window.open(newPage.href, '_blank');
  60. }
  61. }
  62. const headerBadges = ref([
  63. {
  64. title: 'T1',
  65. desc: '累积瓦斯抽采量',
  66. },
  67. {
  68. title: 'T2',
  69. desc: '平均瓦斯抽采率',
  70. },
  71. {
  72. title: 'T3',
  73. desc: '抽采达标工作面数量',
  74. },
  75. {
  76. title: 'T4',
  77. desc: '抽采钻孔类型',
  78. },
  79. {
  80. title: 'T5',
  81. desc: '回采中工作面数量',
  82. },
  83. {
  84. title: 'T6',
  85. desc: '抽采钻孔总进尺',
  86. },
  87. ]);
  88. onBeforeMount(async () => {
  89. dataSource.value = await gasSystem();
  90. });
  91. onMounted(() => {});
  92. onBeforeUnmount(() => {
  93. unmountMicroApps(['/micro-vent-3dModal']);
  94. });
  95. </script>
  96. <style lang="less" scoped>
  97. .gas-container {
  98. width: 100%;
  99. position: absolute;
  100. z-index: 999;
  101. }
  102. .modal-box {
  103. width: 100%;
  104. height: calc(100%);
  105. position: absolute;
  106. top: 0;
  107. left: 0;
  108. }
  109. :deep(.vent-home-header) {
  110. background-color: var(--vent-base-color) !important;
  111. }
  112. </style>