微调
This commit is contained in:
23
frontend/src/api/system/dictionary/dictTree/index.ts
Normal file
23
frontend/src/api/system/dictionary/dictTree/index.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import http from '@/api'
|
||||
import { type Dict } from '@/api/system/dictionary/interface'
|
||||
|
||||
//获取字典类型
|
||||
export const getDictTreeList = (params: Dict.ReqDictTreeParams) => {
|
||||
return http.get(`/dictTree/queryTree`, params)
|
||||
}
|
||||
|
||||
//添加字典类型
|
||||
export const addDictTree = (params: Dict.ResDictTree) => {
|
||||
return http.post(`/dictTree/add`, params)
|
||||
}
|
||||
|
||||
//编辑字典类型
|
||||
export const updateDictTree = (params: Dict.ResDictTree) => {
|
||||
return http.post(`/dictTree/update`, params)
|
||||
}
|
||||
|
||||
//删除字典类型
|
||||
export const deleteDictTree = (params: string[]) => {
|
||||
return http.post(`/dictTree/delete`, params)
|
||||
}
|
||||
|
||||
@@ -139,4 +139,48 @@ export namespace Dict {
|
||||
export interface ResDictPqPage extends ResPage<ResDictPq> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 树形字典数据表格分页查询参数
|
||||
*/
|
||||
export interface ReqDictTreeParams extends ReqPage{
|
||||
id: string;//指标字典表Id
|
||||
pid: string;//
|
||||
pids: string;//
|
||||
name:string;//
|
||||
code:string;//
|
||||
sort:number;//
|
||||
}
|
||||
|
||||
/**
|
||||
* 树形字典数据新增、修改、根据id查询返回的对象
|
||||
*/
|
||||
export interface ResDictTree {
|
||||
id: string;//指标字典表Id
|
||||
pid: string;//
|
||||
pids: string;//
|
||||
name:string;//
|
||||
code:string;//
|
||||
sort:number;//
|
||||
remark?:string;//
|
||||
status?:number;//'状态(字典 0正常 1停用 2删除)
|
||||
createBy?:string | null;//
|
||||
createTime?:string | null;//
|
||||
updateBy?:string | null;//
|
||||
updateTime?:string | null;//
|
||||
level?:number | null;//
|
||||
extend?:string | null;//对应type,不同类型可自定义配置
|
||||
type?:number | null;//用于区分多种类型的字典树 0.台账对象类型 1.自定义报表指标类型
|
||||
children?: ResDictTree[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 电能质量指标字典数据表格查询分页返回的对象;
|
||||
*/
|
||||
export interface ResDictTreePage extends ResPage<ResDictTree> {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user