ydb-components-material 0.1.63 → 0.1.65
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/umi.ea6edade.js +1 -0
- 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/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/dist/BizComps.js +1 -1
- package/dist/BizComps.js.map +1 -1
- package/es/api.js +3 -0
- package/es/components/file-item/index.js +23 -4
- package/es/components/file-item/seal.js +6 -1
- package/es/components/file-item/sign.js +7 -2
- package/es/components/file-item/signUtil.js +1 -1
- package/lib/api.js +3 -0
- package/lib/components/file-item/index.js +23 -4
- package/lib/components/file-item/seal.js +6 -1
- package/lib/components/file-item/sign.js +7 -2
- package/lib/components/file-item/signUtil.js +1 -1
- package/lowcode_es/meta.js +1 -1
- package/lowcode_lib/meta.js +1 -1
- package/package.json +3 -3
- package/build/docs/umi.089f0729.js +0 -1
package/es/api.js
CHANGED
|
@@ -9,6 +9,9 @@ export var post = /*#__PURE__*/function () {
|
|
|
9
9
|
if (noJson === void 0) {
|
|
10
10
|
noJson = false;
|
|
11
11
|
}
|
|
12
|
+
if (window.env === 'release') {
|
|
13
|
+
url = url.replace('zwfwpt.sxzwfw.gov.cn', 'zwfwpt.sxzwfw.gov.cn:10010');
|
|
14
|
+
}
|
|
12
15
|
_context.next = 1;
|
|
13
16
|
return fetch(url, {
|
|
14
17
|
method: 'POST',
|
|
@@ -120,6 +120,9 @@ var FileItem = function FileItem(_ref) {
|
|
|
120
120
|
var _useState13 = useState(null),
|
|
121
121
|
checkPointData = _useState13[0],
|
|
122
122
|
setCheckPointData = _useState13[1];
|
|
123
|
+
var _useState14 = useState(''),
|
|
124
|
+
oldUrl = _useState14[0],
|
|
125
|
+
setOldUrl = _useState14[1];
|
|
123
126
|
var showViewImg = function showViewImg(url) {
|
|
124
127
|
setIsShowView(true);
|
|
125
128
|
setViewImg(url);
|
|
@@ -229,13 +232,24 @@ var FileItem = function FileItem(_ref) {
|
|
|
229
232
|
// handleSeal()
|
|
230
233
|
setIsShowSealPage(true);
|
|
231
234
|
};
|
|
235
|
+
|
|
236
|
+
// 获取签pi结果
|
|
232
237
|
var getRes = function getRes(val) {
|
|
233
238
|
console.log('val---', val);
|
|
239
|
+
if (val.fileUrl && !oldUrl) {
|
|
240
|
+
setOldUrl(val.oldUrl);
|
|
241
|
+
}
|
|
234
242
|
valChange(val);
|
|
235
243
|
};
|
|
244
|
+
|
|
245
|
+
// 获取签章结果
|
|
236
246
|
var getSealRes = function getSealRes(val) {
|
|
237
247
|
console.log('sealval---', val);
|
|
238
|
-
|
|
248
|
+
if (val.fileUrl && !oldUrl) {
|
|
249
|
+
setOldUrl(val.oldUrl);
|
|
250
|
+
}
|
|
251
|
+
// valChange(val)
|
|
252
|
+
sign();
|
|
239
253
|
};
|
|
240
254
|
var queryFileLibs = function queryFileLibs() {
|
|
241
255
|
console.log('queryFileLibs');
|
|
@@ -273,7 +287,10 @@ var FileItem = function FileItem(_ref) {
|
|
|
273
287
|
return;
|
|
274
288
|
}
|
|
275
289
|
fetch(baseUrl + "/declaration/material/file/files/api/presigned-url?id=" + guideImg + "&effectiveTime=3600000", {
|
|
276
|
-
method: 'GET'
|
|
290
|
+
method: 'GET',
|
|
291
|
+
headers: {
|
|
292
|
+
'Authorization': tokenTY
|
|
293
|
+
}
|
|
277
294
|
}).then(function (response) {
|
|
278
295
|
return response.json();
|
|
279
296
|
}).then(function (res) {
|
|
@@ -507,7 +524,8 @@ var FileItem = function FileItem(_ref) {
|
|
|
507
524
|
file: {
|
|
508
525
|
name: fileName,
|
|
509
526
|
url: fileUrl,
|
|
510
|
-
type: fileType
|
|
527
|
+
type: fileType,
|
|
528
|
+
oldUrl: isSigned ? oldUrl : ''
|
|
511
529
|
},
|
|
512
530
|
token: token,
|
|
513
531
|
tokenTY: tokenTY,
|
|
@@ -523,7 +541,8 @@ var FileItem = function FileItem(_ref) {
|
|
|
523
541
|
name: fileName,
|
|
524
542
|
url: fileUrl,
|
|
525
543
|
type: fileType,
|
|
526
|
-
fileId: fileId
|
|
544
|
+
fileId: fileId,
|
|
545
|
+
oldUrl: isSealed ? oldUrl : ''
|
|
527
546
|
},
|
|
528
547
|
token: token,
|
|
529
548
|
tokenTY: tokenTY,
|
|
@@ -27,11 +27,15 @@ function SealPage(props) {
|
|
|
27
27
|
var elementRef = useRef(null);
|
|
28
28
|
var handleRes = /*#__PURE__*/function () {
|
|
29
29
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
30
|
-
var res, pageUrl, orderIdVal;
|
|
30
|
+
var fileObj, res, pageUrl, orderIdVal;
|
|
31
31
|
return _regeneratorRuntime.wrap(function (_context) {
|
|
32
32
|
while (1) switch (_context.prev = _context.next) {
|
|
33
33
|
case 0:
|
|
34
34
|
console.log('file', file, userInfo);
|
|
35
|
+
fileObj = file;
|
|
36
|
+
if (file.oldUrl) {
|
|
37
|
+
fileObj.url = file.oldUrl;
|
|
38
|
+
}
|
|
35
39
|
_context.next = 1;
|
|
36
40
|
return initSealPageMethod(file, userInfo, token, accessToken, baseUrl, tokenTY, isPC);
|
|
37
41
|
case 1:
|
|
@@ -85,6 +89,7 @@ function SealPage(props) {
|
|
|
85
89
|
finalFile = _extends({
|
|
86
90
|
name: file.name,
|
|
87
91
|
url: uploadRes.data.fileUrl,
|
|
92
|
+
oldUrl: file.url,
|
|
88
93
|
isSealed: true
|
|
89
94
|
}, uploadRes.data);
|
|
90
95
|
getSealRes(finalFile);
|
|
@@ -28,10 +28,14 @@ function SignPage(props) {
|
|
|
28
28
|
var timerRef = useRef(null);
|
|
29
29
|
var init = /*#__PURE__*/function () {
|
|
30
30
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
31
|
-
var res, documentIdVal, contractIdVal, pageUrl, nameVal;
|
|
31
|
+
var fileObj, res, documentIdVal, contractIdVal, pageUrl, nameVal;
|
|
32
32
|
return _regeneratorRuntime.wrap(function (_context) {
|
|
33
33
|
while (1) switch (_context.prev = _context.next) {
|
|
34
34
|
case 0:
|
|
35
|
+
fileObj = file;
|
|
36
|
+
if (file.oldUrl) {
|
|
37
|
+
fileObj.url = file.oldUrl;
|
|
38
|
+
}
|
|
35
39
|
_context.next = 1;
|
|
36
40
|
return initSignPageMethod(file, userInfo, token, device);
|
|
37
41
|
case 1:
|
|
@@ -74,7 +78,8 @@ function SignPage(props) {
|
|
|
74
78
|
finalFile = _extends({
|
|
75
79
|
name: nameVal,
|
|
76
80
|
url: newFile.fileUrlList[0],
|
|
77
|
-
isSigned: true
|
|
81
|
+
isSigned: true,
|
|
82
|
+
oldUrl: file.url
|
|
78
83
|
}, newFile);
|
|
79
84
|
console.log('finalFile---', finalFile);
|
|
80
85
|
getRes(finalFile);
|
package/lib/api.js
CHANGED
|
@@ -14,6 +14,9 @@ var post = exports.post = /*#__PURE__*/function () {
|
|
|
14
14
|
if (noJson === void 0) {
|
|
15
15
|
noJson = false;
|
|
16
16
|
}
|
|
17
|
+
if (window.env === 'release') {
|
|
18
|
+
url = url.replace('zwfwpt.sxzwfw.gov.cn', 'zwfwpt.sxzwfw.gov.cn:10010');
|
|
19
|
+
}
|
|
17
20
|
_context.next = 1;
|
|
18
21
|
return fetch(url, {
|
|
19
22
|
method: 'POST',
|
|
@@ -126,6 +126,9 @@ var FileItem = function FileItem(_ref) {
|
|
|
126
126
|
var _useState13 = (0, _react.useState)(null),
|
|
127
127
|
checkPointData = _useState13[0],
|
|
128
128
|
setCheckPointData = _useState13[1];
|
|
129
|
+
var _useState14 = (0, _react.useState)(''),
|
|
130
|
+
oldUrl = _useState14[0],
|
|
131
|
+
setOldUrl = _useState14[1];
|
|
129
132
|
var showViewImg = function showViewImg(url) {
|
|
130
133
|
setIsShowView(true);
|
|
131
134
|
setViewImg(url);
|
|
@@ -235,13 +238,24 @@ var FileItem = function FileItem(_ref) {
|
|
|
235
238
|
// handleSeal()
|
|
236
239
|
setIsShowSealPage(true);
|
|
237
240
|
};
|
|
241
|
+
|
|
242
|
+
// 获取签pi结果
|
|
238
243
|
var getRes = function getRes(val) {
|
|
239
244
|
console.log('val---', val);
|
|
245
|
+
if (val.fileUrl && !oldUrl) {
|
|
246
|
+
setOldUrl(val.oldUrl);
|
|
247
|
+
}
|
|
240
248
|
valChange(val);
|
|
241
249
|
};
|
|
250
|
+
|
|
251
|
+
// 获取签章结果
|
|
242
252
|
var getSealRes = function getSealRes(val) {
|
|
243
253
|
console.log('sealval---', val);
|
|
244
|
-
|
|
254
|
+
if (val.fileUrl && !oldUrl) {
|
|
255
|
+
setOldUrl(val.oldUrl);
|
|
256
|
+
}
|
|
257
|
+
// valChange(val)
|
|
258
|
+
sign();
|
|
245
259
|
};
|
|
246
260
|
var queryFileLibs = function queryFileLibs() {
|
|
247
261
|
console.log('queryFileLibs');
|
|
@@ -279,7 +293,10 @@ var FileItem = function FileItem(_ref) {
|
|
|
279
293
|
return;
|
|
280
294
|
}
|
|
281
295
|
fetch(baseUrl + "/declaration/material/file/files/api/presigned-url?id=" + guideImg + "&effectiveTime=3600000", {
|
|
282
|
-
method: 'GET'
|
|
296
|
+
method: 'GET',
|
|
297
|
+
headers: {
|
|
298
|
+
'Authorization': tokenTY
|
|
299
|
+
}
|
|
283
300
|
}).then(function (response) {
|
|
284
301
|
return response.json();
|
|
285
302
|
}).then(function (res) {
|
|
@@ -513,7 +530,8 @@ var FileItem = function FileItem(_ref) {
|
|
|
513
530
|
file: {
|
|
514
531
|
name: fileName,
|
|
515
532
|
url: fileUrl,
|
|
516
|
-
type: fileType
|
|
533
|
+
type: fileType,
|
|
534
|
+
oldUrl: isSigned ? oldUrl : ''
|
|
517
535
|
},
|
|
518
536
|
token: token,
|
|
519
537
|
tokenTY: tokenTY,
|
|
@@ -529,7 +547,8 @@ var FileItem = function FileItem(_ref) {
|
|
|
529
547
|
name: fileName,
|
|
530
548
|
url: fileUrl,
|
|
531
549
|
type: fileType,
|
|
532
|
-
fileId: fileId
|
|
550
|
+
fileId: fileId,
|
|
551
|
+
oldUrl: isSealed ? oldUrl : ''
|
|
533
552
|
},
|
|
534
553
|
token: token,
|
|
535
554
|
tokenTY: tokenTY,
|
|
@@ -33,11 +33,15 @@ function SealPage(props) {
|
|
|
33
33
|
var elementRef = (0, _react.useRef)(null);
|
|
34
34
|
var handleRes = /*#__PURE__*/function () {
|
|
35
35
|
var _ref = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
36
|
-
var res, pageUrl, orderIdVal;
|
|
36
|
+
var fileObj, res, pageUrl, orderIdVal;
|
|
37
37
|
return _regenerator["default"].wrap(function (_context) {
|
|
38
38
|
while (1) switch (_context.prev = _context.next) {
|
|
39
39
|
case 0:
|
|
40
40
|
console.log('file', file, userInfo);
|
|
41
|
+
fileObj = file;
|
|
42
|
+
if (file.oldUrl) {
|
|
43
|
+
fileObj.url = file.oldUrl;
|
|
44
|
+
}
|
|
41
45
|
_context.next = 1;
|
|
42
46
|
return (0, _sealUtil.initSealPageMethod)(file, userInfo, token, accessToken, baseUrl, tokenTY, isPC);
|
|
43
47
|
case 1:
|
|
@@ -91,6 +95,7 @@ function SealPage(props) {
|
|
|
91
95
|
finalFile = (0, _extends2["default"])({
|
|
92
96
|
name: file.name,
|
|
93
97
|
url: uploadRes.data.fileUrl,
|
|
98
|
+
oldUrl: file.url,
|
|
94
99
|
isSealed: true
|
|
95
100
|
}, uploadRes.data);
|
|
96
101
|
getSealRes(finalFile);
|
|
@@ -34,10 +34,14 @@ function SignPage(props) {
|
|
|
34
34
|
var timerRef = (0, _react.useRef)(null);
|
|
35
35
|
var init = /*#__PURE__*/function () {
|
|
36
36
|
var _ref = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
37
|
-
var res, documentIdVal, contractIdVal, pageUrl, nameVal;
|
|
37
|
+
var fileObj, res, documentIdVal, contractIdVal, pageUrl, nameVal;
|
|
38
38
|
return _regenerator["default"].wrap(function (_context) {
|
|
39
39
|
while (1) switch (_context.prev = _context.next) {
|
|
40
40
|
case 0:
|
|
41
|
+
fileObj = file;
|
|
42
|
+
if (file.oldUrl) {
|
|
43
|
+
fileObj.url = file.oldUrl;
|
|
44
|
+
}
|
|
41
45
|
_context.next = 1;
|
|
42
46
|
return (0, _signUtil.initSignPageMethod)(file, userInfo, token, device);
|
|
43
47
|
case 1:
|
|
@@ -80,7 +84,8 @@ function SignPage(props) {
|
|
|
80
84
|
finalFile = (0, _extends2["default"])({
|
|
81
85
|
name: nameVal,
|
|
82
86
|
url: newFile.fileUrlList[0],
|
|
83
|
-
isSigned: true
|
|
87
|
+
isSigned: true,
|
|
88
|
+
oldUrl: file.url
|
|
84
89
|
}, newFile);
|
|
85
90
|
console.log('finalFile---', finalFile);
|
|
86
91
|
getRes(finalFile);
|
package/lowcode_es/meta.js
CHANGED
|
@@ -89,7 +89,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
|
|
|
89
89
|
packageName = 'ydb-components-material';
|
|
90
90
|
}
|
|
91
91
|
if (version === void 0) {
|
|
92
|
-
version = '0.1.
|
|
92
|
+
version = '0.1.65';
|
|
93
93
|
}
|
|
94
94
|
if (basicLibraryVersion === void 0) {
|
|
95
95
|
basicLibraryVersion = {
|
package/lowcode_lib/meta.js
CHANGED
|
@@ -94,7 +94,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
|
|
|
94
94
|
packageName = 'ydb-components-material';
|
|
95
95
|
}
|
|
96
96
|
if (version === void 0) {
|
|
97
|
-
version = '0.1.
|
|
97
|
+
version = '0.1.65';
|
|
98
98
|
}
|
|
99
99
|
if (basicLibraryVersion === void 0) {
|
|
100
100
|
basicLibraryVersion = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ydb-components-material",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.65",
|
|
4
4
|
"description": "ydb-components-material",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -97,10 +97,10 @@
|
|
|
97
97
|
},
|
|
98
98
|
"componentConfig": {
|
|
99
99
|
"isComponentLibrary": true,
|
|
100
|
-
"materialSchema": "https://unpkg.com/ydb-components-material@0.1.
|
|
100
|
+
"materialSchema": "https://unpkg.com/ydb-components-material@0.1.65/build/lowcode/assets-prod.json"
|
|
101
101
|
},
|
|
102
102
|
"lcMeta": {
|
|
103
103
|
"type": "component"
|
|
104
104
|
},
|
|
105
|
-
"homepage": "https://unpkg.com/ydb-components-material@0.1.
|
|
105
|
+
"homepage": "https://unpkg.com/ydb-components-material@0.1.65/build/index.html"
|
|
106
106
|
}
|