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

131 lines
3.5 KiB

3 weeks ago
3 weeks ago
  1. <script lang="ts" setup>
  2. // import homeRound from 'assets/images/home/home-round.svg'
  3. import { useHomeStore } from 'stores/homeStore'
  4. import { ref, watchEffect } from 'vue'
  5. import { useFormulaStore } from '@/stores/formulaStore'
  6. const formulaStore = useFormulaStore()
  7. const homeStore = useHomeStore()
  8. const formulaInfo = ref()
  9. const rate = ref()
  10. const log = ref()
  11. watchEffect(async () => {
  12. if (['idle', 'finished'].includes(homeStore.disinfectionState.state)) {
  13. formulaInfo.value = formulaStore.selectedFormulaInfo
  14. rate.value = formulaStore.selectedFormulaInfo?.injection_pump_speed
  15. log.value = formulaStore.selectedFormulaInfo?.loglevel
  16. }
  17. else {
  18. const realForm = (await formulaStore.getRealtimeConfig()).rely
  19. rate.value = homeStore.realRate || realForm?.injection_pump_speed
  20. log.value = homeStore.realLog || realForm?.loglevel
  21. }
  22. })
  23. </script>
  24. <template>
  25. <div class="home-right-title">
  26. <el-descriptions :column="1">
  27. <el-descriptions-item label="配方">
  28. <el-tooltip :content="formulaInfo?.name || '默认'" placement="bottom-start">
  29. <div class="text">
  30. {{ formulaInfo?.name || '默认' }}
  31. </div>
  32. </el-tooltip>
  33. </el-descriptions-item>
  34. <!-- <el-descriptions-item label="设定注射速率"> -->
  35. <!-- <el-tag> -->
  36. <!-- <span style="color: #31cb7a; font-size: 18px; margin: 0 5px">{{ rate }}</span>g/min -->
  37. <!-- </el-tag> -->
  38. <!-- </el-descriptions-item> -->
  39. <el-descriptions-item label="实时注射速率">
  40. <el-tag>
  41. <span style="color: #31cb7a; font-size: 18px; margin: 0 5px">{{
  42. homeStore.disinfectionState.injectedVelocity
  43. }}</span>g/min
  44. </el-tag>
  45. </el-descriptions-item>
  46. <el-descriptions-item label="目标消毒等级">
  47. <el-tag>
  48. <span style="color: #31cb7a; font-size: 18px; margin: 0 5px">{{ log }}</span>Log
  49. </el-tag>
  50. </el-descriptions-item>
  51. <el-descriptions-item label="实时消毒等级">
  52. <el-tag>
  53. <span style="color: #31cb7a; font-size: 18px; margin: 0 5px">{{ homeStore.disinfectionState.nlog }}</span>Log
  54. </el-tag>
  55. </el-descriptions-item>
  56. </el-descriptions>
  57. </div>
  58. </template>
  59. <style lang="scss" scoped>
  60. .home-right-title {
  61. .title-formula {
  62. width: 100%;
  63. display: flex;
  64. align-items: center;
  65. gap: 5px;
  66. padding-left: 10px;
  67. font-size: 1.5rem;
  68. flex-wrap: nowrap;
  69. .name-text {
  70. // 不换行显示省略号
  71. width: 100%;
  72. white-space: nowrap;
  73. overflow: hidden;
  74. text-overflow: ellipsis;
  75. }
  76. }
  77. .title-formula {
  78. flex: 1 1 auto;
  79. min-width: 0;
  80. white-space: normal;
  81. word-break: break-word;
  82. }
  83. .title-spend {
  84. justify-self: end;
  85. display: flex;
  86. align-items: center;
  87. gap: 5px;
  88. padding: 10px;
  89. font-size: 1.5rem;
  90. }
  91. }
  92. :deep(.el-descriptions) {
  93. width: 100%;
  94. .el-descriptions__body {
  95. background: rgba(0, 0, 0, 0);
  96. }
  97. }
  98. :deep(.el-descriptions__cell) {
  99. display: flex;
  100. align-items: center;
  101. background: rgba(255, 255, 255, 0.7);
  102. margin-bottom: 5px;
  103. padding: 5px !important;
  104. .el-descriptions__label {
  105. display: inline-block;
  106. width: 120px;
  107. margin: 0;
  108. font-size: 15px;
  109. font-weight: 600;
  110. color: #606266;
  111. }
  112. .el-descriptions__content {
  113. flex: 1;
  114. text-align: right;
  115. display: flex;
  116. justify-content: flex-end;
  117. }
  118. }
  119. .text {
  120. text-align: right;
  121. width: 150px;
  122. white-space: nowrap;
  123. overflow: hidden;
  124. text-overflow: ellipsis;
  125. }
  126. </style>