feat: 五项目业务实现并对接完成

- MES(B): 工单/BOM/备料/工序字典/PLC下发/拧紧/扫码报工/半成品/AGV/追溯逻辑,WMS与海康RCS客户端,看板Redis缓存API(概览/设备/进度/报警/趋势)+SSE
- WMS(C): JWT滑动续签、Excel导入、盘点、内部API、种子数据、独立Postgres配置
- WMS客户端(E): Go网关8891反向代理+内嵌Vue3十页
- 工位终端(D): SQLite本地缓存+模拟拧紧源+内嵌Vue3页面
- Dashboard(A): 看板数据改接MES内部缓存API,SSE实时刷新+vite代理
- 清理各项目球形磨遗留代码,新增部署手册.md
This commit is contained in:
SunYF
2026-08-27 19:50:57 +08:00
parent c85c3bd6f1
commit a2afd2f6dc
335 changed files with 87495 additions and 7357 deletions
@@ -0,0 +1,43 @@
import { createRouter, createWebHistory } from 'vue-router'
import MainLayout from '../layouts/MainLayout.vue'
const routes = [
{ path: '/login', name: 'Login', component: () => import('../pages/Login.vue'), meta: { title: '登录' } },
// 免登录大屏:全屏无侧栏
{ path: '/display', name: 'Display', component: () => import('../pages/Display.vue'), meta: { title: '库存大屏' } },
{
path: '/',
component: MainLayout,
children: [
{ path: '', name: 'Dashboard', component: () => import('../pages/Dashboard.vue'), meta: { title: '工作台' } },
{ path: 'inbound', name: 'Inbound', component: () => import('../pages/Inbound.vue'), meta: { title: '入库管理' } },
{ path: 'outbound', name: 'Outbound', component: () => import('../pages/Outbound.vue'), meta: { title: '备料出库' } },
{ path: 'inventory', name: 'Inventory', component: () => import('../pages/Inventory.vue'), meta: { title: '库存查询' } },
{ path: 'inspection', name: 'Inspection', component: () => import('../pages/Inspection.vue'), meta: { title: '质量检验' } },
{ path: 'stocktake', name: 'Stocktake', component: () => import('../pages/Stocktake.vue'), meta: { title: '库存盘点' } },
{ path: 'package', name: 'Package', component: () => import('../pages/Package.vue'), meta: { title: '包装绑定' } },
{ path: 'ledger', name: 'Ledger', component: () => import('../pages/Ledger.vue'), meta: { title: '物料台账' } }
]
},
{ path: '/:pathMatch(.*)*', redirect: '/' }
]
const router = createRouter({
history: createWebHistory(),
routes
})
// 路由守卫:除 /login 和 /display 外校验 token
router.beforeEach((to) => {
if (to.path !== '/login' && to.path !== '/display' && !to.path.startsWith('/display')) {
if (!localStorage.getItem('token')) {
return { path: '/login', query: to.fullPath ? { redirect: to.fullPath } : {} }
}
}
})
router.afterEach((to) => {
document.title = to.meta?.title ? `${to.meta.title} - 北自所库房客户端` : '北自所库房客户端'
})
export default router