yj_gasWarn.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <template>
  2. <div class="dz-fire">
  3. <div class="fire-container" :class="`fire-container_${type}`">
  4. <div class="title-box" :class="`title-box_${type}`">
  5. <div :class="`title-box-label_icon_${type}`"></div>
  6. <div :class="`title-box-label_${type}`">{{ titleData?.label }}</div>
  7. <div :class="`title-box-val_${type}`">{{ gasData[titleData?.value] }}</div>
  8. </div>
  9. <div class="content-box" :class="`content-box_${type}`" :scroll="10">
  10. <div class="content-box-item" v-for="(item, index) in gasData.monitorData" :key="index">
  11. <div class="box-item-label">{{ item.label }}</div>
  12. <div v-if="type == 'A'" class="box-item-value">{{ item.value }}</div>
  13. <div v-if="type == 'B'" class="box-item-value">{{ item.value1 }}</div>
  14. </div>
  15. </div>
  16. </div>
  17. </div>
  18. </template>
  19. <script setup lang="ts">
  20. import { scrollIntoParentView } from 'ant-design-vue/lib/vc-cascader/utils/commonUtil';
  21. import { ref, watch } from 'vue';
  22. let props = defineProps({
  23. type: {
  24. type: String,
  25. default: '',
  26. },
  27. titleData: {
  28. type: Object,
  29. defualt: () => {
  30. return {};
  31. },
  32. },
  33. gasData: {
  34. type: Object,
  35. default: () => {
  36. return {};
  37. },
  38. },
  39. });
  40. </script>
  41. <style lang="less" scoped>
  42. @import '/@/design/theme.less';
  43. .dz-fire {
  44. --image-model_fire-container_A: url('@/assets/images/home-warn/5-1.png');
  45. --image-model_fire-container_B: url('@/assets/images/home-warn/5-2.png');
  46. height: 100%;
  47. padding: 10px 25px 0px 25px;
  48. box-sizing: border-box;
  49. .fire-container_A {
  50. position: relative;
  51. width: 100%;
  52. height: 50%;
  53. }
  54. .fire-container_B {
  55. position: relative;
  56. width: 100%;
  57. height: 50%;
  58. }
  59. .title-box-label_icon_A {
  60. width: 20px;
  61. height: 20px;
  62. margin-left: 16px;
  63. background: url('@/assets/images/home-warn/5-4.svg') no-repeat;
  64. background-size: 100% 100%;
  65. }
  66. .title-box-label_icon_B {
  67. width: 20px;
  68. height: 20px;
  69. margin-left: 16px;
  70. background: url('@/assets/images/home-warn/5-5.svg') no-repeat;
  71. background-size: 100% 100%;
  72. }
  73. .title-box {
  74. display: flex;
  75. justify-content: flex-start;
  76. align-items: center;
  77. position: absolute;
  78. height: 50px;
  79. top: 0;
  80. background: var(--image-model_fire-container_A) no-repeat;
  81. background-size: 100% 100%;
  82. }
  83. .content-box {
  84. display: flex;
  85. flex-direction: column;
  86. justify-content: space-around;
  87. align-items: center;
  88. position: absolute;
  89. width: 100%;
  90. top: 46px;
  91. background: url('@/assets/images/home-warn/5-2.png') no-repeat;
  92. background-size: 100% 100%;
  93. }
  94. .content-box-item {
  95. display: flex;
  96. flex-direction: row;
  97. flex: 1;
  98. width: 100%;
  99. height: 100%;
  100. margin-top: 10px;
  101. justify-content: space-around;
  102. align-items: center;
  103. background: url('@/assets/images/home-warn/5-3.png') no-repeat;
  104. background-size: 100% 100%;
  105. }
  106. .box-item-value {
  107. font-family: 'douyuFont';
  108. font-size: 12px;
  109. }
  110. .title-box_A {
  111. width: 100%;
  112. height: 40px;
  113. }
  114. .title-box_B {
  115. width: 100%;
  116. height: 40px;
  117. }
  118. .title-box-label_A {
  119. margin: 20px;
  120. color: #fff;
  121. }
  122. .title-box-label_B {
  123. margin: 20px;
  124. color: #fff;
  125. }
  126. .title-box-val_A {
  127. font-family: 'douyuFont';
  128. color: #baf5fe;
  129. margin-left: 86px;
  130. }
  131. .title-box-val_B {
  132. font-family: 'douyuFont';
  133. color: #baf5fe;
  134. margin-left: 86px;
  135. }
  136. .content-box_A {
  137. width: 295px;
  138. height: 100%;
  139. margin-left: 46px;
  140. }
  141. .content-box_B {
  142. width: 295px;
  143. height: 100%;
  144. margin-left: 46px;
  145. }
  146. }
  147. </style>