feat: open permission
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
const BASE_URL = '/carbon-smart';
|
const BASE_URL = '/carbon-smart';
|
||||||
|
export enum permission {
|
||||||
|
add = `${BASE_URL}/admin/permission/save`,
|
||||||
|
}
|
||||||
|
|
||||||
export enum origanizemanage {
|
export enum origanizemanage {
|
||||||
userList = '/carbon-smart/api/user/queryUserByPage',
|
userList = '/carbon-smart/api/user/queryUserByPage',
|
||||||
|
@@ -3,6 +3,8 @@ import { dateUtil } from '/nerv-lib/util/date-util';
|
|||||||
import mockResource from './resource.json';
|
import mockResource from './resource.json';
|
||||||
import { http } from '/nerv-lib/saas';
|
import { http } from '/nerv-lib/saas';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
import { permission } from '/@/api/origanizemanage';
|
||||||
|
|
||||||
const value = ref('1');
|
const value = ref('1');
|
||||||
const transform = (data, map) => {
|
const transform = (data, map) => {
|
||||||
return Object.keys(map).reduce((pre, cur) => {
|
return Object.keys(map).reduce((pre, cur) => {
|
||||||
@@ -13,7 +15,7 @@ const transform = (data, map) => {
|
|||||||
export const appConfig = {
|
export const appConfig = {
|
||||||
projectType: 'web',
|
projectType: 'web',
|
||||||
baseApi: '/api',
|
baseApi: '/api',
|
||||||
enablePermissions: false,
|
enablePermissions: true,
|
||||||
// themeColor: '#eee',
|
// themeColor: '#eee',
|
||||||
siderPosition: 'left',
|
siderPosition: 'left',
|
||||||
baseHeader: '/parkingManage',
|
baseHeader: '/parkingManage',
|
||||||
@@ -94,16 +96,15 @@ export const appConfig = {
|
|||||||
// toRouterName: 'NoticeManageIndex',
|
// toRouterName: 'NoticeManageIndex',
|
||||||
// },
|
// },
|
||||||
resourceInfo: {
|
resourceInfo: {
|
||||||
application: {
|
// application: {
|
||||||
version: '1.1.74',
|
// version: '1.1.74',
|
||||||
label: '停车业务平台',
|
// label: '停车业务平台',
|
||||||
dataScope: {
|
// dataScope: {
|
||||||
scopeMode: 0,
|
// scopeMode: 0,
|
||||||
scopeType: '',
|
// scopeType: '',
|
||||||
dataTips: '',
|
// dataTips: '',
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
api: '/qa/Operation/Resources/Pc/init',
|
api: permission.add,
|
||||||
token: `${dateUtil().format('YYYYMMDD')}1a329ffasasozozxqq66cfab7`,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { RouteMenu } from '/nerv-base/router/helper/menu-helper';
|
import { RouteMenu } from '/nerv-base/router/helper/menu-helper';
|
||||||
import { ModuleMenu } from '/nerv-base/router/types';
|
import { ModuleMenu } from '/nerv-base/router/types';
|
||||||
@@ -89,7 +88,8 @@ export const useRouteStore = defineStore({
|
|||||||
this.route.sort((a, b) => {
|
this.route.sort((a, b) => {
|
||||||
return a.meta?.index - b.meta?.index;
|
return a.meta?.index - b.meta?.index;
|
||||||
});
|
});
|
||||||
const initPcResource = { application: {}, menus: [] };
|
// const initPcResource = { application: {}, menus: [] };
|
||||||
|
let initPcResource = [];
|
||||||
this.routeModule.sort((a, b) => {
|
this.routeModule.sort((a, b) => {
|
||||||
return a.route?.meta?.index - b.route?.meta?.index;
|
return a.route?.meta?.index - b.route?.meta?.index;
|
||||||
});
|
});
|
||||||
@@ -115,8 +115,8 @@ export const useRouteStore = defineStore({
|
|||||||
delete item.route;
|
delete item.route;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
initPcResource.application = appConfig.resourceInfo?.application as object;
|
// initPcResource.application = appConfig.resourceInfo?.application as object;
|
||||||
initPcResource.menus = appConfig.resourceInfo?.dealReosurceList
|
initPcResource = appConfig.resourceInfo?.dealReosurceList
|
||||||
? appConfig.resourceInfo?.dealReosurceList(info)
|
? appConfig.resourceInfo?.dealReosurceList(info)
|
||||||
: info;
|
: info;
|
||||||
new NSAxios({
|
new NSAxios({
|
||||||
|
Reference in New Issue
Block a user