| | |
| | | <script setup> |
| | | import {computed, ref} from "vue"; |
| | | import usePageMenuStore from "@/store/usePageMenuStore"; |
| | | import { |
| | | Menu as IconMenu, |
| | | Setting, |
| | | } from '@element-plus/icons-vue' |
| | | const pageMenuStore = usePageMenuStore(); |
| | | |
| | | const isCollapse = computed(()=>{ |
| | |
| | | { |
| | | title: "首页", |
| | | path: "/", |
| | | icon: "HomeFilled" |
| | | }, |
| | | { |
| | | title: "客户管理", |
| | | path: "/customer", |
| | | children: [ |
| | | { |
| | | title: "客户档案", |
| | | path: "/customer/customer" |
| | | }, |
| | | { |
| | | title: "拜访记录", |
| | | path: "/customer/visit" |
| | | }, |
| | | ] |
| | | title: "门禁", |
| | | path: "/accessControl", |
| | | icon: "Checked", |
| | | }, |
| | | { |
| | | title: "修养预约", |
| | | path: "business", |
| | | children: [ |
| | | { |
| | | title: "预约信息", |
| | | path: "/business/appointment" |
| | | }, |
| | | { |
| | | title: "服务项", |
| | | path: "/business/service" |
| | | }, |
| | | { |
| | | title: "结算单", |
| | | path: "/business/statement" |
| | | }, |
| | | ] |
| | | title: "视频监控", |
| | | path: "/video", |
| | | icon: "VideoCameraFilled", |
| | | }, |
| | | { |
| | | title: "流程管理", |
| | | path: "/flow", |
| | | children: [ |
| | | { |
| | | title: "审核流程定义", |
| | | path: "/flow/definition" |
| | | }, |
| | | ], |
| | | } |
| | | title: "空调", |
| | | path: "/airConditioning", |
| | | icon: "Postcard", |
| | | }, |
| | | { |
| | | title: "用户管理", |
| | | path: "/userManagement", |
| | | icon: "UserFilled" |
| | | }, |
| | | ]; |
| | | |
| | | const handleOpen = ()=>{}; |
| | |
| | | <template v-for="menu in menuData" :key="menu.path"> |
| | | <el-sub-menu :index="menu.path" v-if="menu.children"> |
| | | <template #title> |
| | | <el-icon><icon-menu /></el-icon> |
| | | <el-icon> |
| | | <component :is="menu.icon"></component> |
| | | </el-icon> |
| | | <span>{{menu.title}}</span> |
| | | </template> |
| | | <el-menu-item |
| | |
| | | :index="children.path">{{children.title}}</el-menu-item> |
| | | </el-sub-menu> |
| | | <el-menu-item :index="menu.path" v-else> |
| | | <el-icon><icon-menu /></el-icon> |
| | | <el-icon> |
| | | <component :is="menu.icon"></component> |
| | | </el-icon> |
| | | <template #title>{{menu.title}}</template> |
| | | </el-menu-item> |
| | | </template> |