ztxkui 4.1.7 → 4.1.9
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.
|
@@ -134,7 +134,7 @@ var PrintContainerDemo = function () {
|
|
|
134
134
|
React.createElement("td", null, "\u7A0E\u53F7"),
|
|
135
135
|
React.createElement("td", { colSpan: 3 }, "9111000071092227XH"),
|
|
136
136
|
React.createElement("td", null, "\u5730\u5740\u53CA\u7535\u8BDD"),
|
|
137
|
-
React.createElement("td", { colSpan: 3 }, "\
|
|
137
|
+
React.createElement("td", { colSpan: 3 }, "\u798F\u5EFA\u7701\u5B81\u5FB7\u5E02\u798F\u9F0E\u5E02\u51B6\u91D1\u5DE5\u4E1A\u533A0593-7957777"),
|
|
138
138
|
React.createElement("td", { width: "100px" }, "\u9500\u552E\u5408\u540C\u53F7"),
|
|
139
139
|
React.createElement("td", { colSpan: 3 }, "SC2208010002")),
|
|
140
140
|
React.createElement("tr", null,
|
|
@@ -179,6 +179,46 @@ var PrintContainerDemo = function () {
|
|
|
179
179
|
React.createElement("td", null, "12.00"),
|
|
180
180
|
React.createElement("td", null, "\u5426"),
|
|
181
181
|
React.createElement("td", null, "\u5426")),
|
|
182
|
+
React.createElement("tr", null,
|
|
183
|
+
React.createElement("td", { colSpan: 4 }, "\u91CD\u8F68 50MN \u6CB3\u5317\u6C38\u6D0B"),
|
|
184
|
+
React.createElement("td", null, "BN2207210002"),
|
|
185
|
+
React.createElement("td", null, "0"),
|
|
186
|
+
React.createElement("td", null, "1.000000"),
|
|
187
|
+
React.createElement("td", null, "0"),
|
|
188
|
+
React.createElement("td", null, "0.000000"),
|
|
189
|
+
React.createElement("td", null, "12.00"),
|
|
190
|
+
React.createElement("td", null, "\u5426"),
|
|
191
|
+
React.createElement("td", null, "\u5426")),
|
|
192
|
+
React.createElement("tr", null,
|
|
193
|
+
React.createElement("td", { colSpan: 4 }, "\u91CD\u8F68 50MN \u6CB3\u5317\u6C38\u6D0B"),
|
|
194
|
+
React.createElement("td", null, "BN2207140002"),
|
|
195
|
+
React.createElement("td", null, "0"),
|
|
196
|
+
React.createElement("td", null, "10.000000"),
|
|
197
|
+
React.createElement("td", null, "0"),
|
|
198
|
+
React.createElement("td", null, "0.000000"),
|
|
199
|
+
React.createElement("td", null, "12.00"),
|
|
200
|
+
React.createElement("td", null, "\u5426"),
|
|
201
|
+
React.createElement("td", null, "\u5426")),
|
|
202
|
+
React.createElement("tr", null,
|
|
203
|
+
React.createElement("td", { colSpan: 4 }, "\u91CD\u8F68 50MN \u6CB3\u5317\u6C38\u6D0B"),
|
|
204
|
+
React.createElement("td", null, "BN2207210002"),
|
|
205
|
+
React.createElement("td", null, "0"),
|
|
206
|
+
React.createElement("td", null, "1.000000"),
|
|
207
|
+
React.createElement("td", null, "0"),
|
|
208
|
+
React.createElement("td", null, "0.000000"),
|
|
209
|
+
React.createElement("td", null, "12.00"),
|
|
210
|
+
React.createElement("td", null, "\u5426"),
|
|
211
|
+
React.createElement("td", null, "\u5426")),
|
|
212
|
+
React.createElement("tr", null,
|
|
213
|
+
React.createElement("td", { colSpan: 4 }, "\u91CD\u8F68 50MN \u6CB3\u5317\u6C38\u6D0B"),
|
|
214
|
+
React.createElement("td", null, "BN2207140002"),
|
|
215
|
+
React.createElement("td", null, "0"),
|
|
216
|
+
React.createElement("td", null, "10.000000"),
|
|
217
|
+
React.createElement("td", null, "0"),
|
|
218
|
+
React.createElement("td", null, "0.000000"),
|
|
219
|
+
React.createElement("td", null, "12.00"),
|
|
220
|
+
React.createElement("td", null, "\u5426"),
|
|
221
|
+
React.createElement("td", null, "\u5426")),
|
|
182
222
|
React.createElement("tr", null,
|
|
183
223
|
React.createElement("td", { colSpan: 4, align: "left", style: { padding: '0px 30px' } }, "\u5408\u8BA1"),
|
|
184
224
|
React.createElement("td", null),
|
|
@@ -72,7 +72,7 @@ export function htmlToPdfNoCanvas(_a) {
|
|
|
72
72
|
allDom = dom.querySelectorAll(pageClassName ? pageClassName : '.html2canvas-container-page');
|
|
73
73
|
pageFormat = (pdfOption === null || pdfOption === void 0 ? void 0 : pdfOption.pageFormat) ? pdfOption.pageFormat : 'a4';
|
|
74
74
|
pageOrient = (pdfOption === null || pdfOption === void 0 ? void 0 : pdfOption.pageOrient) ? pdfOption.pageOrient : 'p';
|
|
75
|
-
pageMarginX = (_b = pdfOption === null || pdfOption === void 0 ? void 0 : pdfOption.pageMarginX) !== null && _b !== void 0 ? _b :
|
|
75
|
+
pageMarginX = (_b = pdfOption === null || pdfOption === void 0 ? void 0 : pdfOption.pageMarginX) !== null && _b !== void 0 ? _b : 20;
|
|
76
76
|
pageMarginY = (_c = pdfOption === null || pdfOption === void 0 ? void 0 : pdfOption.pageMarginY) !== null && _c !== void 0 ? _c : 10;
|
|
77
77
|
pdfOptions = {
|
|
78
78
|
// 是否压缩生成的PDF
|
|
@@ -83,7 +83,8 @@ export function htmlToPdfNoCanvas(_a) {
|
|
|
83
83
|
// 方向 纵向 'p' 横向 'l'
|
|
84
84
|
orientation: pageOrient,
|
|
85
85
|
// 指定坐标时要使用的测量单位
|
|
86
|
-
unit: 'px',
|
|
86
|
+
// unit: 'px',
|
|
87
|
+
unit: 'pt',
|
|
87
88
|
};
|
|
88
89
|
// 如果需要分页
|
|
89
90
|
if (allDom.length > 0 && isShowPage) {
|
|
@@ -75,7 +75,12 @@ var fontTTF = {
|
|
|
75
75
|
var loadFontTTFPromise = null;
|
|
76
76
|
var loadFontTTFMaxNum = 3;
|
|
77
77
|
var loadFontTTFNum = 0;
|
|
78
|
-
|
|
78
|
+
// a4纸 标准大小 pt 595.28 841.89
|
|
79
|
+
// mm 210 297
|
|
80
|
+
var PAGEFORMAT = [1050, 1050]; // [1050, 1050]
|
|
81
|
+
var PAGEFORMATL = [1050, 829]; // [1050, 829]
|
|
82
|
+
var EXPORT_PDF_PAGEFORMAT = [595.28, 841.89]; // [632.28, 841.89]
|
|
83
|
+
var EXPORT_PDF_PAGEFORMATL = [841.89, 595.28]; // [595.28, 641.89]
|
|
79
84
|
var loadSealPromise = null;
|
|
80
85
|
// 字体文件下载
|
|
81
86
|
function downloadFontTTF(_a) {
|
|
@@ -1028,7 +1033,7 @@ var PrintContainer = function (_a) {
|
|
|
1028
1033
|
onPdfHandle({
|
|
1029
1034
|
pdfOptions: {
|
|
1030
1035
|
orientation: 'l',
|
|
1031
|
-
format:
|
|
1036
|
+
format: EXPORT_PDF_PAGEFORMATL,
|
|
1032
1037
|
},
|
|
1033
1038
|
imgPositionX: 30,
|
|
1034
1039
|
});
|
|
@@ -1037,7 +1042,7 @@ var PrintContainer = function (_a) {
|
|
|
1037
1042
|
onPdfHandle({
|
|
1038
1043
|
pdfOptions: {
|
|
1039
1044
|
orientation: 'p',
|
|
1040
|
-
format:
|
|
1045
|
+
format: EXPORT_PDF_PAGEFORMAT,
|
|
1041
1046
|
},
|
|
1042
1047
|
});
|
|
1043
1048
|
}
|
|
@@ -1050,7 +1055,7 @@ var PrintContainer = function (_a) {
|
|
|
1050
1055
|
onExportSealFileHandle({
|
|
1051
1056
|
pdfOptions: {
|
|
1052
1057
|
orientation: 'l',
|
|
1053
|
-
format:
|
|
1058
|
+
format: PAGEFORMATL,
|
|
1054
1059
|
},
|
|
1055
1060
|
}, true);
|
|
1056
1061
|
}
|
|
@@ -1058,7 +1063,7 @@ var PrintContainer = function (_a) {
|
|
|
1058
1063
|
onExportSealFileHandle({
|
|
1059
1064
|
pdfOptions: {
|
|
1060
1065
|
orientation: 'l',
|
|
1061
|
-
format:
|
|
1066
|
+
format: PAGEFORMATL,
|
|
1062
1067
|
},
|
|
1063
1068
|
}, false);
|
|
1064
1069
|
}
|
|
@@ -1076,7 +1081,7 @@ var PrintContainer = function (_a) {
|
|
|
1076
1081
|
onSurePositionHandle({
|
|
1077
1082
|
pdfOptions: {
|
|
1078
1083
|
orientation: 'l',
|
|
1079
|
-
format:
|
|
1084
|
+
format: PAGEFORMATL,
|
|
1080
1085
|
},
|
|
1081
1086
|
});
|
|
1082
1087
|
}
|
|
@@ -1098,7 +1103,7 @@ var PrintContainer = function (_a) {
|
|
|
1098
1103
|
onAutoSealHandle({
|
|
1099
1104
|
pdfOptions: {
|
|
1100
1105
|
orientation: 'l',
|
|
1101
|
-
format:
|
|
1106
|
+
format: PAGEFORMATL,
|
|
1102
1107
|
},
|
|
1103
1108
|
});
|
|
1104
1109
|
}
|
package/dist/constants.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
|
|
1
|
+
export declare const token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRfaWQiOiIwMDAwMDAiLCJtZW1iZXJfdHlwZSI6MSwiaGFuZGxlX2hyX3Bob25lIjpudWxsLCJyZXN1bWVfZGF0ZSI6bnVsbCwidXNlcl9uYW1lIjoi546L5aWVIiwiZW1wX25hbWUiOm51bGwsImVtcF9udW1iZXIiOm51bGwsImltdF9pZCI6IiIsInJlYWxfbmFtZSI6IueOi-WllSIsImNsaWVudF90eXBlIjoid2ViIiwiZGF0YV9yb2xlX2lkIjoiMTM0MzQ5MDY4NjI2MDIyODA5NyIsImNsaWVudF9pZCI6InN3b3JkIiwidXNlcl90eXBlIjoid2ViIiwicm9sZV9pZCI6IjExMjM1OTg4MTY3Mzg2NzUyMDEsMTM0MzQ5MDQyNTAwMTIyNjI0MiIsInBvc3RfbmFtZSI6bnVsbCwic2NvcGUiOlsiYWxsIl0sImludGVydmlld19pZCI6IiIsImV4cCI6MTY3MDIyNjIyOCwib3JnX25hbWUiOm51bGwsImp0aSI6IjVkNGM4N2RhLWI5YmUtNGJjOC1hMGE0LTBiMDcwYTU1NTFmNSIsIm1lbWJlcl9pZCI6IjEiLCJjb21wYW55X2lkIjoiIiwic3lzdGVtX2lkIjpudWxsLCJkZXB0X25hbWUiOm51bGwsImF2YXRhciI6IiIsImRhdGFfcm9sZV9uYW1lIjoibnVsbCIsImF1dGhvcml0aWVzIjpbIuWGheWLpCIsImFkbWluaXN0cmF0b3IiXSwicm9sZV9uYW1lIjoiYWRtaW5pc3RyYXRvcizlhoXli6QiLCJyZXN1bWVfdGVtcGxhdGUiOm51bGwsImxpY2Vuc2UiOiJwb3dlcmVkIGJ5IHptZG1zIiwicG9zdF9pZCI6IiIsInVzZXJfaWQiOiIxMzQ0MDk5MjA2MzI4MzU2ODY1Iiwib3JnX2lkIjoiIiwibmlja19uYW1lIjoi546L5aWVIiwiY29tcGFueV9uYW1lIjpudWxsLCJkZXB0X2lkIjoiIiwiaGFuZGxlX2hyX25hbWUiOm51bGwsImFjY291bnQiOiLnjovlpZUiLCJyZXN1bWVfaWQiOiIifQ.ETarIGEBuVINLd4kTeMMp1RO2QuxGaHhHRsspM0yiPI";
|
package/dist/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export var token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
|
|
1
|
+
export var token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRfaWQiOiIwMDAwMDAiLCJtZW1iZXJfdHlwZSI6MSwiaGFuZGxlX2hyX3Bob25lIjpudWxsLCJyZXN1bWVfZGF0ZSI6bnVsbCwidXNlcl9uYW1lIjoi546L5aWVIiwiZW1wX25hbWUiOm51bGwsImVtcF9udW1iZXIiOm51bGwsImltdF9pZCI6IiIsInJlYWxfbmFtZSI6IueOi-WllSIsImNsaWVudF90eXBlIjoid2ViIiwiZGF0YV9yb2xlX2lkIjoiMTM0MzQ5MDY4NjI2MDIyODA5NyIsImNsaWVudF9pZCI6InN3b3JkIiwidXNlcl90eXBlIjoid2ViIiwicm9sZV9pZCI6IjExMjM1OTg4MTY3Mzg2NzUyMDEsMTM0MzQ5MDQyNTAwMTIyNjI0MiIsInBvc3RfbmFtZSI6bnVsbCwic2NvcGUiOlsiYWxsIl0sImludGVydmlld19pZCI6IiIsImV4cCI6MTY3MDIyNjIyOCwib3JnX25hbWUiOm51bGwsImp0aSI6IjVkNGM4N2RhLWI5YmUtNGJjOC1hMGE0LTBiMDcwYTU1NTFmNSIsIm1lbWJlcl9pZCI6IjEiLCJjb21wYW55X2lkIjoiIiwic3lzdGVtX2lkIjpudWxsLCJkZXB0X25hbWUiOm51bGwsImF2YXRhciI6IiIsImRhdGFfcm9sZV9uYW1lIjoibnVsbCIsImF1dGhvcml0aWVzIjpbIuWGheWLpCIsImFkbWluaXN0cmF0b3IiXSwicm9sZV9uYW1lIjoiYWRtaW5pc3RyYXRvcizlhoXli6QiLCJyZXN1bWVfdGVtcGxhdGUiOm51bGwsImxpY2Vuc2UiOiJwb3dlcmVkIGJ5IHptZG1zIiwicG9zdF9pZCI6IiIsInVzZXJfaWQiOiIxMzQ0MDk5MjA2MzI4MzU2ODY1Iiwib3JnX2lkIjoiIiwibmlja19uYW1lIjoi546L5aWVIiwiY29tcGFueV9uYW1lIjpudWxsLCJkZXB0X2lkIjoiIiwiaGFuZGxlX2hyX25hbWUiOm51bGwsImFjY291bnQiOiLnjovlpZUiLCJyZXN1bWVfaWQiOiIifQ.ETarIGEBuVINLd4kTeMMp1RO2QuxGaHhHRsspM0yiPI';
|