This commit is contained in:
2024-12-16 14:48:04 +08:00
parent a8026ff42b
commit 4eec013af8
7 changed files with 539 additions and 418 deletions

View File

@@ -1,4 +1,4 @@
import { createWebHistory, createRouter } from 'vue-router'
import { createWebHistory, createRouter, createWebHashHistory } from 'vue-router'
import Layout from '@/layout'
/**
@@ -23,6 +23,67 @@ import Layout from '@/layout'
// 公共路由
export const constantRoutes = [
{
name: 'Fullscreen',
path: '/fullscreen',
component: () => import('@/views/deviceManagement/datascreen/index.vue'),
hidden: true
},
// {
// name: 'Fullscreen2',
// path: '/fullscreen2',
// component: () => import('@/views/andonManagement/analysis/fullscreen/index.vue'),
// hidden: true
// },
{
name: 'TheTaskExecuteView',
path: '/TheTaskExecuteView',
component: () => import('@/views/deviceManagement/deviceTaskExecute/TheTaskExecuteView.vue'),
hidden: true
},
{
name: 'SmartScreen',
path: '/SmartScreen',
component: () => import('@/views/SmartScreen/index.vue'),
hidden: true
},
{
name: 'ProdScreen',
path: '/SmartScreen/ProdScreen',
component: () => import('@/views/SmartScreen/ProdScreen/index.vue'),
hidden: true
},
{
name: 'QualityScreen',
path: '/SmartScreen/QualityScreen',
component: () => import('@/views/SmartScreen/QualityScreen/index.vue'),
hidden: true
},
{
name: 'DeviceScreen',
path: '/SmartScreen/DeviceScreen',
component: () => import('@/views/SmartScreen/DeviceScreen/index.vue'),
hidden: true
},
{
name: 'touchScreen',
path: '/productManagement/touchScreen',
component: () => import('@/views/touchScreen/main/index.vue'),
hidden: true
},
// {
// name: 'KANBAN',
// path: '/KANBAN',
// component: () => import('@/views/largeScreen/KANBAN/index.vue'),
// hidden: true
// },
// 物料备料大屏
// {
// name: 'materialKANBAN',
// path: '/materialManagement/materialKANBAN',
// component: () => import('@/views/materialMangement/materialKANBAN/KANBAN/index.vue'),
// hidden: true
// },
{
path: '/redirect',
component: Layout,
@@ -64,13 +125,7 @@ export const constantRoutes = [
component: () => import('@/views/error/Error'),
hidden: true
},
// 触摸屏
{
path: '/productManagement/touchScreen',
component: () => import('@/views/touchScreen/main/index'),
hidden: true
},
//todo app.vue 里路由跳转<router-view>
{
path: '',
component: Layout,
@@ -101,7 +156,8 @@ export const constantRoutes = [
]
const router = createRouter({
history: createWebHistory(import.meta.env.VITE_APP_ROUTER_PREFIX),
//history: createWebHistory(import.meta.env.VITE_APP_ROUTER_PREFIX),
history: createWebHashHistory(),
routes: constantRoutes,
scrollBehavior(to, from, savedPosition) {
if (savedPosition) {