dustBD.vue 7.9 KB

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