提交后台前端基础框架

This commit is contained in:
wanghao
2025-03-12 12:48:13 +08:00
parent 67a3fc68c9
commit 8e19156555
174 changed files with 36652 additions and 0 deletions

16
Backend/src/router/auth.js Executable file
View File

@@ -0,0 +1,16 @@
export default {
path: '/auth',
name: 'auth',
redirect: '/auth/login',
component: () => import('@/views/auth/layout'),
children: [
{
path: '/auth/login',
meta: {
title: '账号登录?',
needLogin: false,
},
component: () => import('@/views/auth/login'),
},
],
}

View File

@@ -0,0 +1,20 @@
export default {
path: '/device',
name: 'device',
meta: {
title: '设备管理',
needLogin: true,
},
redirect: '/device/index',
component: () => import('@/views/device/layout'),
children: [
{
path: '/device/index',
meta: {
title: '设备列表',
needLogin: true,
},
component: () => import('@/views/device/index'),
},
],
}

20
Backend/src/router/home.js Executable file
View File

@@ -0,0 +1,20 @@
export default {
path: '/home',
name: 'home',
meta: {
title: '首页',
needLogin: true,
},
redirect: '/home/index',
component: () => import('@/views/home/layout'),
children: [
{
path: '/home/index',
meta: {
title: '任务管理',
needLogin: true,
},
component: () => import('@/views/home/index'),
},
],
}

52
Backend/src/router/index.js Executable file
View File

@@ -0,0 +1,52 @@
import Vue from 'vue'
import Router from 'vue-router'
import AuthRouter from './auth'
import HomeRouter from './home'
import SystemRouter from './system'
import ProductRouter from '@/router/product';
import TaskRouter from '@/router/task';
import DeviceRouter from '@/router/device';
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => console.log(err))
}
Vue.use(Router)
const RouteView = {
name: 'RouteView',
render: h => h('router-view'),
}
const routes = [
AuthRouter,
HomeRouter,
SystemRouter,
ProductRouter,
TaskRouter,
DeviceRouter,
{
path: '/',
name: 'home',
component: () => import('@/views/home/layout'),
meta: {
title: '',
needLogin: true,
},
},
{
path: '*',
name: '404 NotFound',
component: () => import('@/views/other/404'),
meta: {
title: '404 NotFound',
needLogin: false,
},
},
]
export default new Router({
routes,
mode: 'hash',
})

View File

@@ -0,0 +1,28 @@
export default {
path: '/product',
name: 'product',
meta: {
title: '商品管理',
needLogin: true,
},
redirect: '/product/index',
component: () => import('@/views/product/layout'),
children: [
{
path: '/product/index',
meta: {
title: '商品列表',
needLogin: true,
},
component: () => import('@/views/product/index'),
},
{
path: '/product/group',
meta: {
title: '商品分组',
needLogin: true,
},
component: () => import('@/views/product/group'),
},
],
}

36
Backend/src/router/system.js Executable file
View File

@@ -0,0 +1,36 @@
export default {
path: '/system',
name: 'system',
meta: {
title: '系统设置',
needLogin: true,
},
redirect: '/system/index',
component: () => import('@/views/system/layout'),
children: [
{
path: '/system/index',
meta: {
title: '个人信息',
needLogin: true,
},
component: () => import('@/views/system/index'),
},
{
path: '/system/user',
meta: {
title: '员工管理',
needLogin: true,
},
component: () => import('@/views/system/user'),
},
{
path: '/system/role',
meta: {
title: '角色管理',
needLogin: true,
},
component: () => import('@/views/system/role'),
},
],
}

View File

@@ -0,0 +1,20 @@
export default {
path: '/task',
name: 'task',
meta: {
title: '任务队列',
needLogin: true,
},
redirect: '/task/index',
component: () => import('@/views/task/layout'),
children: [
{
path: '/task/index',
meta: {
title: '任务队列',
needLogin: true,
},
component: () => import('@/views/task/index'),
},
],
}