2024-01-09 13:49:21 +08:00
|
|
|
import createAxios from '@/utils/request'
|
2024-01-15 16:15:24 +08:00
|
|
|
|
2024-01-09 13:49:21 +08:00
|
|
|
// 字典树接口
|
|
|
|
|
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
|
|
|
|
|
})
|
|
|
|
|
}
|
2024-06-19 08:49:10 +08:00
|
|
|
// 字典树接口2
|
|
|
|
|
export function queryByAllCode() {
|
|
|
|
|
let form = new FormData()
|
|
|
|
|
// form.append('code', code)
|
|
|
|
|
return createAxios({
|
|
|
|
|
url: '/system-boot/dictTree/queryTree',
|
|
|
|
|
method: 'GET',
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
|
|
|
}
|
|
|
|
|
// data: form
|
|
|
|
|
})
|
|
|
|
|
}
|
2024-01-09 13:49:21 +08:00
|
|
|
|
|
|
|
|
// 字典树接口通过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
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2024-06-19 08:49:10 +08:00
|
|
|
/**
|
|
|
|
|
* 根据id查询字典值
|
|
|
|
|
*/
|
|
|
|
|
export const getDictTreeById = (id: any) => {
|
|
|
|
|
let form = new FormData()
|
|
|
|
|
form.append('id', id)
|
|
|
|
|
return createAxios({
|
|
|
|
|
url: '/system-boot/dictTree/queryById',
|
|
|
|
|
method: 'POST',
|
|
|
|
|
data:form
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-09 13:49:21 +08:00
|
|
|
// 字典树接口通过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
|
|
|
|
|
})
|
|
|
|
|
}
|
2024-01-15 16:15:24 +08:00
|
|
|
|
|
|
|
|
//新增字典树数据
|
|
|
|
|
export const addDictTree = (data: any) => {
|
|
|
|
|
return createAxios({
|
|
|
|
|
url: '/system-boot/dictTree/add',
|
|
|
|
|
method: 'post',
|
|
|
|
|
data: data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 编辑统计指标配置项
|
2024-06-19 08:49:10 +08:00
|
|
|
export const updateStatistical = (data: any) => {
|
2024-01-15 16:15:24 +08:00
|
|
|
return createAxios({
|
|
|
|
|
url: '/system-boot/dic/update',
|
|
|
|
|
method: 'PUT',
|
|
|
|
|
data: data
|
|
|
|
|
})
|
|
|
|
|
}
|
2024-06-19 08:49:10 +08:00
|
|
|
// 单位绑定
|
|
|
|
|
export function codeDicTree(data: any) {
|
|
|
|
|
return createAxios({
|
|
|
|
|
url: '/system-boot/dic/codeDicTree',
|
|
|
|
|
method: 'get',
|
|
|
|
|
params: data
|
|
|
|
|
})
|
|
|
|
|
}
|