ydb-components-material 0.1.87 → 0.1.89
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.6ffa9be4.js +1 -0
- package/build/docs/{umi.507b3306.css → umi.fd11a37a.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 +9 -9
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +2 -2
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +2 -2
- package/dist/BizComps.css +1 -1
- package/dist/BizComps.js +5 -5
- package/dist/BizComps.js.map +1 -1
- package/es/components/file-list/checkPoint.d.ts +3 -0
- package/es/components/file-list/checkPoint.js +157 -0
- package/es/components/file-list/checkPoint.scss +120 -0
- package/es/components/file-list/file.js +224 -0
- package/es/components/file-list/icon/checked.svg +1 -0
- package/es/components/file-list/icon/close.svg +1 -0
- package/es/components/file-list/icon/del.svg +1 -0
- package/es/components/file-list/icon/download.svg +1 -0
- package/es/components/file-list/icon/download_pc.svg +1 -0
- package/es/components/file-list/icon/file.svg +1 -0
- package/es/components/file-list/icon/icon_errorMsg.svg +1 -0
- package/es/components/file-list/icon/icon_warning.svg +1 -0
- package/es/components/file-list/icon/preview.svg +1 -0
- package/es/components/file-list/icon/preview_pc.svg +1 -0
- package/es/components/file-list/icon/upload.svg +1 -0
- package/es/components/file-list/icon/view.svg +1 -0
- package/es/components/file-list/index.d.ts +21 -0
- package/es/components/file-list/index.js +258 -0
- package/es/components/file-list/index.scss +61 -0
- package/es/components/file-list/item.d.ts +27 -0
- package/es/components/file-list/item.js +854 -0
- package/es/components/file-list/item.scss +412 -0
- package/es/components/file-list/seal.d.ts +3 -0
- package/es/components/file-list/seal.js +222 -0
- package/es/components/file-list/sealUtil.js +252 -0
- package/es/components/file-list/sign.d.ts +3 -0
- package/es/components/file-list/sign.js +138 -0
- package/es/components/file-list/signUtil.js +369 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +1 -0
- package/es/style.js +1 -0
- package/lib/components/file-list/checkPoint.d.ts +3 -0
- package/lib/components/file-list/checkPoint.js +162 -0
- package/lib/components/file-list/checkPoint.scss +120 -0
- package/lib/components/file-list/file.js +233 -0
- package/lib/components/file-list/icon/checked.svg +1 -0
- package/lib/components/file-list/icon/close.svg +1 -0
- package/lib/components/file-list/icon/del.svg +1 -0
- package/lib/components/file-list/icon/download.svg +1 -0
- package/lib/components/file-list/icon/download_pc.svg +1 -0
- package/lib/components/file-list/icon/file.svg +1 -0
- package/lib/components/file-list/icon/icon_errorMsg.svg +1 -0
- package/lib/components/file-list/icon/icon_warning.svg +1 -0
- package/lib/components/file-list/icon/preview.svg +1 -0
- package/lib/components/file-list/icon/preview_pc.svg +1 -0
- package/lib/components/file-list/icon/upload.svg +1 -0
- package/lib/components/file-list/icon/view.svg +1 -0
- package/lib/components/file-list/index.d.ts +21 -0
- package/lib/components/file-list/index.js +263 -0
- package/lib/components/file-list/index.scss +61 -0
- package/lib/components/file-list/item.d.ts +27 -0
- package/lib/components/file-list/item.js +860 -0
- package/lib/components/file-list/item.scss +412 -0
- package/lib/components/file-list/seal.d.ts +3 -0
- package/lib/components/file-list/seal.js +228 -0
- package/lib/components/file-list/sealUtil.js +254 -0
- package/lib/components/file-list/sign.d.ts +3 -0
- package/lib/components/file-list/sign.js +144 -0
- package/lib/components/file-list/signUtil.js +371 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +3 -1
- package/lib/style.js +1 -0
- package/lowcode/file-list/meta.ts +231 -0
- package/lowcode_es/_setter/IconSelectSetter.js +1 -1
- package/lowcode_es/file-list/meta.d.ts +22 -0
- package/lowcode_es/file-list/meta.js +213 -0
- package/lowcode_es/meta.js +3 -2
- package/lowcode_lib/_setter/IconSelectSetter.js +1 -1
- package/lowcode_lib/file-list/meta.d.ts +22 -0
- package/lowcode_lib/file-list/meta.js +218 -0
- package/lowcode_lib/meta.js +14 -13
- package/package.json +5 -4
- package/build/docs/umi.5298404d.js +0 -1
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.getSignRes = getSignRes;
|
|
6
|
+
exports.initSignPageMethod = initSignPageMethod;
|
|
7
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
8
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
9
|
+
var _file = require("./file");
|
|
10
|
+
var _api = require("../../api");
|
|
11
|
+
var categoryId = '3354397552669692408';
|
|
12
|
+
// 预发
|
|
13
|
+
var categoryIdRelease = '3291682531601133765'; // 手写签批id
|
|
14
|
+
var documentId = ''; // 手写签批生成的文件id
|
|
15
|
+
var contractId = ''; // 合同id
|
|
16
|
+
|
|
17
|
+
// 对外的方法 初始化手写签批的页面
|
|
18
|
+
function initSignPageMethod(_x, _x2, _x3) {
|
|
19
|
+
return _initSignPageMethod.apply(this, arguments);
|
|
20
|
+
} // 【第 1 步】上传要手写签批的文件
|
|
21
|
+
function _initSignPageMethod() {
|
|
22
|
+
_initSignPageMethod = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(fileObj, userInfo, config) {
|
|
23
|
+
var fileName, docId, contrId, flag, pageUrl, params;
|
|
24
|
+
return _regenerator["default"].wrap(function (_context) {
|
|
25
|
+
while (1) switch (_context.prev = _context.next) {
|
|
26
|
+
case 0:
|
|
27
|
+
console.log('fileObj', fileObj, userInfo);
|
|
28
|
+
fileName = fileObj.fileName; // 【第 1 步】上传要手写签批的文件
|
|
29
|
+
_context.next = 1;
|
|
30
|
+
return uploadSignFile(fileObj, config);
|
|
31
|
+
case 1:
|
|
32
|
+
docId = _context.sent;
|
|
33
|
+
console.log('docId---', docId);
|
|
34
|
+
if (docId) {
|
|
35
|
+
_context.next = 2;
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
return _context.abrupt("return", false);
|
|
39
|
+
case 2:
|
|
40
|
+
documentId = docId; // 保存文档 id
|
|
41
|
+
|
|
42
|
+
// 【第 2 步】创建或者发起电子签批
|
|
43
|
+
_context.next = 3;
|
|
44
|
+
return createbycategoryFun(fileName, docId, config);
|
|
45
|
+
case 3:
|
|
46
|
+
contrId = _context.sent;
|
|
47
|
+
console.log('contrId---', contrId);
|
|
48
|
+
if (contrId) {
|
|
49
|
+
_context.next = 4;
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
return _context.abrupt("return", false);
|
|
53
|
+
case 4:
|
|
54
|
+
contractId = contrId;
|
|
55
|
+
|
|
56
|
+
// 【第 3 步】创建手写签批页面
|
|
57
|
+
_context.next = 5;
|
|
58
|
+
return getContractSignUrl(contrId, userInfo, config);
|
|
59
|
+
case 5:
|
|
60
|
+
flag = _context.sent;
|
|
61
|
+
if (flag) {
|
|
62
|
+
_context.next = 6;
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
return _context.abrupt("return", false);
|
|
66
|
+
case 6:
|
|
67
|
+
_context.next = 7;
|
|
68
|
+
return getSignUrl(userInfo, config);
|
|
69
|
+
case 7:
|
|
70
|
+
pageUrl = _context.sent;
|
|
71
|
+
if (pageUrl) {
|
|
72
|
+
_context.next = 8;
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
return _context.abrupt("return", false);
|
|
76
|
+
case 8:
|
|
77
|
+
// 将 文档 id/签批文件 id/签署地址/文件名称 返回
|
|
78
|
+
params = {
|
|
79
|
+
documentId: documentId,
|
|
80
|
+
contractId: contractId,
|
|
81
|
+
pageUrl: pageUrl,
|
|
82
|
+
fileName: fileName
|
|
83
|
+
};
|
|
84
|
+
return _context.abrupt("return", params);
|
|
85
|
+
case 9:
|
|
86
|
+
case "end":
|
|
87
|
+
return _context.stop();
|
|
88
|
+
}
|
|
89
|
+
}, _callee);
|
|
90
|
+
}));
|
|
91
|
+
return _initSignPageMethod.apply(this, arguments);
|
|
92
|
+
}
|
|
93
|
+
function uploadSignFile(_x4, _x5) {
|
|
94
|
+
return _uploadSignFile.apply(this, arguments);
|
|
95
|
+
} // 【第 2 步】创建或者发起电子签批
|
|
96
|
+
function _uploadSignFile() {
|
|
97
|
+
_uploadSignFile = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(event, config) {
|
|
98
|
+
var blob, file, signApprovalFileType;
|
|
99
|
+
return _regenerator["default"].wrap(function (_context2) {
|
|
100
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
101
|
+
case 0:
|
|
102
|
+
console.log('文件 1111', event, config);
|
|
103
|
+
// uni.showLoading({ title: '加载中' })
|
|
104
|
+
_context2.next = 1;
|
|
105
|
+
return (0, _file.getBlob)(event.fileUrl);
|
|
106
|
+
case 1:
|
|
107
|
+
blob = _context2.sent;
|
|
108
|
+
file = new File([blob], event.fileName, {
|
|
109
|
+
type: (0, _file.getFileExtension)(event.fileName)
|
|
110
|
+
});
|
|
111
|
+
console.log('file----', file);
|
|
112
|
+
// 获取文件类型
|
|
113
|
+
signApprovalFileType = (0, _file.getFileExtension)(event.fileName);
|
|
114
|
+
return _context2.abrupt("return", new Promise(function (resolve) {
|
|
115
|
+
// 上传文件
|
|
116
|
+
(0, _file.upload)({
|
|
117
|
+
file: file,
|
|
118
|
+
title: event.fileName,
|
|
119
|
+
fileType: signApprovalFileType,
|
|
120
|
+
filename: event.fileName,
|
|
121
|
+
// 文件名称
|
|
122
|
+
headers: {
|
|
123
|
+
Authorization: config.tokenTY
|
|
124
|
+
},
|
|
125
|
+
// https://zwfwpt.sxzwfw.gov.cn${window.env === 'release' ? ':10010' : ''}/DeclarationAPI
|
|
126
|
+
action: config.baseUrl + "/declaration/center/signapproval/api/createbyfile",
|
|
127
|
+
// 上传文件的地址
|
|
128
|
+
onError: function onError(e) {
|
|
129
|
+
// uni.$u.toast(e.msg || '手写签批上传文件异常');
|
|
130
|
+
// uni.hideLoading();
|
|
131
|
+
resolve(false);
|
|
132
|
+
},
|
|
133
|
+
onSuccess: function onSuccess(e) {
|
|
134
|
+
// 上传成功
|
|
135
|
+
console.log('上传成功', e);
|
|
136
|
+
resolve(e.data.documentId);
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}));
|
|
140
|
+
case 2:
|
|
141
|
+
case "end":
|
|
142
|
+
return _context2.stop();
|
|
143
|
+
}
|
|
144
|
+
}, _callee2);
|
|
145
|
+
}));
|
|
146
|
+
return _uploadSignFile.apply(this, arguments);
|
|
147
|
+
}
|
|
148
|
+
function createbycategoryFun(fileName, documentIdVal, config) {
|
|
149
|
+
// uni.showLoading({ title: '加载中' })
|
|
150
|
+
console.log('env---', config.env);
|
|
151
|
+
var params = {
|
|
152
|
+
subject: fileName,
|
|
153
|
+
documents: [documentIdVal],
|
|
154
|
+
categoryId: config.env === 'releaseHLW' ? categoryIdRelease : categoryId,
|
|
155
|
+
send: true,
|
|
156
|
+
tenantName: '山西省行政审批服务管理局'
|
|
157
|
+
};
|
|
158
|
+
return new Promise(function (resolve) {
|
|
159
|
+
(0, _api.createbycategory)(params, config).then(function (res) {
|
|
160
|
+
console.log('创建订单成功', res);
|
|
161
|
+
if (res.code === 200) {
|
|
162
|
+
resolve(res.data.contractId);
|
|
163
|
+
} else {
|
|
164
|
+
resolve(false);
|
|
165
|
+
}
|
|
166
|
+
})["catch"](function (error) {
|
|
167
|
+
// uni.hideLoading();
|
|
168
|
+
resolve(false);
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// 【第 3 步】创建手写签批页面
|
|
174
|
+
function getContractSignUrl(contractIdVal, userInfo, config) {
|
|
175
|
+
console.log('contractIdVal', contractIdVal, userInfo);
|
|
176
|
+
// uni.showLoading({ title: '加载中' })
|
|
177
|
+
var params = {
|
|
178
|
+
contractId: contractIdVal,
|
|
179
|
+
signatories: [{
|
|
180
|
+
tenantType: 'PERSONAL',
|
|
181
|
+
tenantName: userInfo.acctType === '20' ? userInfo.legalName : userInfo.userName,
|
|
182
|
+
contact: userInfo.acctType === '20' ? userInfo.legalMobile : userInfo.contactMobile,
|
|
183
|
+
serialNo: 1,
|
|
184
|
+
signAuthConfig: {
|
|
185
|
+
signAuth: 'DEFAULT'
|
|
186
|
+
},
|
|
187
|
+
remind: false
|
|
188
|
+
}]
|
|
189
|
+
};
|
|
190
|
+
return new Promise(function (resolve) {
|
|
191
|
+
(0, _api.contractSignUrl)(params, config).then(function (res) {
|
|
192
|
+
if (res.data.code == 0) {
|
|
193
|
+
resolve(true);
|
|
194
|
+
} else {
|
|
195
|
+
// uni.hideLoading();
|
|
196
|
+
// uni.showModal({
|
|
197
|
+
// title: '温馨提示',
|
|
198
|
+
// content: '获取签批页面失败',
|
|
199
|
+
// confirmText: '知道了',
|
|
200
|
+
// showCancel: false,
|
|
201
|
+
// })
|
|
202
|
+
resolve(false);
|
|
203
|
+
}
|
|
204
|
+
})["catch"](function (error) {
|
|
205
|
+
// uni.hideLoading();
|
|
206
|
+
resolve(false);
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// 【第 4 步】获取签 pi 页面
|
|
212
|
+
function getSignUrl(userInfo, config) {
|
|
213
|
+
// uni.showLoading({ title: '加载中' })
|
|
214
|
+
var params = {
|
|
215
|
+
contractId: contractId,
|
|
216
|
+
tenantType: 'PERSONAL',
|
|
217
|
+
// COMPANY(组织),PERSONAL(个人)
|
|
218
|
+
tenantName: userInfo.acctType === '20' ? userInfo.legalName : userInfo.userName,
|
|
219
|
+
contact: userInfo.acctType === '20' ? userInfo.legalMobile : userInfo.contactMobile,
|
|
220
|
+
canReturn: false,
|
|
221
|
+
// 页面是否显示返回按钮
|
|
222
|
+
canWithdraw: false,
|
|
223
|
+
// 页面是否显示撤回/回退/拒签按钮
|
|
224
|
+
rejectable: false,
|
|
225
|
+
// 页面是否显示拒签按钮
|
|
226
|
+
allowDownload: false,
|
|
227
|
+
// 页面是否显示下载按钮
|
|
228
|
+
allowPrint: false,
|
|
229
|
+
// 页面是否显示打印按钮
|
|
230
|
+
canViewDetail: false,
|
|
231
|
+
// 页面是否显示签署详情按钮
|
|
232
|
+
canMoreOperation: false,
|
|
233
|
+
// 页面是否显示"更多操作"按钮
|
|
234
|
+
autoClosePage: true,
|
|
235
|
+
// 操作完成自动关闭页面
|
|
236
|
+
language: 'ZH_CN',
|
|
237
|
+
deviceType: config.isPC || 'H5' // 取值范围:PC(返回 PC 页面),H5(返回 H5 页面);不传值默认为:根据请求的 UserAgent 自动判断返回的页面类型。
|
|
238
|
+
};
|
|
239
|
+
return new Promise(function (resolve) {
|
|
240
|
+
(0, _api.signurl)(params, config).then(function (res) {
|
|
241
|
+
console.log(res, '页面结果');
|
|
242
|
+
if (res.data.code == 0) {
|
|
243
|
+
resolve(res.data.signUrl);
|
|
244
|
+
} else {
|
|
245
|
+
resolve(false);
|
|
246
|
+
}
|
|
247
|
+
// uni.hideLoading();
|
|
248
|
+
})["catch"](function (error) {
|
|
249
|
+
resolve(false);
|
|
250
|
+
// uni.hideLoading();
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// 下方是打开手写签批页面后 的后续操作
|
|
256
|
+
|
|
257
|
+
// 对外的方法 获取签批后的文件
|
|
258
|
+
function getSignRes(_x6, _x7, _x8, _x9, _x0) {
|
|
259
|
+
return _getSignRes.apply(this, arguments);
|
|
260
|
+
} // 轮询 签批状态
|
|
261
|
+
function _getSignRes() {
|
|
262
|
+
_getSignRes = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(documentIdVal, contractIdVal, name, autoUpload, config) {
|
|
263
|
+
var isSignSucc, newFile, params, uploadRes;
|
|
264
|
+
return _regenerator["default"].wrap(function (_context3) {
|
|
265
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
266
|
+
case 0:
|
|
267
|
+
_context3.next = 1;
|
|
268
|
+
return getCheckSignState(contractIdVal, config);
|
|
269
|
+
case 1:
|
|
270
|
+
isSignSucc = _context3.sent;
|
|
271
|
+
if (!isSignSucc) {
|
|
272
|
+
_context3.next = 8;
|
|
273
|
+
break;
|
|
274
|
+
}
|
|
275
|
+
// 封存
|
|
276
|
+
getContractFinish(contractIdVal, config);
|
|
277
|
+
_context3.next = 2;
|
|
278
|
+
return handleSignApprovalDown(documentIdVal, name, config);
|
|
279
|
+
case 2:
|
|
280
|
+
newFile = _context3.sent;
|
|
281
|
+
console.log('newFile', newFile);
|
|
282
|
+
// 如果需要自动上传
|
|
283
|
+
if (!autoUpload) {
|
|
284
|
+
_context3.next = 6;
|
|
285
|
+
break;
|
|
286
|
+
}
|
|
287
|
+
params = {
|
|
288
|
+
materiaBase: newFile,
|
|
289
|
+
open: true
|
|
290
|
+
};
|
|
291
|
+
console.log('params', params);
|
|
292
|
+
_context3.next = 3;
|
|
293
|
+
return (0, _api.fileUploadApi)(params, config);
|
|
294
|
+
case 3:
|
|
295
|
+
uploadRes = _context3.sent;
|
|
296
|
+
// const uploadedFileObj = await uploadFilePromise(newFile, config)
|
|
297
|
+
console.log('签批完成后的文件地址', uploadRes);
|
|
298
|
+
if (!(uploadRes.code === 200)) {
|
|
299
|
+
_context3.next = 4;
|
|
300
|
+
break;
|
|
301
|
+
}
|
|
302
|
+
return _context3.abrupt("return", uploadRes.data);
|
|
303
|
+
case 4:
|
|
304
|
+
return _context3.abrupt("return", false);
|
|
305
|
+
case 5:
|
|
306
|
+
_context3.next = 7;
|
|
307
|
+
break;
|
|
308
|
+
case 6:
|
|
309
|
+
return _context3.abrupt("return", newFile);
|
|
310
|
+
case 7:
|
|
311
|
+
_context3.next = 9;
|
|
312
|
+
break;
|
|
313
|
+
case 8:
|
|
314
|
+
return _context3.abrupt("return", false);
|
|
315
|
+
case 9:
|
|
316
|
+
case "end":
|
|
317
|
+
return _context3.stop();
|
|
318
|
+
}
|
|
319
|
+
}, _callee3);
|
|
320
|
+
}));
|
|
321
|
+
return _getSignRes.apply(this, arguments);
|
|
322
|
+
}
|
|
323
|
+
function getCheckSignState(contractIdVal, config) {
|
|
324
|
+
return new Promise(function (resolve) {
|
|
325
|
+
(0, _api.checkSignState)({
|
|
326
|
+
contractId: contractIdVal
|
|
327
|
+
}, config).then(function (res) {
|
|
328
|
+
console.log('轮询结果---', res);
|
|
329
|
+
// console.log('轮询结果', JSON.parse(res.data));
|
|
330
|
+
// 签署完成
|
|
331
|
+
if (res.data !== 'null') {
|
|
332
|
+
res = JSON.parse(res.data);
|
|
333
|
+
if (res.status == 'SIGNED') {
|
|
334
|
+
resolve(true);
|
|
335
|
+
} else {
|
|
336
|
+
resolve(false);
|
|
337
|
+
}
|
|
338
|
+
} else {
|
|
339
|
+
resolve(false);
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
// 封存电子签批
|
|
346
|
+
function getContractFinish(contractIdVal, config) {
|
|
347
|
+
(0, _api.contractFinish)({
|
|
348
|
+
contractId: contractIdVal
|
|
349
|
+
}, config);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
// 下载签署完的文档
|
|
353
|
+
function handleSignApprovalDown(documentIdVal, name, config) {
|
|
354
|
+
var params = {
|
|
355
|
+
documentId: documentIdVal,
|
|
356
|
+
type: 'pdf'
|
|
357
|
+
};
|
|
358
|
+
return new Promise(function (resolve) {
|
|
359
|
+
(0, _api.documentDownload)(params, config).then(function (res) {
|
|
360
|
+
console.log('下载文件:', res);
|
|
361
|
+
// 返回来是base64格式的
|
|
362
|
+
// const blob = dataURLtoBlob(res.data); // 转成blob格式进行上传
|
|
363
|
+
// console.log(blob, '新文件的blob格式');
|
|
364
|
+
if (res.code === 200) {
|
|
365
|
+
resolve(res.data);
|
|
366
|
+
} else {
|
|
367
|
+
resolve(false);
|
|
368
|
+
}
|
|
369
|
+
});
|
|
370
|
+
});
|
|
371
|
+
}
|
package/lib/index.d.ts
CHANGED
|
@@ -39,5 +39,7 @@ export type { PreviewMaterialProps } from './components/preview-material';
|
|
|
39
39
|
export { default as PreviewMaterial } from './components/preview-material';
|
|
40
40
|
export type { PrintButtonProps } from './components/print';
|
|
41
41
|
export { default as PrintButton } from './components/print';
|
|
42
|
+
export type { FileListProps } from './components/file-list';
|
|
43
|
+
export { default as FileList } from './components/file-list';
|
|
42
44
|
declare const bizCssPrefix = "bizpack";
|
|
43
45
|
export { bizCssPrefix };
|
package/lib/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
exports.__esModule = true;
|
|
5
|
-
exports.bizCssPrefix = exports.Tips = exports.SuccessPrompt = exports.Statstic = exports.SceneTree = exports.QRCodeImg = exports.PrintButton = exports.PreviewMaterial = exports.PreCheckResPC = exports.Message = exports.MaterialCheckRes = exports.IconCustom = exports.FilePC = exports.FileItem = exports.CustomFrom = exports.CheckRes = exports.CheckLoading = exports.CheckDetailPc = exports.CheckDetail = exports.CardTitle = exports.AddressSelect = exports.AddressCascader = void 0;
|
|
5
|
+
exports.bizCssPrefix = exports.Tips = exports.SuccessPrompt = exports.Statstic = exports.SceneTree = exports.QRCodeImg = exports.PrintButton = exports.PreviewMaterial = exports.PreCheckResPC = exports.Message = exports.MaterialCheckRes = exports.IconCustom = exports.FilePC = exports.FileList = exports.FileItem = exports.CustomFrom = exports.CheckRes = exports.CheckLoading = exports.CheckDetailPc = exports.CheckDetail = exports.CardTitle = exports.AddressSelect = exports.AddressCascader = void 0;
|
|
6
6
|
var _checkLoading = _interopRequireDefault(require("./components/check-loading"));
|
|
7
7
|
exports.CheckLoading = _checkLoading["default"];
|
|
8
8
|
var _cardTitle = _interopRequireDefault(require("./components/card-title"));
|
|
@@ -45,6 +45,8 @@ var _previewMaterial = _interopRequireDefault(require("./components/preview-mate
|
|
|
45
45
|
exports.PreviewMaterial = _previewMaterial["default"];
|
|
46
46
|
var _print = _interopRequireDefault(require("./components/print"));
|
|
47
47
|
exports.PrintButton = _print["default"];
|
|
48
|
+
var _fileList = _interopRequireDefault(require("./components/file-list"));
|
|
49
|
+
exports.FileList = _fileList["default"];
|
|
48
50
|
// export type { ColorfulButtonProps } from './components/colorful-button';
|
|
49
51
|
// export { default as ColorfulButton } from './components/colorful-button';
|
|
50
52
|
|
package/lib/style.js
CHANGED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
|
|
2
|
+
import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types';
|
|
3
|
+
|
|
4
|
+
const FileListMeta: IPublicTypeComponentMetadata = {
|
|
5
|
+
"componentName": "FileList",
|
|
6
|
+
"title": "FileList",
|
|
7
|
+
"docUrl": "",
|
|
8
|
+
"screenshot": "",
|
|
9
|
+
"devMode": "proCode",
|
|
10
|
+
"npm": {
|
|
11
|
+
"package": "ydb-components-material",
|
|
12
|
+
"version": "0.1.87",
|
|
13
|
+
"exportName": "FileList",
|
|
14
|
+
"main": "src/index.tsx",
|
|
15
|
+
"destructuring": true,
|
|
16
|
+
"subName": ""
|
|
17
|
+
},
|
|
18
|
+
"configure": {
|
|
19
|
+
"props": [
|
|
20
|
+
{
|
|
21
|
+
"title": {
|
|
22
|
+
"label": {
|
|
23
|
+
"type": "i18n",
|
|
24
|
+
"en-US": "fileList",
|
|
25
|
+
"zh-CN": "列表数据"
|
|
26
|
+
},
|
|
27
|
+
"tip": "fileList | 列表数据"
|
|
28
|
+
},
|
|
29
|
+
"name": "fileList",
|
|
30
|
+
"description": "列表数据",
|
|
31
|
+
"setter": {
|
|
32
|
+
"componentName": "ArraySetter",
|
|
33
|
+
"props": {
|
|
34
|
+
"itemSetter": {
|
|
35
|
+
"componentName": "ObjectSetter",
|
|
36
|
+
"props": {
|
|
37
|
+
"config": {
|
|
38
|
+
"extraSetter": {
|
|
39
|
+
"componentName": "MixedSetter",
|
|
40
|
+
"isRequired": false,
|
|
41
|
+
"props": {}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"isRequired": false,
|
|
46
|
+
"initialValue": {}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"isRequired": true,
|
|
50
|
+
"initialValue": []
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"title": {
|
|
55
|
+
"label": {
|
|
56
|
+
"type": "i18n",
|
|
57
|
+
"en-US": "token",
|
|
58
|
+
"zh-CN": "token"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"name": "token",
|
|
62
|
+
"setter": {
|
|
63
|
+
"componentName": "StringSetter",
|
|
64
|
+
"isRequired": true,
|
|
65
|
+
"initialValue": ""
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"title": {
|
|
70
|
+
"label": {
|
|
71
|
+
"type": "i18n",
|
|
72
|
+
"en-US": "tokenTY",
|
|
73
|
+
"zh-CN": "tokenTY"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"name": "tokenTY",
|
|
77
|
+
"setter": {
|
|
78
|
+
"componentName": "StringSetter",
|
|
79
|
+
"isRequired": true,
|
|
80
|
+
"initialValue": ""
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"title": {
|
|
85
|
+
"label": {
|
|
86
|
+
"type": "i18n",
|
|
87
|
+
"en-US": "accessToken",
|
|
88
|
+
"zh-CN": "accessToken"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"name": "accessToken",
|
|
92
|
+
"setter": {
|
|
93
|
+
"componentName": "StringSetter",
|
|
94
|
+
"isRequired": true,
|
|
95
|
+
"initialValue": ""
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"title": {
|
|
100
|
+
"label": {
|
|
101
|
+
"type": "i18n",
|
|
102
|
+
"en-US": "userInfo",
|
|
103
|
+
"zh-CN": "userInfo"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"name": "userInfo",
|
|
107
|
+
"setter": {
|
|
108
|
+
"componentName": "ObjectSetter",
|
|
109
|
+
"props": {
|
|
110
|
+
"config": {
|
|
111
|
+
"extraSetter": {
|
|
112
|
+
"componentName": "MixedSetter",
|
|
113
|
+
"isRequired": false,
|
|
114
|
+
"props": {}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"isRequired": true,
|
|
119
|
+
"initialValue": {}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"title": {
|
|
124
|
+
"label": {
|
|
125
|
+
"type": "i18n",
|
|
126
|
+
"en-US": "baseUrl",
|
|
127
|
+
"zh-CN": "baseUrl"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"name": "baseUrl",
|
|
131
|
+
"setter": {
|
|
132
|
+
"componentName": "StringSetter",
|
|
133
|
+
"isRequired": true,
|
|
134
|
+
"initialValue": ""
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"title": {
|
|
139
|
+
"label": {
|
|
140
|
+
"type": "i18n",
|
|
141
|
+
"en-US": "env",
|
|
142
|
+
"zh-CN": "env"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"name": "env",
|
|
146
|
+
"setter": {
|
|
147
|
+
"componentName": "StringSetter",
|
|
148
|
+
"isRequired": true,
|
|
149
|
+
"initialValue": ""
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"title": {
|
|
154
|
+
"label": {
|
|
155
|
+
"type": "i18n",
|
|
156
|
+
"en-US": "isPC",
|
|
157
|
+
"zh-CN": "isPC"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"name": "isPC",
|
|
161
|
+
"setter": {
|
|
162
|
+
"componentName": "BoolSetter",
|
|
163
|
+
"isRequired": false,
|
|
164
|
+
"initialValue": false
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"title": {
|
|
169
|
+
"label": {
|
|
170
|
+
"type": "i18n",
|
|
171
|
+
"en-US": "disabled",
|
|
172
|
+
"zh-CN": "disabled"
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"name": "disabled",
|
|
176
|
+
"setter": {
|
|
177
|
+
"componentName": "BoolSetter",
|
|
178
|
+
"isRequired": false,
|
|
179
|
+
"initialValue": false
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"title": {
|
|
184
|
+
"label": {
|
|
185
|
+
"type": "i18n",
|
|
186
|
+
"en-US": "download",
|
|
187
|
+
"zh-CN": "download"
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"name": "download",
|
|
191
|
+
"setter": {
|
|
192
|
+
"componentName": "FunctionSetter",
|
|
193
|
+
"isRequired": true
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"title": {
|
|
198
|
+
"label": {
|
|
199
|
+
"type": "i18n",
|
|
200
|
+
"en-US": "valChange",
|
|
201
|
+
"zh-CN": "valChange"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"name": "valChange",
|
|
205
|
+
"setter": {
|
|
206
|
+
"componentName": "FunctionSetter",
|
|
207
|
+
"isRequired": true
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
"supports": {
|
|
212
|
+
"style": true
|
|
213
|
+
},
|
|
214
|
+
"component": {}
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
const snippets: IPublicTypeSnippet[] = [
|
|
218
|
+
{
|
|
219
|
+
"title": "FileList",
|
|
220
|
+
"screenshot": "",
|
|
221
|
+
"schema": {
|
|
222
|
+
"componentName": "FileList",
|
|
223
|
+
"props": {}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
];
|
|
227
|
+
|
|
228
|
+
export default {
|
|
229
|
+
...FileListMeta,
|
|
230
|
+
snippets
|
|
231
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IPublicTypeSnippet } from '@alilc/lowcode-types';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
snippets: IPublicTypeSnippet[];
|
|
4
|
+
componentName: string;
|
|
5
|
+
uri?: string;
|
|
6
|
+
title?: import("@alilc/lowcode-types").IPublicTypeTitleContent;
|
|
7
|
+
icon?: import("@alilc/lowcode-types").IPublicTypeIconType;
|
|
8
|
+
tags?: string[];
|
|
9
|
+
description?: string;
|
|
10
|
+
docUrl?: string;
|
|
11
|
+
screenshot?: string;
|
|
12
|
+
devMode?: "proCode" | "lowCode";
|
|
13
|
+
npm?: import("@alilc/lowcode-types").IPublicTypeNpmInfo;
|
|
14
|
+
props?: import("@alilc/lowcode-types").IPublicTypePropConfig[];
|
|
15
|
+
configure?: import("@alilc/lowcode-types").IPublicTypeFieldConfig[] | import("@alilc/lowcode-types").IPublicTypeConfigure;
|
|
16
|
+
experimental?: import("@alilc/lowcode-types").IPublicTypeAdvanced;
|
|
17
|
+
schema?: import("@alilc/lowcode-types").IPublicTypeComponentSchema;
|
|
18
|
+
group?: string | import("@alilc/lowcode-types").IPublicTypeI18nData;
|
|
19
|
+
category?: string | import("@alilc/lowcode-types").IPublicTypeI18nData;
|
|
20
|
+
priority?: number;
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|