feat(web): 引入 Vite 前端应用并扩展仓库忽略规则

将整套 web 源码纳入仓库,并为 web/node_modules、构建产物及本地环境文件配置 .gitignore,同时移除占位用的 assets/.gitkeep。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
caopeng
2026-05-17 15:22:29 +08:00
parent 759637dba2
commit a254aae503
161 changed files with 69862 additions and 11 deletions

163
web/src/router/index.js Normal file
View File

@@ -0,0 +1,163 @@
import NoFound from "../views/NoFound.vue";
import { getTimesheetRouteName } from "../configs/common.js";
const routes = [
{
path: "/",
component: () => import("../views/Layout.vue"),
redirect: { name: getTimesheetRouteName("OverviewDashboard") },
children: [
// 登录(保留路由供退出登录跳转;启动默认进入概览看板,不再强制先进登录页)
{
path: "login",
alias: ["Login"],
name: getTimesheetRouteName("Login"),
component: () => import("../views/Login.vue"),
},
// 概览看板
{
path: "OverviewDashboard",
name: getTimesheetRouteName("OverviewDashboard"),
component: () => import("../views/overview/OverviewDashboard.vue"),
},
{
path: "EquipmentRepairReport",
name: getTimesheetRouteName("EquipmentRepairReport"),
component: () => import("../views/overview/EquipmentRepairReport.vue"),
},
{
path: "EquipmentAcceptanceReport",
name: getTimesheetRouteName("EquipmentAcceptanceReport"),
component: () => import("../views/overview/EquipmentAcceptanceReport.vue"),
},
{
path: "EquipmentMaintenanceReport",
name: getTimesheetRouteName("EquipmentMaintenanceReport"),
component: () => import("../views/overview/EquipmentMaintenanceReport.vue"),
},
{
path: "EquipmentMeteringReport",
name: getTimesheetRouteName("EquipmentMeteringReport"),
component: () => import("../views/overview/EquipmentMeteringReport.vue"),
},
// 系统管理
// 员工管理
{
path: "EmployeeManage",
name: getTimesheetRouteName("EmployeeManage"),
component: () => import("../views/system/EmployeeManage.vue"),
},
// 用户管理
{
path: "UserManage",
name: getTimesheetRouteName("UserManage"),
component: () => import("../views/system/UserManage.vue"),
},
// 角色管理
{
path: "RoleManage",
name: getTimesheetRouteName("RoleManage"),
component: () => import("../views/system/RoleManage.vue"),
},
// 厂区管理
{
path: "FactoryManage",
name: getTimesheetRouteName("FactoryManage"),
component: () => import("../views/system/FactoryManage.vue"),
},
//信息机管理
{
path: "SensorManage",
name: getTimesheetRouteName("SensorManage"),
component: () => import("../views/system/SensorManage.vue"),
},
{
path: "OperationLog",
name: getTimesheetRouteName("OperationLog"),
component: () => import("../views/system/OperationLog.vue"),
},
// 资产管理
// 附件管理
{
path: "AttachmentManage",
name: getTimesheetRouteName("AttachmentManage"),
component: () => import("../views/asset/AttachmentManage.vue"),
},
// 资产台账
{
path: "AssetList",
name: getTimesheetRouteName("AssetList"),
component: () => import("../views/asset/AssetList.vue"),
},
// 资产流程
{
path: "AssetProcess",
name: getTimesheetRouteName("AssetProcess"),
component: () => import("../views/asset/AssetProcess.vue"),
},
// 设备维护
{
path: "DeviceMaintain",
name: getTimesheetRouteName("DeviceMaintain"),
component: () => import("../views/asset/DeviceMaintain.vue"),
},
// 设备维修
{
path: "DeviceRepair",
name: getTimesheetRouteName("DeviceRepair"),
component: () => import("../views/asset/DeviceRepair.vue"),
},
// 资产盘点
{
path: "AssetInventory",
name: getTimesheetRouteName("AssetInventory"),
component: () => import("../views/asset/AssetInventory.vue"),
},
// 门禁权限管理
{
path: "AccessControlManage",
name: getTimesheetRouteName("AccessControlManage"),
component: () => import("../views/asset/AccessControlManage.vue"),
},
// 通知管理
{
path: "NotificationManage",
name: getTimesheetRouteName("NotificationManage"),
component: () => import("../views/asset/NotificationManage.vue"),
},
// 门禁报警记录
{
path: "AccessAlarmRecord",
name: getTimesheetRouteName("AccessAlarmRecord"),
component: () => import("../views/asset/AccessAlarmRecord.vue"),
},
// 资产报警记录(门禁/盘点 Tab
{
path: "AssetAlarmRecord",
name: getTimesheetRouteName("AssetAlarmRecord"),
component: () => import("../views/asset/AssetAlarmRecord.vue"),
},
// 计量管理
// 设备计量
{
path: "DeviceMetering",
name: getTimesheetRouteName("DeviceMetering"),
component: () => import("../views/measurement/DeviceMetering.vue"),
},
// 物料计量
{
path: "MeasureMaterialManage",
name: getTimesheetRouteName("MeasureMaterialManage"),
component: () => import("../views/measurement/MeasureMaterialManage.vue"),
},
]
},
{
path: "/:pathMatch(.*)*",
name: getTimesheetRouteName("NoFound"),
component: NoFound,
},
];
export { routes };