1
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
This commit is contained in:
173
doc/开发说明.md
Normal file
173
doc/开发说明.md
Normal file
@@ -0,0 +1,173 @@
|
||||
# 教室预订管理系统 - 开发说明
|
||||
|
||||
## 项目概述
|
||||
|
||||
基于 Vben Admin 框架开发的教室预订管理系统后台,使用 Vue 3 + TypeScript + Ant Design Vue 构建。
|
||||
|
||||
## 已完成功能
|
||||
|
||||
### 1. API 配置
|
||||
- ✅ 配置 API 基础 URL: `https://xz.dhdjy.com`
|
||||
- ✅ 支持 Session 认证(通过 Cookie)
|
||||
- ✅ 响应格式适配(code: 200 表示成功)
|
||||
|
||||
### 2. API 接口定义
|
||||
已创建所有 API 接口定义,包括:
|
||||
- ✅ 登录相关(登录、获取管理员信息、退出登录)
|
||||
- ✅ 首页相关(获取系统信息)
|
||||
- ✅ 个人信息(获取、更新、修改密码)
|
||||
- ✅ 教室管理(列表、详情、新增、编辑、删除、批量删除、座位布局等)
|
||||
- ✅ 预订管理(列表、同意/拒绝申请)
|
||||
- ✅ 学生管理(列表、详情、新增、编辑、删除、状态更新、导入等)
|
||||
- ✅ 班级管理(列表、新增、编辑、删除)
|
||||
- ✅ 教师管理(列表、详情、新增、编辑、删除)
|
||||
- ✅ 用户管理(列表、详情、新增、编辑、删除、状态更新)
|
||||
- ✅ 学校管理(列表、详情、新增、编辑、删除、账号管理)
|
||||
- ✅ 系统设置(获取、保存、上传图片)
|
||||
- ✅ 通用功能(获取必应壁纸)
|
||||
|
||||
### 3. 路由配置
|
||||
已创建所有模块的路由配置:
|
||||
- ✅ 教室管理路由
|
||||
- ✅ 预订管理路由
|
||||
- ✅ 学生管理路由
|
||||
- ✅ 班级管理路由
|
||||
- ✅ 教师管理路由
|
||||
- ✅ 用户管理路由(仅超级管理员)
|
||||
- ✅ 学校管理路由(仅超级管理员)
|
||||
- ✅ 系统设置路由(仅超级管理员)
|
||||
|
||||
### 4. 页面组件
|
||||
已创建核心页面组件:
|
||||
- ✅ 教室管理列表页
|
||||
- ✅ 教室管理详情/编辑页
|
||||
- ✅ 学生管理列表页
|
||||
- ✅ 学生管理详情/编辑页
|
||||
- ✅ 预订管理列表页
|
||||
- ✅ 班级管理列表页
|
||||
- ✅ 教师管理列表页
|
||||
- ✅ 教师管理详情/编辑页
|
||||
- ✅ 用户管理列表页
|
||||
- ✅ 学校管理列表页
|
||||
- ✅ 学校管理详情/编辑页
|
||||
- ✅ 系统设置页
|
||||
- ✅ 首页(系统概览)
|
||||
|
||||
### 5. 国际化
|
||||
- ✅ 已添加所有页面的中文翻译
|
||||
|
||||
### 6. 登录页面
|
||||
- ✅ 已更新登录页面以适配新的 API 接口
|
||||
|
||||
## 项目结构
|
||||
|
||||
```
|
||||
apps/web-antd/
|
||||
├── src/
|
||||
│ ├── api/
|
||||
│ │ ├── admin/ # 后台管理 API
|
||||
│ │ │ ├── classroom.ts
|
||||
│ │ │ ├── booking.ts
|
||||
│ │ │ ├── student.ts
|
||||
│ │ │ ├── class.ts
|
||||
│ │ │ ├── teacher.ts
|
||||
│ │ │ ├── user.ts
|
||||
│ │ │ ├── school.ts
|
||||
│ │ │ ├── setting.ts
|
||||
│ │ │ ├── profile.ts
|
||||
│ │ │ ├── common.ts
|
||||
│ │ │ └── index-page.ts
|
||||
│ │ ├── core/ # 核心 API(登录、用户信息等)
|
||||
│ │ └── request.ts # 请求配置
|
||||
│ ├── router/
|
||||
│ │ └── routes/
|
||||
│ │ └── modules/ # 路由模块
|
||||
│ ├── views/ # 页面组件
|
||||
│ │ ├── classroom/
|
||||
│ │ ├── booking/
|
||||
│ │ ├── student/
|
||||
│ │ ├── class/
|
||||
│ │ ├── teacher/
|
||||
│ │ ├── user/
|
||||
│ │ ├── school/
|
||||
│ │ ├── setting/
|
||||
│ │ └── dashboard/
|
||||
│ └── locales/
|
||||
│ └── langs/
|
||||
│ └── zh-CN/
|
||||
│ └── page.json
|
||||
```
|
||||
|
||||
## 环境配置
|
||||
|
||||
需要在 `apps/web-antd/` 目录下创建 `.env` 和 `.env.development` 文件:
|
||||
|
||||
### .env
|
||||
```bash
|
||||
VITE_APP_TITLE=教室预订管理系统
|
||||
VITE_APP_NAMESPACE=booking-admin
|
||||
```
|
||||
|
||||
### .env.development
|
||||
```bash
|
||||
VITE_PORT=5555
|
||||
VITE_BASE=/super/
|
||||
VITE_GLOB_API_URL=https://xuanzuo.dhdjy.com
|
||||
VITE_NITRO_MOCK=false
|
||||
VITE_DEVTOOLS=true
|
||||
VITE_INJECT_APP_LOADING=true
|
||||
```
|
||||
|
||||
### .env.production
|
||||
```bash
|
||||
VITE_BASE=/super/
|
||||
VITE_GLOB_API_URL=https://xuanzuo.dhdjy.com
|
||||
VITE_COMPRESS=gzip
|
||||
VITE_PWA=false
|
||||
VITE_ROUTER_HISTORY=hash
|
||||
VITE_INJECT_APP_LOADING=true
|
||||
VITE_ARCHIVER=true
|
||||
```
|
||||
|
||||
## 启动项目
|
||||
|
||||
```bash
|
||||
# 安装依赖(如果还没有安装)
|
||||
pnpm install
|
||||
|
||||
# 启动开发服务器
|
||||
pnpm dev:antd
|
||||
|
||||
# 构建生产版本
|
||||
pnpm build:antd
|
||||
```
|
||||
|
||||
## 注意事项
|
||||
|
||||
1. **API 响应格式**: 根据 API.md,成功响应 code 为 200,已配置在 `request.ts` 中
|
||||
2. **Session 认证**: 使用 Session 认证,请求会自动携带 Cookie(通过 `withCredentials: true`)
|
||||
3. **分页格式**: API 返回的分页数据格式为 layui table 格式(code, msg, count, data)
|
||||
4. **权限控制**: 用户管理和学校管理模块仅超级管理员可见(通过路由 meta.roles 控制)
|
||||
|
||||
## 待完善功能
|
||||
|
||||
1. 教室座位布局可视化编辑
|
||||
2. 学生导入 Excel 功能
|
||||
3. 预订详情页面
|
||||
4. 更多数据统计和图表展示
|
||||
5. 文件上传功能完善
|
||||
6. 表单验证规则完善
|
||||
7. 错误处理优化
|
||||
|
||||
## API 接口说明
|
||||
|
||||
所有 API 接口定义在 `apps/web-antd/src/api/admin/` 目录下,接口路径和参数完全按照 `API.md` 文档实现。
|
||||
|
||||
## 开发建议
|
||||
|
||||
1. 根据实际 API 返回的数据结构调整页面显示
|
||||
2. 完善表单验证规则
|
||||
3. 添加更多的错误处理和用户提示
|
||||
4. 优化页面加载性能
|
||||
5. 添加数据缓存机制
|
||||
|
||||
81
doc/精简说明.md
Normal file
81
doc/精简说明.md
Normal file
@@ -0,0 +1,81 @@
|
||||
# 框架精简说明
|
||||
|
||||
## 已删除的内容
|
||||
|
||||
### 1. 不需要的应用
|
||||
- ✅ `apps/web-ele` - Element Plus 版本应用
|
||||
- ✅ `apps/web-naive` - Naive UI 版本应用
|
||||
- ✅ `apps/web-tdesign` - TDesign 版本应用
|
||||
- ✅ `apps/backend-mock` - Mock 后端服务(已有真实 API)
|
||||
- ✅ `apps/playground` - 演示/测试应用
|
||||
- ✅ `docs` - 文档站点
|
||||
|
||||
### 2. 示例代码和演示页面
|
||||
- ✅ `apps/web-antd/src/views/demos/` - 演示页面目录
|
||||
- ✅ `apps/web-antd/src/views/dashboard/analytics/` - 示例分析页面
|
||||
- ✅ `apps/web-antd/src/views/dashboard/workspace/` - 示例工作台页面
|
||||
- ✅ `apps/web-antd/src/views/_core/about/` - 关于页面
|
||||
|
||||
### 3. 路由模块
|
||||
- ✅ `apps/web-antd/src/router/routes/modules/demos.ts` - 演示路由
|
||||
- ✅ `apps/web-antd/src/router/routes/modules/vben.ts` - Vben 相关路由(文档链接等)
|
||||
|
||||
### 4. 配置文件更新
|
||||
- ✅ 更新 `package.json`,移除不需要的构建和开发脚本
|
||||
- ✅ 更新 `pnpm-workspace.yaml`,移除已删除应用的引用
|
||||
- ✅ 更新 `turbo.json`,移除 backend-mock 相关配置
|
||||
- ✅ 更新 `dashboard.ts` 路由,移除 workspace 子路由
|
||||
|
||||
## 保留的内容
|
||||
|
||||
### 核心功能
|
||||
- ✅ `apps/web-antd` - 主应用(Ant Design Vue 版本)
|
||||
- ✅ 所有业务模块页面(教室、学生、预订等)
|
||||
- ✅ 认证相关页面(登录、注册、忘记密码等,可根据需要删除)
|
||||
- ✅ 个人中心页面
|
||||
- ✅ 错误页面(404、403、500 等)
|
||||
|
||||
### 基础设施
|
||||
- ✅ `packages/` - 所有核心包
|
||||
- ✅ `internal/` - 内部工具和配置
|
||||
- ✅ `scripts/` - 构建和部署脚本
|
||||
|
||||
## 当前项目结构
|
||||
|
||||
```
|
||||
booking_admin/
|
||||
├── apps/
|
||||
│ └── web-antd/ # 唯一保留的应用
|
||||
├── packages/ # 核心包
|
||||
├── internal/ # 内部工具
|
||||
├── scripts/ # 脚本
|
||||
├── doc/ # 文档
|
||||
└── API.md # API 文档
|
||||
```
|
||||
|
||||
## 启动命令
|
||||
|
||||
```bash
|
||||
# 开发
|
||||
pnpm dev:antd
|
||||
|
||||
# 构建
|
||||
pnpm build:antd
|
||||
```
|
||||
|
||||
## 后续建议
|
||||
|
||||
如果不需要以下功能,可以进一步删除:
|
||||
|
||||
1. **认证页面**(如果只需要登录):
|
||||
- `apps/web-antd/src/views/_core/authentication/register.vue`
|
||||
- `apps/web-antd/src/views/_core/authentication/code-login.vue`
|
||||
- `apps/web-antd/src/views/_core/authentication/qrcode-login.vue`
|
||||
- `apps/web-antd/src/views/_core/authentication/forget-password.vue`
|
||||
|
||||
2. **个人中心**(如果不需要):
|
||||
- `apps/web-antd/src/views/_core/profile/`
|
||||
|
||||
3. **部署脚本**(如果不需要 Docker 部署):
|
||||
- `scripts/deploy/`
|
||||
|
||||
Reference in New Issue
Block a user