fix: 相关命名修正
- production -> product
This commit is contained in:
19
app/app.vue
19
app/app.vue
@ -11,26 +11,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ElConfigProvider } from 'element-plus';
|
import { ElConfigProvider } from 'element-plus';
|
||||||
|
|
||||||
const { login } = useStrapiAuth();
|
|
||||||
|
|
||||||
const { getElementPlusLocale } = useLocalizations();
|
const { getElementPlusLocale } = useLocalizations();
|
||||||
|
|
||||||
const elementPlusLocale = getElementPlusLocale();
|
const elementPlusLocale = getElementPlusLocale();
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
// 检查用户是否已登录
|
|
||||||
const user = useStrapiUser();
|
|
||||||
if (!user.value) {
|
|
||||||
// 如果未登录,重定向到登录页面
|
|
||||||
login({ identifier: 'remilia', password: 'huanshuo51' })
|
|
||||||
.then(() => {
|
|
||||||
console.log('Login successful');
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
console.error('Login failed:', error);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
console.log('User is already logged in:', user.value);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -20,8 +20,8 @@
|
|||||||
<NuxtLinkLocale to="/">{{ $t('navigation.home') }}</NuxtLinkLocale>
|
<NuxtLinkLocale to="/">{{ $t('navigation.home') }}</NuxtLinkLocale>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<NuxtLink :to="$localePath('/productions')">{{
|
<NuxtLink :to="$localePath('/products')">{{
|
||||||
$t('navigation.productions')
|
$t('navigation.products')
|
||||||
}}</NuxtLink>
|
}}</NuxtLink>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|||||||
@ -21,8 +21,8 @@
|
|||||||
:persistent="false"
|
:persistent="false"
|
||||||
router
|
router
|
||||||
>
|
>
|
||||||
<el-menu-item index="productions" :route="$localePath('/productions')">
|
<el-menu-item index="products" :route="$localePath('/products')">
|
||||||
<span class="title">{{ $t('navigation.productions') }}</span>
|
<span class="title">{{ $t('navigation.products') }}</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-menu-item index="solutions" :route="$localePath('/solutions')">
|
<el-menu-item index="solutions" :route="$localePath('/solutions')">
|
||||||
<span class="title">{{ $t('navigation.solutions') }}</span>
|
<span class="title">{{ $t('navigation.solutions') }}</span>
|
||||||
@ -81,8 +81,8 @@
|
|||||||
|
|
||||||
const refreshMenu = () => {
|
const refreshMenu = () => {
|
||||||
const path = router.currentRoute.value.path;
|
const path = router.currentRoute.value.path;
|
||||||
if (path.startsWith('/productions')) {
|
if (path.startsWith('/products')) {
|
||||||
activeName.value = 'productions';
|
activeName.value = 'products';
|
||||||
} else if (path.startsWith('/solutions')) {
|
} else if (path.startsWith('/solutions')) {
|
||||||
activeName.value = 'solutions';
|
activeName.value = 'solutions';
|
||||||
} else if (path.startsWith('/support')) {
|
} else if (path.startsWith('/support')) {
|
||||||
|
|||||||
@ -1,14 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-card class="production-card" @click="handleClick">
|
<el-card class="product-card" @click="handleClick">
|
||||||
<template #header>
|
<template #header>
|
||||||
<!-- Image -->
|
<!-- Image -->
|
||||||
<el-image class="production-image" :src="imageUrl" fit="contain" />
|
<el-image class="product-image" :src="imageUrl" fit="contain" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<!-- Name -->
|
<!-- Name -->
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<span class="production-name">{{ name }}</span>
|
<span class="product-name">{{ name }}</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- Description -->
|
<!-- Description -->
|
||||||
<div class="card-description text-left opacity-25">{{ description }}</div>
|
<div class="card-description text-left opacity-25">{{ description }}</div>
|
||||||
@ -32,25 +32,25 @@
|
|||||||
// 优先使用 slug,如果没有则使用 id
|
// 优先使用 slug,如果没有则使用 id
|
||||||
const routeParam = props.slug || props.id;
|
const routeParam = props.slug || props.id;
|
||||||
if (routeParam) {
|
if (routeParam) {
|
||||||
navigateTo(localePath(`/productions/${routeParam}`));
|
navigateTo(localePath(`/products/${routeParam}`));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.production-card {
|
.product-card {
|
||||||
width: 30%;
|
width: 30%;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.production-card:hover {
|
.product-card:hover {
|
||||||
transform: translateY(-4px);
|
transform: translateY(-4px);
|
||||||
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
|
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
|
||||||
}
|
}
|
||||||
|
|
||||||
.production-name {
|
.product-name {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
@ -60,7 +60,7 @@
|
|||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.production-card .el-image {
|
.product-card .el-image {
|
||||||
height: 150px;
|
height: 150px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
@ -73,13 +73,13 @@
|
|||||||
|
|
||||||
/* 响应式设计 */
|
/* 响应式设计 */
|
||||||
@media (max-width: 1200px) {
|
@media (max-width: 1200px) {
|
||||||
.production-card {
|
.product-card {
|
||||||
width: 45%;
|
width: 45%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.production-card {
|
.product-card {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -84,7 +84,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
const indexLabels = computed<Record<string, string>>(() => ({
|
const indexLabels = computed<Record<string, string>>(() => ({
|
||||||
production: t('search.sections.production'),
|
product: t('search.sections.product'),
|
||||||
solution: t('search.sections.solution'),
|
solution: t('search.sections.solution'),
|
||||||
support: t('search.sections.support'),
|
support: t('search.sections.support'),
|
||||||
default: t('search.sections.default'),
|
default: t('search.sections.default'),
|
||||||
@ -116,7 +116,7 @@
|
|||||||
const slug = String(slugCandidate);
|
const slug = String(slugCandidate);
|
||||||
|
|
||||||
if (item.type === 'product') {
|
if (item.type === 'product') {
|
||||||
return localePath({ path: `/productions/${slug}` });
|
return localePath({ path: `/products/${slug}` });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.type === 'solution') {
|
if (item.type === 'solution') {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="page-container">
|
<div class="page-container">
|
||||||
<div v-if="!pending">
|
<div v-if="!pending">
|
||||||
<div v-if="production">
|
<div v-if="product">
|
||||||
<!-- 面包屑导航 -->
|
<!-- 面包屑导航 -->
|
||||||
<el-breadcrumb class="breadcrumb" separator="/">
|
<el-breadcrumb class="breadcrumb" separator="/">
|
||||||
<el-breadcrumb-item class="text-md opacity-50">
|
<el-breadcrumb-item class="text-md opacity-50">
|
||||||
@ -10,44 +10,44 @@
|
|||||||
}}</NuxtLink>
|
}}</NuxtLink>
|
||||||
</el-breadcrumb-item>
|
</el-breadcrumb-item>
|
||||||
<el-breadcrumb-item class="text-md opacity-50">
|
<el-breadcrumb-item class="text-md opacity-50">
|
||||||
<NuxtLink :to="$localePath('/productions')">{{
|
<NuxtLink :to="$localePath('/products')">{{
|
||||||
$t('navigation.productions')
|
$t('navigation.products')
|
||||||
}}</NuxtLink>
|
}}</NuxtLink>
|
||||||
</el-breadcrumb-item>
|
</el-breadcrumb-item>
|
||||||
<el-breadcrumb-item class="text-md opactiy-50">{{
|
<el-breadcrumb-item class="text-md opactiy-50">{{
|
||||||
production.name
|
product.name
|
||||||
}}</el-breadcrumb-item>
|
}}</el-breadcrumb-item>
|
||||||
</el-breadcrumb>
|
</el-breadcrumb>
|
||||||
|
|
||||||
<!-- 产品详情内容 -->
|
<!-- 产品详情内容 -->
|
||||||
<div class="production-header">
|
<div class="product-header">
|
||||||
<div class="production-image">
|
<div class="product-image">
|
||||||
<el-image
|
<el-image
|
||||||
v-if="production.images.length <= 1"
|
v-if="product.images.length <= 1"
|
||||||
:src="getImageUrl(production.images[0].image)"
|
:src="getImageUrl(product.images[0].image)"
|
||||||
:alt="production.name"
|
:alt="product.name"
|
||||||
fit="contain"
|
fit="contain"
|
||||||
/>
|
/>
|
||||||
<el-carousel
|
<el-carousel
|
||||||
v-else
|
v-else
|
||||||
class="production-carousel"
|
class="product-carousel"
|
||||||
height="500px"
|
height="500px"
|
||||||
:autoplay="false"
|
:autoplay="false"
|
||||||
:loop="false"
|
:loop="false"
|
||||||
arrow="always"
|
arrow="always"
|
||||||
>
|
>
|
||||||
<el-carousel-item
|
<el-carousel-item
|
||||||
v-for="(item, index) in production.images || []"
|
v-for="(item, index) in product.images || []"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<div class="production-carousel-item">
|
<div class="product-carousel-item">
|
||||||
<el-image
|
<el-image
|
||||||
:src="getImageUrl(item.image || '')"
|
:src="getImageUrl(item.image || '')"
|
||||||
:alt="production.name"
|
:alt="product.name"
|
||||||
fit="contain"
|
fit="contain"
|
||||||
lazy
|
lazy
|
||||||
/>
|
/>
|
||||||
<p v-if="item.caption" class="production-image-caption">
|
<p v-if="item.caption" class="product-image-caption">
|
||||||
{{ item.caption }}
|
{{ item.caption }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -55,26 +55,26 @@
|
|||||||
</el-carousel>
|
</el-carousel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="production-info">
|
<div class="product-info">
|
||||||
<h1>{{ production.name }}</h1>
|
<h1>{{ product.name }}</h1>
|
||||||
<p class="summary">{{ production.summary }}</p>
|
<p class="summary">{{ product.summary }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 产品详细描述 -->
|
<!-- 产品详细描述 -->
|
||||||
<div class="production-content">
|
<div class="product-content">
|
||||||
<el-tabs v-model="activeName" class="production-tabs" stretch>
|
<el-tabs v-model="activeName" class="product-tabs" stretch>
|
||||||
<el-tab-pane label="产品详情" name="details">
|
<el-tab-pane label="产品详情" name="details">
|
||||||
<markdown-renderer :content="production.description || ''" />
|
<markdown-renderer :content="product.description || ''" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="技术规格" name="specs">
|
<el-tab-pane label="技术规格" name="specs">
|
||||||
<spec-table :data="production.specs" />
|
<spec-table :data="product.specs" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="常见问题" name="faq">
|
<el-tab-pane label="常见问题" name="faq">
|
||||||
<question-list :questions="production.faqs" />
|
<question-list :questions="product.faqs" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="相关文档" name="documents">
|
<el-tab-pane label="相关文档" name="documents">
|
||||||
<document-list :documents="production.documents" />
|
<document-list :documents="product.documents" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@ -87,8 +87,8 @@
|
|||||||
:sub-title="$t('product-not-found-desc')"
|
:sub-title="$t('product-not-found-desc')"
|
||||||
>
|
>
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<el-button type="primary" @click="$router.push('/productions')">
|
<el-button type="primary" @click="$router.push('/products')">
|
||||||
{{ $t('back-to-productions') }}
|
{{ $t('back-to-products') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-result>
|
</el-result>
|
||||||
@ -117,12 +117,12 @@
|
|||||||
|
|
||||||
console.log('Raw Data: ', data.value);
|
console.log('Raw Data: ', data.value);
|
||||||
|
|
||||||
const rawProduction = computed(() => data.value ?? null);
|
const rawProduct = computed(() => data.value ?? null);
|
||||||
const production = computed(() => {
|
const product = computed(() => {
|
||||||
return toProductView(rawProduction.value);
|
return toProductView(rawProduct.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log('View Data: ', production.value);
|
console.log('View Data: ', product.value);
|
||||||
|
|
||||||
const activeName = ref('details'); // 默认选中概览标签
|
const activeName = ref('details'); // 默认选中概览标签
|
||||||
|
|
||||||
@ -134,11 +134,11 @@
|
|||||||
|
|
||||||
// SEO
|
// SEO
|
||||||
useHead({
|
useHead({
|
||||||
title: computed(() => production.value?.name || 'Product Detail'),
|
title: computed(() => product.value?.name || 'Product Detail'),
|
||||||
meta: [
|
meta: [
|
||||||
{
|
{
|
||||||
name: 'description',
|
name: 'description',
|
||||||
content: computed(() => production.value?.summary || ''),
|
content: computed(() => product.value?.summary || ''),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
@ -155,20 +155,20 @@
|
|||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.production-header {
|
.product-header {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 2fr 1fr;
|
grid-template-columns: 2fr 1fr;
|
||||||
gap: 3rem;
|
gap: 3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.production-image .el-image {
|
.product-image .el-image {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 500px;
|
height: 500px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.production-image-caption {
|
.product-image-caption {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 10px;
|
bottom: 10px;
|
||||||
/* left: 10%; */
|
/* left: 10%; */
|
||||||
@ -180,7 +180,7 @@
|
|||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.production-carousel :deep(.el-carousel__button) {
|
.product-carousel :deep(.el-carousel__button) {
|
||||||
/* 指示器按钮样式 */
|
/* 指示器按钮样式 */
|
||||||
width: 8px;
|
width: 8px;
|
||||||
height: 8px;
|
height: 8px;
|
||||||
@ -189,7 +189,7 @@
|
|||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.production-info h1 {
|
.product-info h1 {
|
||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
@ -202,16 +202,16 @@
|
|||||||
margin-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.production-tabs ::v-deep(.el-tabs__nav) {
|
.product-tabs ::v-deep(.el-tabs__nav) {
|
||||||
min-width: 30%;
|
min-width: 30%;
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.production-tabs ::v-deep(.el-tabs__content) {
|
.product-tabs ::v-deep(.el-tabs__content) {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.production-content h2 {
|
.product-content h2 {
|
||||||
color: var(--el-text-color-primary);
|
color: var(--el-text-color-primary);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
@ -232,12 +232,12 @@
|
|||||||
|
|
||||||
/* 响应式设计 */
|
/* 响应式设计 */
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.production-header {
|
.product-header {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
gap: 2rem;
|
gap: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.production-info h1 {
|
.product-info h1 {
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="page-container">
|
<div class="page-container">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1 class="page-title">{{ $t('our-productions') }}</h1>
|
<h1 class="page-title">{{ $t('our-products') }}</h1>
|
||||||
<el-breadcrumb class="breadcrumb">
|
<el-breadcrumb class="breadcrumb">
|
||||||
<el-breadcrumb-item class="text-md opacity-50">
|
<el-breadcrumb-item class="text-md opacity-50">
|
||||||
<NuxtLink :to="$localePath('/')">{{
|
<NuxtLink :to="$localePath('/')">{{
|
||||||
@ -9,29 +9,29 @@
|
|||||||
}}</NuxtLink>
|
}}</NuxtLink>
|
||||||
</el-breadcrumb-item>
|
</el-breadcrumb-item>
|
||||||
<el-breadcrumb-item class="text-md opacity-50">
|
<el-breadcrumb-item class="text-md opacity-50">
|
||||||
<NuxtLink :to="$localePath('/productions')">{{
|
<NuxtLink :to="$localePath('/products')">{{
|
||||||
$t('navigation.productions')
|
$t('navigation.products')
|
||||||
}}</NuxtLink>
|
}}</NuxtLink>
|
||||||
</el-breadcrumb-item>
|
</el-breadcrumb-item>
|
||||||
</el-breadcrumb>
|
</el-breadcrumb>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!pending" class="page-content">
|
<div v-if="!pending" class="page-content">
|
||||||
<div class="productions-container">
|
<div class="products-container">
|
||||||
<el-collapse v-model="activeNames" class="production-collapse">
|
<el-collapse v-model="activeNames" class="product-collapse">
|
||||||
<el-collapse-item
|
<el-collapse-item
|
||||||
v-for="(group, type) in groupedProductions"
|
v-for="(group, type) in groupedProducts"
|
||||||
:key="type"
|
:key="type"
|
||||||
:title="type || '未分类'"
|
:title="type || '未分类'"
|
||||||
:name="type || 'no-category'"
|
:name="type || 'no-category'"
|
||||||
>
|
>
|
||||||
<div class="group-list">
|
<div class="group-list">
|
||||||
<production-card
|
<product-card
|
||||||
v-for="production in group"
|
v-for="product in group"
|
||||||
:key="production.id"
|
:key="product.id"
|
||||||
:slug="production.id.toString()"
|
:slug="product.id.toString()"
|
||||||
:image-url="getImageUrl(production.cover.toString())"
|
:image-url="getImageUrl(product.cover.toString())"
|
||||||
:name="production.name"
|
:name="product.name"
|
||||||
:description="production.summary || ''"
|
:description="product.summary || ''"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
@ -51,16 +51,16 @@
|
|||||||
|
|
||||||
const activeNames = ref<string[]>([]);
|
const activeNames = ref<string[]>([]);
|
||||||
|
|
||||||
const productionsRaw = computed(() => data.value ?? []);
|
const productsRaw = computed(() => data.value ?? []);
|
||||||
const productions = computed(() =>
|
const products = computed(() =>
|
||||||
productionsRaw.value.map((item) => toProductListView(item))
|
productsRaw.value.map((item) => toProductListView(item))
|
||||||
);
|
);
|
||||||
|
|
||||||
// 按类型分组
|
// 按类型分组
|
||||||
// 兼容 production_type 既可能为对象也可能为字符串
|
// 兼容 product_type 既可能为对象也可能为字符串
|
||||||
const groupedProductions = computed(() => {
|
const groupedProducts = computed(() => {
|
||||||
const groups: Record<string, ProductListView[]> = {};
|
const groups: Record<string, ProductListView[]> = {};
|
||||||
for (const prod of productions.value) {
|
for (const prod of products.value) {
|
||||||
let typeKey = '';
|
let typeKey = '';
|
||||||
if (typeof prod.product_type === 'string') {
|
if (typeof prod.product_type === 'string') {
|
||||||
typeKey = prod.product_type;
|
typeKey = prod.product_type;
|
||||||
@ -78,10 +78,10 @@
|
|||||||
return groups;
|
return groups;
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(groupedProductions, () => {
|
watch(groupedProducts, () => {
|
||||||
if (groupedProductions.value) {
|
if (groupedProducts.value) {
|
||||||
activeNames.value = [
|
activeNames.value = [
|
||||||
...Object.keys(groupedProductions.value),
|
...Object.keys(groupedProducts.value),
|
||||||
'no-category',
|
'no-category',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -100,9 +100,9 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
if (groupedProductions.value) {
|
if (groupedProducts.value) {
|
||||||
activeNames.value = [
|
activeNames.value = [
|
||||||
...Object.keys(groupedProductions.value),
|
...Object.keys(groupedProducts.value),
|
||||||
'no-category',
|
'no-category',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -131,13 +131,13 @@
|
|||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.productions-container {
|
.products-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 40px;
|
gap: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.production-group {
|
.product-group {
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,12 +35,12 @@
|
|||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
:label="`产品(${resultCount['product'] || 0})`"
|
:label="`产品(${resultCount['product'] || 0})`"
|
||||||
name="production"
|
name="product"
|
||||||
>
|
>
|
||||||
<search-results
|
<search-results
|
||||||
v-model:current-page="currentPage"
|
v-model:current-page="currentPage"
|
||||||
:search-items="searchItems"
|
:search-items="searchItems"
|
||||||
category="production"
|
category="product"
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
:sub-title="$t('solution-not-found-desc')"
|
:sub-title="$t('solution-not-found-desc')"
|
||||||
>
|
>
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<el-button type="primary" @click="$router.push('/productions')">
|
<el-button type="primary" @click="$router.push('/solutions')">
|
||||||
{{ $t('back-to-solutions') }}
|
{{ $t('back-to-solutions') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -108,7 +108,7 @@
|
|||||||
|
|
||||||
const filteredDocuments = computed(() =>
|
const filteredDocuments = computed(() =>
|
||||||
documents.value.filter((doc: DocumentListView) => {
|
documents.value.filter((doc: DocumentListView) => {
|
||||||
const matchProduction = selectedProduct.value
|
const matchProduct = selectedProduct.value
|
||||||
? doc.products?.some(
|
? doc.products?.some(
|
||||||
(product: DocumentListProduct) =>
|
(product: DocumentListProduct) =>
|
||||||
product.id === selectedProduct.value
|
product.id === selectedProduct.value
|
||||||
@ -124,7 +124,7 @@
|
|||||||
? doc.title && doc.title.includes(keyword.value)
|
? doc.title && doc.title.includes(keyword.value)
|
||||||
: true;
|
: true;
|
||||||
|
|
||||||
return matchProduction && matchKeyword;
|
return matchProduct && matchKeyword;
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -34,18 +34,14 @@
|
|||||||
:value="type.id"
|
:value="type.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-select
|
<el-sel v-model="selectedProduct" placeholder="选择系列产品" clearable>
|
||||||
v-model="selectedProduct"
|
|
||||||
placeholder="选择系列产品"
|
|
||||||
clearable
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="production in productOptions"
|
v-for="product in productOptions"
|
||||||
:key="production.id"
|
:key="product.id"
|
||||||
:label="production.name"
|
:label="product.name"
|
||||||
:value="production.id"
|
:value="product.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-sel>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="keyword"
|
v-model="keyword"
|
||||||
placeholder="输入关键词..."
|
placeholder="输入关键词..."
|
||||||
@ -105,7 +101,7 @@
|
|||||||
|
|
||||||
const filteredQuestions = computed(() => {
|
const filteredQuestions = computed(() => {
|
||||||
return questions.value.filter((question: QuestionListView) => {
|
return questions.value.filter((question: QuestionListView) => {
|
||||||
const matchProduction = selectedProduct.value
|
const matchProduct = selectedProduct.value
|
||||||
? question.products?.some(
|
? question.products?.some(
|
||||||
(product: QuestionListProduct) =>
|
(product: QuestionListProduct) =>
|
||||||
product.id === selectedProduct.value
|
product.id === selectedProduct.value
|
||||||
@ -122,7 +118,7 @@
|
|||||||
(question.content && question.content.includes(keyword.value))
|
(question.content && question.content.includes(keyword.value))
|
||||||
: true;
|
: true;
|
||||||
|
|
||||||
return matchProduction && matchKeyword;
|
return matchProduct && matchKeyword;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
"no-query": "Enter a keyword to start searching.",
|
"no-query": "Enter a keyword to start searching.",
|
||||||
"untitled": "Untitled",
|
"untitled": "Untitled",
|
||||||
"sections": {
|
"sections": {
|
||||||
"production": "Products",
|
"product": "Products",
|
||||||
"solution": "Solutions",
|
"solution": "Solutions",
|
||||||
"support": "Support",
|
"support": "Support",
|
||||||
"default": "Other"
|
"default": "Other"
|
||||||
@ -21,14 +21,14 @@
|
|||||||
"company-name": "Jinshen Machinary Manufacturing Co., Ltd.",
|
"company-name": "Jinshen Machinary Manufacturing Co., Ltd.",
|
||||||
"company-description": "We specialize in manufacturing a range of paper tube and can equipment, integrating design, manufacturing, sales, and service.",
|
"company-description": "We specialize in manufacturing a range of paper tube and can equipment, integrating design, manufacturing, sales, and service.",
|
||||||
"learn-more": "Learn More",
|
"learn-more": "Learn More",
|
||||||
"productions-desc": "We provide high-quality product solutions to meet various business needs.",
|
"products-desc": "We provide high-quality product solutions to meet various business needs.",
|
||||||
"solutions-desc": "Providing customized technology solutions for enterprises to accelerate digital transformation.",
|
"solutions-desc": "Providing customized technology solutions for enterprises to accelerate digital transformation.",
|
||||||
"support-desc": "24/7 professional technical support to ensure stable operation of your business.",
|
"support-desc": "24/7 professional technical support to ensure stable operation of your business.",
|
||||||
"quick-links": "Quick Links",
|
"quick-links": "Quick Links",
|
||||||
"utilities": "Utilities",
|
"utilities": "Utilities",
|
||||||
"navigation": {
|
"navigation": {
|
||||||
"home": "Home",
|
"home": "Home",
|
||||||
"productions": "Productions",
|
"products": "Products",
|
||||||
"solutions": "Solutions",
|
"solutions": "Solutions",
|
||||||
"support": "Support",
|
"support": "Support",
|
||||||
"about-us": "About Us",
|
"about-us": "About Us",
|
||||||
@ -50,13 +50,13 @@
|
|||||||
"product-details": "Product Details",
|
"product-details": "Product Details",
|
||||||
"product-not-found": "Product Not Found",
|
"product-not-found": "Product Not Found",
|
||||||
"product-not-found-desc": "Sorry, the product you are looking for does not exist or has been removed.",
|
"product-not-found-desc": "Sorry, the product you are looking for does not exist or has been removed.",
|
||||||
"back-to-productions": "Back to Products",
|
"back-to-products": "Back to Products",
|
||||||
"solution-not-found": "Solution Not Found",
|
"solution-not-found": "Solution Not Found",
|
||||||
"solution-not-found-desc": "Sorry, the solution you are lokking for does not exist or has been removed.",
|
"solution-not-found-desc": "Sorry, the solution you are lokking for does not exist or has been removed.",
|
||||||
"back-to-solutions": "Back to Solutions",
|
"back-to-solutions": "Back to Solutions",
|
||||||
"no-content-available": "No detailed information available",
|
"no-content-available": "No detailed information available",
|
||||||
"loading": "Loading...",
|
"loading": "Loading...",
|
||||||
"our-productions": "Our Productions",
|
"our-products": "Our Products",
|
||||||
"learn-our-solutions": "Learn Our Solutions",
|
"learn-our-solutions": "Learn Our Solutions",
|
||||||
"all": "All"
|
"all": "All"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
"no-query": "请输入关键字开始搜索。",
|
"no-query": "请输入关键字开始搜索。",
|
||||||
"untitled": "未命名条目",
|
"untitled": "未命名条目",
|
||||||
"sections": {
|
"sections": {
|
||||||
"production": "产品",
|
"product": "产品",
|
||||||
"solution": "解决方案",
|
"solution": "解决方案",
|
||||||
"support": "服务支持",
|
"support": "服务支持",
|
||||||
"default": "其他内容"
|
"default": "其他内容"
|
||||||
@ -21,14 +21,14 @@
|
|||||||
"company-name": "金申机械制造有限公司",
|
"company-name": "金申机械制造有限公司",
|
||||||
"company-description": "专业生产一系列纸管、纸罐设备,集设计、制造、销售、服务于一体。",
|
"company-description": "专业生产一系列纸管、纸罐设备,集设计、制造、销售、服务于一体。",
|
||||||
"learn-more": "了解更多",
|
"learn-more": "了解更多",
|
||||||
"productions-desc": "我们提供高质量的产品解决方案,满足各种业务需求。",
|
"products-desc": "我们提供高质量的产品解决方案,满足各种业务需求。",
|
||||||
"solutions-desc": "为企业提供定制化的技术解决方案,助力数字化转型。",
|
"solutions-desc": "为企业提供定制化的技术解决方案,助力数字化转型。",
|
||||||
"support-desc": "7x24小时专业技术支持,确保您的业务稳定运行。",
|
"support-desc": "7x24小时专业技术支持,确保您的业务稳定运行。",
|
||||||
"quick-links": "快速链接",
|
"quick-links": "快速链接",
|
||||||
"utilities": "实用工具",
|
"utilities": "实用工具",
|
||||||
"navigation": {
|
"navigation": {
|
||||||
"home": "主页",
|
"home": "主页",
|
||||||
"productions": "产品中心",
|
"products": "产品中心",
|
||||||
"solutions": "解决方案",
|
"solutions": "解决方案",
|
||||||
"support": "服务支持",
|
"support": "服务支持",
|
||||||
"about-us": "关于我们",
|
"about-us": "关于我们",
|
||||||
@ -50,13 +50,13 @@
|
|||||||
"product-details": "产品详情",
|
"product-details": "产品详情",
|
||||||
"product-not-found": "产品未找到",
|
"product-not-found": "产品未找到",
|
||||||
"product-not-found-desc": "抱歉,您访问的产品不存在或已被删除。",
|
"product-not-found-desc": "抱歉,您访问的产品不存在或已被删除。",
|
||||||
"back-to-productions": "返回产品列表",
|
"back-to-products": "返回产品列表",
|
||||||
"solution-not-found": "解决方案未找到",
|
"solution-not-found": "解决方案未找到",
|
||||||
"solution-not-found-desc": "抱歉,您访问的解决方案不存在或已被删除",
|
"solution-not-found-desc": "抱歉,您访问的解决方案不存在或已被删除",
|
||||||
"back-to-solutions": "返回解决方案列表",
|
"back-to-solutions": "返回解决方案列表",
|
||||||
"no-content-available": "暂无详细信息",
|
"no-content-available": "暂无详细信息",
|
||||||
"loading": "加载中...",
|
"loading": "加载中...",
|
||||||
"our-productions": "我们的产品",
|
"our-products": "我们的产品",
|
||||||
"learn-our-solutions": "了解我们的解决方案",
|
"learn-our-solutions": "了解我们的解决方案",
|
||||||
"all": "全部"
|
"all": "全部"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user