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.

71 lines
1.6 KiB
TypeScript

1 month ago
import { apiClient } from '../utils/apiClient';
1 month ago
var requestUrl = "";
if (import.meta.env.MODE === 'development') {
requestUrl = "/ParamGraphRender";
} else if (import.meta.env.MODE === 'production') {
requestUrl = "/ParamGraphRender";
}
1 month ago
/**
*
* @returns
*/
export function fetchFlatGridParamData() {
1 month ago
return apiClient(`${requestUrl}/getflatgridparamdata`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
}
})
1 month ago
}
/**
*
* @returns
*/
export function fetchFlatGridWellData() {
1 month ago
return apiClient(`${requestUrl}/getflatgridwelldata`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
}
})
1 month ago
}
/**
*
* @returns
*/
export function fetchFlatResultData() {
1 month ago
return apiClient(`${requestUrl}/getflatresults`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
}
})
1 month ago
}
export function generateFlatResults(generateRequest: any) {
1 month ago
return apiClient(`${requestUrl}/generateflatresults`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(generateRequest),
})
1 month ago
}
export function fetchRefreshResult(paramName: string) {
1 month ago
return apiClient(`${requestUrl}/refreshflatresults?paramName=${paramName}`);
1 month ago
}
1 month ago
export function deleteResult(paramNames: any) {
return apiClient(`${requestUrl}/deleteflatresults`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(paramNames),
})
1 month ago
}