This commit is contained in:
ryan
2026-07-13 15:08:40 +08:00
parent 08e8eea932
commit 1eff7878a1
441 changed files with 26491 additions and 18405 deletions
@@ -2,7 +2,7 @@ import type {InternalAxiosRequestConfig} from 'axios';
import apiClient from '@/lib/services/core/api-client';
import {BaseService} from '@/lib/services/core';
import type {DBOverview, ExecuteSQLResponse, TableDataResponse} from './types';
import type {DBOverview, ExecuteSQLResponse, TableDataResponse,} from './types';
/**
* 数据库管理服务类
@@ -32,7 +32,10 @@ export class DbManageService extends BaseService {
page: number;
pageSize: number;
}): Promise<TableDataResponse> {
return this.get<TableDataResponse>('/table-data', params as unknown as Record<string, unknown>);
return this.get<TableDataResponse>(
'/table-data',
params as unknown as Record<string, unknown>,
);
}
/**
@@ -51,7 +54,8 @@ export class DbManageService extends BaseService {
responseType: 'blob',
} as InternalAxiosRequestConfig);
const disposition = response.headers['content-disposition'] as string | undefined;
const disposition = response.headers['content-disposition'] as
string | undefined;
let filename = 'openflare_export';
if (disposition) {
const match = disposition.match(/filename="?([^";]+)"?/);
+5 -1
View File
@@ -1,2 +1,6 @@
export { DbManageService } from './db-manage.service';
export type { DBOverview, TableDataResponse, ExecuteSQLResponse } from './types';
export type {
DBOverview,
TableDataResponse,
ExecuteSQLResponse,
} from './types';
+1 -1
View File
@@ -23,7 +23,7 @@ export interface TableDataResponse {
* 执行自定义 SQL 的响应
*/
export interface ExecuteSQLResponse {
type: "select" | "exec";
type: 'select' | 'exec';
columns?: string[];
results?: Record<string, unknown>[];
affected_rows: number;