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.
119 lines
4.9 KiB
119 lines
4.9 KiB
import { Wind } from './enmu/wind.enmu'; |
|
import { Mode } from './enmu/mode.enmu'; |
|
import { ModeOptions } from './mode-dic'; |
|
|
|
const coldWind = { |
|
mode: 0, |
|
modeWind0: '/assets/imgs/device-detail/normal-mode/wind0_cold@2x.png', |
|
modeWind1: '/assets/imgs/device-detail/normal-mode/wind1_cold@2x.png', |
|
modeWind2: '/assets/imgs/device-detail/normal-mode/wind2_cold@2x.png', |
|
modeWind3: '/assets/imgs/device-detail/normal-mode/wind3_cold@2x.png', |
|
modeWind4: '/assets/imgs/device-detail/normal-mode/wind4_cold@2x.png', |
|
modeWind5: '/assets/imgs/device-detail/normal-mode/wind5_cold@2x.png', |
|
modeWind6: '/assets/imgs/device-detail/normal-mode/wind6_cold@2x.png', |
|
wind0Name: '自动', |
|
wind1Name: '微风', |
|
wind2Name: '超低', |
|
wind3Name: '低风', |
|
wind4Name: '中风', |
|
wind5Name: '高风', |
|
wind6Name: '超高', |
|
}; |
|
const wetWind = { |
|
mode: 0, |
|
modeWind0: '/assets/imgs/device-detail/normal-mode/wind0_wet@2x.png', |
|
modeWind1: '/assets/imgs/device-detail/normal-mode/wind1_wet@2x.png', |
|
modeWind2: '/assets/imgs/device-detail/normal-mode/wind2_wet@2x.png', |
|
modeWind3: '/assets/imgs/device-detail/normal-mode/wind3_wet@2x.png', |
|
modeWind4: '/assets/imgs/device-detail/normal-mode/wind4_wet@2x.png', |
|
modeWind5: '/assets/imgs/device-detail/normal-mode/wind5_wet@2x.png', |
|
modeWind6: '/assets/imgs/device-detail/normal-mode/wind6_wet@2x.png', |
|
wind0Name: '自动', |
|
wind1Name: '微风', |
|
wind2Name: '超低', |
|
wind3Name: '低风', |
|
wind4Name: '中风', |
|
wind5Name: '高风', |
|
wind6Name: '超高', |
|
}; |
|
const hotWind = { |
|
mode: 0, |
|
modeWind0: '/assets/imgs/device-detail/normal-mode/wind0_hot@2x.png', |
|
modeWind1: '/assets/imgs/device-detail/normal-mode/wind1_hot@2x.png', |
|
modeWind2: '/assets/imgs/device-detail/normal-mode/wind2_hot@2x.png', |
|
modeWind3: '/assets/imgs/device-detail/normal-mode/wind3_hot@2x.png', |
|
modeWind4: '/assets/imgs/device-detail/normal-mode/wind4_hot@2x.png', |
|
modeWind5: '/assets/imgs/device-detail/normal-mode/wind5_hot@2x.png', |
|
modeWind6: '/assets/imgs/device-detail/normal-mode/wind6_hot@2x.png', |
|
wind0Name: '自动', |
|
wind1Name: '微风', |
|
wind2Name: '超低', |
|
wind3Name: '低风', |
|
wind4Name: '中风', |
|
wind5Name: '高风', |
|
wind6Name: '超高', |
|
}; |
|
const windWind = { |
|
mode: 0, |
|
modeWind0: '/assets/imgs/device-detail/normal-mode/wind0_wind@2x.png', |
|
modeWind1: '/assets/imgs/device-detail/normal-mode/wind1_wind@2x.png', |
|
modeWind2: '/assets/imgs/device-detail/normal-mode/wind2_wind@2x.png', |
|
modeWind3: '/assets/imgs/device-detail/normal-mode/wind3_wind@2x.png', |
|
modeWind4: '/assets/imgs/device-detail/normal-mode/wind4_wind@2x.png', |
|
modeWind5: '/assets/imgs/device-detail/normal-mode/wind5_wind@2x.png', |
|
modeWind6: '/assets/imgs/device-detail/normal-mode/wind6_wind@2x.png', |
|
wind0Name: '自动', |
|
wind1Name: '微风', |
|
wind2Name: '超低', |
|
wind3Name: '低风', |
|
wind4Name: '中风', |
|
wind5Name: '高风', |
|
wind6Name: '超高', |
|
}; |
|
const WindOptions: any = [ |
|
{ |
|
modeWind0: '/assets/imgs/device-detail/normal-mode/wind0_shutdown@2x.png', |
|
modeWind1: '/assets/imgs/device-detail/normal-mode/wind1_shutdown@2x.png', |
|
modeWind2: '/assets/imgs/device-detail/normal-mode/wind2_shutdown@2x.png', |
|
modeWind3: '/assets/imgs/device-detail/normal-mode/wind3_shutdown@2x.png', |
|
modeWind4: '/assets/imgs/device-detail/normal-mode/wind4_shutdown@2x.png', |
|
modeWind5: '/assets/imgs/device-detail/normal-mode/wind5_shutdown@2x.png', |
|
modeWind6: '/assets/imgs/device-detail/normal-mode/wind6_shutdown@2x.png', |
|
wind0Name: '自动', |
|
wind1Name: '微风', |
|
wind2Name: '超低', |
|
wind3Name: '低风', |
|
wind4Name: '中风', |
|
wind5Name: '高风', |
|
wind6Name: '超高', |
|
} |
|
]; |
|
ModeOptions.forEach(item => { |
|
if (item.mode === Mode.COLD || item.mode === Mode.COLD_WIND || item.mode === Mode.SWIMMING_WATER) { |
|
const windOption = {...coldWind}; |
|
windOption.mode = item.mode; |
|
WindOptions.push(windOption); |
|
} else if ( |
|
item.mode === Mode.WET || item.mode === Mode.DRY_WET || item.mode === Mode.STRONG_WET |
|
|| item.mode === Mode.ANNUAL_WET || item.mode === Mode.AUTO_WET || item.mode === Mode.SLEEP |
|
|| item.mode === Mode.WET_FLOOR || item.mode === Mode.HOT_WATER || item.mode === Mode.HOT_WIND |
|
) { |
|
const windOption = {...wetWind}; |
|
windOption.mode = item.mode; |
|
WindOptions.push(windOption); |
|
} else if ( |
|
item.mode === Mode.HOT || item.mode === Mode.FLOOR || item.mode === Mode.HOT_FLOOR |
|
) { |
|
const windOption = {...hotWind}; |
|
windOption.mode = item.mode; |
|
WindOptions.push(windOption); |
|
} else if ( |
|
item.mode === Mode.RELAX || item.mode === Mode.WIND || item.mode === Mode.AUTO |
|
) { |
|
const windOption = {...windWind}; |
|
windOption.mode = item.mode; |
|
WindOptions.push(windOption); |
|
} |
|
}) |
|
|
|
export { WindOptions } |