You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

100 lines
2.1 KiB
TypeScript

import { apiClient } from '../utils/apiClient';
const requestUrl = '/WellRange';
/**
* 获取井号列表
* @returns
*/
export const fetchWellData = async () => {
return apiClient(`${requestUrl}/getwelldata`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
}
});
};
/**
* 获取参数列表
* @returns
*/
export const fetchParamData = async () => {
return apiClient(`${requestUrl}/getparamdata`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
}
});
};
/**
* 获取井参数数据
* @returns
*/
export const fetchWellParamRangeChart = async (wellParamRequest: any) => {
console.log("fetchWellParamRangeChart 请求参数:", wellParamRequest);
return apiClient(`${requestUrl}/getwellparamdata`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(wellParamRequest),
});
};
/**
* 保存所有参数
* @returns
*/
export const saveWellRangeParams = async (allParams: any) => {
return apiClient(`${requestUrl}/saveparams`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(allParams),
})
}
/**
* 获取所有保存的结果
* @returns
*/
export const getAllResult = () => {
return apiClient(`${requestUrl}/getparamsresult`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
})
}
/**
* 删除结果
* @returns
*/
export const deleteResult = (nodeIds: any) => {
return apiClient(`${requestUrl}/deleteparamsresult`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(nodeIds),
})
}
/**
* 获取当前结果对应的参数
* @returns
*/
export const getCurrentParam = (nodeId: any) => {
return apiClient(`${requestUrl}/getparams`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(nodeId),
})
}