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