This commit is contained in:
ryan
2026-07-13 15:17:45 +08:00
parent 08e61ce833
commit e0eb4e5975
334 changed files with 17212 additions and 12321 deletions
@@ -1,8 +1,12 @@
import type {InternalAxiosRequestConfig} from 'axios';
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 { BaseService } from '@/lib/services/core';
import type {
DBOverview,
ExecuteSQLResponse,
TableDataResponse,
} from './types';
/**
* 数据库管理服务类
@@ -32,7 +36,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 +58,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 = 'wavelet_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;