设备管理

This commit is contained in:
FLL
2025-07-15 17:31:12 +08:00
parent be122e973f
commit 8052d3d63d
5 changed files with 524 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
import type { DeviceLocationVO, DeviceLocationForm, DeviceLocationQuery } 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 deviceLocationList(params?: DeviceLocationQuery) {
return requestClient.get<PageResult<DeviceLocationVO>>('/property/deviceLocation/list', { params });
}
/**
* 导出设备位置列表
* @param params
* @returns 设备位置列表
*/
export function deviceLocationExport(params?: DeviceLocationQuery) {
return commonExport('/property/deviceLocation/export', params ?? {});
}
/**
* 查询设备位置详情
* @param id id
* @returns 设备位置详情
*/
export function deviceLocationInfo(id: ID) {
return requestClient.get<DeviceLocationVO>(`/property/deviceLocation/${id}`);
}
/**
* 新增设备位置
* @param data
* @returns void
*/
export function deviceLocationAdd(data: DeviceLocationForm) {
return requestClient.postWithMsg<void>('/property/deviceLocation', data);
}
/**
* 更新设备位置
* @param data
* @returns void
*/
export function deviceLocationUpdate(data: DeviceLocationForm) {
return requestClient.putWithMsg<void>('/property/deviceLocation', data);
}
/**
* 删除设备位置
* @param id id
* @returns void
*/
export function deviceLocationRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/deviceLocation/${id}`);
}

View File

@@ -0,0 +1,84 @@
import type { PageQuery, BaseEntity } from '#/api/common';
export interface DeviceLocationVO {
/**
* 主键
*/
id: string | number;
/**
* 位置名称
*/
locationName: string;
/**
* 位置编号
*/
locationCode: string;
/**
* 位置类型
*/
locationType: string;
/**
* 搜索值
*/
searchValue: string;
}
export interface DeviceLocationForm extends BaseEntity {
/**
* 主键
*/
id?: string | number;
/**
* 位置名称
*/
locationName?: string;
/**
* 位置编号
*/
locationCode?: string;
/**
* 位置类型
*/
locationType?: string;
/**
* 搜索值
*/
searchValue?: string;
}
export interface DeviceLocationQuery extends PageQuery {
/**
* 位置名称
*/
locationName?: string;
/**
* 位置编号
*/
locationCode?: string;
/**
* 位置类型
*/
locationType?: string;
/**
* 搜索值
*/
searchValue?: string;
/**
* 日期范围参数
*/
params?: any;
}