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
@@ -18,7 +18,11 @@ export default function CheckPoint(props) {
18
18
  var _useState4 = useState(0),
19
19
  pageHeight = _useState4[0],
20
20
  setPageHeight = _useState4[1];
21
+ var _useState5 = useState(0),
22
+ containerHeight = _useState5[0],
23
+ setContainerHeight = _useState5[1];
21
24
  var imgRef = useRef();
25
+ var containerRef = useRef();
22
26
  var initData = function initData() {
23
27
  var fileUrl = checkPointData.fileUrl,
24
28
  _checkPointData$annot = checkPointData.annotations,
@@ -91,8 +95,27 @@ export default function CheckPoint(props) {
91
95
  initData();
92
96
  }
93
97
  }, [checkPointData]);
94
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
95
- className: "keyPoint-container"
98
+
99
+ // 计算容器高度:从自身顶部到视口底部
100
+ useEffect(function () {
101
+ var calcHeight = function calcHeight() {
102
+ if (containerRef.current) {
103
+ var rect = containerRef.current.getBoundingClientRect();
104
+ setContainerHeight(window.innerHeight - rect.top);
105
+ }
106
+ };
107
+ calcHeight();
108
+ window.addEventListener('resize', calcHeight);
109
+ return function () {
110
+ return window.removeEventListener('resize', calcHeight);
111
+ };
112
+ }, []);
113
+ return /*#__PURE__*/React.createElement("div", {
114
+ className: "keyPoint-container",
115
+ ref: containerRef,
116
+ style: {
117
+ height: containerHeight || '100vh'
118
+ }
96
119
  }, /*#__PURE__*/React.createElement("div", {
97
120
  className: "tipDot-content",
98
121
  style: {
@@ -150,5 +173,5 @@ export default function CheckPoint(props) {
150
173
  style: {
151
174
  height: ((_resultData$at2 = resultData.at(-1)) === null || _resultData$at2 === void 0 ? void 0 : _resultData$at2.page) * pageHeight + 'px'
152
175
  }
153
- })));
176
+ }));
154
177
  }
@@ -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>
@@ -496,6 +496,7 @@ var FileItem = function FileItem(_ref) {
496
496
  var getRes = function getRes(val) {
497
497
  console.log('val---', val);
498
498
  valChange(val, fileIndex, index, subIndex);
499
+ invalidHandle();
499
500
  // needOtherSign && setShowSignerInfo(true)
500
501
  };
501
502
 
@@ -509,6 +510,7 @@ var FileItem = function FileItem(_ref) {
509
510
  sign();
510
511
  } else {
511
512
  valChange(val, fileIndex, index, subIndex);
513
+ invalidHandle();
512
514
  // needOtherSign && setShowSignerInfo(true)
513
515
  }
514
516
  };
@@ -669,10 +671,38 @@ var FileItem = function FileItem(_ref) {
669
671
  format: format
670
672
  });
671
673
  };
