49 lines
1004 B
TypeScript
49 lines
1004 B
TypeScript
import request from '@/utils/request';
|
|
|
|
// 定义接口返回数据类型
|
|
export type DictResponse = {
|
|
code: number;
|
|
data: DictItem[];
|
|
message: string;
|
|
success: boolean;
|
|
[property: string]: any;
|
|
}
|
|
|
|
export type DictItem = {
|
|
basePageRequest: null;
|
|
code: string;
|
|
createBy: null;
|
|
createDate: null;
|
|
defaultFlag: null;
|
|
deleteFlag: null;
|
|
description: string;
|
|
dicName: string;
|
|
dictTypeCode: null | string;
|
|
dictTypeName: null | string;
|
|
id: string;
|
|
lastUpdateTime: null;
|
|
orderFlag: string;
|
|
parentCode: string;
|
|
parentType: string;
|
|
tenantId: null;
|
|
tenantName: null;
|
|
updateBy: null;
|
|
updateDate: null;
|
|
useFlag: string;
|
|
[property: string]: any;
|
|
}
|
|
|
|
/**
|
|
* 获取字典列表
|
|
* @param code 字典编码
|
|
* currency 币种
|
|
* entType 企业类型
|
|
* taxpayer_type 纳税人类型
|
|
* @returns 字典列表
|
|
*/
|
|
export async function getDictList(code: string): Promise<DictResponse> {
|
|
return request(`/cosco/dictProject/getAllList/${code}`, {
|
|
method: 'GET',
|
|
});
|
|
}
|