Browse Source

fix: 权限排序异常

main
xuziqiang 3 months ago
parent
commit
8a554f5871
  1. 2
      hx-ai-intelligent/src/config/app.config.ts
  2. 5
      hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue
  3. 2
      lib/saas/router/helper/route-helper.ts
  4. 11
      lib/saas/store/modules/route.ts

2
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',

5
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('操作成功');

2
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,

11
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;

Loading…
Cancel
Save