gaoluyang
2026-06-24 c0cb161bb52ce0fbdce5c66ec391d107c75e2452
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import type { PageParam, PageResult } from '..\..\..\packages\effects\request\src';
 
import { requestClient } from '#/api/request';
 
export namespace BpmFormApi {
  /** 流程表单 */
  export interface Form {
    id?: number;
    name: string;
    conf: string;
    fields: string[];
    status: number;
    remark: string;
    createTime: number;
  }
}
 
/** 获取表单分页列表 */
export async function getFormPage(params: PageParam) {
  return requestClient.get<PageResult<BpmFormApi.Form>>('/bpm/form/page', {
    params,
  });
}
 
/** 获取表单详情 */
export async function getForm(id: number) {
  return requestClient.get<BpmFormApi.Form>(`/bpm/form/get?id=${id}`);
}
 
/** 创建表单 */
export async function createForm(data: BpmFormApi.Form) {
  return requestClient.post('/bpm/form/create', data);
}
 
/** 更新表单 */
export async function updateForm(data: BpmFormApi.Form) {
  return requestClient.put('/bpm/form/update', data);
}
 
/** 删除表单 */
export async function deleteForm(id: number) {
  return requestClient.delete(`/bpm/form/delete?id=${id}`);
}
 
/** 获取表单简单列表 */
export async function getFormSimpleList() {
  return requestClient.get<BpmFormApi.Form[]>('/bpm/form/simple-list');
}