ydb-components-material 0.1.21 → 0.1.22
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/close.e2e8764a.svg +1 -0
- package/build/docs/umi.0ec80fbb.js +1 -0
- package/build/docs/{umi.4278bf7b.css → umi.1ef21448.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/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 +1 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +1 -1
- package/dist/BizComps.css +1 -1
- package/dist/BizComps.js +1 -1
- package/dist/BizComps.js.map +1 -1
- package/es/api.js +20 -7
- package/es/components/file-item/file.js +3 -4
- package/es/components/file-item/icon/close.svg +1 -0
- package/es/components/file-item/index.d.ts +10 -5
- package/es/components/file-item/index.js +106 -51
- package/es/components/file-item/index.scss +39 -2
- package/es/components/file-item/seal.js +68 -10
- package/es/components/file-item/sealUtil.js +127 -31
- package/es/components/file-item/sign.js +20 -16
- package/es/components/file-item/signUtil.js +3 -3
- package/es/components/scene-tree/index.js +1 -0
- package/lib/api.js +21 -8
- package/lib/components/file-item/file.js +3 -4
- package/lib/components/file-item/icon/close.svg +1 -0
- package/lib/components/file-item/index.d.ts +10 -5
- package/lib/components/file-item/index.js +106 -51
- package/lib/components/file-item/index.scss +39 -2
- package/lib/components/file-item/seal.js +68 -10
- package/lib/components/file-item/sealUtil.js +126 -30
- package/lib/components/file-item/sign.js +20 -16
- package/lib/components/file-item/signUtil.js +3 -3
- package/lib/components/scene-tree/index.js +1 -0
- package/lowcode/file-item/meta.ts +63 -15
- package/lowcode_es/file-item/meta.js +60 -15
- package/lowcode_es/meta.js +1 -1
- package/lowcode_lib/file-item/meta.js +60 -15
- package/lowcode_lib/meta.js +1 -1
- package/package.json +3 -3
- package/build/docs/umi.b1d4b795.js +0 -1
|
@@ -11,12 +11,12 @@ var _api = require("../../api.js");
|
|
|
11
11
|
// import apiConfig from '@/config/api.cofig'
|
|
12
12
|
// const userInfo = uni.getStorageSync('userInfo')
|
|
13
13
|
// 对外的方法 获取电子签章的页面地址
|
|
14
|
-
function initSealPageMethod(_x, _x2, _x3, _x4) {
|
|
14
|
+
function initSealPageMethod(_x, _x2, _x3, _x4, _x5) {
|
|
15
15
|
return _initSealPageMethod.apply(this, arguments);
|
|
16
16
|
} // [第1步] 查询当前用户是否有电子签章
|
|
17
17
|
function _initSealPageMethod() {
|
|
18
|
-
_initSealPageMethod = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(fileObj, userInfo, token, accessToken) {
|
|
19
|
-
var name,
|
|
18
|
+
_initSealPageMethod = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(fileObj, userInfo, token, accessToken, baseUrl) {
|
|
19
|
+
var name, sealList, fileUrl, orderId, pageUrl, params;
|
|
20
20
|
return _regenerator["default"].wrap(function (_context) {
|
|
21
21
|
while (1) switch (_context.prev = _context.next) {
|
|
22
22
|
case 0:
|
|
@@ -24,26 +24,21 @@ function _initSealPageMethod() {
|
|
|
24
24
|
console.log('fileObj', fileObj, userInfo);
|
|
25
25
|
// 【第1步】判断当前用户是否有印章
|
|
26
26
|
_context.next = 1;
|
|
27
|
-
return querySeal(userInfo, token);
|
|
27
|
+
return querySeal(userInfo, token, baseUrl);
|
|
28
28
|
case 1:
|
|
29
|
-
|
|
30
|
-
if (
|
|
29
|
+
sealList = _context.sent;
|
|
30
|
+
if (sealList.length) {
|
|
31
31
|
_context.next = 2;
|
|
32
32
|
break;
|
|
33
33
|
}
|
|
34
34
|
_message["default"].error('该单位下暂无印章,请前往“山西政务服务网”或“三晋通”小程序申领印章');
|
|
35
|
-
// return uni.showModal({
|
|
36
|
-
// title: '提示',
|
|
37
|
-
// content: '该单位下暂无印章,请前往“山西政务服务网”或“三晋通”小程序申领印章',
|
|
38
|
-
// confirmText: '知道了',
|
|
39
|
-
// showCancel: false,
|
|
40
|
-
// })
|
|
41
35
|
return _context.abrupt("return", false);
|
|
42
36
|
case 2:
|
|
43
37
|
_context.next = 3;
|
|
44
|
-
return uploadSealFile(fileObj, token);
|
|
38
|
+
return uploadSealFile(fileObj, token, baseUrl);
|
|
45
39
|
case 3:
|
|
46
40
|
fileUrl = _context.sent;
|
|
41
|
+
console.log('fileUrl---', fileUrl);
|
|
47
42
|
if (fileUrl) {
|
|
48
43
|
_context.next = 4;
|
|
49
44
|
break;
|
|
@@ -51,22 +46,27 @@ function _initSealPageMethod() {
|
|
|
51
46
|
return _context.abrupt("return", false);
|
|
52
47
|
case 4:
|
|
53
48
|
_context.next = 5;
|
|
54
|
-
return
|
|
49
|
+
return getSignOrderId(sealList, fileObj, fileUrl, token, baseUrl, userInfo);
|
|
55
50
|
case 5:
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
orderId = _context.sent;
|
|
52
|
+
console.log('orderId---', orderId);
|
|
53
|
+
if (orderId) {
|
|
58
54
|
_context.next = 6;
|
|
59
55
|
break;
|
|
60
56
|
}
|
|
61
57
|
return _context.abrupt("return", false);
|
|
62
58
|
case 6:
|
|
59
|
+
_context.next = 7;
|
|
60
|
+
return getMobilePageFun(orderId, accessToken, token, baseUrl);
|
|
61
|
+
case 7:
|
|
62
|
+
pageUrl = _context.sent;
|
|
63
63
|
// 将 电子签章地址/文件名称 返回
|
|
64
64
|
params = {
|
|
65
65
|
pageUrl: pageUrl,
|
|
66
66
|
name: name
|
|
67
67
|
};
|
|
68
68
|
return _context.abrupt("return", params);
|
|
69
|
-
case
|
|
69
|
+
case 8:
|
|
70
70
|
case "end":
|
|
71
71
|
return _context.stop();
|
|
72
72
|
}
|
|
@@ -74,7 +74,7 @@ function _initSealPageMethod() {
|
|
|
74
74
|
}));
|
|
75
75
|
return _initSealPageMethod.apply(this, arguments);
|
|
76
76
|
}
|
|
77
|
-
function querySeal(userInfo, token) {
|
|
77
|
+
function querySeal(userInfo, token, baseUrl) {
|
|
78
78
|
console.log('querySeal', userInfo);
|
|
79
79
|
// uni.showLoading({ title: '查询印章中' })
|
|
80
80
|
var params = {
|
|
@@ -84,27 +84,28 @@ function querySeal(userInfo, token) {
|
|
|
84
84
|
};
|
|
85
85
|
return new Promise(function (resolve) {
|
|
86
86
|
(0, _api.qrySealApi)(params, {
|
|
87
|
-
token: token
|
|
87
|
+
token: token,
|
|
88
|
+
baseUrl: baseUrl
|
|
88
89
|
}).then(function (res) {
|
|
89
90
|
if (res.data && res.data.length > 0) {
|
|
90
|
-
resolve(
|
|
91
|
+
resolve(res.data);
|
|
91
92
|
} else {
|
|
92
|
-
resolve(
|
|
93
|
+
resolve([]);
|
|
93
94
|
}
|
|
94
95
|
// uni.hideLoading()
|
|
95
96
|
})["catch"](function (error) {
|
|
96
|
-
resolve(
|
|
97
|
+
resolve([]);
|
|
97
98
|
// uni.hideLoading()
|
|
98
99
|
});
|
|
99
100
|
});
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
// [第2步] 上传文件
|
|
103
|
-
function uploadSealFile(
|
|
104
|
+
function uploadSealFile(_x6, _x7, _x8) {
|
|
104
105
|
return _uploadSealFile.apply(this, arguments);
|
|
105
106
|
} // [第3步] 获取电子印章页面
|
|
106
107
|
function _uploadSealFile() {
|
|
107
|
-
_uploadSealFile = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(fileObj, token) {
|
|
108
|
+
_uploadSealFile = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(fileObj, token, baseUrl) {
|
|
108
109
|
var blob, file;
|
|
109
110
|
return _regenerator["default"].wrap(function (_context2) {
|
|
110
111
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -116,7 +117,6 @@ function _uploadSealFile() {
|
|
|
116
117
|
file = new File([blob], fileObj.name, {
|
|
117
118
|
type: fileObj.type
|
|
118
119
|
}); // 上传接口
|
|
119
|
-
// const { baseURL } = apiConfig;
|
|
120
120
|
return _context2.abrupt("return", new Promise(function (resolve) {
|
|
121
121
|
(0, _file.upload)({
|
|
122
122
|
file: file,
|
|
@@ -125,7 +125,7 @@ function _uploadSealFile() {
|
|
|
125
125
|
headers: {
|
|
126
126
|
Authorization: token
|
|
127
127
|
},
|
|
128
|
-
action: "
|
|
128
|
+
action: baseUrl + "/declaration/center/sign/api/fileUploadApi",
|
|
129
129
|
// 上传文件的地址
|
|
130
130
|
onError: function onError(e) {
|
|
131
131
|
// uni.$u.toast(e.msg || '上传文件异常');
|
|
@@ -147,20 +147,116 @@ function _uploadSealFile() {
|
|
|
147
147
|
}));
|
|
148
148
|
return _uploadSealFile.apply(this, arguments);
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function getSignOrderId(sealList, fileObj, esusFileUrl, token, baseUrl, userInfo) {
|
|
151
151
|
// uni.showLoading({ title: '获取签章页面中' })
|
|
152
|
-
|
|
152
|
+
console.log('sealList', sealList, fileObj, esusFileUrl, token, baseUrl, userInfo);
|
|
153
|
+
var fileId = fileObj.fileId,
|
|
154
|
+
name = fileObj.name;
|
|
155
|
+
// 循环签章列表 - 开始
|
|
156
|
+
var apiSignDtosArr = [];
|
|
157
|
+
sealList.forEach(function (sealItem, sealIndex) {
|
|
158
|
+
apiSignDtosArr.push({
|
|
159
|
+
deviceType: 3,
|
|
160
|
+
// 签章类型(默认3)
|
|
161
|
+
signType: 0,
|
|
162
|
+
// 签章方式(0 - 自由签章 or 定位签章2 - 关键字签章3 - 骑缝签章,一次只能有个一个类型,多个请写多组)
|
|
163
|
+
sealCode: sealItem.sealCode,
|
|
164
|
+
// 印章编码
|
|
165
|
+
signatories: [
|
|
166
|
+
// 定位签章参数
|
|
167
|
+
{
|
|
168
|
+
pageIndex: sealIndex,
|
|
169
|
+
// 签章所在页码
|
|
170
|
+
x: 0.00,
|
|
171
|
+
// 位置横坐标 支持百分比坐标<1,百分比。>1,pdf磅,ofd 毫米
|
|
172
|
+
y: 0.00 // 位置纵坐标
|
|
173
|
+
}]
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
var params = {
|
|
177
|
+
deptCode: userInfo.certificateSno,
|
|
178
|
+
// 单位统一社会信用代码
|
|
179
|
+
outUserId: userInfo.legalCertno,
|
|
180
|
+
// 用户身份证号
|
|
181
|
+
userIdType: '2',
|
|
182
|
+
// 2:身份证
|
|
183
|
+
signFileReqs: [{
|
|
184
|
+
file: esusFileUrl,
|
|
185
|
+
// 签章文件(签章文件base64编码文件数据或者文件地址)
|
|
186
|
+
fileType: '0',
|
|
187
|
+
// 文件格式类型(0文件路径;1文件数据)
|
|
188
|
+
docType: '0',
|
|
189
|
+
// 文件内容类型 (0 PDF;1 OFD)
|
|
190
|
+
fileId: fileId,
|
|
191
|
+
// 业务系统文件id (用于回传文件,不可重复)
|
|
192
|
+
fileName: name,
|
|
193
|
+
// 签章文件名称(文件名称包含文件格式,如a.pdf,b.ofd)
|
|
194
|
+
apiSignDtos: apiSignDtosArr
|
|
195
|
+
// apiSignDtos: [ // 签章信息列表(一次可以多个签章参数。每个参数选一个签章参数)
|
|
196
|
+
// {
|
|
197
|
+
// deviceType: 3, // 签章类型(默认3)
|
|
198
|
+
// sealCode: '14110000000423', // 印章编码
|
|
199
|
+
// signType: 0, // 签章方式(0 - 自由签章 or 定位签章2 - 关键字签章3 - 骑缝签章,一次只能有个一个类型,多个请写多组)
|
|
200
|
+
// signatories: [ // 定位签章参数
|
|
201
|
+
// {
|
|
202
|
+
// pageIndex: 0, // 签章所在页码
|
|
203
|
+
// x: 0.00, // 位置横坐标 支持百分比坐标<1,百分比。>1,pdf磅,ofd 毫米
|
|
204
|
+
// y: 0.00, // 位置纵坐标
|
|
205
|
+
// }
|
|
206
|
+
// ]
|
|
207
|
+
// },
|
|
208
|
+
// {
|
|
209
|
+
// deviceType: 3, // 签章类型(默认3)
|
|
210
|
+
// sealCode: '14110000000392', // 印章编码
|
|
211
|
+
// signType: 0, // 签章方式(0 - 自由签章 or 定位签章2 - 关键字签章3 - 骑缝签章,一次只能有个一个类型,多个请写多组)
|
|
212
|
+
// signatories: [ // 定位签章参数
|
|
213
|
+
// {
|
|
214
|
+
// pageIndex: 0, // 签章所在页码
|
|
215
|
+
// x: 0.00, // 位置横坐标 支持百分比坐标<1,百分比。>1,pdf磅,ofd 毫米
|
|
216
|
+
// y: 0.00, // 位置纵坐标
|
|
217
|
+
// }
|
|
218
|
+
// ]
|
|
219
|
+
// }
|
|
220
|
+
// ]
|
|
221
|
+
}]
|
|
222
|
+
};
|
|
223
|
+
console.log('params---', params);
|
|
224
|
+
return new Promise(function (resolve) {
|
|
225
|
+
console.log('获取签章订单id');
|
|
226
|
+
(0, _api.getSignOrderIdApi)(params, {
|
|
227
|
+
token: token,
|
|
228
|
+
baseUrl: baseUrl
|
|
229
|
+
}).then(function (res) {
|
|
230
|
+
if (res) {
|
|
231
|
+
var bigNumber = BigInt(res);
|
|
232
|
+
resolve(bigNumber + '');
|
|
233
|
+
// uni.hideLoading()
|
|
234
|
+
} else {
|
|
235
|
+
resolve(false);
|
|
236
|
+
// uni.hideLoading()
|
|
237
|
+
}
|
|
238
|
+
})["catch"](function () {
|
|
239
|
+
resolve(false);
|
|
240
|
+
// uni.hideLoading()
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// [第4步-移动端] 获取电子印章页面
|
|
246
|
+
function getMobilePageFun(orderId, accessToken, token, baseUrl) {
|
|
247
|
+
// uni.showLoading({ title: '获取移动端签章页面中' })
|
|
153
248
|
var params = {
|
|
154
249
|
accessToken: accessToken,
|
|
155
250
|
acctType: '20',
|
|
156
|
-
|
|
157
|
-
name: fileName
|
|
251
|
+
orderId: orderId
|
|
158
252
|
};
|
|
159
253
|
return new Promise(function (resolve) {
|
|
160
254
|
(0, _api.getSealUrlApi)(params, {
|
|
255
|
+
baseUrl: baseUrl,
|
|
161
256
|
token: token
|
|
162
257
|
}).then(function (res) {
|
|
163
258
|
if (res) {
|
|
259
|
+
console.log(res, '移动端签章页面');
|
|
164
260
|
resolve(res);
|
|
165
261
|
// uni.hideLoading()
|
|
166
262
|
} else {
|
|
@@ -14,7 +14,9 @@ function SignPage(props) {
|
|
|
14
14
|
userInfo = props.userInfo,
|
|
15
15
|
file = props.file,
|
|
16
16
|
token = props.token,
|
|
17
|
-
getRes = props.getRes
|
|
17
|
+
getRes = props.getRes,
|
|
18
|
+
handleClose = props.handleClose,
|
|
19
|
+
baseUrl = props.baseUrl;
|
|
18
20
|
var _useState = (0, _react.useState)(''),
|
|
19
21
|
srcUrl = _useState[0],
|
|
20
22
|
setSrcUrl = _useState[1];
|
|
@@ -28,7 +30,7 @@ function SignPage(props) {
|
|
|
28
30
|
name = _useState4[0],
|
|
29
31
|
setName = _useState4[1];
|
|
30
32
|
var timerRef = (0, _react.useRef)(null);
|
|
31
|
-
var
|
|
33
|
+
var init = /*#__PURE__*/function () {
|
|
32
34
|
var _ref = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
33
35
|
var res, documentIdVal, contractIdVal, pageUrl, nameVal;
|
|
34
36
|
return _regenerator["default"].wrap(function (_context) {
|
|
@@ -50,12 +52,12 @@ function SignPage(props) {
|
|
|
50
52
|
}
|
|
51
53
|
}, _callee);
|
|
52
54
|
}));
|
|
53
|
-
return function
|
|
55
|
+
return function init() {
|
|
54
56
|
return _ref.apply(this, arguments);
|
|
55
57
|
};
|
|
56
58
|
}();
|
|
57
59
|
var getSignedFile = /*#__PURE__*/function () {
|
|
58
|
-
var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(documentIdVal, contractIdVal, nameVal, tokenVal) {
|
|
60
|
+
var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(documentIdVal, contractIdVal, nameVal, tokenVal, baseUrl) {
|
|
59
61
|
var newFile, finalFile;
|
|
60
62
|
return _regenerator["default"].wrap(function (_context2) {
|
|
61
63
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -63,7 +65,7 @@ function SignPage(props) {
|
|
|
63
65
|
console.log('tokenVal----', tokenVal);
|
|
64
66
|
// const { autoUpload } = this
|
|
65
67
|
_context2.next = 1;
|
|
66
|
-
return (0, _signUtil.getSignRes)(documentIdVal, contractIdVal, nameVal, true, tokenVal);
|
|
68
|
+
return (0, _signUtil.getSignRes)(documentIdVal, contractIdVal, nameVal, true, tokenVal, baseUrl);
|
|
67
69
|
case 1:
|
|
68
70
|
newFile = _context2.sent;
|
|
69
71
|
console.log(newFile, '签署完毕后的');
|
|
@@ -71,11 +73,12 @@ function SignPage(props) {
|
|
|
71
73
|
// 关闭轮询定时
|
|
72
74
|
handleClearInterval();
|
|
73
75
|
// 关闭弹框
|
|
74
|
-
|
|
76
|
+
handleClose();
|
|
75
77
|
// 将手写签批后的新文件 传给
|
|
76
78
|
finalFile = (0, _extends2["default"])({
|
|
77
79
|
name: nameVal,
|
|
78
|
-
url: newFile.fileUrlList[0]
|
|
80
|
+
url: newFile.fileUrlList[0],
|
|
81
|
+
isSigned: true
|
|
79
82
|
}, newFile);
|
|
80
83
|
console.log('finalFile---', finalFile);
|
|
81
84
|
getRes(finalFile);
|
|
@@ -86,7 +89,7 @@ function SignPage(props) {
|
|
|
86
89
|
}
|
|
87
90
|
}, _callee2);
|
|
88
91
|
}));
|
|
89
|
-
return function getSignedFile(_x, _x2, _x3, _x4) {
|
|
92
|
+
return function getSignedFile(_x, _x2, _x3, _x4, _x5) {
|
|
90
93
|
return _ref2.apply(this, arguments);
|
|
91
94
|
};
|
|
92
95
|
}();
|
|
@@ -95,25 +98,26 @@ function SignPage(props) {
|
|
|
95
98
|
timerRef.current = null;
|
|
96
99
|
};
|
|
97
100
|
(0, _react.useEffect)(function () {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
}, [isShowSignPage]);
|
|
101
|
+
init();
|
|
102
|
+
}, []);
|
|
102
103
|
(0, _react.useEffect)(function () {
|
|
103
|
-
if (srcUrl && documentId && contractId && name && token && !timerRef.current) {
|
|
104
|
+
if (srcUrl && documentId && contractId && name && token && baseUrl && !timerRef.current) {
|
|
104
105
|
handleClearInterval();
|
|
105
106
|
timerRef.current = setInterval(function () {
|
|
106
|
-
getSignedFile(documentId, contractId, name, token);
|
|
107
|
+
getSignedFile(documentId, contractId, name, token, baseUrl);
|
|
107
108
|
}, 3000);
|
|
108
109
|
}
|
|
109
|
-
|
|
110
|
+
return function () {
|
|
111
|
+
handleClearInterval();
|
|
112
|
+
};
|
|
113
|
+
}, [srcUrl, documentId, contractId, name, token, baseUrl]);
|
|
110
114
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
111
115
|
className: "sign_page"
|
|
112
116
|
}, /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
113
117
|
src: srcUrl,
|
|
114
118
|
id: "iframe",
|
|
115
119
|
frameborder: "0",
|
|
116
|
-
height: "
|
|
120
|
+
height: "100%",
|
|
117
121
|
width: "100%"
|
|
118
122
|
}));
|
|
119
123
|
}
|
|
@@ -261,11 +261,11 @@ function getSignUrl(userInfo, token) {
|
|
|
261
261
|
// 下方是打开手写签批页面后 的后续操作
|
|
262
262
|
|
|
263
263
|
// 对外的方法 获取签批后的文件
|
|
264
|
-
function getSignRes(_x6, _x7, _x8, _x9, _x0) {
|
|
264
|
+
function getSignRes(_x6, _x7, _x8, _x9, _x0, _x1) {
|
|
265
265
|
return _getSignRes.apply(this, arguments);
|
|
266
266
|
} // 轮询 签批状态
|
|
267
267
|
function _getSignRes() {
|
|
268
|
-
_getSignRes = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(documentIdVal, contractIdVal, name, autoUpload, token) {
|
|
268
|
+
_getSignRes = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(documentIdVal, contractIdVal, name, autoUpload, token, baseUrl) {
|
|
269
269
|
var isSignSucc, newFile, uploadedFileObj;
|
|
270
270
|
return _regenerator["default"].wrap(function (_context3) {
|
|
271
271
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -291,7 +291,7 @@ function _getSignRes() {
|
|
|
291
291
|
break;
|
|
292
292
|
}
|
|
293
293
|
_context3.next = 3;
|
|
294
|
-
return (0, _file.uploadFilePromise)(newFile, token);
|
|
294
|
+
return (0, _file.uploadFilePromise)(newFile, baseUrl, token);
|
|
295
295
|
case 3:
|
|
296
296
|
uploadedFileObj = _context3.sent;
|
|
297
297
|
console.log('签批完成后的文件地址', uploadedFileObj);
|
|
@@ -179,6 +179,7 @@ var SceneTree = function SceneTree(_ref) {
|
|
|
179
179
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(FormItem, {
|
|
180
180
|
name: "baseUser",
|
|
181
181
|
label: node.title,
|
|
182
|
+
labelTextAlign: "left",
|
|
182
183
|
required: true,
|
|
183
184
|
style: {
|
|
184
185
|
borderBottom: node.children && node.children.length ? '1px solid #EEEEEE' : '',
|
|
@@ -21,12 +21,12 @@ const FileItemMeta: IPublicTypeComponentMetadata = {
|
|
|
21
21
|
"title": {
|
|
22
22
|
"label": {
|
|
23
23
|
"type": "i18n",
|
|
24
|
-
"en-US": "
|
|
24
|
+
"en-US": "fileUrl",
|
|
25
25
|
"zh-CN": "文件地址"
|
|
26
26
|
},
|
|
27
|
-
"tip": "
|
|
27
|
+
"tip": "fileUrl | 文件地址"
|
|
28
28
|
},
|
|
29
|
-
"name": "
|
|
29
|
+
"name": "fileUrl",
|
|
30
30
|
"description": "文件地址",
|
|
31
31
|
"setter": {
|
|
32
32
|
"componentName": "StringSetter",
|
|
@@ -34,6 +34,23 @@ const FileItemMeta: IPublicTypeComponentMetadata = {
|
|
|
34
34
|
"initialValue": ""
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
|
+
{
|
|
38
|
+
"title": {
|
|
39
|
+
"label": {
|
|
40
|
+
"type": "i18n",
|
|
41
|
+
"en-US": "fileId",
|
|
42
|
+
"zh-CN": "文件ID"
|
|
43
|
+
},
|
|
44
|
+
"tip": "fileId | 文件ID"
|
|
45
|
+
},
|
|
46
|
+
"name": "fileId",
|
|
47
|
+
"description": "文件ID",
|
|
48
|
+
"setter": {
|
|
49
|
+
"componentName": "StringSetter",
|
|
50
|
+
"isRequired": true,
|
|
51
|
+
"initialValue": ""
|
|
52
|
+
}
|
|
53
|
+
},
|
|
37
54
|
{
|
|
38
55
|
"title": {
|
|
39
56
|
"label": {
|
|
@@ -85,6 +102,23 @@ const FileItemMeta: IPublicTypeComponentMetadata = {
|
|
|
85
102
|
"initialValue": ""
|
|
86
103
|
}
|
|
87
104
|
},
|
|
105
|
+
{
|
|
106
|
+
"title": {
|
|
107
|
+
"label": {
|
|
108
|
+
"type": "i18n",
|
|
109
|
+
"en-US": "baseUrl",
|
|
110
|
+
"zh-CN": "baseUrl"
|
|
111
|
+
},
|
|
112
|
+
"tip": "baseUrl | baseUrl"
|
|
113
|
+
},
|
|
114
|
+
"name": "baseUrl",
|
|
115
|
+
"description": "baseUrl",
|
|
116
|
+
"setter": {
|
|
117
|
+
"componentName": "StringSetter",
|
|
118
|
+
"isRequired": true,
|
|
119
|
+
"initialValue": ""
|
|
120
|
+
}
|
|
121
|
+
},
|
|
88
122
|
{
|
|
89
123
|
"title": {
|
|
90
124
|
"label": {
|
|
@@ -137,13 +171,13 @@ const FileItemMeta: IPublicTypeComponentMetadata = {
|
|
|
137
171
|
"title": {
|
|
138
172
|
"label": {
|
|
139
173
|
"type": "i18n",
|
|
140
|
-
"en-US": "
|
|
141
|
-
"zh-CN": "
|
|
174
|
+
"en-US": "signatureEnable",
|
|
175
|
+
"zh-CN": "签批开启"
|
|
142
176
|
}
|
|
143
177
|
},
|
|
144
|
-
"name": "
|
|
178
|
+
"name": "signatureEnable",
|
|
145
179
|
"setter": {
|
|
146
|
-
"componentName": "
|
|
180
|
+
"componentName": "BoolSetter",
|
|
147
181
|
"isRequired": true,
|
|
148
182
|
"initialValue": ""
|
|
149
183
|
}
|
|
@@ -152,13 +186,13 @@ const FileItemMeta: IPublicTypeComponentMetadata = {
|
|
|
152
186
|
"title": {
|
|
153
187
|
"label": {
|
|
154
188
|
"type": "i18n",
|
|
155
|
-
"en-US": "
|
|
156
|
-
"zh-CN": "
|
|
189
|
+
"en-US": "signEnable",
|
|
190
|
+
"zh-CN": "电子签章开启"
|
|
157
191
|
}
|
|
158
192
|
},
|
|
159
|
-
"name": "
|
|
193
|
+
"name": "signEnable",
|
|
160
194
|
"setter": {
|
|
161
|
-
"componentName": "
|
|
195
|
+
"componentName": "BoolSetter",
|
|
162
196
|
"isRequired": true,
|
|
163
197
|
"initialValue": ""
|
|
164
198
|
}
|
|
@@ -167,11 +201,11 @@ const FileItemMeta: IPublicTypeComponentMetadata = {
|
|
|
167
201
|
"title": {
|
|
168
202
|
"label": {
|
|
169
203
|
"type": "i18n",
|
|
170
|
-
"en-US": "
|
|
204
|
+
"en-US": "isSigned",
|
|
171
205
|
"zh-CN": "是否签批"
|
|
172
206
|
}
|
|
173
207
|
},
|
|
174
|
-
"name": "
|
|
208
|
+
"name": "isSigned",
|
|
175
209
|
"setter": {
|
|
176
210
|
"componentName": "BoolSetter",
|
|
177
211
|
"isRequired": true,
|
|
@@ -182,11 +216,11 @@ const FileItemMeta: IPublicTypeComponentMetadata = {
|
|
|
182
216
|
"title": {
|
|
183
217
|
"label": {
|
|
184
218
|
"type": "i18n",
|
|
185
|
-
"en-US": "
|
|
219
|
+
"en-US": "isSealed",
|
|
186
220
|
"zh-CN": "是否签章"
|
|
187
221
|
}
|
|
188
222
|
},
|
|
189
|
-
"name": "
|
|
223
|
+
"name": "isSealed",
|
|
190
224
|
"setter": {
|
|
191
225
|
"componentName": "BoolSetter",
|
|
192
226
|
"isRequired": true,
|
|
@@ -265,6 +299,20 @@ const FileItemMeta: IPublicTypeComponentMetadata = {
|
|
|
265
299
|
"componentName": "FunctionSetter",
|
|
266
300
|
"isRequired": true
|
|
267
301
|
}
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"title": {
|
|
305
|
+
"label": {
|
|
306
|
+
"type": "i18n",
|
|
307
|
+
"en-US": "download",
|
|
308
|
+
"zh-CN": "download"
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
"name": "download",
|
|
312
|
+
"setter": {
|
|
313
|
+
"componentName": "FunctionSetter",
|
|
314
|
+
"isRequired": true
|
|
315
|
+
}
|
|
268
316
|
}
|
|
269
317
|
],
|
|
270
318
|
"supports": {
|
|
@@ -18,18 +18,34 @@ var FileItemMeta = {
|
|
|
18
18
|
"title": {
|
|
19
19
|
"label": {
|
|
20
20
|
"type": "i18n",
|
|
21
|
-
"en-US": "
|
|
21
|
+
"en-US": "fileUrl",
|
|
22
22
|
"zh-CN": "文件地址"
|
|
23
23
|
},
|
|
24
|
-
"tip": "
|
|
24
|
+
"tip": "fileUrl | 文件地址"
|
|
25
25
|
},
|
|
26
|
-
"name": "
|
|
26
|
+
"name": "fileUrl",
|
|
27
27
|
"description": "文件地址",
|
|
28
28
|
"setter": {
|
|
29
29
|
"componentName": "StringSetter",
|
|
30
30
|
"isRequired": true,
|
|
31
31
|
"initialValue": ""
|
|
32
32
|
}
|
|
33
|
+
}, {
|
|
34
|
+
"title": {
|
|
35
|
+
"label": {
|
|
36
|
+
"type": "i18n",
|
|
37
|
+
"en-US": "fileId",
|
|
38
|
+
"zh-CN": "文件ID"
|
|
39
|
+
},
|
|
40
|
+
"tip": "fileId | 文件ID"
|
|
41
|
+
},
|
|
42
|
+
"name": "fileId",
|
|
43
|
+
"description": "文件ID",
|
|
44
|
+
"setter": {
|
|
45
|
+
"componentName": "StringSetter",
|
|
46
|
+
"isRequired": true,
|
|
47
|
+
"initialValue": ""
|
|
48
|
+
}
|
|
33
49
|
}, {
|
|
34
50
|
"title": {
|
|
35
51
|
"label": {
|
|
@@ -78,6 +94,22 @@ var FileItemMeta = {
|
|
|
78
94
|
"isRequired": true,
|
|
79
95
|
"initialValue": ""
|
|
80
96
|
}
|
|
97
|
+
}, {
|
|
98
|
+
"title": {
|
|
99
|
+
"label": {
|
|
100
|
+
"type": "i18n",
|
|
101
|
+
"en-US": "baseUrl",
|
|
102
|
+
"zh-CN": "baseUrl"
|
|
103
|
+
},
|
|
104
|
+
"tip": "baseUrl | baseUrl"
|
|
105
|
+
},
|
|
106
|
+
"name": "baseUrl",
|
|
107
|
+
"description": "baseUrl",
|
|
108
|
+
"setter": {
|
|
109
|
+
"componentName": "StringSetter",
|
|
110
|
+
"isRequired": true,
|
|
111
|
+
"initialValue": ""
|
|
112
|
+
}
|
|
81
113
|
}, {
|
|
82
114
|
"title": {
|
|
83
115
|
"label": {
|
|
@@ -126,13 +158,13 @@ var FileItemMeta = {
|
|
|
126
158
|
"title": {
|
|
127
159
|
"label": {
|
|
128
160
|
"type": "i18n",
|
|
129
|
-
"en-US": "
|
|
130
|
-
"zh-CN": "
|
|
161
|
+
"en-US": "signatureEnable",
|
|
162
|
+
"zh-CN": "签批开启"
|
|
131
163
|
}
|
|
132
164
|
},
|
|
133
|
-
"name": "
|
|
165
|
+
"name": "signatureEnable",
|
|
134
166
|
"setter": {
|
|
135
|
-
"componentName": "
|
|
167
|
+
"componentName": "BoolSetter",
|
|
136
168
|
"isRequired": true,
|
|
137
169
|
"initialValue": ""
|
|
138
170
|
}
|
|
@@ -140,13 +172,13 @@ var FileItemMeta = {
|
|
|
140
172
|
"title": {
|
|
141
173
|
"label": {
|
|
142
174
|
"type": "i18n",
|
|
143
|
-
"en-US": "
|
|
144
|
-
"zh-CN": "
|
|
175
|
+
"en-US": "signEnable",
|
|
176
|
+
"zh-CN": "电子签章开启"
|
|
145
177
|
}
|
|
146
178
|
},
|
|
147
|
-
"name": "
|
|
179
|
+
"name": "signEnable",
|
|
148
180
|
"setter": {
|
|
149
|
-
"componentName": "
|
|
181
|
+
"componentName": "BoolSetter",
|
|
150
182
|
"isRequired": true,
|
|
151
183
|
"initialValue": ""
|
|
152
184
|
}
|
|
@@ -154,11 +186,11 @@ var FileItemMeta = {
|
|
|
154
186
|
"title": {
|
|
155
187
|
"label": {
|
|
156
188
|
"type": "i18n",
|
|
157
|
-
"en-US": "
|
|
189
|
+
"en-US": "isSigned",
|
|
158
190
|
"zh-CN": "是否签批"
|
|
159
191
|
}
|
|
160
192
|
},
|
|
161
|
-
"name": "
|
|
193
|
+
"name": "isSigned",
|
|
162
194
|
"setter": {
|
|
163
195
|
"componentName": "BoolSetter",
|
|
164
196
|
"isRequired": true,
|
|
@@ -168,11 +200,11 @@ var FileItemMeta = {
|
|
|
168
200
|
"title": {
|
|
169
201
|
"label": {
|
|
170
202
|
"type": "i18n",
|
|
171
|
-
"en-US": "
|
|
203
|
+
"en-US": "isSealed",
|
|
172
204
|
"zh-CN": "是否签章"
|
|
173
205
|
}
|
|
174
206
|
},
|
|
175
|
-
"name": "
|
|
207
|
+
"name": "isSealed",
|
|
176
208
|
"setter": {
|
|
177
209
|
"componentName": "BoolSetter",
|
|
178
210
|
"isRequired": true,
|
|
@@ -246,6 +278,19 @@ var FileItemMeta = {
|
|
|
246
278
|
"componentName": "FunctionSetter",
|
|
247
279
|
"isRequired": true
|
|
248
280
|
}
|
|
281
|
+
}, {
|
|
282
|
+
"title": {
|
|
283
|
+
"label": {
|
|
284
|
+
"type": "i18n",
|
|
285
|
+
"en-US": "download",
|
|
286
|
+
"zh-CN": "download"
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
"name": "download",
|
|
290
|
+
"setter": {
|
|
291
|
+
"componentName": "FunctionSetter",
|
|
292
|
+
"isRequired": true
|
|
293
|
+
}
|
|
249
294
|
}],
|
|
250
295
|
"supports": {
|
|
251
296
|
"style": true
|