ztxkui 10.0.59 → 10.0.61

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
  // 关联导出
@@ -136,12 +136,6 @@ function Table(props) {
136
136
  // 内部分页相关配置
137
137
  var _k = useInnerPagination(showInnerPagination, defaultInnerPageSize), paginationConfig = _k.paginationConfig, currentPage = _k.currentPage, setCurrent = _k.setCurrent, pageSize = _k.pageSize;
138
138
  var rowSelectionDataSource = useRef({});
139
- var myScroll = useMemo(function () {
140
- if (scroll) {
141
- return isFlex ? __assign(__assign({}, scroll), { y: scroll.y || 200 }) : scroll;
142
- }
143
- return isFlex ? __assign(__assign({}, _scroll), { y: 200 }) : _scroll;
144
- }, [scroll, isFlex]);
145
139
  var expandableDataSource = useMemo(function () {
146
140
  var _a, _b, _c, _d;
147
141
  var data = [];
@@ -711,6 +705,19 @@ function Table(props) {
711
705
  var isVirtialInit = useRef(true);
712
706
  var _o = useState(), virtual = _o[0], setVirtual = _o[1];
713
707
  var _p = useState(), virtualY = _p[0], setVirtialY = _p[1];
708
+ var myScroll = useMemo(function () {
709
+ var myScroll = {};
710
+ if (scroll) {
711
+ myScroll = isFlex ? __assign(__assign({}, scroll), { y: scroll.y || 200 }) : scroll;
712
+ }
713
+ else {
714
+ myScroll = isFlex ? __assign(__assign({}, _scroll), { y: 200 }) : _scroll;
715
+ }
716
+ if (virtual) {
717
+ myScroll.y = myScroll.y || 200;
718
+ }
719
+ return myScroll;
720
+ }, [scroll, isFlex, virtual]);
714
721
  useEffect(function () {
715
722
  if (onEditableSave)
716
723
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkui",
3
- "version": "10.0.59",
3
+ "version": "10.0.61",
4
4
  "private": false,
5
5
  "description": "React components library",
6
6
  "author": "zt-front-end",