This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
import type { AssetTypeVO, AssetTypeForm, AssetTypeQuery } from './model';
|
||||
|
||||
import type { ID, IDS } from '#/api/common';
|
||||
import type { PageResult } from '#/api/common';
|
||||
|
||||
import { commonExport } from '#/api/helper';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
/**
|
||||
* 查询资产类型列表
|
||||
* @param params
|
||||
* @returns 资产类型列表
|
||||
*/
|
||||
export function assetTypeList(params?: AssetTypeQuery) {
|
||||
return requestClient.get<PageResult<AssetTypeVO>>('/property/assetType/list', { params });
|
||||
}
|
||||
|
||||
export function assetTypeselect() {
|
||||
return requestClient.get<AssetTypeVO[]>('/property/assetType/list');
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出资产类型列表
|
||||
* @param params
|
||||
* @returns 资产类型列表
|
||||
*/
|
||||
export function assetTypeExport(params?: AssetTypeQuery) {
|
||||
return commonExport('/property/assetType/export', params ?? {});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询资产类型详情
|
||||
* @param id id
|
||||
* @returns 资产类型详情
|
||||
*/
|
||||
export function assetTypeInfo(id: ID) {
|
||||
return requestClient.get<AssetTypeVO>(`/property/assetType/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增资产类型
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function assetTypeAdd(data: AssetTypeForm) {
|
||||
return requestClient.postWithMsg<void>('/property/assetType', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新资产类型
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function assetTypeUpdate(data: AssetTypeForm) {
|
||||
return requestClient.putWithMsg<void>('/property/assetType', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除资产类型
|
||||
* @param id id
|
||||
* @returns void
|
||||
*/
|
||||
export function assetTypeRemove(id: ID | IDS) {
|
||||
return requestClient.deleteWithMsg<void>(`/property/assetType/${id}`);
|
||||
}
|
64
apps/web-antd/src/api/property/assetManage/assetType/model.d.ts
vendored
Normal file
64
apps/web-antd/src/api/property/assetManage/assetType/model.d.ts
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
import type { PageQuery, BaseEntity } from '#/api/common';
|
||||
|
||||
export interface AssetTypeVO {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
assetTypeName: string;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
sort: number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
createBy: string;
|
||||
|
||||
}
|
||||
|
||||
export interface AssetTypeForm extends BaseEntity {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
assetTypeName?: string;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
sort?: number;
|
||||
|
||||
}
|
||||
|
||||
export interface AssetTypeQuery extends PageQuery {
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
assetTypeName?: string;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
sort?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
Reference in New Issue
Block a user