/// /** * 根据类型获取展示字段组件的 render 方法,用于表格/详情中的值转换 * extra: { modelType: 'list' | 'detail' | 'update' | 'create', showTip: boolean } * 表格中的字符串/枚举数组,详情中的字符串数组会截断并showTip */ export declare function getFieldRender(field?: any, extra?: any): (val: any) => JSX.Element | "-"; /** * object类型,展示表单组件 */ export declare const DataItemView: ({ fields, modelType, value }: { fields: any; modelType: any; value: any; }) => JSX.Element; /** * object,展示表格组件 */ export declare const DataTableView: ({ fields, value }: { fields: any; value: any; }) => JSX.Element; /** * 转换数字类型 */ export declare const formatNumber: (value: any, field: any) => any; /** * 转换布尔值类型 */ export declare const formatBoolean: (value: any) => any; /** * 地理位置格式服务端数据转换 * @param {*} location * @returns */ export declare const formatLocationData: (location: any) => { meta: { address: any; longitude: any; latitude: any; }; flatContent: string; }; /** * 数字类型-有小数点时补齐0 * 值不为数字时原值返回,补齐 0 时返回 string,否则返回 number */ export declare const formatNumberFix: (val: any, field: any, setZero?: boolean) => any; /** * 根据 fields 信息生成 column * h5 和 pc 部分参数不同 */ export declare const getColumns: (fields: any, isH5?: any) => any; /** * 根据 field 属性,生成 column 配置 * https://git.woa.com/QBase/lcap/common-application-specs/blob/master/types/platform/datasource.ts */ export declare const formatFieldToColumn: (field: any, isH5: any) => { width: number; render: (record: any) => JSX.Element; key: any; header: any; align: string; fixed: string; }; export declare const getFieldWidth: (field: any) => number; /** * https://tcloud-dev.oa.com/document/product/1505/58791?!preview&!document=1 * @param {[String]} processHold [占有: object, 存在, 被有一个流程拥有, 置灰] * @param {[String]} lock [锁定: 没有那个字段 空字符串, 有值就锁定, 置灰] */ export declare const isProcessHoldOrLocked: (processHold: any, lock: any) => boolean; export declare const isShowOrgsView: (field: any, modelType: any) => boolean; /** * 导出数据格式转换 * 目前 number/boolean/x-enum/x-location 会被转换 */ export declare const formatDataToExport: (datas: any, fields: any, enumOptions?: {}) => any; /** * 导出数据为xlsx库接受的格式 * [[title1, title2], [value1, value2], [value1, value2]] */ export declare const formatDataToXlsx: (datas: any, fields: any, enumOptions?: {}) => any[]; /** * 生成搜索配置 * 1、过滤不支持搜索的字段,时间字段不支持 * 2、生成配置 * 3、枚举/数字需要特殊处理 */ export declare const getSearchAttributes: (fields: any) => any; export declare const getFieldValue: (name: any, record: any) => any; export declare const slotRender: (slot: any, props?: {}) => any; /** * 根据列管理,过滤表格列信息 * columns: { key, header, width, align, render,fixed }[] Tea Table 的列 * columnSets: { key, header, width, align, genre,fixed }[] 模型表格列管理属性,过滤 key 为空 * slots: object 模型表格作用域插槽 * isH5: 判断自定义插槽列能否展示,目前是正常展示 */ export declare const filterCustomColumns: ({ columns, columnSets, slots }: { columns: any; columnSets: any; slots: any; }) => any; /** * 过滤字段列表 * 导出/搜索框,不展示自定义列 */ export declare const filterCustomFields: ({ fields, columnSets, isFilterGenre, }: { fields: any; columnSets: any; isFilterGenre?: boolean; }) => any[]; /** * 列管理加入冻结属性 */ export declare const getFixedColumnSets: ({ fixedFront, fixedEnd, columnSets, }: { fixedFront?: string; fixedEnd?: string; columnSets: any; }) => any;