瀏覽代碼

fix: 场景、环境参数位置

anxiaoxia 2 周之前
父節點
當前提交
031b63ccb3
共有 1 個文件被更改,包括 63 次插入60 次删除
  1. 63 60
      src/views/envmonitor/taiguv1/index.vue

+ 63 - 60
src/views/envmonitor/taiguv1/index.vue

@@ -48,7 +48,10 @@
                     {{ item.text }}
                 </div>
             </div>
-            <!-- 场景类型 -->
+
+        </div>
+        <!-- 场景类型 -->
+        <div>
             <div class="mode-box">
                 <div
                     v-for="item in modeData"
@@ -64,68 +67,69 @@
                     <span>{{ $t(`mode.${item.chineseName}`) }}</span>
                 </div>
             </div>
-            <!-- 环境参数 -->
-            <div class="env-box">
-                <img
-                    class="box-line"
-                    :src="boxLine"
-                />
-                <div class="env-info">
-                    <div class="item">
-                        <div class="title">{{ $t(`env.温度`) }}</div>
-                        <div class="num-box">
-                            <template v-if="envParams.temperature">
-                                <span>{{ envParams?.temperature }}</span>
-                                <span>℃</span>
-                            </template>
-                            <span v-else>--</span>
-                        </div>
+        </div>
+
+        <!-- 环境参数 -->
+        <div class="env-box">
+            <img
+                class="box-line"
+                :src="boxLine"
+            />
+            <div class="env-info">
+                <div class="item">
+                    <div class="title">{{ $t(`env.温度`) }}</div>
+                    <div class="num-box">
+                        <template v-if="envParams.temperature">
+                            <span>{{ envParams?.temperature }}</span>
+                            <span>℃</span>
+                        </template>
+                        <span v-else>--</span>
                     </div>
-                    <div class="item">
-                        <div class="title">CO₂</div>
-                        <div class="num-box">
-                            <template v-if="envParams.co2">
-                                <span>{{ envParams?.co2?.value }}</span>
-                                <span>{{ $t(`env.${envParams?.co2?.level}`) }}</span>
-                            </template>
-                            <span v-else>--</span>
-                        </div>
+                </div>
+                <div class="item">
+                    <div class="title">CO₂</div>
+                    <div class="num-box">
+                        <template v-if="envParams.co2">
+                            <span>{{ envParams?.co2?.value }}</span>
+                            <span>{{ $t(`env.${envParams?.co2?.level}`) }}</span>
+                        </template>
+                        <span v-else>--</span>
                     </div>
                 </div>
-                <div class="line"></div>
-                <div class="env-info">
-                    <div class="item">
-                        <div class="title">{{ $t(`env.湿度`) }}</div>
-                        <div class="num-box">
-                            <template v-if="envParams.humidity">
-                                <span>{{ envParams?.humidity }}</span>
-                                <span>%</span>
-                            </template>
-                            <span v-else>--</span>
-                        </div>
+            </div>
+            <div class="line"></div>
+            <div class="env-info">
+                <div class="item">
+                    <div class="title">{{ $t(`env.湿度`) }}</div>
+                    <div class="num-box">
+                        <template v-if="envParams.humidity">
+                            <span>{{ envParams?.humidity }}</span>
+                            <span>%</span>
+                        </template>
+                        <span v-else>--</span>
                     </div>
-                    <div class="item">
-                        <div class="title">TVOC</div>
-                        <div class="num-box">
-                            <template v-if="envParams.tvoc">
-                                <span>{{ envParams?.tvoc?.value }}</span>
-                                <span>{{ $t(`env.${envParams?.tvoc?.level}`) }}</span>
-                            </template>
-                            <span v-else>--</span>
-                        </div>
+                </div>
+                <div class="item">
+                    <div class="title">TVOC</div>
+                    <div class="num-box">
+                        <template v-if="envParams.tvoc">
+                            <span>{{ envParams?.tvoc?.value }}</span>
+                            <span>{{ $t(`env.${envParams?.tvoc?.level}`) }}</span>
+                        </template>
+                        <span v-else>--</span>
                     </div>
                 </div>
-                <div class="line"></div>
-                <div class="env-info">
-                    <div class="item">
-                        <div class="title">PM 2.5</div>
-                        <div class="num-box">
-                            <template v-if="envParams.pm25">
-                                <span>{{ envParams?.pm25?.value }}</span>
-                                <span>{{ $t(`env.${envParams?.pm25?.level}`) }}</span>
-                            </template>
-                            <span v-else>--</span>
-                        </div>
+            </div>
+            <div class="line"></div>
+            <div class="env-info">
+                <div class="item">
+                    <div class="title">PM 2.5</div>
+                    <div class="num-box">
+                        <template v-if="envParams.pm25">
+                            <span>{{ envParams?.pm25?.value }}</span>
+                            <span>{{ $t(`env.${envParams?.pm25?.level}`) }}</span>
+                        </template>
+                        <span v-else>--</span>
                     </div>
                 </div>
             </div>
@@ -561,7 +565,7 @@ onUnmounted(() => {
 const updateAirStatus = data => {
     let { runStatus, gear, tempSet, maxTempSet, minTempSet, isAutoGear, equipList = [] } = data || {}
     airStatus.value = {
-        runStatus,
+        runStatus:equipList.find(item => item.runStatus == 1)? 1 : 0,
         gear: gear || 0,
         tempSet,
         maxTempSet,
@@ -576,7 +580,6 @@ const updateAirStatus = data => {
     //       lastSwitchStatus: runStatus == 1
     //     }
     //   })
-    // console.log(airStatus.value, '  airStatus.value ')
     // airIsOpen.value = isOpen
     airEquipList.value = equipList
 }
@@ -1013,7 +1016,7 @@ onUnmounted(() => {
     height: 100%;
     border-radius: 24px 0px 0px 24px;
     backdrop-filter: blur(30px);
-    background: rgba(255, 255, 255, 0.95);
+    background: rgba(255, 255, 255, 0.85);
     padding: 40px 90px;
 }
 </style>