ydb-components-material 0.1.96 → 0.1.98

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 (82) hide show
  1. package/build/docs/120.7b74d4ab.async.js +1 -0
  2. package/build/docs/404.html +3 -3
  3. package/build/docs/608.bbe7d3e1.async.js +1 -0
  4. package/build/docs/856.8be8ecec.async.js +1 -0
  5. package/build/docs/_demos/:uuid +3 -3
  6. package/build/docs/colorful-button.html +3 -3
  7. package/build/docs/colorful-input.html +3 -3
  8. package/build/docs/index.html +3 -3
  9. package/build/docs/umi.19ae92a3.js +1 -0
  10. package/build/docs/{umi.96fb6893.css → umi.6979d68b.css} +1 -1
  11. package/build/docs/~demos/:uuid.html +3 -3
  12. package/build/docs/~demos/colorful-button-demo.html +3 -3
  13. package/build/docs/~demos/colorful-input-demo.html +3 -3
  14. package/build/lowcode/3.js +16 -0
  15. package/build/lowcode/4.js +3 -0
  16. package/build/lowcode/5.js +20 -0
  17. package/build/lowcode/assets-daily.json +11 -11
  18. package/build/lowcode/assets-dev.json +2 -2
  19. package/build/lowcode/assets-prod.json +11 -11
  20. package/build/lowcode/index.js +1 -1
  21. package/build/lowcode/meta.js +1 -1
  22. package/build/lowcode/preview.js +16 -16
  23. package/build/lowcode/render/default/1.js +16 -0
  24. package/build/lowcode/render/default/2.js +3 -0
  25. package/build/lowcode/render/default/3.js +20 -0
  26. package/build/lowcode/render/default/view.css +1 -1
  27. package/build/lowcode/render/default/view.js +294 -2
  28. package/build/lowcode/view.css +1 -1
  29. package/build/lowcode/view.js +294 -2
  30. package/dist/1.js +17 -0
  31. package/dist/1.js.map +1 -0
  32. package/dist/2.js +4 -0
  33. package/dist/2.js.map +1 -0
  34. package/dist/3.js +21 -0
  35. package/dist/3.js.map +1 -0
  36. package/dist/BizComps.css +1 -1
  37. package/dist/BizComps.js +297 -5
  38. package/dist/BizComps.js.map +1 -1
  39. package/es/components/drag-drop/icons/preview.svg +1 -0
  40. package/es/components/drag-drop/index.d.ts +17 -0
  41. package/es/components/drag-drop/index.js +306 -0
  42. package/es/components/drag-drop/index.scss +130 -0
  43. package/es/components/file-list/checkPoint.js +6 -9
  44. package/es/components/file-list/index.js +83 -6
  45. package/es/components/file-list/index.scss +13 -0
  46. package/es/components/file-list/item.js +18 -8
  47. package/es/components/file-list/merge.d.ts +18 -0
  48. package/es/components/file-list/merge.js +313 -0
  49. package/es/components/file-list/merge.scss +137 -0
  50. package/es/components/file-list/sealUtil.js +9 -3
  51. package/es/components/scene-tree/index.js +2 -0
  52. package/es/components/scene-tree/index.scss +1 -0
  53. package/es/index.d.ts +2 -0
  54. package/es/index.js +1 -0
  55. package/lib/components/drag-drop/icons/preview.svg +1 -0
  56. package/lib/components/drag-drop/index.d.ts +17 -0
  57. package/lib/components/drag-drop/index.js +314 -0
  58. package/lib/components/drag-drop/index.scss +130 -0
  59. package/lib/components/file-list/checkPoint.js +6 -9
  60. package/lib/components/file-list/index.js +84 -7
  61. package/lib/components/file-list/index.scss +13 -0
  62. package/lib/components/file-list/item.js +18 -8
  63. package/lib/components/file-list/merge.d.ts +18 -0
  64. package/lib/components/file-list/merge.js +321 -0
  65. package/lib/components/file-list/merge.scss +137 -0
  66. package/lib/components/file-list/sealUtil.js +9 -3
  67. package/lib/components/scene-tree/index.js +2 -0
  68. package/lib/components/scene-tree/index.scss +1 -0
  69. package/lib/index.d.ts +2 -0
  70. package/lib/index.js +3 -1
  71. package/lowcode/drag-drop-list/meta.ts +159 -0
  72. package/lowcode/file-list/meta.ts +14 -0
  73. package/lowcode_es/drag-drop-list/meta.d.ts +22 -0
  74. package/lowcode_es/drag-drop-list/meta.js +145 -0
  75. package/lowcode_es/file-list/meta.js +13 -0
  76. package/lowcode_es/meta.js +3 -2
  77. package/lowcode_lib/drag-drop-list/meta.d.ts +22 -0
  78. package/lowcode_lib/drag-drop-list/meta.js +150 -0
  79. package/lowcode_lib/file-list/meta.js +13 -0
  80. package/lowcode_lib/meta.js +18 -17
  81. package/package.json +5 -3
  82. package/build/docs/umi.19926380.js +0 -1
