|
|
|
@ -9,7 +9,7 @@
@@ -9,7 +9,7 @@
|
|
|
|
|
<div class="set-container"> |
|
|
|
|
<div class="current-value">{{ currentOptions.value }}</div> |
|
|
|
|
<div class="current-unit">{{ currentOptions.unit }}</div> |
|
|
|
|
<div class="treat"> |
|
|
|
|
<div class="treat" v-if="props.deviceType !== '4E'"> |
|
|
|
|
<span>{{ treatOptions.value }}{{ treatOptions.unit }}</span> |
|
|
|
|
<img src="@/assets/imgs/device-detail/normal-mode/switch_btn@2x.png" width="100%" @click="switchTempHumi()"> |
|
|
|
|
</div> |
|
|
|
@ -18,26 +18,59 @@
@@ -18,26 +18,59 @@
|
|
|
|
|
<img src="@/assets/imgs/device-detail/normal-mode/set-add@2x.png" width="100%"> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- 滤网未复位提示 --> |
|
|
|
|
<div class="filter-screen-prompt"> |
|
|
|
|
<div class="filter-screen-prompt" v-if="false"> |
|
|
|
|
<img src="@/assets/imgs/device-detail/normal-mode/filter_fault@2x.png" width="100%" class="filter-screen-prompt-img"> |
|
|
|
|
<span>滤网未复位</span> |
|
|
|
|
<img src="@/assets/imgs/device-detail/normal-mode/right@2x.png" width="100%"> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- 水模块 --> |
|
|
|
|
<div class="water-module-wrapper" v-if="props.deviceType === '4E'"> |
|
|
|
|
<!-- 出水温度 --> |
|
|
|
|
<div class="water-module-container outlet-water"> |
|
|
|
|
<div class="water-module-top">28℃</div> |
|
|
|
|
<div class="water-module-btm">出水温度</div> |
|
|
|
|
</div> |
|
|
|
|
<!-- 回水温度 --> |
|
|
|
|
<div class="water-module-container return-water"> |
|
|
|
|
<div class="water-module-top">24℃</div> |
|
|
|
|
<div class="water-module-btm">回水温度</div> |
|
|
|
|
</div> |
|
|
|
|
<!-- 水泵状态 --> |
|
|
|
|
<div class="water-module-container water-pump"> |
|
|
|
|
<div class="water-module-top">关闭</div> |
|
|
|
|
<div class="water-module-btm">水泵状态</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- 模式、风量、风向、开关 --> |
|
|
|
|
<div class="setting-control"> |
|
|
|
|
<div class="setting-control-container" v-if="props.showMode"> |
|
|
|
|
<div class="circle-card mode" @click="openModePop()"> |
|
|
|
|
<img :src="getImgSrc(modeImg)"> |
|
|
|
|
</div> |
|
|
|
|
<span>{{ modeName }}</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="setting-control-container" v-if="props.showWind"> |
|
|
|
|
<div class="circle-card wind" @click="openWindPop()"> |
|
|
|
|
<img :src="getImgSrc(windImg)"> |
|
|
|
|
</div> |
|
|
|
|
<span>{{ windName }}</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="setting-control-container" v-if="props.showWindDire"> |
|
|
|
|
<div class="circle-card wind-dire"> |
|
|
|
|
<img :src="getImgSrc(windDireImg)"> |
|
|
|
|
</div> |
|
|
|
|
<span>风向</span> |
|
|
|
|
</div> |
|
|
|
|
<div class="setting-control-container"> |
|
|
|
|
<div class="circle-card switch" @click="changeSwitch()"> |
|
|
|
|
<img :src="getImgSrc(onOffImg)"> |
|
|
|
|
</div> |
|
|
|
|
<span>开关</span> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- 模式切换弹窗 --> |
|
|
|
@ -59,7 +92,7 @@
@@ -59,7 +92,7 @@
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script lang="ts" setup> |
|
|
|
|
import { ref, onBeforeMount, onMounted } from 'vue'; |
|
|
|
|
import { ref, toRefs, onBeforeMount, onMounted, nextTick } from 'vue'; |
|
|
|
|
import { ModeOptions } from './mode-dic'; |
|
|
|
|
import { WindOptions } from './wind-dic'; |
|
|
|
|
import { Mode } from './enmu/mode.enmu'; |
|
|
|
@ -67,8 +100,22 @@ import { Wind } from './enmu/wind.enmu';
@@ -67,8 +100,22 @@ import { Wind } from './enmu/wind.enmu';
|
|
|
|
|
import ModeChangePop from '@/components/mode-change.vue'; |
|
|
|
|
import WindChangePop from '@/components/wind-change.vue'; |
|
|
|
|
import { $commonService } from '@/services/framework/dependency-injection-service'; |
|
|
|
|
const getImgSrc = $commonService.$imgService.getImgSrc; |
|
|
|
|
|
|
|
|
|
const getImgSrc = $commonService.$imgService.getImgSrc; |
|
|
|
|
/** 传参 */ |
|
|
|
|
const props = defineProps<{ |
|
|
|
|
/** 开关机状态 */ |
|
|
|
|
ifRun: boolean; |
|
|
|
|
/** 是否显示模式 */ |
|
|
|
|
showMode: boolean; |
|
|
|
|
/** 风量是否显示 */ |
|
|
|
|
showWind: boolean; |
|
|
|
|
/** 风向是否显示 */ |
|
|
|
|
showWindDire: boolean; |
|
|
|
|
/** 设备类型 */ |
|
|
|
|
deviceType: string; |
|
|
|
|
}>() |
|
|
|
|
const { ifRun } = toRefs(props); |
|
|
|
|
/** 温度配置 */ |
|
|
|
|
const tempOptions = ref({ |
|
|
|
|
titleName: '室内', |
|
|
|
@ -97,6 +144,8 @@ const modeOptions: any = ModeOptions;
@@ -97,6 +144,8 @@ const modeOptions: any = ModeOptions;
|
|
|
|
|
const windOptions: any = WindOptions; |
|
|
|
|
/** 当前选中的模式 */ |
|
|
|
|
const mode = ref(Mode.COLD); |
|
|
|
|
/** 当前选中的模式名称 */ |
|
|
|
|
const modeName = ref(''); |
|
|
|
|
/** 模式展示的图片 */ |
|
|
|
|
const modeImg = ref(''); |
|
|
|
|
/** 可设定的模式数组 */ |
|
|
|
@ -105,11 +154,13 @@ const modeList = ref<any[]>([]);
@@ -105,11 +154,13 @@ const modeList = ref<any[]>([]);
|
|
|
|
|
* 开关 |
|
|
|
|
* true:开 false:关 |
|
|
|
|
*/ |
|
|
|
|
const onOff = ref(false); |
|
|
|
|
const onOff = ref(ifRun); |
|
|
|
|
/** 开关图片 */ |
|
|
|
|
const onOffImg = ref(''); |
|
|
|
|
/** 当前选中的风量 */ |
|
|
|
|
const wind = ref(Wind.AUTO); |
|
|
|
|
/** 当前选中的风量名称 */ |
|
|
|
|
const windName = ref(''); |
|
|
|
|
/** 风量展示的图片 */ |
|
|
|
|
const windImg = ref(''); |
|
|
|
|
/** 当前风量字典数据 */ |
|
|
|
@ -125,7 +176,7 @@ const showModePop = ref(false);
@@ -125,7 +176,7 @@ const showModePop = ref(false);
|
|
|
|
|
/** 风量更改弹窗是否开启 */ |
|
|
|
|
const showWindPop = ref(false); |
|
|
|
|
/** 向父组件传递事件 */ |
|
|
|
|
const emit = defineEmits(['changeBg']); |
|
|
|
|
const emit = defineEmits(['changeBg', 'changeSwitch']); |
|
|
|
|
|
|
|
|
|
onBeforeMount(() => { |
|
|
|
|
currentOptions.value = {...tempOptions.value}; |
|
|
|
@ -136,8 +187,6 @@ onBeforeMount(() => {
@@ -136,8 +187,6 @@ onBeforeMount(() => {
|
|
|
|
|
modeList.value.push(modeOptions.find((item1: any) => item1.mode === item)); |
|
|
|
|
}) |
|
|
|
|
settableWind.value = [Wind.AUTO, Wind.SUPER_LOW, Wind.LOW, Wind.MIDDLE, Wind.HIGH, Wind.SUPER_HIGH]; |
|
|
|
|
|
|
|
|
|
console.log(settableWind.value) |
|
|
|
|
getShowImg(); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
@ -157,6 +206,9 @@ const getShowImg = () => {
@@ -157,6 +206,9 @@ const getShowImg = () => {
|
|
|
|
|
const modeData = modeOptions.find((item: any) => item.mode === mode.value); |
|
|
|
|
// 获取风量字典配置数据 |
|
|
|
|
getWindDic(); |
|
|
|
|
// 展示模式的文字 |
|
|
|
|
modeName.value = modeData.modeName; |
|
|
|
|
windName.value = windData.value[`wind${wind.value}Name`]; |
|
|
|
|
if (onOff.value) { |
|
|
|
|
// 开机展示模式图片 |
|
|
|
|
modeImg.value = modeData.modeImg; |
|
|
|
@ -267,8 +319,10 @@ const closeWindPop = (params: any) => {
@@ -267,8 +319,10 @@ const closeWindPop = (params: any) => {
|
|
|
|
|
|
|
|
|
|
/** 开关切换 */ |
|
|
|
|
const changeSwitch = () => { |
|
|
|
|
onOff.value = !onOff.value; |
|
|
|
|
emit('changeSwitch', !onOff.value); |
|
|
|
|
nextTick(() => { |
|
|
|
|
getShowImg(); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
@ -351,12 +405,51 @@ const changeSwitch = () => {
@@ -351,12 +405,51 @@ const changeSwitch = () => {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 水模块 |
|
|
|
|
.water-module-wrapper { |
|
|
|
|
padding: 0 134px; |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
justify-content: space-between; |
|
|
|
|
color: #FFF; |
|
|
|
|
|
|
|
|
|
.water-module-container { |
|
|
|
|
display: flex; |
|
|
|
|
flex-direction: column; |
|
|
|
|
align-items: center; |
|
|
|
|
|
|
|
|
|
.water-module-top { |
|
|
|
|
font-size: 40px; |
|
|
|
|
font-family: Roboto-Regular, Roboto, SourceHanSansCN-Regular, SourceHanSansCN; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.water-module-btm { |
|
|
|
|
margin-top: 16px; |
|
|
|
|
font-size: 20px; |
|
|
|
|
font-family: SourceHanSansCN-Regular, SourceHanSansCN; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.setting-control { |
|
|
|
|
margin-top: 43px; |
|
|
|
|
padding: 0 64px; |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: space-between; |
|
|
|
|
|
|
|
|
|
.setting-control-container { |
|
|
|
|
display: flex; |
|
|
|
|
flex-direction: column; |
|
|
|
|
align-items: center; |
|
|
|
|
|
|
|
|
|
span { |
|
|
|
|
color: #FFF; |
|
|
|
|
font-size: 28px; |
|
|
|
|
font-weight: 400; |
|
|
|
|
margin-top: 20px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.circle-card { |
|
|
|
|
width: 110px; |
|
|
|
|
height: 110px; |
|
|
|
|