import { GridControlInterface } from '@ibizstudio/runtime'; import { MDControlBase } from './md-control-base'; import { IPSDEGrid, IPSDEGridColumn, IPSDEGridUAColumn, IPSUIActionGroupDetail } from '@ibizstudio/runtime'; /** * 表格部件基类 * * @export * @class GridControlBase * @extends {MDControlBase} */ export declare class GridControlBase extends MDControlBase implements GridControlInterface { /** * 表格实例 * * @type {IBizGridModel} * @memberof GridControlBase */ controlInstance: IPSDEGrid; /** * 表格引用名称 * * @type * @memberof GridControlBase */ gridRefName: string; /** * 是否默认保存 * * @type {*} * @memberof GridControlBase */ autosave?: any; /** * 总条数 * * @type {number} * @memberof GridControlBase */ totalrow: number; /** * 部件行为--submit * * @type {*} * @memberof GridControlBase */ WFSubmitAction?: any; /** * 部件行为--start * * @type {*} * @memberof GridControlBase */ WFStartAction?: any; /** * 主信息表格列 * * @type {string} * @memberof GridControlBase */ majorInfoColName: string; /** * 是否默认选中第一条数据 * * @type {boolean} * @memberof GridControlBase */ isSelectFirstDefault: boolean; /** * 选中数据字符串 * * @type {string} * @memberof GridControlBase */ selectedData?: string; /** * 表格数据 * * @type {Array} * @memberof GridControlBase */ items: Array; /** * 表格行数据默认激活模式 * 0 不激活 * 1 单击激活 * 2 双击激活 * * @type {(number | 0 | 1 | 2)} * @memberof GridControlBase */ gridRowActiveMode: number | 0 | 1 | 2; /** * 是否开启行编辑 * * @type {boolean} * @memberof GridControlBase */ isOpenEdit: boolean; /** * 新建行状态 * * @type {boolean} * @memberof GridControlBase */ newRowState: boolean; /** * 实际是否开启行编辑 * * @type {boolean} * @memberof GridControlBase */ actualIsOpenEdit: boolean; /** * 表格更新默认值项 * * @type {Array} * @memberof GridControlBase */ defaultUpdateItems: Array; /** * 行编辑值校验错误信息 * * @type {Array} * @memberof GridControlBase */ errorMessages: Array; /** * 选项框列宽 * * @type {number} * @memberof GridControlBase */ checkboxColWidth: number; /** * 拦截行选中 * * @type {boolean} * @memberof GridControlBase */ stopRowClick: boolean; /** * 当前编辑行数据 * * @type {*} * @memberof GridControlBase */ curEditRowData: any; /** * 是否允许拖动列宽 * * @type {boolean} * @memberof GridControlBase */ isDragendCol: boolean; /** * 所有列成员 * * @type {any[]} * @memberof GridControlBase */ allColumns: any[]; /** * 所有导出列成员 * * @type {any[]} * @memberof GridControlBase */ allExportColumns: any[]; /** * 所有列实例对象 * * @type {Array} * @memberof GridControlBase */ allColumnsInstance: Array; /** * 表格模型集合 * * @type {any[]} * @memberof GridControlBase */ gridItemsModel: any[]; /** * 主键列名 * * @memberof GridControlBase */ columnKeyName: string; /** * 表格是否自适应宽度 * * @memberof GridControlBase */ renderEmptyColumn: boolean; /** * 值规则集合 * * @type {*} * @memberof GridControlBase */ rules: any; /** * 聚合模式 * * @type {any[]} * @memberof GridControlBase */ aggMode: any; /** * 表格聚合行为 * * @type {string} * @memberof GridControlBase */ aggAction?: string; /** * 远程数据 * * @type {*} * @memberof GridControlBase */ remoteData: any; /** * 表格是否显示 * * @type {boolean} * @memberof GridControlBase */ isDisplay: boolean; /** * 是否启用分组 * * @type {boolean} * @memberof GridControlBase */ isEnableGroup: boolean; /** * 分组属性 * * @type {string} * @memberof GridControlBase */ groupAppField: string; /** * 分组属性代码表标识 * * @type {string} * @memberof GridControlBase */ groupAppFieldCodelistTag: string; /** * 分组属性代码表类型 * * @type {string} * @memberof GridControlBase */ groupAppFieldCodelistType: string; /** * 分组属性代码表 * * @type {*} * @memberof GridControlBase */ groupAppFieldCodelist: any; /** * 分组模式 * * @type {string} * @memberof GridControlBase */ groupMode: string; /** * 分组代码表标识 * * @type {string} * @memberof GridControlBase */ codelistTag: string; /** * 分组代码表 * * @type {*} * @memberof GridControlBase */ codelist: any; /** * 分组代码表类型 * * @type {string} * @memberof GridControlBase */ codelistType: string; /** * 是否隐藏标题 * * @type {boolean} * @memberof GridControlBase */ isHideHeader: boolean; /** * 导入模型 * * @type {*} * @memberof GridControlBase */ importDataModel: any; /** * 是否有updatedate字段 * * @type {boolean} * @memberof GridControlBase */ isHaveUpdatedate: boolean; /** * 获取表格行模型 * * @type {*} * @memberof GridControlBase */ getGridRowModel(): any; /** * 获取选中行胡数据 * * @returns {any[]} * @memberof GridControlBase */ getSelection(): any[]; /** * 属性值规则 * * @type {*} * @memberof GridControlBase */ deRules(): {}; /** * 初始化值规则 * * @memberof EditFormControlBase */ initRules(): void; /** * 监听动态参数变化 * * @param {*} newVal * @param {*} oldVal * @memberof GridControlBase */ onDynamicPropsChange(newVal: any, oldVal: any): void; /** * 监听静态参数变化 * * @param {*} newVal * @param {*} oldVal * @memberof GridControlBase */ onStaticPropsChange(newVal: any, oldVal: any): void; /** * 初始化表格模型 * * @type {*} * @memberof GridControlBase */ ctrlModelInit(): Promise; /** * 初始化数据映射 * * @memberof GridControlBase */ initDataMap(): void; /** * 表格部件初始化 * * @memberof GridControlBase */ ctrlInit(): void; viewStateAction(tag: string, action: string, data: any): void; /** * 初始化表格基础数据 * * @memberof GridControlBase */ initGridBasicData(): void; /** * 获取所有列成员模型 * * @memberof GridControlBase */ initAllColumns(): void; /** * 初始化主键属性列名 * * @memberof GridControlBase */ initColumnKeyName(): void; /** * 获取所有导出列成员模型 * * @param {IBizGridModel} gridInstance 表格部件实例对象 */ initAllExportColumns(): void; /** * 初始化导入模型 * * * @memberof GridControlBase */ initImportDataModel(): void; /** * 初始化界面行为模型 * * @type {*} * @memberof GridControlBase */ initCtrlActionModel(): void; /** * selectedData选中值变化 * * @param {*} newVal * @memberof TreeControlBase */ onSelectedDataValueChange(newVal: any): void; /** * 表格模型数据加载 * * @memberof GridControlBase */ ctrlModelLoad(): Promise; /** * 获取界面行为权限状态 * * @memberof GridControlBase */ getActionState(data: any): any; /** * 表格行编辑项校验 * * @param {string} name 属性名 * @param {*} data 行数据 * @param {number} rowIndex 行索引 * @returns Promise * * @memberof GridControlBase */ validate(name: string, data: any, rowIndex: number): Promise; /** * 校验所有修改过的编辑项 * * @returns Promise * @memberof GridControlBase */ validateAll(): Promise; /** * 表格数据加载 * * @param {*} [opt] 参数 * @param {boolean} [pageReset] 页码是否重置 * @memberof GridControlBase */ load(opt?: any, pageReset?: boolean): Promise; /** * 重置表格布局 * * @memberof GridControlBase */ resetGridLayout(): void; /** * 删除 * * @param {any[]} datas 删除数据 * @memberof GridControlBase */ remove(datas: any[]): Promise; /** * 保存 * * @param {*} args 额外参数 * @memberof GridControlBase */ save(args: any): Promise; /** * 新建行 * * @param {any[]} args 新建数据 * @memberof GridControlBase */ newRow(args: any[]): void; /** * 数据导入 * * @memberof GridControlBase */ importExcel(): void; /** * 数据导出 * * @param {*} args 额外参数 * @memberof GridControlBase */ exportExcel(args?: any): void; /** * 部件刷新 * * @param {*} args 额外参数 * @memberof GridControlBase */ refresh(args?: any): void; /** * 导出数据格式化 * * @param {*} filterVal * @param {*} jsonData * @returns {[]} * @memberof GridControlBase */ formatExcelData(filterVal: any, jsonData: any): Promise; /** * 根据分组代码表绘制分组列表 * * @memberof GridControlBase */ drawCodelistGroup(): Promise; /** * 绘制分组 * * @memberof GridControlBase */ drawGroup(): void; /** * 初始化自动分组树 * * @param group * @param groupIndex * @param children * @memberof GridControlBase */ initTree(group: any, groupIndex: number, children: Array): any; /** * 单个复选框选中 * * @param {*} selection 所有选中行数据 * @param {*} row 当前选中行数据 * @memberof GridControlBase */ select(selection: any, row: any): void; /** * 计算当前选中数据 * * @param {*} selectionArray 所有选中行数据 * @param {*} cancelData 被取消选中行数据,分组行为数组,非分组行为对象 * @memberof GridControlBase */ computeCheckedData(selectionArray: any[], cancelData: Array | any): any[]; /** * 设置非分组行checkbox选中状态 * * @param {*} rows 选中数据数组 * @param {boolean} flag 是否选中 * @memberof GridControlBase */ toggleSelection(rows?: any, flag?: boolean): void; /** * 复选框数据全部选中 * * @param {*} selection 选中数据 * @memberof GridControlBase */ selectAll(selection: any): void; /** * 表格行选中样式 * * @param {{ row: any, rowIndex: any }} { row, rowIndex } * @memberof GridControlBase */ onRowClassName({ row, rowIndex }: { row: any; rowIndex: any; }): string; /** * 行单击选中 * * @param {*} row 行 * @param {*} column 列 * @param {*} event 点击事件 * @param {boolean} isExecute 是否执行 * @memberof GridControlBase */ rowClick(row: any, column?: any, event?: any, isExecute?: boolean): void; /** * 行双击事件 * * @param {*} $event 点击事件 * @memberof GridControlBase */ rowDBLClick(row: any, column?: any, event?: any): void; /** * 获取对应行class * * @param {*} $args row 行数据,rowIndex 行索引 * @returns {void} * @memberof GridControlBase */ getRowClassName(args: { row: any; rowIndex: number; }): "" | "grid-selected-row"; /** * 获取对应单元格class * * @param {*} $args row 行数据,column 列数据,rowIndex 行索引,columnIndex 列索引 * @returns {void} * @memberof GridControlBase */ getCellClassName(args: { row: any; column: any; rowIndex: number; columnIndex: number; }): string; /** * 计算分组行checkbox选中样式 * * @param {*} rows 当前分组行下的所有数据 * @returns {*} currentRow 当前分组行 * @memberof GridControlBase */ computeGroupRow(rows: any[], currentRow: any): "" | "cell-select-all " | "cell-indeterminate " | undefined; /** * 页面变化 * * @param {*} $event 事件源 * @memberof GridControlBase */ pageOnChange($event: any): void; /** * 分页条数变化 * * @param {*} $event 事件源 * @memberof GridControlBase */ onPageSizeChange($event: any): void; /** * 分页刷新 * * @memberof GridControlBase */ pageRefresh(): void; /** * 排序变化 * * @param {{ column: any, prop: any, order: any }} { column, prop, order } UI回调数据 * @memberof GridControlBase */ onSortChange({ column, prop, order }: { column: any; prop: any; order: any; }): void; /** * 远程获取合计行数据 * * @memberof GridControlBase */ getAggData(context?: any, data?: any): void; /** * 设置列状态 * * @memberof GridControlBase */ setColState(): void; /** * 列变化 * * @memberof GridControlBase */ onColChange(): void; /** * 获取列状态 * * @param {string} name * @returns {boolean} * @memberof GridControlBase */ getColumnState(name: string): boolean; /** * 表格编辑项值变更 * * @param row 行数据 * @param {{ name: string, value: any }} 变化数据键值 * @param rowIndex 行索引 * @memberof GridControlBase */ onGridItemValueChange(row: any, $event: { name: string; value: any; }, rowIndex: number): void; /** * 表格编辑项值变化 * * @public * @param row 行数据 * @param property 列编辑项名 * @param row 列编辑项值 * @memberof GridControlBase */ gridEditItemChange(row: any, property: string, value: any, rowIndex: number): void; /** * 表格编辑项更新 * * @param {string} mode 界面行为名称 * @param {*} [data={}] 请求数据 * @param {string[]} updateDetails 更新项 * @param {boolean} [showloading] 是否显示加载状态 * @memberof GridControlBase */ updateGridEditItem(mode: string, data: any, updateDetails: string[], showloading?: boolean): void; /** * 新建默认值 * @param {*} row 行数据 * @memberof GridControlBase */ createDefault(row: any): void; /** * 更新默认值 * @param {*} row 行数据 * @memberof GridControlBase */ updateDefault(row: any): void; /** * 计算数据对象类型的默认值 * @param {string} action 行为 * @param {string} param 默认值参数 * @param {*} data 当前行数据 * @memberof GridControlBase */ computeDefaultValueWithParam(action: string, param: string, data: any): any; /** * 获取表格列禁用状态 * * @memberof GridControlBase */ getColumnDisabled(data: any, name: string): boolean | undefined; /** * 重置表格项值 * * @param {*} row 当前行 * @param {string} property 属性名 * @param {number} rowIndex 行下标 * @memberof GridControlBase */ resetGridData(row: any, property: string, rowIndex: number): void; /** * 合计行绘制 * * @param {any} param * @memberof GridControlBase */ getSummaries(param: any): any[] | undefined; /** * 合并分组行 * * @memberof GridControlBase */ arraySpanMethod({ row, column, rowIndex, columnIndex }: any): number[] | undefined; /** * 处理操作列点击 * * @param data 行数据 * @param event 事件源 * @param column 列对象 * @param detail 触发成员对象 * * @memberof GridControlBase */ handleActionClick(data: any, event: any, column: any, detail: any): void; /** * 表格列内置界面行为 * * @param data 行数据 * @param event 事件源 * @param column 列对象 * @memberof GridControlBase */ columnUIAction(data: any, event: any, column: any): void; /** * 通过属性名获取编辑列 * * @memberof GridControlBase */ findEditItemByField(fieldName: string): any; /** * 获取当前数据的行号 * * @param data 当前数据的JSON * @memberof GridControlBase */ findRowDataIndex(data: string): any[]; /** * 处理部件UI请求 * * @param {string} action 行为名称 * @param {*} context 上下文 * @param {*} viewparam 视图参数 * @memberof GridControlBase */ onControlRequset(action: string, context: any, viewparam: any): void; /** * 处理部件UI响应 * * @memberof GridControlBase */ onControlResponse(action: string, response: any): void; /** * 操作列按钮点击 * * @memberof GridControlBase */ handleActionButtonClick(row: any, $event: any, _column: IPSDEGridUAColumn, uiactionDetail: IPSUIActionGroupDetail): void; /** * 计算目标部件参数 * * @memberof GridControlBase */ computeTargetCtrlData(controlInstance: any, item?: any): { targetCtrlName: string; targetCtrlParam: any; targetCtrlEvent: any; }; } //# sourceMappingURL=grid-control-base.d.ts.map