ventilate.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. <template>
  2. <div class="dustPage">
  3. <div class="top-area">
  4. <div :class="activeIndex == index ? 'top-box1' : 'top-box'" v-for="(item, index) in topAreaList" :key="index" @click="topAreaClick(index)">
  5. <div class="top-title">{{ item.title }}</div>
  6. <div class="top-content">
  7. <div class="content-item" v-for="(items, ind) in item.content" :key="ind">
  8. <span class="item-label">{{ items.label }}</span>
  9. <span class="item-value">{{ items.value }}</span>
  10. </div>
  11. </div>
  12. </div>
  13. </div>
  14. <div class="center-area">
  15. <div class="center-t">
  16. <div class="t-box" v-for="(item, index) in centerAreaListT" :key="index">
  17. <div class="box-label">{{ item.label }}</div>
  18. </div>
  19. </div>
  20. <div class="center-b">
  21. <div class="b-box" v-for="(item, index) in centerAreaListB" :key="index">
  22. <div class="box-label" v-for="(items, ind) in item.content" :key="ind">{{ items.label }}</div>
  23. </div>
  24. </div>
  25. </div>
  26. <div class="bot-area">
  27. <echartLine :echartDataGq="echartDataFc" />
  28. </div>
  29. </div>
  30. </template>
  31. <script lang="ts" setup>
  32. import { onMounted, ref, defineEmits, computed, reactive, onUnmounted, watch, markRaw, defineAsyncComponent, defineProps } from 'vue';
  33. import { topAreaList, centerAreaListT, centerAreaListB, echartDataFc } from '../fire.data';
  34. import echartLine from './common/echartLine.vue';
  35. let props = defineProps({
  36. listData: Object,
  37. });
  38. //顶部区域激活选项
  39. let activeIndex = ref(0);
  40. //顶部区域选项切换
  41. function topAreaClick(index) {
  42. activeIndex.value = index;
  43. }
  44. watch(
  45. () => props.listData,
  46. (val) => {
  47. console.log(val, '详情数据');
  48. },
  49. { immediate: true }
  50. );
  51. </script>
  52. <style lang="less" scoped>
  53. .dustPage {
  54. width: 100%;
  55. height: 100%;
  56. padding: 20px;
  57. box-sizing: border-box;
  58. .top-area {
  59. height: 183px;
  60. display: flex;
  61. justify-content: space-between;
  62. margin-bottom: 10px;
  63. .top-box {
  64. position: relative;
  65. width: 480px;
  66. height: 160px;
  67. background: url('../../../../../assets//images/fire/fc-t.png') no-repeat;
  68. .top-title {
  69. position: absolute;
  70. left: 50%;
  71. top: 6px;
  72. transform: translate(-50%, 0);
  73. }
  74. .top-content {
  75. position: absolute;
  76. top: 33px;
  77. left: 0;
  78. width: 100%;
  79. height: calc(100% - 33px);
  80. display: flex;
  81. justify-content: flex-start;
  82. align-items: flex-start;
  83. flex-wrap: wrap;
  84. cursor: pointer;
  85. .content-item {
  86. position: relative;
  87. width: 50%;
  88. height: 50%;
  89. background: url('../../../../../assets/images/fire/content-item.png') no-repeat center;
  90. .item-label {
  91. position: absolute;
  92. left: 52px;
  93. top: 50%;
  94. transform: translate(0, -44%);
  95. font-size: 12px;
  96. }
  97. .item-value {
  98. position: absolute;
  99. right: 52px;
  100. top: 50%;
  101. transform: translate(0, -44%);
  102. font-size: 12px;
  103. font-family: 'douyuFont';
  104. color: #3df6ff;
  105. }
  106. }
  107. }
  108. }
  109. .top-box1 {
  110. position: relative;
  111. width: 480px;
  112. height: 183px;
  113. background: url('../../../../../assets//images/fire/fc-t1.png') no-repeat;
  114. .top-title {
  115. position: absolute;
  116. left: 50%;
  117. top: 6px;
  118. transform: translate(-50%, 0);
  119. }
  120. .top-content {
  121. position: absolute;
  122. top: 33px;
  123. left: 0;
  124. width: 100%;
  125. height: calc(100% - 33px);
  126. display: flex;
  127. justify-content: flex-start;
  128. align-items: flex-start;
  129. flex-wrap: wrap;
  130. padding-bottom: 20px;
  131. box-sizing: border-box;
  132. cursor: pointer;
  133. .content-item {
  134. position: relative;
  135. width: 50%;
  136. height: 50%;
  137. background: url('../../../../../assets/images/fire/content-item.png') no-repeat center;
  138. .item-label {
  139. position: absolute;
  140. left: 52px;
  141. top: 50%;
  142. transform: translate(0, -44%);
  143. font-size: 12px;
  144. }
  145. .item-value {
  146. position: absolute;
  147. right: 52px;
  148. top: 50%;
  149. transform: translate(0, -44%);
  150. font-size: 12px;
  151. font-family: 'douyuFont';
  152. color: #3df6ff;
  153. }
  154. }
  155. }
  156. }
  157. }
  158. .center-area {
  159. height: 258px;
  160. margin-bottom: 20px;
  161. background: url('../../../../../assets/images/fire/bj1.png') no-repeat;
  162. background-size: 100% 100%;
  163. .center-t {
  164. height: 50%;
  165. padding: 0px 80px;
  166. display: flex;
  167. justify-content: space-around;
  168. align-items: center;
  169. background: url('../../../../../assets/images/fire/dz.png') no-repeat;
  170. background-size: 100% 100%;
  171. box-sizing: border-box;
  172. .t-box {
  173. width: 218px;
  174. height: 97px;
  175. background: url('../../../../../assets/images/fire/dz1.png') no-repeat;
  176. .box-label {
  177. text-align: center;
  178. }
  179. }
  180. }
  181. .center-b {
  182. height: 50%;
  183. padding: 0px 80px;
  184. display: flex;
  185. justify-content: space-around;
  186. align-items: center;
  187. box-sizing: border-box;
  188. .b-box {
  189. width: 218px;
  190. height: 97px;
  191. display: flex;
  192. flex-direction: column;
  193. justify-content: center;
  194. align-items: center;
  195. .box-label {
  196. width: 169px;
  197. height: 42px;
  198. line-height: 42px;
  199. text-align: center;
  200. margin-bottom: 5px;
  201. color: #3df6ff;
  202. font-family: 'douyuFont';
  203. background: url('../../../../../assets/images/fire/dz2.png') no-repeat;
  204. }
  205. }
  206. }
  207. }
  208. .bot-area {
  209. height: calc(100% - 471px);
  210. background: url('../../../../../assets/images/fire/bj1.png') no-repeat;
  211. background-size: 100% 100%;
  212. }
  213. }
  214. </style>