|
@@ -1,7 +1,7 @@
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
import type { MenuOption } from 'naive-ui'
|
|
import type { MenuOption } from 'naive-ui'
|
|
|
import { NIcon, useMessage } from 'naive-ui'
|
|
import { NIcon, useMessage } from 'naive-ui'
|
|
|
-import { BookOutline, LogoUsd, MenuOutline } from '@vicons/ionicons5'
|
|
|
|
|
|
|
+import { BookOutline, LogoUsd, MenuOutline, PeopleOutline } from '@vicons/ionicons5'
|
|
|
import RouteTabBar from '@/components/RouteTabBar.vue'
|
|
import RouteTabBar from '@/components/RouteTabBar.vue'
|
|
|
import { setToken } from '@/api/request'
|
|
import { setToken } from '@/api/request'
|
|
|
import { useAppStore } from '@/stores/app'
|
|
import { useAppStore } from '@/stores/app'
|
|
@@ -27,6 +27,7 @@ function renderIcon(icon: typeof BookOutline) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const SUBMENU_COURSES = 'submenu-courses'
|
|
const SUBMENU_COURSES = 'submenu-courses'
|
|
|
|
|
+const SUBMENU_CUSTOMERS = 'submenu-customers'
|
|
|
const SUBMENU_FINANCE = 'submenu-finance'
|
|
const SUBMENU_FINANCE = 'submenu-finance'
|
|
|
|
|
|
|
|
const menuOptions: MenuOption[] = [
|
|
const menuOptions: MenuOption[] = [
|
|
@@ -40,6 +41,12 @@ const menuOptions: MenuOption[] = [
|
|
|
{ label: '教学内容', key: '/courses/goods' },
|
|
{ label: '教学内容', key: '/courses/goods' },
|
|
|
],
|
|
],
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '客户管理',
|
|
|
|
|
+ key: SUBMENU_CUSTOMERS,
|
|
|
|
|
+ icon: renderIcon(PeopleOutline),
|
|
|
|
|
+ children: [{ label: '客户列表', key: '/customers/list' }],
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
label: '财务管理',
|
|
label: '财务管理',
|
|
|
key: SUBMENU_FINANCE,
|
|
key: SUBMENU_FINANCE,
|
|
@@ -47,7 +54,6 @@ const menuOptions: MenuOption[] = [
|
|
|
children: [
|
|
children: [
|
|
|
{ label: '取款申请', key: '/finance/withdraw-apply' },
|
|
{ label: '取款申请', key: '/finance/withdraw-apply' },
|
|
|
{ label: '订单列表', key: '/finance/order-list' },
|
|
{ label: '订单列表', key: '/finance/order-list' },
|
|
|
- { label: '客户列表', key: '/finance/customer-list' },
|
|
|
|
|
],
|
|
],
|
|
|
},
|
|
},
|
|
|
]
|
|
]
|
|
@@ -61,6 +67,10 @@ watch(
|
|
|
expandedKeys.value = [SUBMENU_COURSES]
|
|
expandedKeys.value = [SUBMENU_COURSES]
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
+ if (p.startsWith('/customers')) {
|
|
|
|
|
+ expandedKeys.value = [SUBMENU_CUSTOMERS]
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
if (p.startsWith('/finance')) {
|
|
if (p.startsWith('/finance')) {
|
|
|
expandedKeys.value = [SUBMENU_FINANCE]
|
|
expandedKeys.value = [SUBMENU_FINANCE]
|
|
|
return
|
|
return
|