import "./arrMath"; import "./stringUtil"; import { ElMessageBoxOptions } from "element-plus"; import { TeListener } from "./eListener"; import { Local } from "./storage"; import { User } from "./user"; import { Device } from "./device"; import type { App, VNode, WritableComputedRef } from "vue"; import { TAe, Tte } from "./defineField"; import { PageBtnType } from "../components/define"; import BaseUtil from "./baseUtil"; import { TCache } from "./cache"; import { CheckHandle } from "./checkHandle"; import * as Util from "./util"; import * as DownFile from "./downLoad"; import * as FileUtil from "./baseFile"; import * as BaseTime from "./baseTime"; import * as BaseWorker from "./baseWorker"; import * as BaseWebView from "./baseWebview"; import * as SSE from "./baseSSE"; import * as ITfDt from "./baseInitTfDt"; declare class Dict { type: Record; typeObj: Map; private _localType; constructor(); initThis(dict_json: any[]): void; init(...types: any[]): void; private __initSingle; private __loadSingle; reInit(...types: any[]): void; reInitSingle(t: string): Promise; load(t: string, callEnd?: (items: any[]) => void): Promise; typeLabel(type: any, value: any): any; /**获取字典值数组 */ typeLabels(type: any, value: any): any[] | ""; typeCst(type: any, value: any): any; typeItem(type: any, value: any): any; typeItems(type: any, value: any): any[]; typeItems_sort(type: any, value: any): any[]; typeLabelByObjs(typeObjs: any, value: any): any; setDict(dictName: string, opts: any[]): void; } export declare class Base { /**缓存 */ viewDt: Map; /**字典 */ dict: Dict; /**双向绑定数据 */ sd: { year: string; event: { readonly altitudeAngle: number; readonly azimuthAngle: number; readonly height: number; readonly isPrimary: boolean; readonly pointerId: number; readonly pointerType: string; readonly pressure: number; readonly tangentialPressure: number; readonly tiltX: number; readonly tiltY: number; readonly twist: number; readonly width: number; getCoalescedEvents: () => PointerEvent[]; getPredictedEvents: () => PointerEvent[]; readonly altKey: boolean; readonly button: number; readonly buttons: number; readonly clientX: number; readonly clientY: number; readonly ctrlKey: boolean; readonly layerX: number; readonly layerY: number; readonly metaKey: boolean; readonly movementX: number; readonly movementY: number; readonly offsetX: number; readonly offsetY: number; readonly pageX: number; readonly pageY: number; readonly relatedTarget: { addEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean) => void; dispatchEvent: (event: Event) => boolean; removeEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean) => void; }; readonly screenX: number; readonly screenY: number; readonly shiftKey: boolean; readonly x: number; readonly y: number; getModifierState: (keyArg: string) => boolean; initMouseEvent: (typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget | null) => void; readonly detail: number; readonly view: Window | null; readonly which: number; initUIEvent: (typeArg: string, bubblesArg?: boolean, cancelableArg?: boolean, viewArg?: Window | null, detailArg?: number) => void; readonly bubbles: boolean; cancelBubble: boolean; readonly cancelable: boolean; readonly composed: boolean; readonly currentTarget: { addEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean) => void; dispatchEvent: (event: Event) => boolean; removeEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean) => void; }; readonly defaultPrevented: boolean; readonly eventPhase: number; readonly isTrusted: boolean; returnValue: boolean; readonly srcElement: { addEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean) => void; dispatchEvent: (event: Event) => boolean; removeEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean) => void; }; readonly target: { addEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean) => void; dispatchEvent: (event: Event) => boolean; removeEventListener: (type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean) => void; }; readonly timeStamp: DOMHighResTimeStamp; readonly type: string; composedPath: () => EventTarget[]; initEvent: (type: string, bubbles?: boolean, cancelable?: boolean) => void; preventDefault: () => void; stopImmediatePropagation: () => void; stopPropagation: () => void; readonly NONE: 0; readonly CAPTURING_PHASE: 1; readonly AT_TARGET: 2; readonly BUBBLING_PHASE: 3; }; weather: any; globalProgress: number; isGlobalProgress: boolean; loading: boolean; isBg: boolean; isScrollContent: boolean; unreadInfoCount: number; bsCfg: any; sysCfg: any; networkStatus: string; amapCfg: any; unSaveSearch: boolean; routePath: string; isMobile: boolean; }; /**用户信息 */ user: User; /**路由 */ query: any; updateHZ: number; /**窗口更新监听 */ windowResizeL: TeListener; /**配置文件 */ config: PlatformConfigs; /**设备信息 */ device: Device; /**启动写入 */ setupObj: { locale: WritableComputedRef; }; /**组件库 */ comptMap: Map; compts: globalThis.Ref>, Record>>; /**webview 方法 */ WebView: typeof BaseWebView; /**一级菜单 */ netMenus: TRow[]; /**表编辑类型 */ TAe: typeof TAe; /**表字段类型 */ Tte: typeof Tte; /**页面头部 按钮类型 */ PBT: typeof PageBtnType; SSE: typeof SSE; /**公共创建表的方法库*/ ITfDt: typeof ITfDt; /**任意存储 */ dt: { id: number; /**流程图编辑后调用 */ callFlowChart: (_data: TRow, callEnd?: (v?: boolean, res?: any) => void) => void; /**刷新配置 */ refreshCfgs: Record; infoListener: TeListener; }; /**popover Dt存储 */ popoverDts: Map; /**文件 存储 */ cache: TCache; /**锁屏监听 */ checkHandle: CheckHandle; /**初始化参数 */ initOpts: BaseOpts; /**建立工具 */ Util: typeof BaseUtil; /**一般工具 */ U: typeof Util; F: typeof FileUtil; /**时间工具 */ Tm: typeof BaseTime; IDB: { set(key: string, val: any): void; get(key: string, callData: (v?: any) => void): void; remove(key: string): void; clear(): void; }; /**缓存方法 */ Local: { set(key: string, val: any): void; get(key: string): any; remove(key: string): void; clear(): void; }; /**下载方法工具 */ Df: typeof DownFile; /**线程 */ Worker: typeof BaseWorker; callInit?: (call: () => void) => void; /**版本 * authorization 20000 * platform 20001 * enterprise 20002 * government 20003 * bloc 20004 */ get sysVersion(): string; get dictt(): Record; get router(): any; /**传入的图片 */ get imgs(): BaseOpts_imgs; get env(): any; /**传入的接口 */ get apis(): BaseOpts_apis; private _app?; private _inited?; getInited(): boolean; private _rq; private _rqMap; getIs404(): boolean; getIs500(): boolean; getRq_path(code: number): string; getRq_api(code: number): string; /**初始化页面是否允许 逻辑 */ get getInitPageAble(): (callEnd: () => void) => void; init(app: any): void; /**设置基本属性 */ setInitOpts(opts?: BaseOpts): void; initQuery(): void; listenerTime(): void; initIconify(app: any): void; initListener(): void; private _sse?; createSEE(): void; amapInit(): void; toUserInit(): void; dictKey(...types: any[]): void; dictLabel(type: string, value: any): any; t(key?: string): string; getNextId(): number; /**线程 */ worker(blobStr: any): import("./eWorker").TeWorker; /**返回 */ goBack(route: any): void; /**判断是否为触控设备 */ isTouchDevice(): boolean; /**获取弹窗宽度 */ getFormWidth(formWidthType?: FormWidthType, width?: string | number): string; /** 按需建立组件 */ initCompt(...componentNameArg: string[]): this; /** 按需加载字典 */ initDict(...componentNameArg: string[]): this; /** 按需创建组件 * 优化删除方法,避免多次、切换页面点击同一对象 */ createCompt(comtName: string, props: any, container?: Element | ShadowRoot, callEnd?: (v: any) => void): this; /**是否包含修改 */ createAccoutDetail(data: any, dt?: TfDt): void; /**创建批量导入界面 */ createBulkImport(data?: BulkImportData): void; createBoxDetail(data: any): void; createBoxModelDetail(data: any): void; createCustomerInfo(data: any): void; /**创建字段修改pop弹窗 */ createFieldEditPop(field: TField, orgDt: TfDt, row: TRow, isTable?: boolean): void; ttVal(t: TField, v: any): any; /**字段值设置 */ setVal(fdp: any, field: TField, val: any, crow?: any): void; /**字段值获取 */ getVal(fdp: any, field: TField): any; /**字段值 dict获取 除去非option */ getVals(fdp: any, field: TField): any; /**获取属性,带传参 */ getKV(v: any, ...args: any[]): any; getSet(key: any, callVal: () => any, isReset?: boolean): any; set(key: any, val: any): any; reset(obj: any, obj_: any, unNull?: boolean): void; reset_has(obj: any, obj_: any): void; reset1(obj: any, obj_: any): void; resetTree(obj: any[], obj_: any[]): void; resetDeep(obj: any, obj_: any): void; /**状态返回html */ getHtmlForTimeStatus(status: any, beAboutToDays?: number, title?: string): string; setApprUserToFrom(valKey: any, val: any): void; removeNull(obj: any): any; toReturnEl(res: any): void; toPathNumber(data: any): any; onFileExceed(modelUpRef: any, files: any[]): void; delRow_all(name: string, call: () => void, callCancle?: () => void): void; delRow(name: string, call: () => void, callCancle?: () => void): void; changeRow(title: string, call: () => void, callCancle?: () => void, type?: "info" | "error" | "success" | "warning"): void; replaceRouteSet(route: any, obj: any): Promise; pushRouteSet(route: any, obj: any): Promise; getNum(v: any): number; static getRandomEn(first: string, count?: number): string; /**获取随机字符串 */ getRandomEn(first: string, count?: number): string; doInputFile(call: (e: any) => void, accept?: string, multiple?: boolean): void; doFileCheck(file: File, accept?: string, sizeClamp?: number): void; uploadFile_one(callEnd?: (data?: any) => void, accept?: string, callUpStart?: (file?: File) => void, bucket?: FileUpType, sizeClamp?: number, isAnyUp?: boolean): void; uploadFile(file: File, callEnd?: (data?: any) => void, bucket?: FileUpType, sizeClamp?: number, isAnyUp?: boolean): Promise; readFile(file: File, call: (data: any) => void, type?: string): void; /**预览文件 */ previewFile(fileList: any[], type?: FileType, container?: any, isAnyUp?: boolean): void; /**下载文件 */ loadFile(obj: any, callEnd?: (url?: string, data?: any) => void, type?: "download" | "document" | "preview", resT?: XMLHttpRequestResponseType, isThumb?: boolean): void; /**填充为真实地址 */ toZFile(fileList: FileDt[], callEnd?: () => void, resT?: XMLHttpRequestResponseType, isThumb?: boolean, isReplace?: boolean, isAnyUp?: boolean): FileDt[]; setTimeout(call?: () => void, time?: number): void; nextTick_async(call?: () => void): Promise; /**获取属性值 */ pDt(obj: any): any; /**深拷贝 */ deepClone(row: any): any; /**初始化语言 */ initLg(locale: any): void; /**转换语言 */ translationLg(lg?: string): void; /** 获取路由参数 */ getParams(): any; getWeather(): any; /**获取基础配置 */ getBsCfg(): Promise; getSysCfg(): void; getSysInited(): Promise; /**具有权限 按钮 */ isPerm(pbt: PageBtnDt, route: any): boolean; /**具有权限 perm 权限码*/ isPermp(perm: string, route: any): boolean; /**设置接口调用 */ setRqErr(code: number, byPath: string, api: string): { code: number; byPath: string; api: string; }; getNetworkStatus(): void; getCompts(key: string): Record; parseCompt(callCompts: () => any, name: string, _callEnd?: () => void): any; tips(text: string): void; callEnds(funs: any[], callEnd?: () => void): void; getT_noData(disRowHas?: boolean): "noData" | "noDataDisRow"; /**判断为空 */ isNull(v: any): boolean; /**错误提示 */ notifyErr(message?: string | VNode, options?: notifyOptions): import("element-plus").NotificationHandle; /**警告提示 */ notifyWar(message?: string | VNode, options?: notifyOptions): import("element-plus").NotificationHandle; /**消息提示 */ notifyInfo(message?: string | VNode, options?: notifyOptions): import("element-plus").NotificationHandle; /**成功提示 */ notifyOk(message?: string | VNode, options?: notifyOptions): import("element-plus").NotificationHandle; /**提示 */ notify(options: notifyOptions): import("element-plus").NotificationHandle; /**弹窗提示 信息 */ confirmInfo(message: string, callEnd?: (success: boolean) => void, options?: ElMessageBoxOptions): void; /**弹窗提示 成功*/ confirmOk(message: string, callEnd?: (success: boolean) => void, options?: ElMessageBoxOptions): void; /**弹窗提示 失败错误*/ confirmErr(message: string, callEnd?: (success: boolean) => void, options?: ElMessageBoxOptions): void; /**弹窗提示 警告*/ confirmWar(message: string, callEnd?: (success: boolean) => void, options?: ElMessageBoxOptions): void; /**弹窗提示 */ confirm(message: any, options?: ElMessageBoxOptions, callEnd?: (success: boolean) => void): void; /**接口返回提示 */ toApiReturn(res: any, c?: (success: boolean, res?: any) => void, unOkTips?: boolean, unErrTips?: boolean): void; /**获取父对象中满足需求的 */ getParentBy(e: PointerEvent, call: (v: HTMLElement) => boolean): HTMLElement; /**获取名称 */ getTitleByTfield(f: TField, str?: string): string; /**添加编辑操作 */ confirmTable(type: "add" | "edit" | undefined, dt: TfDt, addCallEnd?: (v: (res?: any) => void) => void, editCallEnd?: (v: (res?: any) => void) => void, callEnd?: (success: boolean, res?: any) => void): void; /**删除操作 */ delTableField(delCallEnd?: (v: (res?: any) => void) => void, callEnd?: (success: boolean) => void): void; /**获取表字段数据 */ tVal(row: any, field: TField, dt: TfDt, isDb?: boolean): any; /**表格 筛选中文 */ setFDtLabel(val: any, field: TField, options: any[], key?: string, lak?: string, row?: any): void; /**表单必填验证 */ toFormR(field: TField, v?: any): void; /**form 提示 */ private formTP; /**form rule 请输入 */ formRTP(type: FRuleType, tablefieldName: string, trigger?: string | string[], validator?: (rule: any, value: any, callback: any) => void | any, unRequired?: boolean): any; private __debounceObj; /**防抖 */ debounce(fn: any, waitTime?: number, key?: string | number): void; private __debounceObj2; /**防抖2 先执行*/ debounce2(fn: any, waitTime?: number, key?: string | number): any; private __throttleObj; /**节流 */ throttle(fn: any, gapTime?: number, key?: string | number): void; private __oldDataObj; /**读旧 */ asyncOrOld(fn: any, gapTime?: number, ...args: any[]): Promise; /**设置旧 */ setOrOld(fn: any, data: any, ...args: any[]): void; /**拷贝到剪切板 */ copyTextToClipboard(text: any, tips?: string): Promise; fallbackCopyTextToClipboard: (text: any, tips?: string) => void; popoverAutoPos(): void; /**获取字典值 数字转 */ getDictVal(v: any): void; /**添加编辑操作建立处理 */ getFormDataByTfDt(dt: TfDt): TField[]; /**添加编辑操作建立处理 */ getDescDataByTfDt(dt: TfDt): TField[]; /**获取输入提示 */ getPlaceholder(field: TField, pref?: string): string; /**接口调用 */ doApi(api: any, ...args: any[]): Promise; /**添加编辑操作建立处理 */ confirmTf(type: "add" | "edit" | undefined, dt: TfDt, callEnd?: (success?: boolean, res?: any) => void, disValidate?: boolean): void; /**初始化表单规则等*/ private __doFormRules; /**清楚缓存 20秒后清除*/ clearCacheDts(): void; private __dts; /**初始化表格 表单 */ initTfDt(dt: TfDt, isChild?: boolean): TfDt; } export { Local }; /** * 初始化基础类 * @param app vue实例 * @param baseObj 基础类实例 * @param opts 初始化基础数据选项 * @returns */ export declare function useBase(app: App, baseObj: Base, opts?: BaseOpts): Base;