api.ts
2.41 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/*
* @Date: 2021-12-29 15:35:12
* @LastEditors: wangqiang@feewee.cn
* @LastEditTime: 2022-01-05 17:53:12
*/
import request from "@/utils/request";
import { common } from "@/typing/common";
import { BACKLOG } from "@/utils/host";
import { http } from "@/typing/http";
interface ListParams extends common.PaginationParam {
keywords?: string;
}
export interface ListVO {
id?: number;
/** 代办编码 */
itemCode?: string;
/** 待办名称 */
itemName?: string;
/** 待办列表页路径 */
listPage?: string;
/** 待办详情路径 */
detailPage?: string;
/** 跳转页面参数 */
pageParam?: string;
/** 通知类型 1app消息 2短信 9不通知 */
notifyType?: number;
/** 使用角色 */
applyRoleCode?: string;
/** 状态 1启用 0禁用 */
status?: number;
/** 创建日期 */
createTime?: number;
/** 代办类型 1业务性代办 2提示性待办 */
itemType?: number;
/** 备注提示 */
remark?: string;
applySysId?: number;
/** 是否对接新待办 */
dock?: boolean;
/** 动态模版 */
dynamicTemp?: string;
/** 待办时效考核 */
assess?: boolean;
/** 待办功能页面路径 */
funcPage?: string;
/**是否显示切换入口 */
exShow?: boolean;
customTemp?: boolean; // 是否使用自定义模板
customTempPath?: string; // 自定义模板路径
closeStand?: boolean; // 是否关单站岗
/** 工作类型 */
workType?:number;
}
export function getConfigListApi(params: ListParams): http.PromisePageResp<ListVO> {
return request.get(`${BACKLOG}/config/list`, { params });
}
// 待办 启用
export function taskEnableApi(id: number) {
return request.post(`${BACKLOG}/config/enable`, { id }, { contentType: "form-urlencoded" });
}
// 待办 禁用
export function taskDisableApi(id: number) {
return request.post(`${BACKLOG}/config/disable`, { id }, { contentType: "form-urlencoded" });
}
// 待办 删除
export function taskDeleteApi(id: number) {
return request.post(`${BACKLOG}/config/remove`, { id }, { contentType: "form-urlencoded" });
}
export interface SaveParams {
id: number;
/** 待办名称 */
itemName: string;
/** 通知类型 */
notifyType: number;
/** 通知对象 */
applyRoleCode: string;
/** app页面路径 */
listPage: string;
/** 跳转页面参数 */
pageParam: string;
}
// 保存待办
export function saveTaskApi(params: SaveParams) {
return request.post(`${BACKLOG}/config/save`, { ...params });
}