ydb-components-material 0.1.127 → 0.1.128

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 (64) hide show
  1. package/build/docs/404.html +3 -3
  2. package/build/docs/_demos/:uuid +3 -3
  3. package/build/docs/colorful-button.html +3 -3
  4. package/build/docs/colorful-input.html +3 -3
  5. package/build/docs/index.html +3 -3
  6. package/build/docs/static/delete.b9f9b4ed.svg +1 -0
  7. package/build/docs/{umi.814d7acd.js → umi.02097956.js} +1 -1
  8. package/build/docs/{umi.57dda8ea.css → umi.d0b733b1.css} +1 -1
  9. package/build/docs/~demos/:uuid.html +3 -3
  10. package/build/docs/~demos/colorful-button-demo.html +3 -3
  11. package/build/docs/~demos/colorful-input-demo.html +3 -3
  12. package/build/lowcode/3.js +2 -2
  13. package/build/lowcode/4.js +1 -1
  14. package/build/lowcode/5.js +1 -1
  15. package/build/lowcode/assets-daily.json +11 -11
  16. package/build/lowcode/assets-dev.json +2 -2
  17. package/build/lowcode/assets-prod.json +11 -11
  18. package/build/lowcode/index.js +1 -1
  19. package/build/lowcode/meta.js +1 -1
  20. package/build/lowcode/preview.js +9 -9
  21. package/build/lowcode/render/default/1.js +2 -2
  22. package/build/lowcode/render/default/2.js +1 -1
  23. package/build/lowcode/render/default/3.js +1 -1
  24. package/build/lowcode/render/default/view.css +1 -1
  25. package/build/lowcode/render/default/view.js +17 -17
  26. package/build/lowcode/view.css +1 -1
  27. package/build/lowcode/view.js +17 -17
  28. package/dist/1.js +2 -2
  29. package/dist/2.js +1 -1
  30. package/dist/3.js +1 -1
  31. package/dist/BizComps.css +1 -1
  32. package/dist/BizComps.js +10 -10
  33. package/dist/BizComps.js.map +1 -1
  34. package/es/components/file-list/checkPoint.js +26 -3
  35. package/es/components/file-list/checkPoint.scss +103 -112
  36. package/es/components/file-list/icon/delete.svg +1 -0
  37. package/es/components/file-list/item.js +67 -33
  38. package/es/components/file-list/signerInfo.js +36 -8
  39. package/es/components/file-list/signerInfo.scss +10 -0
  40. package/es/components/sign-file/index.d.ts +1 -0
  41. package/es/components/sign-file/index.js +127 -25
  42. package/lib/components/file-list/checkPoint.js +26 -3
  43. package/lib/components/file-list/checkPoint.scss +103 -112
  44. package/lib/components/file-list/icon/delete.svg +1 -0
  45. package/lib/components/file-list/item.js +67 -33
  46. package/lib/components/file-list/signerInfo.js +36 -8
  47. package/lib/components/file-list/signerInfo.scss +10 -0
  48. package/lib/components/sign-file/index.d.ts +1 -0
  49. package/lib/components/sign-file/index.js +126 -25
  50. package/lowcode_es/meta.js +1 -1
  51. package/lowcode_lib/meta.js +1 -1
  52. package/package.json +3 -3
  53. package/es/components/sign-file/seal.d.ts +0 -3
  54. package/es/components/sign-file/seal.js +0 -220
  55. package/es/components/sign-file/sealUtil.js +0 -252
  56. package/es/components/sign-file/sign.d.ts +0 -3
  57. package/es/components/sign-file/sign.js +0 -136
  58. package/es/components/sign-file/signUtil.js +0 -367
  59. package/lib/components/sign-file/seal.d.ts +0 -3
  60. package/lib/components/sign-file/seal.js +0 -226
  61. package/lib/components/sign-file/sealUtil.js +0 -254
  62. package/lib/components/sign-file/sign.d.ts +0 -3
  63. package/lib/components/sign-file/sign.js +0 -142
  64. package/lib/components/sign-file/signUtil.js +0 -369
@@ -1,16 +1,17 @@
1
1
  import _Loading from "@alifd/next/es/loading";
