diff --git a/src/assets/imgs/device-detail/back@2x.png b/src/assets/imgs/device-detail/back@2x.png new file mode 100644 index 0000000..fc4b8f2 Binary files /dev/null and b/src/assets/imgs/device-detail/back@2x.png differ diff --git a/src/assets/imgs/device-detail/mode-container-bg@2x.png b/src/assets/imgs/device-detail/mode-container-bg@2x.png new file mode 100644 index 0000000..63e9f75 Binary files /dev/null and b/src/assets/imgs/device-detail/mode-container-bg@2x.png differ diff --git a/src/assets/imgs/device-detail/mode-tab-active@2x.png b/src/assets/imgs/device-detail/mode-tab-active@2x.png new file mode 100644 index 0000000..d7e6d77 Binary files /dev/null and b/src/assets/imgs/device-detail/mode-tab-active@2x.png differ diff --git a/src/assets/imgs/device-detail/more@2x.png b/src/assets/imgs/device-detail/more@2x.png new file mode 100644 index 0000000..cd14494 Binary files /dev/null and b/src/assets/imgs/device-detail/more@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/annual_wet@2x.png b/src/assets/imgs/device-detail/normal-mode/annual_wet@2x.png new file mode 100644 index 0000000..b4584b8 Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/annual_wet@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/auto@2x.png b/src/assets/imgs/device-detail/normal-mode/auto@2x.png new file mode 100644 index 0000000..f5e5d57 Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/auto@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/auto_floor@2x.png b/src/assets/imgs/device-detail/normal-mode/auto_floor@2x.png new file mode 100644 index 0000000..efae934 Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/auto_floor@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/auto_wet@2x.png b/src/assets/imgs/device-detail/normal-mode/auto_wet@2x.png new file mode 100644 index 0000000..d56c8d0 Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/auto_wet@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/circle-bg@2x.png b/src/assets/imgs/device-detail/normal-mode/circle-bg@2x.png new file mode 100644 index 0000000..06a8770 Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/circle-bg@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/cold@2x.png b/src/assets/imgs/device-detail/normal-mode/cold@2x.png new file mode 100644 index 0000000..de97a75 Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/cold@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/dry_wet@2x.png b/src/assets/imgs/device-detail/normal-mode/dry_wet@2x.png new file mode 100644 index 0000000..ab0dd22 Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/dry_wet@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/filter_fault@2x.png b/src/assets/imgs/device-detail/normal-mode/filter_fault@2x.png new file mode 100644 index 0000000..01066d0 Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/filter_fault@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/floor@2x.png b/src/assets/imgs/device-detail/normal-mode/floor@2x.png new file mode 100644 index 0000000..dfe7fe2 Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/floor@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/hot@2x.png b/src/assets/imgs/device-detail/normal-mode/hot@2x.png new file mode 100644 index 0000000..a7517e7 Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/hot@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/hot_floor@2x.png b/src/assets/imgs/device-detail/normal-mode/hot_floor@2x.png new file mode 100644 index 0000000..bc13237 Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/hot_floor@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/normal_bg_cold@2x.png b/src/assets/imgs/device-detail/normal-mode/normal_bg_cold@2x.png new file mode 100644 index 0000000..e4d552c Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/normal_bg_cold@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/normal_bg_hot@2x.png b/src/assets/imgs/device-detail/normal-mode/normal_bg_hot@2x.png new file mode 100644 index 0000000..a474287 Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/normal_bg_hot@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/normal_bg_shutdown@2x.png b/src/assets/imgs/device-detail/normal-mode/normal_bg_shutdown@2x.png new file mode 100644 index 0000000..4b9921b Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/normal_bg_shutdown@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/normal_bg_wet@2x.png b/src/assets/imgs/device-detail/normal-mode/normal_bg_wet@2x.png new file mode 100644 index 0000000..9210fbe Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/normal_bg_wet@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/normal_bg_wind@2x.png b/src/assets/imgs/device-detail/normal-mode/normal_bg_wind@2x.png new file mode 100644 index 0000000..1519698 Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/normal_bg_wind@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/relax@2x.png b/src/assets/imgs/device-detail/normal-mode/relax@2x.png new file mode 100644 index 0000000..f2de498 Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/relax@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/right@2x.png b/src/assets/imgs/device-detail/normal-mode/right@2x.png new file mode 100644 index 0000000..88a26ea Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/right@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/set-add@2x.png b/src/assets/imgs/device-detail/normal-mode/set-add@2x.png new file mode 100644 index 0000000..99a6351 Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/set-add@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/set-reduce@2x.png b/src/assets/imgs/device-detail/normal-mode/set-reduce@2x.png new file mode 100644 index 0000000..2711b10 Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/set-reduce@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/sleep@2x.png b/src/assets/imgs/device-detail/normal-mode/sleep@2x.png new file mode 100644 index 0000000..ee59753 Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/sleep@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/strong_wet@2x.png b/src/assets/imgs/device-detail/normal-mode/strong_wet@2x.png new file mode 100644 index 0000000..1c45d7c Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/strong_wet@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/switch_btn@2x.png b/src/assets/imgs/device-detail/normal-mode/switch_btn@2x.png new file mode 100644 index 0000000..9f3dabe Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/switch_btn@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/wet@2x.png b/src/assets/imgs/device-detail/normal-mode/wet@2x.png new file mode 100644 index 0000000..68a0b6e Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/wet@2x.png differ diff --git a/src/assets/imgs/device-detail/normal-mode/wind@2x.png b/src/assets/imgs/device-detail/normal-mode/wind@2x.png new file mode 100644 index 0000000..91b2a28 Binary files /dev/null and b/src/assets/imgs/device-detail/normal-mode/wind@2x.png differ diff --git a/src/router.ts b/src/router.ts index e9e9ed5..db98e76 100644 --- a/src/router.ts +++ b/src/router.ts @@ -59,6 +59,14 @@ const projectRoutes = [ title: '智慧屏首頁' } }, + { + name: "device-detail", + path: "/device-detail", + component: () => import("@/view/device-detail/device-detail.vue"), + meta: { + title: '设备详情页' + } + }, // 非哈希路由暂不启用 { name: "notFound", diff --git a/src/view/device-detail/device-detail.vue b/src/view/device-detail/device-detail.vue new file mode 100644 index 0000000..0f785d0 --- /dev/null +++ b/src/view/device-detail/device-detail.vue @@ -0,0 +1,221 @@ + + + + + \ No newline at end of file diff --git a/src/view/device-detail/mode/enmu/mode.enmu.ts b/src/view/device-detail/mode/enmu/mode.enmu.ts new file mode 100644 index 0000000..9562284 --- /dev/null +++ b/src/view/device-detail/mode/enmu/mode.enmu.ts @@ -0,0 +1,31 @@ +/** 模式枚举 */ +export enum Mode { + /** 舒爽 */ + RELAX, + /** 送风 */ + WIND, + /** 制冷 */ + COLD, + /** 制热 */ + HOT, + /** 除湿 */ + WET, + /** 自动 */ + AUTO, + /** 干爽除湿 */ + DRY_WET, + /** 强力除湿 */ + STRONG_WET, + /** 全年除湿 */ + ANNUAL_WET, + /** 自动除湿 */ + AUTO_WET, + /** 舒心睡眠 */ + SLEEP, + /** 地暖 */ + FLOOR, + /** 制热+地暖 */ + HOT_FLOOR, + /** 除湿+地暖 */ + WET_FLOOR, +} \ No newline at end of file diff --git a/src/view/device-detail/mode/enmu/wind.enmu.ts b/src/view/device-detail/mode/enmu/wind.enmu.ts new file mode 100644 index 0000000..ae697b2 --- /dev/null +++ b/src/view/device-detail/mode/enmu/wind.enmu.ts @@ -0,0 +1,17 @@ +/** 风量枚举 */ +export enum Wind { + /** 微风 */ + LIGHT, + /** 超低风 */ + SUPER_LOW, + /** 低风 */ + LOW, + /** 中风 */ + MIDDLE, + /** 高风 */ + HIGH, + /** 超高风 */ + SUPER_HIGH, + /** 自动 */ + AUTO +} \ No newline at end of file diff --git a/src/view/device-detail/mode/mode-dic.ts b/src/view/device-detail/mode/mode-dic.ts new file mode 100644 index 0000000..084eb5f --- /dev/null +++ b/src/view/device-detail/mode/mode-dic.ts @@ -0,0 +1,102 @@ +import { Mode } from './enmu/mode.enmu'; + +/** + * 模式字典 + * modeName:模式名称 + * mode:模式id + * modeImg:模式图片 + * nomalBg:常规背景 + * smartBg:智慧背景 + */ +const ModeOptions = [ + { + modeName: '制冷', + mode: Mode.COLD, + modeImg: '/src/assets/imgs/device-detail/normal-mode/cold@2x.png', + nomalBg: '/src/assets/imgs/device-detail/normal-mode/normal_bg_cold@2x.png', + smartBg: '' + }, { + modeName: '除湿', + mode: Mode.WET, + modeImg: '/src/assets/imgs/device-detail/normal-mode/wet@2x.png', + nomalBg: '/src/assets/imgs/device-detail/normal-mode/normal_bg_wet@2x.png', + smartBg: '' + }, { + modeName: '干爽除湿', + mode: Mode.DRY_WET, + modeImg: '/src/assets/imgs/device-detail/normal-mode/dry_wet@2x.png', + nomalBg: '/src/assets/imgs/device-detail/normal-mode/normal_bg_wet@2x.png', + smartBg: '' + }, { + modeName: '强力除湿', + mode: Mode.STRONG_WET, + modeImg: '/src/assets/imgs/device-detail/normal-mode/strong_wet@2x.png', + nomalBg: '/src/assets/imgs/device-detail/normal-mode/normal_bg_wet@2x.png', + smartBg: '' + }, { + modeName: '自动除湿', + mode: Mode.AUTO_WET, + modeImg: '/src/assets/imgs/device-detail/normal-mode/auto_wet@2x.png', + nomalBg: '/src/assets/imgs/device-detail/normal-mode/normal_bg_wet@2x.png', + smartBg: '' + }, { + modeName: '全年除湿', + mode: Mode.ANNUAL_WET, + modeImg: '/src/assets/imgs/device-detail/normal-mode/annual_wet@2x.png', + nomalBg: '/src/assets/imgs/device-detail/normal-mode/normal_bg_wet@2x.png', + smartBg: '' + }, { + modeName: '舒爽', + mode: Mode.RELAX, + modeImg: '/src/assets/imgs/device-detail/normal-mode/relax@2x.png', + nomalBg: 'normal_bg_wind@2x.png', + smartBg: '' + }, { + modeName: '舒心睡眠', + mode: Mode.SLEEP, + modeImg: '/src/assets/imgs/device-detail/normal-mode/sleep@2x.png', + nomalBg: '/src/assets/imgs/device-detail/normal-mode/normal_bg_wet@2x.png', + smartBg: '' + }, { + modeName: '制热', + mode: Mode.HOT, + modeImg: '/src/assets/imgs/device-detail/normal-mode/hot@2x.png', + nomalBg: '/src/assets/imgs/device-detail/normal-mode/normal_bg_hot@2x.png', + smartBg: '' + }, { + modeName: '送风', + mode: Mode.WIND, + modeImg: '/src/assets/imgs/device-detail/normal-mode/wind@2x.png', + nomalBg: 'normal_bg_wind@2x.png', + smartBg: '' + }, { + modeName: '自动', + mode: Mode.AUTO, + modeImg: '/src/assets/imgs/device-detail/normal-mode/auto@2x.png', + nomalBg: 'normal_bg_wind@2x.png', + smartBg: '' + }, { + modeName: '地暖', + mode: Mode.FLOOR, + modeImg: '/src/assets/imgs/device-detail/normal-mode/floor@2x.png', + nomalBg: '/src/assets/imgs/device-detail/normal-mode/normal_bg_hot@2x.png', + smartBg: '' + }, { + modeName: '制热+地暖', + mode: Mode.HOT_FLOOR, + modeImg: '/src/assets/imgs/device-detail/normal-mode/hot_floor@2x.png', + nomalBg: '/src/assets/imgs/device-detail/normal-mode/normal_bg_hot@2x.png', + smartBg: '' + }, { + modeName: '除湿+地暖', + mode: Mode.WET_FLOOR, + modeImg: '/src/assets/imgs/device-detail/normal-mode/wet_floor@2x.png', + nomalBg: '/src/assets/imgs/device-detail/normal-mode/normal_bg_wet@2x.png', + smartBg: '' + } +] + +ModeOptions.forEach((item: any, index: number) => { + item['id'] = index; +}); +export {ModeOptions} \ No newline at end of file diff --git a/src/view/device-detail/mode/normal.vue b/src/view/device-detail/mode/normal.vue new file mode 100644 index 0000000..a779ff5 --- /dev/null +++ b/src/view/device-detail/mode/normal.vue @@ -0,0 +1,208 @@ + + + + + \ No newline at end of file diff --git a/src/view/drop-down-menu/drop-down-menu.vue b/src/view/drop-down-menu/drop-down-menu.vue index f938c94..e893f4e 100644 --- a/src/view/drop-down-menu/drop-down-menu.vue +++ b/src/view/drop-down-menu/drop-down-menu.vue @@ -70,33 +70,34 @@ const pullUp = () => { overflow: hidden; .content-top { - padding: 19px 24px; + padding: 38px 48px; + padding-bottom: 0; display: flex; justify-content: space-between; flex-wrap: wrap; .func-wrapper { - width: 210px; - height: 200px; - border-radius: 16px; + width: 420px; + height: 400px; + border-radius: 32px; display: flex; flex-direction: column; justify-content: center; align-items: center; - margin: 5px 0; + margin: 10px 0; background: #20252E; .func-img { - width: 66px; - height: 66px; + width: 132px; + height: 132px; } .func-text { - font-size: 28px; + font-size: 56px; color: #FFF; font-family: SourceHanSansCN-Regular, SourceHanSansCN; font-weight: 400; - margin-top: 42px; + margin-top: 84px; } } } @@ -104,10 +105,10 @@ const pullUp = () => { .content-btm { width: 100vw; text-align: center; - padding-bottom: 6px; + padding-bottom: 12px; img { - width: 142px; + width: 284px; } } } diff --git a/src/view/tabs/device-control.vue b/src/view/tabs/device-control.vue index 285d214..b23b8ee 100644 --- a/src/view/tabs/device-control.vue +++ b/src/view/tabs/device-control.vue @@ -16,6 +16,7 @@ 'air-quality-liang': item.airQuality === '良', 'air-quality-cha': item.airQuality === '差', }" + @click="goToDetail(item)" >
{{ item.name }}
@@ -38,7 +39,7 @@ {{ i }}
-
+
@@ -61,6 +62,7 @@