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
71 lines
1.6 KiB
TypeScript
import { apiClient } from '../utils/apiClient';
|
|
|
|
var requestUrl = "";
|
|
if (import.meta.env.MODE === 'development') {
|
|
requestUrl = "/ParamGraphRender";
|
|
} else if (import.meta.env.MODE === 'production') {
|
|
requestUrl = "/ParamGraphRender";
|
|
}
|
|
|
|
/**
|
|
* 获取参数列表
|
|
* @returns
|
|
*/
|
|
export function fetchFlatGridParamData() {
|
|
return apiClient(`${requestUrl}/getflatgridparamdata`, {
|
|
method: 'GET',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
}
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 获取井号列表
|
|
* @returns
|
|
*/
|
|
export function fetchFlatGridWellData() {
|
|
return apiClient(`${requestUrl}/getflatgridwelldata`, {
|
|
method: 'GET',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
}
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 获取结果列表
|
|
* @returns
|
|
*/
|
|
export function fetchFlatResultData() {
|
|
return apiClient(`${requestUrl}/getflatresults`, {
|
|
method: 'GET',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
}
|
|
})
|
|
}
|
|
|
|
export function generateFlatResults(generateRequest: any) {
|
|
return apiClient(`${requestUrl}/generateflatresults`, {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
body: JSON.stringify(generateRequest),
|
|
})
|
|
}
|
|
|
|
export function fetchRefreshResult(paramName: string) {
|
|
return apiClient(`${requestUrl}/refreshflatresults?paramName=${paramName}`);
|
|
}
|
|
|
|
export function deleteResult(paramNames: any) {
|
|
return apiClient(`${requestUrl}/deleteflatresults`, {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
body: JSON.stringify(paramNames),
|
|
})
|
|
} |