2
+ import _Dialog from "@alifd/next/es/dialog";
2
3
  import _Message from "@alifd/next/es/message";
3
4
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
5
+ import _extends from "@babel/runtime/helpers/extends";
4
6
  import _regeneratorRuntime from "@babel/runtime/regenerator";
5
- import React, { useState, useEffect } from 'react';
7
+ import React, { useState, useEffect, useRef } from 'react';
6
8
  import previewIcon from "./icon/preview.svg";
7
9
  import downloadIcon from "./icon/download.svg";
8
10
  import fileIcon from "./icon/file.svg";
9
11
  import closeIcon from "./icon/close.svg";
10
- // import SignPage from './sign';
11
- // import SealPage from './seal';
12
12
  import SignPage from "../file-list/sign";
13
13
  import SealPage from "../file-list/seal";
14
+ import { querySeal } from "../file-list/sealUtil";
14
15
  import { getGuideImg, getUrlById, onlinePreview } from "../../api";
15
16
  import { getFileExtension } from "./file.js";
16
17
  import "./index.scss";
@@ -28,7 +29,8 @@ var SignFile = function SignFile(_ref) {
28
29
  isPC = _ref.isPC,
29
30
  style = _ref.style,
30
31
  download = _ref.download,
31
- valChange = _ref.valChange;
32
+ valChange = _ref.valChange,
33
+ applySeal = _ref.applySeal;
32
34
  var fileName = file.fileName,
33
35
  fileUrl = file.fileUrl,
34
36
  fileId = file.fileId,
@@ -64,6 +66,10 @@ var SignFile = function SignFile(_ref) {
64
66
  var _useState9 = useState(),
65
67
  sealedFile = _useState9[0],
66
68
  setSealedFile = _useState9[1];
69
+ var _useState0 = useState(false),
70
+ hasSigned = _useState0[0],
71
+ setHasSigned = _useState0[1];
72
+ var fileCopy = useRef(_extends({}, file));
67
73
 
68
74
  // 预览材料
69
75
  var preview = /*#__PURE__*/function () {
@@ -286,32 +292,127 @@ var SignFile = function SignFile(_ref) {
286
292
  }();
287
293
 
288
294
  // 手写签批
289
- var sign = function sign() {
295
+ var sign = function sign(fromSeal) {
296
+ if (fromSeal === void 0) {
297
+ fromSeal = false;
298
+ }
299
+ if (!fromSeal) setSealedFile(undefined);
290
300
  setLoading(true);
291
301
  setIsShowSignPage(true);
292
302
  };
293
303
 
294
304
  // 签章
295
- var seal = function seal() {
296
- // 如果不需要签章 就直接去签字
297
- if (!signContent.includes(SEAL)) {
298
- sign();
299
- return;
300
- }
301
- console.log('fileType', fileType);
302
- var type = getFileExtension(fileName);
303
- if (type !== 'pdf') {
304
- _Message.notice('只有pdf文件才能使用电子签章');
305
- return;
306
- }
307
- setLoading(true);
308
- setIsShowSealPage(true);
309
- };
305
+ var seal = /*#__PURE__*/function () {
306
+ var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
307
+ var type, sealList;
308
+ return _regeneratorRuntime.wrap(function (_context5) {
309
+ while (1) switch (_context5.prev = _context5.next) {
310
+ case 0:
311
+ setSealedFile(undefined);
312
+ // 如果不需要签章 就直接去签字
313
+ if (signContent.includes(SEAL)) {
314
+ _context5.next = 1;
315
+ break;
316
+ }
317
+ sign();
318
+ return _context5.abrupt("return");
319
+ case 1:
320
+ console.log('fileType', fileType);
321
+ type = getFileExtension(fileName);
322
+ if (!(type !== 'pdf')) {
323
+ _context5.next = 2;
324
+ break;
325
+ }
326
+ _Message.notice('只有pdf文件才能使用电子签章');
327
+ return _context5.abrupt("return");
328
+ case 2:
329
+ _context5.next = 3;
330
+ return querySeal(userInfo, {
331
+ token: token,
332
+ tokenTY: tokenTY,
333
+ baseUrl: baseUrl,
334
+ env: env,
335
+ isPC: isPC,
336
+ accessToken: accessToken
337
+ });
338
+ case 3:
339
+ sealList = _context5.sent;
340
+ if (!(userInfo.corpType === 'C04')) {
341
+ _context5.next = 4;
342
+ break;
343
+ }
344
+ if (sealList.length) {
345
+ // 有印章 → 对话框提示,可跳过走签批
346
+ _Dialog.confirm({
347
+ title: '提示',
348
+ footerAlign: 'center',
349
+ content: '本份材料可豁免签章流程,完成电子签名即可,是否确认跳过签章?',
350
+ okProps: {
351
+ children: '继续签章'
352
+ },
353
+ cancelProps: {
354
+ children: '跳过签章'
355
+ },
356
+ onOk: function onOk() {
357
+ setIsShowSealPage(true);
358
+ },
359
+ onCancel: function onCancel() {
360
+ sign();
361
+ },
362
+ onClose: function onClose() {
363
+ setLoading(false);
364
+ }
365
+ });
366
+ } else {
367
+ // 无印章 → 对话框提示,可申请印章或跳过走签批
368
+ _Dialog.confirm({
369
+ title: '提示',
370
+ content: '经检测,本账户暂未申请企业印章,办理时可选择跳过签章流程完成签名;也可办好印章后再来办理此项业务',
371
+ footerAlign: 'center',
372
+ okProps: {
373
+ children: '申请印章'
374
+ },
375
+ cancelProps: {
376
+ children: '跳过签章'
377
+ },
378
+ onOk: function onOk() {
379
+ applySeal();
380
+ },
381
+ onCancel: function onCancel() {
382
+ sign();
383
+ },
384
+ onClose: function onClose() {
385
+ setLoading(false);
386
+ }
387
+ });
388
+ }
389
+ return _context5.abrupt("return");
390
+ case 4:
391
+ if (sealList.length) {
392
+ _context5.next = 5;
393
+ break;
394
+ }
395
+ _Message.error('该单位下暂无印章,请前往"山西政务服务网"或"三晋通"小程序申领印章');
396
+ return _context5.abrupt("return");
397
+ case 5:
398
+ setLoading(true);
399
+ setIsShowSealPage(true);
400
+ case 6:
401
+ case "end":
402
+ return _context5.stop();
403
+ }
404
+ }, _callee5);
405
+ }));
406
+ return function seal() {
407
+ return _ref6.apply(this, arguments);
408
+ };
409
+ }();
310
410
 
311
- // 获取签pi结果
411
+ // 获取签批结果
312
412
  var getRes = function getRes(val) {
313
413
  console.log('signVal---', val);
314
414
  valChange(val);
415
+ setHasSigned(true);
315
416
  };
316
417
 
317
418
  // 获取签章结果
@@ -320,9 +421,10 @@ var SignFile = function SignFile(_ref) {
320
421
  // 如果还允许签批 就连住一起做了
321
422
  if (signatureEnable) {
322
423
  setSealedFile(val);
323
- sign();
424
+ sign(true);
324
425
  } else {
325
426
  valChange(val);
427
+ setHasSigned(true);
326
428
  }
327
429
  };
328
430
  useEffect(function () {
@@ -384,7 +486,7 @@ var SignFile = function SignFile(_ref) {
384
486
  }), "\u4E0B\u8F7D")), isShowSignPage && /*#__PURE__*/React.createElement(SignPage, {
385
487
  isShowSignPage: isShowSignPage,
386
488
  userInfo: userInfo,
387
- file: sealedFile || file,
489
+ file: sealedFile || fileCopy.current,
388
490
  token: token,
389
491
  tokenTY: tokenTY,
390
492
  baseUrl: baseUrl,
@@ -402,7 +504,7 @@ var SignFile = function SignFile(_ref) {
402
504
  showClose: false,
403
505
  isShowSealPage: isShowSealPage,
404
506
  userInfo: userInfo,
405
- file: file,
507
+ file: fileCopy.current,
406
508
  token: token,
407
509
  tokenTY: tokenTY,
408
510
  baseUrl: baseUrl,
@@ -447,7 +549,7 @@ var SignFile = function SignFile(_ref) {
447
549
  }))), /*#__PURE__*/React.createElement("div", {
448
550
  className: "sign_btn",
449
551
  onClick: seal
450
- }, "\u7B7E\u7F72\u6587\u4EF6")));
552
+ }, hasSigned ? '重新签署' : '签署文件')));
451
553
  };
