import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { RepairProjectVO, RepairProjectForm, RepairProjectQuery } from './type'; /** * 查询报修维修项目管理列表 * @param query * @returns {*} */ export const listRepairProject = (query?: RepairProjectQuery): AxiosPromise => { return request({ url: '/repairProject/list', method: 'get', params: query }); }; /** * 查询报修维修项目管理详细 * @param id */ export const getRepairProject = (id: string | number): AxiosPromise => { 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) => { return request({ url: '/repairProject/' + id, method: 'delete' }); }; /** * 查询报修维修项目tree管理列表 * @param query * @returns {*} */ export const gettreelistRepairProject = (query?: RepairProjectQuery): AxiosPromise => { return request({ url: '/repairProject/treeList', method: 'get', params: query }); };