ztxkui 10.0.58 → 10.0.60

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.
@@ -85,6 +85,7 @@ export interface IProps {
85
85
  aboutExportAddWater?: boolean;
86
86
  buttonRender?: any;
87
87
  isPhone?: boolean;
88
+ isNeedSeal?: boolean;
88
89
  }
89
90
  declare const PrintContainer: React.FC<IProps>;
90
91
  export default PrintContainer;
@@ -83,9 +83,9 @@ var EXPORT_PDF_PAGEFORMAT = [595.28, 841.89]; // [632.28, 841.89]
83
83
  var EXPORT_PDF_PAGEFORMATL = [841.89, 595.28]; // [595.28, 641.89]
84
84
  var PrintContainer = function (_a) {
85
85
  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, _j = _a.showPluginPrintBtn, showPluginPrintBtn = _j === void 0 ? true : _j, isUseXy = _a.isUseXy, localKey = _a.localKey, _k = _a.showExportBtn, showExportBtn = _k === void 0 ? true : _k, showSetFontBtn = _a.showSetFontBtn, isSetPosition = _a.isSetPosition, // 默认不需要偏移
86
- showAddSeal = _a.showAddSeal, apiUrl = _a.apiUrl, defaultAddWater = _a.defaultAddWater, fileBaseUrl = _a.fileBaseUrl, ecPrintFn = _a.ecPrintFn, ecPrintCreatePdfHandleAfter = _a.ecPrintCreatePdfHandleAfter, clickCreatePdfHandlePre = _a.clickCreatePdfHandlePre, clickCreatePdfHandleNext = _a.clickCreatePdfHandleNext, handleRef = _a.handleRef, showAboutExport = _a.showAboutExport, isAboutExportSeal = _a.isAboutExportSeal, onAboutExportBeforeCallback = _a.onAboutExportBeforeCallback, showAboutExportMessage = _a.showAboutExportMessage, onAboutExportCallback = _a.onAboutExportCallback, aboutExportZipName = _a.aboutExportZipName, aboutExportAddWater = _a.aboutExportAddWater, buttonRender = _a.buttonRender, isPhone = _a.isPhone, showWaterBtn = _a.showWaterBtn;
86
+ showAddSeal = _a.showAddSeal, apiUrl = _a.apiUrl, defaultAddWater = _a.defaultAddWater, fileBaseUrl = _a.fileBaseUrl, ecPrintFn = _a.ecPrintFn, ecPrintCreatePdfHandleAfter = _a.ecPrintCreatePdfHandleAfter, clickCreatePdfHandlePre = _a.clickCreatePdfHandlePre, clickCreatePdfHandleNext = _a.clickCreatePdfHandleNext, handleRef = _a.handleRef, showAboutExport = _a.showAboutExport, isAboutExportSeal = _a.isAboutExportSeal, onAboutExportBeforeCallback = _a.onAboutExportBeforeCallback, showAboutExportMessage = _a.showAboutExportMessage, onAboutExportCallback = _a.onAboutExportCallback, aboutExportZipName = _a.aboutExportZipName, aboutExportAddWater = _a.aboutExportAddWater, buttonRender = _a.buttonRender, isPhone = _a.isPhone, showWaterBtn = _a.showWaterBtn, isNeedSeal = _a.isNeedSeal;
87
87
  var printContainer = React.useContext(ZtxkContext).printContainer;
88
- if (!printContainer.print) {
88
+ if (!(printContainer === null || printContainer === void 0 ? void 0 : printContainer.print)) {
89
89
  showHandSeal = false;
90
90
  showAutoSeal = false;
91
91
  }
@@ -111,7 +111,11 @@ var PrintContainer = function (_a) {
111
111
  console.log(err);
112
112
  }
113
113
  }, [isPhone]);
114
- var _q = useGetSealList(request, { deptId: deptId, flowId: flowId }, { sealIdList: sealIdList, isFetch: showAutoSeal || showHandSeal }), loadSealPromise = _q.loadSealPromise, _sealIdList = _q._sealIdList, autoSealList = _q.autoSealList, sealFileIdList = _q.sealFileIdList, isAutoSeal = _q.isAutoSeal;
114
+ var _q = useGetSealList(request, { deptId: deptId, flowId: flowId },
115
+ // 这里是否发请求获取印章列表信息逻辑做下改动。
116
+ // 之前只要有自动盖章按钮、手动盖章按钮的时候才发送请求获取印章信息
117
+ // 这里多添加一个条件 如果添加盖章按钮时,也获取印章信息
118
+ { sealIdList: sealIdList, isFetch: showAutoSeal || showHandSeal || isNeedSeal }), loadSealPromise = _q.loadSealPromise, _sealIdList = _q._sealIdList, autoSealList = _q.autoSealList, sealFileIdList = _q.sealFileIdList, isAutoSeal = _q.isAutoSeal;
115
119
  var _r = useAddSealImg(loadSealPromise, sealFileIdList, apiUrl, onMouseDown), showSeal = _r.showSeal, onAddSeal = _r.onAddSeal, removeSealHandle = _r.removeSealHandle;
116
120
  var fontLoadHandle = useFont(showHandSeal || showAutoSeal || showAboutExport).fontLoadHandle;
117
121
  // 关联导出
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  export interface IZtxkConfig {
3
- apiBaseUrl: string;
3
+ apiBaseUrl?: string;
4
4
  fileBaseUrl?: string;
5
5
  /** 是否通过外部传入值开启打印契约锁 */
6
- printContainer: {
6
+ printContainer?: {
7
7
  print: boolean;
8
8
  };
9
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkui",
3
- "version": "10.0.58",
3
+ "version": "10.0.60",
4
4
  "private": false,
5
5
  "description": "React components library",
6
6
  "author": "zt-front-end",