design.vue
10.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
<!--
* @Date: 2024-10-17 11:13:44
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-31 11:56:55
* @FilePath: /hager/src/views/about/design.vue
* @Description: 文件描述
-->
<template>
<div class="hager-about-global-page">
<hager-box>
<div style="margin-top: 1.5rem;">
<el-breadcrumb separator="/">
<el-breadcrumb-item>关于海格</el-breadcrumb-item>
<el-breadcrumb-item>{{ $route.name }}</el-breadcrumb-item>
</el-breadcrumb>
</div>
</hager-box>
<hager-box v-if="!is_xs">
<el-row style="margin: 3rem 0;">
<el-col :span="8">
<div class="about-box">
<div style="top: 50%; transform: translateY(50%);">
<div class="title">
<p class="c">创新设计</p>
<p class="e">Innovative Design</p>
</div>
<div class="introduce" v-clamp="3">
<p>海格电气一直致力于创新,<br/>我们与客户共同着手面向未来的主题。</p>
</div>
</div>
</div>
</el-col>
<el-col :span="16">
<div class="about-img"></div>
</el-col>
</el-row>
</hager-box>
<div v-else style="margin-top: 1rem;">
<div class="about-img xs"></div>
<div class="about-box xs">
<div>
<!-- <div class="title">
<p class="c">创新设计</p>
<p class="e">Innovative Design</p>
</div> -->
<div class="introduce" v-clamp="3">
<p>海格电气一直致力于创新,<br/>我们与客户共同着手面向未来的主题。</p>
</div>
</div>
</div>
</div>
<hager-box class="box-2n">
<hager-h1 title="从产品到解决方案" sub="From Products to Solutions" style="margin: 1rem 0;"></hager-h1>
<div>
<swiper ref="myDesignSwiper" class="swiper" :options="swiperOption" @slideChange="onDesignSlideChange">
<swiper-slide v-for="(item, index) in design_list" :key="index">
<div class="products-solutions">
<div class="img-box" :style="{ backgroundImage: 'url('+item.cover+')' }"></div>
<div class="text-box" style="background-color: #FFF;">
<div class="title">{{ item.title }}</div>
<div class="sub">{{ item.sub }}</div>
<div class="content" v-clamp="2">{{ item.content }}</div>
</div>
</div>
</swiper-slide>
</swiper>
<div v-if="design_list.length > designSlidesPerView || is_xs" class="xs-control">
<div>
<i :class="['el-icon-arrow-left', activeDesignIndex === 0 ? 'disabled' : '']"@click="prevDesignBtn()"></i>
<i :class="['el-icon-arrow-right', reach_design_end ? 'disabled' : '']" @click="nextDesignBtn()"></i>
</div>
</div>
</div>
</hager-box>
<hager-box v-if="!is_xs" class="box-n">
<el-row :gutter="0" style="margin-top: 2rem;margin-bottom: 2rem;">
<el-col :span="12">
<div class="left-box">
<div class="title">
<hager-h1 title="从用户体验到设计" sub="From User Experience to Design"></hager-h1>
<div style="margin-top: 2rem; line-height: 1.75;" v-clamp="4">
<p>海格电气仔细倾听客户的声音,以使我们的设计语言能够被普遍理解。为了提供更加国际化的产品组合,我们调研了不同国家的习俗、个人的不同愿望和客户关注点。客户的声音促成了符合人体工学的设计方案,确保来自海格电气的产品兼具优雅品味的外观设计与方便易用、以人为本的功能性。</p>
</div>
</div>
</div>
</el-col>
<el-col :span="12">
<!-- <div class="right-box">
<p class="title">“倾听客户的声音,打造一流设计”</p>
<div>
<img style="width: 100%; height: 10rem;" src="https://cdn.ipadbiz.cn/hager/img/about/g13@2x.png" alt="">
</div>
</div> -->
<div style="background-image: url(https://cdn.ipadbiz.cn/hager/img/about/g09@2x.png); background-size: cover; background-repeat: no-repeat; height: 29rem;"></div>
</el-col>
</el-row>
</hager-box>
<div v-else>
<div class="left-box xs">
<div class="title xs">
<hager-h1 title="从用户体验到设计" sub="From User Experience to Design"></hager-h1>
<div style="margin-top: 2rem; line-height: 1.75;">
<p>海格电气仔细倾听客户的声音,以使我们的设计语言能够被普遍理解。为了提供更加国际化的产品组合,我们调研了不同国家的习俗、个人的不同愿望和客户关注点。客户的声音促成了符合人体工学的设计方案,确保来自海格电气的产品兼具优雅品味的外观设计与方便易用、以人为本的功能性。</p>
</div>
</div>
</div>
<!-- <div class="right-box xs">
<p class="title">“倾听客户的声音,打造一流设计”</p>
<div>
<img style="width: 100%; height: 10rem;" src="https://cdn.ipadbiz.cn/hager/img/about/g13@2x.png" alt="">
</div>
</div> -->
<div>
<img style="width: 100%; height: 20rem;" src="https://cdn.ipadbiz.cn/hager/img/about/g09@2x.png">
</div>
</div>
</div>
</template>
<script>
import mixin from 'common/mixin';
import hagerBox from '@/components/common/hagerBox';
export default {
components: { hagerBox },
mixins: [mixin.init],
data () {
return {
design_list: [{
cover: 'https://cdn.ipadbiz.cn/hager/img/about/g10@2x-1.png',
title: '电动交通',
sub: 'Electric Transportation',
content: '供电网络为开启电动交通的未来保驾护航,公关和私人场所均提供智能充电站。'
}, {
cover: 'https://cdn.ipadbiz.cn/hager/img/about/g11@2x-1.png',
title: '楼宇自动化',
sub: 'Building Automation',
content: '楼宇自动化将会同时带来高效节能及优质舒适的生活。'
}, {
cover: 'https://cdn.ipadbiz.cn/hager/img/about/g12@2x-1.png',
title: '能源效率',
sub: 'Energy Efficiency',
content: '节能产品有助于优化和降低能源消耗。'
}],
swiperOption: {
slidesPerView: 2,
spaceBetween: 20,
preventClicks : true,
slideToClickedSlide: false,
touchRatio: 0,
breakpoints: {
1480: {
slidesPerView: 3,
spaceBetween: 30
},
1024: {
slidesPerView: 3,
spaceBetween: 30
},
768: {
slidesPerView: 3,
spaceBetween: 20
},
640: {
slidesPerView: 2,
spaceBetween: 20
},
320: {
slidesPerView: 1,
spaceBetween: 10
},
160: {
slidesPerView: 1,
spaceBetween: 0
}
}
},
activeDesignIndex: 0,
reach_design_end: false,
designSlidesPerView: 3,
}
},
mounted () {
this.$nextTick(() => {
this.$refs.myDesignSwiper.$swiper?.on('breakpoint', (swiper) => {
// breakpoint时 显示的条数
this.designSlidesPerView = swiper.slidesPerView
});
});
},
methods: {
prevDesignBtn () {
this.$refs.myDesignSwiper.$swiper.slidePrev();
},
nextDesignBtn () {
this.$refs.myDesignSwiper.$swiper.slideNext();
},
onDesignSlideChange () {
this.activeDesignIndex = this.$refs.myDesignSwiper.$swiper.activeIndex;
const isEnd = this.$refs.myDesignSwiper.$swiper.isEnd;
if (isEnd) {
this.reach_design_end = true;
} else {
this.reach_design_end = false;
}
}
}
}
</script>
<style lang="less" scoped>
.hager-about-global-page {
.about-img {
width: 100%;
height: 30rem;
background-repeat: no-repeat;
background-size: cover;
background-position: center;
background-image: url('https://cdn.ipadbiz.cn/hager/img/about/g09@2x-1.png');
&.xs {
height: 20rem;
}
}
.about-box {
background-color: #F7F7F7;
position: relative; /* 父容器设置为相对定位 */
padding: 2rem;
height: 30rem; /* 让 .about-box 撑满父容器 */
box-sizing: border-box;
&.xs {
height: auto;
}
.title {
font-weight: bold;
.c {
font-size: 2rem;
color: @secondary-color;
}
.e {
font-size: 1.5rem;
color: @primary-color;
}
}
.introduce {
line-height: 1.75;
margin-top: 1rem;
}
}
.products-solutions {
border: 1px solid #eee;
.img-box {
width: 100%;
height: 15rem; /* 根据需要设置高度 */
background-size: 100% 100%; /* 强制背景图填满整个容器 */
background-position: center;
background-repeat: no-repeat; /* 防止图片重复 */
}
.text-box {
padding: 1rem;
height: 8rem;
.title {
color: @secondary-color;
font-weight: bold;
font-size: 1.25rem;
}
.sub {
color: @primary-color;
font-weight: bold;
margin: 0.5rem 0;
}
.content {
line-height: 1.7;
}
}
}
.left-box {
background-color: #E3F1F7;
height: 25rem;
padding: 2rem;
&.xs {
height: auto;
}
.title {
top: 30%;
transform: translateY(30%);
&.xs {
transform: translateY(0);
}
}
}
.right-box {
top: 30%;
transform: translateY(30%);
padding: 2rem;
&.xs {
top: 0;
transform: translateY(0);
}
.title {
text-align: center;
font-size: 1.55rem;
font-weight: bold;
margin-bottom: 2rem;
color: @secondary-color;
}
}
.xs-control {
display: flex;
justify-content: flex-end;
margin-top: 1rem;
i {
font-size: 1.35rem;
color: #EE6D10;
&:hover {
cursor: pointer;
}
&.disabled {
color: #ccc;
}
}
}
}
</style>