ztxkui 10.0.95 → 10.0.96

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.
Files changed (150) hide show
  1. package/dist/components/TranslationButton/DownFile.d.ts +7 -0
  2. package/dist/components/TranslationButton/DownFile.js +95 -0
  3. package/dist/components/TranslationButton/PreviewFile.d.ts +5 -0
  4. package/dist/components/TranslationButton/PreviewFile.js +73 -0
  5. package/dist/components/TranslationButton/TranslationButton.d.ts +34 -0
  6. package/dist/components/TranslationButton/TranslationButton.js +245 -0
  7. package/dist/components/TranslationButton/demoComponents/index.d.ts +3 -0
  8. package/dist/components/TranslationButton/demoComponents/index.js +9 -0
  9. package/dist/components/TranslationButton/hooks.d.ts +8 -0
  10. package/dist/components/TranslationButton/hooks.js +139 -0
  11. package/dist/components/TranslationButton/index.d.ts +4 -0
  12. package/dist/components/TranslationButton/index.js +4 -0
  13. package/dist/components/Upload/utils.d.ts +8 -1
  14. package/dist/components/Upload/utils.js +56 -4
  15. package/dist/components/UploadCustom/hooks/useDg.d.ts +6 -0
  16. package/dist/components/UploadCustom/hooks/useDg.js +55 -0
  17. package/dist/components/business/Signatures/components/CodeModal.d.ts +3 -0
  18. package/dist/components/business/Signatures/components/CodeModal.js +157 -0
  19. package/dist/components/electron-signatures/content.d.ts +9 -0
  20. package/dist/components/electron-signatures/content.js +1126 -0
  21. package/dist/components/electron-signatures/demoComponents/data.d.ts +58 -0
  22. package/dist/components/electron-signatures/demoComponents/data.js +1307 -0
  23. package/dist/components/electron-signatures/demoComponents/detail.d.ts +6 -0
  24. package/dist/components/electron-signatures/demoComponents/detail.js +283 -0
  25. package/dist/components/electron-signatures/demoComponents/index.d.ts +2 -0
  26. package/dist/components/electron-signatures/demoComponents/index.js +27 -0
  27. package/dist/components/electron-signatures/demoComponents/index_old.d.ts +3 -0
  28. package/dist/components/electron-signatures/demoComponents/index_old.js +502 -0
  29. package/dist/components/electron-signatures/demoComponents/jgqrd.d.ts +6 -0
  30. package/dist/components/electron-signatures/demoComponents/jgqrd.js +135 -0
  31. package/dist/components/electron-signatures/demoComponents/making.d.ts +6 -0
  32. package/dist/components/electron-signatures/demoComponents/making.js +211 -0
  33. package/dist/components/electron-signatures/demoComponents/makingData.d.ts +663 -0
  34. package/dist/components/electron-signatures/demoComponents/makingData.js +1164 -0
  35. package/dist/components/electron-signatures/demoComponents/newDetail.d.ts +6 -0
  36. package/dist/components/electron-signatures/demoComponents/newDetail.js +283 -0
  37. package/dist/components/electron-signatures/demoComponents/preview.d.ts +3 -0
  38. package/dist/components/electron-signatures/demoComponents/preview.js +9 -0
  39. package/dist/components/electron-signatures/demoComponents/singleQjDetail.d.ts +6 -0
  40. package/dist/components/electron-signatures/demoComponents/singleQjDetail.js +530 -0
  41. package/dist/components/electron-signatures/demoComponents/singleQjMaking.d.ts +6 -0
  42. package/dist/components/electron-signatures/demoComponents/singleQjMaking.js +219 -0
  43. package/dist/components/electron-signatures/demoComponents/test.d.ts +6 -0
  44. package/dist/components/electron-signatures/demoComponents/test.js +119 -0
  45. package/dist/components/electron-signatures/dgComponents/contract-comparison.d.ts +39 -0
  46. package/dist/components/electron-signatures/dgComponents/contract-comparison.js +53 -0
  47. package/dist/components/electron-signatures/dgComponents/file-comparison-btn.d.ts +11 -0
  48. package/dist/components/electron-signatures/dgComponents/file-comparison-btn.js +180 -0
  49. package/dist/components/electron-signatures/dgComponents/new-contract-comparison.d.ts +45 -0
  50. package/dist/components/electron-signatures/dgComponents/new-contract-comparison.js +68 -0
  51. package/dist/components/electron-signatures/dgComponents/useContractColumns.d.ts +21 -0
  52. package/dist/components/electron-signatures/dgComponents/useContractColumns.js +171 -0
  53. package/dist/components/electron-signatures/electron-signatures-fragment.d.ts +8 -0
  54. package/dist/components/electron-signatures/electron-signatures-fragment.js +344 -0
  55. package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.d.ts +52 -0
  56. package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.js +513 -0
  57. package/dist/components/electron-signatures/electronComponents/electron-seal-detail.d.ts +8 -0
  58. package/dist/components/electron-signatures/electronComponents/electron-seal-detail.js +59 -0
  59. package/dist/components/electron-signatures/electronComponents/electron-seal-download.d.ts +16 -0
  60. package/dist/components/electron-signatures/electronComponents/electron-seal-download.js +89 -0
  61. package/dist/components/electron-signatures/electronComponents/electron-seal-firstLevelPerson.d.ts +9 -0
  62. package/dist/components/electron-signatures/electronComponents/electron-seal-firstLevelPerson.js +16 -0
  63. package/dist/components/electron-signatures/electronComponents/electron-seal-item-detail.d.ts +15 -0
  64. package/dist/components/electron-signatures/electronComponents/electron-seal-item-detail.js +16 -0
  65. package/dist/components/electron-signatures/electronComponents/electron-seal-item.d.ts +20 -0
  66. package/dist/components/electron-signatures/electronComponents/electron-seal-item.js +47 -0
  67. package/dist/components/electron-signatures/electronComponents/electron-seal-list.d.ts +11 -0
  68. package/dist/components/electron-signatures/electronComponents/electron-seal-list.js +191 -0
  69. package/dist/components/electron-signatures/electronComponents/electron-seal-setting.d.ts +15 -0
  70. package/dist/components/electron-signatures/electronComponents/electron-seal-setting.js +10 -0
  71. package/dist/components/electron-signatures/electronComponents/last-qys-modal.d.ts +7 -0
  72. package/dist/components/electron-signatures/electronComponents/last-qys-modal.js +42 -0
  73. package/dist/components/electron-signatures/electronComponents/useCheckedSealInfoList.d.ts +3 -0
  74. package/dist/components/electron-signatures/electronComponents/useCheckedSealInfoList.js +43 -0
  75. package/dist/components/electron-signatures/electronComponents/useElectronColumns.d.ts +30 -0
  76. package/dist/components/electron-signatures/electronComponents/useElectronColumns.js +380 -0
  77. package/dist/components/electron-signatures/electronComponents/useFetchElectronData.d.ts +20 -0
  78. package/dist/components/electron-signatures/electronComponents/useFetchElectronData.js +167 -0
  79. package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.d.ts +3 -0
  80. package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.js +35 -0
  81. package/dist/components/electron-signatures/fileComponents/file-operation.d.ts +7 -0
  82. package/dist/components/electron-signatures/fileComponents/file-operation.js +67 -0
  83. package/dist/components/electron-signatures/fileComponents/file-type-select.d.ts +12 -0
  84. package/dist/components/electron-signatures/fileComponents/file-type-select.js +10 -0
  85. package/dist/components/electron-signatures/fileComponents/file-upload.d.ts +11 -0
  86. package/dist/components/electron-signatures/fileComponents/file-upload.js +146 -0
  87. package/dist/components/electron-signatures/fileComponents/fileUtils.d.ts +17 -0
  88. package/dist/components/electron-signatures/fileComponents/fileUtils.js +36 -0
  89. package/dist/components/electron-signatures/fileComponents/new-file-operation.d.ts +10 -0
  90. package/dist/components/electron-signatures/fileComponents/new-file-operation.js +73 -0
  91. package/dist/components/electron-signatures/fileComponents/useFetchFileTypeData.d.ts +13 -0
  92. package/dist/components/electron-signatures/fileComponents/useFetchFileTypeData.js +43 -0
  93. package/dist/components/electron-signatures/fileComponents/useFileColumns.d.ts +38 -0
  94. package/dist/components/electron-signatures/fileComponents/useFileColumns.js +329 -0
  95. package/dist/components/electron-signatures/fileComponents/useFileTypeColumns.d.ts +19 -0
  96. package/dist/components/electron-signatures/fileComponents/useFileTypeColumns.js +72 -0
  97. package/dist/components/electron-signatures/hooks/useGetQjVerifyCode.d.ts +30 -0
  98. package/dist/components/electron-signatures/hooks/useGetQjVerifyCode.js +132 -0
  99. package/dist/components/electron-signatures/hooks/useMergeRecords.d.ts +17 -0
  100. package/dist/components/electron-signatures/hooks/useMergeRecords.js +49 -0
  101. package/dist/components/electron-signatures/hooks/useParseElectronListData.d.ts +49 -0
  102. package/dist/components/electron-signatures/hooks/useParseElectronListData.js +111 -0
  103. package/dist/components/electron-signatures/hooks/useParseElectronSetting.d.ts +102 -0
  104. package/dist/components/electron-signatures/hooks/useParseElectronSetting.js +363 -0
  105. package/dist/components/electron-signatures/hooks/useParseIsNeedElectronData.d.ts +40 -0
  106. package/dist/components/electron-signatures/hooks/useParseIsNeedElectronData.js +139 -0
  107. package/dist/components/electron-signatures/hooks/useParseIsNeedQunjData.d.ts +36 -0
  108. package/dist/components/electron-signatures/hooks/useParseIsNeedQunjData.js +48 -0
  109. package/dist/components/electron-signatures/hooks/useParseQunjListData.d.ts +56 -0
  110. package/dist/components/electron-signatures/hooks/useParseQunjListData.js +204 -0
  111. package/dist/components/electron-signatures/hooks/useParseQunjSingleData.d.ts +34 -0
  112. package/dist/components/electron-signatures/hooks/useParseQunjSingleData.js +110 -0
  113. package/dist/components/electron-signatures/hooks/useParseRecords.d.ts +65 -0
  114. package/dist/components/electron-signatures/hooks/useParseRecords.js +165 -0
  115. package/dist/components/electron-signatures/index.d.ts +13 -0
  116. package/dist/components/electron-signatures/index.js +54 -0
  117. package/dist/components/electron-signatures/index_old.d.ts +9 -0
  118. package/dist/components/electron-signatures/index_old.js +966 -0
  119. package/dist/components/electron-signatures/interface.d.ts +849 -0
  120. package/dist/components/electron-signatures/interface.js +57 -0
  121. package/dist/components/electron-signatures/qunjComponents/qunj-apply.d.ts +6 -0
  122. package/dist/components/electron-signatures/qunjComponents/qunj-apply.js +8 -0
  123. package/dist/components/electron-signatures/qunjComponents/qunj-check.d.ts +21 -0
  124. package/dist/components/electron-signatures/qunjComponents/qunj-check.js +41 -0
  125. package/dist/components/electron-signatures/qunjComponents/qunj-detail.d.ts +35 -0
  126. package/dist/components/electron-signatures/qunjComponents/qunj-detail.js +267 -0
  127. package/dist/components/electron-signatures/qunjComponents/qunj-list.d.ts +24 -0
  128. package/dist/components/electron-signatures/qunjComponents/qunj-list.js +346 -0
  129. package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.d.ts +20 -0
  130. package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.js +61 -0
  131. package/dist/components/electron-signatures/qunjComponents/useQunjColumns.d.ts +36 -0
  132. package/dist/components/electron-signatures/qunjComponents/useQunjColumns.js +321 -0
  133. package/dist/components/electron-signatures/translateComponents/TranslateButton.d.ts +10 -0
  134. package/dist/components/electron-signatures/translateComponents/TranslateButton.js +44 -0
  135. package/dist/components/electron-signatures/translateComponents/useTranslateCom.d.ts +22 -0
  136. package/dist/components/electron-signatures/translateComponents/useTranslateCom.js +50 -0
  137. package/dist/components/electron-signatures/utils.d.ts +26 -0
  138. package/dist/components/electron-signatures/utils.js +67 -0
  139. package/dist/components/utils/ZtxkContext.d.ts +16 -0
  140. package/dist/components/utils/ZtxkContext.js +4 -0
  141. package/dist/components/utils/useMemoizedFn.d.ts +6 -0
  142. package/dist/components/utils/useMemoizedFn.js +22 -0
  143. package/dist/components/utils/usePrevious.d.ts +3 -0
  144. package/dist/components/utils/usePrevious.js +13 -0
  145. package/dist/index.css +686 -0
  146. package/dist/index.css.map +1 -1
  147. package/dist/index.d.ts +3 -0
  148. package/dist/index.js +105 -87
  149. package/dist/request.js +1 -1
  150. package/package.json +4 -3
