diff --git a/frontend/src/api/system/dictionary/dictTree/index.ts b/frontend/src/api/system/dictionary/dictTree/index.ts new file mode 100644 index 0000000..47b58e8 --- /dev/null +++ b/frontend/src/api/system/dictionary/dictTree/index.ts @@ -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) +} + diff --git a/frontend/src/api/system/dictionary/interface/index.ts b/frontend/src/api/system/dictionary/interface/index.ts index f123d77..5202ddb 100644 --- a/frontend/src/api/system/dictionary/interface/index.ts +++ b/frontend/src/api/system/dictionary/interface/index.ts @@ -139,4 +139,48 @@ export namespace Dict { export interface ResDictPqPage extends ResPage { } + + + + /** + * 树形字典数据表格分页查询参数 + */ + 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 { + + } + } diff --git a/frontend/src/components/TimeControl/index.scss b/frontend/src/components/TimeControl/index.scss index 5d1f6b6..dc3e3fa 100644 --- a/frontend/src/components/TimeControl/index.scss +++ b/frontend/src/components/TimeControl/index.scss @@ -13,7 +13,7 @@ display: flex; align-items: center; margin-right: 10px; /* 日期选择器右侧间距 */ - width: 320px; + width: 250px; } .date-picker { diff --git a/frontend/src/views/authority/resource/index.vue b/frontend/src/views/authority/resource/index.vue index af060a7..6626e50 100644 --- a/frontend/src/views/authority/resource/index.vue +++ b/frontend/src/views/authority/resource/index.vue @@ -24,28 +24,20 @@ - - + \ No newline at end of file diff --git a/frontend/src/views/system/dictionary/dictTree/index.vue b/frontend/src/views/system/dictionary/dictTree/index.vue new file mode 100644 index 0000000..99c4c0e --- /dev/null +++ b/frontend/src/views/system/dictionary/dictTree/index.vue @@ -0,0 +1,85 @@ + + + + \ No newline at end of file