فهرست منبع

添加导航菜单

lm 1 هفته پیش
والد
کامیت
f55b4a55a3

+ 1 - 6
src/layout/components/header.vue

@@ -13,8 +13,7 @@
       </li>
     </ul>
 
-
-    <div v-if="showLogoutMenu" class="head_content_right">
+    <div  class="head_content_right">
       <el-dropdown trigger="click" @command="UserCommand" placement="bottom-end">
         <span class="userName">
           {{userInfo?.schoolName}}
@@ -102,10 +101,6 @@ const userInfo = computed(() => {
   return null
 })
 
-// 是否展示 退出按钮
-const showLogoutMenu = computed(()=>{
-  return !(route.path == '/main' || route.path == '/main')
-})
 
 const dialogShow = ref(false)
 interface EditPassWordData {

+ 5 - 1
src/layout/index.vue

@@ -10,9 +10,13 @@
 import {computed,ref} from 'vue'
 import Header from './components/header.vue'
 import AppMain from './components/AppMain.vue'
+
+import { useStore } from 'vuex'
+
+const store = useStore()
 // 此处要根据登录用户的权限 分条件展示 不同的内容
 const menuList =  computed(()=>{
-  return []
+  return store.state.siderNav
 })
 
 

+ 32 - 3
src/router/index.ts

@@ -21,13 +21,42 @@ const routes: Array<RouteRecordRaw> = [
     name: 'phoneLogin',
     component: () => import('../views/login/phoneLogin.vue')
   },
-
-  
   {
     path: '/main',
     name: 'main',
     component: Layout,
-    children: []
+    children: [
+      {
+        path: '',
+        name: 'appointmentAndTodo',   //预约待办
+        component: () => import('../views/appointmentAndTodo/index.vue')
+      },
+      {
+        path: 'highSeasCustomer',
+        name: 'highSeasCustomer',   //公海客户
+        component: () => import('../views/highSeasCustomer/index.vue')
+      },
+      {
+        path: 'myCustomer',
+        name: 'myCustomer',   //我的客户
+        component: () => import('../views/myCustomer/index.vue')
+      },
+      {
+        path: 'customerFollowUp',
+        name: 'customerFollowUp',   //客户跟进
+        component: () => import('../views/customerFollowUp/index.vue')
+      },
+      {
+        path: 'userManagement',
+        name: 'userManagement',   //用户管理
+        component: () => import('../views/userManagement/index.vue')
+      },
+      {
+        path: 'parameterConfig',
+        name: 'parameterConfig',   //参数配置
+        component: () => import('../views/parameterConfig/index.vue')
+      },
+    ]
   },
   {
     path: '/:pathMatch(.*)*', // 捕获所有未匹配路径

+ 33 - 1
src/store/index.ts

@@ -7,6 +7,7 @@ import type { App } from 'vue'
 interface RootState {
   count: number,
   managerHorizontalMenuItems:any[],
+  siderNav:any[]
 }
 
 
@@ -18,7 +19,38 @@ const store = createStore<RootState>({
     count: 0,
     // 管理员 评教评学 的访问菜单
     managerHorizontalMenuItems:[],
-   
+    siderNav:[
+      {
+        title: '预约待办',
+        route: '/main',
+        svgIcon:undefined,
+      },
+      {
+        title: '公海客户',
+        route: '/main/highSeasCustomer',
+        svgIcon:undefined,
+      },
+      {
+        title: '我的客户',
+        route: '/main/myCustomer',
+        svgIcon:undefined,
+      },
+      {
+        title: '客户跟进',
+        route: '/main/customerFollowUp',
+        svgIcon:undefined,
+      },
+      {
+        title: '用户管理',
+        route: '/main/userManagement',
+        svgIcon:undefined,
+      },
+      {
+        title: '参数配置',
+        route: '/main/parameterConfig',
+        svgIcon:undefined,
+      },
+    ]
   }),
   mutations: {
     increment(state: RootState) {

+ 15 - 0
src/views/appointmentAndTodo/index.vue

@@ -0,0 +1,15 @@
+<template>
+    <div>
+        预约待办
+    </div>
+</template>
+
+
+<script setup lang="ts">
+
+</script>
+
+
+<style lang="scss" scoped>
+
+</style>

+ 15 - 0
src/views/customerFollowUp/index.vue

@@ -0,0 +1,15 @@
+<template>
+    <div>
+        客户跟进
+    </div>
+</template>
+
+
+<script setup lang="ts">
+
+</script>
+
+
+<style lang="scss" scoped>
+
+</style>

+ 15 - 0
src/views/highSeasCustomer/index.vue

@@ -0,0 +1,15 @@
+<template>
+    <div>
+        公海客户
+    </div>
+</template>
+
+
+<script setup lang="ts">
+
+</script>
+
+
+<style lang="scss" scoped>
+
+</style>

+ 15 - 0
src/views/myCustomer/index.vue

@@ -0,0 +1,15 @@
+<template>
+    <div>
+        我的客户
+    </div>
+</template>
+
+
+<script setup lang="ts">
+
+</script>
+
+
+<style lang="scss" scoped>
+
+</style>

+ 15 - 0
src/views/parameterConfig/index.vue

@@ -0,0 +1,15 @@
+<template>
+    <div>
+        参数配置
+    </div>
+</template>
+
+
+<script setup lang="ts">
+
+</script>
+
+
+<style lang="scss" scoped>
+
+</style>

+ 15 - 0
src/views/userManagement/index.vue

@@ -0,0 +1,15 @@
+<template>
+    <div>
+        用户管理
+    </div>
+</template>
+
+
+<script setup lang="ts">
+
+</script>
+
+
+<style lang="scss" scoped>
+
+</style>