diff --git a/hx-ai-intelligent/src/api/origanizemanage.ts b/hx-ai-intelligent/src/api/origanizemanage.ts index 110a18a..1471ea7 100644 --- a/hx-ai-intelligent/src/api/origanizemanage.ts +++ b/hx-ai-intelligent/src/api/origanizemanage.ts @@ -1,7 +1,10 @@ const BASE_URL = '/carbon-smart'; export enum permission { add = `${BASE_URL}/admin/permission/save`, - permissionTree = `${BASE_URL}/api/dept/QueryOrgPermission`, + queryOrgPermission = `${BASE_URL}/api/dept/queryOrgPermission`, + queryRolePermission = `${BASE_URL}/api/dept/queryRolePermission`, + queryFilterDeptPermission = `${BASE_URL}/api/dept/queryFilterDeptPermission`, + queryDeptPermission = `${BASE_URL}/api/dept/queryDeptPermission`, } export enum origanizemanage { @@ -18,7 +21,7 @@ export enum origanizemanage { } export enum department { - dartList = `${BASE_URL}/api/user/queryDeptTree`, + queryDeptTree = `${BASE_URL}/api/dept/queryDeptTree`, deptSave = `${BASE_URL}/api/dept/save`, deptEdit = `${BASE_URL}/api/dept/edit`, deptDel = `${BASE_URL}/api/dept/del`, @@ -28,7 +31,4 @@ export enum department { addRole = `${BASE_URL}/api/dept/addRole`, editRole = `${BASE_URL}/api/dept/editRole`, queryRoleTree = `${BASE_URL}/api/dept/queryRoleTree`, - - queryDeptPermission = `${BASE_URL}/api/dept/queryDeptPermission`, - queryRolePermission = `${BASE_URL}/api/dept/queryRolePermission`, } diff --git a/hx-ai-intelligent/src/config/app.config.ts b/hx-ai-intelligent/src/config/app.config.ts index e34034e..7b7c276 100644 --- a/hx-ai-intelligent/src/config/app.config.ts +++ b/hx-ai-intelligent/src/config/app.config.ts @@ -5,7 +5,7 @@ import { http } from '/nerv-lib/saas'; import { ref } from 'vue'; import { permission } from '/@/api/origanizemanage'; -// const { linkList } = sessionStorage.getItem('userInfo') +// const { permissionVos } = sessionStorage.getItem('userInfo'); // ? JSON.parse(sessionStorage.getItem('userInfo')!) // : [{}]; // const value = ref(linkList[0]?.orgId); @@ -19,7 +19,7 @@ const transform = (data, map) => { export const appConfig = { projectType: 'web', baseApi: '/api', - enablePermissions: false, + enablePermissions: true, // themeColor: '#eee', siderPosition: 'left', baseHeader: '/parkingManage', @@ -70,9 +70,13 @@ export const appConfig = { }, }, timeout: 60 * 1000, - userLoginApi: '/carbon-smart/user/login', + userLoginApi: (params) => { + return http.post('/carbon-smart/user/login', { ...params }); + }, userResourceApi: () => { - return { data: mockResource.menus }; + return http.post('/carbon-smart/user/login/logInInfo').then((res) => { + return { data: res.data.permissionVos }; + }); }, userInfoApi: () => { return http.post('/carbon-smart/user/login/logInInfo').then((res) => { @@ -85,9 +89,8 @@ export const appConfig = { orgName: 'orgName', projectId: 'projectId', linkList: 'linkList', - permissionInfoList: 'permissionInfoList', + permissionVos: 'permissionVos', }); - return { data: { ...trD } }; }); }, diff --git a/hx-ai-intelligent/src/router/home.ts b/hx-ai-intelligent/src/router/home.ts index c4e935a..78ab742 100644 --- a/hx-ai-intelligent/src/router/home.ts +++ b/hx-ai-intelligent/src/router/home.ts @@ -6,23 +6,22 @@ const home = { redirect: { name: 'homeIndex' }, children: [ { - path: 'homeModule', - name: 'HomeModule', + path: 'index', + name: 'homeIndex', meta: { title: '首页', hideChildren: true, icon: 'dicizhishou' }, - component: Base, + component: () => import('/@/view/developing.vue'), redirect: { name: 'homeIndex' }, - children: [ - { - path: 'index', - name: 'homeIndex', - component: () => import('/@/view/developing.vue'), - meta: { - title: '首页', - keepAlive: true, - // backApi: [], - }, - }, - ], + // children: [ + // { + // path: 'index', + // name: 'homeIndex', + // meta: { + // title: '首页', + // keepAlive: true, + // // backApi: [], + // }, + // }, + // ], }, ], }; diff --git a/hx-ai-intelligent/src/router/organizationManage.ts b/hx-ai-intelligent/src/router/organizationManage.ts index e6031ff..8f1453a 100644 --- a/hx-ai-intelligent/src/router/organizationManage.ts +++ b/hx-ai-intelligent/src/router/organizationManage.ts @@ -3,28 +3,9 @@ const organizationManage = { path: '/organizationManage', name: 'organizationManage', meta: { title: '组织管理', icon: 'dicizhishou', index: 99 }, - redirect: { name: 'EnterpriseManage' }, + redirect: { name: 'UserManage' }, children: [ { - path: 'enterpriseManage', - name: 'EnterpriseManage', - meta: { title: '企业管理', hideChildren: true, icon: 'dicizhishou' }, - component: Base, - redirect: { name: 'enterpriseManageIndex' }, - children: [ - { - path: 'index', - name: 'enterpriseManageIndex', - component: () => import('/@/view/organizationManage/enterpriseManage/index.vue'), - meta: { - title: '企业管理', - keepAlive: true, - // backApi: [], - }, - }, - ], - }, - { path: 'userManage', name: 'UserManage', meta: { title: '用户管理', hideChildren: true, icon: 'dicizhishou' }, diff --git a/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue b/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue index b9d2e5e..ce6245e 100644 --- a/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue +++ b/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue @@ -12,7 +12,7 @@