import { Entity, FrameContext } from '@farris/devkit'; import { Observable } from 'rxjs'; import { FormLoadingService } from '../form-loading/form-loading.service'; import { LanguageService } from '../languag.service'; import { FormNotifyService } from '../form-notify.service'; import { FormMessageService } from '../form-message.service'; import { FormErrorService } from '../error/form-error.service'; import { RuntimeFrameworkService } from '../rtf-service'; import { CommandService } from '../command-service'; /** * 卡片仓库服务 */ declare class CardDataService { private formMessageService; private frameContext; private loadingService; private formNotifyService; private languageService; private formErrorService; private runtimeFrameworkService; private commandService; /** * 实体仓库 */ private repository; /** * 绑定数据 */ private bindingData; /** * 构造函数 */ constructor(formMessageService: FormMessageService, frameContext: FrameContext, loadingService: FormLoadingService, formNotifyService: FormNotifyService, languageService: LanguageService, formErrorService: FormErrorService, runtimeFrameworkService: RuntimeFrameworkService, commandService: CommandService); /** * 加载数据 * @param id 主实体id * @param enableChildrenPagination 启用子表分页 */ load(id: string): Observable; /** * 加载前 * @param id id * @param transitionActionParamName 状态迁移动作参数编号 * @returns */ onLoading(transitionActionParamName: string): void; /** * 新增 */ add(): Observable; /** * 级联新增 */ cascadeAdd(): Observable; /** * 编辑(更新数据并标记编辑状态) */ edit(id?: string): Observable; /** * 更新 * @param id 主实体id * @param enableChildrenPagination 启用子表分页 */ update(id?: string): Observable; updateWithoutEmpty(): Observable; /** * 校验当前行是否存在 * @returns */ checkBeforeUpdate(): Observable; /** * 已废弃 * @returns */ updateWithNotify(): Observable; /** * 加载卡片数据(分页加载子表数据) * @deprecated 方法已废弃,请勿使用 */ loadPaged(filter?: string, sort?: string): Observable; /** * 保存 */ save(successMsg?: string): Observable; /** * 取消(默认取消) */ cancel(): Observable; /** * 还原变更集 * @description 不带变更检测提示 */ revert(options?: any): Observable; /** * 取消(取消前检查未保存的变更) * @summary * 1、用户误操作:只需要做个提示就可以了; * 2、用户有意取消:点击取消就是要放弃所有变更,这时候询问人家是否要保存或者提示存在变更有点多此一举,确认一把即可。 * 3、用户误操作:没有变更的情况下直接给取消了,用户会产生恐慌,因为用户有时候并不确定是否有变更,应该也确认一把。 * @todo * 1、由于产品部很多代码误用了该方法,依赖了没有变更的时候直接取消,现在弹窗确认框来,不太合适; * 2、产品部需要用cancelWithoutCheck方法代替,目前先给兼容着,待删除。 */ cancelWithCheck(): Observable; /** * 取消(直接取消,不执行检查) */ cancelWithoutCheck(options?: any): Observable; /** * 取消 */ private cancelChanges; /** * 重新加载(仅供卡片取消后重新加载数据,其他场景请勿使用) */ reload(): Observable; private getPath; private resetForm; private parseParams; private showLoadingConfirm; } export { CardDataService };