64 lines
1.4 KiB
TypeScript
64 lines
1.4 KiB
TypeScript
|
|
import createAxios from '@/utils/request'
|
||
|
|
|
||
|
|
// 字典树接口
|
||
|
|
export function queryByCode(code: string) {
|
||
|
|
let form = new FormData()
|
||
|
|
form.append('code', code)
|
||
|
|
return createAxios({
|
||
|
|
url: '/system-boot/dictTree/queryByCode',
|
||
|
|
method: 'POST',
|
||
|
|
headers: {
|
||
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||
|
|
},
|
||
|
|
data: form
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
// 字典树接口通过code
|
||
|
|
export function queryCsDictTree(pid: string) {
|
||
|
|
let form = new FormData()
|
||
|
|
form.append('pid', pid)
|
||
|
|
return createAxios({
|
||
|
|
url: '/system-boot/dictTree/query',
|
||
|
|
method: 'POST',
|
||
|
|
headers: {
|
||
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||
|
|
},
|
||
|
|
data: form
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
// 字典树接口通过id
|
||
|
|
export function queryByid(id: string) {
|
||
|
|
let form = new FormData()
|
||
|
|
form.append('id', id)
|
||
|
|
return createAxios({
|
||
|
|
url: '/system-boot/dictTree/queryByid',
|
||
|
|
method: 'POST',
|
||
|
|
headers: {
|
||
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||
|
|
},
|
||
|
|
data: form
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
//新增字典树数据
|
||
|
|
export const addDictTree = (data: any) => {
|
||
|
|
return createAxios({
|
||
|
|
url: '/system-boot/dictTree/add',
|
||
|
|
method: 'post',
|
||
|
|
data: data
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
// 编辑统计指标配置项
|
||
|
|
export const updateStatistical = (data) => {
|
||
|
|
return createAxios({
|
||
|
|
url: '/system-boot/dic/update',
|
||
|
|
method: 'PUT',
|
||
|
|
data: data
|
||
|
|
})
|
||
|
|
}
|