@@ -105,7 +105,9 @@ var FileItem = function FileItem(_ref) {
105
105
  var _useState14 = useState(''),
106
106
  thumbnail = _useState14[0],
107
107
  setThumbnail = _useState14[1]; // 缩略图
108
-
108
+ var _useState15 = useState(),
109
+ sealedFile = _useState15[0],
110
+ setSealedFile = _useState15[1];
109
111
  var upload = function upload() {
110
112
  if (disabled) return;
111
113
  var inputEl = document.createElement('input');
@@ -312,10 +314,12 @@ var FileItem = function FileItem(_ref) {
312
314
  // 获取签章结果
313
315
  var getSealRes = function getSealRes(val) {
314
316
  console.log('sealval---', val);
315
- valChange(val, fileIndex, index, subIndex);
316
317
  // 如果还允许签批 就连住一起做了
317
318
  if (signatureEnable) {
319
+ setSealedFile(val);
318
320
  sign();
321
+ } else {
322
+ valChange(val, fileIndex, index, subIndex);
319
323
  }
320
324
  };
321
325
  var queryFileLibs = function queryFileLibs() {
@@ -480,12 +484,16 @@ var FileItem = function FileItem(_ref) {
480
484
  valChange(undefined, fileIndex, index, subIndex);
481
485
  };
482
486
  useEffect(function () {
487
+ var timer;
483
488
  if (userInfo && tokenTY) {
484
489
  console.log('userInfo', tokenTY, userInfo);
485
- setTimeout(function () {
490
+ timer = setTimeout(function () {
486
491
  queryFileLibs();
487
492
  }, 0);
488
493
  }
494
+ return function () {
495
+ timer && clearTimeout(timer);
496
+ };
489
497
  }, [userInfo, tokenTY]);
490
498
 
491
499
  // 获取缩略图
@@ -662,9 +670,11 @@ var FileItem = function FileItem(_ref) {
662
670
  className: "blocks"
663
671
  }, /*#__PURE__*/React.createElement("div", {
664
672
  className: "status"
665
- }, isSigned && /*#__PURE__*/React.createElement("div", {
673
+ }, isSigned && isSealed && /*#__PURE__*/React.createElement("div", {
674
+ className: "status_item"
675
+ }, "\u5DF2\u7B7E\u7F72"), isSigned && !isSealed && /*#__PURE__*/React.createElement("div", {
666
676
  className: "status_item"
667
- }, "\u5DF2\u7B7E\u6279"), isSealed && /*#__PURE__*/React.createElement("div", {
677
+ }, "\u5DF2\u7B7E\u6279"), isSealed && !isSigned && /*#__PURE__*/React.createElement("div", {
668
678
  className: "status_item"
669
679
  }, "\u5DF2\u7B7E\u7AE0")), fileUrl && /*#__PURE__*/React.createElement("div", {
670
680
  className: "btns"
@@ -703,10 +713,10 @@ var FileItem = function FileItem(_ref) {
703
713
  }, isSigned && isSealed ? '重新签署' : '签署文件'), !(userInfo.acctType === '20' && signEnable) && signatureEnable && /*#__PURE__*/React.createElement("div", {
704
714
  className: "operation_btn",
705
715
  onClick: sign
706
- }, isSigned ? '重新签批' : '手写签批'), !signatureEnable && userInfo.acctType === '20' && signEnable && /*#__PURE__*/React.createElement("div", {
716
+ }, isSigned ? '重新签批' : '签署文件'), !signatureEnable && userInfo.acctType === '20' && signEnable && /*#__PURE__*/React.createElement("div", {
707
717
  className: "operation_btn",
708
718
  onClick: seal
709
- }, isSealed ? '重新签章' : '电子签章')) :
719
+ }, isSealed ? '重新签章' : '签署文件')) :
710
720
  // 展示材料库
711
721
  !isShareFile && !isSmart && !disabled && !!materialLib.length && /*#__PURE__*/React.createElement("div", {
712
722
  className: "operation_btn",
@@ -781,7 +791,7 @@ var FileItem = function FileItem(_ref) {
781
791
  }, "\u786E\u5B9A")))), isShowSignPage && /*#__PURE__*/React.createElement(SignPage, {
782
792
  isShowSignPage: isShowSignPage,
783
793
  userInfo: userInfo,
784
- file: file,
794
+ file: sealedFile || file,
785
795
  token: token,
786
796
  tokenTY: tokenTY,
787
797
  baseUrl: baseUrl,
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import './merge.scss';
3
+ export interface MergeProps {
4
+ /**
5
+ * 类型
6
+ */
7
+ fileList: Array<object>;
8
+ valChange?: (value: any) => void;
9
+ close?: () => void;
10
+ style?: object;
11
+ baseUrl: string;
12
+ tokenTY: string;
13
+ materialName: string;
14
+ openLoading: () => void;
15
+ closeLoading: () => void;
16
+ }
17
+ declare const Merge: React.FC<MergeProps>;
18
+ export default Merge;
@@ -0,0 +1,313 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
4
+ import * as React from 'react';
5
+ import { useState } from 'react'; // 1. 引入 useState
6
+ import previewIcon from "./icon/preview.svg";
7
+ import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
8
+ import { ExclamationCircleFilled, HolderOutlined, CloseOutlined, VerticalAlignTopOutlined } from '@ant-design/icons';
9
+ import jsPDF from 'jspdf';
10
+ import "./merge.scss";
11
+ var Merge = function Merge(_ref) {
12
+ var fileList = _ref.fileList,
13
+ valChange = _ref.valChange,
14
+ _ref$style = _ref.style,
15
+ style = _ref$style === void 0 ? {} : _ref$style,
16
+ baseUrl = _ref.baseUrl,
17
+ materialName = _ref.materialName,
18
+ tokenTY = _ref.tokenTY,
19
+ openLoading = _ref.openLoading,
20
+ closeLoading = _ref.closeLoading,
21
+ close = _ref.close;
22
+ var _useState = useState(''),
23
+ viewUrl = _useState[0],
24
+ setViewUrl = _useState[1];
25
+ var _useState2 = useState(''),
26
+ viewPdfUrl = _useState2[0],
27
+ setViewPdfUrl = _useState2[1];
28
+ var _useState3 = useState(null),
29
+ blob = _useState3[0],
30
+ setBlob = _useState3[1];
31
+ var _useState4 = useState(fileList),
32
+ materialList = _useState4[0],
33
+ setMaterialList = _useState4[1];
34
+
35
+ // 置顶
36
+ var top = function top(index) {
37
+ console.log('置顶');
38
+ var newItems = Array.from(materialList);
39
+
40
+ // 4. 移除被拖拽的元素
41
+ var _newItems$splice = newItems.splice(index, 1),
42
+ removed = _newItems$splice[0];
43
+
44
+ // 5. 将元素插入到新的位置
45
+ newItems.splice(0, 0, removed);
46
+
47
+ // 6. 更新状态,触发重新渲染
48
+ // setItems(newItems);
49
+ setMaterialList(newItems);
50
+ };
51
+ var onDragEnd = function onDragEnd(result) {
52
+ // 如果没有目标位置(比如拖拽到容器外),则不处理
53
+ if (!result.destination) return;
54
+
55
+ // 如果源位置和目标位置相同,也不处理
56
+ if (result.source.index === result.destination.index) return;
57
+
58
+ // 3. 创建一个新的数组副本
59
+ var newItems = Array.from(materialList);
60
+
61
+ // 4. 移除被拖拽的元素
62
+ var _newItems$splice2 = newItems.splice(result.source.index, 1),
63
+ removed = _newItems$splice2[0];
64
+
65
+ // 5. 将元素插入到新的位置
66
+ newItems.splice(result.destination.index, 0, removed);
67
+
68
+ // 6. 更新状态,触发重新渲染
69
+ // setItems(newItems);
70
+ setMaterialList(newItems);
71
+ console.log('拖拽完成,新顺序:', newItems);
72
+ };
73
+
74
+ // File 文件转 Image 对象
75
+ var getImageByFile = function getImageByFile(file) {
76
+ return new Promise(function (resolve) {
77
+ var reader = new FileReader();
78
+ reader.onload = function (e) {
79
+ var img = new Image();
80
+ img.src = e.target.result;
81
+ img.onload = function () {
82
+ return resolve(img);
83
+ };
84
+ };
85
+ reader.readAsDataURL(file);
86
+ });
87
+ };
88
+
89
+ // 下载文件
90
+ var getBlob = function getBlob(url) {
91
+ return new Promise(function (resolve, reject) {
92
+ var xhr = new XMLHttpRequest();
93
+ xhr.open('GET', url, true);
94
+ xhr.responseType = 'blob';
95
+ xhr.onload = function () {
96
+ if (xhr.status === 200) {
97
+ resolve(xhr.response);
98
+ } else {
99
+ reject("Request failed with status " + xhr.status);
100
+ }
101
+ };
102
+ xhr.onerror = function () {
103
+ reject('Request failed');
104
+ };
105
+ xhr.send();
106
+ });
107
+ };
108
+
109
+ // 核心:多张图片合并PDF
110
+ var imgsToPdf = /*#__PURE__*/function () {
111
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
112
+ var pdf, i, fileUrl, _blob, file, img, targetWidth, scale, targetHeight, pdfBlob, blobUrl;
113
+ return _regeneratorRuntime.wrap(function (_context) {
114
+ while (1) switch (_context.prev = _context.next) {
115
+ case 0:
116
+ // 初始化PDF,纵向、A4
117
+ pdf = new jsPDF({
118
+ orientation: 'portrait',
119
+ unit: 'px',
120
+ format: 'a4'
121
+ }); // 遍历所有图片
122
+ i = 0;
123
+ case 1:
124
+ if (!(i < materialList.length)) {
125
+ _context.next = 5;
126
+ break;
127
+ }
128
+ fileUrl = materialList[i].fileUrl;
129
+ _context.next = 2;
130
+ return getBlob(fileUrl);
131
+ case 2:
132
+ _blob = _context.sent;
133
+ console.log(_blob);
134
+ file = new File([_blob], "img" + i, {
135
+ type: 'image/png'
136
+ });
137
+ console.log(file);
138
+ _context.next = 3;
139
+ return getImageByFile(file);
140
+ case 3:
141
+ img = _context.sent;
142
+ // 3. 计算可用宽度(保留边距)
143
+ targetWidth = 400; // 4. 按比例计算高度
144
+ scale = targetWidth / img.width;
145
+ targetHeight = img.height * scale; // 第一张不加新页,后续图片新增一页
146
+ if (i > 0) pdf.addPage();
147
+
148
+ // 图片写入PDF
149
+ pdf.addImage(img, 'PNG',
150
+ // 格式 JPEG/PNG
151
+ 0, 0,
152
+ // x y 坐标
153
+ // A4_W, A4_H
154
+ targetWidth, targetHeight);
155
+ case 4:
156
+ i++;
157
+ _context.next = 1;
158
+ break;
159
+ case 5:
160
+ // 1. 获取 Blob
161
+ pdfBlob = pdf.output('blob');
162
+ setBlob(pdfBlob);
163
+
164
+ // 2. 创建 Blob URL
165
+ blobUrl = URL.createObjectURL(pdfBlob);
166
+ setViewPdfUrl(blobUrl);
167
+ case 6:
168
+ case "end":
169
+ return _context.stop();
170
+ }
171
+ }, _callee);
172
+ }));
173
+ return function imgsToPdf() {
174
+ return _ref2.apply(this, arguments);
175
+ };
176
+ }();
177
+ var uploadPdf = /*#__PURE__*/function () {
178
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
179
+ var formData;
180
+ return _regeneratorRuntime.wrap(function (_context2) {
181
+ while (1) switch (_context2.prev = _context2.next) {
182
+ case 0:
183
+ openLoading();
184
+ formData = new FormData();
185
+ formData.append('file', blob, materialName + '.pdf');
186
+ formData.append('open', true);
187
+ fetch(baseUrl + "/declaration/material/file/files/api", {
188
+ method: 'POST',
189
+ body: formData,
190
+ headers: {
191
+ 'Authorization': tokenTY || ''
192
+ }
193
+ }).then(function (response) {
194
+ return response.json();
195
+ }).then(function (res) {
196
+ console.log(res);
197
+ valChange(_extends({}, res, {
198
+ fileName: materialName + '.pdf'
199
+ }));
200
+ closeLoading();
201
+ });
202
+ case 1:
203
+ case "end":
204
+ return _context2.stop();
205
+ }
206
+ }, _callee2);
207
+ }));
208
+ return function uploadPdf() {
209
+ return _ref3.apply(this, arguments);
210
+ };
211
+ }();
212
+ return /*#__PURE__*/React.createElement("div", {
213
+ className: "drag_drop",
214
+ style: style
215
+ }, /*#__PURE__*/React.createElement("div", {
216
+ className: "tip"
217
+ }, /*#__PURE__*/React.createElement(ExclamationCircleFilled, {
218
+ size: 14,
219
+ style: {
220
+ marginTop: '4px'
221
+ }
222
+ }), "\u8BF7\u5BF9\u7167\u6750\u6599\u9875\u7801\u987A\u5E8F\u4F9D\u6B21\u6392\u5217\u56FE\u7247\uFF0C\u672A\u6309\u89C4\u8303\u63D0\u4EA4\u7684\u6750\u6599\uFF0C\u5C06\u5F71\u54CD\u5BA1\u6838\u7ED3\u679C"), /*#__PURE__*/React.createElement("p", {
223
+ className: "text"
224
+ }, "\u957F\u6309\u5217\u8868\u62D6\u52A8\u6392\u5E8F"), /*#__PURE__*/React.createElement(DragDropContext, {
225
+ onDragEnd: onDragEnd
226
+ }, /*#__PURE__*/React.createElement(Droppable, {
227
+ droppableId: "droppable"
228
+ }, function (provided) {
229
+ return /*#__PURE__*/React.createElement("div", _extends({}, provided.droppableProps, {
230
+ ref: provided.innerRef
231
+ }), materialList.map(function (item, index) {
232
+ return /*#__PURE__*/React.createElement(Draggable, {
233
+ key: item.fileId,
234
+ draggableId: item.fileId,
235
+ index: index
236
+ }, function (provided) {
237
+ return /*#__PURE__*/React.createElement("div", _extends({
238
+ ref: provided.innerRef
239
+ }, provided.draggableProps, provided.dragHandleProps, {
240
+ className: "dragable",
241
+ style: _extends({}, provided.draggableProps.style)
242
+ }), /*#__PURE__*/React.createElement(HolderOutlined, {
243
+ style: {
244
+ fontSize: '20px'
245
+ }
246
+ }), /*#__PURE__*/React.createElement("img", {
247
+ className: "img",
248
+ src: item.fileUrl,
249
+ alt: ""
250
+ }), /*#__PURE__*/React.createElement("div", {
251
+ className: "info"
252
+ }, /*#__PURE__*/React.createElement("div", {
253
+ className: "name"
254
+ }, item.fileName), /*#__PURE__*/React.createElement("div", {
255
+ className: "view",
256
+ onClick: function onClick() {
257
+ return setViewUrl(item.fileUrl);
258
+ }
259
+ }, /*#__PURE__*/React.createElement("img", {
260
+ src: previewIcon,
261
+ alt: ""
262
+ }), "\u9884\u89C8")), /*#__PURE__*/React.createElement("div", {
263
+ className: "top",
264
+ onClick: function onClick() {
265
+ return top(index);
266
+ }
267
+ }, /*#__PURE__*/React.createElement(VerticalAlignTopOutlined, null)));
268
+ });
269
+ }), provided.placeholder);
270
+ })), /*#__PURE__*/React.createElement("div", {
271
+ className: "bottom_btn"
272
+ }, /*#__PURE__*/React.createElement("div", {
273
+ className: "previous btn",
274
+ onClick: close
275
+ }, "\u4E0A\u4E00\u6B65"), /*#__PURE__*/React.createElement("div", {
276
+ className: "preview btn",
277
+ onClick: imgsToPdf
278
+ }, "\u9884\u89C8\u6750\u6599")), viewUrl && /*#__PURE__*/React.createElement("div", {
279
+ className: "viewImg"
280
+ }, /*#__PURE__*/React.createElement(CloseOutlined, {
281
+ className: "close",
282
+ onClick: function onClick() {
283
+ return setViewUrl('');
284
+ }
285
+ }), /*#__PURE__*/React.createElement("img", {
286
+ className: "view",
287
+ src: viewUrl,
288
+ alt: ""
289
+ })), viewPdfUrl && /*#__PURE__*/React.createElement("div", {
290
+ className: "view_pdf"
291
+ }, /*#__PURE__*/React.createElement("iframe", {
292
+ src: viewPdfUrl + '#toolbar=0&navpanes=0&scrollbar=0&messages=0&statusbar=0',
293
+ id: "iframe",
294
+ frameBorder: "0",
295
+ height: "95%",
296
+ width: "100%"
297
+ }), /*#__PURE__*/React.createElement("div", {
298
+ className: "bottom_btn",
299
+ style: {
300
+ background: '#fff',
301
+ paddingTop: '20px'
302
+ }
303
+ }, /*#__PURE__*/React.createElement("div", {
304
+ className: "previous btn",
305
+ onClick: function onClick() {
306
+ return setViewPdfUrl('');
307
+ }
308
+ }, "\u8FD4\u56DE\u4FEE\u6539"), /*#__PURE__*/React.createElement("div", {
309
+ className: "preview btn",
310
+ onClick: uploadPdf
311
+ }, "\u786E\u8BA4\u65E0\u8BEF"))));
312
+ };
313
+ export default Merge;
@@ -0,0 +1,137 @@
1
+ .drag_drop {
2
+ position: fixed;
3
+ top: 0;
4
+ left: 0;
5
+ width: 100%;
6
+ height: 100%;
7
+ background: #F7F7F7;
8
+ z-index: 9;
9
+ .tip {
10
+ background: #FFF6E8;
11
+ padding: 12px;
12
+ color: #F29655;
13
+ font-size: 14px;
14
+ display: flex;
15
+ gap: 8px;
16
+ }
17
+
18
+ .text {
19
+ color: #999999;
20
+ font-size: 14px;
21
+ margin: 8px 12px;
22
+ }
23
+
24
+ .dragable {
25
+ padding: 12px;
26
+ border-radius: 8px;
27
+ background: #fff;
28
+ display: flex;
29
+ gap: 15px;
30
+ align-items: center;
31
+ margin: 0 12px;
32
+ margin-bottom: 12px;
33
+
34
+ .img {
35
+ width: 50px;
36
+ }
37
+
38
+ .info {
39
+ .name {
40
+ font-size: 14px;
41
+ color: #333333;
42
+ margin-bottom: 25px;
43
+ }
44
+
45
+ .view {
46
+ color: #1678FF;
47
+ font-size: 14px;
48
+ display: flex;
49
+ align-items: center;
50
+ gap: 4px;
51
+ }
52
+
53
+
54
+ }
55
+ .top {
56
+ margin-left: auto;
57
+ width: 30px;
58
+ height: 30px;
59
+ border-radius: 8px;
60
+ opacity: 1;
61
+ background: #F7F7F7;
62
+ display: flex;
63
+ align-items: center;
64
+ justify-content: center;
65
+ font-size: 20px;
66
+ color: #666666;
67
+ }
68
+ }
69
+
70
+ .bottom_btn {
71
+ display: flex;
72
+ justify-content: center;
73
+ gap: 15px;
74
+ position: fixed;
75
+ bottom: 0;
76
+ width: 100%;
77
+ padding-bottom: 20px;
78
+
79
+ .btn {
80
+ text-align: center;
81
+ line-height: 40px;
82
+ }
83
+
84
+ .previous {
85
+ width: 45%;
86
+ height: 40px;
87
+ border-radius: 50px;
88
+ opacity: 1;
89
+ background: rgb(255, 255, 255);
90
+ color: rgb(51, 51, 51);
91
+ border: 1px solid rgb(231, 231, 231);
92
+ font-size: 16px;
93
+ font-weight: 500;
94
+ }
95
+
96
+ .preview {
97
+ width: 45%;
98
+ height: 40px;
99
+ border-radius: 50px;
100
+ opacity: 1;
101
+ color: rgb(255, 255, 255);
102
+ font-size: 16px;
103
+ font-weight: 500;
104
+ background: linear-gradient(90deg, rgb(115, 174, 255) 0%, rgb(22, 120, 255) 100%);
105
+ }
106
+ }
107
+ .view_pdf {
108
+ position: fixed;
109
+ top: 0;
110
+ left: 0;
111
+ width: 100%;
112
+ height: 100%;
113
+ z-index: 9;
114
+ }
115
+ .viewImg {
116
+ background-color: #3333336a;
117
+ position: fixed;
118
+ top: 0;
119
+ left: 0;
120
+ width: 100%;
121
+ height: 100%;
122
+ // z-index: 9999;
123
+
124
+ .close {
125
+ position: absolute;
126
+ right: 20px;
127
+ top: 20px;
128
+ font-size: 30px;
129
+ color: #fff;
130
+ }
131
+
132
+ .view {
133
+ width: 100%;
134
+ margin-top: 40%;
135
+ }
136
+ }
137
+ }
@@ -56,7 +56,7 @@ function _initSealPageMethod() {
56
56
  return _context.abrupt("return", false);
57
57
  case 6:
58
58
  _context.next = 7;
59
- return getMobilePageFun(orderId, config);
59
+ return getMobilePageFun(orderId, config, fileObj, fileUrl);
60
60
  case 7:
61
61
  pageUrl = _context.sent;
62
62
  // 将 电子签章地址/文件名称 返回
@@ -211,7 +211,7 @@ function getSignOrderId(sealList, fileObj, esusFileUrl, userInfo, config) {
211
211
  }
212
212
 
213
213
  // [第 4 步 - 移动端] 获取电子印章页面
214
- function getMobilePageFun(orderId, config) {
214
+ function getMobilePageFun(orderId, config, fileObj, fileUrl) {
215
215
  // uni.showLoading({ title: '获取移动端签章页面中' })
216
216
  var params = {
217
217
  accessToken: config.accessToken,
@@ -220,7 +220,13 @@ function getMobilePageFun(orderId, config) {
220
220
  };
221
221
  return new Promise(function (resolve) {
222
222
  if (config.isPC) {
223
- getPcSealUrlApi(params, config).then(function (res) {
223
+ var paramsForPc = {
224
+ accessToken: config.accessToken,
225
+ acctType: '20',
226
+ docURL: fileUrl,
227
+ name: fileObj.fileName
228
+ };
229
+ getPcSealUrlApi(paramsForPc, config).then(function (res) {
224
230
  console.log('签章页面 pc----', res);
225
231
  if (res.code === 200) {
226
232
  resolve(res.data);
@@ -173,6 +173,7 @@ var SceneTree = function SceneTree(_ref) {
173
173
  id: option.pid + "+" + node.pid,
174
174
  key: option.id + node.pid + option.value + index,
175
175
  value: option.id,
176
+ disabled: node.disabled,
176
177
  style: isOverFlow && index > 0 ? {
177
178
  width: '100%',
178
179
  marginTop: '10px'
@@ -188,6 +189,7 @@ var SceneTree = function SceneTree(_ref) {
188
189
  id: option.pid + "+" + node.pid,
189
190
  key: option.id + node.pid + option.value + index,
190
191
  value: option.id,
192
+ disabled: node.disabled,
191
193
  style: isOverFlow && index > 0 ? {
192
194
  width: '100%',
193
195
  marginTop: '10px'
@@ -1,5 +1,6 @@
1
1
  .SceneTree {
2
2
  width: 100%;
3
+ font-size: 14px;
3
4
  .title {
4
5
  .required {
5
6
  color: #FF3D3D;
package/es/index.d.ts CHANGED
@@ -45,5 +45,7 @@ export type { SubmitTypeProps } from './components/submit-type';
45
45
  export { default as SubmitType } from './components/submit-type';
46
46
  export type { FileListPreviewProps } from './components/file-list-preview';
47
47
  export { default as FileListPreview } from './components/file-list-preview';
48
+ export type { DragDropListProps } from './components/drag-drop';
49
+ export { default as DragDropList } from './components/drag-drop';
48
50
  declare const bizCssPrefix = "bizpack";
49
51
  export { bizCssPrefix };
package/es/index.js CHANGED
@@ -28,5 +28,6 @@ export { default as PrintButton } from "./components/print";
28
28
  export { default as FileList } from "./components/file-list";
29
29
  export { default as SubmitType } from "./components/submit-type";
30
30
  export { default as FileListPreview } from "./components/file-list-preview";
31
+ export { default as DragDropList } from "./components/drag-drop";
31
32
  var bizCssPrefix = 'bizpack';
32
33
  export { bizCssPrefix };
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="16" height="11" viewBox="0 0 16 11"><g><path d="M15.949896,5.2555661C16.016703,5.4388962,16.016703,5.5611272,15.949896,5.7444577C15.949896,5.7444577,15.883092,5.9277883,15.816283,5.9888978C15.749479,6.1722283,15.615868,6.3555694,15.482255,6.5999985C15.148229,7.0888891,14.680583,7.7000132,14.012527,8.3722239C12.743215,9.6555681,10.739035,11,8,11C5.2609663,11,3.2567897,9.6555681,1.987474,8.3722239C1.319415,7.7000132,0.85177505,7.0888891,0.51774478,6.5999985C0.51774478,6.5999985,0.18371604,5.9888978,0.18371604,5.9888978C0.11691014,5.9277883,0.050104432,5.7444577,0.050104432,5.7444577C-0.016701477,5.6222262,-0.016701477,5.4388962,0.050104432,5.2555661C0.050104432,5.2555661,0.1169103,5.0722361,0.18371604,5.0111141C0.25052202,4.8277841,0.38413364,4.6444426,0.51774478,4.4000139C0.85177356,3.9111221,1.319415,3.3000102,1.987474,2.6277888C3.2567489,1.3444551,5.2609239,0,7.9999585,0C10.738992,0,12.743169,1.3444551,14.012487,2.6277888C14.680545,3.3000102,15.148186,3.9111221,15.482213,4.400003C15.482213,4.400003,15.816243,5.0111032,15.816243,5.0111032C15.883049,5.0722246,15.949852,5.2555661,15.949852,5.2555661C15.949852,5.2555661,15.949896,5.2555661,15.949896,5.2555661ZM8.0000048,3.3000102C9.2025099,3.3000102,10.271409,4.2777824,10.271409,5.5000286C10.271409,6.72223,9.2025127,7.7000132,8.0000048,7.7000132C6.7974997,7.7000132,5.728601,6.72223,5.728601,5.5000286C5.728601,4.2777824,6.7974944,3.3000102,8.0000048,3.3000102C8.0000048,3.3000102,8.0000048,3.3000102,8.0000048,3.3000102ZM4.3924899,5.5000286C4.3924899,7.3333526,5.9958301,8.9222136,8.0000048,8.9222136C10.004179,8.9222136,11.607521,7.3333526,11.607521,5.5000286C11.607521,3.6666818,10.004179,2.0777981,8.0000048,2.0777981C5.9958305,2.0777981,4.3924899,3.6666818,4.3924899,5.5000286C4.3924899,5.5000286,4.3924899,5.5000286,4.3924899,5.5000286Z" fill="#1678FF" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></svg>
@@ -0,0 +1,17 @@
1
+ import * as React from 'react';
2
+ import './index.scss';
3
+ export interface DragDropListProps {
4
+ /**
5
+ * 类型
6
+ */
7
+ fileList: Array<object>;
8
+ valChange?: (value: any) => void;
9
+ close?: () => void;
10
+ style?: object;
11
+ baseUrl: string;
12
+ tokenTY: string;
13
+ materialName: string;
14
+ getRes: (value: any) => void;
15
+ }
16
+ declare const DragDropList: React.FC<DragDropListProps>;
17
+ export default DragDropList;