jiangping
2023-08-17 8d7cb8876ac222eca1c82d5bab250f5551531edb
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// 导入axios实例
import httpRequest from '@/utils/request'
import { ddLogin } from '@/interface'
 
// 测试虚拟登录
export function testLogin(data: any): Promise<any> {
    return httpRequest({
        url: '/system/login',
        method: 'post',
        data
    })
}
 
// 获取企业id
export function getDingdingCorpId(companyId: any): Promise<any> {
    return httpRequest({
        url: `/dingding/getDingdingCorpId?companyId=${companyId}`,
        method: 'get'
    })
}
 
// edgp创建企业和同步登录免密登录
export function edgpLogin({token}: any): Promise<any> {
    return httpRequest({
        url: `/edgp/login?token=${token}`,
        method: 'post'
    })
}
 
// edgp创建企业和同步登录免密登录
export function edgpLoginDemo({token}: any): Promise<any> {
    return httpRequest({
        url: `/edgp/loginDemo?token=${token}`,
        method: 'post'
    })
}
 
// 羚羊免密登录(体验)
export function lingyangLogin({token}: any): Promise<any> {
    return httpRequest({
        url: `/lingyang/login?token=${token}`,
        method: 'post'
    })
}
 
// 羚羊免密登录(体验)
export function lingyangLoginDemo({token}: any): Promise<any> {
    return httpRequest({
        url: `/lingyang/loginDemo?token=${token}`,
        method: 'post'
    })
}
 
// 菜单数据
export function getTreeList(params: {type: number, moduleId?: string}): Promise<any> {
    return httpRequest({
        url: 'system/menu/treeNodes',
        method: 'get',
        params
    })
}
 
// 钉钉免登录
export function ddLogin(data: ddLogin): Promise<any> {
    return httpRequest({
        url: `/dingding/ddLogin?code=${data.code}&companyId=${data.companyId}`,
        method: 'post'
    })
}
 
// 获取当前登录用户信息
export function getUserInfo(): Promise<any> {
    return httpRequest({
        url: '/system/getUserInfo',
        method: 'get'
    })
}
 
// 查询当前用户所有主组织下的工序
export function getWorkingProcedure(data: any): Promise<any> {
    return httpRequest({
        url: '/ext/proceduresExt/productesGroup',
        method: 'post',
        data
    })
}
 
// 组织类型 0公司 1工厂 2部门 3班组 4平台组织,示例值(1)
export function getOrganization(data: any): Promise<any> {
    return httpRequest({
        url: '/ext/departmentExt/getDepartmentListByConditon',
        method: 'post',
        data
    })
}
 
// 获取上传字典值
export function queryListByCode(params: any): Promise<any> {
    return httpRequest({
        url: '/system/dictData/queryListByCode',
        method: 'get',
        params
    })
}
 
// 上传文件
export function uploadFiles(data: any): Promise<any> {
    return httpRequest({
        url: '/ext/routeCardExt/upload',
        method: 'post',
        data
    })
}
 
// 查询当前主组织下所有数据
export function queryAllData(data: any): Promise<any> {
    return httpRequest({
        url: 'ext/warehouseExt/queryAllData',
        method: 'post',
        data
    })
}
 
// 物料分页查询
export function materialPage(data: any): Promise<any> {
    return httpRequest({
        url: 'ext/materialExt/page',
        method: 'post',
        data
    })
}
 
// 物料分页查询
export function materialExt(id: any): Promise<any> {
    return httpRequest({
        url: `ext/materialExt/${id}`,
        method: 'get'
    })
}