From 1577c2e2874c1fad9ac684356bf0e568c3015045 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期三, 27 十一月 2024 09:46:15 +0800
Subject: [PATCH] 1、大理片笼新增进笼规则,计算本工程下所有玻璃的虚拟格子信息,按照虚拟格子,匹配笼内的实际格子,进笼之后查看格子是否有到齐的,执行调度任务 2、卧理修改任务执行顺序,移除捕获异常操作 3、不覆盖原有逻辑,新增opc任务,避免任务重复执行报错
---
UI-Project/src/router/index.js | 58 ++++++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 48 insertions(+), 10 deletions(-)
diff --git a/UI-Project/src/router/index.js b/UI-Project/src/router/index.js
index f492054..c62b00d 100644
--- a/UI-Project/src/router/index.js
+++ b/UI-Project/src/router/index.js
@@ -3,7 +3,6 @@
// import User from '../views/sys/User.vue'
// import Role from '../views/sys/Role.vue'
// import Menu from '../views/sys/Menu.vue'
-
const router = createRouter({
history: createWebHashHistory(),
routes: [
@@ -17,6 +16,11 @@
path: '/login',
name: 'login',
component: () => import('../views/LoginView.vue')
+ },
+ {
+ path: '/new-page', // 鏂板鐨勬棤闇�鐧诲綍鐨勯〉闈�
+ name: 'newPage',
+ component: () => import('../views/NewPage.vue')
},
{
path: '/main',
@@ -68,26 +72,41 @@
/*----------- 涓婄墖鏈� ----------------*/
{
path: 'Returns',
- name: 'Returns',
- component: () => import('../views/Returns/returns.vue'),
+ name: 'return',
+ component: () => import('../views/Returns/return.vue'),
children:[
{
path: '/Returns/returns',
name: 'returns',
component: () => import('../views/Returns/returns.vue')
},
+ {
+ path: '/Returns/upreturns',
+ name: 'upreturns',
+ component: () => import('../views/Returns/upreturns.vue')
+ },
+ {
+ path: '/Returns/upreturns2',
+ name: 'upreturns2',
+ component: () => import('../views/Returns/upreturns2.vue')
+ },
]
},
/*----------- 鎺扮墖/璇嗗埆 ----------------*/
{
path: 'Identify',
- name: 'Identify',
- component: () => import('../views/Identify/identify.vue'),
- children:[
+ name: 'ident',
+ component: () => import('../views/Identify/ident.vue'),
+ children: [
{
path: '/Identify/identify',
name: 'identify',
component: () => import('../views/Identify/identify.vue')
+ },
+ {
+ path: '/Identify/identifwu',
+ name: 'identifwu',
+ component: () => import('../views/Identify/identifwu.vue')
},
]
},
@@ -107,6 +126,11 @@
name: 'cachingun',
component: () => import('../views/Caching/cachingun.vue')
},
+ {
+ path: '/Caching/cachingyiwu',
+ name: 'cachingyiwu',
+ component: () => import('../views/Caching/cachingyiwu.vue')
+ },
]
},
/*----------- 纾ㄨ竟锛堝喎鍔犲伐锛� ----------------*/
@@ -124,6 +148,11 @@
path: '/StockBasicData/stockBasicDatatwo',
name: 'stockBasicDatatwo',
component: () => import('../views/StockBasicData/stockBasicDatatwo.vue')
+ },
+ {
+ path: '/StockBasicData/stockBasicyiwu',
+ name: 'stockBasicyiwu',
+ component: () => import('../views/StockBasicData/stockBasicyiwu.vue')
},
]
},
@@ -204,7 +233,7 @@
}
]
},
-
+
/*----------- 鍙鍖栫郴缁� ----------------*/
{
path: 'Visualization',
@@ -302,7 +331,7 @@
},
{
path: '',
- redirect: '/returns/returns'
+ redirect: '/Returns/returns'
}
]
},
@@ -314,5 +343,14 @@
]
})
-
-export default router
+
+// 瀵艰埅瀹堝崼
+router.beforeEach((to, from, next) => {
+ const isAuthenticated = !!localStorage.getItem('authToken'); // 鍋囪杩欐槸浣犵殑鐧诲綍鐘舵�佹鏌ラ�昏緫
+ if (to.matched.some(record => record.meta.requiresAuth) && !isAuthenticated) {
+ next({ name: 'login' }); // 濡傛灉闇�瑕佺櫥褰曚絾鏈櫥褰曪紝鍒欓噸瀹氬悜鍒扮櫥褰曢〉闈�
+ } else {
+ next(); // 鍚﹀垯缁х画瀵艰埅
+ }
+});
+export default router
\ No newline at end of file
--
Gitblit v1.8.0