消毒机设备
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.

111 lines
2.3 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
  1. <script lang="ts" setup>
  2. import homeInside from 'assets/images/home/home-inside.svg'
  3. import homeProbe1 from 'assets/images/home/home-probe1.svg'
  4. import homeProbe2 from 'assets/images/home/home-probe2.svg'
  5. import { roundNumber } from 'libs/utils'
  6. import { onMounted } from 'vue'
  7. defineProps({
  8. envParams: {
  9. type: Object,
  10. default: () => {},
  11. },
  12. lineColor: {
  13. type: String,
  14. default: 'red',
  15. },
  16. })
  17. const imgs: Record<string, any> = {
  18. inside: homeInside,
  19. env1: homeProbe1,
  20. env2: homeProbe2,
  21. }
  22. onMounted(() => {
  23. })
  24. </script>
  25. <template>
  26. <div class="title">
  27. <img :src="imgs[envParams.type]"> {{ envParams.title }}
  28. </div>
  29. <div class="env-row odd">
  30. <div class="env-row-label ">
  31. 温度
  32. </div>
  33. <div class="env-row-value ">
  34. {{ roundNumber(envParams.temp || 0, 2) }}°C
  35. </div>
  36. </div>
  37. <div class="env-row">
  38. <div class="env-row-label ">
  39. 相对湿度
  40. </div>
  41. <div class="env-row-value">
  42. {{ roundNumber(envParams.rh || 0, 2) }}%RH
  43. </div>
  44. </div>
  45. <div class="env-row odd">
  46. <div class="env-row-label ">
  47. 相对饱和度
  48. </div>
  49. <div class="env-row-value ">
  50. {{ roundNumber(envParams.rs || 0, 2) }}%RS
  51. </div>
  52. </div>
  53. <div class="env-row">
  54. <div class="env-row-label ">
  55. 汽化过氧化氢
  56. </div>
  57. <div class="env-row-value ">
  58. {{ roundNumber(envParams.h2o2 || 0, 2) }}ppm
  59. </div>
  60. </div>
  61. </template>
  62. <style lang="scss" scoped>
  63. div{
  64. font-family: 思源黑体;
  65. font-size: 18px;
  66. font-weight: normal;
  67. line-height: normal;
  68. letter-spacing: 0.06em;
  69. }
  70. .title{
  71. display: flex;
  72. align-items: center;
  73. gap: 10px;
  74. font-size: 26px;
  75. padding: 1rem;
  76. }
  77. .title-line{
  78. height: 1vw;
  79. position: absolute;
  80. width: 100%;
  81. border-radius: 10px 10px 0 0;
  82. margin: -2.12rem;
  83. }
  84. .env-row{
  85. display: grid;
  86. grid-template-columns: repeat(2, 1fr);
  87. height: 7.8vh;
  88. padding: 7px;
  89. .env-row-label{
  90. display: flex;
  91. align-items: center;
  92. justify-self: start;
  93. justify-content: center;
  94. padding-left: 10px;
  95. }
  96. .env-row-value{
  97. display: flex;
  98. align-items: center;
  99. justify-self: end;
  100. justify-content: center;
  101. padding-right: 10px;
  102. }
  103. }
  104. .odd {
  105. background: rgba(139, 190, 239, 0.2);
  106. }
  107. </style>