tj
2025-04-30 88ca0a435ecc2b6608809cb9cd69b6a2bb0d42fe
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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<template>
    <div class="main-layout">
        <div class="row">
            <!-- Left Sidebar, visible on medium and larger screens -->
            <div class="col-md-3 d-none d-md-block p-3">
                <h5 class="aside-title">所有产品</h5>
                <el-menu :default-active="activeIndex" class="border-0 " @select="handleSelect" @open="handleOpen"
                    @close="handleClose">
                    <template v-for="item in menuItems" :key="item.index">
                        <el-sub-menu v-if="item.subMenu" :index="item.index">
                            <template #title>
                                <img v-if="item.icon && isUrl(item.icon)" :src="item.icon" class="img-round" />
                                <el-icon v-else class="mr-2">
                                    <component :is="item.icon" />
                                </el-icon>
                                <span>{{ item.title }}</span>
                            </template>
                            <el-menu-item-group>
                                <el-menu-item v-for="subItem in item.subMenu" :key="subItem.index"
                                    :index="subItem.index" @click="handleSelectSubmenu(subItem)">
                                    {{ subItem.title }}
                                </el-menu-item>
                            </el-menu-item-group>
                        </el-sub-menu>
 
                        <el-menu-item v-else :index="item.index">
                            <el-icon class="mr-2">
                                <component :is="item.icon" />
                            </el-icon>
                            <span>{{ item.title }}</span>
                        </el-menu-item>
                    </template>
                </el-menu>
 
            </div>
 
            <div class="col-md-3 d-block d-md-none p-3" >
                <el-drawer v-model="drawerVisible" title="所有产品" direction="ltr" size="250px">
                    <el-menu :default-active="activeIndex" class="border-0" @select="handleSelect" @open="handleOpen"
                        @close="handleClose">
                        <template v-for="item in menuItems" :key="item.index">
                            <el-sub-menu v-if="item.subMenu" :index="item.index">
                                <template #title>
                                    <img v-if="item.icon && isUrl(item.icon)" :src="item.icon" class="img-round" />
                                    <el-icon v-else class="mr-2">
                                        <component :is="item.icon" />
                                    </el-icon>
                                    <span>{{ item.title }}</span>
                                </template>
                                <el-menu-item-group>
                                    <el-menu-item v-for="subItem in item.subMenu" :key="subItem.index"
                                        :index="subItem.index" @click="handleSelectSubmenu(subItem)">
                                        {{ subItem.title }}
                                    </el-menu-item>
                                </el-menu-item-group>
                            </el-sub-menu>
 
                            <el-menu-item v-else :index="item.index">
                                <el-icon class="mr-2">
                                    <component :is="item.icon" />
                                </el-icon>
                                <span>{{ item.title }}</span>
                            </el-menu-item>
                        </template>
                    </el-menu>
                </el-drawer>
 
            </div>
 
 
 
            <!-- Main Content Area -->
            <div class="col-12 col-md-9 p-3" style="overflow-y: auto; max-height: 100vh;" >
                <!-- Upper Layer -->
                <div class="mb-3">
                    <div class="border-b border-gray-200 p-1 text-center ">
                        <template v-if="pdfUrl">
                            <h1 class="text-3xl font-bold mb-2 cursor-pointer hover:text-blue-600 hover:underline text-black"
                                @click="openPdf">
                                {{ title }}
                            </h1>
                            <div class="flex justify-center items-center">
                                <PdfViewer :src="pdfUrl" :scale="1.0" :key="pdfUrl" class="w-full" />
                            </div>
                        </template>
 
                        <template v-else>
                            <h1 class="text-3xl font-bold mb-6 text-black">云游四方操作系统</h1>
                            <div class="row justify-content-center d-flex align-items-stretch p-1 ">
                                <!-- Left Image (1 column) -->
                                <div class="col-12 col-md-2 mb-4">
                                    <img src="https://portal2.tos-cn-beijing.volces.com/portal/product-center/产品背景.png"
                                        alt="图1" class="w-100 h-100 object-cover rounded-lg" />
                                </div>
 
                                <!-- Middle Image (3 columns) -->
                                <div class="col-12 col-md-8 mb-4">
                                    <img src="https://portal2.tos-cn-beijing.volces.com/portal/product-center/产品背景2.png"
                                        alt="图2" class="w-100 h-100 object-cover rounded-lg" />
                                </div>
 
                                <!-- Right Image (1 column) -->
                                <div class="col-12 col-md-2 mb-4">
                                    <img src="https://portal2.tos-cn-beijing.volces.com/portal/product-center/产品背景图3.jpg"
                                        alt="图3" class="w-100 h-100 object-cover rounded-lg" />
                                </div>
                            </div>
 
 
                        </template>
                    </div>
                </div>
 
                <!-- Lower Layer -->
                <div class="mb-5">
                    <div class="text-start">
                        <h5>推荐产品</h5>
                    </div>
 
                    <div class="row d-none d-md-flex">
                        <div class="col-12 col-sm-6 col-md-4 mb-4" style="max-width: 280px"
                            v-for="(product, index) in products" :key="index">
                            <div class="card">
                                <!-- 图片部分 -->
                                <div class="d-flex justify-content-center p-2">
                                    <img :src="product.imgUrl" class="card-img-top" :alt="product.title"
                                        style="width: 100%; height: 150px; object-fit: cover;">
                                </div>
                                <div class="card-body d-flex flex-column">
                                    <!-- 标题部分 -->
                                    <h5 class="card-title mb-3" style="height: 50px;">{{ product.title }}</h5>
                                    <!-- 内容部分 -->
                                    <p class="card-text mb-3" v-html="product.desc" style="height: 80px;"></p>
                                </div>
                            </div>
                        </div>
                    </div>
 
                    <div class="row  d-block d-md-none">
                        <div class="justify-content-center" >
                            <div class="col-12 col-sm-6 col-md-4 mb-4 justify-content-center"
                                v-for="(product, index) in products" :key="index">
                                <div class="card ">
                                    <!-- 图片部分 -->
                                    <div class="d-flex justify-content-center p-2">
                                        <img :src="product.imgUrl" class="card-img-top" :alt="product.title"
                                            style="width: 100%; height: 150px; object-fit: cover;">
                                    </div>
                                    <div class="card-body d-flex flex-column">
                                        <!-- 标题部分 -->
                                        <h5 class="card-title mb-3" style="height: 50px;">{{ product.title }}</h5>
                                        <!-- 内容部分 -->
                                        <p class="card-text mb-3" v-html="product.desc" style="height: 80px;"></p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
 
                </div>
            </div>
 
        </div>
 
        <!-- <button class="btn btn-primary rounded-circle floating-btn" @click="handleClick">
            <i class="bi bi-list fs-3 floating-btn"></i>
         </button> -->
        <img :src="menuIcon" alt="icon" 
        style="width: 30px; height: 30px;" class="floating-btn d-block d-md-none" @click="handleClick" />
 
        
    </div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { MenuItem, Products, ProductCenter } from '@/models/portalModels';
