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

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,42 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { customerManagementForm, customerManagementQuery, customerManagementVO, customerManagementInfoVO } from './types';
/**
* 查询用户客户列表
* @param query
*/
export const customerUser = (query: customerManagementQuery): AxiosPromise<customerManagementVO[]> => {
return request({
url: '/api/customers/customer',
method: 'get',
params: query
});
};
// *********新增客户*************
export const addCustomer = (data: any): AxiosPromise<customerManagementVO[]> => {
return request({
url: '/api/customers/addCustomer',
method: 'post',
data: data
});
};
// 修改
export const updateCustomer = (data: any): AxiosPromise<customerManagementVO[]> => {
return request({
url: '/api/customers/updateCustomer',
method: 'put',
data
})
}
// 删除
export const deleteCustomer = (ids: any): AxiosPromise<customerManagementVO[]> => {
return request({
url: '/api/customers/deleteCustomer',
method: 'delete',
data: ids
})
}
export default { customerUser, addCustomer, updateCustomer, deleteCustomer }

View File

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 }

View File

@ -0,0 +1,8 @@
export interface deviceQuery extends PageQuery {
deviceName: string;
deviceMac: string;
deviceImei: string;
deviceType: string;
deviceStatus: string;
}

View File

@ -0,0 +1,42 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { deviceTypeForm, deviceTypeQuery, deviceTypeVO } from './types';
/**
* 查询设备类型
* @param query
*/
export const deviceType = (query: deviceTypeQuery): AxiosPromise<deviceTypeVO[]> => {
return request({
url: '/api/deviceType',
method: 'get',
params: query
});
};
// *********新增设备类型*************
export const addDeviceType = (data: any): AxiosPromise<deviceTypeVO[]> => {
return request({
url: '/api/deviceType/add',
method: 'post',
data: data
});
};
// 修改
export const updateDeviceType = (data: any): AxiosPromise<deviceTypeVO[]> => {
return request({
url: '/api/deviceType/update',
method: 'put',
data
})
}
// 删除
export const deleteDeviceType = (ids: any): AxiosPromise<deviceTypeVO[]> => {
return request({
url: '/api/deviceType/delete',
method: 'delete',
data: ids
})
}
export default { deviceType, addDeviceType, updateDeviceType, deleteDeviceType }

View File

@ -0,0 +1,4 @@
export interface deviceTypeQuery extends PageQuery {
typeName: string;
}