fire-detail-zb.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <template>
  2. <!-- 外因火灾 -->
  3. <view class="fire-detail-zb">
  4. <view class="top-area">
  5. <view class="echartBox">
  6. <warnZb :resetIndex="0" :widthV="widthV" :heightV="heightV" :coordDw="coordDw"
  7. :widthCanvas="widthCanvas" :heightCanvas="heightCanvas"></warnZb>
  8. </view>
  9. </view>
  10. <view class="bot-area">
  11. <view class="bot-content" v-for="(item, index) in botContentList" :key="index">
  12. <view class="content-title">{{ item.title }}</view>
  13. <view class="content-item-box">
  14. <view class="content-item">
  15. <view class="item-l">
  16. <view class="item-value">{{ item.level || '--' }}</view>
  17. <view class="item-label">预警等级</view>
  18. </view>
  19. <view class="item-line"></view>
  20. <view class="item-c">
  21. <view class="item-value">{{ item.alarmName || '--' }}</view>
  22. <view class="item-label">煤自燃阶段</view>
  23. </view>
  24. <view class="item-line"></view>
  25. <view class="item-r">
  26. <view class="item-value">{{ item.alarmInfo || '--' }}</view>
  27. <view class="item-label">指标</view>
  28. </view>
  29. </view>
  30. <view class="content-item">
  31. <view class="item-l">
  32. <view class="item-value">{{ item.alarmdes || '--' }}</view>
  33. <view class="item-label">条件</view>
  34. </view>
  35. <view class="item-line"></view>
  36. <view class="item-c">
  37. <view class="item-value">{{ item.temperature || '--' }}</view>
  38. <view class="item-label">温度</view>
  39. </view>
  40. <view class="item-line"></view>
  41. <view class="item-r">
  42. <view class="item-value">{{ item.address || '--' }}</view>
  43. <view class="item-label">参考值</view>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </template>
  51. <script>
  52. import api from "@/api/api";
  53. import warnZb from './warn-zb.vue'
  54. export default {
  55. name: 'fireDetailZb',
  56. components: {
  57. warnZb
  58. },
  59. props: {
  60. detailZb: {
  61. type: Object,
  62. default: () => {
  63. return {}
  64. }
  65. }
  66. },
  67. data() {
  68. return {
  69. widthV: '85%',
  70. heightV: '85%',
  71. coordDw: [16, 42],
  72. widthCanvas: '302px',
  73. heightCanvas: '194px',
  74. botContentList: []
  75. };
  76. },
  77. watch: {
  78. detailZb: {
  79. handler(newZ, oldZ) {
  80. console.log(newZ, 'newZ--------------')
  81. let that = this
  82. if (JSON.stringify(newZ) != '{}') {
  83. that.botContentList = newZ.info[0].list
  84. }
  85. },
  86. immediate: true,
  87. deep: true
  88. }
  89. },
  90. mounted() { },
  91. methods: {},
  92. computed: {},
  93. };
  94. </script>
  95. <style lang="scss" scoped>
  96. .fire-detail-zb {
  97. width: 100%;
  98. height: 100%;
  99. // box-sizing: border-box;
  100. // overflow-y: auto;
  101. .top-area {
  102. width: 100%;
  103. padding: 10px;
  104. background-color: #FFF;
  105. margin-bottom: 2px;
  106. box-sizing: border-box;
  107. .echartBox {
  108. width: 100%;
  109. height: 240px;
  110. }
  111. }
  112. .bot-area {
  113. width: 100%;
  114. padding: 10px;
  115. background-color: #FFF;
  116. margin-bottom: 2px;
  117. box-sizing: border-box;
  118. .bot-content {
  119. margin-bottom: 15px;
  120. .content-title {
  121. height: 26px;
  122. line-height: 26px;
  123. padding: 0px 20px;
  124. font-size: 12px;
  125. background: url('/static/warndata/title.png') no-repeat;
  126. background-size: 100% 100%;
  127. }
  128. .content-item-box {
  129. padding: 5px 0px;
  130. .content-item {
  131. height: 70px;
  132. display: flex;
  133. justify-content: space-between;
  134. align-items: center;
  135. background: linear-gradient(to right, rgba(55, 135, 254, 0.08), rgba(4, 184, 255, 0.08), rgba(60, 161, 237, 0.08));
  136. border-radius: 10px;
  137. margin-bottom: 5px;
  138. .item-l {
  139. width: calc(25% - 2px);
  140. height: 100%;
  141. display: flex;
  142. flex-direction: column;
  143. justify-content: center;
  144. align-items: center;
  145. text-align: center;
  146. }
  147. .item-c {
  148. width: calc(50% - 4px);
  149. height: 100%;
  150. display: flex;
  151. flex-direction: column;
  152. justify-content: center;
  153. align-items: center;
  154. text-align: center;
  155. }
  156. .item-line {
  157. width: 4px;
  158. height: 70%;
  159. border-left: 2px solid;
  160. border-image: linear-gradient(to bottom, transparent, rgba(140, 203, 254, 1), transparent) 1 1 1;
  161. }
  162. .item-r {
  163. width: calc(25% - 2px);
  164. height: 100%;
  165. display: flex;
  166. flex-direction: column;
  167. justify-content: center;
  168. align-items: center;
  169. text-align: center;
  170. }
  171. .item-value {
  172. color: #0eb4fc;
  173. font-weight: bold;
  174. font-size: 12px;
  175. margin-bottom: 5px;
  176. }
  177. .item-label {
  178. font-size: 12px;
  179. }
  180. }
  181. }
  182. }
  183. }
  184. }
  185. </style>