ydb-components-material 0.1.126 → 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.
- package/build/docs/404.html +3 -3
- package/build/docs/_demos/:uuid +3 -3
- package/build/docs/colorful-button.html +3 -3
- package/build/docs/colorful-input.html +3 -3
- package/build/docs/index.html +3 -3
- package/build/docs/static/delete.b9f9b4ed.svg +1 -0
- package/build/docs/umi.02097956.js +1 -0
- package/build/docs/{umi.57dda8ea.css → umi.d0b733b1.css} +1 -1
- package/build/docs/~demos/:uuid.html +3 -3
- package/build/docs/~demos/colorful-button-demo.html +3 -3
- package/build/docs/~demos/colorful-input-demo.html +3 -3
- package/build/lowcode/3.js +2 -2
- package/build/lowcode/4.js +1 -1
- package/build/lowcode/5.js +1 -1
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +10 -1
- package/build/lowcode/preview.js +145 -145
- package/build/lowcode/render/default/1.js +2 -2
- package/build/lowcode/render/default/2.js +1 -1
- package/build/lowcode/render/default/3.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +32 -23
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +32 -23
- package/dist/1.js +2 -2
- package/dist/1.js.map +1 -1
- package/dist/2.js +1 -1
- package/dist/3.js +1 -1
- package/dist/BizComps.css +1 -1
- package/dist/BizComps.js +38 -29
- package/dist/BizComps.js.map +1 -1
- package/es/api.js +29 -28
- package/es/components/file-list/checkPoint.js +26 -3
- package/es/components/file-list/checkPoint.scss +103 -112
- package/es/components/file-list/icon/delete.svg +1 -0
- package/es/components/file-list/item.js +67 -33
- package/es/components/file-list/signerInfo.js +36 -8
- package/es/components/file-list/signerInfo.scss +10 -0
- package/es/components/sign-file/index.d.ts +1 -0
- package/es/components/sign-file/index.js +127 -25
- package/lib/api.js +29 -28
- package/lib/components/file-list/checkPoint.js +26 -3
- package/lib/components/file-list/checkPoint.scss +103 -112
- package/lib/components/file-list/icon/delete.svg +1 -0
- package/lib/components/file-list/item.js +67 -33
- package/lib/components/file-list/signerInfo.js +36 -8
- package/lib/components/file-list/signerInfo.scss +10 -0
- package/lib/components/sign-file/index.d.ts +1 -0
- package/lib/components/sign-file/index.js +126 -25
- package/lowcode_es/meta.js +1 -1
- package/lowcode_lib/meta.js +1 -1
- package/package.json +4 -3
- package/build/docs/umi.af7442ae.js +0 -1
- package/es/components/sign-file/seal.d.ts +0 -3
- package/es/components/sign-file/seal.js +0 -220
- package/es/components/sign-file/sealUtil.js +0 -252
- package/es/components/sign-file/sign.d.ts +0 -3
- package/es/components/sign-file/sign.js +0 -136
- package/es/components/sign-file/signUtil.js +0 -367
- package/lib/components/sign-file/seal.d.ts +0 -3
- package/lib/components/sign-file/seal.js +0 -226
- package/lib/components/sign-file/sealUtil.js +0 -254
- package/lib/components/sign-file/sign.d.ts +0 -3
- package/lib/components/sign-file/sign.js +0 -142
- package/lib/components/sign-file/signUtil.js +0 -369
package/es/api.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
+
import axios from 'axios';
|
|
3
4
|
export var post = /*#__PURE__*/function () {
|
|
4
5
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(url, data, config, noJson) {
|
|
5
|
-
var
|
|
6
|
+
var response, _t;
|
|
6
7
|
return _regeneratorRuntime.wrap(function (_context) {
|
|
7
8
|
while (1) switch (_context.prev = _context.next) {
|
|
8
9
|
case 0:
|
|
@@ -14,32 +15,31 @@ export var post = /*#__PURE__*/function () {
|
|
|
14
15
|
// if (config.env === 'release' && url.indexOf('zwfwpt.sxzwfw.gov.cn') > -1) {
|
|
15
16
|
// url = url.replace('zwfwpt.sxzwfw.gov.cn', 'zwfwpt.sxzwfw.gov.cn:10010')
|
|
16
17
|
// }
|
|
17
|
-
_context.
|
|
18
|
-
|
|
18
|
+
_context.prev = 1;
|
|
19
|
+
_context.next = 2;
|
|
20
|
+
return axios({
|
|
19
21
|
method: 'POST',
|
|
22
|
+
url: url,
|
|
23
|
+
data: data,
|
|
20
24
|
headers: {
|
|
21
25
|
'Content-Type': config && config['Content-Type'] ? config['Content-Type'] : 'application/json',
|
|
22
|
-
// 声明发送的数据格式
|
|
23
|
-
// url.indexOf('zwfwpt.sxzwfw.gov.cn') > -1 ? config.token : config.tokenTY
|
|
24
26
|
'Authorization': config && config.tokenTY ? config.tokenTY : ''
|
|
25
27
|
},
|
|
26
|
-
|
|
27
|
-
}).then(function (response) {
|
|
28
|
-
console.log('response', response, response.body);
|
|
29
|
-
return noJson ? response.text() : response.json();
|
|
30
|
-
}).then(function (res) {
|
|
31
|
-
return res;
|
|
32
|
-
})["catch"](function (err) {
|
|
33
|
-
return err;
|
|
28
|
+
responseType: noJson ? 'text' : 'json'
|
|
34
29
|
});
|
|
35
|
-
case 1:
|
|
36
|
-
res = _context.sent;
|
|
37
|
-
return _context.abrupt("return", res);
|
|
38
30
|
case 2:
|
|
31
|
+
response = _context.sent;
|
|
32
|
+
console.log('response', response);
|
|
33
|
+
return _context.abrupt("return", response.data);
|
|
34
|
+
case 3:
|
|
35
|
+
_context.prev = 3;
|
|
36
|
+
_t = _context["catch"](1);
|
|
37
|
+
return _context.abrupt("return", _t);
|
|
38
|
+
case 4:
|
|
39
39
|
case "end":
|
|
40
40
|
return _context.stop();
|
|
41
41
|
}
|
|
42
|
-
}, _callee);
|
|
42
|
+
}, _callee, null, [[1, 3]]);
|
|
43
43
|
}));
|
|
44
44
|
return function post(_x, _x2, _x3, _x4) {
|
|
45
45
|
return _ref.apply(this, arguments);
|
|
@@ -47,32 +47,33 @@ export var post = /*#__PURE__*/function () {
|
|
|
47
47
|
}();
|
|
48
48
|
export var get = /*#__PURE__*/function () {
|
|
49
49
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(url, data, config) {
|
|
50
|
-
var
|
|
50
|
+
var response, _t2;
|
|
51
51
|
return _regeneratorRuntime.wrap(function (_context2) {
|
|
52
52
|
while (1) switch (_context2.prev = _context2.next) {
|
|
53
53
|
case 0:
|
|
54
|
+
_context2.prev = 0;
|
|
54
55
|
_context2.next = 1;
|
|
55
|
-
return
|
|
56
|
+
return axios({
|
|
56
57
|
method: 'GET',
|
|
58
|
+
url: url,
|
|
59
|
+
params: data,
|
|
57
60
|
headers: {
|
|
58
61
|
'Content-Type': config && config['Content-Type'] ? config['Content-Type'] : 'application/json',
|
|
59
62
|
'Authorization': config && config.tokenTY ? config.tokenTY : ''
|
|
60
63
|
}
|
|
61
|
-
}).then(function (response) {
|
|
62
|
-
return response.json();
|
|
63
|
-
}).then(function (res) {
|
|
64
|
-
return res;
|
|
65
|
-
})["catch"](function (err) {
|
|
66
|
-
return err;
|
|
67
64
|
});
|
|
68
65
|
case 1:
|
|
69
|
-
|
|
70
|
-
return _context2.abrupt("return",
|
|
66
|
+
response = _context2.sent;
|
|
67
|
+
return _context2.abrupt("return", response.data);
|
|
71
68
|
case 2:
|
|
69
|
+
_context2.prev = 2;
|
|
70
|
+
_t2 = _context2["catch"](0);
|
|
71
|
+
return _context2.abrupt("return", _t2);
|
|
72
|
+
case 3:
|
|
72
73
|
case "end":
|
|
73
74
|
return _context2.stop();
|
|
74
75
|
}
|
|
75
|
-
}, _callee2);
|
|
76
|
+
}, _callee2, null, [[0, 2]]);
|
|
76
77
|
}));
|
|
77
78
|
return function get(_x5, _x6, _x7) {
|
|
78
79
|
return _ref2.apply(this, arguments);
|
|
@@ -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
|
-
|
|
95
|
-
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
.
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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
|
|
673
|
-
|
|
674
|
-
|
|
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
|
|
721
|
+
var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(previewUrl) {
|
|
692
722
|
var response, htmlText, parser, doc, imgElements, srcList;
|
|
693
|
-
return _regeneratorRuntime.wrap(function (
|
|
694
|
-
while (1) switch (
|
|
723
|
+
return _regeneratorRuntime.wrap(function (_context7) {
|
|
724
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
695
725
|
case 0:
|
|
696
|
-
|
|
726
|
+
_context7.next = 1;
|
|
697
727
|
return fetch(previewUrl);
|
|
698
728
|
case 1:
|
|
699
|
-
response =
|
|
700
|
-
|
|
729
|
+
response = _context7.sent;
|
|
730
|
+
_context7.next = 2;
|
|
701
731
|
return response.text();
|
|
702
732
|
case 2:
|
|
703
|
-
htmlText =
|
|
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
|
|
740
|
+
return _context7.abrupt("return", srcList);
|
|
711
741
|
case 3:
|
|
712
742
|
case "end":
|
|
713
|
-
return
|
|
743
|
+
return _context7.stop();
|
|
714
744
|
}
|
|
715
|
-
},
|
|
745
|
+
}, _callee7);
|
|
716
746
|
}));
|
|
717
747
|
return function extractImageUrls(_x3) {
|
|
718
|
-
return
|
|
748
|
+
return _ref8.apply(this, arguments);
|
|
719
749
|
};
|
|
720
750
|
}();
|
|
721
751
|
|
|
722
752
|
// 获取预览图片
|
|
723
753
|
var getViewUrl = /*#__PURE__*/function () {
|
|
724
|
-
var
|
|
754
|
+
var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(id) {
|
|
725
755
|
var type, urlRes, res, list;
|
|
726
|
-
return _regeneratorRuntime.wrap(function (
|
|
727
|
-
while (1) switch (
|
|
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
|
-
|
|
761
|
+
_context8.next = 1;
|
|
732
762
|
break;
|
|
733
763
|
}
|
|
734
|
-
return
|
|
764
|
+
return _context8.abrupt("return", fileUrl);
|
|
735
765
|
case 1:
|
|
736
766
|
if (!(type !== 'pdf')) {
|
|
737
|
-
|
|
767
|
+
_context8.next = 2;
|
|
738
768
|
break;
|
|
739
769
|
}
|
|
740
|
-
return
|
|
770
|
+
return _context8.abrupt("return", '');
|
|
741
771
|
case 2:
|
|
742
|
-
|
|
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 =
|
|
785
|
+
urlRes = _context8.sent;
|
|
756
786
|
if (!(urlRes.presignedUrlList && urlRes.presignedUrlList.length > 0)) {
|
|
757
|
-
|
|
787
|
+
_context8.next = 6;
|
|
758
788
|
break;
|
|
759
789
|
}
|
|
760
790
|
console.log('urlRes', urlRes);
|
|
761
|
-
|
|
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 =
|
|
774
|
-
|
|
803
|
+
res = _context8.sent;
|
|
804
|
+
_context8.next = 5;
|
|
775
805
|
return extractImageUrls(res.url);
|
|
776
806
|
case 5:
|
|
777
|
-
list =
|
|
807
|
+
list = _context8.sent;
|
|
778
808
|
console.log('list---111111', list);
|
|
779
|
-
return
|
|
809
|
+
return _context8.abrupt("return", list[0]);
|
|
780
810
|
case 6:
|
|
781
811
|
case "end":
|
|
782
|
-
return
|
|
812
|
+
return _context8.stop();
|
|
783
813
|
}
|
|
784
|
-
},
|
|
814
|
+
}, _callee8);
|
|
785
815
|
}));
|
|
786
816
|
return function getViewUrl(_x4) {
|
|
787
|
-
return
|
|
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:
|
|
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
|
|
156
|
-
if (signInfoMap[
|
|
157
|
-
setSignerInfoList(signInfoMap[
|
|
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
|
|
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",
|