SheBeiGuanLi/README.md
2026-03-10 15:51:03 +08:00

107 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 摄影设备借还管理系统
## 项目简介
摄影设备借还管理系统是一个用于管理摄影设备库存、借用、归还的Web应用系统。系统提供设备信息管理、借用归还流程、库存统计、条码打印等功能,帮助管理人员高效管理摄影设备资源。
## 技术栈
### 前端
- **框架**: Vue.js 3 + TypeScript
- **UI设计**: Apple Design System (Tailwind CSS)
- **状态管理**: Pinia
- **路由**: Vue Router 4
- **HTTP客户端**: Axios
- **图表库**: ECharts
- **条码生成**: JsBarcode
- **构建工具**: Vite
### 后端
- **框架**: Node.js + Express + TypeScript
- **数据库**: MySQL 8.0
- **ORM**: Prisma
- **身份认证**: Keycloak (待集成)
## 项目结构
```
shebeiguanli/
├── frontend/ # 前端项目
│ ├── src/
│ │ ├── api/ # API接口
│ │ ├── components/# 组件
│ │ ├── router/ # 路由配置
│ │ ├── stores/ # 状态管理
│ │ ├── views/ # 页面
│ │ └── utils/ # 工具函数
│ └── package.json
├── backend/ # 后端项目
│ ├── src/
│ │ ├── controllers/# 控制器
│ │ ├── routes/ # 路由
│ │ ├── utils/ # 工具函数
│ │ └── index.ts # 入口文件
│ ├── prisma/ # Prisma配置
│ └── package.json
└── 开发文档.md # 开发文档
```
## 快速开始
### 前端开发
```bash
cd frontend
npm install
npm run dev
```
前端服务运行在: http://localhost:5173
### 后端开发
1. 配置数据库连接(修改 `.env` 文件)
2. 初始化数据库
```bash
cd backend
npm install
npx prisma generate
npx prisma migrate dev
npm run dev
```
后端服务运行在: http://localhost:3000
### 数据库配置
在 `backend/.env` 文件中配置数据库连接:
```
DATABASE_URL="mysql://root:password@localhost:3306/equipment_management?charset=utf8mb4"
```
## 功能特性
- ✅ 设备管理(增删改查)
- ✅ 设备编码自动生成和自定义录入
- ✅ 设备价格信息管理
- ✅ 扫码出库/入库功能
- ✅ 借用归还管理
- ✅ 统计分析(设备状态、价值统计)
- ✅ Apple Design System UI设计
- ⏳ 条码打印功能(待实现)
- ⏳ Keycloak认证集成(待实现)
## 开发规范
- 前端严格遵循Apple官方UI设计规范
- 使用TypeScript进行类型检查
- 代码遵循ESLint规范
- 使用Git进行版本控制
## 许可证
ISC