64 lines
1.3 KiB
TypeScript
64 lines
1.3 KiB
TypeScript
|
import request from '@/utils/request';
|
||
|
import { AxiosPromise } from 'axios';
|
||
|
import { ConstructionValueVO, ConstructionValueForm, ConstructionValueQuery } from '@/api/out/constructionValue/types';
|
||
|
|
||
|
/**
|
||
|
* 查询施工产值列表
|
||
|
* @param query
|
||
|
* @returns {*}
|
||
|
*/
|
||
|
|
||
|
export const listConstructionValue = (query?: ConstructionValueQuery): AxiosPromise<ConstructionValueVO[]> => {
|
||
|
return request({
|
||
|
url: '/out/constructionValue/list',
|
||
|
method: 'get',
|
||
|
params: query
|
||
|
});
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* 查询施工产值详细
|
||
|
* @param id
|
||
|
*/
|
||
|
export const getConstructionValue = (id: string | number): AxiosPromise<ConstructionValueVO> => {
|
||
|
return request({
|
||
|
url: '/out/constructionValue/' + id,
|
||
|
method: 'get'
|
||
|
});
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* 新增施工产值
|
||
|
* @param data
|
||
|
*/
|
||
|
export const addConstructionValue = (data: ConstructionValueForm) => {
|
||
|
return request({
|
||
|
url: '/out/constructionValue',
|
||
|
method: 'post',
|
||
|
data: data
|
||
|
});
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* 修改施工产值
|
||
|
* @param data
|
||
|
*/
|
||
|
export const updateConstructionValue = (data: ConstructionValueForm) => {
|
||
|
return request({
|
||
|
url: '/out/constructionValue',
|
||
|
method: 'put',
|
||
|
data: data
|
||
|
});
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* 删除施工产值
|
||
|
* @param id
|
||
|
*/
|
||
|
export const delConstructionValue = (id: string | number | Array<string | number>) => {
|
||
|
return request({
|
||
|
url: '/out/constructionValue/' + id,
|
||
|
method: 'delete'
|
||
|
});
|
||
|
};
|