import { Router } from '@angular/router'; import { OpenfuncOptions } from '../../models/function.model'; import { Observable } from 'rxjs'; import { FrmEventBus } from '../../eventbus/frm-evenbus'; import { LoadingService } from '../loading/loading.service'; import { FuncsService } from '../funcsservice/funcs.service'; import { CacheService, HttpService, SessionService } from '@ecp-caf/caf-common'; import { AppOptions } from '../../shared/frm-util'; import { AppService } from '../appservice/app.service'; import { FrmI18nSettingService } from '../i18nService/i18n-setting.service'; export declare class FrameworkService { private http; private router; private cache; private sessionSvc; private feb; private funcService; private loadService; private appService; private i18nSetting; private FUNCSTATUS_PATH; BeforeFuncClose: string; FuncClosed: string; FuncSwitch: string; constructor(http: HttpService, router: Router, cache: CacheService, sessionSvc: SessionService, feb: FrmEventBus, funcService: FuncsService, loadService: LoadingService, appService: AppService, i18nSetting: FrmI18nSettingService); /** * 根据funcid打开功能菜单 * (适用于单页签路由,不支持NG7升级后菜单之间跳转) */ openFunc(funcid: string, routepath: string, parentsessionid: string, newsession?: boolean, simpleparam?: string): any; /** * 直接打开功能 */ openMenu(options: AppOptions): void; /** * 通过流方式打开功能 */ openMenu$(options: AppOptions): Observable; openMenuChangeTenant(curOpts: AppOptions, newOpts: AppOptions): void; /** * 打开联查菜单 */ openConnectedFunc(funcId: string, options: OpenfuncOptions): void; /** * 打开联查菜单,并传参 */ openFuncWithParam(funcId: string, params: Map, reload?: boolean): void; /** * 打开功能,不返回流 */ private internalOpen; /** * 通过串流控制,打开菜单 */ private internalOpen$; /** * 通过串流获取被打开菜单的iframeLink对象信息 */ private internalOpenByIframeLink$; private getInvokeAndEnterFunc$; /** * 流方式检查菜单打开状态 */ private checkingBeforeOpen$; /** * 关闭前 */ beforeCloseMenu(options: AppOptions): void; private beforeCloseFuncByOptions; /** * 菜单关闭前事件触发(无 token) */ beforeCloseFunc(funcId: string, tabId?: string): void; /** * 直接关闭 * */ closeMenu(options: AppOptions): void; private closeFuncByOptions; /** * 关闭菜单tab页签,tabId可以指定,默认为funcId */ closeFunc(funcId: string, tabId?: string): any; /** * 获取菜单的调用信息 */ getFuncInvok(funcId: string, opCustomParam?: string): Observable; /** * 获取菜单实体 */ getFuncEntity(funcId: string): Observable; /** * 获取菜单预置参数 */ getPresetParams(funcId: string): Observable; /** * 获取菜单的静态参数 */ getStaticParam(funcId: string): Observable; /** * 获取表单的实体参数, * 管道一次性有效,慎用。如果要保留实体参数管道,请用eventlistner的方式 */ getEntityParam(tabId: string, handler: (value: any) => void, isSubonce?: boolean): any; entityParamUnsub(funcId: string): void; /** * 获取某菜单的实体参数结构 */ getEntityParamStructure(funcId: string): Observable; private mergeParams; private getInvokConfig; private getInvokCache; /** * 获取框架eventbus */ private getFeb; /** * 构造功能及session * (1912 funcSession移除后,接口不再提供) */ buildFuncSession(funcId: string, su?: string): Observable; /** * 进入功能,触发服务端逻辑 * 移除funcSession * 返回公共变量token */ private enterFunc; private enterFuncByTRoute; /** * 退出功能,如果存在bizContext,则移除 */ private quitFunc; /** * 获取当前应用所属su */ private getSu; /** * iframe url拼接 querystring 参数 */ private buildQueryString; /** * url 拼接map格式的参数 */ private buildQueryStringByMap; /** * 获取当前菜单页面的唯一标识 */ private getPageId; /** * 页面第一次被打开时,生成唯一标识 */ private newPageId; eventFire(token: string, args: any): void; eventListner(token: string, handler: (value: any) => void, options?: AppOptions): void; /** 创建监听订阅, 维护一个监听者列表,针对菜单触发事件 */ eventListner4Func(token: string, funcId: string, handler: (value: any) => void): void; /** 创建监听订阅, 维护一个监听者列表,针对应用触发事件 */ eventListner4App(token: string, appId: string, appEntrance: string, handler: (value: any) => void): void; }