dustBD.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  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. <a-button
  58. type="primary"
  59. shape="circle"
  60. style="width: 34px; height: 34px; position: absolute; right: 5px; bottom: 5px; z-index: 5"
  61. @click="redirectTo('/micro-vent-3dModal/dashboard/analysis?type=model3D&deviceType=model3D')"
  62. >
  63. <EyeFilled />
  64. </a-button>
  65. </div>
  66. </div>
  67. </template>
  68. <script lang="ts" setup>
  69. import { onMounted, onUnmounted } from 'vue';
  70. // import { CaretDownOutlined } from '@ant-design/icons-vue';
  71. // import MonitorCenter from './components/MonitorCenter.vue';
  72. import { useInitConfigs, useInitPage } from './hooks/useInit';
  73. import ModuleBD from './components/ModuleBD.vue';
  74. import VentModal from '/@/components/vent/micro/ventModal.vue';
  75. import { getDisHome } from './configurable.api';
  76. import { EyeFilled } from '@ant-design/icons-vue';
  77. // import { testConfigBDDust } from './configurable.data.bd';
  78. // import { getToken } from '/@/utils/auth';
  79. const { configs, devicesTypes, fetchConfigs } = useInitConfigs();
  80. const { mainTitle, data, updateData } = useInitPage('保德煤矿粉尘灾害预警系统');
  81. let interval: number | undefined;
  82. // function hideLoading() {
  83. // loading.value = false;
  84. // }
  85. onMounted(() => {
  86. fetchConfigs('BD_dust').then(() => {
  87. // configs.value = testConfigBDDust;
  88. getDisHome({
  89. dataList: devicesTypes.value.concat('dustAllMineWarn').join(','),
  90. }).then(updateData);
  91. });
  92. setInterval(() => {
  93. getDisHome({
  94. dataList: devicesTypes.value.concat('dustAllMineWarn').join(','),
  95. }).then(updateData);
  96. }, 60000);
  97. });
  98. onUnmounted(() => {
  99. clearInterval(interval);
  100. });
  101. function redirectTo(url) {
  102. window.open(url);
  103. }
  104. </script>
  105. <style lang="less" scoped>
  106. @font-face {
  107. font-family: 'douyuFont';
  108. src: url('../../../../assets/font/douyuFont.otf');
  109. }
  110. .company-home {
  111. width: 100%;
  112. height: 100%;
  113. color: @white;
  114. position: relative;
  115. background: url('@/assets/images/home-container/configurable/firehome/bg.png') no-repeat center;
  116. .top-bg {
  117. width: 100%;
  118. height: 86px;
  119. background: url(/@/assets/images/home-container/configurable/firehome/fire-title.png) no-repeat center;
  120. position: absolute;
  121. z-index: 1;
  122. .main-title {
  123. height: 86px;
  124. font-family: 'douyuFont';
  125. font-size: 26px;
  126. letter-spacing: 2px;
  127. display: flex;
  128. justify-content: center;
  129. align-items: center;
  130. }
  131. }
  132. // .module-left {
  133. // position: absolute;
  134. // width: 450px;
  135. // height: 280px;
  136. // left: 0;
  137. // }
  138. // .module-right {
  139. // position: absolute;
  140. // width: 450px;
  141. // height: 280px;
  142. // right: 0;
  143. // }
  144. // .module-bottom {
  145. // position: absolute;
  146. // width: 1000px;
  147. // height: 280px;
  148. // }
  149. .module-dropdown {
  150. padding: 10px;
  151. background-image: linear-gradient(to bottom, #036886, #072a40);
  152. border-bottom: 2px solid #3df6ff;
  153. color: #fff;
  154. position: absolute;
  155. top: 70px;
  156. right: 460px;
  157. }
  158. .module-dropdown-original {
  159. padding: 10px;
  160. background-image: linear-gradient(to bottom, #036886, #072a40);
  161. border-bottom: 2px solid #3df6ff;
  162. color: #fff;
  163. position: absolute;
  164. top: 70px;
  165. right: 460px;
  166. }
  167. .module-trigger-button {
  168. color: #fff;
  169. background-image: linear-gradient(to bottom, #036886, #072a40);
  170. border: none;
  171. border-bottom: 2px solid #3df6ff;
  172. }
  173. }
  174. .left-t {
  175. position: absolute;
  176. height: 115px;
  177. top: 50px;
  178. left: 10px;
  179. width: 440px;
  180. background-image: url('/@/assets/images/home-container/configurable/firehome/qkjaq.png');
  181. background-color: #000723;
  182. background-repeat: no-repeat;
  183. background-position: center;
  184. background-size: 100% 100%;
  185. .tcontent-area {
  186. display: flex;
  187. position: absolute;
  188. top: 50%;
  189. left: 0;
  190. box-sizing: border-box;
  191. align-items: center;
  192. justify-content: space-around;
  193. width: 100%;
  194. height: 70px;
  195. padding: 0 15px;
  196. transform: translate(0, -40%);
  197. .tcontent-l {
  198. display: flex;
  199. flex: 1;
  200. flex-direction: column;
  201. align-items: center;
  202. justify-content: center;
  203. height: 100%;
  204. color: #9da5aa;
  205. font-size: 14px;
  206. font-weight: bold;
  207. letter-spacing: 2px;
  208. }
  209. .tcontent-c {
  210. display: flex;
  211. flex: 3;
  212. flex-direction: column;
  213. align-items: center;
  214. justify-content: center;
  215. height: 100%;
  216. }
  217. .tcontent-r {
  218. display: flex;
  219. flex: 1;
  220. flex-direction: column;
  221. align-items: center;
  222. justify-content: center;
  223. height: 100%;
  224. color: #9da5aa;
  225. font-size: 14px;
  226. font-weight: bold;
  227. letter-spacing: 2px;
  228. }
  229. }
  230. }
  231. .right-t {
  232. position: absolute;
  233. height: 160px;
  234. right: 0;
  235. top: 50px;
  236. width: 450px;
  237. background-image: url('/@/assets/images/home-container/configurable/firehome/common-border2.png');
  238. background-color: #000723;
  239. background-repeat: no-repeat;
  240. background-position: center;
  241. background-size: 100% 100%;
  242. display: flex;
  243. align-items: center;
  244. justify-content: space-around;
  245. .tcontent-l {
  246. flex: 1;
  247. height: 70%;
  248. font-size: 20px;
  249. font-weight: bold;
  250. background-image: url(/@/assets/images/home-container/configurable/firehome/img-5.png),
  251. url(/@/assets/images/home-container/configurable/firehome/ggxt.png);
  252. background-size:
  253. auto 100%,
  254. auto auto;
  255. background-repeat: no-repeat;
  256. background-position:
  257. center,
  258. center top;
  259. text-align: center;
  260. padding-top: 40px;
  261. line-height: 50px;
  262. cursor: pointer;
  263. }
  264. .tcontent-r {
  265. flex: 1;
  266. height: 70%;
  267. font-size: 20px;
  268. font-weight: bold;
  269. background-image: url(/@/assets/images/home-container/configurable/firehome/img-5.png),
  270. url(/@/assets/images/home-container/configurable/firehome/zjxt.png);
  271. background-size:
  272. auto 100%,
  273. auto auto;
  274. background-repeat: no-repeat;
  275. background-position:
  276. center,
  277. center top;
  278. text-align: center;
  279. padding-top: 40px;
  280. line-height: 50px;
  281. cursor: pointer;
  282. }
  283. }
  284. :deep(.loading-box) {
  285. position: unset;
  286. }
  287. </style>