feat: 员工端流程筛选改从后端字典加载(保留静态兜底)

This commit is contained in:
weicw
2026-10-31 08:23:06 +08:00
parent 3d4f1949be
commit 9d287b4f32
2 changed files with 36 additions and 4 deletions
+13
View File
@@ -15,3 +15,16 @@ export async function getOrganizations() {
}
return Promise.reject(new Error(res.data.message));
}
/**
* 流程类型选项(flowCode → 流程名称),新增单据自动出现
*/
export async function getFlowOptions() {
const res = await request.get<ApiResult<Array<{ flowCode: string; flowName: string }>>>(
THINK_API_URL + '/approval/directory/flows'
);
if (res.data.code === 0 && res.data.data) {
return res.data.data;
}
return Promise.reject(new Error(res.data.message));
}