ztxkui 3.6.13 → 3.6.14
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.
|
@@ -94,25 +94,25 @@ function downloadFontTTF(_a) {
|
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
var PrintContainer = function (_a) {
|
|
97
|
-
var children = _a.children, waterText = _a.waterText, onFonsizeChange = _a.onFonsizeChange, hiddenClassName = _a.hiddenClassName, _b = _a.isAddExportPage, isAddExportPage = _b === void 0 ? false : _b, _c = _a.loading, loading = _c === void 0 ? false : _c, _d = _a.pdfName, pdfName = _d === void 0 ? 'pdf文件' : _d, request = _a.request, sealIdList = _a.sealIdList, _e = _a.showHandSeal, showHandSeal = _e === void 0 ? true : _e, _f = _a.showAutoSeal, showAutoSeal = _f === void 0 ? true : _f, _g = _a.needWatermark, needWatermark = _g === void 0 ? 0 : _g, fileId = _a.fileId, deptId = _a.deptId, flowId = _a.flowId, imgWaterBg = _a.imgWaterBg, onPrintCallback = _a.onPrintCallback, showPrintMessage = _a.showPrintMessage, onPrintBeforeCallback = _a.onPrintBeforeCallback, _h = _a.showPrintBtn, showPrintBtn = _h === void 0 ? true : _h, isUseXy = _a.isUseXy, localKey = _a.localKey, _j = _a.showExportBtn, showExportBtn = _j === void 0 ? true : _j, showSetFontBtn = _a.showSetFontBtn;
|
|
98
|
-
var
|
|
97
|
+
var children = _a.children, waterText = _a.waterText, onFonsizeChange = _a.onFonsizeChange, hiddenClassName = _a.hiddenClassName, _b = _a.isAddExportPage, isAddExportPage = _b === void 0 ? false : _b, _c = _a.loading, loading = _c === void 0 ? false : _c, _d = _a.pdfName, pdfName = _d === void 0 ? 'pdf文件' : _d, request = _a.request, sealIdList = _a.sealIdList, _e = _a.showHandSeal, showHandSeal = _e === void 0 ? true : _e, _f = _a.showAutoSeal, showAutoSeal = _f === void 0 ? true : _f, _g = _a.needWatermark, needWatermark = _g === void 0 ? 0 : _g, fileId = _a.fileId, deptId = _a.deptId, flowId = _a.flowId, imgWaterBg = _a.imgWaterBg, onPrintCallback = _a.onPrintCallback, showPrintMessage = _a.showPrintMessage, onPrintBeforeCallback = _a.onPrintBeforeCallback, _h = _a.showPrintBtn, showPrintBtn = _h === void 0 ? true : _h, isUseXy = _a.isUseXy, localKey = _a.localKey, _j = _a.showExportBtn, showExportBtn = _j === void 0 ? true : _j, showSetFontBtn = _a.showSetFontBtn, _k = _a.isSetPosition, isSetPosition = _k === void 0 ? true : _k;
|
|
98
|
+
var _l = useState(false), showWater = _l[0], setShowWater = _l[1];
|
|
99
99
|
var containerRef = useRef();
|
|
100
100
|
var allDomRef = useRef();
|
|
101
|
-
var
|
|
101
|
+
var _m = useState(false), spinning = _m[0], setSpinning = _m[1];
|
|
102
102
|
// 确认盖章后,会得到一个合同id 这个之后盖章要用
|
|
103
|
-
var
|
|
103
|
+
var _o = useState(), currentContractId = _o[0], setCurrentContractId = _o[1];
|
|
104
104
|
// 盖章后会得到一个预览地址,这个地址耀保存,同一个合同id,不能重复盖章接口
|
|
105
|
-
var
|
|
105
|
+
var _p = useState(), currentViewUrl = _p[0], setCurrentViewUrl = _p[1];
|
|
106
106
|
// 收到盖章-印章列表
|
|
107
|
-
var
|
|
107
|
+
var _q = useState(), _sealIdList = _q[0], setSealIdList = _q[1];
|
|
108
108
|
// 自动盖章-印章列表
|
|
109
|
-
var
|
|
109
|
+
var _r = useState(), autoSealList = _r[0], setAutoSealList = _r[1];
|
|
110
110
|
// 边距调整相关
|
|
111
|
-
var
|
|
112
|
-
var
|
|
111
|
+
var _s = useState(false), visible = _s[0], setVisible = _s[1];
|
|
112
|
+
var _t = useState({
|
|
113
113
|
top: 0,
|
|
114
114
|
left: 0,
|
|
115
|
-
}), value =
|
|
115
|
+
}), value = _t[0], setValue = _t[1];
|
|
116
116
|
useEffect(function () {
|
|
117
117
|
var v = getPositionLocal(localKey);
|
|
118
118
|
setValue(v);
|
|
@@ -487,7 +487,9 @@ var PrintContainer = function (_a) {
|
|
|
487
487
|
}); };
|
|
488
488
|
function createPdf() {
|
|
489
489
|
setTimeout(function () {
|
|
490
|
-
|
|
490
|
+
if (isSetPosition) {
|
|
491
|
+
setPositionDom(setPositionDeviation(value));
|
|
492
|
+
}
|
|
491
493
|
htmlToPdfNoCanvas({
|
|
492
494
|
dom: containerRef.current,
|
|
493
495
|
fileBinary: fontTTF,
|
|
@@ -562,7 +564,9 @@ var PrintContainer = function (_a) {
|
|
|
562
564
|
};
|
|
563
565
|
function surePdfLoad() {
|
|
564
566
|
setTimeout(function () {
|
|
565
|
-
|
|
567
|
+
if (isSetPosition) {
|
|
568
|
+
setPositionDom(setPositionDeviation(value));
|
|
569
|
+
}
|
|
566
570
|
htmlToPdfNoCanvas({
|
|
567
571
|
dom: containerRef.current,
|
|
568
572
|
isShowPage: isAddExportPage,
|
|
@@ -719,7 +723,9 @@ var PrintContainer = function (_a) {
|
|
|
719
723
|
};
|
|
720
724
|
function pdfLoad() {
|
|
721
725
|
setTimeout(function () {
|
|
722
|
-
|
|
726
|
+
if (isSetPosition) {
|
|
727
|
+
setPositionDom(setPositionDeviation(value));
|
|
728
|
+
}
|
|
723
729
|
htmlToPdfNoCanvas({
|
|
724
730
|
dom: containerRef.current,
|
|
725
731
|
isShowPage: isAddExportPage,
|