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.
Files changed (53) hide show
  1. package/build/docs/404.html +3 -3
  2. package/build/docs/_demos/:uuid +3 -3
  3. package/build/docs/colorful-button.html +3 -3
  4. package/build/docs/colorful-input.html +3 -3
  5. package/build/docs/index.html +3 -3
  6. package/build/docs/static/close.e2e8764a.svg +1 -0
  7. package/build/docs/umi.0ec80fbb.js +1 -0
  8. package/build/docs/{umi.4278bf7b.css → umi.1ef21448.css} +1 -1
  9. package/build/docs/~demos/:uuid.html +3 -3
  10. package/build/docs/~demos/colorful-button-demo.html +3 -3
  11. package/build/docs/~demos/colorful-input-demo.html +3 -3
  12. package/build/lowcode/assets-daily.json +11 -11
  13. package/build/lowcode/assets-dev.json +2 -2
  14. package/build/lowcode/assets-prod.json +11 -11
  15. package/build/lowcode/index.js +1 -1
  16. package/build/lowcode/meta.js +1 -1
  17. package/build/lowcode/preview.js +8 -8
  18. package/build/lowcode/render/default/view.css +1 -1
  19. package/build/lowcode/render/default/view.js +1 -1
  20. package/build/lowcode/view.css +1 -1
  21. package/build/lowcode/view.js +1 -1
  22. package/dist/BizComps.css +1 -1
  23. package/dist/BizComps.js +1 -1
  24. package/dist/BizComps.js.map +1 -1
  25. package/es/api.js +20 -7
  26. package/es/components/file-item/file.js +3 -4
  27. package/es/components/file-item/icon/close.svg +1 -0
  28. package/es/components/file-item/index.d.ts +10 -5
  29. package/es/components/file-item/index.js +106 -51
  30. package/es/components/file-item/index.scss +39 -2
  31. package/es/components/file-item/seal.js +68 -10
  32. package/es/components/file-item/sealUtil.js +127 -31
  33. package/es/components/file-item/sign.js +20 -16
  34. package/es/components/file-item/signUtil.js +3 -3
  35. package/es/components/scene-tree/index.js +1 -0
  36. package/lib/api.js +21 -8
  37. package/lib/components/file-item/file.js +3 -4
  38. package/lib/components/file-item/icon/close.svg +1 -0
  39. package/lib/components/file-item/index.d.ts +10 -5
  40. package/lib/components/file-item/index.js +106 -51
  41. package/lib/components/file-item/index.scss +39 -2
  42. package/lib/components/file-item/seal.js +68 -10
  43. package/lib/components/file-item/sealUtil.js +126 -30
  44. package/lib/components/file-item/sign.js +20 -16
  45. package/lib/components/file-item/signUtil.js +3 -3
  46. package/lib/components/scene-tree/index.js +1 -0
  47. package/lowcode/file-item/meta.ts +63 -15
  48. package/lowcode_es/file-item/meta.js +60 -15
  49. package/lowcode_es/meta.js +1 -1
  50. package/lowcode_lib/file-item/meta.js +60 -15
  51. package/lowcode_lib/meta.js +1 -1
  52. package/package.json +3 -3
  53. package/build/docs/umi.b1d4b795.js +0 -1
@@ -3,18 +3,18 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
3
  import _regeneratorRuntime from "@babel/runtime/regenerator";
4
4
  // import apiConfig from '@/config/api.cofig'
5
5
  import { getBlob, upload } from "./file.js";
6
- import { qrySealApi, getSealUrlApi } from "../../api.js";
6
+ import { qrySealApi, getSealUrlApi, getSignOrderIdApi } from "../../api.js";
7
7
  // const userInfo = uni.getStorageSync('userInfo')
8
8
 
9
9
  // 对外的方法 获取电子签章的页面地址
