dustNew.vue 5.3 KB

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