Showing
3 changed files
with
119 additions
and
59 deletions
| 1 | /* | 1 | /* |
| 2 | * @Date: 2024-08-26 10:12:56 | 2 | * @Date: 2024-08-26 10:12:56 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-09-26 16:31:40 | 4 | + * @LastEditTime: 2024-09-30 15:31:44 |
| 5 | * @FilePath: /hager/src/main.js | 5 | * @FilePath: /hager/src/main.js |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | */ | 7 | */ |
| ... | @@ -11,7 +11,7 @@ import App from './App.vue' | ... | @@ -11,7 +11,7 @@ import App from './App.vue' |
| 11 | import VueRouter from 'vue-router' | 11 | import VueRouter from 'vue-router' |
| 12 | import router from './router' | 12 | import router from './router' |
| 13 | // import ElementUI from 'element-ui'; | 13 | // import ElementUI from 'element-ui'; |
| 14 | -// import 'element-ui/lib/theme-chalk/index.css'; | 14 | +import 'element-ui/lib/theme-chalk/index.css'; |
| 15 | import 'element-ui/lib/theme-chalk/display.css'; // 基于断点的隐藏类,用于在某些条件下隐藏元素 | 15 | import 'element-ui/lib/theme-chalk/display.css'; // 基于断点的隐藏类,用于在某些条件下隐藏元素 |
| 16 | // import '@/styles/element-ui/element-variables.scss' // 自定义主题, 不需要展示屏蔽 | 16 | // import '@/styles/element-ui/element-variables.scss' // 自定义主题, 不需要展示屏蔽 |
| 17 | // import { Button, Row, Col, } from 'element-ui'; | 17 | // import { Button, Row, Col, } from 'element-ui'; | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-09-29 14:26:41 | 2 | * @Date: 2024-09-29 14:26:41 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-09-30 10:06:55 | 4 | + * @LastEditTime: 2024-09-30 15:33:16 |
| 5 | * @FilePath: /hager/src/views/product/detail.vue | 5 | * @FilePath: /hager/src/views/product/detail.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -18,15 +18,15 @@ | ... | @@ -18,15 +18,15 @@ |
| 18 | </div> | 18 | </div> |
| 19 | </hager-box> | 19 | </hager-box> |
| 20 | <hager-box class="box-n"> | 20 | <hager-box class="box-n"> |
| 21 | - <el-row :gutter="10"> | 21 | + <el-row :gutter="10" style="margin-bottom: 3rem;"> |
| 22 | <el-col :span="10"> | 22 | <el-col :span="10"> |
| 23 | <hager-carousel></hager-carousel> | 23 | <hager-carousel></hager-carousel> |
| 24 | </el-col> | 24 | </el-col> |
| 25 | <el-col :span="14"> | 25 | <el-col :span="14"> |
| 26 | - <div> | 26 | + <div class="product-detail-info"> |
| 27 | - <div style="font-size: 2rem; font-weight: bold;">HW+系列空气断路器</div> | 27 | + <div class="product-title" style="">HW+系列空气断路器</div> |
| 28 | - <div style="margin: 1rem 0 2rem;">全新智能型hw+系列空气断路器,可搭载集通讯、自诊断、功能编程、维护预警、远程监控、测量、报警、保护功能于一体的Sentinel Energy控制器。</div> | 28 | + <div class="product-sub" style="margin: 1rem 0 2rem;">全新智能型hw+系列空气断路器,可搭载集通讯、自诊断、功能编程、维护预警、远程监控、测量、报警、保护功能于一体的Sentinel Energy控制器。</div> |
| 29 | - <ul style="padding: 0 1rem;"> | 29 | + <ul class="product-info-list"> |
| 30 | <li>实现谐波测量,实时监测电能质量;</li> | 30 | <li>实现谐波测量,实时监测电能质量;</li> |
| 31 | <li>图文显示多电量参数,系统状态一目了然;</li> | 31 | <li>图文显示多电量参数,系统状态一目了然;</li> |
| 32 | <li>支持Modbus远程通讯协议,无线蓝牙连接等多种通讯方式,全方位提升客户的数字化体验。</li> | 32 | <li>支持Modbus远程通讯协议,无线蓝牙连接等多种通讯方式,全方位提升客户的数字化体验。</li> |
| ... | @@ -38,26 +38,11 @@ | ... | @@ -38,26 +38,11 @@ |
| 38 | <hager-box class="box-2n"> | 38 | <hager-box class="box-2n"> |
| 39 | <hager-h1 title="产品优势" sub="Product advantages"></hager-h1> | 39 | <hager-h1 title="产品优势" sub="Product advantages"></hager-h1> |
| 40 | <div class="product-advantage" style=""> | 40 | <div class="product-advantage" style=""> |
| 41 | - <div class="item"> | 41 | + <div class="item" v-for="(item, index) in 3" :key="index"> |
| 42 | - <p>极致的分断能力: 全系列Icu=Ics</p> | 42 | + <el-row :gutter="0" v-for="(item, index) in 5" :key="index"> |
| 43 | - <p>极致的分断能力: 全系列Icu=Ics</p> | 43 | + <el-col :span="6">极致的分断能力:</el-col> |
| 44 | - <p>极致的分断能力: 全系列Icu=Ics</p> | 44 | + <el-col :span="18">标配独立的故障指示触点、远程复位、ZSI保护功能</el-col> |
| 45 | - <p>极致的分断能力: 全系列Icu=Ics</p> | 45 | + </el-row> |
| 46 | - <p>极致的分断能力: 全系列Icu=Ics</p> | ||
| 47 | - </div> | ||
| 48 | - <div class="item"> | ||
| 49 | - <p>极致的分断能力: 全系列Icu=Ics</p> | ||
| 50 | - <p>极致的分断能力: 全系列Icu=Ics</p> | ||
| 51 | - <p>极致的分断能力: 全系列Icu=Ics</p> | ||
| 52 | - <p>极致的分断能力: 全系列Icu=Ics</p> | ||
| 53 | - <p>极致的分断能力: 全系列Icu=Ics</p> | ||
| 54 | - </div> | ||
| 55 | - <div class="item"> | ||
| 56 | - <p>极致的分断能力: 全系列Icu=Ics</p> | ||
| 57 | - <p>极致的分断能力: 全系列Icu=Ics</p> | ||
| 58 | - <p>极致的分断能力: 全系列Icu=Ics</p> | ||
| 59 | - <p>极致的分断能力: 全系列Icu=Ics</p> | ||
| 60 | - <p>极致的分断能力: 全系列Icu=Ics</p> | ||
| 61 | </div> | 46 | </div> |
| 62 | </div> | 47 | </div> |
| 63 | </hager-box> | 48 | </hager-box> |
| ... | @@ -66,24 +51,25 @@ | ... | @@ -66,24 +51,25 @@ |
| 66 | <div class="product-info"> | 51 | <div class="product-info"> |
| 67 | <div class="info-control"> | 52 | <div class="info-control"> |
| 68 | <div class="control-left"> | 53 | <div class="control-left"> |
| 69 | - <div class="button active" style="margin-right: 1rem;">产品样本</div> | 54 | + <div :class="['button', is_active === 0 ? 'active' : '']" @click="onClick(0)">产品样本</div> |
| 70 | - <div class="button" style="margin-right: 1rem;">技术参数</div> | 55 | + <div :class="['button', is_active === 1 ? 'active' : '']" @click="onClick(1)">技术参数</div> |
| 71 | - <div class="button" style="margin-right: 1rem;">产品说明书</div> | 56 | + <div :class="['button', is_active === 2 ? 'active' : '']" @click="onClick(2)">产品说明书</div> |
| 72 | - <div class="button" style="margin-right: 1rem;">安装教程</div> | 57 | + <div :class="['button', is_active === 3 ? 'active' : '']" @click="onClick(3)">安装教程</div> |
| 73 | </div> | 58 | </div> |
| 74 | <div> | 59 | <div> |
| 75 | - <div class="button">下载选中</div> | 60 | + <div @click="goToDownload" :class="['button', is_download_checked ? 'active' : '']">下载选中</div> |
| 76 | </div> | 61 | </div> |
| 77 | </div> | 62 | </div> |
| 78 | <div> | 63 | <div> |
| 79 | - <div class="info-list"> | 64 | + <div class="info-list" v-for="(item, index) in download_list" :key="index"> |
| 80 | <div class="info-list-title"> | 65 | <div class="info-list-title"> |
| 81 | - <i class="el-icon-document" style="font-size: 1.5rem;"></i> Hw+系列空气断路器 17.77MB | 66 | + <i class="el-icon-document" style="font-size: 1.5rem;"></i> {{ item.name }} {{ item.size }} |
| 82 | </div> | 67 | </div> |
| 83 | <div class="info-list-control"> | 68 | <div class="info-list-control"> |
| 84 | - <span>预览</span> | 69 | + <span>预览</span> |
| 85 | - <span>直接下载</span> | 70 | + <span>直接下载</span> |
| 86 | - <i class="el-icon-folder-checked"></i> | 71 | + <i v-if="item.checked" @click="item.checked = !item.checked" class="el-icon-folder-checked download-checked"></i> |
| 72 | + <i v-else @click="item.checked = !item.checked" class="el-icon-folder download-unchecked"></i> | ||
| 87 | </div> | 73 | </div> |
| 88 | </div> | 74 | </div> |
| 89 | </div> | 75 | </div> |
| ... | @@ -97,20 +83,59 @@ import mixin from 'common/mixin'; | ... | @@ -97,20 +83,59 @@ import mixin from 'common/mixin'; |
| 97 | import hagerBox from '@/components/common/hagerBox'; | 83 | import hagerBox from '@/components/common/hagerBox'; |
| 98 | import hagerCarousel from '@/components/hagerCarousel'; | 84 | import hagerCarousel from '@/components/hagerCarousel'; |
| 99 | import hagerH1 from '@/components/common/hagerH1.vue'; | 85 | import hagerH1 from '@/components/common/hagerH1.vue'; |
| 86 | +import { MessageBox, Message } from 'element-ui'; | ||
| 100 | 87 | ||
| 101 | export default { | 88 | export default { |
| 102 | components: { hagerBox, hagerCarousel, hagerH1 }, | 89 | components: { hagerBox, hagerCarousel, hagerH1 }, |
| 103 | mixins: [mixin.init], | 90 | mixins: [mixin.init], |
| 104 | data () { | 91 | data () { |
| 105 | return { | 92 | return { |
| 106 | - | 93 | + is_active: 0, |
| 94 | + download_list: [{ | ||
| 95 | + id: '123', | ||
| 96 | + name: '产品样本', | ||
| 97 | + size: '123MB', | ||
| 98 | + checked: false | ||
| 99 | + }, { | ||
| 100 | + id: '123', | ||
| 101 | + name: '产品样本', | ||
| 102 | + size: '123MB', | ||
| 103 | + checked: false | ||
| 104 | + }] | ||
| 105 | + } | ||
| 106 | + }, | ||
| 107 | + computed: { | ||
| 108 | + is_download_checked () { | ||
| 109 | + return this.download_list.filter(item => item.checked).length > 0; | ||
| 107 | } | 110 | } |
| 108 | }, | 111 | }, |
| 109 | mounted () { | 112 | mounted () { |
| 110 | 113 | ||
| 111 | }, | 114 | }, |
| 112 | methods: { | 115 | methods: { |
| 113 | - | 116 | + onClick (n) { |
| 117 | + this.is_active = n; | ||
| 118 | + }, | ||
| 119 | + goToDownload () { | ||
| 120 | + if (this.is_download_checked) { | ||
| 121 | + MessageBox.prompt('请输入发送邮箱', '温馨提示', { | ||
| 122 | + confirmButtonText: '确定', | ||
| 123 | + cancelButtonText: '取消', | ||
| 124 | + inputPattern: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/, | ||
| 125 | + inputErrorMessage: '邮箱格式不正确' | ||
| 126 | + }).then(({ value }) => { | ||
| 127 | + Message({ | ||
| 128 | + type: 'success', | ||
| 129 | + message: '你的邮箱是: ' + value | ||
| 130 | + }); | ||
| 131 | + }).catch(() => { | ||
| 132 | + Message({ | ||
| 133 | + type: 'info', | ||
| 134 | + message: '取消输入' | ||
| 135 | + }); | ||
| 136 | + }); | ||
| 137 | + } | ||
| 138 | + } | ||
| 114 | } | 139 | } |
| 115 | } | 140 | } |
| 116 | </script> | 141 | </script> |
| ... | @@ -125,6 +150,24 @@ export default { | ... | @@ -125,6 +150,24 @@ export default { |
| 125 | background-color: #f1f1f1; | 150 | background-color: #f1f1f1; |
| 126 | padding: 2rem 0; | 151 | padding: 2rem 0; |
| 127 | } | 152 | } |
| 153 | + .product-detail-info { | ||
| 154 | + .product-title { | ||
| 155 | + font-size: 2rem; | ||
| 156 | + font-weight: bold; | ||
| 157 | + color: @secondary-color; | ||
| 158 | + } | ||
| 159 | + .product-sub { | ||
| 160 | + margin: 1rem 0 2rem; | ||
| 161 | + color: @text-color; | ||
| 162 | + } | ||
| 163 | + .product-info-list { | ||
| 164 | + padding: 0 1rem; | ||
| 165 | + li { | ||
| 166 | + line-height: 2; | ||
| 167 | + font-size: 0.9rem; | ||
| 168 | + } | ||
| 169 | + } | ||
| 170 | + } | ||
| 128 | .product-advantage { | 171 | .product-advantage { |
| 129 | margin-top: 1rem; | 172 | margin-top: 1rem; |
| 130 | display: flex; | 173 | display: flex; |
| ... | @@ -136,11 +179,9 @@ export default { | ... | @@ -136,11 +179,9 @@ export default { |
| 136 | padding-top: 1rem; | 179 | padding-top: 1rem; |
| 137 | background-color: #f0f0f0; | 180 | background-color: #f0f0f0; |
| 138 | border-top: 4px solid @primary-color; | 181 | border-top: 4px solid @primary-color; |
| 139 | - p { | ||
| 140 | line-height: 2; | 182 | line-height: 2; |
| 141 | } | 183 | } |
| 142 | } | 184 | } |
| 143 | - } | ||
| 144 | .product-info { | 185 | .product-info { |
| 145 | .info-control { | 186 | .info-control { |
| 146 | display: flex; | 187 | display: flex; |
| ... | @@ -155,6 +196,7 @@ export default { | ... | @@ -155,6 +196,7 @@ export default { |
| 155 | background-color: #f3f3f3; | 196 | background-color: #f3f3f3; |
| 156 | padding: 1rem 2.2rem; | 197 | padding: 1rem 2.2rem; |
| 157 | border-radius: 5px; | 198 | border-radius: 5px; |
| 199 | + margin-right: 1rem; | ||
| 158 | &:hover { | 200 | &:hover { |
| 159 | cursor: pointer; | 201 | cursor: pointer; |
| 160 | } | 202 | } |
| ... | @@ -168,19 +210,36 @@ export default { | ... | @@ -168,19 +210,36 @@ export default { |
| 168 | display: flex; | 210 | display: flex; |
| 169 | justify-content: space-between; | 211 | justify-content: space-between; |
| 170 | align-items: center; | 212 | align-items: center; |
| 171 | - padding: 2rem 0; | 213 | + padding-top: 2rem; |
| 172 | color: #6b6b6b; | 214 | color: #6b6b6b; |
| 173 | .info-list-title { | 215 | .info-list-title { |
| 174 | display: flex; align-items: center; | 216 | display: flex; align-items: center; |
| 175 | } | 217 | } |
| 176 | .info-list-control { | 218 | .info-list-control { |
| 219 | + display: flex; | ||
| 220 | + justify-content: center; | ||
| 221 | + align-items: center; | ||
| 177 | span { | 222 | span { |
| 223 | + margin-right: 1rem; | ||
| 178 | &:hover { | 224 | &:hover { |
| 179 | cursor: pointer; | 225 | cursor: pointer; |
| 180 | color: @primary-color; | 226 | color: @primary-color; |
| 181 | text-decoration: underline; | 227 | text-decoration: underline; |
| 182 | } | 228 | } |
| 183 | } | 229 | } |
| 230 | + .download-checked { | ||
| 231 | + font-size: 1.5rem; | ||
| 232 | + color: @primary-color; | ||
| 233 | + &:hover { | ||
| 234 | + cursor: pointer; | ||
| 235 | + } | ||
| 236 | + } | ||
| 237 | + .download-unchecked { | ||
| 238 | + font-size: 1.5rem; | ||
| 239 | + &:hover { | ||
| 240 | + cursor: pointer; | ||
| 241 | + } | ||
| 242 | + } | ||
| 184 | } | 243 | } |
| 185 | } | 244 | } |
| 186 | } | 245 | } | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-09-27 16:53:09 | 2 | * @Date: 2024-09-27 16:53:09 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-09-30 14:00:01 | 4 | + * @LastEditTime: 2024-09-30 14:09:02 |
| 5 | * @FilePath: /hager/src/views/product/index.vue | 5 | * @FilePath: /hager/src/views/product/index.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -99,22 +99,7 @@ export default { | ... | @@ -99,22 +99,7 @@ export default { |
| 99 | margin-bottom: 0.5rem; | 99 | margin-bottom: 0.5rem; |
| 100 | } | 100 | } |
| 101 | } | 101 | } |
| 102 | - } | ||
| 103 | 102 | ||
| 104 | - .el-collapse { | ||
| 105 | - border-top: 0; | ||
| 106 | - } | ||
| 107 | - .el-collapse-item { | ||
| 108 | - .el-collapse-item__header { | ||
| 109 | - font-size: 0.9rem; | ||
| 110 | - } | ||
| 111 | - .p-item { | ||
| 112 | - &:hover { | ||
| 113 | - cursor: pointer; | ||
| 114 | - text-decoration: underline; | ||
| 115 | - } | ||
| 116 | - } | ||
| 117 | - } | ||
| 118 | 103 | ||
| 119 | .product-list { | 104 | .product-list { |
| 120 | display: flex; | 105 | display: flex; |
| ... | @@ -143,4 +128,20 @@ export default { | ... | @@ -143,4 +128,20 @@ export default { |
| 143 | text-decoration: underline; | 128 | text-decoration: underline; |
| 144 | } | 129 | } |
| 145 | } | 130 | } |
| 131 | + } | ||
| 132 | + | ||
| 133 | + .el-collapse { | ||
| 134 | + border-top: 0; | ||
| 135 | + } | ||
| 136 | + .el-collapse-item { | ||
| 137 | + .el-collapse-item__header { | ||
| 138 | + font-size: 0.9rem; | ||
| 139 | + } | ||
| 140 | + .p-item { | ||
| 141 | + &:hover { | ||
| 142 | + cursor: pointer; | ||
| 143 | + text-decoration: underline; | ||
| 144 | + } | ||
| 145 | + } | ||
| 146 | + } | ||
| 146 | </style> | 147 | </style> | ... | ... |
-
Please register or login to post a comment