feat: 员工端流程筛选改从后端字典加载(保留静态兜底)
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user