fix: 接口变更/请求方法为大写

This commit is contained in:
TsMask
2025-02-20 10:42:34 +08:00
parent 8bfa73a67a
commit 7322759545
83 changed files with 568 additions and 1388 deletions

View File

@@ -41,7 +41,7 @@ export async function listOperationLog(query: Record<string, any>) {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/operation_log`,
method: 'get',
method: 'GET',
params: {
totalSQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
@@ -50,9 +50,8 @@ export async function listOperationLog(query: Record<string, any>) {
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
const data = {
data: { total: 0, rows: [] as any },
code: result.code,
msg: result.msg,
};
@@ -60,9 +59,9 @@ export async function listOperationLog(query: Record<string, any>) {
const itemData = item['operation_log'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.total = itemData[0]['total'];
data.data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
data.data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});