客户管理,设备管理,设备类型,设备列表接口对接

This commit is contained in:
fengerli
2025-07-03 18:40:24 +08:00
parent e9b7973b83
commit 1aa9eb23e0
12 changed files with 1226 additions and 7 deletions

View File

@ -0,0 +1,49 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { deviceForm, deviceQuery, deviceVO } from './types';
/**
* 查询设备列表
* @param query
*/
export const deviceList = (query: deviceQuery): AxiosPromise<deviceVO[]> => {
return request({
url: '/api/device',
method: 'get',
params: query
});
};
// *********新增设备列表*************
export const addDevice = (data: any): AxiosPromise<deviceVO[]> => {
return request({
url: '/api/device/add',
method: 'post',
data: data
});
};
// 修改
export const updateDevice = (data: any): AxiosPromise<deviceVO[]> => {
return request({
url: '/api/device/update',
method: 'put',
data
})
}
// 删除
export const deleteDevice = (ids: any): AxiosPromise<deviceVO[]> => {
return request({
url: '/api/device/delete',
method: 'delete',
data: ids
})
}
// 设备下拉框
export const deviceTypeAll=()=> {
return request({
url: '/api/deviceType/all',
method: 'get',
})
}
export default { deviceList, addDevice, updateDevice, deleteDevice,deviceTypeAll }