This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
import type { InspectionItemVO, InspectionItemForm, InspectionItemQuery } 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 inspectionItemList(params?: InspectionItemQuery) {
|
||||
return requestClient.get<PageResult<InspectionItemVO>>('/property/inspectionItem/list', { params });
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出巡检项目列表
|
||||
* @param params
|
||||
* @returns 巡检项目列表
|
||||
*/
|
||||
export function inspectionItemExport(params?: InspectionItemQuery) {
|
||||
return commonExport('/property/inspectionItem/export', params ?? {});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询巡检项目详情
|
||||
* @param id id
|
||||
* @returns 巡检项目详情
|
||||
*/
|
||||
export function inspectionItemInfo(id: ID) {
|
||||
return requestClient.get<InspectionItemVO>(`/property/inspectionItem/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增巡检项目
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function inspectionItemAdd(data: InspectionItemForm) {
|
||||
return requestClient.postWithMsg<void>('/property/inspectionItem', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新巡检项目
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function inspectionItemUpdate(data: InspectionItemForm) {
|
||||
return requestClient.putWithMsg<void>('/property/inspectionItem', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除巡检项目
|
||||
* @param id id
|
||||
* @returns void
|
||||
*/
|
||||
export function inspectionItemRemove(id: ID | IDS) {
|
||||
return requestClient.deleteWithMsg<void>(`/property/inspectionItem/${id}`);
|
||||
}
|
49
apps/web-antd/src/api/property/inspectionManagement/inspectionItem/model.d.ts
vendored
Normal file
49
apps/web-antd/src/api/property/inspectionManagement/inspectionItem/model.d.ts
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
import type { PageQuery, BaseEntity } from '#/api/common';
|
||||
|
||||
export interface InspectionItemVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
itemName: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
}
|
||||
|
||||
export interface InspectionItemForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
itemName?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface InspectionItemQuery extends PageQuery {
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
itemName?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
Reference in New Issue
Block a user