Browse Source

feat: open permission

main
xuziqiang 6 months ago
parent
commit
bd89f7973d
  1. 3
      hx-ai-intelligent/src/api/origanizemanage.ts
  2. 25
      hx-ai-intelligent/src/config/app.config.ts
  3. 4291
      hx-ai-intelligent/src/config/resource.json
  4. 8
      lib/saas/store/modules/route.ts

3
hx-ai-intelligent/src/api/origanizemanage.ts

@ -1,4 +1,7 @@
const BASE_URL = '/carbon-smart';
export enum permission {
add = `${BASE_URL}/admin/permission/save`,
}
export enum origanizemanage {
userList = '/carbon-smart/api/user/queryUserByPage',

25
hx-ai-intelligent/src/config/app.config.ts

@ -3,6 +3,8 @@ import { dateUtil } from '/nerv-lib/util/date-util';
import mockResource from './resource.json';
import { http } from '/nerv-lib/saas';
import { ref } from 'vue';
import { permission } from '/@/api/origanizemanage';
const value = ref('1');
const transform = (data, map) => {
return Object.keys(map).reduce((pre, cur) => {
@ -13,7 +15,7 @@ const transform = (data, map) => {
export const appConfig = {
projectType: 'web',
baseApi: '/api',
enablePermissions: false,
enablePermissions: true,
// themeColor: '#eee',
siderPosition: 'left',
baseHeader: '/parkingManage',
@ -94,16 +96,15 @@ export const appConfig = {
// toRouterName: 'NoticeManageIndex',
// },
resourceInfo: {
application: {
version: '1.1.74',
label: '停车业务平台',
dataScope: {
scopeMode: 0,
scopeType: '',
dataTips: '',
},
},
api: '/qa/Operation/Resources/Pc/init',
token: `${dateUtil().format('YYYYMMDD')}1a329ffasasozozxqq66cfab7`,
// application: {
// version: '1.1.74',
// label: '停车业务平台',
// dataScope: {
// scopeMode: 0,
// scopeType: '',
// dataTips: '',
// },
// },
api: permission.add,
},
};

4291
hx-ai-intelligent/src/config/resource.json

File diff suppressed because it is too large

8
lib/saas/store/modules/route.ts

@ -1,4 +1,3 @@
import { defineStore } from 'pinia';
import { RouteMenu } from '/nerv-base/router/helper/menu-helper';
import { ModuleMenu } from '/nerv-base/router/types';
@ -89,7 +88,8 @@ export const useRouteStore = defineStore({
this.route.sort((a, b) => {
return a.meta?.index - b.meta?.index;
});
const initPcResource = { application: {}, menus: [] };
// const initPcResource = { application: {}, menus: [] };
let initPcResource = [];
this.routeModule.sort((a, b) => {
return a.route?.meta?.index - b.route?.meta?.index;
});
@ -115,8 +115,8 @@ export const useRouteStore = defineStore({
delete item.route;
});
}
initPcResource.application = appConfig.resourceInfo?.application as object;
initPcResource.menus = appConfig.resourceInfo?.dealReosurceList
// initPcResource.application = appConfig.resourceInfo?.application as object;
initPcResource = appConfig.resourceInfo?.dealReosurceList
? appConfig.resourceInfo?.dealReosurceList(info)
: info;
new NSAxios({

Loading…
Cancel
Save