Files
track/frontend
duxingchen 8458b99782 feat(frontend): 实现任务全景树组件与三大操作弹窗
TaskTreeViewer (components/TaskTree/):
- 搜索栏: 输入 16 位序列号 → getTaskTree() → 递归渲染产品任务树
- 状态标签: PENDING(黄)/WIP(蓝)/COMPLETED(绿)/REJECTED(红)/ARCHIVED(灰)
- 返工警告: is_rework → 红色脉冲 ⚠返工 标签 + 红色 ring 边框
- 裂变标识: child_tasks>1 → 紫色 裂变×N 标签 + 树形连接线
- 产品摘要栏: 序列号/订单/当前位置(virtual_warehouse→🏭仓库)/任务总数

三大操作弹窗 (替换 alert 占位符):
- ReceiveConfirmModal: 二次确认 → receiveTask() → Toast + 刷新树
- RejectModal: 驳回原因必填(≤500字) → rejectTask() → 自动返工提示
- TransferModal: 工序名称 + 多接收人标签输入(Enter添加/X删除)
  + 🏭虚拟入库勾选 + 备注 + 实时裂变预览 → transferTask()

路由接入:
- App.tsx: 包裹 ToastProvider, 新增 /admin/tasks 路由
- AdminLayout: 侧边栏新增「任务全景」菜单 (GitBranch 图标)
- AdminTasksPage: 薄封装层
2026-08-04 17:30:26 +08:00
..
2026-08-04 10:05:59 +08:00
2026-08-04 10:05:59 +08:00
2026-08-04 10:05:59 +08:00
2026-08-04 10:05:59 +08:00

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the Oxlint configuration

If you are developing a production application, we recommend enabling type-aware lint rules by installing oxlint-tsgolint and editing .oxlintrc.json:

{
  "$schema": "./node_modules/oxlint/configuration_schema.json",
  "plugins": ["react", "typescript", "oxc"],
  "options": {
    "typeAware": true
  },
  "rules": {
    "react/rules-of-hooks": "error",
    "react/only-export-components": ["warn", { "allowConstantExport": true }]
  }
}

See the Oxlint rules documentation for the full list of rules and categories.