dustNew.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <!-- eslint-disable vue/multi-word-component-names -->
  2. <template>
  3. <div class="company-home">
  4. <div style="width: 100%; height: 100%; position: absolute; left: 0; top: 0; z-index: 0">
  5. <VentModal />
  6. <a-button
  7. type="primary"
  8. shape="circle"
  9. style="width: 34px; height: 34px; position: absolute; right: 5px; bottom: 5px; z-index: 5"
  10. @click="redirectTo('/micro-vent-3dModal/dashboard/analysis?type=model3D&deviceType=model3D')"
  11. >
  12. <EyeFilled />
  13. </a-button>
  14. </div>
  15. <div class="top-bg">
  16. <!-- <img style="width: 300px; height: 40px; position: fixed; left: 5px; top: 5px" src="./meeee.png" /> -->
  17. <NewNav :Title="mainTitle" />
  18. </div>
  19. <div class="left-t"> </div>
  20. <div class="right-t"> </div>
  21. <ModuleDustNew
  22. v-for="cfg in configs"
  23. :key="cfg.deviceType"
  24. :show-style="cfg.showStyle"
  25. :module-data="cfg.moduleData"
  26. :module-name="cfg.moduleName"
  27. :device-type="cfg.deviceType"
  28. :data="data"
  29. :visible="true"
  30. />
  31. </div>
  32. </template>
  33. <script lang="ts" setup>
  34. import { onMounted, onUnmounted } from 'vue';
  35. // import { CaretDownOutlined } from '@ant-design/icons-vue';
  36. import NewNav from './components/NewNavFire.vue';
  37. import { useInitConfigs, useInitPage } from '../hooks/useInit';
  38. import ModuleDustNew from './components/ModuleDustNew.vue';
  39. import VentModal from '/@/components/vent/micro/ventModal.vue';
  40. import { getDisHome } from '../configurable.api';
  41. import { EyeFilled } from '@ant-design/icons-vue';
  42. import { testConfigNewDust } from '../configurable.data.New';
  43. // const cfgs = computed(() =>
  44. // configs.value.filter((_, index) => {
  45. // return index !== 4 && index !== 3;
  46. // })
  47. // );
  48. // const cfgA = computed<any>(() =>
  49. // configs.value.find((_, index) => {
  50. // return index === 3;
  51. // })
  52. // );
  53. // const cfgB = computed<any>(() =>
  54. // configs.value.find((_, index) => {
  55. // return index === 4;
  56. // })
  57. // );
  58. const { configs, devicesTypes, fetchConfigs } = useInitConfigs();
  59. const { mainTitle, data, updateData } = useInitPage('粉尘预警系统');
  60. let interval: number | undefined;
  61. onMounted(() => {
  62. fetchConfigs('New_dust').then(() => {
  63. configs.value = testConfigNewDust;
  64. getDisHome({
  65. dataList: devicesTypes.value.concat('dustAllMineWarn').join(','),
  66. }).then(updateData);
  67. });
  68. setInterval(() => {
  69. getDisHome({
  70. dataList: devicesTypes.value.concat('dustAllMineWarn').join(','),
  71. }).then(updateData);
  72. }, 2000);
  73. });
  74. onUnmounted(() => {
  75. clearInterval(interval);
  76. });
  77. function redirectTo(url) {
  78. window.open(url);
  79. }
  80. </script>
  81. <style lang="less" scoped>
  82. @import '/@/design/theme.less';
  83. @font-face {
  84. font-family: 'douyuFont';
  85. src: url('../../../../assets/font/douyuFont.otf');
  86. }
  87. @{theme-deepblue} {
  88. .company-home {
  89. --image-modal-top: url('@/assets/images/vent/homeNew/modaltop.png');
  90. }
  91. }
  92. .company-home {
  93. --image-modal-top: url('@/assets/images/vent/homeNew/modaltop.png');
  94. width: 100%;
  95. height: 100%;
  96. color: @white;
  97. position: relative;
  98. background: url('@/assets/images/vent/homeNew/bg.png') no-repeat center;
  99. .top-bg {
  100. width: 100%;
  101. height: 56px;
  102. background: var(--image-modal-top) no-repeat center;
  103. position: absolute;
  104. z-index: 1;
  105. .main-title {
  106. height: 56px;
  107. font-family: 'douyuFont';
  108. font-size: 20px;
  109. letter-spacing: 2px;
  110. display: flex;
  111. justify-content: center;
  112. align-items: center;
  113. }
  114. .top-nav {
  115. position: absolute;
  116. top: 0;
  117. width: 880px;
  118. height: 100%;
  119. display: flex;
  120. justify-content: flex-start;
  121. }
  122. }
  123. .left-t {
  124. position: absolute;
  125. width: 28%;
  126. height: 100%;
  127. background: url('@/assets/images/vent/homeNew/leftContent.png') no-repeat center;
  128. z-index: 0;
  129. }
  130. .right-t {
  131. position: absolute;
  132. width: 172%;
  133. height: 100%;
  134. background: url('@/assets/images/vent/homeNew/rightContent.png') no-repeat center;
  135. z-index: 0;
  136. }
  137. // .module-left {
  138. // position: absolute;
  139. // width: 450px;
  140. // height: 280px;
  141. // left: 0;
  142. // }
  143. // .module-right {
  144. // position: absolute;
  145. // width: 450px;
  146. // height: 280px;
  147. // right: 0;
  148. // }
  149. // .module-bottom {
  150. // position: absolute;
  151. // width: 1000px;
  152. // height: 280px;
  153. // }
  154. .module-dropdown {
  155. padding: 10px;
  156. background-image: @vent-configurable-dropdown;
  157. border-bottom: 2px solid @vent-configurable-home-light-border;
  158. color: @vent-font-color;
  159. position: absolute;
  160. top: 70px;
  161. right: 460px;
  162. }
  163. .module-dropdown-original {
  164. padding: 10px;
  165. background-image: @vent-configurable-dropdown;
  166. border-bottom: 2px solid @vent-configurable-home-light-border;
  167. color: @vent-font-color;
  168. position: absolute;
  169. top: 70px;
  170. right: 460px;
  171. }
  172. .module-trigger-button {
  173. color: @vent-font-color;
  174. background-image: @vent-configurable-dropdown;
  175. border: none;
  176. border-bottom: 2px solid @vent-configurable-home-light-border;
  177. }
  178. }
  179. :deep(.loading-box) {
  180. position: unset;
  181. }
  182. </style>