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

1 month ago
import { apiClient } from '../utils/apiClient';
1 month ago
const requestUrl = '/WellRange';
1 month ago
/**
*
* @returns
*/
export const fetchWellData = async () => {
1 month ago
return apiClient(`${requestUrl}/getwelldata`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
}
});
1 month ago
};
/**
*
* @returns
*/
export const fetchParamData = async () => {
1 month ago
return apiClient(`${requestUrl}/getparamdata`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
}
});
1 month ago
};
/**
*
* @returns
*/
export const fetchWellParamRangeChart = async (wellParamRequest: any) => {
1 month ago
console.log("fetchWellParamRangeChart 请求参数:", wellParamRequest);
return apiClient(`${requestUrl}/getwellparamdata`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(wellParamRequest),
});
1 month ago
};
/**
*
* @returns
*/
export const saveWellRangeParams = async (allParams: any) => {
1 month ago
return apiClient(`${requestUrl}/saveparams`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(allParams),
})
1 month ago
}
/**
*
* @returns
*/
export const getAllResult = () => {
1 month ago
return apiClient(`${requestUrl}/getparamsresult`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
})
1 month ago
}
/**
*
* @returns
*/
export const deleteResult = (nodeIds: any) => {
1 month ago
return apiClient(`${requestUrl}/deleteparamsresult`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(nodeIds),
})
1 month ago
}
/**
*
* @returns
*/
export const getCurrentParam = (nodeId: any) => {
1 month ago
return apiClient(`${requestUrl}/getparams`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(nodeId),
})
1 month ago
}