|
|
@ -9,7 +9,7 @@ |
|
|
|
<div class="set-container"> |
|
|
|
<div class="set-container"> |
|
|
|
<div class="current-value">{{ currentOptions.value }}</div> |
|
|
|
<div class="current-value">{{ currentOptions.value }}</div> |
|
|
|
<div class="current-unit">{{ currentOptions.unit }}</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> |
|
|
|
<span>{{ treatOptions.value }}{{ treatOptions.unit }}</span> |
|
|
|
<img src="@/assets/imgs/device-detail/normal-mode/switch_btn@2x.png" width="100%" @click="switchTempHumi()"> |
|
|
|
<img src="@/assets/imgs/device-detail/normal-mode/switch_btn@2x.png" width="100%" @click="switchTempHumi()"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -18,25 +18,58 @@ |
|
|
|
<img src="@/assets/imgs/device-detail/normal-mode/set-add@2x.png" width="100%"> |
|
|
|
<img src="@/assets/imgs/device-detail/normal-mode/set-add@2x.png" width="100%"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</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"> |
|
|
|
<img src="@/assets/imgs/device-detail/normal-mode/filter_fault@2x.png" width="100%" class="filter-screen-prompt-img"> |
|
|
|
<span>滤网未复位</span> |
|
|
|
<span>滤网未复位</span> |
|
|
|
<img src="@/assets/imgs/device-detail/normal-mode/right@2x.png" width="100%"> |
|
|
|
<img src="@/assets/imgs/device-detail/normal-mode/right@2x.png" width="100%"> |
|
|
|
</div> |
|
|
|
</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"> |
|
|
|
<div class="circle-card mode" @click="openModePop()"> |
|
|
|
<div class="setting-control-container" v-if="props.showMode"> |
|
|
|
<img :src="getImgSrc(modeImg)"> |
|
|
|
<div class="circle-card mode" @click="openModePop()"> |
|
|
|
|
|
|
|
<img :src="getImgSrc(modeImg)"> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<span>{{ modeName }}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="circle-card wind" @click="openWindPop()"> |
|
|
|
<div class="setting-control-container" v-if="props.showWind"> |
|
|
|
<img :src="getImgSrc(windImg)"> |
|
|
|
<div class="circle-card wind" @click="openWindPop()"> |
|
|
|
|
|
|
|
<img :src="getImgSrc(windImg)"> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<span>{{ windName }}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="circle-card wind-dire"> |
|
|
|
<div class="setting-control-container" v-if="props.showWindDire"> |
|
|
|
<img :src="getImgSrc(windDireImg)"> |
|
|
|
<div class="circle-card wind-dire"> |
|
|
|
|
|
|
|
<img :src="getImgSrc(windDireImg)"> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<span>风向</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="circle-card switch" @click="changeSwitch()"> |
|
|
|
<div class="setting-control-container"> |
|
|
|
<img :src="getImgSrc(onOffImg)"> |
|
|
|
<div class="circle-card switch" @click="changeSwitch()"> |
|
|
|
|
|
|
|
<img :src="getImgSrc(onOffImg)"> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<span>开关</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
@ -59,7 +92,7 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup> |
|
|
|
<script lang="ts" setup> |
|
|
|
import { ref, onBeforeMount, onMounted } from 'vue'; |
|
|
|
import { ref, toRefs, onBeforeMount, onMounted, nextTick } from 'vue'; |
|
|
|
import { ModeOptions } from './mode-dic'; |
|
|
|
import { ModeOptions } from './mode-dic'; |
|
|
|
import { WindOptions } from './wind-dic'; |
|
|
|
import { WindOptions } from './wind-dic'; |
|
|
|
import { Mode } from './enmu/mode.enmu'; |
|
|
|
import { Mode } from './enmu/mode.enmu'; |
|
|
@ -67,8 +100,22 @@ import { Wind } from './enmu/wind.enmu'; |
|
|
|
import ModeChangePop from '@/components/mode-change.vue'; |
|
|
|
import ModeChangePop from '@/components/mode-change.vue'; |
|
|
|
import WindChangePop from '@/components/wind-change.vue'; |
|
|
|
import WindChangePop from '@/components/wind-change.vue'; |
|
|
|
import { $commonService } from '@/services/framework/dependency-injection-service'; |
|
|
|
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({ |
|
|
|
const tempOptions = ref({ |
|
|
|
titleName: '室内', |
|
|
|
titleName: '室内', |
|
|
@ -97,6 +144,8 @@ const modeOptions: any = ModeOptions; |
|
|
|
const windOptions: any = WindOptions; |
|
|
|
const windOptions: any = WindOptions; |
|
|
|
/** 当前选中的模式 */ |
|
|
|
/** 当前选中的模式 */ |
|
|
|
const mode = ref(Mode.COLD); |
|
|
|
const mode = ref(Mode.COLD); |
|
|
|
|
|
|
|
/** 当前选中的模式名称 */ |
|
|
|
|
|
|
|
const modeName = ref(''); |
|
|
|
/** 模式展示的图片 */ |
|
|
|
/** 模式展示的图片 */ |
|
|
|
const modeImg = ref(''); |
|
|
|
const modeImg = ref(''); |
|
|
|
/** 可设定的模式数组 */ |
|
|
|
/** 可设定的模式数组 */ |
|
|
@ -105,11 +154,13 @@ const modeList = ref<any[]>([]); |
|
|
|
* 开关 |
|
|
|
* 开关 |
|
|
|
* true:开 false:关 |
|
|
|
* true:开 false:关 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
const onOff = ref(false); |
|
|
|
const onOff = ref(ifRun); |
|
|
|
/** 开关图片 */ |
|
|
|
/** 开关图片 */ |
|
|
|
const onOffImg = ref(''); |
|
|
|
const onOffImg = ref(''); |
|
|
|
/** 当前选中的风量 */ |
|
|
|
/** 当前选中的风量 */ |
|
|
|
const wind = ref(Wind.AUTO); |
|
|
|
const wind = ref(Wind.AUTO); |
|
|
|
|
|
|
|
/** 当前选中的风量名称 */ |
|
|
|
|
|
|
|
const windName = ref(''); |
|
|
|
/** 风量展示的图片 */ |
|
|
|
/** 风量展示的图片 */ |
|
|
|
const windImg = ref(''); |
|
|
|
const windImg = ref(''); |
|
|
|
/** 当前风量字典数据 */ |
|
|
|
/** 当前风量字典数据 */ |
|
|
@ -125,7 +176,7 @@ const showModePop = ref(false); |
|
|
|
/** 风量更改弹窗是否开启 */ |
|
|
|
/** 风量更改弹窗是否开启 */ |
|
|
|
const showWindPop = ref(false); |
|
|
|
const showWindPop = ref(false); |
|
|
|
/** 向父组件传递事件 */ |
|
|
|
/** 向父组件传递事件 */ |
|
|
|
const emit = defineEmits(['changeBg']); |
|
|
|
const emit = defineEmits(['changeBg', 'changeSwitch']); |
|
|
|
|
|
|
|
|
|
|
|
onBeforeMount(() => { |
|
|
|
onBeforeMount(() => { |
|
|
|
currentOptions.value = {...tempOptions.value}; |
|
|
|
currentOptions.value = {...tempOptions.value}; |
|
|
@ -136,8 +187,6 @@ onBeforeMount(() => { |
|
|
|
modeList.value.push(modeOptions.find((item1: any) => item1.mode === item)); |
|
|
|
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]; |
|
|
|
settableWind.value = [Wind.AUTO, Wind.SUPER_LOW, Wind.LOW, Wind.MIDDLE, Wind.HIGH, Wind.SUPER_HIGH]; |
|
|
|
|
|
|
|
|
|
|
|
console.log(settableWind.value) |
|
|
|
|
|
|
|
getShowImg(); |
|
|
|
getShowImg(); |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
@ -157,6 +206,9 @@ const getShowImg = () => { |
|
|
|
const modeData = modeOptions.find((item: any) => item.mode === mode.value); |
|
|
|
const modeData = modeOptions.find((item: any) => item.mode === mode.value); |
|
|
|
// 获取风量字典配置数据 |
|
|
|
// 获取风量字典配置数据 |
|
|
|
getWindDic(); |
|
|
|
getWindDic(); |
|
|
|
|
|
|
|
// 展示模式的文字 |
|
|
|
|
|
|
|
modeName.value = modeData.modeName; |
|
|
|
|
|
|
|
windName.value = windData.value[`wind${wind.value}Name`]; |
|
|
|
if (onOff.value) { |
|
|
|
if (onOff.value) { |
|
|
|
// 开机展示模式图片 |
|
|
|
// 开机展示模式图片 |
|
|
|
modeImg.value = modeData.modeImg; |
|
|
|
modeImg.value = modeData.modeImg; |
|
|
@ -267,8 +319,10 @@ const closeWindPop = (params: any) => { |
|
|
|
|
|
|
|
|
|
|
|
/** 开关切换 */ |
|
|
|
/** 开关切换 */ |
|
|
|
const changeSwitch = () => { |
|
|
|
const changeSwitch = () => { |
|
|
|
onOff.value = !onOff.value; |
|
|
|
emit('changeSwitch', !onOff.value); |
|
|
|
getShowImg(); |
|
|
|
nextTick(() => { |
|
|
|
|
|
|
|
getShowImg(); |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
@ -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 { |
|
|
|
.setting-control { |
|
|
|
margin-top: 43px; |
|
|
|
margin-top: 43px; |
|
|
|
padding: 0 64px; |
|
|
|
padding: 0 64px; |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
justify-content: space-between; |
|
|
|
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 { |
|
|
|
.circle-card { |
|
|
|
width: 110px; |
|
|
|
width: 110px; |
|
|
|
height: 110px; |
|
|
|
height: 110px; |
|
|
|