MeasureDetail.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  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, defineProps, watch } from 'vue';
  28. import { dustMonitorColumnTop, dustMonitorColumnBootom } from '../../../clique/dust.data';
  29. let props = defineProps({
  30. compositeData: {
  31. type: Array,
  32. default: () => {
  33. return [];
  34. },
  35. },
  36. topconfig: {
  37. type: Array,
  38. default: () => {
  39. return [];
  40. },
  41. },
  42. btnconfig: {
  43. type: Array,
  44. default: () => {
  45. return [];
  46. },
  47. },
  48. });
  49. const selectData = ref<any>([]);
  50. const topConfig: any = props.topconfig.length ? props.topconfig : dustMonitorColumnTop;
  51. const btnConfig: any = props.btnconfig.length ? props.btnconfig : dustMonitorColumnBootom;
  52. watch(
  53. () => props.compositeData,
  54. (newS) => {
  55. console.log('debug', newS);
  56. selectData.value = newS;
  57. },
  58. {
  59. immediate: true,
  60. deep: true,
  61. }
  62. );
  63. </script>
  64. <style lang="less" scoped>
  65. @font-face {
  66. font-family: 'douyuFont';
  67. src: url('/@/assets/font/douyuFont.otf');
  68. }
  69. .content-box {
  70. display: flex;
  71. justify-content: center;
  72. align-items: center;
  73. width: 100%;
  74. height: 100%;
  75. .dust-scroll-content {
  76. width: 400px;
  77. height: 420px;
  78. overflow-y: auto;
  79. overflow-x: hidden;
  80. .monitor-item {
  81. margin-bottom: 15px;
  82. .title-box {
  83. color: #fff;
  84. width: 100%;
  85. height: 40px;
  86. margin-left: 5px;
  87. margin-top: 00px;
  88. margin-bottom: 5px;
  89. padding-left: 40px;
  90. padding-top: 6px;
  91. background: url('/@/assets//images//company//lentj.png') no-repeat;
  92. background-size: 199px 100%;
  93. font-size: 15px;
  94. font-weight: 600;
  95. }
  96. .monitor-content-top {
  97. width: 100%;
  98. display: flex;
  99. flex-direction: row;
  100. flex-wrap: wrap;
  101. color: #fff;
  102. .top-item-box {
  103. width: 193px;
  104. height: 64px;
  105. display: flex;
  106. justify-content: space-between;
  107. align-items: center;
  108. padding: 0 28px;
  109. }
  110. .top-item-box-1 {
  111. background: url('/@/assets//images//company//dust//tip-bg-1.png');
  112. }
  113. .top-item-box-2 {
  114. background: url('/@/assets//images//company//dust//tip-bg-2.png');
  115. }
  116. .top-item-box-3 {
  117. background: url('/@/assets//images//company//dust//tip-bg-3.png');
  118. }
  119. .top-item-box-4 {
  120. background: url('/@/assets//images//company//dust//tip-bg-4.png');
  121. }
  122. }
  123. .monitor-content-bottom {
  124. padding: 0 20px;
  125. color: #fff;
  126. .bottom-item-box {
  127. width: 358px;
  128. height: 43px;
  129. display: flex;
  130. justify-content: space-between;
  131. align-items: center;
  132. margin-top: 14px;
  133. position: relative;
  134. .item-bottom-title {
  135. margin-left: 65px;
  136. }
  137. .item-bottom-value {
  138. margin-right: 20px;
  139. }
  140. }
  141. .bottom-item-box-1 {
  142. background: url('/@/assets//images//company//dust//tip-bg1-1.png');
  143. &::after {
  144. content: '';
  145. width: 25px;
  146. height: 25px;
  147. position: absolute;
  148. left: 13px;
  149. top: 7px;
  150. background: url('/@/assets//images//company//dust//dustCon-icon.png');
  151. }
  152. }
  153. .bottom-item-box-2 {
  154. background: url('/@/assets//images//company//dust//tip-bg1-2.png');
  155. &::after {
  156. content: '';
  157. width: 25px;
  158. height: 25px;
  159. position: absolute;
  160. left: 12px;
  161. top: 6px;
  162. background: url('/@/assets//images//company//dust//respirableDustCon-icon.png');
  163. }
  164. }
  165. .bottom-item-box-3 {
  166. background: url('/@/assets//images//company//dust//tip-bg1-1.png');
  167. &::after {
  168. content: '';
  169. width: 28px;
  170. height: 22px;
  171. position: absolute;
  172. left: 10px;
  173. top: 7px;
  174. background: url('/@/assets//images//company//dust//SiO2Content-icon.png');
  175. }
  176. }
  177. .bottom-item-box-4 {
  178. background: url('/@/assets//images//company//dust//tip-bg1-2.png');
  179. &::after {
  180. content: '';
  181. width: 26px;
  182. height: 20px;
  183. position: absolute;
  184. left: 11px;
  185. top: 8px;
  186. background: url('/@/assets//images//company//dust//respirableDustRatio-icon.png');
  187. }
  188. }
  189. }
  190. }
  191. }
  192. }
  193. .dots-class {
  194. width: 8px;
  195. }
  196. ::v-deep .slick-dots-left {
  197. left: 0 !important;
  198. }
  199. ::v-deep .zxm-select-single:not(.zxm-select-customize-input) .zxm-select-selector {
  200. height: 24px;
  201. }
  202. ::v-deep .zxm-select-single:not(.zxm-select-customize-input) .zxm-select-selector .zxm-select-selection-search-input {
  203. height: 24px;
  204. }
  205. ::v-deep .zxm-select-selection-placeholder {
  206. color: #fff !important;
  207. line-height: 22px !important;
  208. }
  209. ::v-deep .zxm-select-single:not(.zxm-select-customize-input) .zxm-select-selector::after {
  210. line-height: 24px;
  211. }
  212. ::v-deep .zxm-select:not(.zxm-select-customize-input) .zxm-select-selector {
  213. background-color: transparent;
  214. border-top: 0px;
  215. border-bottom: 0px;
  216. border-left: 2px solid;
  217. border-right: 2px solid;
  218. border-image: linear-gradient(to bottom, transparent, rgba(49, 184, 255, 1), transparent) 1 1 1;
  219. }
  220. ::v-deep .zxm-select-arrow {
  221. color: #fff !important;
  222. }
  223. ::v-deep .zxm-select-selection-item {
  224. color: #fff !important;
  225. }
  226. ::v-deep .zxm-select-single .zxm-select-selector .zxm-select-selection-item {
  227. line-height: 24px !important;
  228. }
  229. </style>