fireNew.vue 5.3 KB

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