This commit is contained in:
parent
46c1467427
commit
e89086eb42
|
|
@ -0,0 +1,11 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
import request_formdata from '@/utils/request_formdata'
|
||||||
|
|
||||||
|
// 查询产品中心列表
|
||||||
|
export function getProductCenterListAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: '/product/screen/getProductList',
|
||||||
|
method: 'POST',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
|
|
@ -81,8 +81,8 @@
|
||||||
@click="onHandleExport"
|
@click="onHandleExport"
|
||||||
>
|
>
|
||||||
导出
|
导出
|
||||||
</el-button> -->
|
</el-button>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="login-content">
|
<!-- <div class="login-content"> -->
|
||||||
<div class="login-container">
|
<div class="login-container">
|
||||||
<!-- 左侧背景区域 -->
|
<!-- 左侧背景区域 -->
|
||||||
<div class="login-left">
|
<div class="login-left">
|
||||||
|
|
@ -171,7 +171,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- </div> -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -394,12 +394,12 @@ export default {
|
||||||
}
|
}
|
||||||
.login-container {
|
.login-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 80%;
|
height: 100%;
|
||||||
width: 80%;
|
width: 100%;
|
||||||
background: #f5f7fa;
|
background: #f5f7fa;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-radius: 10px;
|
// border-radius: 10px;
|
||||||
box-shadow: 0 0 10px 0 rgba(164, 51, 199, 0.658);
|
// box-shadow: 0 0 10px 0 rgba(164, 51, 199, 0.658);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 左侧背景区域
|
// 左侧背景区域
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,11 @@
|
||||||
<!-- 左侧分类菜单 -->
|
<!-- 左侧分类菜单 -->
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<div
|
<div
|
||||||
v-for="category in categories"
|
|
||||||
:key="category.key"
|
:key="category.key"
|
||||||
class="category-item"
|
class="category-item"
|
||||||
:class="{ active: activeCategory === category.key }"
|
v-for="category in categories"
|
||||||
@click="activeCategory = category.key"
|
@click="activeCategory = category.key"
|
||||||
|
:class="{ active: activeCategory === category.key }"
|
||||||
>
|
>
|
||||||
{{ category.label }}
|
{{ category.label }}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -20,30 +20,27 @@
|
||||||
<div class="content-area">
|
<div class="content-area">
|
||||||
<div class="services-grid">
|
<div class="services-grid">
|
||||||
<div
|
<div
|
||||||
v-for="service in filteredServices"
|
:key="item.id"
|
||||||
:key="service.id"
|
|
||||||
class="service-card"
|
class="service-card"
|
||||||
@mouseenter="handleCardHover(service.id)"
|
|
||||||
@mouseleave="handleCardLeave"
|
@mouseleave="handleCardLeave"
|
||||||
|
v-for="item in productListAll"
|
||||||
|
@mouseenter="handleCardHover(service.id)"
|
||||||
>
|
>
|
||||||
<div class="card-image">
|
<div class="card-image">
|
||||||
<img
|
<img :src="item.linkImage" :alt="item.name" />
|
||||||
:src="apiBase + service.image"
|
|
||||||
:alt="service.title"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<h3 class="card-title">{{ service.title }}</h3>
|
<h3 class="card-title">{{ item.name }}</h3>
|
||||||
<div class="card-actions">
|
<div class="card-actions">
|
||||||
<button
|
<button
|
||||||
class="btn btn-primary"
|
class="btn btn-primary"
|
||||||
@click="handleDemo(service)"
|
@click="handleDemo(item)"
|
||||||
>
|
>
|
||||||
访问演示
|
访问演示
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="btn btn-outline"
|
class="btn btn-outline"
|
||||||
@click="handleDetail(service)"
|
@click="handleDetail(item)"
|
||||||
>
|
>
|
||||||
查看详情
|
查看详情
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -57,6 +54,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { getProductCenterListAPI } from '@/api/publicService/productCenter'
|
||||||
export default {
|
export default {
|
||||||
name: 'ProductCenter',
|
name: 'ProductCenter',
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -152,32 +150,34 @@ export default {
|
||||||
description: '应急响应智能化中心',
|
description: '应急响应智能化中心',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
|
productListAll: [], // 所有产品列表
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
filteredServices() {
|
filteredServices() {
|
||||||
let filtered = this.services
|
// let filtered = this.services
|
||||||
|
// // 按分类筛选
|
||||||
// 按分类筛选
|
// if (this.activeCategory !== 'all') {
|
||||||
if (this.activeCategory !== 'all') {
|
// filtered = filtered.filter(
|
||||||
filtered = filtered.filter(
|
// (service) => service.category === this.activeCategory,
|
||||||
(service) => service.category === this.activeCategory,
|
// )
|
||||||
)
|
// }
|
||||||
}
|
// // 按搜索关键词筛选
|
||||||
|
// if (this.searchKeyword.trim()) {
|
||||||
// 按搜索关键词筛选
|
// const keyword = this.searchKeyword.toLowerCase()
|
||||||
if (this.searchKeyword.trim()) {
|
// filtered = filtered.filter(
|
||||||
const keyword = this.searchKeyword.toLowerCase()
|
// (service) =>
|
||||||
filtered = filtered.filter(
|
// service.title.toLowerCase().includes(keyword) ||
|
||||||
(service) =>
|
// service.description.toLowerCase().includes(keyword),
|
||||||
service.title.toLowerCase().includes(keyword) ||
|
// )
|
||||||
service.description.toLowerCase().includes(keyword),
|
// }
|
||||||
)
|
// return filtered
|
||||||
}
|
|
||||||
|
|
||||||
return filtered
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.getProductCenterListInScreenFun()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleNavChange(navKey) {
|
handleNavChange(navKey) {
|
||||||
this.activeNav = navKey
|
this.activeNav = navKey
|
||||||
|
|
@ -185,9 +185,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
handleDemo(service) {
|
handleDemo(service) {
|
||||||
console.log('访问演示:', service.title)
|
window.open(service.link, '_blank')
|
||||||
// 这里可以跳转到演示页面
|
|
||||||
this.$message.success(`正在打开 ${service.title} 演示`)
|
|
||||||
},
|
},
|
||||||
// 在 index.vue 中的 handleDetail 方法
|
// 在 index.vue 中的 handleDetail 方法
|
||||||
handleDetail(service) {
|
handleDetail(service) {
|
||||||
|
|
@ -208,6 +206,15 @@ export default {
|
||||||
handleCardLeave() {
|
handleCardLeave() {
|
||||||
this.hoveredCard = null
|
this.hoveredCard = null
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 获取产品列表
|
||||||
|
async getProductCenterListInScreenFun() {
|
||||||
|
const res = await getProductCenterListAPI({})
|
||||||
|
|
||||||
|
console.log(res, 'res')
|
||||||
|
this.productListAll = res.data
|
||||||
|
// this.services = res.data
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -343,7 +350,10 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.category-item.active {
|
.category-item.active {
|
||||||
background-color: #4a90e2;
|
// background-color: #4a90e2;
|
||||||
|
background: url('../../../assets/images/publicService/btn-sel.png')
|
||||||
|
no-repeat center center;
|
||||||
|
background-size: 100% 100%;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -385,7 +395,7 @@ export default {
|
||||||
.card-image img {
|
.card-image img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
object-fit: contain; /* 关键:完整显示图片,不裁剪,保持比例 */
|
// object-fit: contain; /* 关键:完整显示图片,不裁剪,保持比例 */
|
||||||
transition: transform 0.3s ease;
|
transition: transform 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue