dustBD.vue 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. <!-- eslint-disable vue/multi-word-component-names -->
  2. <template>
  3. <div class="company-home">
  4. <div class="top-bg">
  5. <div class="main-title">{{ mainTitle }}</div>
  6. </div>
  7. <!-- <a-dropdown class="module-dropdown" :class="{ 'module-dropdown-original': isOriginal }" :trigger="['click']" placement="bottomRight">
  8. <a class="ant-dropdown-link" @click.prevent>
  9. 全矿井通风检测
  10. <CaretDownOutlined />
  11. </a>
  12. <template #overlay>
  13. <MonitorCenter />
  14. </template>
  15. </a-dropdown> -->
  16. <!-- 采用定位方式以避免出现各个模块隐藏时其他模块下移的问题 -->
  17. <div class="left-t">
  18. <div class="tcontent-area">
  19. <div class="tcontent-l">
  20. <div>监测</div>
  21. <div>区域</div>
  22. </div>
  23. <div class="tcontent-c">
  24. <div style="margin-bottom: 15px; color: #009bff; font-size: 24px; font-weight: bolder; letter-spacing: 10px">
  25. {{ data.dustAllMineWarn }}
  26. </div>
  27. <!-- <div style="color: #fff; font-size: 12px">自燃倾向性等级 : 容易自燃</div> -->
  28. </div>
  29. <div class="tcontent-r">
  30. <div>粉尘</div>
  31. <div>风险</div>
  32. </div>
  33. </div>
  34. </div>
  35. <!-- <div class="right-t">
  36. <div class="tcontent-l" @click="redirectTo('https://bing.cn')">
  37. <div>智能</div>
  38. <div>灌浆系统</div>
  39. </div>
  40. <div class="tcontent-r" @click="redirectTo('https://bing.cn')">
  41. <div>智能</div>
  42. <div>注氟系统</div>
  43. </div>
  44. </div> -->
  45. <ModuleBD
  46. v-for="cfg in configs"
  47. :key="cfg.deviceType"
  48. :show-style="cfg.showStyle"
  49. :module-data="cfg.moduleData"
  50. :module-name="cfg.moduleName"
  51. :device-type="cfg.deviceType"
  52. :data="data"
  53. :visible="true"
  54. />
  55. <div style="width: 1000px; height: 570px; position: absolute; left: calc(50% - 500px); top: 60px">
  56. <VentModal />
  57. </div>
  58. </div>
  59. </template>
  60. <script lang="ts" setup>
  61. import { onMounted, onUnmounted } from 'vue';
  62. // import { CaretDownOutlined } from '@ant-design/icons-vue';
  63. // import MonitorCenter from './components/MonitorCenter.vue';
  64. import { useInitConfigs, useInitPage } from './hooks/useInit';
  65. import ModuleBD from './components/ModuleBD.vue';
  66. import VentModal from '/@/components/vent/micro/ventModal.vue';
  67. import { getDisHome } from './configurable.api';
  68. // import { getToken } from '/@/utils/auth';
  69. const { configs, fetchConfigs } = useInitConfigs();
  70. const { mainTitle, data, updateData, updateEnhancedConfigs } = useInitPage('保德煤矿粉尘灾害预警系统');
  71. let interval: number | undefined;
  72. // function hideLoading() {
  73. // loading.value = false;
  74. // }
  75. onMounted(() => {
  76. fetchConfigs('BD_dust').then(() => {
  77. // configs.value = testConfigVent;
  78. updateEnhancedConfigs(configs.value);
  79. getDisHome({
  80. dataList: configs.value
  81. .map((e) => e.deviceType)
  82. .concat('dustAllMineWarn')
  83. .join(','),
  84. }).then(updateData);
  85. });
  86. setInterval(() => {
  87. getDisHome({
  88. dataList: configs.value
  89. .map((e) => e.deviceType)
  90. .concat('dustAllMineWarn')
  91. .join(','),
  92. }).then(updateData);
  93. }, 60000);
  94. });
  95. onUnmounted(() => {
  96. clearInterval(interval);
  97. });
  98. </script>
  99. <style lang="less" scoped>
  100. @font-face {
  101. font-family: 'douyuFont';
  102. src: url('../../../../assets/font/douyuFont.otf');
  103. }
  104. .company-home {
  105. width: 100%;
  106. height: 100%;
  107. color: @white;
  108. position: relative;
  109. background: url('@/assets/images/home-container/configurable/firehome/bg.png') no-repeat center;
  110. .top-bg {
  111. width: 100%;
  112. height: 86px;
  113. background: url(/@/assets/images/home-container/configurable/firehome/fire-title.png) no-repeat center;
  114. position: absolute;
  115. z-index: 1;
  116. .main-title {
  117. height: 86px;
  118. font-family: 'douyuFont';
  119. font-size: 26px;
  120. letter-spacing: 2px;
  121. display: flex;
  122. justify-content: center;
  123. align-items: center;
  124. }
  125. }
  126. // .module-left {
  127. // position: absolute;
  128. // width: 450px;
  129. // height: 280px;
  130. // left: 0;
  131. // }
  132. // .module-right {
  133. // position: absolute;
  134. // width: 450px;
  135. // height: 280px;
  136. // right: 0;
  137. // }
  138. // .module-bottom {
  139. // position: absolute;
  140. // width: 1000px;
  141. // height: 280px;
  142. // }
  143. .module-dropdown {
  144. padding: 10px;
  145. background-image: linear-gradient(to bottom, #036886, #072a40);
  146. border-bottom: 2px solid #3df6ff;
  147. color: #fff;
  148. position: absolute;
  149. top: 70px;
  150. right: 460px;
  151. }
  152. .module-dropdown-original {
  153. padding: 10px;
  154. background-image: linear-gradient(to bottom, #036886, #072a40);
  155. border-bottom: 2px solid #3df6ff;
  156. color: #fff;
  157. position: absolute;
  158. top: 70px;
  159. right: 460px;
  160. }
  161. .module-trigger-button {
  162. color: #fff;
  163. background-image: linear-gradient(to bottom, #036886, #072a40);
  164. border: none;
  165. border-bottom: 2px solid #3df6ff;
  166. }
  167. }
  168. .left-t {
  169. position: absolute;
  170. height: 115px;
  171. top: 50px;
  172. width: 450px;
  173. background-image: url('/@/assets/images/home-container/configurable/firehome/qkjaq.png');
  174. background-color: #000723;
  175. background-repeat: no-repeat;
  176. background-position: center;
  177. background-size: 100% 100%;
  178. .tcontent-area {
  179. display: flex;
  180. position: absolute;
  181. top: 50%;
  182. left: 0;
  183. box-sizing: border-box;
  184. align-items: center;
  185. justify-content: space-around;
  186. width: 100%;
  187. height: 70px;
  188. padding: 0 15px;
  189. transform: translate(0, -40%);
  190. .tcontent-l {
  191. display: flex;
  192. flex: 1;
  193. flex-direction: column;
  194. align-items: center;
  195. justify-content: center;
  196. height: 100%;
  197. color: #9da5aa;
  198. font-size: 14px;
  199. font-weight: bold;
  200. letter-spacing: 2px;
  201. }
  202. .tcontent-c {
  203. display: flex;
  204. flex: 3;
  205. flex-direction: column;
  206. align-items: center;
  207. justify-content: center;
  208. height: 100%;
  209. }
  210. .tcontent-r {
  211. display: flex;
  212. flex: 1;
  213. flex-direction: column;
  214. align-items: center;
  215. justify-content: center;
  216. height: 100%;
  217. color: #9da5aa;
  218. font-size: 14px;
  219. font-weight: bold;
  220. letter-spacing: 2px;
  221. }
  222. }
  223. }
  224. .right-t {
  225. position: absolute;
  226. height: 160px;
  227. right: 0;
  228. top: 50px;
  229. width: 450px;
  230. background-image: url('/@/assets/images/home-container/configurable/firehome/common-border2.png');
  231. background-color: #000723;
  232. background-repeat: no-repeat;
  233. background-position: center;
  234. background-size: 100% 100%;
  235. display: flex;
  236. align-items: center;
  237. justify-content: space-around;
  238. .tcontent-l {
  239. flex: 1;
  240. height: 70%;
  241. font-size: 20px;
  242. font-weight: bold;
  243. background-image: url(/@/assets/images/home-container/configurable/firehome/img-5.png),
  244. url(/@/assets/images/home-container/configurable/firehome/ggxt.png);
  245. background-size:
  246. auto 100%,
  247. auto auto;
  248. background-repeat: no-repeat;
  249. background-position:
  250. center,
  251. center top;
  252. text-align: center;
  253. padding-top: 40px;
  254. line-height: 50px;
  255. cursor: pointer;
  256. }
  257. .tcontent-r {
  258. flex: 1;
  259. height: 70%;
  260. font-size: 20px;
  261. font-weight: bold;
  262. background-image: url(/@/assets/images/home-container/configurable/firehome/img-5.png),
  263. url(/@/assets/images/home-container/configurable/firehome/zjxt.png);
  264. background-size:
  265. auto 100%,
  266. auto auto;
  267. background-repeat: no-repeat;
  268. background-position:
  269. center,
  270. center top;
  271. text-align: center;
  272. padding-top: 40px;
  273. line-height: 50px;
  274. cursor: pointer;
  275. }
  276. }
  277. :deep(.loading-box) {
  278. position: unset;
  279. }
  280. </style>