fireBD.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  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?mock-login=1')">
  37. <div>智能注浆系统</div>
  38. </div>
  39. <div class="tcontent-r" @click="redirectTo('/nitrogen-home?mock-login=1')">
  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. <SubApp />
  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 SubApp from '/@/components/vent/micro/createSubApp.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. if (!configs.value.length) {
  114. configs.value = testConfigBDFire;
  115. }
  116. getDisHome({
  117. dataList: devicesTypes.value.concat('fireAllMineWarn').join(','),
  118. }).then(updateData);
  119. });
  120. setInterval(() => {
  121. getDisHome({
  122. dataList: devicesTypes.value.concat('fireAllMineWarn').join(','),
  123. }).then(updateData);
  124. }, 2000);
  125. });
  126. onUnmounted(() => {
  127. clearInterval(interval);
  128. });
  129. function redirectTo(url) {
  130. window.open(url);
  131. }
  132. </script>
  133. <style lang="less" scoped>
  134. @import '/@/design/theme.less';
  135. @font-face {
  136. font-family: 'douyuFont';
  137. src: url('../../../../assets/font/douyuFont.otf');
  138. }
  139. @{theme-green} {
  140. .company-home {
  141. // --image-bg: url('@/assets/images/themify/deepblue/home-container/configurable/firehome/bg.png');
  142. --image-fire-title: url(/@/assets/images/themify/green/vent/vent-header7.png);
  143. --image-qkjaq: url('/@/assets/images/themify/green/home-container/configurable/firehome/qkjaq.png');
  144. // --image-common-border2: url('/@/assets/images/themify/deepblue/home-container/configurable/firehome/common-border2.png');
  145. --image-znzjxt: url(/@/assets/images/themify/green/home-container/configurable/firehome/znzjxt.png);
  146. --image-znzdxt: url(/@/assets/images/themify/green/home-container/configurable/firehome/znzdxt.png);
  147. }
  148. }
  149. @{theme-deepblue} {
  150. .company-home {
  151. --image-bg: url('@/assets/images/themify/deepblue/home-container/configurable/firehome/bg.png');
  152. --image-fire-title: url(/@/assets/images/themify/deepblue/home-container/configurable/firehome/fire-title.png);
  153. --image-qkjaq: url('/@/assets/images/themify/deepblue/home-container/configurable/firehome/qkjaq.png');
  154. --image-common-border2: url('/@/assets/images/themify/deepblue/home-container/configurable/firehome/common-border2.png');
  155. --image-znzjxt: url(/@/assets/images/themify/deepblue/home-container/configurable/firehome/znzjxt.png);
  156. --image-znzdxt: url(/@/assets/images/themify/deepblue/home-container/configurable/firehome/znzdxt.png);
  157. }
  158. }
  159. .company-home {
  160. --image-bg: url('@/assets/images/home-container/configurable/firehome/bg.png');
  161. --image-fire-title: url(/@/assets/images/home-container/configurable/firehome/fire-title.png);
  162. --image-qkjaq: url('/@/assets/images/home-container/configurable/firehome/qkjaq.png');
  163. --image-common-border2: url('/@/assets/images/home-container/configurable/firehome/common-border2.png');
  164. --image-znzjxt: url(/@/assets/images/home-container/configurable/firehome/znzjxt.png);
  165. --image-znzdxt: url(/@/assets/images/home-container/configurable/firehome/znzdxt.png);
  166. width: 100%;
  167. height: 100%;
  168. color: @white;
  169. position: relative;
  170. background: var(--image-bg) no-repeat center;
  171. .top-bg {
  172. width: 100%;
  173. height: 86px;
  174. background: var(--image-fire-title) no-repeat top;
  175. position: absolute;
  176. z-index: 1;
  177. .main-title {
  178. height: 86px;
  179. font-family: 'douyuFont';
  180. font-size: 26px;
  181. letter-spacing: 2px;
  182. display: flex;
  183. justify-content: center;
  184. align-items: center;
  185. }
  186. }
  187. // .module-left {
  188. // position: absolute;
  189. // width: 440px;
  190. // height: 280px;
  191. // left: 0;
  192. // }
  193. // .module-right {
  194. // position: absolute;
  195. // width: 440px;
  196. // height: 280px;
  197. // right: 0;
  198. // }
  199. // .module-bottom {
  200. // position: absolute;
  201. // width: 1000px;
  202. // height: 280px;
  203. // }
  204. .module-dropdown {
  205. padding: 10px;
  206. background-image: linear-gradient(to bottom, #036886, #072a40);
  207. border-bottom: 2px solid #3df6ff;
  208. color: @vent-font-color;
  209. position: absolute;
  210. top: 70px;
  211. right: 460px;
  212. }
  213. .module-dropdown-original {
  214. padding: 10px;
  215. background-image: linear-gradient(to bottom, #036886, #072a40);
  216. border-bottom: 2px solid #3df6ff;
  217. color: @vent-font-color;
  218. position: absolute;
  219. top: 70px;
  220. right: 460px;
  221. }
  222. .module-trigger-button {
  223. color: @vent-font-color;
  224. background-image: linear-gradient(to bottom, #036886, #072a40);
  225. border: none;
  226. border-bottom: 2px solid #3df6ff;
  227. }
  228. }
  229. .left-t {
  230. position: absolute;
  231. height: 115px;
  232. top: 50px;
  233. left: 10px;
  234. width: 440px;
  235. background-image: var(--image-qkjaq);
  236. // background-color: #000723;
  237. background-repeat: no-repeat;
  238. background-position: center;
  239. background-size: 100% 100%;
  240. .tcontent-area {
  241. display: flex;
  242. position: absolute;
  243. top: 50%;
  244. left: 0;
  245. box-sizing: border-box;
  246. align-items: center;
  247. justify-content: space-around;
  248. width: 100%;
  249. height: 70px;
  250. padding: 0 15px;
  251. transform: translate(0, -40%);
  252. .tcontent-l {
  253. display: flex;
  254. flex: 1;
  255. flex-direction: column;
  256. align-items: center;
  257. justify-content: center;
  258. height: 100%;
  259. color: #9da5aa;
  260. font-size: 14px;
  261. font-weight: bold;
  262. letter-spacing: 2px;
  263. }
  264. .tcontent-c {
  265. display: flex;
  266. flex: 3;
  267. flex-direction: column;
  268. align-items: center;
  269. justify-content: center;
  270. height: 100%;
  271. }
  272. .tcontent-r {
  273. display: flex;
  274. flex: 1;
  275. flex-direction: column;
  276. align-items: center;
  277. justify-content: center;
  278. height: 100%;
  279. color: #9da5aa;
  280. font-size: 14px;
  281. font-weight: bold;
  282. letter-spacing: 2px;
  283. }
  284. }
  285. }
  286. .right-t {
  287. position: absolute;
  288. // height: 160px;
  289. height: 115px;
  290. right: 10px;
  291. top: 50px;
  292. width: 440px;
  293. background-image: var(--image-common-border2);
  294. background-color: #000723;
  295. background-repeat: no-repeat;
  296. background-position: center;
  297. background-size: 100% 100%;
  298. display: flex;
  299. align-items: center;
  300. justify-content: space-around;
  301. .tcontent-l {
  302. flex: 1;
  303. height: 100%;
  304. font-size: 16px;
  305. font-weight: bold;
  306. background-image: var(--image-znzjxt);
  307. background-size: auto 100%;
  308. background-repeat: no-repeat;
  309. background-position: center;
  310. text-align: center;
  311. padding-top: 85px;
  312. }
  313. .tcontent-r {
  314. flex: 1;
  315. height: 100%;
  316. font-size: 16px;
  317. font-weight: bold;
  318. background-image: var(--image-znzdxt);
  319. background-size: auto 100%;
  320. background-repeat: no-repeat;
  321. background-position: center;
  322. text-align: center;
  323. padding-top: 85px;
  324. }
  325. }
  326. :deep(.loading-box) {
  327. position: unset;
  328. }
  329. </style>