2、保养计划
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
import type { MachineVO, MachineForm, MachineQuery } 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 machineList(params?: MachineQuery) {
|
||||
return requestClient.get<PageResult<MachineVO>>('/property/machine/list', { params });
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备列表列表
|
||||
* @param params
|
||||
* @returns 设备列表列表
|
||||
*/
|
||||
export function machineExport(params?: MachineQuery) {
|
||||
return commonExport('/property/machine/export', params ?? {});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备列表详情
|
||||
* @param id id
|
||||
* @returns 设备列表详情
|
||||
*/
|
||||
export function machineInfo(id: ID) {
|
||||
return requestClient.get<MachineVO>(`/property/machine/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备列表
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function machineAdd(data: MachineForm) {
|
||||
return requestClient.postWithMsg<void>('/property/machine', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新设备列表
|
||||
* @param data
|
||||
* @returns void
|
||||
*/
|
||||
export function machineUpdate(data: MachineForm) {
|
||||
return requestClient.putWithMsg<void>('/property/machine', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备列表
|
||||
* @param id id
|
||||
* @returns void
|
||||
*/
|
||||
export function machineRemove(id: ID | IDS) {
|
||||
return requestClient.deleteWithMsg<void>(`/property/machine/${id}`);
|
||||
}
|
204
apps/web-antd/src/api/property/equipmentManagement/machine/model.d.ts
vendored
Normal file
204
apps/web-antd/src/api/property/equipmentManagement/machine/model.d.ts
vendored
Normal file
@@ -0,0 +1,204 @@
|
||||
import type { PageQuery, BaseEntity } from '#/api/common';
|
||||
|
||||
export interface MachineVO {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
machineName: string;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
machineCode: string;
|
||||
|
||||
/**
|
||||
* 设备品牌
|
||||
*/
|
||||
machineBrand: string;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
machineTypeId: string | number;
|
||||
|
||||
/**
|
||||
* 位置详情
|
||||
*/
|
||||
locationId: string | number;
|
||||
|
||||
/**
|
||||
* 采购价格
|
||||
*/
|
||||
purchasePrice: number;
|
||||
|
||||
/**
|
||||
* 启用时间
|
||||
*/
|
||||
activationTime: string;
|
||||
|
||||
/**
|
||||
* 保修截至时间
|
||||
*/
|
||||
deadline: string;
|
||||
|
||||
/**
|
||||
* 使用年限(年)
|
||||
*/
|
||||
serviceLife: number;
|
||||
|
||||
/**
|
||||
* 保修周期
|
||||
*/
|
||||
maintenanceCycle: string;
|
||||
|
||||
/**
|
||||
* 使用状态
|
||||
*/
|
||||
state: string;
|
||||
|
||||
/**
|
||||
* 责任人
|
||||
*/
|
||||
personId: string | number;
|
||||
|
||||
}
|
||||
|
||||
export interface MachineForm extends BaseEntity {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
machineName?: string;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
machineCode?: string;
|
||||
|
||||
/**
|
||||
* 设备品牌
|
||||
*/
|
||||
machineBrand?: string;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
machineTypeId?: string | number;
|
||||
|
||||
/**
|
||||
* 位置详情
|
||||
*/
|
||||
locationId?: string | number;
|
||||
|
||||
/**
|
||||
* 采购价格
|
||||
*/
|
||||
purchasePrice?: number;
|
||||
|
||||
/**
|
||||
* 启用时间
|
||||
*/
|
||||
activationTime?: string;
|
||||
|
||||
/**
|
||||
* 保修截至时间
|
||||
*/
|
||||
deadline?: string;
|
||||
|
||||
/**
|
||||
* 使用年限(年)
|
||||
*/
|
||||
serviceLife?: number;
|
||||
|
||||
/**
|
||||
* 保修周期
|
||||
*/
|
||||
maintenanceCycle?: string;
|
||||
|
||||
/**
|
||||
* 使用状态
|
||||
*/
|
||||
state?: string;
|
||||
|
||||
/**
|
||||
* 责任人
|
||||
*/
|
||||
personId?: string | number;
|
||||
|
||||
}
|
||||
|
||||
export interface MachineQuery extends PageQuery {
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
machineName?: string;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
machineCode?: string;
|
||||
|
||||
/**
|
||||
* 设备品牌
|
||||
*/
|
||||
machineBrand?: string;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
machineTypeId?: string | number;
|
||||
|
||||
/**
|
||||
* 位置详情
|
||||
*/
|
||||
locationId?: string | number;
|
||||
|
||||
/**
|
||||
* 采购价格
|
||||
*/
|
||||
purchasePrice?: number;
|
||||
|
||||
/**
|
||||
* 启用时间
|
||||
*/
|
||||
activationTime?: string;
|
||||
|
||||
/**
|
||||
* 保修截至时间
|
||||
*/
|
||||
deadline?: string;
|
||||
|
||||
/**
|
||||
* 使用年限(年)
|
||||
*/
|
||||
serviceLife?: number;
|
||||
|
||||
/**
|
||||
* 保修周期
|
||||
*/
|
||||
maintenanceCycle?: string;
|
||||
|
||||
/**
|
||||
* 使用状态
|
||||
*/
|
||||
state?: string;
|
||||
|
||||
/**
|
||||
* 责任人
|
||||
*/
|
||||
personId?: string | number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
Reference in New Issue
Block a user