This commit is contained in:
BianLzhaoMin 2025-09-11 13:48:59 +08:00
parent 46c1467427
commit e89086eb42
5 changed files with 207 additions and 186 deletions

View File

@ -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

View File

@ -81,8 +81,8 @@
@click="onHandleExport" @click="onHandleExport"
> >
导出 导出
</el-button> --> </el-button>
</el-col> </el-col> -->
</el-row> </el-row>
<!-- 表格 --> <!-- 表格 -->

View File

@ -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);
} }
// //

View File

@ -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;
} }