fireTS.vue 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. <!-- eslint-disable vue/multi-word-component-names -->
  2. <template>
  3. <div class="company-home">
  4. <!-- 顶部标题样式块 -->
  5. <div class="top-bg">
  6. <div class="main-title">{{ mainTitle }}</div>
  7. </div>
  8. <!-- 中间样式块 -->
  9. <div class="center-info-bar">
  10. <div class="left-info-content">
  11. <div class="left-block block1">
  12. <div class="info-value">无</div>
  13. <div class="info-label">突变预警</div>
  14. </div>
  15. <div class="left-block block2">
  16. <div class="info-value">无自燃隐患</div>
  17. <div class="info-label">煤自燃氧化阶段</div>
  18. </div>
  19. <div class="left-block block3">
  20. <div class="info-value">-</div>
  21. <div class="info-label">最高温度</div>
  22. </div>
  23. </div>
  24. <div class="center-info-content">
  25. <div class="info-value">正常</div>
  26. <div class="info-label">火灾安全等级</div>
  27. </div>
  28. <div class="right-info-content">
  29. <div class="right-block block1">
  30. <div class="info-value">0</div>
  31. <div class="info-label">指标预警</div>
  32. </div>
  33. <div class="right-block block2">
  34. <div class="info-value">无</div>
  35. <div class="info-label">预警等级</div>
  36. </div>
  37. <div class="right-block block3">
  38. <div class="info-value">无</div>
  39. <div class="info-label">升温预警</div>
  40. </div>
  41. </div>
  42. </div>
  43. <!-- 渲染所有模块 -->
  44. <ModuleCommon
  45. v-for="cfg in cfgs"
  46. :key="cfg.deviceType + cfg.moduleName"
  47. :show-style="cfg.showStyle"
  48. :module-data="cfg.moduleData"
  49. :module-name="cfg.moduleName"
  50. :device-type="cfg.deviceType"
  51. :data="data"
  52. :visible="true" />
  53. <ModuleCommonDual
  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. :common-title="commonTitle"
  65. />
  66. </div>
  67. </template>
  68. <script lang="ts" setup>
  69. import { computed, onMounted, onUnmounted } from 'vue';
  70. import { useInitConfigs, useInitPage } from './hooks/useInit';
  71. import ModuleBDDual from './components/ModuleBDDual.vue';
  72. import { getDisHome } from './configurable.api';
  73. import { testConfigTSFire } from './configurable.data.tashan';
  74. import ModuleCommon from './components/ModuleCommon.vue';
  75. import ModuleCommonDual from './components/ModuleCommonDual.vue';
  76. const cfgs = computed(() =>
  77. configs.value.filter((_, index) => index !== 6 && index !== 7)
  78. );
  79. const cfgA = computed<any>(() =>
  80. configs.value[6]
  81. );
  82. const cfgB = computed<any>(() =>
  83. configs.value[7]
  84. );
  85. const { configs, devicesTypes, fetchConfigs } = useInitConfigs();
  86. const { mainTitle, data, updateData } = useInitPage('回采工作面智能管控');
  87. let interval: ReturnType<typeof setInterval> | undefined;
  88. const commonTitle = "实时监测与预警"
  89. onMounted(() => {
  90. fetchConfigs('ts_fire').then(() => {
  91. configs.value = testConfigTSFire;
  92. getDisHome({
  93. dataList: devicesTypes.value.concat('fireAllMineWarn').join(','),
  94. }).then(updateData);
  95. });
  96. interval = setInterval(() => {
  97. getDisHome({
  98. dataList: devicesTypes.value.concat('fireAllMineWarn').join(','),
  99. }).then(updateData);
  100. }, 2000);
  101. });
  102. onUnmounted(() => {
  103. clearInterval(interval);
  104. });
  105. function redirectTo(url) {
  106. window.open(url);
  107. }
  108. </script>
  109. <style lang="less" scoped>
  110. @import '/@/design/theme.less';
  111. @font-face {
  112. font-family: 'douyuFont';
  113. src: url('../../../../assets/font/douyuFont.otf');
  114. }
  115. .company-home {
  116. --image-fire-title: url(/@/assets/images/vent/vent-header1.png);
  117. --image-common-border1: url('/@/assets/images/home-container/configurable/minehome/common-border1.png');
  118. --image-common-border3: url('/@/assets/images/home-container/configurable/minehome/common-border3.png');
  119. width: 100%;
  120. height: 100%;
  121. color: @white;
  122. position: relative;
  123. background: #09172c;
  124. .top-bg {
  125. width: 100%;
  126. height: 73px;
  127. background: var(--image-fire-title) no-repeat top;
  128. position: absolute;
  129. z-index: 1;
  130. .main-title {
  131. height: 80px;
  132. font-family: 'douyuFont';
  133. font-size: 26px;
  134. letter-spacing: 2px;
  135. display: flex;
  136. justify-content: center;
  137. align-items: center;
  138. padding: 0 0 10px 0;
  139. }
  140. }
  141. // 顶部中间样式块
  142. .center-info-bar {
  143. position: relative;
  144. top: 75px;
  145. left: 50%;
  146. transform: translateX(-50%);
  147. width: 900px;
  148. height: 160px;
  149. display: flex;
  150. align-items: center;
  151. justify-content: center;
  152. background: url('@/assets/images/home-container/configurable/tashanhome/center-bar-bg.png') no-repeat center;
  153. .center-info-content {
  154. position: relative;
  155. top: 15px;
  156. background: url('@/assets/images/home-container/configurable/tashanhome/center-bar-circle.png') no-repeat center;
  157. width: 160px;
  158. height: 160px;
  159. text-align: center;
  160. .info-value {
  161. position: absolute;
  162. top: 34%;
  163. left: 50%;
  164. transform: translateX(-50%);
  165. font-family: 'douyuFont';
  166. font-size: 25px;
  167. color: #2cffdd;
  168. }
  169. .info-label {
  170. width: 100%;
  171. position: absolute;
  172. bottom: 25px;
  173. font-size: 17px;
  174. left: 50%;
  175. transform: translateX(-50%);
  176. }
  177. }
  178. .left-info-content {
  179. position: relative;
  180. text-align: right;
  181. .left-block {
  182. position: absolute;
  183. width: 190px;
  184. height: 55px;
  185. background: url('@/assets/images/home-container/configurable/tashanhome/leftbar-bg1.png') no-repeat right;
  186. padding-right: 52px;
  187. .info-value {
  188. height: 28px;
  189. line-height: 28px;
  190. font-family: 'douyuFont';
  191. font-size: 12px;
  192. color: var(--vent-gas-primary-text);
  193. }
  194. .info-label {
  195. height: 28px;
  196. line-height: 28px;
  197. }
  198. }
  199. .block1 {
  200. top: -70px;
  201. right: -5px;
  202. }
  203. .block2 {
  204. top: -15px;
  205. left: -280px;
  206. background: url('@/assets/images/home-container/configurable/tashanhome/leftbar-bg2.png') no-repeat right;
  207. .info-value {
  208. color: #2cffdd;
  209. }
  210. }
  211. .block3 {
  212. top: 40px;
  213. right: -5px;
  214. }
  215. }
  216. .right-info-content {
  217. position: relative;
  218. .right-block {
  219. position: absolute;
  220. width: 190px;
  221. height: 55px;
  222. background: url('@/assets/images/home-container/configurable/tashanhome/rightbar-bg1.png') no-repeat left;
  223. padding-left: 52px;
  224. .info-value {
  225. height: 28px;
  226. line-height: 28px;
  227. font-family: 'douyuFont';
  228. font-size: 12px;
  229. color: var(--vent-gas-primary-text);
  230. }
  231. .info-label {
  232. height: 28px;
  233. line-height: 28px;
  234. }
  235. }
  236. .block1 {
  237. top: -70px;
  238. left: -5px;
  239. }
  240. .block2 {
  241. top: -15px;
  242. right: -280px;
  243. background: url('@/assets/images/home-container/configurable/tashanhome/rightbar-bg2.png') no-repeat left;
  244. .info-value {
  245. color: #2cffdd;
  246. }
  247. }
  248. .block3 {
  249. top: 40px;
  250. left: -5px;
  251. }
  252. }
  253. }
  254. ::v-deep .dane-bd {
  255. background-repeat: no-repeat;
  256. background-position: center;
  257. background-size: 100% 100%;
  258. &.dane-w {
  259. background-image: var(--image-common-border3);
  260. }
  261. .dane-title {
  262. justify-content: space-around;
  263. padding: 0 50px 0 0;
  264. .common-navL {
  265. font-size: 14px;
  266. font-weight: bold;
  267. font-family: 'douyuFont';
  268. }
  269. }
  270. .dane-content {
  271. border: none;
  272. background: none;
  273. padding: 10px 35px;
  274. }
  275. }
  276. ::v-deep .table__content .table__content_list {
  277. width: 95%;
  278. }
  279. ::v-deep .table__content .table__content_label {
  280. width: 95%;
  281. }
  282. }
  283. </style>