MeasureDetail.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. <template>
  2. <div class="content-box">
  3. <div class="dust-scroll-content">
  4. <a-carousel dot-position="left" dotsClass="dots-class" :dots="true" :autoplay="true">
  5. <template v-for="(data, selectIndex) in selectData" :key="selectIndex">
  6. <div class="monitor-item">
  7. <div class="title-box">{{ data['devicePos'] }}</div>
  8. <div class="monitor-content-top">
  9. <div v-for="(dustItem, index) in topConfig" :key="index" class="top-item-box" :class="`top-item-box-${index + 1}`">
  10. <div class="item-top-title">{{ dustItem.title }}</div>
  11. <div class="item-top-value">{{ data[dustItem.code] }}</div>
  12. </div>
  13. </div>
  14. <div class="monitor-content-bottom">
  15. <div v-for="(dustItem, index) in btnConfig" :key="index" class="bottom-item-box" :class="`bottom-item-box-${index + 1}`">
  16. <div class="item-bottom-title">{{ dustItem.title }}</div>
  17. <div class="item-bottom-value">{{ data[dustItem.code] }}</div>
  18. </div>
  19. </div>
  20. </div>
  21. </template>
  22. </a-carousel>
  23. </div>
  24. </div>
  25. </template>
  26. <script setup lang="ts">
  27. import { ref, watch } from 'vue';
  28. let props = defineProps({
  29. compositeData: {
  30. type: Array,
  31. default: () => {
  32. return [];
  33. },
  34. },
  35. topconfig: {
  36. type: Array,
  37. default: () => {
  38. return [
  39. {
  40. title: '粉尘类型',
  41. code: 'dustType',
  42. value: '',
  43. },
  44. {
  45. title: '火焰长度(mm)',
  46. code: 'fireLen',
  47. value: '',
  48. },
  49. {
  50. title: '爆炸性',
  51. code: 'isBlast',
  52. value: '',
  53. },
  54. {
  55. title: '风量(m³/min)',
  56. code: 'airQuantity',
  57. value: '',
  58. },
  59. ];
  60. },
  61. },
  62. btnconfig: {
  63. type: Array,
  64. default: () => {
  65. return [
  66. {
  67. title: '总粉尘浓度 (mg/m³)',
  68. code: 'dustCon',
  69. value: '',
  70. },
  71. {
  72. title: '呼尘浓度 (mg/m³)',
  73. code: 'respirableDustCon',
  74. value: '',
  75. },
  76. {
  77. title: '二氧化硅含量 (%)',
  78. code: 'SiO2Content',
  79. value: '',
  80. },
  81. {
  82. title: '呼尘颗粒占比 (%)',
  83. code: 'respirableDustRatio',
  84. value: '',
  85. },
  86. ];
  87. },
  88. },
  89. });
  90. const selectData = ref<any>([]);
  91. const topConfig: any = props.topconfig;
  92. const btnConfig: any = props.btnconfig;
  93. watch(
  94. () => props.compositeData,
  95. (newS) => {
  96. selectData.value = newS;
  97. },
  98. {
  99. immediate: true,
  100. deep: true,
  101. }
  102. );
  103. </script>
  104. <style lang="less" scoped>
  105. @font-face {
  106. font-family: 'douyuFont';
  107. src: url('/@/assets/font/douyuFont.otf');
  108. }
  109. .content-box {
  110. display: flex;
  111. justify-content: center;
  112. align-items: center;
  113. width: 100%;
  114. height: 100%;
  115. .dust-scroll-content {
  116. width: 400px;
  117. height: 420px;
  118. overflow-y: auto;
  119. overflow-x: hidden;
  120. .monitor-item {
  121. margin-bottom: 15px;
  122. .title-box {
  123. color: #fff;
  124. width: 100%;
  125. height: 40px;
  126. margin-left: 5px;
  127. margin-top: 00px;
  128. margin-bottom: 5px;
  129. padding-left: 40px;
  130. padding-top: 6px;
  131. background: url('/@/assets//images//company//lentj.png') no-repeat;
  132. background-size: 199px 100%;
  133. font-size: 15px;
  134. font-weight: 600;
  135. }
  136. .monitor-content-top {
  137. width: 100%;
  138. display: flex;
  139. flex-direction: row;
  140. flex-wrap: wrap;
  141. color: #fff;
  142. .top-item-box {
  143. width: 193px;
  144. height: 64px;
  145. display: flex;
  146. justify-content: space-between;
  147. align-items: center;
  148. padding: 0 28px;
  149. }
  150. .top-item-box-1 {
  151. background: url('/@/assets//images//company//dust//tip-bg-1.png');
  152. }
  153. .top-item-box-2 {
  154. background: url('/@/assets//images//company//dust//tip-bg-2.png');
  155. }
  156. .top-item-box-3 {
  157. background: url('/@/assets//images//company//dust//tip-bg-3.png');
  158. }
  159. .top-item-box-4 {
  160. background: url('/@/assets//images//company//dust//tip-bg-4.png');
  161. }
  162. }
  163. .monitor-content-bottom {
  164. padding: 0 20px;
  165. color: #fff;
  166. .bottom-item-box {
  167. width: 358px;
  168. height: 43px;
  169. display: flex;
  170. justify-content: space-between;
  171. align-items: center;
  172. margin-top: 14px;
  173. position: relative;
  174. .item-bottom-title {
  175. margin-left: 65px;
  176. }
  177. .item-bottom-value {
  178. margin-right: 20px;
  179. }
  180. }
  181. .bottom-item-box-1 {
  182. background: url('/@/assets//images//company//dust//tip-bg1-1.png');
  183. &::after {
  184. content: '';
  185. width: 25px;
  186. height: 25px;
  187. position: absolute;
  188. left: 13px;
  189. top: 7px;
  190. background: url('/@/assets//images//company//dust//dustCon-icon.png');
  191. }
  192. }
  193. .bottom-item-box-2 {
  194. background: url('/@/assets//images//company//dust//tip-bg1-2.png');
  195. &::after {
  196. content: '';
  197. width: 25px;
  198. height: 25px;
  199. position: absolute;
  200. left: 12px;
  201. top: 6px;
  202. background: url('/@/assets//images//company//dust//respirableDustCon-icon.png');
  203. }
  204. }
  205. .bottom-item-box-3 {
  206. background: url('/@/assets//images//company//dust//tip-bg1-1.png');
  207. &::after {
  208. content: '';
  209. width: 28px;
  210. height: 22px;
  211. position: absolute;
  212. left: 10px;
  213. top: 7px;
  214. background: url('/@/assets//images//company//dust//SiO2Content-icon.png');
  215. }
  216. }
  217. .bottom-item-box-4 {
  218. background: url('/@/assets//images//company//dust//tip-bg1-2.png');
  219. &::after {
  220. content: '';
  221. width: 26px;
  222. height: 20px;
  223. position: absolute;
  224. left: 11px;
  225. top: 8px;
  226. background: url('/@/assets//images//company//dust//respirableDustRatio-icon.png');
  227. }
  228. }
  229. }
  230. }
  231. }
  232. }
  233. .dots-class {
  234. width: 8px;
  235. }
  236. ::v-deep .slick-dots-left {
  237. left: 0 !important;
  238. }
  239. ::v-deep .zxm-select-single:not(.zxm-select-customize-input) .zxm-select-selector {
  240. height: 24px;
  241. }
  242. ::v-deep .zxm-select-single:not(.zxm-select-customize-input) .zxm-select-selector .zxm-select-selection-search-input {
  243. height: 24px;
  244. }
  245. ::v-deep .zxm-select-selection-placeholder {
  246. color: #fff !important;
  247. line-height: 22px !important;
  248. }
  249. ::v-deep .zxm-select-single:not(.zxm-select-customize-input) .zxm-select-selector::after {
  250. line-height: 24px;
  251. }
  252. ::v-deep .zxm-select:not(.zxm-select-customize-input) .zxm-select-selector {
  253. background-color: transparent;
  254. border-top: 0px;
  255. border-bottom: 0px;
  256. border-left: 2px solid;
  257. border-right: 2px solid;
  258. border-image: linear-gradient(to bottom, transparent, rgba(49, 184, 255, 1), transparent) 1 1 1;
  259. }
  260. ::v-deep .zxm-select-arrow {
  261. color: #fff !important;
  262. }
  263. ::v-deep .zxm-select-selection-item {
  264. color: #fff !important;
  265. }
  266. ::v-deep .zxm-select-single .zxm-select-selector .zxm-select-selection-item {
  267. line-height: 24px !important;
  268. }
  269. </style>