浏览代码

add: template dict detail api

dev
powersir 1年前
父节点
当前提交
1230889c33
共有 2 个文件被更改,包括 52 次插入7 次删除
  1. +16
    -7
      src/models/template.data.ts
  2. +36
    -0
      src/request/service/template-dict-detail.ts

+ 16
- 7
src/models/template.data.ts 查看文件

@@ -13,15 +13,9 @@ export interface DataDictDetailVO {
id: number;
label: string;
value: string;
createTime: number;
}

export interface DataDictPageReqVO extends PageParam {
createTime?: string[];
description?: string;
name?: string;
}



/**
* TemplateInfoVO,模板数据
@@ -345,3 +339,18 @@ export interface TemplateInfoPageReqVO extends PageParam {
*/
templateName?: string;
}


export interface DataDictPageReqVO extends PageParam {
createTime?: string[];
description?: string;
name?: string;
}

export interface DataDictDetaiPageReqVO extends PageParam {
createTime?: string[];
dictId?: number;
dictSort?: number;
label?: string;
value?: string;
}

+ 36
- 0
src/request/service/template-dict-detail.ts 查看文件

@@ -0,0 +1,36 @@
import request from '@/request';
import { DataDictDetaiPageReqVO, DataDictDetailVO, PageData } from '@/models';

const BASE_URL = '/admin-api/template/dict-detail';

export default {
//获取字典详情分页数据
getPageApi(params: DataDictDetaiPageReqVO) {
return request.get<PageData<DataDictDetailVO>>(`${BASE_URL}/page`, { params });
},

//创建模板-数据字典详情
createApi(data: DataDictDetailVO) {
return request.post<DataDictDetailVO>(`${BASE_URL}/create`, data);
},

//更新模板-数据字典详情
updateApi(data: DataDictDetailVO) {
return request.put<DataDictDetailVO>(`${BASE_URL}/update`, data);
},

//删除模板-数据字典详情
deleteApi(id: number) {
return request.delete<boolean>(`${BASE_URL}/delete?id=${id}`);
},

//获取模板-数据字典详情
getApi(id: number) {
return request.get<DataDictDetailVO>(`${BASE_URL}/get?id=${id}`);
},
//获得模板-数据字典详情列表
getListApi(ids: string[]) {
return request.get<PageData<DataDictDetailVO>>(`${BASE_URL}/list`, { params: { ids }});
},
}

正在加载...
取消
保存