component.js
2.06 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
/*
* @Date: 2022-06-17 14:54:29
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2026-05-25 13:48:13
* @FilePath: /data-table/src/api/component.js
* @Description: 组件接口
*/
import { fn, fetch } from '@/api/fn';
const Api = {
QUERY_COMPONENT: '/srv/?a=query_component',
FLOW_DEPT_LIST: '/srv/?a=flow_setting&t=flow_dept_list',
FLOW_ROLE_LIST: '/srv/?a=flow_setting&t=flow_role_list',
SEARCH_USER_DEPT_ROLE: '/srv/?a=flow_setting&t=search_user_dept_role',
SEARCH_PERSON_PICKER: '/srv/?a=person_picker_search',
}
/**
* @description: 查询组件
* @param: group_code 分组标识
* @param: component_code 组件标识
* @param: name 组件名称;条件:模糊查询;
*/
export const getComponentAPI = (params) => fn(fetch.get(Api.QUERY_COMPONENT, params));
/**
* @description: 查询部门列表
* @param: form_code 表单code
* @param: field_name 字段名
* { ...params, headers: { "only-data": true, "keep-data": true } }
*/
export const getFlowDeptListAPI = (params) => fn(fetch.get(Api.FLOW_DEPT_LIST, params));
/**
* @description: 查询角色列表
* @param: form_code 表单code
* @param: field_name 字段名
* { ...params, headers: { "only-data": true, "keep-data": true } }
*/
export const getFlowRoleListAPI = (params) => fn(fetch.get(Api.FLOW_ROLE_LIST, params));
/**
* @description: 查询用户部门角色
* @param: form_code 表单code
* @param: field_name 字段名
* @param: word 搜索内容
*/
export const searchUserDeptRoleAPI = (params) => fn(fetch.get(Api.SEARCH_USER_DEPT_ROLE, params));
/**
* @description: 搜索人员
* @param: form_code 表单code
* @param: field_name 字段名
* @param: keyword 搜索关键字
* @param: type 人员类型编码,直接使用配置接口返回的 person_type,例如 contact / volunteer
* @param: page 页码,从0开始
* @param: limit 每页数量
* @note: 配置接口里的 person_type_title 仅用于前端中文展示,这个搜索接口不接收该字段
*/
export const searchPersonPickerAPI = (params) => fn(fetch.get(Api.SEARCH_PERSON_PICKER, params));