Browse Source

优化空调控制页数据

dev_230517
zhangzhiyi 2 years ago
parent
commit
f338ec7c21
  1. BIN
      public/assets/imgs/device-detail/normal-mode/wind0_shutdown@2x.png
  2. BIN
      public/assets/imgs/device-detail/normal-mode/wind1_shutdown@2x.png
  3. BIN
      public/assets/imgs/device-detail/normal-mode/wind2_shutdown@2x.png
  4. BIN
      public/assets/imgs/device-detail/normal-mode/wind3_shutdown@2x.png
  5. BIN
      public/assets/imgs/device-detail/normal-mode/wind4_shutdown@2x.png
  6. BIN
      public/assets/imgs/device-detail/normal-mode/wind5_shutdown@2x.png
  7. BIN
      public/assets/imgs/device-detail/normal-mode/wind6_shutdown@2x.png
  8. BIN
      public/assets/imgs/home-screen/WIFI@2x.png
  9. BIN
      public/assets/imgs/home-screen/snow@2x.png
  10. BIN
      public/assets/imgs/show/bg_kqhz.png
  11. BIN
      public/assets/imgs/show/bg_xfhqj.png
  12. BIN
      public/assets/imgs/show/icon_kqhz.png
  13. BIN
      public/assets/imgs/show/icon_xfhqj.png
  14. BIN
      src/assets/imgs/device-detail/normal-mode/wind0_shutdown@2x.png
  15. BIN
      src/assets/imgs/device-detail/normal-mode/wind1_shutdown@2x.png
  16. BIN
      src/assets/imgs/device-detail/normal-mode/wind2_shutdown@2x.png
  17. BIN
      src/assets/imgs/device-detail/normal-mode/wind3_shutdown@2x.png
  18. BIN
      src/assets/imgs/device-detail/normal-mode/wind4_shutdown@2x.png
  19. BIN
      src/assets/imgs/device-detail/normal-mode/wind5_shutdown@2x.png
  20. BIN
      src/assets/imgs/device-detail/normal-mode/wind6_shutdown@2x.png
  21. BIN
      src/assets/imgs/home-screen/WIFI@2x.png
  22. BIN
      src/assets/imgs/home-screen/snow@2x.png
  23. 17
      src/view/device-detail/device-detail.vue
  24. 9
      src/view/device-detail/mode/wind-dire-dic.ts
  25. 4
      src/view/tabs/device-control.vue
  26. 42
      src/view/tabs/home-screen.vue

BIN
public/assets/imgs/device-detail/normal-mode/wind0_shutdown@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
public/assets/imgs/device-detail/normal-mode/wind1_shutdown@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
public/assets/imgs/device-detail/normal-mode/wind2_shutdown@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
public/assets/imgs/device-detail/normal-mode/wind3_shutdown@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
public/assets/imgs/device-detail/normal-mode/wind4_shutdown@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
public/assets/imgs/device-detail/normal-mode/wind5_shutdown@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
public/assets/imgs/device-detail/normal-mode/wind6_shutdown@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
public/assets/imgs/home-screen/WIFI@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
public/assets/imgs/home-screen/snow@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

BIN
public/assets/imgs/show/bg_kqhz.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

BIN
public/assets/imgs/show/bg_xfhqj.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

BIN
public/assets/imgs/show/icon_kqhz.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 KiB

BIN
public/assets/imgs/show/icon_xfhqj.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

BIN
src/assets/imgs/device-detail/normal-mode/wind0_shutdown@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
src/assets/imgs/device-detail/normal-mode/wind1_shutdown@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
src/assets/imgs/device-detail/normal-mode/wind2_shutdown@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
src/assets/imgs/device-detail/normal-mode/wind3_shutdown@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
src/assets/imgs/device-detail/normal-mode/wind4_shutdown@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
src/assets/imgs/device-detail/normal-mode/wind5_shutdown@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
src/assets/imgs/device-detail/normal-mode/wind6_shutdown@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
src/assets/imgs/home-screen/WIFI@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src/assets/imgs/home-screen/snow@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

17
src/view/device-detail/device-detail.vue

