feat: 审批流程模块 (T审批A审批)

- 新增 backend/app/api/approval.py 审批API
- 前端H5支持发起审批、审批操作
- 添加审批卡片弹窗组件
- 路由注册审批模块
This commit is contained in:
Simon
2026-06-15 09:32:41 +08:00
parent 64d6812ec3
commit 93ba41ed79
29 changed files with 6584 additions and 0 deletions
+32
View File
@@ -331,6 +331,38 @@ export async function getApprovalLinks(): Promise<ApprovalLink[]> {
return (data?.items || data || []) as ApprovalLink[]
}
// =============================================================================
// 审批流程关键词 API(新增 - 用于关键词触发卡片弹窗)
// =============================================================================
/** 审批关键词响应 */
export interface ApprovalKeyword {
keyword: string
template_id: string
template_name: string
type: 'jump' | 'api'
}
/**
* 获取审批关键词列表
* 用于前端关键词检测,触发卡片弹窗
* @returns 审批关键词数组
*/
export async function getApprovalKeywords(): Promise<ApprovalKeyword[]> {
const response: any = await apiClient.get('/approval/keywords')
return response.data || []
}
/**
* 生成跳转审批链接
* @param templateId 模板ID
* @returns 跳转链接
*/
export async function createApprovalJump(templateId: string): Promise<{ url: string; template_name: string }> {
const response: any = await apiClient.post('/approval/jump', { template_id: templateId })
return response.data
}
/**
* 获取软件下载列表
* 返回所有可下载的软件列表,按分类分组