Files
SaaS-lib/hx-ai-intelligent/src/config/app.config.ts

110 lines
2.9 KiB
TypeScript
Raw Normal View History

2024-05-21 16:42:16 +08:00
/** @format */
import { dateUtil } from '/nerv-lib/util/date-util';
import mockResource from './resource.json';
2024-05-28 14:48:37 +08:00
import { http } from '/nerv-lib/saas';
2024-05-23 17:49:25 +08:00
import { ref } from 'vue';
const value = ref('1');
2024-05-28 14:48:37 +08:00
const transform = (data, map) => {
return Object.keys(map).reduce((pre, cur) => {
pre[cur] = data[map[cur]];
return pre;
}, {});
};
2024-05-21 16:42:16 +08:00
export const appConfig = {
projectType: 'web',
baseApi: '/api',
enablePermissions: false,
2024-05-22 14:36:37 +08:00
// themeColor: '#eee',
2024-05-21 16:42:16 +08:00
siderPosition: 'left',
baseHeader: '/parkingManage',
baseRouter: '/parkingManage/parkingLotManage',
2024-05-27 13:27:54 +08:00
themeConfig: {
bgImageUrl: `${import.meta.env.VITE_PUBLIC_PATH}/asset/image/login/background.png`,
},
2024-05-21 16:42:16 +08:00
// userCustomRouterGuard: (to, from, next, whiteNameList, authorizationStore, appConfig) => {
// console.log({ to, from, next, whiteNameList, authorizationStore, appConfig }, 'routeConfig');
// next();
// },
// customUpdatePwd: () => import('/@/view/updatePassword/updatePassword.vue'),
2024-05-28 14:48:37 +08:00
// userInfoApi: () => {
// return {
// code: 200,
// success: true,
// data: {
// accountCode: '1305107806187376793',
// accountName: 'adm*n',
// accountType: 'admin',
// accountStatus: 1,
// accountRealName: 'admin',
// organizationCode: 'dingcloud',
// authConfigList: [],
// organizeResCode: [],
// leadDepartmentUuidList: [],
// },
// };
// },
2024-05-23 17:49:25 +08:00
headerSlotConfig: {
component: 'NsSelect',
componentProps: {
style: { width: '200px' },
placeholder: '请选择',
value,
onChange: (cur) => {
value.value = cur;
},
options: [
{ label: '济阳', value: '1' },
{ label: '临沂', value: '2' },
],
},
},
2024-05-21 16:42:16 +08:00
timeout: 60 * 1000,
2024-05-28 10:51:13 +08:00
userLoginApi: '/carbon-smart/user/login',
2024-05-21 16:42:16 +08:00
userResourceApi: () => {
return { data: mockResource.menus };
},
userInfoApi: () => {
2024-05-28 14:48:37 +08:00
return http.post('/carbon-smart/user/login/logInInfo').then((res) => {
const info = res.data;
const trD = transform(info, {
accountCode: 'userId',
accountName: 'realName',
accountRealName: 'realName',
2024-05-28 18:00:25 +08:00
orgId: 'orgId',
2024-06-04 10:54:02 +08:00
orgName: 'orgName',
projectId: 'projectId',
2024-05-28 14:48:37 +08:00
});
return { data: { ...trD } };
});
2024-05-21 16:42:16 +08:00
},
2024-05-28 14:48:37 +08:00
2024-05-21 16:42:16 +08:00
useHistoryTag: false,
// 修改密码配置
updatePassWordInfo: {
title: '修改密码',
2024-05-22 14:36:37 +08:00
subtitle: 'huaxing平台',
2024-05-21 16:42:16 +08:00
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: '/qa/Operation/Resources/Pc/init',
token: `${dateUtil().format('YYYYMMDD')}1a329ffasasozozxqq66cfab7`,
},
};