VWED_server/VWED任务模块接口文档/任务模板管理接口文档.md
2025-04-30 16:57:46 +08:00

87 lines
1.9 KiB
Markdown
Raw Permalink 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.

# 任务模板管理接口文档
## 一、任务模板管理接口
### 1. 获取任务模板列表
#### 接口描述
获取系统中所有可用的任务模板列表。
#### 请求方式
- **HTTP方法**: GET
- **接口路径**: `/api/vwed-task/template/list`
#### 请求参数
| 参数名 | 类型 | 必填 | 描述 |
|-------|------|-----|------|
| page | Integer | 否 | 页码默认为1 |
| pageSize | Integer | 否 | 每页记录数默认为10 |
| templateName | String | 否 | 模板名称,用于筛选 |
| status | Integer | 否 | 状态0-未启用1-启用完成 |
#### 响应参数
```json
{
"code": 200,
"message": "操作成功",
"data": {
"total": 4,
"list": [
{
"id": "template-001",
"templateName": "Pulsating production line",
"templateDescription": "脉动产线模板",
"status": 0
},
{
"id": "template-002",
"templateName": "Assemble order",
"templateDescription": "拼合单模板",
"status": 0
},
{
"id": "template-003",
"templateName": "Dense peak bit",
"templateDescription": "密集库位模板",
"status": 0
},
{
"id": "template-004",
"templateName": "userTemplate",
"templateDescription": "用户自有模板",
"status": 1
}
]
}
}
```
### 4. 启用任务模板
#### 接口描述
启用指定的任务模板。当一个模板被启用时,之前已启用的模板会自动被禁用,确保系统中始终只有一个处于激活状态的模板。
#### 请求方式
- **HTTP方法**: POST
- **接口路径**: `/api/vwed-task/template/enable/{id}`
#### 请求参数
| 参数名 | 类型 | 必填 | 描述 |
|-------|------|-----|------|
| id | String | 是 | 模板ID路径参数 |
#### 响应参数
```json
{
"code": 200,
"message": "模板启用成功",
"data": null
}
```