452
554
  SignFile.displayName = 'SignFile';
453
555
  export default SignFile;
@@ -23,7 +23,11 @@ function CheckPoint(props) {
23
23
  var _useState4 = (0, _react.useState)(0),
24
24
  pageHeight = _useState4[0],
25
25
  setPageHeight = _useState4[1];
26
+ var _useState5 = (0, _react.useState)(0),
27
+ containerHeight = _useState5[0],
28
+ setContainerHeight = _useState5[1];
26
29
  var imgRef = (0, _react.useRef)();
30
+ var containerRef = (0, _react.useRef)();
27
31
  var initData = function initData() {
28
32
  var fileUrl = checkPointData.fileUrl,
29
33
  _checkPointData$annot = checkPointData.annotations,
@@ -96,8 +100,27 @@ function CheckPoint(props) {
96
100
  initData();
97
101
  }
98
102
  }, [checkPointData]);
99
- return /*#__PURE__*/_react.React.createElement("div", null, /*#__PURE__*/_react.React.createElement("div", {
100
- className: "keyPoint-container"
103
+
104
+ // 计算容器高度:从自身顶部到视口底部
105
+ (0, _react.useEffect)(function () {
106
+ var calcHeight = function calcHeight() {
107
+ if (containerRef.current) {
108
+ var rect = containerRef.current.getBoundingClientRect();
109
+ setContainerHeight(window.innerHeight - rect.top);
110
+ }
111
+ };
112
+ calcHeight();
113
+ window.addEventListener('resize', calcHeight);
114
+ return function () {
115
+ return window.removeEventListener('resize', calcHeight);
116
+ };
117
+ }, []);
118
+ return /*#__PURE__*/_react.React.createElement("div", {
119
+ className: "keyPoint-container",
120
+ ref: containerRef,
121
+ style: {
122
+ height: containerHeight || '100vh'
123
+ }
101
124
  }, /*#__PURE__*/_react.React.createElement("div", {
102
125
  className: "tipDot-content",
103
126
  style: {
@@ -155,5 +178,5 @@ function CheckPoint(props) {
155
178
  style: {
156
179
  height: ((_resultData$at2 = resultData.at(-1)) === null || _resultData$at2 === void 0 ? void 0 : _resultData$at2.page) * pageHeight + 'px'
157
180
  }
158
- })));
181
+ }));
159
182
  }
