ztxkui 4.2.23-338 → 4.2.23-338-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DemoCom/PrintContainerDemo.js +8 -7
- package/dist/UI/Table/DefaultTable.js +2 -4
- package/dist/UI/Table/data.d.ts +8 -0
- package/dist/UI/Table/data.js +26 -0
- package/dist/components/PrintContainer/print.d.ts +78 -0
- package/dist/components/PrintContainer/print.js +696 -0
- package/dist/components/Table/hooks/useSelectSubtotal.js +90 -84
- package/dist/components/Table/utils/dom.js +1 -1
- package/dist/components/electron-signatures/demoComponents/index.js +26 -27
- package/dist/components/electron-signatures/index.js +32 -16
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/package.json +5 -3
|
@@ -110,11 +110,7 @@ var PrintContainerDemo = function () {
|
|
|
110
110
|
};
|
|
111
111
|
}, []);
|
|
112
112
|
console.log(dayjs().format('MMDDHHmmss'));
|
|
113
|
-
return (React.createElement(PrintContainer
|
|
114
|
-
// isAddExportPage={true}
|
|
115
|
-
// loading={loading}
|
|
116
|
-
, {
|
|
117
|
-
// isAddExportPage={true}
|
|
113
|
+
return (React.createElement(PrintContainer, { isAddExportPage: true,
|
|
118
114
|
// loading={loading}
|
|
119
115
|
request: request, deptId: "1514842459376930817", flowId: "scm_print_thd", fileId: "1551733945007517697",
|
|
120
116
|
// // keywordList={keywordList}
|
|
@@ -147,7 +143,12 @@ var PrintContainerDemo = function () {
|
|
|
147
143
|
// deptId="1295909543961944065"
|
|
148
144
|
// flowId="scm_print_tdtd"
|
|
149
145
|
// showAboutExport
|
|
150
|
-
showPrintBtn: true, showPluginPrintBtn: true },
|
|
151
|
-
|
|
146
|
+
showPrintBtn: true, showPluginPrintBtn: true }, Array(2)
|
|
147
|
+
.fill(1)
|
|
148
|
+
.map(function (item, index) {
|
|
149
|
+
return (React.createElement("div", null,
|
|
150
|
+
React.createElement(Tidan, { title: index + '', key: index }),
|
|
151
|
+
React.createElement("div", { className: "print-page-break-after" })));
|
|
152
|
+
})));
|
|
152
153
|
};
|
|
153
154
|
export default PrintContainerDemo;
|
|
@@ -228,7 +228,7 @@ export default function DefaultTable() {
|
|
|
228
228
|
var _c = useRememberCheckData(handleRef), checkedData = _c.checkedData, setCheckedData = _c.setCheckedData, selections = _c.selections, changeCheckedDataHandle = _c.changeCheckedDataHandle;
|
|
229
229
|
useEffect(function () {
|
|
230
230
|
setTimeout(function () {
|
|
231
|
-
setData(data1
|
|
231
|
+
setData(data1);
|
|
232
232
|
}, 300);
|
|
233
233
|
}, []);
|
|
234
234
|
return (React.createElement(React.Fragment, null,
|
|
@@ -242,9 +242,7 @@ export default function DefaultTable() {
|
|
|
242
242
|
// 是否开启动态列配置
|
|
243
243
|
showColumnDynamic: true,
|
|
244
244
|
// 动态列配置必须参数,唯一的键值
|
|
245
|
-
showColumnDynamicKey: "single-local-key-001",
|
|
246
|
-
// virtualTableKey="test1"
|
|
247
|
-
scroll: { y: 300 },
|
|
245
|
+
showColumnDynamicKey: "single-local-key-001", virtualTableKey: "test1", scroll: { y: 300 },
|
|
248
246
|
// pagination={{
|
|
249
247
|
// onChange: (pagination) => {
|
|
250
248
|
// setKey(pagination);
|
package/dist/UI/Table/data.d.ts
CHANGED
|
@@ -5,6 +5,14 @@ export declare const data1: {
|
|
|
5
5
|
test5: number;
|
|
6
6
|
test3: string;
|
|
7
7
|
test61: string;
|
|
8
|
+
children: {
|
|
9
|
+
id: string;
|
|
10
|
+
test1: number;
|
|
11
|
+
test2: number;
|
|
12
|
+
test5: number;
|
|
13
|
+
test3: string;
|
|
14
|
+
test61: string;
|
|
15
|
+
}[];
|
|
8
16
|
}[];
|
|
9
17
|
export declare const data2: {
|
|
10
18
|
id: string;
|
package/dist/UI/Table/data.js
CHANGED
|
@@ -6,6 +6,32 @@ export var data1 = new Array(500).fill(1).map(function (item, index) {
|
|
|
6
6
|
test5: index,
|
|
7
7
|
test3: '144,855.00',
|
|
8
8
|
test61: index % 2 === 0 ? null : "test61-" + index,
|
|
9
|
+
children: [
|
|
10
|
+
{
|
|
11
|
+
id: "id-" + index + "-1",
|
|
12
|
+
test1: index % 2 === 0 ? null : 10,
|
|
13
|
+
test2: index + 100,
|
|
14
|
+
test5: index,
|
|
15
|
+
test3: '144,855.00',
|
|
16
|
+
test61: index % 2 === 0 ? null : "test61-" + index,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: "id-" + index + "-2",
|
|
20
|
+
test1: index % 2 === 0 ? null : 10,
|
|
21
|
+
test2: index + 100,
|
|
22
|
+
test5: index,
|
|
23
|
+
test3: '144,855.00',
|
|
24
|
+
test61: index % 2 === 0 ? null : "test61-" + index,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: "id-" + index + "-3",
|
|
28
|
+
test1: index % 2 === 0 ? null : 10,
|
|
29
|
+
test2: index + 100,
|
|
30
|
+
test5: index,
|
|
31
|
+
test3: '144,855.00',
|
|
32
|
+
test61: index % 2 === 0 ? null : "test61-" + index,
|
|
33
|
+
},
|
|
34
|
+
],
|
|
9
35
|
};
|
|
10
36
|
});
|
|
11
37
|
export var data2 = new Array(29).fill(1).map(function (item, index) {
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author 陈亚雄
|
|
3
|
+
* @description 打印相关方法
|
|
4
|
+
*/
|
|
5
|
+
import { jsPDF } from 'jspdf';
|
|
6
|
+
/**
|
|
7
|
+
* 添加水印
|
|
8
|
+
*/
|
|
9
|
+
export declare function addWaterHandle({ waterText, waterClassName, }?: {
|
|
10
|
+
waterText?: string;
|
|
11
|
+
waterClassName?: string[];
|
|
12
|
+
isPrintWater?: boolean;
|
|
13
|
+
}): void;
|
|
14
|
+
export declare function removeWaterHandle(): void;
|
|
15
|
+
/**
|
|
16
|
+
* 打印页面
|
|
17
|
+
* hiddenClassNames 需要隐藏的样式 默认有hiddenPrint
|
|
18
|
+
*/
|
|
19
|
+
interface IParams {
|
|
20
|
+
/** 需要隐藏的样式类名 ['.test', '.test1] */
|
|
21
|
+
hiddenClassNames?: string[];
|
|
22
|
+
}
|
|
23
|
+
export declare function printCurrentDom({ hiddenClassNames }?: IParams): void;
|
|
24
|
+
export declare function htmlToPdf({ pageClassName, dom, pdfName, isShowPage, noWater, pdfOptions, imgPositionX, waterText, }: {
|
|
25
|
+
pageClassName?: string;
|
|
26
|
+
dom: HTMLElement;
|
|
27
|
+
pdfName: string;
|
|
28
|
+
isShowPage?: boolean;
|
|
29
|
+
noWater?: boolean;
|
|
30
|
+
pdfOptions?: any;
|
|
31
|
+
imgPositionX?: number;
|
|
32
|
+
waterText?: string;
|
|
33
|
+
}): Promise<jsPDF>;
|
|
34
|
+
export declare function htmlToPdfUseCanvas({ pageClassName, dom, pdfName, isShowPage, isOnlyOne, noWater, pdfOptions, imgPositionX, isDownload, isAutoPageCount, }: {
|
|
35
|
+
pageClassName?: string;
|
|
36
|
+
dom: HTMLElement;
|
|
37
|
+
pdfName: string;
|
|
38
|
+
isShowPage?: boolean;
|
|
39
|
+
isOnlyOne?: boolean;
|
|
40
|
+
noWater?: boolean;
|
|
41
|
+
pdfOptions?: any;
|
|
42
|
+
imgPositionX?: number;
|
|
43
|
+
isDownload?: boolean;
|
|
44
|
+
isAutoPageCount?: boolean;
|
|
45
|
+
}): Promise<{
|
|
46
|
+
pdfs: any;
|
|
47
|
+
pdfBase64: any;
|
|
48
|
+
}>;
|
|
49
|
+
export interface IPdfOption {
|
|
50
|
+
/** 是否压缩 */
|
|
51
|
+
compress?: boolean;
|
|
52
|
+
/** pdf 横向 还是 纵向 */
|
|
53
|
+
pageOrient?: 'p' | 'portrait' | 'l' | 'landscape';
|
|
54
|
+
/** 格式 */
|
|
55
|
+
pageFormat?: string;
|
|
56
|
+
/** 左右边距 */
|
|
57
|
+
pageMarginX?: number;
|
|
58
|
+
/** 上下边距 */
|
|
59
|
+
pageMarginY?: number;
|
|
60
|
+
}
|
|
61
|
+
export declare function htmlToPdfNoCanvas({ pageClassName, dom, isShowPage, fileBinary, pdfName, isDownload, pdfOption, isAddWater, waterBase64, imgWidth, imgHeight, isCompress, waterText, }: {
|
|
62
|
+
pageClassName?: string;
|
|
63
|
+
dom: HTMLElement;
|
|
64
|
+
isShowPage?: boolean;
|
|
65
|
+
fileBinary: any;
|
|
66
|
+
pdfName?: string;
|
|
67
|
+
isDownload?: boolean;
|
|
68
|
+
pdfOption?: IPdfOption;
|
|
69
|
+
/** 是否添加水印 */
|
|
70
|
+
isAddWater?: boolean;
|
|
71
|
+
/** 水印base 64字符串 */
|
|
72
|
+
waterBase64?: string;
|
|
73
|
+
imgWidth?: number;
|
|
74
|
+
imgHeight?: number;
|
|
75
|
+
isCompress?: boolean;
|
|
76
|
+
waterText?: string;
|
|
77
|
+
}): Promise<unknown>;
|
|
78
|
+
export {};
|