You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

111 lines
2.9 KiB

/** @format */
import { dateUtil } from '/nerv-lib/util/date-util';
import mockResource from './resource.json';
10 months ago
import { http } from '/nerv-lib/saas';
import { ref } from 'vue';
import { permission } from '/@/api/origanizemanage';
const value = ref('1');
10 months ago
const transform = (data, map) => {
return Object.keys(map).reduce((pre, cur) => {
pre[cur] = data[map[cur]];
return pre;
}, {});
};
export const appConfig = {
projectType: 'web',
baseApi: '/api',
10 months ago
enablePermissions: false,
10 months ago
// themeColor: '#eee',
siderPosition: 'left',
baseHeader: '/parkingManage',
baseRouter: '/parkingManage/parkingLotManage',
themeConfig: {
bgImageUrl: `${import.meta.env.VITE_PUBLIC_PATH}/asset/image/login/background.png`,
},
// userCustomRouterGuard: (to, from, next, whiteNameList, authorizationStore, appConfig) => {
// console.log({ to, from, next, whiteNameList, authorizationStore, appConfig }, 'routeConfig');
// next();
// },
// customUpdatePwd: () => import('/@/view/updatePassword/updatePassword.vue'),
10 months ago
// userInfoApi: () => {
// return {
// code: 200,
// success: true,
// data: {
// accountCode: '1305107806187376793',
// accountName: 'adm*n',
// accountType: 'admin',
// accountStatus: 1,
// accountRealName: 'admin',
// organizationCode: 'dingcloud',
// authConfigList: [],
// organizeResCode: [],
// leadDepartmentUuidList: [],
// },
// };
// },
headerSlotConfig: {
component: 'NsSelect',
componentProps: {
style: { width: '200px' },
placeholder: '请选择',
value,
onChange: (cur) => {
value.value = cur;
},
options: [
{ label: '济阳', value: '1' },
{ label: '临沂', value: '2' },
],
},
},
timeout: 60 * 1000,
10 months ago
userLoginApi: '/carbon-smart/user/login',
userResourceApi: () => {
return { data: mockResource.menus };
},
userInfoApi: () => {
10 months ago
return http.post('/carbon-smart/user/login/logInInfo').then((res) => {
const info = res.data;
const trD = transform(info, {
accountCode: 'userId',
accountName: 'realName',
accountRealName: 'realName',
10 months ago
orgId: 'orgId',
10 months ago
orgName: 'orgName',
projectId: 'projectId',
10 months ago
});
return { data: { ...trD } };
});
},
10 months ago
useHistoryTag: false,
// 修改密码配置
updatePassWordInfo: {
title: '修改密码',
10 months ago
subtitle: 'huaxing平台',
api: '/api/web/objs/User/changePassword',
},
// headerBellInfo: {
// isShow: true,
// api: '/api/web/objs/bulletin/readCount',
// toRouterName: 'NoticeManageIndex',
// },
resourceInfo: {
// application: {
// version: '1.1.74',
// label: '停车业务平台',
// dataScope: {
// scopeMode: 0,
// scopeType: '',
// dataTips: '',
// },
// },
api: permission.add,
},
};