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
| import request, {download, requestType} from "@/utils/request";
| import {BaseEntityInterface} from "@/utils/globalInterface";
|
| export interface TmsRegionI extends BaseEntityInterface {
| id?: number,
| level?: number,
| regionCode?: string,
| regionName?: string,
| postalCode?: string,
| nameTree?: string,
| parentRegionCode?: string,
| sortOrder?: number,
| status?: number,
| createBy?: string,
| createTime?: string,
| updateBy?: string,
| updateTime?: string,
| remark?: string
| }
|
|
| /**
| * 查询行政区域列表
| */
| export const listTmsRegion: requestType = (query) => {
| return request({
| url: '/tms/tmsRegion/list',
| method: 'get',
| params: query
| })
| }
| /**
| * 查询行政区域详细
| */
| export const getTmsRegion: requestType = (id) => {
| return request({
| url: '/tms/tmsRegion/' + id,
| method: 'get'
| })
| }
| export const getRegionChildren: requestType = (parentRegionCode) => {
| return request({
| url: '/tms/tmsRegion/getRegionChildren/' + parentRegionCode,
| method: 'get',
| })
| }
| export const getProvince: requestType = () => {
| return request({
| url: '/tms/tmsRegion/getProvince' ,
| method: 'get',
| })
| }
| export const getCity: requestType = (code) => {
| return request({
| url: '/tms/tmsRegion/getCity/' + code,
| method: 'get',
| })
| }
| export const getArea: requestType = (code) => {
| return request({
| url: '/tms/tmsRegion/getArea/' + code,
| method: 'get',
| })
| }
| export const getStreet: requestType = (code) => {
| return request({
| url: '/tms/tmsRegion/getStreet/' + code,
| method: 'get',
| })
| }
|
|
|
|
|
| /**
| * 新增行政区域
| */
| export const addTmsRegion: requestType = (data) => {
| return request({
| url: '/tms/tmsRegion',
| method: 'post',
| data
| })
| }
|
| /**
| * 修改行政区域
| */
| export const updateTmsRegion: requestType = (data) => {
| return request({
| url: '/tms/tmsRegion',
| method: 'put',
| data
| })
| }
|
| /**
| * 删除行政区域
| */
| export const delTmsRegion: requestType = (id) => {
| return request({
| url: '/tms/tmsRegion/' + id,
| method: 'delete'
| })
| }
|
|
| /**
| * 导出行政区域
| */
| export const exportTmsRegion: requestType = (query) => {
| return new Promise<any>(() => {
| download('/tms/tmsRegion/export', query);
| })
| }
|
|