import PdfViewer from '@/components/pdf/PdfViewer.vue'
 
import menuIcon from '@/assets/product/menu3.png'
 
const drawerVisible = ref(true)
 
const handleClick = () => {
    drawerVisible.value = !drawerVisible.value
}
 
const title = ref('')
const pdfUrl = ref('')
const curSubItem = ref<MenuItem>({} as MenuItem)
 
const activeIndex = ref('')
 
const menuItems: MenuItem[] = [
    {
        index: '1',
        title: '工业信息化',
        imgUrl: '',
        pdfUrl: '',
        icon: "https://portal2.tos-cn-beijing.volces.com/portal/product-center/menu-icon/bi.svg",
        subMenu: [
            {
                index: '1-1',
                title: 'LIMS实验室管理系统',
                imgUrl: 'https://portal2.tos-cn-beijing.volces.com/portal/product-our/实验室管理系统.png',
                pdfUrl: '/pdf-proxy/portal/product-center/实验室管理系统.pdf',
            },
            {
                index: '1-2',
                title: 'TQS企业培训系统',
                imgUrl: 'https://portal2.tos-cn-beijing.volces.com/portal/product-our/TQS系统.png',
                pdfUrl: '/pdf-proxy/portal/product-center/企业培训系统.pdf',
            },
            {
                index: '1-3',
                title: 'CPTM企业能力管理系统',
                imgUrl: 'https://portal2.tos-cn-beijing.volces.com/portal/product-our/CPTM.png',
                pdfUrl: '/pdf-proxy/portal/product-center/企业人员技能培训系统.pdf',
            },
            {
                index: '1-4',
                title: 'JIT生产管理系统',
                imgUrl: 'https://portal2.tos-cn-beijing.volces.com/portal/product-our/JIT.png',
                pdfUrl: '/pdf-proxy/portal/product-center/生产管理系统.pdf',
            },
        ],
    },
    {
        index: '2',
        title: 'SaaS平台',
        imgUrl: '',
        pdfUrl: '',
        icon: "https://portal2.tos-cn-beijing.volces.com/portal/product-center/menu-icon/SAAS.svg",
        subMenu: [
            {
                index: '2-1',
                title: 'ESMMS外部供应商管理系统',
                imgUrl: 'https://portal2.tos-cn-beijing.volces.com/portal/product-our/外部供应商管理系统.png',
                pdfUrl: '/pdf-proxy/portal/product-center/外部供应商管理系统.pdf',
            },
            {
                index: '2-2',
                title: 'S2B2B商城系统',
                imgUrl: 'https://portal2.tos-cn-beijing.volces.com/portal/product-our/S2B2B.png',
                pdfUrl: '/pdf-proxy/portal/product-center/S2B2B商城系统.pdf',
            },
        ],
    },
    {
        index: '3',
        title: 'C端',
        imgUrl: '',
        pdfUrl: '',
        icon: "https://portal2.tos-cn-beijing.volces.com/portal/product-center/menu-icon/C.svg",
        subMenu: [
        ],
    },
];
 