@@ -105,9 +105,16 @@ export function fileBatchDownload(fileList, otherConfig) {
105
105
  otherParams: otherParams,
106
106
  };
107
107
  }
108
- export function sealFileBatchDownload(request, params, isCompress, scmServiceName) {
109
- if (isCompress === void 0) { isCompress = true; }
108
+ export function sealFileBatchDownload(request, params, options, scmServiceName) {
109
+ var _a;
110
+ if (options === void 0) { options = true; }
110
111
  if (scmServiceName === void 0) { scmServiceName = '/zmdms-scm-system'; }
112
+ // 兼容旧签名:第3个参数既支持 boolean(旧用法)也支持 options 对象
113
+ var isCompress = typeof options === 'boolean' ? options : (_a = options === null || options === void 0 ? void 0 : options.isCompress) !== null && _a !== void 0 ? _a : true;
114
+ var isWater = typeof options === 'boolean' ? false : options === null || options === void 0 ? void 0 : options.isWater;
115
+ var downloadCallback = isWater
116
+ ? sealWaterDownloadFileCallBack
117
+ : sealDownloadFileCallBack;
111
118
  var otherParams = {
112
119
  status: 'pending',
113
120
  };
@@ -115,7 +122,7 @@ export function sealFileBatchDownload(request, params, isCompress, scmServiceNam
115
122
  if (Array.isArray(fileList) && fileList.length > 0) {
116
123
  if (isCompress) {
117
124
  // 下载打包成PDF的文件。
118
- sealDownloadFileCallBack(request, params, {
125
+ downloadCallback(request, params, {
119
126
  callbackAfter: function () {
120
127
  otherParams.status = 'fulfilled';
121
128
  },
@@ -134,8 +141,10 @@ export function sealFileBatchDownload(request, params, isCompress, scmServiceNam
134
141
  var newParams = {
135
142
  docAttachMap: params.docAttachMap,
136
143
  qysAttachVOList: [fileItem],
144
+ watermarkOrganizationType: params.watermarkOrganizationType,
145
+ watermarkOrganizationId: params.watermarkOrganizationId,
137
146
  };
138
- sealDownloadFileCallBack(request, newParams, {
147
+ downloadCallback(request, newParams, {
139
148
  callbackAfter: function () {
140
149
  fileItem._downloadStatus = 'fulfilled';
141
150
  if (otherParams.otherList) {
@@ -249,3 +258,46 @@ export function sealDownloadFileCallBack(request, params, otherOption, scmServic
249
258
  callbackError && callbackError();
250
259
  });
251
260
  }
261
+ /**
262
+ * 批量下载盖章件水印
263
+ */
264
+ export function sealWaterDownloadFileCallBack(request, params, otherOption, scmServiceName) {
265
+ if (scmServiceName === void 0) { scmServiceName = '/zmdms-scm-system'; }
266
+ var _a = otherOption || {}, callbackAfter = _a.callbackAfter, callbackError = _a.callbackError;
267
+ request({
268
+ method: 'POST',
269
+ url: "/api" + scmServiceName + "/seal/batch-download-seal-files-water-mark",
270
+ responseType: 'blob',
271
+ data: params,
272
+ })
273
+ .then(function (res) {
274
+ var _a, _b, _c;
275
+ if (!((_a = res.headers) === null || _a === void 0 ? void 0 : _a['content-disposition'])) {
276
+ callbackError && callbackError();
277
+ message.warning('没有可下载的内容');
278
+ return;
279
+ }
280
+ var fileName = res.headers['content-disposition'].split(';');
281
+ var fileNameArray = (_b = fileName[1]) === null || _b === void 0 ? void 0 : _b.split('=');
282
+ var fileNameStr = decodeURIComponent(fileNameArray[1]);
283
+ var blob = new Blob([res.data], {
284
+ type: 'application/vnd.ms-excel',
285
+ });
286
+ if (blob.size < 1) {
287
+ callbackError && callbackError();
288
+ message.warning('下载失败,下载的内容为空!');
289
+ return;
290
+ }
291
+ var aLink = document.createElement('a');
292
+ aLink.style.display = 'none';
293
+ aLink.href = window.URL.createObjectURL(blob);
294
+ aLink.download = (_c = fileNameStr === null || fileNameStr === void 0 ? void 0 : fileNameStr.replace) === null || _c === void 0 ? void 0 : _c.call(fileNameStr, /["]/g, '');
295
+ document.body.appendChild(aLink);
296
+ aLink.click();
297
+ document.body.removeChild(aLink);
298
+ callbackAfter && callbackAfter();
299
+ })
300
+ .catch(function (err) {
301
+ callbackError && callbackError();
302
+ });
303
+ }
@@ -0,0 +1,6 @@
1
+ export default function useDg(request: any): {
2
+ /** 开始比对 */
3
+ compareHandle: (templateId: string, fileId: string) => any;
4
+ /** 查看比对结果 */
5
+ lookCompareHandle: (taskId: string) => any;
6
+ };
@@ -0,0 +1,55 @@
1
+ import i18next from 'ztxkutils/dist/i18next';
2
+ import { message } from '../../../index';
3
+ import { useCallback } from 'react';
4
+ export default function useDg(request) {
5
+ // 开始比对
6
+ var compareHandle = useCallback(function (templateId, fileId) {
7
+ return request === null || request === void 0 ? void 0 : request({
8
+ url: "/api/zmdms-resource/seal/create-compare-task/" + templateId + "/" + fileId,
9
+ method: 'GET',
10
+ }).then(function (res) {
11
+ if (res.status === 200 && res.data.code === 200) {
12
+ message.success(i18next.t('操作成功'));
13
+ return res;
14
+ }
15
+ else {
16
+ message.error(res.data.msg || i18next.t('出错了'));
17
+ return Promise.reject(res.data.msg || i18next.t('出错了'));
18
+ }
19
+ }).catch(function (error) {
20
+ var _a, _b, _c, _d;
21
+ message.error(((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) || i18next.t('请求失败!'));
22
+ return Promise.reject(((_d = (_c = error === null || error === void 0 ? void 0 : error.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.msg) || i18next.t('请求失败!'));
23
+ });
24
+ }, [request]);
25
+ // 查看比对结果
26
+ var lookCompareHandle = useCallback(function (taskId) {
27
+ return request === null || request === void 0 ? void 0 : request({
28
+ url: "/api/zmdms-resource/seal/query-compare-task/" + taskId,
29
+ method: 'GET',
30
+ }).then(function (res) {
31
+ var _a;
32
+ if (res.status === 200 && res.data.code === 200) {
33
+ if ((_a = res.data.data[0]) === null || _a === void 0 ? void 0 : _a.url) {
34
+ // 比对文件预览
35
+ window.open(res.data.data[0].url);
36
+ }
37
+ else {
38
+ message.info(i18next.t('文件比对中,请稍后再试!'));
39
+ }
40
+ }
41
+ else {
42
+ message.error(res.data.msg || i18next.t('出错了'));
43
+ }
44
+ }).catch(function (error) {
45
+ var _a, _b;
46
+ message.error(((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) || i18next.t('请求失败!'));
47
+ });
48
+ }, [request]);
49
+ return {
50
+ /** 开始比对 */
51
+ compareHandle: compareHandle,
52
+ /** 查看比对结果 */
53
+ lookCompareHandle: lookCompareHandle,
54
+ };
55
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<unknown>>>;
3
+ export default _default;
@@ -0,0 +1,157 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (_) try {
28
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
48
+ import i18next from 'ztxkutils/dist/i18next';
49
+ import React, { useState, useMemo, memo, forwardRef, useImperativeHandle, } from 'react';
50
+ import { Modal, ProForm, Input, message } from '../../../../index';
51
+ import { useForm } from '../../../ProForm';
52
+ var CodeModal = function (props, ref) {
53
+ var details = props.details, request = props.request;
54
+ var _a = useState(false), visible = _a[0], setVisible = _a[1];
55
+ var _b = useState(), code = _b[0], setCode = _b[1];
56
+ var form = useForm()[0];
57
+ var items = useMemo(function () {
58
+ return [
59
+ {
60
+ name: 'title',
61
+ label: i18next.t('流程标题'),
62
+ isRequired: true,
63
+ width: 'halfAll',
64
+ render: function () {
65
+ return React.createElement(Input, { placeholder: i18next.t('请输入流程标题') });
66
+ },
67
+ },
68
+ {
69
+ name: 'formNo',
70
+ label: i18next.t('流程ID'),
71
+ isRequired: true,
72
+ width: 'halfAll',
73
+ render: function () {
74
+ return React.createElement(Input, { placeholder: i18next.t('请输入流程ID') });
75
+ },
76
+ },
77
+ {
78
+ name: 'applicantEmpNumber',
79
+ label: i18next.t('用印人工号'),
80
+ isRequired: true,
81
+ width: 'halfAll',
82
+ render: function () {
83
+ return React.createElement(Input, { placeholder: i18next.t('请输入用印人工号') });
84
+ },
85
+ },
86
+ ];
87
+ }, []);
88
+ var onCancel = function () {
89
+ setVisible(false);
90
+ };
91
+ var onOk = function () { return __awaiter(void 0, void 0, void 0, function () {
92
+ var params, result, data, err_1;
93
+ var _a, _b;
94
+ return __generator(this, function (_c) {
95
+ switch (_c.label) {
96
+ case 0:
97
+ _c.trys.push([0, 2, , 3]);
98
+ return [4 /*yield*/, form.validateFields()];
99
+ case 1:
100
+ _c.sent();
101
+ params = form.getFieldsValue();
102
+ if (Array.isArray(details)) {
103
+ result = details.map(function (item) {
104
+ return {
105
+ sealNo: item.sealNo,
106
+ sealCount: item.sealCount,
107
+ };
108
+ });
109
+ data = __assign(__assign({}, params), {
110
+ // 20240407 添加工号参数(额外参数)
111
+ fingerNo: params.applicantEmpNumber, details: result });
112
+ request({
113
+ url: '/api/zmdms-resource/seal/get-verify-code',
114
+ method: 'POST',
115
+ data: data,
116
+ })
117
+ .then(function (res) {
118
+ var _a, _b;
119
+ if (res.status === 200 && res.data.code === 200) {
120
+ setCode((_a = res.data.data) === null || _a === void 0 ? void 0 : _a.vertifyCode);
121
+ message.info(i18next.t('验证码已获取成功'));
122
+ }
123
+ else {
124
+ message.error(((_b = res === null || res === void 0 ? void 0 : res.data) === null || _b === void 0 ? void 0 : _b.msg) || i18next.t('获取验证码失败'));
125
+ }
126
+ })
127
+ .catch(function (err) {
128
+ var _a, _b;
129
+ console.log(err);
130
+ message.error(((_b = (_a = err.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) || i18next.t('获取验证码失败'));
131
+ });
132
+ }
133
+ return [3 /*break*/, 3];
134
+ case 2:
135
+ err_1 = _c.sent();
136
+ console.log(err_1);
137
+ message.error((_b = (_a = err_1 === null || err_1 === void 0 ? void 0 : err_1.errorFields) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.errors[0]);
138
+ return [3 /*break*/, 3];
139
+ case 3: return [2 /*return*/];
140
+ }
141
+ });
142
+ }); };
143
+ useImperativeHandle(ref, function () {
144
+ return {
145
+ open: function (params) {
146
+ setVisible(true);
147
+ form.setFieldsValue(params);
148
+ },
149
+ };
150
+ });
151
+ return (React.createElement(Modal, { visible: visible, loading: false, width: "70%", title: i18next.t('信息补充'), onCancel: onCancel, onOk: onOk },
152
+ React.createElement(ProForm, { form: form, items: items }),
153
+ React.createElement("p", null,
154
+ i18next.t('验证码:'),
155
+ code)));
156
+ };
157
+ export default memo(forwardRef(CodeModal));
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { IElectronSignaturesProps } from './interface';
3
+ interface IElectronSignaturesContext {
4
+ isQjVerifyCode?: boolean;
5
+ isNewQys?: boolean;
6
+ }
7
+ export declare const ElectronSignaturesContext: React.Context<IElectronSignaturesContext>;
8
+ declare const _default: React.NamedExoticComponent<IElectronSignaturesProps>;
9
+ export default _default;