import { Observable } from 'rxjs'; import { FrameContext } from '@farris/devkit'; import { FormNotifyService } from '../form-notify.service'; import { AttachmentDataService } from './attachment-data.service'; import { LanguageService } from '../languag.service'; import { EntityService } from '../entity-services/index'; import { ListDataService, SubListDataService } from '../data-services/index'; import { FormLoadingService } from '../form-loading/form-loading.service'; /** * 附件上传 * @summary * fileExtend:命名文件上传或预览组件传递过来的数据; * fileExtendFieldPath:命名附件UDT的字段路径; * attachmentInfo:命名附件UDT所需的信息; */ declare class FileService { private frameContext; private attachDataService; private entityService; private subListDataService; private notifyService; private languageService; private listDataService; private formLoadingService; private subject; private attachmentInfos; /** * 构造函数 */ constructor(frameContext: FrameContext, attachDataService: AttachmentDataService, entityService: EntityService, subListDataService: SubListDataService, notifyService: FormNotifyService, languageService: LanguageService, listDataService: ListDataService, formLoadingService: FormLoadingService); /** * 批量添加附件行 */ addFileRows(fileInfoFieldPath: string): Observable; /** * 批量添加带附件类型的附件行 * @param fileInfoFieldPath 附件udt字段 * @param configs 附件扩展信息配置 * @description configs配置如{"billId":"{UISTATE~/root/billId}","rowId":"{UISTATE~/root/rowId}","attachmentType":"xueli"} */ addFileRowsWithConfigs(fileInfoFieldPath: string, configs: string): void; private process; /** * 获取要添加的附件信息数组 */ private getAttachmentInfosToAddFromContext; /** * 将附件上传组件返回的附件信息转换为服务器端需要的格式 */ private convertToAttachmentInfos; /** * 删除附件行 */ removeFileRows(fileInfoFieldPath: string): Observable; /** * 获取要删除的数据 */ private getDataIdsToRemoveFromContext; /** * 根据路径获取附件字段值数组 * @param fieldPath 字段路径 */ private convertFileIdToDataId; /** * 更新附件排序 * @param attachmentInfoFieldPath 附件udt字段路径 * @param ids 附件排序后的附件id数组 */ updateOrder(attachmentInfoFieldPath: string, ids: string[]): void; /** * 从上下文中获取要处理的附件信息数组 * @summary * 为了统一单个和多个附件的处理方式,统一包装为数组 */ private getFileExtendsFromContext; } export { FileService };