const products = ref<Products[]>([
    { imgUrl: 'https://portal2.tos-cn-beijing.volces.com/portal/product-our/外部供应商管理系统.png', title: '外部供应商管理系统', desc: '通过数字化整合上下游资源<br/>打通多级分销信息壁垒,助力供应商增效增收。' },
    { imgUrl: 'https://portal2.tos-cn-beijing.volces.com/portal/product-our/S2B2B.png', title: 'S2B2B商城系统', desc: '通过数字化整合上下游资源<br/>打通多级分销信息壁垒,助力供应商增效增收。' },
    { imgUrl: 'https://portal2.tos-cn-beijing.volces.com/portal/product-our/实验室管理系统.png', title: 'LIMS实验室管理系统', desc: '聚焦汽车零部件质检行业<br/>实现委托单全流程数字化、设备智能管控、质检数据一体化管理,提质增效' },
    // { imgUrl: 'https://portal2.tos-cn-beijing.volces.com/portal/product-our/TQS系统.png', title: 'TQS系统', desc: '解决制造业、汽车业培训痛点。它涵盖多个模块,具备人员信息管理、培训管理、岗位技能培训管理等功能,能实现培训数字...' },
    // { imgUrl: 'https://portal2.tos-cn-beijing.volces.com/portal/product-our/外部供应商管理系统.png', title: '外部供应商管理系统', desc: '破信息壁垒,实现数据共享,自动化处理订单,增强沟通与生产跟踪。系统具备多模块功能,涵盖用户、订单、工单等管理,支持移动端扫码记录工时...' },
    // { imgUrl: 'https://portal2.tos-cn-beijing.volces.com/portal/product-our/JIT.png', title: 'JIT', desc: '面向工业领域的生产管理系统,旨在减少库存和浪费、提升生产效率。它针对数据出错、库存积压等行业痛点,提供数字化管理、自动化检测等解决方案。系统具备物料管理、工艺路线管理等多种功能,实现生产全过程管控与高效运营' },
    // { imgUrl: 'https://portal2.tos-cn-beijing.volces.com/portal/product-our/CPTM.png', title: 'CPTM', desc: '优化人力开发流程,助力企业发展。它解决了企业培训管理缺乏系统化、报考流程效率低等问题,具备集成平台管理、自动化流程、技能评估等功能,涵盖培训管理、人员信息管理等模块,推动员工和团队能力提升。' },
 
])
 
const handleOpen = (key: string, keyPath: string[]) => {
    console.log(key, keyPath);
};
 
const handleClose = (key: string, keyPath: string[]) => {
    console.log(key, keyPath);
};
 
const handleSelectSubmenu = (item: MenuItem) => {
    curImg.value = item.imgUrl
    curSubItem.value = item
    activeIndex.value = item.index
    console.log(item)
    showPdf(item)
};
 
const handleSelect = (index: String) => {
    // curImg.value = item.imgUrl
    // curSubItem.value = item
    // activeIndex.value = item.index
    // console.log(item)
    // showPdf(item.pdfUrl)
};
 
const curImg = ref('https://portal2.tos-cn-beijing.volces.com/portal/bg.png');
 
 
const showPdf = (item: MenuItem) => {
    console.log("MenuItem", item)
    // 转换 MenuItem -> ProductCenter
    const product: ProductCenter = {
        url: item.pdfUrl,
        name: item.title,
        desc: item.index
    }
    pdfUrl.value = item.pdfUrl
    title.value = item.title
    // sessionStorage.setItem('pdfItem', JSON.stringify(product))
    // window.open('/pdf-preview', '_blank')
}
 
const openPdf = () => {
    // 转换 MenuItem -> ProductCenter
    const product: ProductCenter = {
        url: curSubItem.value.pdfUrl,
        name: curSubItem.value.title,
        desc: curSubItem.value.index
    }
 
    sessionStorage.setItem('pdfItem', JSON.stringify(product))
    window.open('/pdf-preview', '_blank')
}
const isUrl = (url: string): boolean => {
    return /^https?:\/\//.test(url)
}
 
</script>
 
<style>
/* .el-menu .el-menu-item.is-active {
    font-weight: bold;
    color: #ffd04b;
  } */
.el-main {
    --el-main-padding: 0px;
    box-sizing: border-box;
    display: block;
    flex: 1;
    flex-basis: auto;
    overflow: auto;
    padding: var(--el-main-padding);
}
 
.img-round {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    padding: 5px;
    object-fit: contain;
}
</style>
 
<style scoped>
.floating-btn {
    position: fixed;
    top: 50%;
    left: 0;
    /* transform: translate(-50%, -50%); */
    z-index: 9999;
    /* padding: 15px; */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: #F8F9FA;
    border-radius: 10px;
}
</style>