import request from '@/utils/request';
|
import { AxiosPromise } from 'axios';
|
import { IndicatorInfoVO, IndicatorInfoForm, IndicatorInfoQuery } from '@/api/indicatorInfo/types';
|
import { IndicatorStatus } from '@/api/indicatorInfo/status';
|
|
/**
|
* 查询指标取值列表
|
* @param query
|
* @returns {*}
|
*/
|
|
export const listIndicatorInfo = (query?: IndicatorInfoQuery): AxiosPromise<IndicatorInfoVO[]> => {
|
return request({
|
url: '/demo/indicatorInfo/list',
|
method: 'get',
|
params: query
|
});
|
};
|
|
/**
|
* 查询指标取值状态
|
* @returns {*}
|
*/
|
|
export const getIndicatorInfoStatus = (): AxiosPromise<IndicatorStatus[]> => {
|
return request({
|
url: '/demo/indicatorInfo/status',
|
method: 'get',
|
});
|
};
|
|
/**
|
* 查询指标取值详细
|
* @param id
|
*/
|
export const getIndicatorInfo = (id: string | number): AxiosPromise<IndicatorInfoVO> => {
|
return request({
|
url: '/demo/indicatorInfo/' + id,
|
method: 'get'
|
});
|
};
|
|
/**
|
* 新增指标取值
|
* @param data
|
*/
|
export const addIndicatorInfo = (data: IndicatorInfoForm) => {
|
return request({
|
url: '/demo/indicatorInfo',
|
method: 'post',
|
data: data
|
});
|
};
|
|
/**
|
* 修改指标取值
|
* @param data
|
*/
|
export const updateIndicatorInfo = (data: IndicatorInfoForm) => {
|
return request({
|
url: '/demo/indicatorInfo',
|
method: 'put',
|
data: data
|
});
|
};
|
|
/**
|
* 删除指标取值
|
* @param id
|
*/
|
export const delIndicatorInfo = (id: string | number | Array<string | number>) => {
|
return request({
|
url: '/demo/indicatorInfo/' + id,
|
method: 'delete'
|
});
|
};
|