From 8a554f5871ea9224e004a25eec8f7c9cecd06879 Mon Sep 17 00:00:00 2001 From: xuziqiang <1344691446@qq.com> Date: Wed, 19 Jun 2024 16:22:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9D=83=E9=99=90=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hx-ai-intelligent/src/config/app.config.ts | 2 +- .../src/view/organizationManage/usermanage/index.vue | 5 ++--- lib/saas/router/helper/route-helper.ts | 2 +- lib/saas/store/modules/route.ts | 11 +++++------ 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/hx-ai-intelligent/src/config/app.config.ts b/hx-ai-intelligent/src/config/app.config.ts index 34b3318..f5feb8a 100644 --- a/hx-ai-intelligent/src/config/app.config.ts +++ b/hx-ai-intelligent/src/config/app.config.ts @@ -19,7 +19,7 @@ export const appConfig = { projectType: 'web', baseApi: '/api', projectName: '济阳站_AI智能BAS系统', - enablePermissions: false, + enablePermissions: true, // themeColor: '#eee', siderPosition: 'left', baseHeader: '/parkingManage', diff --git a/hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue b/hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue index bccd076..541c90c 100644 --- a/hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue +++ b/hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue @@ -200,7 +200,6 @@ opMap.value.fuc && opMap.value.fuc({ ...formData.value, userRoleList: userAuthList.value, orgId }); - visible.value = false; }); }; @@ -242,7 +241,7 @@ userAuthList.value.splice(0); }); opMap.value.fuc = (formData: any) => { - http.post(origanizemanage.addUser, formData).then(() => { + return http.post(origanizemanage.addUser, formData).then(() => { mainRef.value?.nsTableRef.reload(); visible.value = false; NsMessage.success('操作成功'); @@ -370,7 +369,7 @@ }, 10); opMap.value.type = 'edit'; opMap.value.fuc = (formData: any) => { - http.post(origanizemanage.editUser, formData).then(() => { + return http.post(origanizemanage.editUser, formData).then(() => { mainRef.value?.nsTableRef.reload(); visible.value = false; NsMessage.success('操作成功'); diff --git a/lib/saas/router/helper/route-helper.ts b/lib/saas/router/helper/route-helper.ts index 41e4301..77e00a4 100644 --- a/lib/saas/router/helper/route-helper.ts +++ b/lib/saas/router/helper/route-helper.ts @@ -21,7 +21,7 @@ export function transformRouteToMenu(route: RouteRecordRaw, parentCode = '') { const _menu: ModuleMenu = { code, icon: (route.meta?.icon || ' ') as string, - sort: (route.meta?.index || 999) as number, + sort: (isNumber(route.meta?.index) ? route.meta?.index : 999) as number, label: (route.meta?.title || ' ') as string, type: (route.meta?.type || 'menus') as string, // name: dealOp(route) as string, diff --git a/lib/saas/store/modules/route.ts b/lib/saas/store/modules/route.ts index 6f5a90b..753d410 100644 --- a/lib/saas/store/modules/route.ts +++ b/lib/saas/store/modules/route.ts @@ -65,6 +65,7 @@ export const useRouteStore = defineStore({ routeModule[i].menus && loop(routeModule[i].menus); } } + loop(this.routeModule); this.routeModuleObject = routeModuleObject; function loopRoute(routeList) { @@ -90,9 +91,10 @@ export const useRouteStore = defineStore({ }); // const initPcResource = { application: {}, menus: [] }; let initPcResource = []; - // this.routeModule.sort((a, b) => { - // return a.route?.meta?.index - b.route?.meta?.index; - // }); + + this.routeModule.sort((a, b) => { + return a.route?.meta?.index - b.route?.meta?.index; + }); const info = JSON.parse(JSON.stringify(this.routeModule)); initRouteMouleList(info); function initRouteMouleList(info) { @@ -116,9 +118,6 @@ export const useRouteStore = defineStore({ }); } // initPcResource.application = appConfig.resourceInfo?.application as object; - console.log(info); - - return; initPcResource = appConfig.resourceInfo?.dealReosurceList ? appConfig.resourceInfo?.dealReosurceList(info) : info;