| | |
| | | |
| | | </div> |
| | | |
| | | <div class="col-md-3 d-block d-md-none p-3" > |
| | | <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"> |
| | |
| | | |
| | | |
| | | <!-- Main Content Area --> |
| | | <div class="col-12 col-md-9 p-3" style="overflow-y: auto; max-height: 100vh;" > |
| | | <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 "> |
| | |
| | | </div> |
| | | |
| | | <div class="row d-block d-md-none"> |
| | | <div class="justify-content-center" > |
| | | <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 "> |
| | |
| | | <!-- <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" /> |
| | | <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 { ref, onMounted } from 'vue' |
| | | import { useRoute, useRouter } from 'vue-router'; |
| | | import { MenuItem, Products, ProductCenter } from '@/models/portalModels'; |
| | | import PdfViewer from '@/components/pdf/PdfViewer.vue' |
| | | |
| | |
| | | const title = ref('') |
| | | const pdfUrl = ref('') |
| | | const curSubItem = ref<MenuItem>({} as MenuItem) |
| | | |
| | | |
| | | |
| | | const activeIndex = ref('') |
| | | |
| | |
| | | ], |
| | | }, |
| | | ]; |
| | | |
| | | |
| | | onMounted(() => { |
| | | const route = useRoute(); |
| | | const title = route.query.title; |
| | | |
| | | if (!title) return; |
| | | |
| | | let foundIndex = ''; |
| | | let foundItem = null; |
| | | |
| | | for (const item of menuItems) { |
| | | if (item.title === title) { |
| | | foundIndex = item.index; |
| | | foundItem = item; |
| | | break; |
| | | } |
| | | |
| | | if (item.subMenu) { |
| | | const sub = item.subMenu.find(subItem => subItem.title === title); |
| | | if (sub) { |
| | | foundIndex = sub.index; |
| | | foundItem = sub; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (foundIndex && foundItem) { |
| | | activeIndex.value = foundIndex; |
| | | |
| | | // 调用菜单选中逻辑(注意:这里你可能要加上菜单展开逻辑) |
| | | if (foundIndex.includes('-')) { |
| | | handleSelectSubmenu(foundItem); // 子菜单点击 |
| | | } else { |
| | | handleSelect(foundIndex); // 顶层菜单点击(如果你需要) |
| | | } |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | const products = ref<Products[]>([ |
| | | { imgUrl: 'https://portal2.tos-cn-beijing.volces.com/portal/product-our/外部供应商管理系统.png', title: '外部供应商管理系统', desc: '通过数字化整合上下游资源<br/>打通多级分销信息壁垒,助力供应商增效增收。' }, |
| | |
| | | </script> |
| | | |
| | | <style> |
| | | body { |
| | | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; |
| | | } |
| | | /* .el-menu .el-menu-item.is-active { |
| | | font-weight: bold; |
| | | color: #ffd04b; |