|
@@ -476,6 +476,13 @@ const handleRouteTo = (item: any) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (item.routerName) {
|
|
if (item.routerName) {
|
|
|
|
|
+ // 检查路由是否存在(无菜单权限时路由不会被注册)
|
|
|
|
|
+ const routeExists = router.getRoutes().some(r => r.name === item.routerName)
|
|
|
|
|
+ if (!routeExists) {
|
|
|
|
|
+ ElMessage.warning('暂无权限访问该页面')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 特殊处理任务单跳转:默认带上 inspectorIds 和 taskStatusList 参数
|
|
// 特殊处理任务单跳转:默认带上 inspectorIds 和 taskStatusList 参数
|
|
|
const query: any = {
|
|
const query: any = {
|
|
|
searchUserId: id,
|
|
searchUserId: id,
|