diff --git a/src/App.vue b/src/App.vue
index 6004ba4..26eda7d 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -59,3 +59,60 @@
}
}
+
\ No newline at end of file
diff --git a/src/api/crmApi.ts b/src/api/crmApi.ts
new file mode 100644
index 0000000..6b950f4
--- /dev/null
+++ b/src/api/crmApi.ts
@@ -0,0 +1,156 @@
+import request from '@/utils/http'
+
+export class CrmService {
+ // 客户管理
+ //客户列表
+ static getcustomerList(params: Api.Common.PaginatingParams) {
+ return request.get({
+ url: '/crm/customer/list',
+ params
+ })
+ }
+ // 获取客户列表详情
+ static getcustomerdetail(params: any) {
+ return request.get({
+ url: '/crm/customer/detail',
+ params
+ })
+ }
+ //添加客户
+ static customerAdd(params: any) {
+ return request.post({
+ url: '/crm/customer/add',
+ params
+ // showErrorMessage: false // 不显示错误消息
+ })
+ }
+ //删除客户
+ static getcustomerdelete(params: any) {
+ return request.get({
+ url: '/crm/customer/delete',
+ params
+ })
+ }
+ //切换等级crm/customer/grade
+ static customergrade(params: any) {
+ return request.post({
+ url: '/crm/customer/grade',
+ params
+ // showErrorMessage: false // 不显示错误消息
+ })
+ }
+
+ //渠道下拉
+ static getChannel() {
+ return request.get({
+ url: '/crm/customer/getChannel'
+ })
+ }
+ //国家下拉
+ static getCountry() {
+ return request.get({
+ url: '/crm/customer/getCountry'
+ })
+ }
+ //商机
+ static getMagnitude() {
+ return request.get({
+ url: '/crm/customer/getMagnitude'
+ })
+ }
+ //等级
+ static getGrade() {
+ return request.get({
+ url: '/crm/customer/getGrade'
+ })
+ }
+ //标签列表/crm/tagGroup/list
+ static tagGrouplist() {
+ return request.get({
+ url: '/crm/tagGroup/list'
+ })
+ }
+ //更新客户标签 /crm/tagGroup/updatePivot
+ static tagGroupupdatePivot(params: any) {
+ return request.get({
+ url: '/crm/tagGroup/updatePivot',
+ params
+ })
+ }
+ //跟进列表crm/follow/list
+ static getfollowlist(params: any) {
+ return request.get({
+ url: '/crm/follow/list',
+ params
+ })
+ }
+ //添加跟进 /crm/follow/add
+ static followAdd(params: any) {
+ return request.post({
+ url: '/crm/follow/add',
+ params
+ // showErrorMessage: false // 不显示错误消息
+ })
+ }
+ //待跟进 /crm/customer/waitFollow
+ static waitFollow(params: any) {
+ return request.get({
+ url: '/crm/customer/waitFollow',
+ params
+ })
+ }
+//设置下次跟进时间 followNext crm/customer/followNext
+static followNext(params: any) {
+ return request.post({
+ url: '/crm/customer/followNext',
+ params
+ // showErrorMessage: false // 不显示错误消息
+ })
+}
+
+ //crm 个人信息修改
+ static crmuseredit(params: any) {
+ return request.post({
+ url: '/crm/user/edit',
+ params
+ // showErrorMessage: false // 不显示错误消息
+ })
+ }
+ //领取公海crm/customer/claim
+ static customerclaim(params: any) {
+ return request.post({
+ url: '/crm/customer/claim',
+ params
+ // showErrorMessage: false // 不显示错误消息
+ })
+ }
+ //客户回收 恢复 /crm/customer/restore
+ static customerrestore(params: any) {
+ return request.post({
+ url: '/crm/customer/restore',
+ params
+ // showErrorMessage: false // 不显示错误消息
+ })
+ }
+ //crm 获取用户信息 common/user/get
+ static userget() {
+ return request.get({
+ url: '/common/user/get'
+ })
+ }
+ //修改密码 crm/user/savePassword
+ static savePassword(params: any) {
+ return request.post({
+ url: '/crm/user/savePassword',
+ params
+ // showErrorMessage: false // 不显示错误消息
+ })
+ }
+ //首页统计
+ static homestatistics(params: any) {
+ return request.get({
+ url: '/crm/customer/statistics',
+ params
+ })
+ }
+}
diff --git a/src/api/menuApi.ts b/src/api/menuApi.ts
index 811d1b6..925346b 100644
--- a/src/api/menuApi.ts
+++ b/src/api/menuApi.ts
@@ -5,7 +5,28 @@ import { useUserStore } from '@/store/modules/user'
interface MenuResponse {
menuList: AppRouteRecord[]
}
-
+// 合并方法
+function mergeRoutes(dynamicRoutes: AppRouteRecord[] = [], staticRoutes: AppRouteRecord[] = []): AppRouteRecord[] {
+ // 深度合并逻辑
+ const merged = [...staticRoutes]
+
+ dynamicRoutes.forEach(dynamicRoute => {
+ const existingIndex = merged.findIndex(r => r.path === dynamicRoute.path)
+ if (existingIndex >= 0) {
+ // 合并children(如果存在)
+ if (dynamicRoute.children) {
+ merged[existingIndex].children = [
+ ...(merged[existingIndex].children || []),
+ ...dynamicRoute.children
+ ]
+ }
+ } else {
+ merged.push(dynamicRoute)
+ }
+ })
+
+ return merged
+}
// 菜单接口
export const menuService = {
async getMenuList(delay = 300): Promise {
@@ -17,6 +38,8 @@ export const menuService = {
}
// 模拟接口返回的菜单数据
const menuData = userStore.info.menu
+ // 2. 合并静态菜单
+ const finalRoutes = mergeRoutes(menuData, asyncRoutes)
// 验证菜单数据
if (!menuData || !Array.isArray(menuData) || menuData.length === 0) {
ElMessage.error('暂无系统菜单权限')
@@ -24,7 +47,7 @@ export const menuService = {
}
// 处理菜单数据
- const menuList = menuData.map((route: any) => menuDataToRouter(route))
+ const menuList = finalRoutes.map((route: any) => menuDataToRouter(route))
// 验证处理后的菜单列表
if (!menuList || menuList.length === 0) {
diff --git a/src/components/core/layouts/art-header-bar/index.vue b/src/components/core/layouts/art-header-bar/index.vue
index 3c76873..9809942 100644
--- a/src/components/core/layouts/art-header-bar/index.vue
+++ b/src/components/core/layouts/art-header-bar/index.vue
@@ -156,6 +156,14 @@
-->