province.js
1.12 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
import request from '@/utils/request'
// 获取行政区划列表
export function getProvinceList(nodeId, data) {
return request({
url: `/system/Area/${nodeId}`,
method: 'GET',
data
})
}
// 获取行政区划下拉框数据
export function getProvinceSelector(id, currId) {
return request({
url: `/system/Area/${id}/Selector/${!!currId ? currId : 0}`,
method: 'GET'
})
}
// 添加行政区划
export function createProvince(data) {
return request({
url: '/system/Area',
method: 'POST',
data
})
}
// 修改行政区划
export function updateProvince(data) {
return request({
url: `/system/Area/${data.id}`,
method: 'PUT',
data
})
}
// 获取行政区划信息
export function getProvinceInfo(id) {
return request({
url: `/system/Area/${id}/Info`,
method: 'GET'
})
}
// 删除行政区划信息
export function delProvince(id) {
return request({
url: `/system/Area/${id}`,
method: 'DELETE'
})
}
// 更新行政区划状态
export function updateProvinceState(id) {
return request({
url: `/system/Area/${id}/Actions/State`,
method: 'PUT'
})
}