fireBD.vue 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  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.fireAllMineWarn }}
  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('/grout-home')">
  37. <div>智能注浆系统</div>
  38. </div>
  39. <div class="tcontent-r" @click="redirectTo('/nitrogen-home')">
  40. <div>智能注氮系统</div>
  41. </div>
  42. </div>
  43. <ModuleBD
  44. v-for="cfg in cfgs"
  45. :key="cfg.deviceType"
  46. :show-style="cfg.showStyle"
  47. :module-data="cfg.moduleData"
  48. :module-name="cfg.moduleName"
  49. :device-type="cfg.deviceType"
  50. :data="data"
  51. :visible="true"
  52. />
  53. <ModuleBDDual
  54. v-if="cfgA && cfgB"
  55. :show-style="cfgA.showStyle"
  56. :module-data-a="cfgA.moduleData"
  57. :module-name-a="cfgA.moduleName"
  58. :device-type-a="cfgA.deviceType"
  59. :module-data-b="cfgB.moduleData"
  60. :module-name-b="cfgB.moduleName"
  61. :device-type-b="cfgB.deviceType"
  62. :data="data"
  63. :visible="true"
  64. />
  65. <div style="width: 1000px; height: 550px; position: absolute; left: calc(50% - 500px); top: 60px">
  66. <VentModal />
  67. <a-button
  68. type="primary"
  69. shape="circle"
  70. style="width: 34px; height: 34px; position: absolute; right: 5px; bottom: 5px; z-index: 5"
  71. @click="redirectTo('/micro-vent-3dModal/dashboard/analysis?type=model3D&deviceType=model3D')"
  72. >
  73. <EyeFilled />
  74. </a-button>
  75. </div>
  76. </div>
  77. </template>
  78. <script lang="ts" setup>
  79. import { computed, onMounted, onUnmounted } from 'vue';
  80. // import { CaretDownOutlined } from '@ant-design/icons-vue';
  81. // import MonitorCenter from './components/MonitorCenter.vue';
  82. import { useInitConfigs, useInitPage } from './hooks/useInit';
  83. import ModuleBD from './components/ModuleBD.vue';
  84. import ModuleBDDual from './components/ModuleBDDual.vue';
  85. import VentModal from '/@/components/vent/micro/ventModal.vue';
  86. import { getDisHome } from './configurable.api';
  87. import { EyeFilled } from '@ant-design/icons-vue';
  88. // import { testConfigBDFire } from './configurable.data.bd';
  89. // import { getToken } from '/@/utils/auth';
  90. const cfgs = computed(() =>
  91. configs.value.filter((_, index) => {
  92. return index !== 4 && index !== 3;
  93. })
  94. );
  95. const cfgA = computed<any>(() =>
  96. configs.value.find((_, index) => {
  97. return index === 3;
  98. })
  99. );
  100. const cfgB = computed<any>(() =>
  101. configs.value.find((_, index) => {
  102. return index === 4;
  103. })
  104. );
  105. const { configs, devicesTypes, fetchConfigs } = useInitConfigs();
  106. const { mainTitle, data, updateData } = useInitPage('保德煤矿火灾预警系统');
  107. let interval: number | undefined;
  108. // function hideLoading() {
  109. // loading.value = false;
  110. // }
  111. onMounted(() => {
  112. fetchConfigs('BD_fire').then(() => {
  113. // configs.value = testConfigBDFire;
  114. getDisHome({
  115. dataList: devicesTypes.value.concat('fireAllMineWarn').join(','),
  116. }).then(updateData);
  117. });
  118. setInterval(() => {
  119. getDisHome({
  120. dataList: devicesTypes.value.concat('fireAllMineWarn').join(','),
  121. }).then(updateData);
  122. }, 60000);
  123. });
  124. onUnmounted(() => {
  125. clearInterval(interval);
  126. });
  127. function redirectTo(url) {
  128. window.open(url);
  129. }
  130. </script>
  131. <style lang="less" scoped>
  132. @import '/@/design/theme.less';
  133. @font-face {
  134. font-family: 'douyuFont';
  135. src: url('../../../../assets/font/douyuFont.otf');
  136. }
  137. @{theme-deepblue} {
  138. .company-home {
  139. --image-bg: url('@/assets/images/themify/deepblue/home-container/configurable/firehome/bg.png');
  140. --image-fire-title: url(/@/assets/images/themify/deepblue/home-container/configurable/firehome/fire-title.png);
  141. --image-qkjaq: url('/@/assets/images/themify/deepblue/home-container/configurable/firehome/qkjaq.png');
  142. --image-common-border2: url('/@/assets/images/themify/deepblue/home-container/configurable/firehome/common-border2.png');
  143. --image-znzjxt: url(/@/assets/images/themify/deepblue/home-container/configurable/firehome/znzjxt.png);
  144. --image-znzdxt: url(/@/assets/images/themify/deepblue/home-container/configurable/firehome/znzdxt.png);
  145. }
  146. }
  147. .company-home {
  148. --image-bg: url('@/assets/images/home-container/configurable/firehome/bg.png');
  149. --image-fire-title: url(/@/assets/images/home-container/configurable/firehome/fire-title.png);
  150. --image-qkjaq: url('/@/assets/images/home-container/configurable/firehome/qkjaq.png');
  151. --image-common-border2: url('/@/assets/images/home-container/configurable/firehome/common-border2.png');
  152. --image-znzjxt: url(/@/assets/images/home-container/configurable/firehome/znzjxt.png);
  153. --image-znzdxt: url(/@/assets/images/home-container/configurable/firehome/znzdxt.png);
  154. width: 100%;
  155. height: 100%;
  156. color: @white;
  157. position: relative;
  158. background: var(--image-bg) no-repeat center;
  159. .top-bg {
  160. width: 100%;
  161. height: 86px;
  162. background: var(--image-fire-title) no-repeat top;
  163. position: absolute;
  164. z-index: 1;
  165. .main-title {
  166. height: 86px;
  167. font-family: 'douyuFont';
  168. font-size: 26px;
  169. letter-spacing: 2px;
  170. display: flex;
  171. justify-content: center;
  172. align-items: center;
  173. }
  174. }
  175. // .module-left {
  176. // position: absolute;
  177. // width: 440px;
  178. // height: 280px;
  179. // left: 0;
  180. // }
  181. // .module-right {
  182. // position: absolute;
  183. // width: 440px;
  184. // height: 280px;
  185. // right: 0;
  186. // }
  187. // .module-bottom {
  188. // position: absolute;
  189. // width: 1000px;
  190. // height: 280px;
  191. // }
  192. .module-dropdown {
  193. padding: 10px;
  194. background-image: linear-gradient(to bottom, #036886, #072a40);
  195. border-bottom: 2px solid #3df6ff;
  196. color: @vent-font-color;
  197. position: absolute;
  198. top: 70px;
  199. right: 460px;
  200. }
  201. .module-dropdown-original {
  202. padding: 10px;
  203. background-image: linear-gradient(to bottom, #036886, #072a40);
  204. border-bottom: 2px solid #3df6ff;
  205. color: @vent-font-color;
  206. position: absolute;
  207. top: 70px;
  208. right: 460px;
  209. }
  210. .module-trigger-button {
  211. color: @vent-font-color;
  212. background-image: linear-gradient(to bottom, #036886, #072a40);
  213. border: none;
  214. border-bottom: 2px solid #3df6ff;
  215. }
  216. }
  217. .left-t {
  218. position: absolute;
  219. height: 115px;
  220. top: 50px;
  221. left: 10px;
  222. width: 440px;
  223. background-image: var(--image-qkjaq);
  224. // background-color: #000723;
  225. background-repeat: no-repeat;
  226. background-position: center;
  227. background-size: 100% 100%;
  228. .tcontent-area {
  229. display: flex;
  230. position: absolute;
  231. top: 50%;
  232. left: 0;
  233. box-sizing: border-box;
  234. align-items: center;
  235. justify-content: space-around;
  236. width: 100%;
  237. height: 70px;
  238. padding: 0 15px;
  239. transform: translate(0, -40%);
  240. .tcontent-l {
  241. display: flex;
  242. flex: 1;
  243. flex-direction: column;
  244. align-items: center;
  245. justify-content: center;
  246. height: 100%;
  247. color: #9da5aa;
  248. font-size: 14px;
  249. font-weight: bold;
  250. letter-spacing: 2px;
  251. }
  252. .tcontent-c {
  253. display: flex;
  254. flex: 3;
  255. flex-direction: column;
  256. align-items: center;
  257. justify-content: center;
  258. height: 100%;
  259. }
  260. .tcontent-r {
  261. display: flex;
  262. flex: 1;
  263. flex-direction: column;
  264. align-items: center;
  265. justify-content: center;
  266. height: 100%;
  267. color: #9da5aa;
  268. font-size: 14px;
  269. font-weight: bold;
  270. letter-spacing: 2px;
  271. }
  272. }
  273. }
  274. .right-t {
  275. position: absolute;
  276. // height: 160px;
  277. height: 115px;
  278. right: 10px;
  279. top: 50px;
  280. width: 440px;
  281. background-image: var(--image-common-border2);
  282. background-color: #000723;
  283. background-repeat: no-repeat;
  284. background-position: center;
  285. background-size: 100% 100%;
  286. display: flex;
  287. align-items: center;
  288. justify-content: space-around;
  289. .tcontent-l {
  290. flex: 1;
  291. height: 100%;
  292. font-size: 16px;
  293. font-weight: bold;
  294. background-image: var(--image-znzjxt);
  295. background-size: auto 100%;
  296. background-repeat: no-repeat;
  297. background-position: center;
  298. text-align: center;
  299. padding-top: 85px;
  300. }
  301. .tcontent-r {
  302. flex: 1;
  303. height: 100%;
  304. font-size: 16px;
  305. font-weight: bold;
  306. background-image: var(--image-znzdxt);
  307. background-size: auto 100%;
  308. background-repeat: no-repeat;
  309. background-position: center;
  310. text-align: center;
  311. padding-top: 85px;
  312. }
  313. }
  314. :deep(.loading-box) {
  315. position: unset;
  316. }
  317. </style>