项目调整
This commit is contained in:
@@ -423,7 +423,6 @@
|
||||
() => getTableBindValues.value.api,
|
||||
() => {
|
||||
// console.log(getTableBindValues.value.api);
|
||||
|
||||
fetch(); //路由切换导致api切换 导致发送请求
|
||||
},
|
||||
{
|
||||
|
@@ -8,7 +8,6 @@ export function createPermissionGuard(router: Router, whiteNameList: string[]) {
|
||||
const authorizationStore = authorizationService();
|
||||
const appConfig = appConfigStore();
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
next();
|
||||
if (!appConfig.userCustomRouterGuard) {
|
||||
setRouteChange(to);
|
||||
if (to?.query?.nervsid) {
|
||||
|
@@ -1,9 +1,8 @@
|
||||
|
||||
|
||||
import { log } from '/nerv-lib/util';
|
||||
import { appConfigStore } from '/nerv-lib/saas/store/modules/app-config';
|
||||
let modules = import.meta.globEager('/src/router/**/*.ts');
|
||||
const modulesOP = import.meta.globEager('/src/router-op/**/*.ts');
|
||||
console.log(modules);
|
||||
|
||||
const modulesCloud = import.meta.globEager('/src/router-cloud/**/*.ts');
|
||||
import { appConfig } from '/@/config/app.config.ts';
|
||||
|
@@ -72,7 +72,7 @@
|
||||
*/
|
||||
|
||||
* {
|
||||
scrollbar-width: thin;
|
||||
// scrollbar-width: thin;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
|
@@ -13,8 +13,8 @@
|
||||
:initSiderKey="selectedSiderKeys"
|
||||
:initSiderOpenKey="selectedSiderOpenKeys" />
|
||||
<a-layout>
|
||||
<!-- <newNsTags v-if="configStore.useHistoryTag" /> -->
|
||||
<ns-tags />
|
||||
<newNsTags v-if="configStore.useHistoryTag" />
|
||||
<ns-tags v-else />
|
||||
<!-- <NsBreadcrumb v-else :breadcrumbList="breadcrumbList" /> -->
|
||||
<a-layout-content class="ns-content">
|
||||
<!-- <transition name="fade-slide" mode="out-in"> -->
|
||||
@@ -73,6 +73,7 @@
|
||||
authorizationStore.setProjectId(Cookies.get('projectUuid'));
|
||||
}
|
||||
const { route: routeModules, routeModuleObject, routeModule } = storeToRefs(useRouteStore());
|
||||
console.log(routeModules, 'routeModules');
|
||||
|
||||
const headers = computed(() => {
|
||||
const module = cloneDeep(routeModules.value);
|
||||
|
@@ -22,7 +22,7 @@
|
||||
<template #tab>
|
||||
<a-dropdown :trigger="index === 0 ? [] : ['contextmenu']">
|
||||
<div>
|
||||
{{ item?.meta?.title }}
|
||||
{{ item?.title }}
|
||||
<ReloadOutlined
|
||||
@click="reload"
|
||||
v-if="
|
||||
@@ -94,6 +94,8 @@
|
||||
const loadingClass = ref('reload');
|
||||
const keepAliveStore = useKeepAlive();
|
||||
const getTabsState = computed(() => tagsStore.getTags);
|
||||
console.log(getTabsState);
|
||||
|
||||
const reload = () => {
|
||||
setReloadChange();
|
||||
loadingClass.value = 'iconLoading';
|
||||
|
@@ -16,7 +16,7 @@
|
||||
backgroundSize: 'cover',
|
||||
}">
|
||||
<div class="lg_card">
|
||||
<h1 class="lg_card_title">账号登录</h1>
|
||||
<h1 class="lg_card_title">账号登录cur</h1>
|
||||
<p v-show="!errorShow" style="height: 8px"></p>
|
||||
<p v-show="errorShow" class="lg_card_error">{{ errorMsg }}</p>
|
||||
<p class="lg_card_tip">用户名/手机号</p>
|
||||
@@ -86,64 +86,67 @@
|
||||
if (userName.value !== '' && password.value !== '') {
|
||||
errorShow.value = false;
|
||||
let data = JSON.stringify({ userName: userName.value, password: password.value });
|
||||
loading.value = true;
|
||||
async function logins() {
|
||||
try {
|
||||
const res = await configStore.userLogin(JSON.parse(data));
|
||||
if (res.success) {
|
||||
if (res.data?.userToken) {
|
||||
Cookies.set('nervsid', res.data?.userToken);
|
||||
}
|
||||
const info = await configStore.userInfo();
|
||||
info.success
|
||||
? window.sessionStorage.setItem('userInfo', JSON.stringify(info.data))
|
||||
: '';
|
||||
loading.value = false;
|
||||
if (configStore.enablePermissions) {
|
||||
const res = await configStore.userResource();
|
||||
if (configStore.customApplication) {
|
||||
await useAuthorization.initMenuResource();
|
||||
}
|
||||
|
||||
initUrl.value = '';
|
||||
const dealInitUrl = (item) => {
|
||||
if (item.type === 'menus' && item.menus && item.menus?.length !== 0) {
|
||||
dealInitUrl(item.menus[0]);
|
||||
} else {
|
||||
// if (item.type === 'noChildrenMenu') {
|
||||
initUrl.value = configStore.resourceName
|
||||
? item.code.replace(configStore.resourceName, '')
|
||||
: item.code;
|
||||
// }
|
||||
}
|
||||
};
|
||||
if (configStore.resourceName) {
|
||||
const initResource = [];
|
||||
res.data.forEach((item) => {
|
||||
if (item.code.includes(configStore.resourceName)) {
|
||||
initResource.push(item);
|
||||
}
|
||||
});
|
||||
dealInitUrl(initResource[0]);
|
||||
} else {
|
||||
dealInitUrl(res.data[0]);
|
||||
}
|
||||
// dealInitUrl(res.data[0]);
|
||||
useAuthorization.updateUserResource(res.data);
|
||||
const initRouterList = useAuthorization.getInitRouterList;
|
||||
|
||||
router.push({
|
||||
name: initRouterList.length === 0 ? 'error403' : initUrl.value,
|
||||
});
|
||||
} else {
|
||||
Cookies.set('nervsid', 'mockdata');
|
||||
router.replace({ name: 'root' });
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
loading.value = false;
|
||||
}
|
||||
}
|
||||
logins();
|
||||
|
||||
// loading.value = true;
|
||||
// async function logins() {
|
||||
// try {
|
||||
// const res = await configStore.userLogin(JSON.parse(data));
|
||||
// if (res.success) {
|
||||
// if (res.data?.userToken) {
|
||||
// Cookies.set('nervsid', res.data?.userToken);
|
||||
// }
|
||||
// const info = await configStore.userInfo();
|
||||
// info.success
|
||||
// ? window.sessionStorage.setItem('userInfo', JSON.stringify(info.data))
|
||||
// : '';
|
||||
// loading.value = false;
|
||||
// if (configStore.enablePermissions) {
|
||||
// const res = await configStore.userResource();
|
||||
// if (configStore.customApplication) {
|
||||
// await useAuthorization.initMenuResource();
|
||||
// }
|
||||
|
||||
// initUrl.value = '';
|
||||
// const dealInitUrl = (item) => {
|
||||
// if (item.type === 'menus' && item.menus && item.menus?.length !== 0) {
|
||||
// dealInitUrl(item.menus[0]);
|
||||
// } else {
|
||||
// // if (item.type === 'noChildrenMenu') {
|
||||
// initUrl.value = configStore.resourceName
|
||||
// ? item.code.replace(configStore.resourceName, '')
|
||||
// : item.code;
|
||||
// // }
|
||||
// }
|
||||
// };
|
||||
// if (configStore.resourceName) {
|
||||
// const initResource = [];
|
||||
// res.data.forEach((item) => {
|
||||
// if (item.code.includes(configStore.resourceName)) {
|
||||
// initResource.push(item);
|
||||
// }
|
||||
// });
|
||||
// dealInitUrl(initResource[0]);
|
||||
// } else {
|
||||
// dealInitUrl(res.data[0]);
|
||||
// }
|
||||
// // dealInitUrl(res.data[0]);
|
||||
// useAuthorization.updateUserResource(res.data);
|
||||
// const initRouterList = useAuthorization.getInitRouterList;
|
||||
|
||||
// router.push({
|
||||
// name: initRouterList.length === 0 ? 'error403' : initUrl.value,
|
||||
// });
|
||||
// } else {
|
||||
// router.replace({ name: 'root' });
|
||||
// }
|
||||
// }
|
||||
// } catch (err) {
|
||||
// loading.value = false;
|
||||
// }
|
||||
// }
|
||||
// logins();
|
||||
}
|
||||
};
|
||||
const checkoutLogo = (): void => {
|
||||
|
@@ -15,14 +15,14 @@
|
||||
|
||||
setup() {
|
||||
const router = useRouter();
|
||||
router.beforeEach((to, from) => {
|
||||
if (Cookies.get('nervsid') === undefined && to.fullPath !== '/login') {
|
||||
if (from.name !== undefined) {
|
||||
message.warn('登陆信息已过期,请重新登录!', 1);
|
||||
}
|
||||
router.push('/login');
|
||||
}
|
||||
});
|
||||
// router.beforeEach((to, from) => {
|
||||
// if (Cookies.get('nervsid') === undefined && to.fullPath !== '/login') {
|
||||
// if (from.name !== undefined) {
|
||||
// message.warn('登陆信息已过期,请重新登录!', 1);
|
||||
// }
|
||||
// router.push('/login');
|
||||
// }
|
||||
// });
|
||||
|
||||
const cachedViews = ['Status'];
|
||||
window.localStorage.setItem('mapKey', JSON.stringify({ type: 'tmap', url: '' }));
|
||||
|
@@ -4,27 +4,31 @@ import { dateUtil } from '/nerv-lib/util/date-util';
|
||||
export const appConfig = {
|
||||
projectType: 'web',
|
||||
baseApi: '/api',
|
||||
enablePermissions: true,
|
||||
enablePermissions: false,
|
||||
// siderPosition: 'left',
|
||||
baseHeader: '/parkingManage',
|
||||
baseRouter: '/parkingManage/parkingLotManage',
|
||||
userCustomRouterGuard: (to, from, next, whiteNameList, authorizationStore, appConfig) => {
|
||||
console.log({ to, from, next, whiteNameList, authorizationStore, appConfig }, 'routeConfig');
|
||||
next();
|
||||
},
|
||||
customUpdatePwd: () => import('/@/view/updatePassword/updatePassword.vue'),
|
||||
timeout: 60 * 1000,
|
||||
userLoginApi: 'api/web/objs/Login',
|
||||
userResourceApi: '/api/web/objs/User/Resource',
|
||||
userInfoApi: 'api/web/objs/CurrentUser',
|
||||
useHistoryTag: true,
|
||||
// userResourceApi: '/api/web/objs/User/Resource',
|
||||
// userInfoApi: 'api/web/objs/CurrentUser',
|
||||
useHistoryTag: false,
|
||||
// 修改密码配置
|
||||
updatePassWordInfo: {
|
||||
title: '修改密码',
|
||||
subtitle: '芜优出行平台',
|
||||
api: '/api/web/objs/User/changePassword',
|
||||
},
|
||||
headerBellInfo: {
|
||||
isShow: true,
|
||||
api: '/api/web/objs/bulletin/readCount',
|
||||
toRouterName: 'NoticeManageIndex',
|
||||
},
|
||||
// headerBellInfo: {
|
||||
// isShow: true,
|
||||
// api: '/api/web/objs/bulletin/readCount',
|
||||
// toRouterName: 'NoticeManageIndex',
|
||||
// },
|
||||
resourceInfo: {
|
||||
application: {
|
||||
version: '1.1.74',
|
||||
|
@@ -15,12 +15,6 @@
|
||||
name: 'ParkingStorageIndex',
|
||||
|
||||
setup() {
|
||||
// 接入方式
|
||||
const way = ref();
|
||||
result.then((res) => {
|
||||
way.value = res;
|
||||
});
|
||||
|
||||
const data = ref({});
|
||||
|
||||
const keyMapArr = [
|
||||
@@ -83,9 +77,36 @@
|
||||
];
|
||||
|
||||
const tableConfig = {
|
||||
api: '/api/parking_merchant/objs/libCarPlace/pageList',
|
||||
api: {
|
||||
url: '/carbon_emission/device/getGatewayList',
|
||||
method: 'post',
|
||||
},
|
||||
value: [
|
||||
{
|
||||
id: 3,
|
||||
name: '测试',
|
||||
officesId: '',
|
||||
types: '1201',
|
||||
model: '',
|
||||
manufacturer: '',
|
||||
ip: '192.168.0.7',
|
||||
port: '22',
|
||||
agreement: '1301',
|
||||
protocolVersion: '1401',
|
||||
collectingDatabase: '602',
|
||||
position: '',
|
||||
serialNumber: '',
|
||||
username: '',
|
||||
password: '',
|
||||
insertTime: '2024-03-15 13:14:04',
|
||||
serialPortList: null,
|
||||
insertUser: null,
|
||||
},
|
||||
],
|
||||
title: '停车场管理',
|
||||
rowSelection: null,
|
||||
paramsPageField: 'pageNumber',
|
||||
listField: 'data.records',
|
||||
headerActions: [
|
||||
// {
|
||||
// label: '新增',
|
||||
@@ -126,8 +147,8 @@
|
||||
// scroll: { x: 1200 },
|
||||
columns: [
|
||||
{
|
||||
title: '停车场名称',
|
||||
dataIndex: 'placeName',
|
||||
title: '名称',
|
||||
dataIndex: 'name',
|
||||
// textNumber: 8,
|
||||
// textEllipsis: true,
|
||||
},
|
||||
@@ -142,9 +163,6 @@
|
||||
title: '接入方式',
|
||||
textNumber: 6,
|
||||
dataIndex: 'dataSource',
|
||||
customRender: ({ value }) => {
|
||||
return way.value ? way.value[value] : '';
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '是否支持预约',
|
||||
@@ -188,9 +206,6 @@
|
||||
// textNumber: 8,
|
||||
// textEllipsis: true,
|
||||
dataIndex: 'address',
|
||||
customRender: (value) => {
|
||||
return value.record.provinceName + value.record.cityName + value.record.areaName;
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -203,49 +218,6 @@
|
||||
name: 'ParkingStorageDetail',
|
||||
route: { name: 'ParkingStorageDetail' },
|
||||
},
|
||||
|
||||
// {
|
||||
// label: '编辑',
|
||||
|
||||
// dynamicParams: 'uuid',
|
||||
|
||||
// name: 'check',
|
||||
|
||||
// route: '/operationsManage/operationsManage/edit',
|
||||
// },
|
||||
|
||||
// {
|
||||
// label: '删除',
|
||||
|
||||
// dynamicParams: {
|
||||
// uuidSet: 'uuid[]',
|
||||
// },
|
||||
|
||||
// name: 'delete',
|
||||
|
||||
// confirm: {
|
||||
// title: '警告',
|
||||
|
||||
// content: '确认要删除吗?',
|
||||
// },
|
||||
|
||||
// isReload: true,
|
||||
|
||||
// api: '/api/parking_merchant/objs/libCarPlace/delete',
|
||||
// },
|
||||
|
||||
// {
|
||||
// label: '潮汐时间设置',
|
||||
|
||||
// dynamicParams: 'uuid',
|
||||
|
||||
// name: 'check',
|
||||
// ifShow: (record) => {
|
||||
// return !record.dataSource;
|
||||
// },
|
||||
|
||||
// route: '/operationsManage/operationsManage/timeSetting',
|
||||
// },
|
||||
],
|
||||
},
|
||||
|
||||
|
@@ -96,10 +96,9 @@ const proxy = {
|
||||
// rewrite: (path) => path.replace(/^\/api\/person/, ''),
|
||||
// },
|
||||
|
||||
'/api': {
|
||||
'/carbon_emission': {
|
||||
//target: 'https://parking.test.sk1111.cn/',
|
||||
target: 'https://manager.parking.sk1111.cn/',
|
||||
// target: 'https://manager.parking.whcsbc.com/',
|
||||
target: 'http://140.210.143.1:14492',
|
||||
changeOrigin: true,
|
||||
},
|
||||
};
|
||||
|
Reference in New Issue
Block a user