luobisheng
2022-11-08 2406ac9a70e51e76c6ba95efb69f641c7b22e8ea
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
import { getToken } from "@/utils/helper";
import request from "@/utils/request";
 
const TEAM_CONSTRUCTION_URL = '/sccg/team_construction';
const TOKEN = {
    'Authorization': getToken()
}
 
export function addTeam(params) {
    return request({
        method: 'post',
        url: TEAM_CONSTRUCTION_URL + '/addition',
        headers: { ...TOKEN },
        params
    });
}
 
export function deleteTeam(params) {
    return request({
        method: 'delete',
        url: TEAM_CONSTRUCTION_URL + '/deletion',
        headers: { ...TOKEN },
        params
    });
}
 
export function exportTeamInfo(params) {
    return request({
        method: 'post',
        url: TEAM_CONSTRUCTION_URL + '/export',
        headers: { ...TOKEN },
        params,
        responseType: 'blob'
    });
}
 
export function importTeamInfo(data) {
    return request({
        method: 'post',
        url: TEAM_CONSTRUCTION_URL + '/import',
        headers: { ...TOKEN, 'Content-Type': 'multipart/form-data' },
        data: data,
    });
}
 
export function updateTeamInfo(params) {
    return request({
        method: 'put',
        url: TEAM_CONSTRUCTION_URL + '/modification',
        headers: { ...TOKEN },
        params
    });
}
 
export function searchTeamInfo(params) {
    return request({
        method: 'get',
        url: TEAM_CONSTRUCTION_URL + '/query',
        headers: { ...TOKEN },
        params
    });
}