赞
踩
Router.js中
import Vue from 'vue' import VueRouter from 'vue-router' //登录 import Login from '../views/login/login.vue' //注册 import Register from '../views/register/register.vue' import Home from '../views/home/home.vue' //欢迎页重定向到首页 import Welcome from '../components/welcome.vue' //疫苗信息管理 import Vaccinemanagement from '../views/vaccinemanagement/vaccinemanagement.vue' //预约信息管理 import Bookingmanagement from '../views/bookingmanagement/bookingmanagement.vue' //接种记录管理 import Inoculationmanagement from '../views/inoculationmanagement/inoculationmanagement.vue' //个人中心 import Personalcenter from '../views/personalcenter/personalcenter.vue' //用户管理 import Usermanagement from '../views/usermanagement/usermanagement.vue' //预约管理 import Vaccinereservation from '../views/vaccinereservation/vaccinereservation.vue' //我的预约 import Myreservation from '../views/myreservation/myreservation.vue' Vue.use(VueRouter) const routes = [ { path: '/', redirect: '/login' }, { path: '/login', meta: { showMenu: false, title: '登录', notCache: true, }, component: Login }, { path: '/register', component: Register }, { path: '/home', component: Home, redirect: '/Welcome', meta: { showMenu: false, title: '首页', notCache: true, icon: 'el-icon-house', }, children: [{ path: '/Welcome', meta: { showMenu: true, title: '首页', // notCache: true, icon: 'el-icon-house', showIframe:true, }, component: Welcome, }, { path: '/vaccinemanagement', meta: { showMenu: true, title: '疫苗信息管理', notCache: true, icon: 'el-icon-s-operation', }, component: Vaccinemanagement }, { path: '/bookingmanagement', meta: { showMenu: true, title: '预约信息管理', notCache: true, icon: 'el-icon-document-add', }, component: Bookingmanagement }, { path: '/myreservation', meta: { showMenu: true, title: '我的预约', notCache: true, icon: 'el-icon-date', }, component: Myreservation }, { path: '/inoculationmanagement', meta: { showMenu: true, title: '接种记录管理', notCache: true, icon: 'el-icon-document', }, component: Inoculationmanagement }, { path: '/vaccinereservation', meta: { showMenu: true, title: '新增预约', notCache: true, icon: 'el-icon-circle-plus', }, component: Vaccinereservation }, { path: '/personalcenter', meta: { showMenu: true, title: '个人中心', notCache: true, icon: 'el-icon-user', }, component: Personalcenter }, { path: '/usermanagement', meta: { showMenu: true, title: '用户管理', notCache: true, icon: 'el-icon-setting', }, component: Usermanagement }, ], }, ] const router = new VueRouter({ routes }) export default router export { routes }
<template> <div class="home"> <el-container> <el-header> <div> <img src="" alt=""> <span>疫苗预约系系统</span> </div> <el-button type="info" @click="logout">退出</el-button> </el-header> <el-container> <!-- 左侧菜单 --> <el-aside width="200px"> <menu-form></menu-form> </el-aside> <!-- 右侧内容 --> <el-main> <bread-crumb></bread-crumb> <!-- 路由占位符 --> <router-view></router-view> <iframe src="static/homchart.html" v-show="$route.meta.showIframe" class="iframeCard"></iframe> </el-main> </el-container> </el-container> </div> </template>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。