fireWZ.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  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-green} {
  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/green/vent/vent-header7.png);
  104. --image-qkjaq: url('/@/assets/images/themify/green/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/green/home-container/configurable/firehome/znzjxt.png);
  107. --image-znzdxt: url(/@/assets/images/themify/green/home-container/configurable/firehome/znzdxt.png);
  108. }
  109. }
  110. @{theme-deepblue} {
  111. .company-home {
  112. --image-bg: url('@/assets/images/themify/deepblue/home-container/configurable/firehome/bg.png');
  113. --image-fire-title: url(/@/assets/images/themify/deepblue/home-container/configurable/firehome/fire-title.png);
  114. --image-qkjaq: url('/@/assets/images/themify/deepblue/home-container/configurable/firehome/qkjaq.png');
  115. --image-common-border2: url('/@/assets/images/themify/deepblue/home-container/configurable/firehome/common-border2.png');
  116. --image-znzjxt: url(/@/assets/images/themify/deepblue/home-container/configurable/firehome/znzjxt.png);
  117. --image-znzdxt: url(/@/assets/images/themify/deepblue/home-container/configurable/firehome/znzdxt.png);
  118. }
  119. }
  120. .company-home {
  121. --image-bg: url('@/assets/images/home-container/configurable/firehome/bg.png');
  122. --image-fire-title: url(/@/assets/images/home-container/configurable/firehome/fire-title.png);
  123. --image-qkjaq: url('/@/assets/images/home-container/configurable/firehome/qkjaq.png');
  124. --image-common-border2: url('/@/assets/images/home-container/configurable/firehome/common-border2.png');
  125. --image-znzjxt: url(/@/assets/images/home-container/configurable/firehome/znzjxt.png);
  126. --image-znzdxt: url(/@/assets/images/home-container/configurable/firehome/znzdxt.png);
  127. width: 100%;
  128. height: 100%;
  129. color: @white;
  130. position: relative;
  131. background: var(--image-bg) no-repeat center;
  132. .top-bg {
  133. width: 100%;
  134. height: 86px;
  135. background: var(--image-fire-title) no-repeat top;
  136. position: absolute;
  137. z-index: 1;
  138. .main-title {
  139. height: 86px;
  140. font-family: 'douyuFont';
  141. font-size: 26px;
  142. letter-spacing: 2px;
  143. display: flex;
  144. justify-content: center;
  145. align-items: center;
  146. }
  147. }
  148. // .module-left {
  149. // position: absolute;
  150. // width: 450px;
  151. // height: 280px;
  152. // left: 0;
  153. // }
  154. // .module-right {
  155. // position: absolute;
  156. // width: 450px;
  157. // height: 280px;
  158. // right: 0;
  159. // }
  160. // .module-bottom {
  161. // position: absolute;
  162. // width: 1000px;
  163. // height: 280px;
  164. // }
  165. .module-dropdown {
  166. padding: 10px;
  167. background-image: linear-gradient(to bottom, #036886, #072a40);
  168. border-bottom: 2px solid #3df6ff;
  169. color: @vent-font-color;
  170. position: absolute;
  171. top: 70px;
  172. right: 460px;
  173. }
  174. .module-dropdown-original {
  175. padding: 10px;
  176. background-image: linear-gradient(to bottom, #036886, #072a40);
  177. border-bottom: 2px solid #3df6ff;
  178. color: @vent-font-color;
  179. position: absolute;
  180. top: 70px;
  181. right: 460px;
  182. }
  183. .module-trigger-button {
  184. color: @vent-font-color;
  185. background-image: linear-gradient(to bottom, #036886, #072a40);
  186. border: none;
  187. border-bottom: 2px solid #3df6ff;
  188. }
  189. }
  190. .left-t {
  191. position: absolute;
  192. height: 115px;
  193. top: 50px;
  194. width: 450px;
  195. background-image: var(--image-qkjaq);
  196. // background-color: #000723;
  197. background-repeat: no-repeat;
  198. background-position: center;
  199. background-size: 100% 100%;
  200. .tcontent-area {
  201. display: flex;
  202. position: absolute;
  203. top: 50%;
  204. left: 0;
  205. box-sizing: border-box;
  206. align-items: center;
  207. justify-content: space-around;
  208. width: 100%;
  209. height: 70px;
  210. padding: 0 15px;
  211. transform: translate(0, -40%);
  212. .tcontent-l {
  213. display: flex;
  214. flex: 1;
  215. flex-direction: column;
  216. align-items: center;
  217. justify-content: center;
  218. height: 100%;
  219. color: #9da5aa;
  220. font-size: 14px;
  221. font-weight: bold;
  222. letter-spacing: 2px;
  223. }
  224. .tcontent-c {
  225. display: flex;
  226. flex: 3;
  227. flex-direction: column;
  228. align-items: center;
  229. justify-content: center;
  230. height: 100%;
  231. }
  232. .tcontent-r {
  233. display: flex;
  234. flex: 1;
  235. flex-direction: column;
  236. align-items: center;
  237. justify-content: center;
  238. height: 100%;
  239. color: #9da5aa;
  240. font-size: 14px;
  241. font-weight: bold;
  242. letter-spacing: 2px;
  243. }
  244. }
  245. }
  246. .right-t {
  247. position: absolute;
  248. // height: 160px;
  249. height: 115px;
  250. right: 10px;
  251. top: 50px;
  252. width: 440px;
  253. background-image: var(--image-common-border2);
  254. background-color: #000723;
  255. background-repeat: no-repeat;
  256. background-position: center;
  257. background-size: 100% 100%;
  258. display: flex;
  259. align-items: center;
  260. justify-content: space-around;
  261. .tcontent-l {
  262. flex: 1;
  263. height: 100%;
  264. font-size: 16px;
  265. font-weight: bold;
  266. background-image: var(--image-znzjxt);
  267. background-size: auto 100%;
  268. background-repeat: no-repeat;
  269. background-position: center;
  270. text-align: center;
  271. padding-top: 85px;
  272. }
  273. .tcontent-r {
  274. flex: 1;
  275. height: 100%;
  276. font-size: 16px;
  277. font-weight: bold;
  278. background-image: var(--image-znzdxt);
  279. background-size: auto 100%;
  280. background-repeat: no-repeat;
  281. background-position: center;
  282. text-align: center;
  283. padding-top: 85px;
  284. }
  285. }
  286. :deep(.loading-box) {
  287. position: unset;
  288. }
  289. </style>