10
- export function initSealPageMethod(_x, _x2, _x3, _x4) {
10
+ export function initSealPageMethod(_x, _x2, _x3, _x4, _x5) {
11
11
  return _initSealPageMethod.apply(this, arguments);
12
12
  }
13
13
 
14
14
  // [第1步] 查询当前用户是否有电子签章
15
15
  function _initSealPageMethod() {
16
- _initSealPageMethod = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(fileObj, userInfo, token, accessToken) {
17
- var name, hasSeal, fileUrl, pageUrl, params;
16
+ _initSealPageMethod = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(fileObj, userInfo, token, accessToken, baseUrl) {
17
+ var name, sealList, fileUrl, orderId, pageUrl, params;
18
18
  return _regeneratorRuntime.wrap(function (_context) {
19
19
  while (1) switch (_context.prev = _context.next) {
20
20
  case 0:
@@ -22,26 +22,21 @@ function _initSealPageMethod() {
22
22
  console.log('fileObj', fileObj, userInfo);
23
23
  // 【第1步】判断当前用户是否有印章
24
24
  _context.next = 1;
25
- return querySeal(userInfo, token);
25
+ return querySeal(userInfo, token, baseUrl);
26
26
  case 1:
27
- hasSeal = _context.sent;
28
- if (hasSeal) {
27
+ sealList = _context.sent;
28
+ if (sealList.length) {
29
29
  _context.next = 2;
30
30
  break;
31
31
  }
32
32
  _Message.error('该单位下暂无印章,请前往“山西政务服务网”或“三晋通”小程序申领印章');
33
- // return uni.showModal({
34
- // title: '提示',
35
- // content: '该单位下暂无印章,请前往“山西政务服务网”或“三晋通”小程序申领印章',
36
- // confirmText: '知道了',
37
- // showCancel: false,
38
- // })
39
33
  return _context.abrupt("return", false);
40
34
  case 2:
41
35
  _context.next = 3;
42
- return uploadSealFile(fileObj, token);
36
+ return uploadSealFile(fileObj, token, baseUrl);
43
37
  case 3:
44
38
  fileUrl = _context.sent;
39
+ console.log('fileUrl---', fileUrl);
45
40
  if (fileUrl) {
46
41
  _context.next = 4;
47
42
  break;
@@ -49,22 +44,27 @@ function _initSealPageMethod() {
49
44
  return _context.abrupt("return", false);
50
45
  case 4:
51
46
  _context.next = 5;
52
- return getSealUrl(fileUrl, name, token, accessToken);
47
+ return getSignOrderId(sealList, fileObj, fileUrl, token, baseUrl, userInfo);
53
48
  case 5:
54
- pageUrl = _context.sent;
55
- if (pageUrl) {
49
+ orderId = _context.sent;
50
+ console.log('orderId---', orderId);
51
+ if (orderId) {
56
52
  _context.next = 6;
57
53
  break;
58
54
  }
59
55
  return _context.abrupt("return", false);
60
56
  case 6:
57
+ _context.next = 7;
58
+ return getMobilePageFun(orderId, accessToken, token, baseUrl);
59
+ case 7:
60
+ pageUrl = _context.sent;
61
61
  // 将 电子签章地址/文件名称 返回
62
62
  params = {
63
63
  pageUrl: pageUrl,
64
64
  name: name
65
65
  };
66
66
  return _context.abrupt("return", params);
67
- case 7:
67
+ case 8:
68
68
  case "end":
69
69
  return _context.stop();
70
70
  }
@@ -72,7 +72,7 @@ function _initSealPageMethod() {
72
72
  }));
73
73
  return _initSealPageMethod.apply(this, arguments);
74
74
  }
75
- function querySeal(userInfo, token) {
75
+ function querySeal(userInfo, token, baseUrl) {
76
76
  console.log('querySeal', userInfo);
77
77
  // uni.showLoading({ title: '查询印章中' })
78
78
  var params = {
@@ -82,27 +82,28 @@ function querySeal(userInfo, token) {
82
82
  };
83
83
  return new Promise(function (resolve) {
84
84
  qrySealApi(params, {
85
- token: token
85
+ token: token,
86
+ baseUrl: baseUrl
86
87
  }).then(function (res) {
87
88
  if (res.data && res.data.length > 0) {
88
- resolve(true);
89
+ resolve(res.data);
89
90
  } else {
90
- resolve(false);
91
+ resolve([]);
91
92
  }
92
93
  // uni.hideLoading()
93
94
  })["catch"](function (error) {
94
- resolve(false);
95
+ resolve([]);
95
96
  // uni.hideLoading()
96
97
  });
97
98
  });
98
99
  }
99
100
 
100
101
  // [第2步] 上传文件
101
- function uploadSealFile(_x5, _x6) {
102
+ function uploadSealFile(_x6, _x7, _x8) {
102
103
  return _uploadSealFile.apply(this, arguments);
103
104
  } // [第3步] 获取电子印章页面
104
105
  function _uploadSealFile() {
105
- _uploadSealFile = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(fileObj, token) {
106
+ _uploadSealFile = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(fileObj, token, baseUrl) {
106
107
  var blob, file;
107
108
  return _regeneratorRuntime.wrap(function (_context2) {
108
109
  while (1) switch (_context2.prev = _context2.next) {
@@ -114,7 +115,6 @@ function _uploadSealFile() {
114
115
  file = new File([blob], fileObj.name, {
115
116
  type: fileObj.type
116
117
  }); // 上传接口
117
- // const { baseURL } = apiConfig;
118
118
  return _context2.abrupt("return", new Promise(function (resolve) {
119
119
  upload({
120
120
  file: file,
@@ -123,7 +123,7 @@ function _uploadSealFile() {
123
123
  headers: {
124
124
  Authorization: token
125
125
  },
126
- action: "https://zwfwpt.sxzwfw.gov.cn/DeclarationAPI/declaration/center/signapproval/api/createbyfile",
126
+ action: baseUrl + "/declaration/center/sign/api/fileUploadApi",
127
127
  // 上传文件的地址
128
128
  onError: function onError(e) {
129
129
  // uni.$u.toast(e.msg || '上传文件异常');
@@ -145,20 +145,116 @@ function _uploadSealFile() {
145
145
  }));
146
146
  return _uploadSealFile.apply(this, arguments);
147
147
  }
148
- function getSealUrl(fileUrl, fileName, token, accessToken) {
148
+ function getSignOrderId(sealList, fileObj, esusFileUrl, token, baseUrl, userInfo) {
149
149
  // uni.showLoading({ title: '获取签章页面中' })
150
- // const accessToken = uni.getStorageSync('access_token');
150
+ console.log('sealList', sealList, fileObj, esusFileUrl, token, baseUrl, userInfo);
151
+ var fileId = fileObj.fileId,
152
+ name = fileObj.name;
153
+ // 循环签章列表 - 开始
154
+ var apiSignDtosArr = [];
155
+ sealList.forEach(function (sealItem, sealIndex) {
156
+ apiSignDtosArr.push({
157
+ deviceType: 3,
158
+ // 签章类型(默认3)
159
+ signType: 0,
160
+ // 签章方式(0 - 自由签章 or 定位签章2 - 关键字签章3 - 骑缝签章,一次只能有个一个类型,多个请写多组)
161
+ sealCode: sealItem.sealCode,
162
+ // 印章编码
163
+ signatories: [
164
+ // 定位签章参数
165
+ {
166
+ pageIndex: sealIndex,
167
+ // 签章所在页码
168
+ x: 0.00,
169
+ // 位置横坐标 支持百分比坐标<1,百分比。>1,pdf磅,ofd 毫米
170
+ y: 0.00 // 位置纵坐标
171
+ }]
172
+ });
173
+ });
174
+ var params = {
175
+ deptCode: userInfo.certificateSno,
176
+ // 单位统一社会信用代码
177
+ outUserId: userInfo.legalCertno,
178
+ // 用户身份证号
179
+ userIdType: '2',
180
+ // 2:身份证
181
+ signFileReqs: [{
182
+ file: esusFileUrl,
183
+ // 签章文件(签章文件base64编码文件数据或者文件地址)
184
+ fileType: '0',
185
+ // 文件格式类型(0文件路径;1文件数据)
186
+ docType: '0',
187
+ // 文件内容类型 (0 PDF;1 OFD)
188
+ fileId: fileId,
189
+ // 业务系统文件id (用于回传文件,不可重复)
190
+ fileName: name,
191
+ // 签章文件名称(文件名称包含文件格式,如a.pdf,b.ofd)
192
+ apiSignDtos: apiSignDtosArr
193
+ // apiSignDtos: [ // 签章信息列表(一次可以多个签章参数。每个参数选一个签章参数)
194
+ // {
195
+ // deviceType: 3, // 签章类型(默认3)
196
+ // sealCode: '14110000000423', // 印章编码
197
+ // signType: 0, // 签章方式(0 - 自由签章 or 定位签章2 - 关键字签章3 - 骑缝签章,一次只能有个一个类型,多个请写多组)
198
+ // signatories: [ // 定位签章参数
199
+ // {
200
+ // pageIndex: 0, // 签章所在页码
201
+ // x: 0.00, // 位置横坐标 支持百分比坐标<1,百分比。>1,pdf磅,ofd 毫米
202
+ // y: 0.00, // 位置纵坐标
203
+ // }
204
+ // ]
205
+ // },
206
+ // {
207
+ // deviceType: 3, // 签章类型(默认3)
208
+ // sealCode: '14110000000392', // 印章编码
209
+ // signType: 0, // 签章方式(0 - 自由签章 or 定位签章2 - 关键字签章3 - 骑缝签章,一次只能有个一个类型,多个请写多组)
210
+ // signatories: [ // 定位签章参数
211
+ // {
212
+ // pageIndex: 0, // 签章所在页码
213
+ // x: 0.00, // 位置横坐标 支持百分比坐标<1,百分比。>1,pdf磅,ofd 毫米
214
+ // y: 0.00, // 位置纵坐标
215
+ // }
216
+ // ]
217
+ // }
218
+ // ]
219
+ }]
220
+ };
221
+ console.log('params---', params);
222
+ return new Promise(function (resolve) {
223
+ console.log('获取签章订单id');
224
+ getSignOrderIdApi(params, {
225
+ token: token,
226
+ baseUrl: baseUrl
227
+ }).then(function (res) {
228
+ if (res) {
229
+ var bigNumber = BigInt(res);
230
+ resolve(bigNumber + '');
231
+ // uni.hideLoading()
232
+ } else {
233
+ resolve(false);
234
+ // uni.hideLoading()
235
+ }
236
+ })["catch"](function () {
237
+ resolve(false);
238
+ // uni.hideLoading()
239
+ });
240
+ });
241
+ }
242
+
243
+ // [第4步-移动端] 获取电子印章页面
244
+ function getMobilePageFun(orderId, accessToken, token, baseUrl) {
245
+ // uni.showLoading({ title: '获取移动端签章页面中' })
151
246
  var params = {
152
247
  accessToken: accessToken,
153
248
  acctType: '20',
154
- docURL: fileUrl,
155
- name: fileName
249
+ orderId: orderId
156
250
  };
157
251
  return new Promise(function (resolve) {
158
252
  getSealUrlApi(params, {
253
+ baseUrl: baseUrl,
159
254
  token: token
160
255
  }).then(function (res) {
161
256
  if (res) {
257
+ console.log(res, '移动端签章页面');
162
258
  resolve(res);
163
259
  // uni.hideLoading()
164
260
  } else {
@@ -8,7 +8,9 @@ function SignPage(props) {
8
8
  userInfo = props.userInfo,
9
9
  file = props.file,
10
10
  token = props.token,
11
- getRes = props.getRes;
11
+ getRes = props.getRes,
12
+ handleClose = props.handleClose,
13
+ baseUrl = props.baseUrl;
12
14
  var _useState = useState(''),
13
15
  srcUrl = _useState[0],
14
16
  setSrcUrl = _useState[1];
@@ -22,7 +24,7 @@ function SignPage(props) {
22
24
  name = _useState4[0],
23
25
  setName = _useState4[1];
24
26
  var timerRef = useRef(null);
25
- var handleRes = /*#__PURE__*/function () {
27
+ var init = /*#__PURE__*/function () {
26
28
  var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
27
29
  var res, documentIdVal, contractIdVal, pageUrl, nameVal;
28
30
  return _regeneratorRuntime.wrap(function (_context) {
@@ -44,12 +46,12 @@ function SignPage(props) {
44
46
  }
45
47
  }, _callee);
46
48
  }));
47
- return function handleRes() {
49
+ return function init() {
48
50
  return _ref.apply(this, arguments);
49
51
  };
50
52
  }();
51
53
  var getSignedFile = /*#__PURE__*/function () {
52
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(documentIdVal, contractIdVal, nameVal, tokenVal) {
54
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(documentIdVal, contractIdVal, nameVal, tokenVal, baseUrl) {
53
55
  var newFile, finalFile;
54
56
  return _regeneratorRuntime.wrap(function (_context2) {
55
57
  while (1) switch (_context2.prev = _context2.next) {
@@ -57,7 +59,7 @@ function SignPage(props) {
57
59
  console.log('tokenVal----', tokenVal);
58
60
  // const { autoUpload } = this
59
61
  _context2.next = 1;
60
- return getSignRes(documentIdVal, contractIdVal, nameVal, true, tokenVal);
62
+ return getSignRes(documentIdVal, contractIdVal, nameVal, true, tokenVal, baseUrl);
61
63
  case 1:
62
64
  newFile = _context2.sent;
63
65
  console.log(newFile, '签署完毕后的');
@@ -65,11 +67,12 @@ function SignPage(props) {
65
67
  // 关闭轮询定时
66
68
  handleClearInterval();
67
69
  // 关闭弹框
68
- // this.handleClose()
70
+ handleClose();
69
71
  // 将手写签批后的新文件 传给
70
72
  finalFile = _extends({
71
73
  name: nameVal,
72
- url: newFile.fileUrlList[0]
74
+ url: newFile.fileUrlList[0],
75
+ isSigned: true
73
76
  }, newFile);
74
77
  console.log('finalFile---', finalFile);
75
78
  getRes(finalFile);
@@ -80,7 +83,7 @@ function SignPage(props) {
80
83
  }
81
84
  }, _callee2);
82
85
  }));
83
- return function getSignedFile(_x, _x2, _x3, _x4) {
86
+ return function getSignedFile(_x, _x2, _x3, _x4, _x5) {
84
87
  return _ref2.apply(this, arguments);
85
88
  };
86
89
  }();
@@ -89,25 +92,26 @@ function SignPage(props) {
89
92
  timerRef.current = null;
90
93
  };
91
94
  useEffect(function () {
92
- if (isShowSignPage) {
93
- handleRes();
94
- }
95
- }, [isShowSignPage]);
95
+ init();
96
+ }, []);
96
97
  useEffect(function () {
97
- if (srcUrl && documentId && contractId && name && token && !timerRef.current) {
98
+ if (srcUrl && documentId && contractId && name && token && baseUrl && !timerRef.current) {
98
99
  handleClearInterval();
99
100
  timerRef.current = setInterval(function () {
100
- getSignedFile(documentId, contractId, name, token);
101
+ getSignedFile(documentId, contractId, name, token, baseUrl);
101
102
  }, 3000);
102
103
  }
103
- }, [srcUrl, documentId, contractId, name, token]);
104
+ return function () {
105
+ handleClearInterval();
106
+ };
107
+ }, [srcUrl, documentId, contractId, name, token, baseUrl]);
104
108
  return /*#__PURE__*/React.createElement("div", {
105
109
  className: "sign_page"
106
110
  }, /*#__PURE__*/React.createElement("iframe", {
107
111
  src: srcUrl,
108
112
  id: "iframe",
109
113
  frameborder: "0",
110
- height: "500px",
114
+ height: "100%",
111
115
  width: "100%"
112
116
  }));
113
117
  }
@@ -257,13 +257,13 @@ function getSignUrl(userInfo, token) {
257
257
  // 下方是打开手写签批页面后 的后续操作
258
258
 
259
259
  // 对外的方法 获取签批后的文件
260
- export function getSignRes(_x6, _x7, _x8, _x9, _x0) {
260
+ export function getSignRes(_x6, _x7, _x8, _x9, _x0, _x1) {
261
261
  return _getSignRes.apply(this, arguments);
262
262
  }
263
263
 
264
264
  // 轮询 签批状态
265
265
  function _getSignRes() {
266
- _getSignRes = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(documentIdVal, contractIdVal, name, autoUpload, token) {
266
+ _getSignRes = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(documentIdVal, contractIdVal, name, autoUpload, token, baseUrl) {
267
267
  var isSignSucc, newFile, uploadedFileObj;
268
268
  return _regeneratorRuntime.wrap(function (_context3) {
269
269
  while (1) switch (_context3.prev = _context3.next) {
@@ -289,7 +289,7 @@ function _getSignRes() {
289
289
  break;
290
290
  }
291
291
  _context3.next = 3;
292
- return uploadFilePromise(newFile, token);
292
+ return uploadFilePromise(newFile, baseUrl, token);
293
293
  case 3:
294
294
  uploadedFileObj = _context3.sent;
295
295
  console.log('签批完成后的文件地址', uploadedFileObj);
@@ -173,6 +173,7 @@ var SceneTree = function SceneTree(_ref) {
173
173
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(FormItem, {
174
174
  name: "baseUser",
175
175
  label: node.title,
176
+ labelTextAlign: "left",
176
177
  required: true,
177
178
  style: {
178
179
  borderBottom: node.children && node.children.length ? '1px solid #EEEEEE' : '',
package/lib/api.js CHANGED
@@ -2,15 +2,18 @@
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
  exports.__esModule = true;
5
- exports.signurl = exports.signFileDownApi = exports.qrySealApi = exports.post = exports.getSealUrlApi = exports.get = exports.documentDownload = exports.createbycategory = exports.contractSignUrl = exports.contractFinish = exports.checkSignState = void 0;
5
+ exports.signurl = exports.signFileDownApi = exports.qrySealApi = exports.previewApi = exports.post = exports.getSignOrderIdApi = exports.getSealUrlApi = exports.get = exports.documentDownload = exports.createbycategory = exports.contractSignUrl = exports.contractFinish = exports.checkSignState = void 0;
6
6
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
7
7
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
8
8
  var post = exports.post = /*#__PURE__*/function () {
9
- var _ref = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(url, data, config) {
9
+ var _ref = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(url, data, config, noJson) {
10
10
  var res;
11
11
  return _regenerator["default"].wrap(function (_context) {
12
12
  while (1) switch (_context.prev = _context.next) {
13
13
  case 0:
14
+ if (noJson === void 0) {
15
+ noJson = false;
16
+ }
14
17
  _context.next = 1;
15
18
  return fetch(url, {
16
19
  method: 'POST',
@@ -21,7 +24,8 @@ var post = exports.post = /*#__PURE__*/function () {
21
24
  },
22
25
  body: JSON.stringify(data)
23
26
  }).then(function (response) {
24
- return response.json();
27
+ console.log('response', response, response.body);
28
+ return noJson ? response.text() : response.json();
25
29
  }).then(function (res) {
26
30
  return res;
27
31
  })["catch"](function (err) {
@@ -36,7 +40,7 @@ var post = exports.post = /*#__PURE__*/function () {
36
40
  }
37
41
  }, _callee);
38
42
  }));
39
- return function post(_x, _x2, _x3) {
43
+ return function post(_x, _x2, _x3, _x4) {
40
44
  return _ref.apply(this, arguments);
41
45
  };
42
46
  }();
@@ -68,7 +72,7 @@ var get = exports.get = /*#__PURE__*/function () {
68
72
  }
69
73
  }, _callee2);
70
74
  }));
71
- return function get(_x4, _x5, _x6) {
75
+ return function get(_x5, _x6, _x7) {
72
76
  return _ref2.apply(this, arguments);
73
77
  };
74
78
  }();
@@ -101,15 +105,24 @@ var documentDownload = exports.documentDownload = function documentDownload(para
101
105
  return post("https://zwfwpt.sxzwfw.gov.cn/DeclarationAPI/declaration/center/signapproval/api/documentDownload", params, config);
102
106
  };
103
107
  var qrySealApi = exports.qrySealApi = function qrySealApi(params, config) {
104
- return post("https://zwfwpt.sxzwfw.gov.cn/DeclarationAPI/declaration/center/sign/api/qrySeal", params, config);
108
+ return post(config.baseUrl + "/declaration/center/sign/api/qrySeal", params, config);
105
109
  };
106
110
 
111
+ // 获取电子签章页面
112
+ var getSignOrderIdApi = exports.getSignOrderIdApi = function getSignOrderIdApi(params, config) {
113
+ return post(config.baseUrl + "/declaration/center/sign/api/outSignCreateSiggOrder", params, config);
114
+ };
107
115
  // 获取电子签章页面
108
116
  var getSealUrlApi = exports.getSealUrlApi = function getSealUrlApi(params, config) {
109
- return post("https://zwfwpt.sxzwfw.gov.cn/DeclarationAPI/declaration/center/sign/api/signWebByDirect", params, config);
117
+ return post(config.baseUrl + "/declaration/center/sign/api/signWebByDirectMobile", params, config, true);
110
118
  };
111
119
 
112
120
  // 电子签章-下载文件
113
121
  var signFileDownApi = exports.signFileDownApi = function signFileDownApi(params, config) {
114
- return post("https://zwfwpt.sxzwfw.gov.cn/DeclarationAPI/declaration/center/sign/api/fileDownloadBySign", params, config);
122
+ return post(config.baseUrl + "declaration/center/sign/api/fileDownloadBySign", params, config);
123
+ };
124
+
125
+ // 预览
126
+ var previewApi = exports.previewApi = function previewApi(params, config) {
127
+ return post("https://zwfwpt.sxzwfw.gov.cn/DeclarationAPI/declaration/center/sign/api/preview", params, config);
115
128
  };
@@ -101,18 +101,17 @@ function dataURLtoBlob(dataUrl) {
101
101
  }
102
102
 
103
103
  // 上传文件至申报端的服务器 [方法]
104
- function uploadFilePromise(url, token) {
105
- // const { baseURL } = apiConfig
104
+ function uploadFilePromise(url, baseUrl, token) {
106
105
  return new Promise(function (resolve, reject) {
107
106
  var formData = new FormData();
108
107
  formData.append('file', url);
109
108
  formData.append('open', true);
110
109
  formData.append('open', 'true');
111
- fetch('http://172.16.132.12:5005/declaration/material/file/files/api', {
110
+ fetch(baseUrl + "/declaration/material/file/files/api", {
112
111
  method: 'POST',
113
112
  body: formData,
114
113
  header: {
115
- // Authorization: 'rjvntrnggysagvpqhi7qfasqpd2hz736qap5vkikjgni3h3g4a5gcsawoooosvb2523mo5ifltk22vdki2u5q6vd2ceefhy5sk6e2kofxadn354ridcbcypgqgcljs27bhdnviiza7hdnbnwlh6e4yxe45kapm7y3wb6qqod5wysmjirbl6iwtaz3tzve7rdxq6blrfdqygjsfi5iosrwmpiumocr52tufnpcan2hdzydamjvbso2hmbrp32aymb2cahlcv2liswbhpwiqvf72anhnyycoyr3lwfp4xufasn7cbb2sxq'
114
+ Authorization: token
116
115
  }
117
116
  }).then(function (response) {
118
117
  return response.json();
@@ -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="24" height="24" viewBox="0 0 24 24"><defs><clipPath id="master_svg0_106_93607"><rect x="0" y="0" width="24" height="24" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_106_93607)"><path d="M10.62774178125,12.00024228125L3.78474200125,5.15724198125C3.40573692325,4.77823618125,3.40573692325,4.16374743125,3.7847423512500002,3.7847423512500002C4.16374779125,3.40573692325,4.77823648125,3.40573692325,5.15724198125,3.78474200125L12.00024228125,10.62774178125L18.843241281250002,3.78474200125C19.222301281249997,3.40605306625,19.83653228125,3.40620327025,20.21540428125,3.78507745125C20.59428028125,4.16395199125,20.59443128125,4.77818178125,20.21574428125,5.15724198125L13.37274168125,12.00024228125L20.21574028125,18.843241281250002C20.59474528125,19.22224728125,20.59474528125,19.83673828125,20.21574028125,20.21574028125C19.83673428125,20.59474528125,19.22224428125,20.59474528125,18.843241281250002,20.21574428125L12.00024228125,13.37274168125L5.15724198125,20.21574428125C4.77818178125,20.59443128125,4.16395163125,20.59428028125,3.78507709125,20.21540428125C3.40620291225,19.83653228125,3.40605306625,19.222301281249997,3.78474200125,18.843241281250002L10.62774178125,12.00024228125Z" fill="#FFFFFF" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></svg>
@@ -4,24 +4,29 @@ export interface FileItemProps {
4
4
  /**
5
5
  * 标题
6
6
  */
7
- file: string;
7
+ fileUrl: string;
8
8
  fileName: string;
9
+ fileId: string;
9
10
  fileType: string;
10
11
  guideImg: string;
11
12
  checkImg: string;
12
- approvalUrl: string;
13
- signatureUrl: string;
13
+ signatureEnable: boolean;
14
+ signEnable: boolean;
14
15
  token: string;
15
16
  accessToken: string;
16
- isApproval: boolean;
17
- isSignature: boolean;
17
+ isSigned: boolean;
18
+ isSealed: boolean;
18
19
  materialList: any[];
19
20
  maxFileSize: number;
20
21
  isInValid: boolean;
21
22
  isShowLib: boolean;
22
23
  userInfo: any;
24
+ baseUrl: string;
23
25
  del: () => void;
26
+ handleSeal: () => void;
27
+ handleSign: () => void;
24
28
  valChange: (value: any) => void;
29
+ download: (value: any) => void;
25
30
  }
26
31
  declare const FileItem: React.FC<FileItemProps>;
27
32
  export default FileItem;