77 lines
1.6 KiB
TypeScript
77 lines
1.6 KiB
TypeScript
import request from '@/utils/request';
|
|
import { AxiosPromise } from 'axios';
|
|
import { RepairProjectVO, RepairProjectForm, RepairProjectQuery } from './type';
|
|
|
|
/**
|
|
* 查询报修维修项目管理列表
|
|
* @param query
|
|
* @returns {*}
|
|
*/
|
|
|
|
export const listRepairProject = (query?: RepairProjectQuery): AxiosPromise<RepairProjectVO[]> => {
|
|
return request({
|
|
url: '/repairProject/list',
|
|
method: 'get',
|
|
params: query
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 查询报修维修项目管理详细
|
|
* @param id
|
|
*/
|
|
export const getRepairProject = (id: string | number): AxiosPromise<RepairProjectVO> => {
|
|
return request({
|
|
url: '/repairProject/' + id,
|
|
method: 'get'
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 新增报修维修项目管理
|
|
* @param data
|
|
*/
|
|
export const addRepairProject = (data: RepairProjectForm) => {
|
|
return request({
|
|
url: '/repairProject',
|
|
method: 'post',
|
|
data: data
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 修改报修维修项目管理
|
|
* @param data
|
|
*/
|
|
export const updateRepairProject = (data: RepairProjectForm) => {
|
|
return request({
|
|
url: '/repairProject',
|
|
method: 'put',
|
|
data: data
|
|
});
|
|
};
|
|
|
|
/**
|
|
* 删除报修维修项目管理
|
|
* @param id
|
|
*/
|
|
export const delRepairProject = (id: string | number | Array<string | number>) => {
|
|
return request({
|
|
url: '/repairProject/' + id,
|
|
method: 'delete'
|
|
});
|
|
};
|
|
/**
|
|
* 查询报修维修项目tree管理列表
|
|
* @param query
|
|
* @returns {*}
|
|
*/
|
|
|
|
export const gettreelistRepairProject = (query?: RepairProjectQuery): AxiosPromise<RepairProjectVO[]> => {
|
|
return request({
|
|
url: '/repairProject/treeList',
|
|
method: 'get',
|
|
params: query
|
|
});
|
|
};
|