大空间消毒机
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.

201 lines
4.8 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
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">温度</p>
  26. <div class="num">
  27. {{ getTemperature() }}
  28. <p class="unit">°C</p>
  29. </div>
  30. </div>
  31. <div class="line">
  32. <p class="title">相对湿度</p>
  33. <div class="num">
  34. {{ getHumidity() }}
  35. <p class="unit">{{ '%RH' }}</p>
  36. </div>
  37. </div>
  38. <div class="line">
  39. <p class="title">相对饱和度</p>
  40. <div class="num">
  41. {{ getSaturation() }}
  42. <p class="unit">{{ '%RS' }}</p>
  43. </div>
  44. </div>
  45. <div class="line">
  46. <p class="title">汽化过氧化氢浓度</p>
  47. <div class="num">
  48. {{ getHP() }}
  49. <p class="unit">ppm</p>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. </template>
  55. <script setup>
  56. import { useDeviceStore } from '@/store'
  57. import { storeToRefs } from 'pinia'
  58. const deviceStore = useDeviceStore()
  59. const {
  60. binTemperature,
  61. binHumidity,
  62. binHP,
  63. binSaturation,
  64. envirTemperature1,
  65. envirHumidity1,
  66. envirHP1,
  67. envirTemperature2,
  68. envirHumidity2,
  69. envirHP2,
  70. } = storeToRefs(deviceStore)
  71. const props = defineProps({
  72. cardType: {
  73. type: Number,
  74. },
  75. })
  76. const getTitle = () => {
  77. if (props.cardType == 1) {
  78. return '仓内'
  79. }
  80. if (props.cardType == 2) {
  81. return '环境1'
  82. }
  83. if (props.cardType == 3) {
  84. return '环境2'
  85. }
  86. return ''
  87. }
  88. const getTemperature = () => {
  89. if (props.cardType == 1) {
  90. return binTemperature
  91. }
  92. if (props.cardType == 2) {
  93. return envirTemperature1
  94. }
  95. if (props.cardType == 3) {
  96. return envirTemperature2
  97. }
  98. }
  99. const getHumidity = () => {
  100. if (props.cardType == 1) {
  101. return binHumidity
  102. }
  103. if (props.cardType == 2) {
  104. return envirHumidity1
  105. }
  106. if (props.cardType == 3) {
  107. return envirHumidity2
  108. }
  109. }
  110. const getHP = () => {
  111. if (props.cardType == 1) {
  112. return binHP
  113. }
  114. if (props.cardType == 2) {
  115. return envirHP1
  116. }
  117. if (props.cardType == 3) {
  118. return envirHP2
  119. }
  120. }
  121. const getSaturation = () => {
  122. if (props.cardType == 1) {
  123. return binSaturation
  124. }
  125. if (props.cardType == 2) {
  126. return 0
  127. }
  128. if (props.cardType == 3) {
  129. return 0
  130. }
  131. }
  132. </script>
  133. <style lang="scss" scoped>
  134. .environment_container {
  135. width: 353px;
  136. height: 225px;
  137. box-sizing: border-box;
  138. overflow: hidden;
  139. border-radius: 17.5px;
  140. .top_title {
  141. padding: 15px 16px;
  142. display: flex;
  143. align-items: center;
  144. .title {
  145. font-family: Source Han Sans CN;
  146. font-size: 24px;
  147. font-weight: 500;
  148. letter-spacing: 0.1em;
  149. margin-left: 8px;
  150. color: #ffffff;
  151. }
  152. }
  153. .content {
  154. display: grid;
  155. grid-template-rows: repeat(4, 1fr);
  156. .line {
  157. padding: 11px 13px 11px 26px;
  158. width: 353px;
  159. // height: 56px;
  160. box-sizing: border-box;
  161. display: flex;
  162. align-items: center;
  163. justify-content: space-between;
  164. &:nth-child(odd) {
  165. background: #1f6397;
  166. }
  167. .title {
  168. font-family: Source Han Sans CN;
  169. font-size: 16px;
  170. font-weight: normal;
  171. letter-spacing: 0.06em;
  172. color: #ffffff;
  173. }
  174. .num {
  175. font-family: Source Han Sans CN;
  176. font-size: 20px;
  177. font-weight: bold;
  178. letter-spacing: 0.06em;
  179. color: #ffffff;
  180. display: flex;
  181. align-items: center;
  182. .unit {
  183. width: 60px;
  184. margin-left: 6px;
  185. display: flex;
  186. align-items: center;
  187. justify-content: center;
  188. }
  189. }
  190. }
  191. }
  192. }
  193. </style>