feat: 修改大屏样式布局

This commit is contained in:
2026-05-19 17:56:44 +08:00
parent 5663be1f6b
commit 4434480f32
31 changed files with 2162 additions and 5716 deletions

View File

@@ -16,7 +16,6 @@ const mutations = {
const actions = {
generateRoutes({ commit, state }) {
return new Promise(resolve => {
// 避免重复加载
if (state.addRoutes.length > 0) {
resolve(state.addRoutes)
return
@@ -34,11 +33,10 @@ const actions = {
}
}
// 修复Layout正常加载空组件赋值首页
function filterAsyncRoutes(routes) {
return routes.filter(route => {
if (!route.component || route.component === '') {
route.component = () => import('@/views/home/index.vue')
route.component = () => import('@/modules/dashboardBig/views/index.vue')
} else if (route.component !== 'Layout') {
route.component = loadComponent(route.component)
}
@@ -50,11 +48,9 @@ function filterAsyncRoutes(routes) {
}
function loadComponent(componentPath) {
// 去除开头/和.vue后缀
const path = componentPath.replace(/^\//, '').replace(/\.vue$/, '')
const componentMap = {
'Layout': () => import('@/layout/index.vue'),
'home/index': () => import('@/views/home/index.vue'),
'modules/dashboardBig/views/index': () => import('@/modules/dashboardBig/views/index.vue'),
'modules/dashboardBig/views/order': () => import('@/modules/dashboardBig/views/order.vue'),
'modules/dashboardBig/views/cost': () => import('@/modules/dashboardBig/views/cost.vue'),
@@ -62,20 +58,9 @@ function loadComponent(componentPath) {
'modules/dashboardBig/views/oee': () => import('@/modules/dashboardBig/views/oee.vue'),
'modules/dashboardBig/views/output': () => import('@/modules/dashboardBig/views/output.vue'),
'modules/dashboardBig/views/stopAnalysis': () => import('@/modules/dashboardBig/views/stopAnalysis.vue'),
'screens/list': () => import('@/views/screens/list.vue'),
'screens/create': () => import('@/views/screens/create.vue'),
'screens/edit': () => import('@/views/screens/edit.vue'),
'screens/acid-rolling/index': () => import('@/views/screens/acid-rolling/index.vue'),
'reports/index': () => import('@/views/reports/index.vue'),
'reports/acid-rolling/index': () => import('@/views/reports/acid-rolling/index.vue'),
'reports/acid-stop/index': () => import('@/views/reports/acid-stop/index.vue'),
'system/user/index': () => import('@/views/system/user/index.vue'),
'system/role/index': () => import('@/views/system/role/index.vue'),
'system/menu/index': () => import('@/views/system/menu/index.vue'),
'system/config/index': () => import('@/views/system/config/index.vue'),
'data-source/index': () => import('@/views/data-source/index.vue')
'screens/acid-rolling/index': () => import('@/views/screens/acid-rolling/index.vue')
}
return componentMap[path] || (() => import('@/views/home/index.vue'))
return componentMap[path] || (() => import('@/modules/dashboardBig/views/index.vue'))
}
export default {
@@ -83,4 +68,4 @@ export default {
state,
mutations,
actions
}
}