dictionary.js
2.77 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
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
import request from '@/utils/request'
// 获取数据字典分类
export function getDictionaryType() {
return request({
url: '/system/DictionaryType',
method: 'GET'
})
}
// 获取字典分类下拉框列表
export function getDictionaryTypeSelector(id) {
return request({
url: '/system/DictionaryType/Selector/' + (!!id ? id : 0),
method: 'GET'
})
}
// 添加数据字典分类
export function createDictionaryType(data) {
return request({
url: `/system/DictionaryType`,
method: 'POST',
data
})
}
// 修改数据字典分类
export function updateDictionaryType(data) {
return request({
url: `/system/DictionaryType/${data.id}`,
method: 'PUT',
data
})
}
// 获取数据字典分类信息
export function getDictionaryTypeInfo(id) {
return request({
url: `/system/DictionaryType/${id}`,
method: 'GET'
})
}
// 删除数据字典分类
export function delDictionaryType(id) {
return request({
url: `/system/DictionaryType/${id}`,
method: 'DELETE'
})
}
// 获取数据字典列表
export function getDictionaryDataList(typeId, data) {
return request({
url: `/system/DictionaryData/${typeId}`,
method: 'GET',
data
})
}
// 获取数据字典列表(分类+内容)
export function getDictionaryAll() {
return request({
url: `/system/DictionaryData/All`,
method: 'GET'
})
}
// 获取字典分类下拉框(项目上级)
export function getDictionaryDataTypeSelector(dictionaryTypeId, isTree, id) {
return request({
url: `/system/DictionaryData/${dictionaryTypeId}/Selector/` + (!!id ? id : 0),
method: 'GET',
data: { isTree }
})
}
// 获取字典数据下拉框列表
export function getDictionaryDataSelector(dictionaryTypeId) {
return request({
url: `/system/DictionaryData/${dictionaryTypeId}/Data/Selector`,
method: 'GET'
})
}
// 添加数据字典
export function createDictionaryData(data) {
return request({
url: '/system/DictionaryData',
method: 'POST',
data
})
}
// 修改数据字典
export function updateDictionaryData(data) {
return request({
url: `/system/DictionaryData/${data.id}`,
method: 'PUT',
data
})
}
// 获取数据字典信息
export function getDictionaryDataInfo(id) {
return request({
url: `/system/DictionaryData/${id}/Info`,
method: 'GET'
})
}
// 删除数据字典信息
export function delDictionaryData(id) {
return request({
url: `/system/DictionaryData/${id}`,
method: 'DELETE'
})
}
// 更新字典状态
export function updateDictionaryState(id) {
return request({
url: `/system/DictionaryData/${id}/Actions/State`,
method: 'PUT'
})
}
// 导出数据字典数据
export function exportData(id) {
return request({
url: `/system/DictionaryData/${id}/Action/Export`,
method: 'GET'
})
}