dustBD.vue 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  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. }, 2000);
  97. });
  98. onUnmounted(() => {
  99. clearInterval(interval);
  100. });
  101. function redirectTo(url) {
  102. window.open(url);
  103. }
  104. </script>
  105. <style lang="less" scoped>
  106. @import '/@/design/theme.less';
  107. @font-face {
  108. font-family: 'douyuFont';
  109. src: url('../../../../assets/font/douyuFont.otf');
  110. }
  111. @{theme-deepblue} {
  112. .company-home {
  113. --image-bg: url('@/assets/images/themify/deepblue/home-container/configurable/firehome/bg.png');
  114. --image-fire-title: url(/@/assets/images/themify/deepblue/home-container/configurable/firehome/fire-title.png);
  115. --image-qkjaq: url('/@/assets/images/themify/deepblue/home-container/configurable/firehome/qkjaq.png');
  116. --image-common-border2: url('/@/assets/images/themify/deepblue/home-container/configurable/firehome/common-border2.png');
  117. --image-znzjxt: url(/@/assets/images/themify/deepblue/home-container/configurable/firehome/znzjxt.png);
  118. --image-znzdxt: url(/@/assets/images/themify/deepblue/home-container/configurable/firehome/znzdxt.png);
  119. }
  120. }
  121. .company-home {
  122. --image-bg: url('@/assets/images/home-container/configurable/firehome/bg.png');
  123. --image-fire-title: url(/@/assets/images/home-container/configurable/firehome/fire-title.png);
  124. --image-qkjaq: url('/@/assets/images/home-container/configurable/firehome/qkjaq.png');
  125. --image-common-border2: url('/@/assets/images/home-container/configurable/firehome/common-border2.png');
  126. --image-znzjxt: url(/@/assets/images/home-container/configurable/firehome/znzjxt.png);
  127. --image-znzdxt: url(/@/assets/images/home-container/configurable/firehome/znzdxt.png);
  128. width: 100%;
  129. height: 100%;
  130. color: @white;
  131. position: relative;
  132. background: var(--image-bg) no-repeat center;
  133. .top-bg {
  134. width: 100%;
  135. height: 86px;
  136. background: var(--image-fire-title) no-repeat top;
  137. position: absolute;
  138. z-index: 1;
  139. .main-title {
  140. height: 86px;
  141. font-family: 'douyuFont';
  142. font-size: 26px;
  143. letter-spacing: 2px;
  144. display: flex;
  145. justify-content: center;
  146. align-items: center;
  147. }
  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: linear-gradient(to bottom, #036886, #072a40);
  169. border-bottom: 2px solid #3df6ff;
  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: linear-gradient(to bottom, #036886, #072a40);
  178. border-bottom: 2px solid #3df6ff;
  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: linear-gradient(to bottom, #036886, #072a40);
  187. border: none;
  188. border-bottom: 2px solid #3df6ff;
  189. }
  190. }
  191. .left-t {
  192. position: absolute;
  193. height: 115px;
  194. top: 50px;
  195. left: 10px;
  196. width: 440px;
  197. background-image: var(--image-qkjaq);
  198. // background-color: #000723;
  199. background-repeat: no-repeat;
  200. background-position: center;
  201. background-size: 100% 100%;
  202. .tcontent-area {
  203. display: flex;
  204. position: absolute;
  205. top: 50%;
  206. left: 0;
  207. box-sizing: border-box;
  208. align-items: center;
  209. justify-content: space-around;
  210. width: 100%;
  211. height: 70px;
  212. padding: 0 15px;
  213. transform: translate(0, -40%);
  214. .tcontent-l {
  215. display: flex;
  216. flex: 1;
  217. flex-direction: column;
  218. align-items: center;
  219. justify-content: center;
  220. height: 100%;
  221. color: #9da5aa;
  222. font-size: 14px;
  223. font-weight: bold;
  224. letter-spacing: 2px;
  225. }
  226. .tcontent-c {
  227. display: flex;
  228. flex: 3;
  229. flex-direction: column;
  230. align-items: center;
  231. justify-content: center;
  232. height: 100%;
  233. }
  234. .tcontent-r {
  235. display: flex;
  236. flex: 1;
  237. flex-direction: column;
  238. align-items: center;
  239. justify-content: center;
  240. height: 100%;
  241. color: #9da5aa;
  242. font-size: 14px;
  243. font-weight: bold;
  244. letter-spacing: 2px;
  245. }
  246. }
  247. }
  248. .right-t {
  249. position: absolute;
  250. // height: 160px;
  251. height: 115px;
  252. right: 10px;
  253. top: 50px;
  254. width: 440px;
  255. background-image: var(--image-common-border2);
  256. background-color: #000723;
  257. background-repeat: no-repeat;
  258. background-position: center;
  259. background-size: 100% 100%;
  260. display: flex;
  261. align-items: center;
  262. justify-content: space-around;
  263. .tcontent-l {
  264. flex: 1;
  265. height: 100%;
  266. font-size: 16px;
  267. font-weight: bold;
  268. background-image: var(--image-znzjxt);
  269. background-size: auto 100%;
  270. background-repeat: no-repeat;
  271. background-position: center;
  272. text-align: center;
  273. padding-top: 85px;
  274. }
  275. .tcontent-r {
  276. flex: 1;
  277. height: 100%;
  278. font-size: 16px;
  279. font-weight: bold;
  280. background-image: var(--image-znzdxt);
  281. background-size: auto 100%;
  282. background-repeat: no-repeat;
  283. background-position: center;
  284. text-align: center;
  285. padding-top: 85px;
  286. }
  287. }
  288. :deep(.loading-box) {
  289. position: unset;
  290. }
  291. </style>