@@ -1,120 +1,111 @@
1
1
  .keyPoint-container {
2
- // position: sticky;
3
- height: 100vh;
4
- // margin-top: -56px;
5
- width: 100vw;
6
- position: fixed;
7
- z-index: 999;
8
- left: 0;
9
- top: 0;
10
- background: #919191;
11
- overflow-y: scroll;
12
- #file_check_point {
13
- overflow: visible !important;
14
- overflow-clip-margin: unset !important;
15
- }
16
- .tipDot-content{
17
- // height: 100vh;
18
- width: 100%;
19
- position: absolute;
20
- top: 0;
21
- left: 0;
22
- // overflow: scroll;
23
- .tip-item{
24
- position: absolute;
25
- border-radius: 2px;
26
- border: 1px solid #15BC83;
27
- background: rgba(21, 188, 131, 0.1);
28
- &.active {
29
- background: rgba(247, 98, 93, 0.1);
30
- border: 1px solid #F7625D;
31
- }
32
- .num{
33
- width: 20px;
34
- height: 20px;
35
- border-radius: 50%;
36
- font-size: 10px;
37
- display: flex;
38
- justify-content: center;
39
- align-items: center;
40
- color: #ffffff;
41
- margin-left: -20px;
42
- background: #15BC83;
43
- &.active {
44
- background: #F7625D;
45
- }
46
- }
47
- }
48
-
49
- }
50
- .result-outter {
51
- box-sizing: border-box;
52
- padding: 0 24px;
53
- // border: 1px solid red;
54
- position: fixed;
55
2
  width: 100%;
56
- bottom: 65px;
57
- left: 0;
58
- .result-card {
59
- border-radius: 10px;
60
- padding: 16px;
61
- background: #ffffff;
62
- border: 1px solid #ddd;
63
- box-shadow: 0px 4px 10px 0px rgba(177, 188, 200, 0.25);
64
- .result-title {
65
- color: #333;
66
- font-size: 14px;
67
- margin-bottom: 8px;
68
- }
69
- .result-info{
70
- font-size: 14px;
71
- margin-bottom: 10px;
72
- display: flex;
73
- justify-content: flex-start;
74
- align-items: center;
75
- gap: 5px;
76
- // 提示类型: error/judge/pass
77
- .result-text{
3
+ background: #919191;
4
+ overflow-y: scroll;
5
+ #file_check_point {
6
+ overflow: visible !important;
7
+ overflow-clip-margin: unset !important;
8
+ }
9
+ .tipDot-content{
10
+ // height: 100vh;
11
+ width: 100%;
12
+ position: absolute;
13
+ top: 0;
14
+ left: 0;
15
+ // overflow: scroll;
16
+ .tip-item{
17
+ position: absolute;
18
+ border-radius: 2px;
19
+ border: 1px solid #15BC83;
20
+ background: rgba(21, 188, 131, 0.1);
21
+ &.active {
22
+ background: rgba(247, 98, 93, 0.1);
23
+ border: 1px solid #F7625D;
24
+ }
25
+ .num{
26
+ width: 20px;
27
+ height: 20px;
28
+ border-radius: 50%;
29
+ font-size: 10px;
30
+ display: flex;
31
+ justify-content: center;
32
+ align-items: center;
33
+ color: #ffffff;
34
+ margin-left: -20px;
35
+ background: #15BC83;
36
+ &.active {
37
+ background: #F7625D;
38
+ }
78
39
  }
79
40
  }
41
+
80
42
  }
43
+ .result-outter {
44
+ box-sizing: border-box;
45
+ padding: 0 24px;
46
+ // border: 1px solid red;
47
+ position: fixed;
48
+ width: 100%;
49
+ bottom: 65px;
50
+ left: 0;
51
+ .result-card {
52
+ border-radius: 10px;
53
+ padding: 16px;
54
+ background: #ffffff;
55
+ border: 1px solid #ddd;
56
+ box-shadow: 0px 4px 10px 0px rgba(177, 188, 200, 0.25);
57
+ .result-title {
58
+ color: #333;
59
+ font-size: 14px;
60
+ margin-bottom: 8px;
61
+ }
62
+ .result-info{
63
+ font-size: 14px;
64
+ margin-bottom: 10px;
65
+ display: flex;
66
+ justify-content: flex-start;
67
+ align-items: center;
68
+ gap: 5px;
69
+ // 提示类型: error/judge/pass
70
+ }
71
+ }
81
72
 
82
- }
83
- .bottom-btn {
84
- box-sizing: border-box;
85
- position: fixed;
86
- bottom: 0;
87
- left: 0;
88
- width: 100%;
89
- background-color: #fff;
90
- padding: 11px 0;
91
- display: flex;
92
- box-shadow: 0px 2px 16px 0px rgba(0, 0, 0, 0.1);
93
- z-index: 200;
94
- .btn {
95
- margin: 0 10px;
96
- flex: 1;
97
- color: #323233;
98
- background-color: #fff;
99
- border-color: #ebedf0;
100
- border-width: 1px;
101
- border-style: solid;
102
- border-radius: 100px;
103
- padding: 0 12px;
104
- font-size: 14px;
105
- height: 40px;
106
- position: relative;
107
- align-items: center;
108
- justify-content: center;
109
- display: flex;
110
- flex-direction: row;
111
- box-sizing: border-box;
112
- flex-direction: row;
113
73
  }
114
- .btn-blue {
115
- color: white;
116
- border-width: 0px;
117
- background-image: linear-gradient(rgb(22, 120, 255), rgb(118, 173, 250));
118
- }
74
+ .bottom-btn {
75
+ box-sizing: border-box;
76
+ position: fixed;
77
+ bottom: 0;
78
+ left: 0;
79
+ width: 100%;
80
+ background-color: #fff;
81
+ padding: 11px 0;
82
+ display: flex;
83
+ box-shadow: 0px 2px 16px 0px rgba(0, 0, 0, 0.1);
84
+ z-index: 200;
85
+ .btn {
86
+ margin: 0 10px;
87
+ flex: 1;
88
+ color: #323233;
89
+ background-color: #fff;
90
+ border-color: #ebedf0;
91
+ border-width: 1px;
92
+ border-style: solid;
93
+ border-radius: 100px;
94
+ padding: 0 12px;
95
+ font-size: 14px;
96
+ height: 40px;
97
+ position: relative;
98
+ align-items: center;
99
+ justify-content: center;
100
+ display: flex;
101
+ flex-direction: row;
102
+ box-sizing: border-box;
103
+ flex-direction: row;
104
+ }
105
+ .btn-blue {
106
+ color: white;
107
+ border-width: 0px;
108
+ background-image: linear-gradient(rgb(22, 120, 255), rgb(118, 173, 250));
109
+ }
110
+ }
119
111
  }
120
- }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="master_svg0_1260_69365"><rect x="0" y="0" width="16" height="16" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_1260_69365)"><path d="M3.1666667,4.0016272375L2.5,4.0016272375C2.22385764,4.0016272375,2,3.7777693375,2,3.5016272375C2,3.2254849375,2.22385764,3.0016271375,2.5,3.0016271375L13.5,3.0016271375C13.776142,3.0016271375,14,3.2254849375,14,3.5016272375C14,3.7777693375,13.776142,4.0016272375,13.5,4.0016272375L4.1666663,4.0016272375L4.1666663,12.8349589375C4.166667,13.2951979375,4.5397627,13.6682909375,5,13.6682909375L11,13.6682909375C11.4602375,13.6682909375,11.833333,13.2951949375,11.833333,12.8349589375L11.833333,5.5016269375C11.833333,5.2254846375,12.057191,5.0016274375,12.333333,5.0016274375C12.609475,5.0016274375,12.833333,5.2254846375,12.833333,5.5016269375L12.833333,12.8349589375C12.833333,13.8474599375,12.0125,14.6682929375,11,14.6682929375L5,14.6682929375C3.9875,14.6682929375,3.1666665,13.8474599375,3.1666665,12.8349589375L3.1666667,4.0016272375ZM6.666667,2.3349608175C6.3905239,2.3349608175,6.166667,2.1111031775,6.166667,1.8349608775C6.166667,1.5588185475,6.3905239,1.3349609375,6.666667,1.3349609375L9.333334,1.3349609375C9.6094756,1.3349609375,9.8333335,1.5588185475,9.8333335,1.8349608775C9.8333335,2.1111031775,9.6094756,2.3349608175,9.333334,2.3349608175L6.666667,2.3349608175ZM6.166667,6.8349599375C6.166667,6.5588173375,6.3905239,6.3349604375,6.666667,6.3349604375C6.9428091,6.3349604375,7.1666665,6.5588173375,7.1666665,6.8349599375L7.1666665,10.8349599375C7.1666665,11.1111021375,6.9428091,11.3349599375,6.666667,11.3349599375C6.3905239,11.3349599375,6.166667,11.1111021375,6.166667,10.8349599375L6.166667,6.8349599375ZM8.833334,6.8349599375C8.833334,6.5588173375,9.0571914,6.3349604375,9.333334,6.3349604375C9.6094756,6.3349604375,9.8333335,6.5588173375,9.8333335,6.8349599375L9.8333335,10.8349599375C9.8333335,11.1111021375,9.6094756,11.3349599375,9.333334,11.3349599375C9.0571914,11.3349599375,8.833334,11.1111021375,8.833334,10.8349599375L8.833334,6.8349599375Z" fill="#F7625D" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></svg>