管道式消毒机
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

184 lines
4.6 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="environment_container">
  3. <div class="top_title">
  4. <svg
  5. xmlns="http://www.w3.org/2000/svg"
  6. xmlns:xlink="http://www.w3.org/1999/xlink"
  7. fill="none"
  8. version="1.1"
  9. width="27.99883270263672"
  10. height="28"
  11. viewBox="0 0 27.99883270263672 28"
  12. >
  13. <g>
  14. <path
  15. d="M13.9988,0C6.26685,0,0,6.26801,0,14.0006C0,21.732,6.26685,28,13.9988,28C21.732,28,27.9988,21.7314,27.9988,14.0006C27.9988,6.26685,21.732,0,13.9988,0ZM13.33,2.65902L15.1101,2.65902L15.1101,6.15218L13.33,6.15218L13.33,2.65902ZM8.00499,9.19305L5.53515,6.72263L6.79364,5.46414L9.26348,7.93456L8.00499,9.19305ZM8.88395,3.93963L10.494,3.18872L11.9708,6.35358L10.359,7.10565L8.88395,3.93963ZM14.2439,24.2036C12.6961,24.2036,11.4428,22.9486,11.4428,21.4025C11.4428,20.1929,12.2083,19.1673,13.2823,18.7744L13.2823,10.7833L15.0606,10.7833L15.0606,18.722C16.2085,19.0706,17.0455,20.1382,17.0455,21.4031C17.0455,22.9486,15.7917,24.2036,14.2439,24.2036ZM16.3295,6.35009L17.8063,3.18407L19.4182,3.93672L17.9431,7.10274L16.3295,6.35009ZM20.2412,9.19305L18.9827,7.93456L21.4526,5.46414L22.7111,6.72263L20.2412,9.19305Z"
  16. fill="#FFFFFF"
  17. fill-opacity="1"
  18. />
  19. </g>
  20. </svg>
  21. <p class="title">{{ getTitle() }}</p>
  22. </div>
  23. <div class="content">
  24. <div class="line">
  25. <p class="title">{{ props.cardType == 1 ? '仓内' : '环境' }}温度</p>
  26. <p class="num">{{ getTemperature() }}</p>
  27. </div>
  28. <div class="line">
  29. <p class="title">{{ props.cardType == 1 ? '仓内' : '环境' }}湿度</p>
  30. <p class="num">{{ getHumidity() }} {{ '%RH' }}</p>
  31. </div>
  32. <div class="line">
  33. <p class="title">
  34. {{ props.cardType == 1 ? '仓内' : '环境' }}过氧化氢浓度
  35. </p>
  36. <p class="num">{{ getHP() }} PPM</p>
  37. </div>
  38. <div class="line">
  39. <p class="title">
  40. {{ props.cardType == 1 ? '仓内' : '环境' }}过氧化氢相对饱和度
  41. </p>
  42. <p class="num">{{ getSaturation() }} {{ '%RS' }}</p>
  43. </div>
  44. </div>
  45. </div>
  46. </template>
  47. <script setup>
  48. import { useDeviceStore } from '@/store'
  49. import { storeToRefs } from 'pinia'
  50. const deviceStore = useDeviceStore()
  51. const {
  52. binTemperature,
  53. binHumidity,
  54. binHP,
  55. binSaturation,
  56. envirTemperature1,
  57. envirHumidity1,
  58. envirHP1,
  59. envirTemperature2,
  60. envirHumidity2,
  61. envirHP2,
  62. } = storeToRefs(deviceStore)
  63. const props = defineProps({
  64. cardType: {
  65. type: Number,
  66. },
  67. })
  68. const getTitle = () => {
  69. if (props.cardType == 1) {
  70. return '仓内'
  71. }
  72. if (props.cardType == 2) {
  73. return '环境1'
  74. }
  75. if (props.cardType == 3) {
  76. return '环境2'
  77. }
  78. return ''
  79. }
  80. const getTemperature = () => {
  81. if (props.cardType == 1) {
  82. return binTemperature
  83. }
  84. if (props.cardType == 2) {
  85. return envirTemperature1
  86. }
  87. if (props.cardType == 3) {
  88. return envirTemperature2
  89. }
  90. }
  91. const getHumidity = () => {
  92. if (props.cardType == 1) {
  93. return binHumidity
  94. }
  95. if (props.cardType == 2) {
  96. return envirHumidity1
  97. }
  98. if (props.cardType == 3) {
  99. return envirHumidity2
  100. }
  101. }
  102. const getHP = () => {
  103. if (props.cardType == 1) {
  104. return binHP
  105. }
  106. if (props.cardType == 2) {
  107. return envirHP1
  108. }
  109. if (props.cardType == 3) {
  110. return envirHP2
  111. }
  112. }
  113. const getSaturation = () => {
  114. if (props.cardType == 1) {
  115. return binSaturation
  116. }
  117. if (props.cardType == 2) {
  118. return 0
  119. }
  120. if (props.cardType == 3) {
  121. return 0
  122. }
  123. }
  124. </script>
  125. <style lang="scss" scoped>
  126. .environment_container {
  127. width: 353px;
  128. height: 225px;
  129. box-sizing: border-box;
  130. overflow: hidden;
  131. border-radius: 17.5px;
  132. .top_title {
  133. padding: 15px 16px;
  134. display: flex;
  135. align-items: center;
  136. .title {
  137. font-family: Source Han Sans CN;
  138. font-size: 24px;
  139. font-weight: 500;
  140. letter-spacing: 0.1em;
  141. margin-left: 8px;
  142. color: #ffffff;
  143. }
  144. }
  145. .content {
  146. display: grid;
  147. grid-template-rows: repeat(4, 1fr);
  148. .line {
  149. padding: 11px 26px;
  150. width: 353px;
  151. // height: 56px;
  152. box-sizing: border-box;
  153. display: flex;
  154. align-items: center;
  155. justify-content: space-between;
  156. &:nth-child(odd) {
  157. background: #1f6397;
  158. }
  159. .title {
  160. font-family: Source Han Sans CN;
  161. font-size: 16px;
  162. font-weight: normal;
  163. letter-spacing: 0.06em;
  164. color: #ffffff;
  165. }
  166. .num {
  167. font-family: Source Han Sans CN;
  168. font-size: 20px;
  169. font-weight: bold;
  170. letter-spacing: 0.06em;
  171. color: #ffffff;
  172. }
  173. }
  174. }
  175. }
  176. </style>