fireWZ.vue 8.5 KB

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