@ -26,7 +26,7 @@
</div> </div>
<!-- 清洁度 --> <!-- 清洁度 -->
<div class="cleanliness" v-show="activeTab === 0"> <div class="cleanliness" v-show="false && activeTab === 0">
<div class="cleanliness-text">清洁度</div> <div class="cleanliness-text">清洁度</div>
<div class="cleanliness-container"> <div class="cleanliness-container">
<div class="cleanliness-progress" ref="cleanlinessProgress"></div> <div class="cleanliness-progress" ref="cleanlinessProgress"></div>
@ -64,7 +64,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, onBeforeMount, onMounted, onActivated } from 'vue'; import { ref, onBeforeMount, onMounted, onActivated, nextTick } from 'vue';
import { useRouter, onBeforeRouteUpdate } from "vue-router"; import { useRouter, onBeforeRouteUpdate } from "vue-router";
import NormalMode from './mode/normal.vue'; import NormalMode from './mode/normal.vue';
import SmartMode from './mode/smart.vue'; import SmartMode from './mode/smart.vue';
@ -112,18 +112,26 @@ const showWindDire = ref(true);
const deviceType = ref(); const deviceType = ref();
onActivated(() => { onActivated(() => {
// dom v-if
activeTab.value = activeTab.value === 0? 1: 0;
// //
const query: any = router.currentRoute.value.query; const query: any = router.currentRoute.value.query;
titelName.value = query.name; titelName.value = query.name;
ifRun.value = query.openFlg === 'true'? true: false; ifRun.value = query.openFlg === 'true'? true: false;
activeTab.value = parseInt(query.setMode);
smartMode.value = parseInt(query.smartMode);
deviceType.value = query.deviceType; deviceType.value = query.deviceType;
if (query.deviceType === '4E') { if (query.deviceType === '4E') {
showTabs.value = false; showTabs.value = false;
showWind.value = false; showWind.value = false;
showWindDire.value = false; showWindDire.value = false;
} else {
showTabs.value = true;
showWind.value = true;
showWindDire.value = true;
} }
nextTick(() => {
activeTab.value = parseInt(query.setMode);
smartMode.value = parseInt(query.smartMode);
})
}) })
onMounted(() => { onMounted(() => {
@ -131,7 +139,6 @@ onMounted(() => {
cleanlinessProgress.value.style.background = (cleanliness.value < 100 / 2)? '#D65659': '#278958'; cleanlinessProgress.value.style.background = (cleanliness.value < 100 / 2)? '#D65659': '#278958';
cleanlinessProgress.value.style.width = `${cleanliness.value}%`; cleanlinessProgress.value.style.width = `${cleanliness.value}%`;
} }
if (cleanlinessReminder.value) { if (cleanlinessReminder.value) {
let cleanlinessReminderColor = ''; let cleanlinessReminderColor = '';
if (isClean.value === 0 && (cleanliness.value < 100 / 2)) { if (isClean.value === 0 && (cleanliness.value < 100 / 2)) {

9
src/view/device-detail/mode/wind-dire-dic.ts

@ -0,0 +1,9 @@
/**
*
*/
const WindDireOptions = [
{}
];
export {};

4
src/view/tabs/device-control.vue

@ -119,9 +119,9 @@ onMounted(() => {
openFlg: true, openFlg: true,
deviceType: '02', deviceType: '02',
self_clean: 0, self_clean: 0,
statusArr: ['25', '68'], statusArr: ['23', '56'],
unitArr: ['℃', '%'], unitArr: ['℃', '%'],
airQuality: '', airQuality: '',
setMode: 0, setMode: 0,
smartMode: SmartModeEnum.COLD, smartMode: SmartModeEnum.COLD,
} }

42
src/view/tabs/home-screen.vue

@ -1,5 +1,16 @@
<template> <template>
<div id="home-screen-wrapper"> <div id="home-screen-wrapper">
<div class="nav-top">
<div class="wifi-icon">
<img src="@/assets/imgs/home-screen/WIFI@2x.png" alt="">
</div>
<div class="weather">雪天</div>
<div class="temp">-26</div>
</div>
<div class="content">
<div class="content-left"></div>
<div class="content-right"></div>
</div>
<div class="ceshi"> <div class="ceshi">
<img id="imgs" src="" width="100%"> <img id="imgs" src="" width="100%">
</div> </div>
@ -7,7 +18,6 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { time } from 'console';
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
const aniImgs: any = ref([]); const aniImgs: any = ref([]);
@ -51,7 +61,35 @@ const change = () => {
#home-screen-wrapper { #home-screen-wrapper {
width: 100vh; width: 100vh;
height: 100vh; height: 100vh;
background: rgb(15, 188, 102); background: url('@/assets/imgs/home-screen/snow@2x.png') no-repeat;
background-size: 100% 100%;
overflow: hidden;
.nav-top {
display: flex;
align-items: center;
color: #FFF;
margin-top: 12px;
.wifi-icon {
margin-left: 24px;
img {
width: 28px;
height: 28px;
}
}
.weather {
font-size: 24px;
margin-left: 16px;
}
.temp {
font-size: 26px;
margin-left: 16px;
}
}
.ceshi { .ceshi {
width: 100vw; width: 100vw;

Loading…
Cancel
Save