672
- var handleDel = function handleDel() {
673
- if (disabled) return;
674
- valChange(undefined, fileIndex, index, subIndex);
674
+ var invalidHandle = function invalidHandle() {
675
+ // 分享出去的需要别人签署的文件数据。标识为无效
676
+ if (file.signId) {
677
+ saveSignerInfo({
678
+ uuid: file.signId,
679
+ invalid: true
680
+ });
681
+ }
675
682
  };
683
+ var handleDel = /*#__PURE__*/function () {
684
+ var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
685
+ return _regeneratorRuntime.wrap(function (_context6) {
686
+ while (1) switch (_context6.prev = _context6.next) {
687
+ case 0:
688
+ if (!disabled) {
689
+ _context6.next = 1;
690
+ break;
691
+ }
692
+ return _context6.abrupt("return");
693
+ case 1:
694
+ invalidHandle();
695
+ valChange(undefined, fileIndex, index, subIndex);
696
+ case 2:
697
+ case "end":
698
+ return _context6.stop();
699
+ }
700
+ }, _callee6);
701
+ }));
702
+ return function handleDel() {
703
+ return _ref7.apply(this, arguments);
704
+ };
705
+ }();
676
706
  useEffect(function () {
677
707
  var timer;
678
708
  if (userInfo && tokenTY) {
@@ -688,58 +718,58 @@ var FileItem = function FileItem(_ref) {
688
718
 
689
719
  // 获取缩略图
690
720
  var extractImageUrls = /*#__PURE__*/function () {
691
- var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(previewUrl) {
721
+ var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(previewUrl) {
692
722
  var response, htmlText, parser, doc, imgElements, srcList;
693
- return _regeneratorRuntime.wrap(function (_context6) {
694
- while (1) switch (_context6.prev = _context6.next) {
723
+ return _regeneratorRuntime.wrap(function (_context7) {
724
+ while (1) switch (_context7.prev = _context7.next) {
695
725
  case 0:
696
- _context6.next = 1;
726
+ _context7.next = 1;
697
727
  return fetch(previewUrl);
698
728
  case 1:
699
- response = _context6.sent;
700
- _context6.next = 2;
729
+ response = _context7.sent;
730
+ _context7.next = 2;
701
731
  return response.text();
702
732
  case 2:
703
- htmlText = _context6.sent;
733
+ htmlText = _context7.sent;
704
734
  parser = new DOMParser();
705
735
  doc = parser.parseFromString(htmlText, 'text/html');
706
736
  imgElements = doc.querySelectorAll('img');
707
737
  srcList = Array.from(imgElements).map(function (img) {
708
738
  return img.getAttribute('data-src');
709
739
  });
710
- return _context6.abrupt("return", srcList);
740
+ return _context7.abrupt("return", srcList);
711
741
  case 3:
712
742
  case "end":
713
- return _context6.stop();
743
+ return _context7.stop();
714
744
  }
715
- }, _callee6);
745
+ }, _callee7);
716
746
  }));
717
747
  return function extractImageUrls(_x3) {
718
- return _ref7.apply(this, arguments);
748
+ return _ref8.apply(this, arguments);
719
749
  };
720
750
  }();
721
751
 
722
752
  // 获取预览图片
723
753
  var getViewUrl = /*#__PURE__*/function () {
724
- var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(id) {
754
+ var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(id) {
725
755
  var type, urlRes, res, list;
726
- return _regeneratorRuntime.wrap(function (_context7) {
727
- while (1) switch (_context7.prev = _context7.next) {
756
+ return _regeneratorRuntime.wrap(function (_context8) {
757
+ while (1) switch (_context8.prev = _context8.next) {
728
758
  case 0:
729
759
  type = getFileExtension(fileName);
730
760
  if (!['png', 'jpg', 'jpeg'].includes(type)) {
731
- _context7.next = 1;
761
+ _context8.next = 1;
732
762
  break;
733
763
  }
734
- return _context7.abrupt("return", fileUrl);
764
+ return _context8.abrupt("return", fileUrl);
735
765
  case 1:
736
766
  if (!(type !== 'pdf')) {
737
- _context7.next = 2;
767
+ _context8.next = 2;
738
768
  break;
739
769
  }
740
- return _context7.abrupt("return", '');
770
+ return _context8.abrupt("return", '');
741
771
  case 2:
742
- _context7.next = 3;
772
+ _context8.next = 3;
743
773
  return getUrlById({
744
774
  id: id,
745
775
  effectiveTime: 3600000
@@ -752,13 +782,13 @@ var FileItem = function FileItem(_ref) {
752
782
  accessToken: accessToken
753
783
  });
754
784
  case 3:
755
- urlRes = _context7.sent;
785
+ urlRes = _context8.sent;
756
786
  if (!(urlRes.presignedUrlList && urlRes.presignedUrlList.length > 0)) {
757
- _context7.next = 6;
787
+ _context8.next = 6;
758
788
  break;
759
789
  }
760
790
  console.log('urlRes', urlRes);
761
- _context7.next = 4;
791
+ _context8.next = 4;
762
792
  return onlinePreview({
763
793
  url: urlRes.presignedUrlList[2]
764
794
  }, {
@@ -770,21 +800,21 @@ var FileItem = function FileItem(_ref) {
770
800
  accessToken: accessToken
771
801
  });
772
802
  case 4:
773
- res = _context7.sent;
774
- _context7.next = 5;
803
+ res = _context8.sent;
804
+ _context8.next = 5;
775
805
  return extractImageUrls(res.url);
776
806
  case 5:
777
- list = _context7.sent;
807
+ list = _context8.sent;
778
808
  console.log('list---111111', list);
779
- return _context7.abrupt("return", list[0]);
809
+ return _context8.abrupt("return", list[0]);
780
810
  case 6:
781
811
  case "end":
782
- return _context7.stop();
812
+ return _context8.stop();
783
813
  }
784
- }, _callee7);
814
+ }, _callee8);
785
815
  }));
786
816
  return function getViewUrl(_x4) {
787
- return _ref8.apply(this, arguments);
817
+ return _ref9.apply(this, arguments);
788
818
  };
789
819
  }();
790
820
  useEffect(function () {
@@ -1081,7 +1111,11 @@ var FileItem = function FileItem(_ref) {
1081
1111
  signGuidFileId: signGuidFileId
1082
1112
  }),
1083
1113
  materialName: materialName,
1084
- signInfoMap: signInfoMap
1114
+ signInfoMap: signInfoMap,
1115
+ fileIndex: fileIndex,
1116
+ index: index,
1117
+ subIndex: subIndex,
1118
+ valChange: valChange
1085
1119
  }));
1086
1120
  };
1087
1121
  FileItem.displayName = 'FileItem';
@@ -8,6 +8,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
8
8
  import React, { useEffect, useState, useRef } from 'react';
9
9
  import closeIcon from "./icon/close_black.svg";
10
10
  import addIcon from "./icon/add.svg";
11
+ import delIcon from "./icon/delete.svg";
11
12
  import QRCode from 'qrcode';
12
13
  import "./signerInfo.scss";
13
14
  var RadioGroup = _Radio.Group;
@@ -21,7 +22,11 @@ function SignerInfo(props) {
21
22
  isNeedOtherSeal = props.isNeedOtherSeal,
22
23
  file = props.file,
23
24
  materialName = props.materialName,
24
- signInfoMap = props.signInfoMap;
25
+ signInfoMap = props.signInfoMap,
26
+ valChange = props.valChange,
27
+ fileIndex = props.fileIndex,
28
+ fileItemIndex = props.index,
29
+ subIndex = props.subIndex;
25
30
  var _React$useState = React.useState([]),
26
31
  signerInfoList = _React$useState[0],
27
32
  setSignerInfoList = _React$useState[1];
@@ -50,7 +55,7 @@ function SignerInfo(props) {
50
55
  };
51
56
  var next = /*#__PURE__*/function () {
52
57
  var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
53
- var i, item, fields, _i, _fields, field, val, saveRes;
58
+ var i, item, fields, _i, _fields, field, val, fileObj, saveRes;
54
59
  return _regeneratorRuntime.wrap(function (_context) {
55
60
  while (1) switch (_context.prev = _context.next) {
56
61
  case 0:
@@ -113,16 +118,25 @@ function SignerInfo(props) {
113
118
  _context.next = 1;
114
119
  break;
115
120
  case 5:
121
+ fileObj = _extends({}, file);
122
+ if (!fileObj.initId) {
123
+ fileObj.initId = file.fileId;
124
+ }
125
+
126
+ // 保存签署人信息到草稿中
116
127
  _context.next = 6;
117
128
  return saveSignerInfo({
118
129
  list: signerInfoList,
119
- file: file,
130
+ file: fileObj,
120
131
  materialName: materialName,
121
- date: getCurrentTime()
132
+ date: getCurrentTime(),
133
+ initId: file.initId
122
134
  });
123
135
  case 6:
124
136
  saveRes = _context.sent;
125
137
  if (saveRes) {
138
+ fileObj.signId = saveRes;
139
+ valChange === null || valChange === void 0 ? void 0 : valChange(fileObj, fileIndex, fileItemIndex, subIndex);
126
140
  setUrl("https://zwfw.xzspglj.taiyuan.gov.cn/threeSign?draftNo=" + saveRes);
127
141
  setShowQRcode(true);
128
142
  } else {
@@ -146,15 +160,21 @@ function SignerInfo(props) {
146
160
  signContent: ''
147
161
  }]));
148
162
  };
163
+ var handleDelete = function handleDelete(index) {
164
+ var newList = signerInfoList.filter(function (_, i) {
165
+ return i !== index;
166
+ });
167
+ setSignerInfoList(newList);
168
+ };
149
169
  var onCopy = function onCopy() {
150
170
  navigator.clipboard.writeText(url);
151
171
  _Message.success('复制成功');
152
172
  };
153
173
  useEffect(function () {
154
174
  if (signInfoMap && file) {
155
- var fileId = file.fileId;
156
- if (signInfoMap[fileId]) {
157
- setSignerInfoList(signInfoMap[fileId]);
175
+ var initId = file.initId;
176
+ if (initId && signInfoMap[initId]) {
177
+ setSignerInfoList(signInfoMap[initId]);
158
178
  }
159
179
  }
160
180
  }, [signInfoMap, file]);
@@ -218,7 +238,15 @@ function SignerInfo(props) {
218
238
  }
219
239
  }, /*#__PURE__*/React.createElement("div", {
220
240
  className: "signer-info-item-title"
221
- }, /*#__PURE__*/React.createElement("span", null), "\u7B7E\u7F72\u65B9", index + 1), /*#__PURE__*/React.createElement("div", {
241
+ }, /*#__PURE__*/React.createElement("span", null), "\u7B7E\u7F72\u65B9", index + 1, index > 0 && /*#__PURE__*/React.createElement("div", {
242
+ className: "signer-info-item-delete",
243
+ onClick: function onClick() {
244
+ return handleDelete(index);
245
+ }
246
+ }, /*#__PURE__*/React.createElement("img", {
247
+ src: delIcon,
248
+ alt: "delete"
249
+ }), "\u5220\u9664")), /*#__PURE__*/React.createElement("div", {
222
250
  className: "signer-info-item-content"
223
251
  }, /*#__PURE__*/React.createElement("div", {
224
252
  className: "signer-info-item-box",
@@ -79,6 +79,8 @@
79
79
  top: 0;
80
80
  z-index: 9;
81
81
 
82
+
83
+
82
84
  .close {
83
85
  margin-left: auto;
84
86
  position: absolute;
@@ -108,6 +110,14 @@
108
110
 
109
111
  background: linear-gradient(180deg, #7bb2ff 0%, #1678ff 100%);
110
112
  }
113
+
114
+ .signer-info-item-delete {
115
+ display: flex;
116
+ align-items: center;
117
+ margin-left: auto;
118
+ color: #F7625D;
119
+ font-size: 15px;
120
+ }
111
121
  }
112
122
 
113
123
  .signer-info-item-content {
@@ -13,6 +13,7 @@ export interface SignFileProps {
13
13
  env: string;
14
14
  isPC?: boolean;
15
15
  style?: object;
16
+ applySeal: () => void;
16
17
  download: (value: any) => void;
17
18
  valChange: (value: any) => void;
18
19
  }