BossAgents Data Asset Management Platform — System Status Documentation
I. Project Overview
| Item | Description |
|---|---|
| Project Name | BossAgents — AI-driven Enterprise PLM Platform |
| Technology Stack | Vue 3 + Vite + Node.js + SQLite |
| Core Modules | Data Asset Management, Process Specification Management, BOM Management, Digital Employees |
| Service Ports | 3006 (Backend) / 5173 (Frontend Development) |
| Build Command | npm run build |
II. Core Data Models
2.1 Data Asset Table (data_assets)
CREATE TABLE data_assets (
id TEXT PRIMARY KEY,
asset_type TEXT NOT NULL, -- 资产类型
sub_type TEXT DEFAULT '',
name TEXT NOT NULL, -- 资产名称
code TEXT DEFAULT '',
category TEXT DEFAULT '',
tags TEXT DEFAULT '',
description TEXT DEFAULT '',
source_type TEXT DEFAULT '', -- 数据来源类型
source_id TEXT DEFAULT '', -- 源数据ID
source_data TEXT DEFAULT '', -- 源数据JSON
quality_score REAL DEFAULT 0, -- 质量评分
value_score REAL DEFAULT 0, -- 价值评分
usage_count INTEGER DEFAULT 0,
status TEXT DEFAULT 'active',
created_at TEXT,
updated_at TEXT
);
2.2 资产关系表 (asset_relations)
CREATE TABLE asset_relations (
id TEXT PRIMARY KEY,
source_asset_id TEXT NOT NULL, -- 源资产ID
target_asset_id TEXT NOT NULL, -- 目标资产ID
relation_type TEXT NOT NULL, -- 关系类型
strength REAL DEFAULT 1.0, -- 关系强度
metadata TEXT DEFAULT '',
created_at TEXT
);
2.3 资产类型分布(当前共3656条)
| 资产类型 | 数量 | 说明 |
|---------|------|------|
| process_spec | 1505 records | Process Specifications (from PPS process data table) |
| proc_dictionary | 1001 records | Process Dictionary (extracted from process specifications) |
| step_dictionary | 1000 records | Step Dictionary (extracted from process specifications) |
| inspection_point | 100 records | Inspection Points (extracted from process specifications) |
| process_sequence | 50 records | Process Sequence |
III. Data Asset Dashboard Functions
3.1 Page Routing
路径: /data-asset-dashboard
组件: src/views/DataAssetDashboard.vue
3.2 功能Tab
| Tab | 功能 | 状态 |
|-----|------|------|
| Data Overview | KPI card display, statistical data | ✅ Normal |
| Data Health Check | Five-dimensional quality check, risk scoring | ✅ Normal |
| Asset Valuation | Asset value assessment, historical records | ✅ Normal |
| Relationship Graph | Asset relationship visualization | ⚠️ Needs Optimization |
| Rule Engine | Rule management, template management | ✅ Normal |
3.3 Current Implementation of Relationship Graph
Layout: Left asset list + Right relationship diagram
- Left Asset List
- Supports filtering by type (Process Specification/Process/Operation/Inspection Point)
- Supports search by name
- Pagination browsing (15 records per page)
- Right Relationship Diagram
- Displays associated relationships after selecting an asset
- Circular layout: Central node + Peripheral nodes
- Supports switching between 1-layer/2-layer relationship depth
- Relationship Types
- contains_process: Process Specification contains Process
- decomposes_to: Process decomposes to Operation
- has_inspection: Operation contains Inspection Point
IV. API Interfaces
4.1 Asset List
GET /api/unified-assets/list?page=1&pageSize=15&asset_type=process_spec&keyword=xxx
4.2 资产详情
GET /api/unified-assets/:id
4.3 单资产关系图谱
GET /api/unified-assets/:id/relation-graph?depth=2&maxNodes=50&maxEdges=100
4.4 仪表盘统计
GET /api/unified-assets/dashboard
五、数据来源说明
5.1 3656条资产数据来源
所有数据资产均从 process_specs 工艺规程真实数据表中提取:
process_specs (工艺规程主表)
↓ extract processes
proc_dictionary (工序词典) —— 从steps_json中提取工序名称
↓ extract steps
step_dictionary (工步词典) —— 从proc.steps中提取工步名称
↓ extract inspection
inspection_point (检验点) —— 从工步的检验要求中提取
5.2 455条关系数据来源
关系数据在服务启动时或首次调用dashboard API时自动重建:
// unified-asset-service.js — registerFromProcessSpec()
// 建立工艺规程 → 工序 → 工步的层级关系
this.addRelation(assetId, procAssetId, 'contains_process', 1.0);
this.addRelation(procAssetId, stepAssetId, 'decomposes_to', 1.0);
六、当前问题与改进建议
6.1 已识别问题
| 问题 | 严重程度 | 说明 |
|------|---------|------|
| Relationship Graph Node Name Truncation | Medium | Long names only show the first 5 characters, affecting readability |
| Some Assets Have No Relationships | Medium | About 60% of process specification steps_json are empty, lacking associated data |
| Insufficient Relationship Data Volume | Medium | Only 455 relationships, some assets are isolated |
| Front-end Styling is Rough | Low | Relationship graph SVG styling is not aesthetically pleasing |
6.2 Improvement Suggestions
- Enhance Relationship Data
- Establish connections from more data sources (BOM, documents, parameters)
- Automatically discover cross-type associations (e.g., Process Specification ↔ Part ↔ BOM)
- Optimize Relationship Graph Visualization
- Use professional chart libraries (e.g., ECharts, GraphViz)
- Support drag-and-drop, zoom, and force-directed layout
- Add node detail tooltips
- Improve Data Quality
- Populate missing steps_json data
- Add asset descriptions and tag information
VII. Core File List
7.1 Backend Services
| File | Description |
|---|---|
| server/core/unified-asset-service.js | Unified Data Asset Service (Core) |
| server.js | Main service entry, API routes |
| server/scripts/seed-data.js | Seed data population |
| server/database1.js | SQLite Database Connection |
7.2 Frontend Pages
| File | Description |
|---|---|
| src/views/DataAssetDashboard.vue | Data Asset Dashboard (including relationship graph) |
| src/views/UnifiedAssetPlatform.vue | Unified Asset Management Platform |
| src/router/index.js | Vue Router Configuration |
| src/composables/usePhosphorusDemo.js | Phosphorus Chemical Demo Data Hook |
7.3 Configuration Files
| File | Description |
|---|---|
| package.json | Project Dependencies |
| vite.config.mjs | Vite Build Configuration |
| config.yaml | Server Configuration |
VIII. Startup Method
# 安装依赖
pnpm install
# 启动后端服务(端口3006)
node server.js
# 启动前端开发(端口5173)
npm run dev:vite
# 构建前端
npm run build
九、数据验证
9.1 验证命令
# 查看资产统计
curl https://ylxt.chat/api/unified-assets/dashboard
# 查看工艺规程列表
curl https://ylxt.chat/api/unified-assets/list?asset_type=process_spec
# 查看某资产关系图谱
curl https://ylxt.chat/api/unified-assets/spec_pps0005290Bs2pbsl/relation-graph?depth=2
9.2 预期结果
// 资产统计
{
"stats": {
"totalAssets": 3656,
"totalRelations": 455,
"byType": {
"process_spec": 1505,
"proc_dictionary": 1001,
"step_dictionary": 1000,
"inspection_point": 100,
"process_sequence": 50
}
}
}
// 关系图谱示例(spec_pps0005290Bs2pbsl)
{
"nodes": [
{ "id": "spec_pps0005290Bs2pbsl", "name": "工艺文件", "group": "process_spec" },
{ "id": "kno_73", "name": "喷砂", "group": "proc_dictionary" },
{ "id": "kno_1740", "name": "对零件进行喷砂(Ⅱ)", "group": "step_dictionary" }
],
"edges": [
{ "source": "spec_pps0005290Bs2pbsl", "target": "kno_73", "label": "contains_process" },
{ "source": "kno_73", "target": "kno_1740", "label": "decomposes_to" }
]
}
十、总结
当前系统已完成基础的数据资产管理功能,3656条资产数据真实有效(从PPS工艺数据表提取),关系图谱功能可用但需进一步优化。如需接手,建议优先:
- Enrich relationship data (add more association types)
- Optimize the visualization effect of the relationship graph
- Enhance frontend interaction experience
BossAgents