import { Observable } from 'rxjs'; import { Repository, ViewModel } from '@farris/devkit'; import { FormLoadingService } from '../form-loading/form-loading.service'; import { FormNotifyService } from '../form-notify.service'; import { LanguageService } from '../languag.service'; import { FormMessageService } from '../form-message.service'; import { FormErrorService } from '../error/form-error.service'; /** * 子列表取数服务 */ declare class SubListDataService { private msgService; private repository; private loadingService; private viewModel; private languageService; private formNotifyService; private formErrorService; /** * 构造函数 */ constructor(msgService: FormMessageService, repository: Repository, loadingService: FormLoadingService, viewModel: ViewModel, languageService: LanguageService, formNotifyService: FormNotifyService, formErrorService: FormErrorService); /** * 新增 */ add(): Observable; /** * 在指定位置插入 * @param position 位置 */ insert(position?: 1 | -1): Observable; /** * 删除子表数据 */ remove(id: string, successMsg?: string): Observable; /** * 删除子表数据(不确认) */ removeWithoutConfirm(id: string): Observable; /** * 批量删除子表 * @param ids ids * @param successMsg 自定义提示信息 */ removeChildrenByIds(ids: string, successMsg?: string): Observable; /** * 删除 */ innerRemove(id: string, isConfirm: boolean, successMsg: string): Observable; /** * 删除并保存 * @param id id * @param successMsg 自定义提示信息 */ removeAndSave(id: string, successMsg?: string): Observable; /** * 上移或下移数据 * @param direction 方向,up | down * @param field 排序字段 * @param targets 要移动的数据 * @description * 使用该方法时排序字段必须有值,否则无法排序 */ move(direction: string | 'up' | 'down', field: string, targets: Array | string): void; private isNullOrEmpty; /** * 获取完整路径 * @todo:强识别到从表这一级 * fixed by justin: 根据bindingPath,如果是从从表,需要获取主表数据id和从表数据id */ private getPath; /** * 获取根组件appContext */ private readonly messagePipe; } export { SubListDataService };