|
|
@@ -1,5 +1,7 @@
|
|
|
-import { IFlowTabClass, IBillTabClass, ICostTabClass } from './classType';
|
|
|
-import { IDataObj_props, IEvent_type } from './enum'
|
|
|
+// import { IFlowTabClass, IBillTabClass, ICostTabClass } from './classType';
|
|
|
+// eslint-disable-next-line camelcase
|
|
|
+import { IDataObj_props, IEvent_type } from './enum';
|
|
|
+
|
|
|
export interface IArea {
|
|
|
Left: number;
|
|
|
Right: number;
|
|
|
@@ -18,6 +20,17 @@ export interface IArea {
|
|
|
Bottom: string;
|
|
|
};
|
|
|
}
|
|
|
+export interface IControlSubCollection {
|
|
|
+ ID: string;
|
|
|
+ CloseOutput: string;
|
|
|
+ Horizon: string;
|
|
|
+ ShowZero: string;
|
|
|
+ Shrink: string;
|
|
|
+ ShrinkFirst: string;
|
|
|
+ Vertical: string;
|
|
|
+ VerticalForExcel: string;
|
|
|
+ Wrap: string;
|
|
|
+}
|
|
|
export interface Fields {
|
|
|
area: IArea;
|
|
|
control: string | IControlSubCollection;
|
|
|
@@ -25,11 +38,11 @@ export interface Fields {
|
|
|
font: string;
|
|
|
isAutoHeight: boolean;
|
|
|
style: string;
|
|
|
- Hidden?: boolean;//暂定
|
|
|
- isSerial: boolean;//暂定
|
|
|
+ Hidden?: boolean; // 暂定
|
|
|
+ isSerial: boolean; // 暂定
|
|
|
Format: string;
|
|
|
SumKey: string;
|
|
|
- combineType?: string
|
|
|
+ combineType?: string;
|
|
|
isMerge?: boolean;
|
|
|
Default_Value?: string;
|
|
|
Label: string;
|
|
|
@@ -42,7 +55,6 @@ export interface IFormula {
|
|
|
format: string;
|
|
|
Name: string;
|
|
|
run_type: string;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
export interface BorderStyle {
|
|
|
@@ -52,33 +64,19 @@ export interface BorderStyle {
|
|
|
Color: string;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
export interface IStyles {
|
|
|
ID: string;
|
|
|
CfgDispName: string;
|
|
|
- border_style: BorderStyle[]
|
|
|
+ border_style: BorderStyle[];
|
|
|
// [key: string]: any; // 剩下的之后补充
|
|
|
}
|
|
|
|
|
|
-
|
|
|
export interface IDefProperties {
|
|
|
ctrls: IControlSubCollection[];
|
|
|
fonts: IFontSubCollection[];
|
|
|
styles: IStyles[];
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-export interface IControlSubCollection {
|
|
|
- ID: string;
|
|
|
- CloseOutput: string;
|
|
|
- Horizon: string;
|
|
|
- ShowZero: string;
|
|
|
- Shrink: string;
|
|
|
- ShrinkFirst: string;
|
|
|
- Vertical: string;
|
|
|
- VerticalForExcel: string;
|
|
|
- Wrap: string;
|
|
|
-}
|
|
|
export interface IControlCollection {
|
|
|
[key: string]: IControlSubCollection;
|
|
|
}
|
|
|
@@ -97,7 +95,6 @@ interface IFontCollection {
|
|
|
[key: string]: IFontSubCollection;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
export interface IPosition {
|
|
|
Bottom: number;
|
|
|
Left: number;
|
|
|
@@ -142,7 +139,7 @@ export interface IPageCellObj {
|
|
|
[key: string]: {
|
|
|
cellIdx: number;
|
|
|
cell: INode;
|
|
|
- }[]
|
|
|
+ }[];
|
|
|
}
|
|
|
export interface ICell {
|
|
|
font: string;
|
|
|
@@ -154,28 +151,30 @@ export interface ICell {
|
|
|
Format?: any;
|
|
|
Prefix?: string;
|
|
|
Suffix?: any;
|
|
|
-};
|
|
|
+}
|
|
|
|
|
|
export interface IPreviewPage {
|
|
|
打印页面_信息: {
|
|
|
报表名称: string;
|
|
|
纸张宽高: IPosition;
|
|
|
- 页边距: [number, number]
|
|
|
+ 页边距: [number, number];
|
|
|
};
|
|
|
control_collection: IControlCollection;
|
|
|
font_collection: IFontCollection;
|
|
|
- items: [{
|
|
|
- page_seq: number;
|
|
|
- cells: ICell[];
|
|
|
- page_merge_border: IPosition;
|
|
|
- }];
|
|
|
+ items: [
|
|
|
+ {
|
|
|
+ page_seq: number;
|
|
|
+ cells: ICell[];
|
|
|
+ page_merge_border: IPosition;
|
|
|
+ }
|
|
|
+ ];
|
|
|
MergeBand: {
|
|
|
Bottom: number;
|
|
|
Left: number;
|
|
|
Right: number;
|
|
|
Top: number;
|
|
|
style: any;
|
|
|
- }
|
|
|
+ };
|
|
|
style_collection: {
|
|
|
BORDER_ALL_AROUND: IPositionExtent;
|
|
|
Default: IPositionExtent;
|
|
|
@@ -183,7 +182,7 @@ export interface IPreviewPage {
|
|
|
Default_Normal: IPositionExtent;
|
|
|
Label_Topline: IPositionExtent;
|
|
|
Label_Underline: IPositionExtent;
|
|
|
- }
|
|
|
+ };
|
|
|
}
|
|
|
|
|
|
interface ISimpleJSONPage {
|
|
|
@@ -192,7 +191,6 @@ interface ISimpleJSONPage {
|
|
|
page_seq: number;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
export interface IGroupField {
|
|
|
Name: string;
|
|
|
fixedPrecisionNum: number;
|
|
|
@@ -200,18 +198,17 @@ export interface IGroupField {
|
|
|
DataType: string;
|
|
|
DataSeq: number;
|
|
|
DataNodeName: IDataObj_props;
|
|
|
- data_field: number | any;//暂定
|
|
|
+ data_field: number | any; // 暂定
|
|
|
Precision?: {
|
|
|
type?: string;
|
|
|
- flexibleRefFieldID?: number
|
|
|
- }
|
|
|
+ flexibleRefFieldID?: number;
|
|
|
+ };
|
|
|
flexiblePrecisionRefObj?: { [key: string]: number }[];
|
|
|
[key: string]: any;
|
|
|
}
|
|
|
|
|
|
export interface ITargetDataSet {
|
|
|
- [key: string]: IGroupField
|
|
|
-
|
|
|
+ [key: string]: IGroupField;
|
|
|
}
|
|
|
|
|
|
export interface ITargetFields {
|
|
|
@@ -221,29 +218,40 @@ export interface ITargetFields {
|
|
|
从数据指标_拓展集合: ITargetDataSet;
|
|
|
离散指标_集合: ITargetDataSet;
|
|
|
无映射离散指标_集合: ITargetDataSet;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
interface IOutputAsPreviewPage {
|
|
|
(rptTpl: IRptTpl, defProperties: IDefProperties): IPreviewPage;
|
|
|
}
|
|
|
interface IOutputAsSimpleJSONPageArray {
|
|
|
- (rptTpl: IRptTpl, dataObj: IDataObj, startPage: number, endPage: number, defProperties: IDefProperties, customizeCfg: ICustomizeCfg): IPreviewPage;
|
|
|
+ (
|
|
|
+ rptTpl: IRptTpl,
|
|
|
+ dataObj: IDataObj,
|
|
|
+ startPage: number,
|
|
|
+ endPage: number,
|
|
|
+ defProperties: IDefProperties,
|
|
|
+ customizeCfg: ICustomizeCfg
|
|
|
+ ): IPreviewPage;
|
|
|
}
|
|
|
interface IOutputAsSimpleJSONPage {
|
|
|
- (rptTpl: IRptTpl, dataObj: IDataObj, bands: IBands, page: number, controls: IControlCollection, customizeCfg: ICustomizeCfg): ISimpleJSONPage;
|
|
|
+ (
|
|
|
+ rptTpl: IRptTpl,
|
|
|
+ dataObj: IDataObj,
|
|
|
+ bands: IBands,
|
|
|
+ page: number,
|
|
|
+ controls: IControlCollection,
|
|
|
+ customizeCfg: ICustomizeCfg
|
|
|
+ ): ISimpleJSONPage;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
export interface IFlowTab {
|
|
|
dispValueIdxLst: number[][];
|
|
|
- group_lines_amt: number
|
|
|
- group_node_info: number[][] | null
|
|
|
+ group_lines_amt: number;
|
|
|
+ group_node_info: number[][] | null;
|
|
|
group_sum_fields: Fields[] | null;
|
|
|
group_sum_values: { [key: string]: number }[] | null;
|
|
|
isEx: boolean;
|
|
|
- multiCols: number
|
|
|
+ multiCols: number;
|
|
|
groupSumValLst: any[];
|
|
|
group_check_fields: any[];
|
|
|
auto_height_fields_idx: any[];
|
|
|
@@ -253,11 +261,34 @@ export interface IFlowTab {
|
|
|
outputAsPreviewPage: IOutputAsPreviewPage;
|
|
|
outputAsSimpleJSONPage: IOutputAsSimpleJSONPage;
|
|
|
outputAsSimpleJSONPageArray: IOutputAsSimpleJSONPageArray;
|
|
|
- checkCombineEvent: ($RUN_TYPE: string, $VER_COMB_ARRAY: any[], $HOR_COMB_ARRAY: any[], $CURRENT_CELL_ITEMS: Fields, $CURRENT_RPT: ICurrent_RPT) => void
|
|
|
- checkGrpTxtOutEvent: ($RUN_TYPE: string, $TEXT: Fields, $TIMES: number, $CURRENT_RPT: ICurrent_RPT) => void
|
|
|
- combinePageCells: (rstPageCells: ICell[], verticalCombinePos: any[], horizonCombinePos: any[]) => void;
|
|
|
- commonTabRestOutput: (dataObj: IDataObj, page: number, segIdx: number, bands: IBands, band: IBandDetail, unitFactor: number, tab: { BandName: string, text_s?: Fields[], text?: string }, multiColIdx: number) => Fields[]
|
|
|
-
|
|
|
+ checkCombineEvent: (
|
|
|
+ $RUN_TYPE: string,
|
|
|
+ $VER_COMB_ARRAY: any[],
|
|
|
+ $HOR_COMB_ARRAY: any[],
|
|
|
+ $CURRENT_CELL_ITEMS: Fields,
|
|
|
+ $CURRENT_RPT: ICurrent_RPT
|
|
|
+ ) => void;
|
|
|
+ checkGrpTxtOutEvent: (
|
|
|
+ $RUN_TYPE: string,
|
|
|
+ $TEXT: Fields,
|
|
|
+ $TIMES: number,
|
|
|
+ $CURRENT_RPT: ICurrent_RPT
|
|
|
+ ) => void;
|
|
|
+ combinePageCells: (
|
|
|
+ rstPageCells: ICell[],
|
|
|
+ verticalCombinePos: any[],
|
|
|
+ horizonCombinePos: any[]
|
|
|
+ ) => void;
|
|
|
+ commonTabRestOutput: (
|
|
|
+ dataObj: IDataObj,
|
|
|
+ page: number,
|
|
|
+ segIdx: number,
|
|
|
+ bands: IBands,
|
|
|
+ band: IBandDetail,
|
|
|
+ unitFactor: number,
|
|
|
+ tab: { BandName: string; text_s?: Fields[]; text?: string },
|
|
|
+ multiColIdx: number
|
|
|
+ ) => Fields[];
|
|
|
}
|
|
|
interface IParam {
|
|
|
DataSeq: number;
|
|
|
@@ -275,30 +306,52 @@ export interface ICurrent_RPT {
|
|
|
isFollowMode: boolean;
|
|
|
totalPages: number;
|
|
|
params: IParams;
|
|
|
- analyzeData: (rptTpl: IRptTpl, dataObj: IDataObj, defProperties: IDefProperties, option: string, outputType: string) => void;
|
|
|
- executeFormulas: (runType: string, $CURRENT_TEMPLATE: any, $CURRENT_DATA: any, $CURRENT_RPT: ICurrent_RPT) => void;
|
|
|
+ analyzeData: (
|
|
|
+ rptTpl: IRptTpl,
|
|
|
+ dataObj: IDataObj,
|
|
|
+ defProperties: IDefProperties,
|
|
|
+ option: string,
|
|
|
+ outputType: string
|
|
|
+ ) => void;
|
|
|
+ executeFormulas: (
|
|
|
+ runType: string,
|
|
|
+ $CURRENT_TEMPLATE: any,
|
|
|
+ $CURRENT_DATA: any,
|
|
|
+ $CURRENT_RPT: ICurrent_RPT
|
|
|
+ ) => void;
|
|
|
initialize?: (rptTpl: IRptTpl) => void;
|
|
|
outputAsPreviewPage: IOutputAsPreviewPage;
|
|
|
outputAsSimpleJSONPage: IOutputAsSimpleJSONPage;
|
|
|
outputAsSimpleJSONPageArray: IOutputAsSimpleJSONPageArray;
|
|
|
- paging: (rptTpl: IRptTpl, dataObj: IDataObj, defProperties: IDefProperties, option: string, outputType: string) => void;
|
|
|
+ paging: (
|
|
|
+ rptTpl: IRptTpl,
|
|
|
+ dataObj: IDataObj,
|
|
|
+ defProperties: IDefProperties,
|
|
|
+ option: string,
|
|
|
+ outputType: string
|
|
|
+ ) => void;
|
|
|
fields: ITargetFields;
|
|
|
- flowTab: IFlowTabClass;
|
|
|
- flowTabEx: IFlowTabClass;
|
|
|
- billTab: IBillTabClass;
|
|
|
- crossTab: ICostTabClass;
|
|
|
+ // flowTab: IFlowTabClass;
|
|
|
+ // flowTabEx: IFlowTabClass;
|
|
|
+ // billTab: IBillTabClass;
|
|
|
+ // crossTab: ICostTabClass;
|
|
|
+ flowTab: any;
|
|
|
+ flowTabEx: any;
|
|
|
+ billTab: any;
|
|
|
+ crossTab: any;
|
|
|
runTimePageData: { currentPage?: number };
|
|
|
}
|
|
|
|
|
|
export interface ICurrent_DATA {
|
|
|
- discrete_data: any[]
|
|
|
+ discrete_data: any[];
|
|
|
detail_data_ex: any[];
|
|
|
- detail_data: any[]
|
|
|
+ detail_data: any[];
|
|
|
DecimalObj: {
|
|
|
- prjDecimal: any, unitDecimal: {
|
|
|
- default_decimal: number
|
|
|
- }
|
|
|
- }
|
|
|
+ prjDecimal: any;
|
|
|
+ unitDecimal: {
|
|
|
+ default_decimal: number;
|
|
|
+ };
|
|
|
+ };
|
|
|
master_data: any[];
|
|
|
master_data_ex: any[];
|
|
|
}
|
|
|
@@ -358,37 +411,35 @@ export interface IGrpPageInfo {
|
|
|
preAddPageGrpInfo: number[];
|
|
|
insertedGrpRecAmt: number;
|
|
|
group_lines_amt: number;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
-
|
|
|
export interface IRptTpl {
|
|
|
事件_集合: {
|
|
|
- type: IEvent_type
|
|
|
+ type: IEvent_type;
|
|
|
}[];
|
|
|
布局框_集合: IBandDetail[];
|
|
|
计算式_集合: IFormula[];
|
|
|
离散参数_集合: IOrgGroupField[];
|
|
|
账单式表_信息: {
|
|
|
- 离散信息: IDiscrete[]
|
|
|
+ 离散信息: IDiscrete[];
|
|
|
账单式表_数据: {
|
|
|
BandName: string;
|
|
|
- bill_field_s: Fields[];//暂定
|
|
|
+ bill_field_s: Fields[]; // 暂定
|
|
|
text: string;
|
|
|
- text_s: string[];//暂定
|
|
|
- 离散信息: IDiscrete[]
|
|
|
- }
|
|
|
+ text_s: string[]; // 暂定
|
|
|
+ 离散信息: IDiscrete[];
|
|
|
+ };
|
|
|
};
|
|
|
交叉表_信息: {
|
|
|
交叉列合计: ICrossTab;
|
|
|
交叉行拓展: ICrossTab;
|
|
|
交叉行拓展合计: ICrossTab;
|
|
|
- 交叉数据: ICrossTab;//暂定
|
|
|
+ 交叉数据: ICrossTab; // 暂定
|
|
|
交叉行: ICrossTab;
|
|
|
交叉列: ICrossTab;
|
|
|
- 交叉行AD_HOC: ICrossTab;//暂定
|
|
|
+ 交叉行AD_HOC: ICrossTab; // 暂定
|
|
|
离散信息: IDiscrete[];
|
|
|
- [key: string]: any;//暂定tabNodeName jpc_cross_tab line270
|
|
|
+ [key: string]: any; // 暂定tabNodeName jpc_cross_tab line270
|
|
|
};
|
|
|
流水式表_信息: {
|
|
|
多列显示数量: number;
|
|
|
@@ -408,12 +459,11 @@ export interface IRptTpl {
|
|
|
流水式表_列: IDiscrete;
|
|
|
流水式表_数据: IFlowData;
|
|
|
流水式表_页统计信息: IDiscrete;
|
|
|
-
|
|
|
};
|
|
|
无映射离散指标_集合: IOrgGroupField[];
|
|
|
映射数据预处理: {
|
|
|
排序方式: string;
|
|
|
- 排序键值集: any[]
|
|
|
+ 排序键值集: any[];
|
|
|
映射数据对象: string;
|
|
|
预处理类型: string;
|
|
|
}[];
|
|
|
@@ -425,29 +475,29 @@ export interface IRptTpl {
|
|
|
主数据指标_拓展集合: IOrgGroupField[];
|
|
|
从数据指标_拓展集合: IOrgGroupField[];
|
|
|
[key: string]: IOrgGroupField[];
|
|
|
- }
|
|
|
+ };
|
|
|
主信息: {
|
|
|
版本: {
|
|
|
功能版本: string;
|
|
|
主版本: string;
|
|
|
- }
|
|
|
+ };
|
|
|
报表名称: string;
|
|
|
打印页面_信息: {
|
|
|
方向: string;
|
|
|
页规格: string;
|
|
|
- cross_display_order: number
|
|
|
- }
|
|
|
+ cross_display_order: number;
|
|
|
+ };
|
|
|
单位: string;
|
|
|
页边距: IPosition;
|
|
|
- }
|
|
|
+ };
|
|
|
|
|
|
GROUP_KEY: string;
|
|
|
ID: number;
|
|
|
ID_KEY: string;
|
|
|
- style_collection?: any[]
|
|
|
- control_collection: IControlCollection
|
|
|
+ style_collection?: any[];
|
|
|
+ control_collection: IControlCollection;
|
|
|
}
|
|
|
-//以后会跟 IGroupField合并
|
|
|
+// 以后会跟 IGroupField合并
|
|
|
export interface IOrgGroupField {
|
|
|
DataType: string;
|
|
|
descr?: string;
|
|
|
@@ -456,32 +506,32 @@ export interface IOrgGroupField {
|
|
|
Name: string;
|
|
|
Title?: string;
|
|
|
Precision?: {
|
|
|
- type: string
|
|
|
- flexibleRefFieldID?: number
|
|
|
- }
|
|
|
- fixedPrecisionNum?: number
|
|
|
+ type: string;
|
|
|
+ flexibleRefFieldID?: number;
|
|
|
+ };
|
|
|
+ fixedPrecisionNum?: number;
|
|
|
flexiblePrecisionRefObj?: { [key: string]: number }[];
|
|
|
Default_Value?: string;
|
|
|
isID?: string;
|
|
|
- IDSeq: number
|
|
|
+ IDSeq: number;
|
|
|
}
|
|
|
|
|
|
export interface IDataObj {
|
|
|
DecimalObj: {
|
|
|
- prjDecimal: undefined,
|
|
|
+ prjDecimal: undefined;
|
|
|
unitDecimal: {
|
|
|
- default_decimal: 2
|
|
|
- }
|
|
|
+ default_decimal: 2;
|
|
|
+ };
|
|
|
};
|
|
|
detail_data: (number | string)[][];
|
|
|
- detail_data_ex: any[]
|
|
|
- discrete_data: string[][]
|
|
|
- master_data: any[]
|
|
|
+ detail_data_ex: any[];
|
|
|
+ discrete_data: string[][];
|
|
|
+ master_data: any[];
|
|
|
master_data_ex: any[];
|
|
|
[key: string]: any;
|
|
|
}
|
|
|
|
|
|
-//离散信息
|
|
|
+// 离散信息
|
|
|
export interface IDiscrete {
|
|
|
BandName: string;
|
|
|
discrete_field_s: Fields[];
|
|
|
@@ -500,21 +550,19 @@ export interface ICrossTab {
|
|
|
text: string;
|
|
|
CommonWidth: number;
|
|
|
}
|
|
|
-//流水式表_数据
|
|
|
+// 流水式表_数据
|
|
|
interface IFlowData {
|
|
|
BandName: string;
|
|
|
CommonHeight: number;
|
|
|
flow_field_s: Fields[];
|
|
|
CalculationType: string;
|
|
|
}
|
|
|
-//流水式表_分组信息:
|
|
|
+// 流水式表_分组信息:
|
|
|
interface IFlowGroup {
|
|
|
group_field_s: { FieldID: number }[];
|
|
|
group_lines: IGrpLine[];
|
|
|
sum_field_s: Fields[];
|
|
|
-};
|
|
|
-
|
|
|
-
|
|
|
+}
|
|
|
|
|
|
export interface IRstPage {
|
|
|
page_seq?: number;
|
|
|
@@ -528,4 +576,4 @@ export interface IMergeBand {
|
|
|
Right?: number;
|
|
|
Top?: number;
|
|
|
style?: any;
|
|
|
-}
|
|
|
+}
|