api.ts
1.18 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
/*
* @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 Pramas {
name?: string;
}
/**
* 列表项
*/
export interface WorkTypeListVO {
id?: number; //ID
name?: string; // 名称
createTime?: string; //创建时间
}
/**
* 工作类型列表
* @param name 类型名称
* @returns
*/
export function getWorkTypeListApi(params: Pramas): http.PromisePageResp<WorkTypeListVO> {
return request.get(`${BACKLOG}/work/type/list`, { params });
}
export interface SaveParams {
/** 名称 */
name: string,
}
/**
* 新增|编辑工作类
* work/type/save
* @param id
* @returns
*/
export function saveWorkType(params: SaveParams) {
return request.post(`${BACKLOG}/work/type/save`, { ...params });
}
/**
* 删除工作类型
*/
export function deleteWorkTypeApi(id: number): http.PromisePageResp<null> {
return request.get(`${BACKLOG}/work/type/delete`, { params: { id } });
}