UNPKG

dbweb-common

Version:

用`yarn add dbweb-common`安装,不要忘记修改`angular.json`里的 `architect\build\options\assets`,加上

68 lines (67 loc) 1.82 kB
import { CurrentApiService, ElementsService, WSMessage, IElement } from 'dbweb-core'; import { Observable } from 'rxjs'; export declare type exportStep = 'toPrepare' | 'inTheExpord' | 'complete'; export interface DoExportParam { Format: string; DB: string; TableName: string; Encoding: string; Columns: string[]; } export interface ExportInfo { FromElement: string; Timeout: boolean; RowCount: number; Columns: { Name: string; Type: string; MaxLength: number; }[]; DBNames: string[]; DefaultTableName: string; } export interface DoExportResult { TaskID: string; Timeout: boolean; ZipFileSignURL: string; TaskInfoURL: string; TaskInfoSign: string; ResultURL: string; BrowseTaskElement: IElement; } export interface Column { selected?: boolean; Name: string; Type: string; MaxLength: number; } export interface ExportTaskWSMessage extends WSMessage { Data: { TaskID: string; Completed: boolean; Message: string; Data: number; }; } export declare class ExportService { private eles; private api; step: exportStep; srcElementTitle: string; rowCount: number; format: 'csv' | 'txt' | 'json' | 'excel' | 'sqlite3' | 'mytable'; encoding: 'utf8' | 'gbk'; dbName: string; tableName: string; columns: Column[]; dbNames: string[]; timeRemaining: number; exportProgress: number; zipFileURL: string; taskInfoURL: string; constructor(eles: ElementsService, api: CurrentApiService); isAllSelected(): boolean; hasSelected(): boolean; init(): import("rxjs").Subscription; doExport(param: DoExportParam): Observable<DoExportResult>; }