feat: 添加员工门户项目及相关后端改造
- 新增 hzhub-portal-employee 员工门户前端项目(基于 Vue3 + Element Plus) - 后端登录接口增加返回 nickName 字段 - 移除 KnowledgeInfoController 的 @SaCheckPermission 注解 - 删除 hzhub-portal-company 旧门户项目 - 更新项目文档和架构说明 - 添加后台运行管理脚本(start-all.sh / status-all.sh / stop-all.sh) - 更新 docker-compose 配置 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
38
CLAUDE.md
38
CLAUDE.md
@@ -32,10 +32,18 @@ docker-compose down
|
||||
### Backend Development (Spring Boot)
|
||||
|
||||
```bash
|
||||
# Run AI service locally
|
||||
cd hzhub-ai/hzhub-admin
|
||||
# Run AI service locally (foreground)
|
||||
cd hzhub-ai
|
||||
mvn spring-boot:run -Dspring-boot.run.profiles=dev
|
||||
|
||||
# Run AI service locally (background)
|
||||
cd hzhub-ai
|
||||
./start.sh # Start service in background
|
||||
./status.sh # Check service status
|
||||
./logs.sh # View logs
|
||||
./stop.sh # Stop service
|
||||
./restart.sh # Restart service
|
||||
|
||||
# Build all modules
|
||||
cd hzhub-ai
|
||||
mvn clean package
|
||||
@@ -48,20 +56,28 @@ mvn clean package
|
||||
mvn test
|
||||
```
|
||||
|
||||
**💡 Tip:** For background service management, see [SERVICE_MANAGEMENT.md](../SERVICE_MANAGEMENT.md)
|
||||
|
||||
### Frontend Development (Vue 3 + Vben Admin)
|
||||
|
||||
```bash
|
||||
# Admin portal development
|
||||
cd hzhub-admin
|
||||
pnpm install # Install dependencies
|
||||
pnpm dev # Start dev server
|
||||
pnpm dev # Start dev server (foreground)
|
||||
./start.sh # Start dev server (background)
|
||||
./status.sh # Check service status
|
||||
./logs.sh # View logs
|
||||
pnpm build # Build all packages
|
||||
pnpm --filter=@vben/web-antd build:prod # Build admin frontend
|
||||
|
||||
# Company portal development
|
||||
cd hzhub-portal-company
|
||||
# Employee portal development
|
||||
cd hzhub-portal-employee
|
||||
pnpm install
|
||||
pnpm dev
|
||||
pnpm dev # Start dev server (foreground)
|
||||
./start.sh # Start dev server (background)
|
||||
./status.sh # Check service status
|
||||
./logs.sh # View logs
|
||||
|
||||
# Dealer portal development
|
||||
cd hzhub-portal-dealer
|
||||
@@ -69,6 +85,8 @@ pnpm install
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
**💡 Tip:** For background service management (start/stop/restart/status/logs), see [SERVICE_MANAGEMENT.md](../SERVICE_MANAGEMENT.md)
|
||||
|
||||
## Architecture
|
||||
|
||||
### Multi-Service Structure
|
||||
@@ -76,7 +94,7 @@ pnpm dev
|
||||
```
|
||||
┌─────────────────────────────────────────┐
|
||||
│ Frontend Layer │
|
||||
│ hzhub-admin | hzhub-portal-company │
|
||||
│ hzhub-admin | hzhub-portal-employee │
|
||||
│ | hzhub-portal-dealer │
|
||||
└────────────┬────────────────────────────┘
|
||||
│
|
||||
@@ -125,7 +143,7 @@ hzhub-admin/
|
||||
└── package.json # Root monorepo config
|
||||
```
|
||||
|
||||
**Portal applications** (hzhub-portal-company, hzhub-portal-dealer) are Vue 3 apps with:
|
||||
**Portal applications** (hzhub-portal-employee, hzhub-portal-dealer) are Vue 3 apps with:
|
||||
- Composition API (`<script setup>`)
|
||||
- Pinia state management with persistence
|
||||
- Element Plus UI components
|
||||
@@ -282,7 +300,7 @@ Frontend Dockerfiles in each portal directory:
|
||||
| Service | Port | Access |
|
||||
|---------|------|--------|
|
||||
| hzhub-admin (frontend) | 5666 | http://localhost:5666 |
|
||||
| hzhub-portal-company | 5137 | http://localhost:5137 |
|
||||
| hzhub-portal-employee | 5137 | http://localhost:5137 |
|
||||
| hzhub-portal-dealer | 5138 | http://localhost:5138 |
|
||||
| hzhub-ai (backend API) | 6039 | http://localhost:6039 |
|
||||
| MySQL | 3306 | localhost:3306 |
|
||||
@@ -314,7 +332,7 @@ For admin portal:
|
||||
3. Add route in `apps/web-antd/src/router/`
|
||||
4. Add menu configuration
|
||||
|
||||
For portals (company/dealer):
|
||||
For portals (employee/dealer):
|
||||
1. Add API module in `src/api/` with `index.ts` and `types.ts`
|
||||
2. Create page in `src/pages/`
|
||||
3. Define route in `src/routers/modules/`
|
||||
|
||||
Reference in New Issue
Block a user