ydb-components-material 0.1.97 → 0.1.99
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.8e9c906f.css → umi.475dd297.css} +1 -1
- package/build/docs/umi.4b7bc7e0.js +1 -0
- package/build/docs/~demos/:uuid.html +3 -3
- package/build/docs/~demos/colorful-button-demo.html +3 -3
- package/build/docs/~demos/colorful-input-demo.html +3 -3
- package/build/lowcode/3.js +2 -2
- package/build/lowcode/4.js +1 -1
- package/build/lowcode/5.js +1 -1
- 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/1.js +2 -2
- package/build/lowcode/render/default/2.js +1 -1
- package/build/lowcode/render/default/3.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +21 -21
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +21 -21
- package/dist/1.js +2 -2
- package/dist/2.js +1 -1
- package/dist/3.js +1 -1
- package/dist/BizComps.css +1 -1
- package/dist/BizComps.js +26 -26
- package/dist/BizComps.js.map +1 -1
- package/es/components/file-list/index.js +4 -1
- package/es/components/file-list/index.scss +1 -1
- package/es/components/file-list/item.js +13 -7
- package/es/components/file-list/merge.scss +1 -1
- package/es/components/file-list/sealUtil.js +9 -3
- package/es/components/message/index.d.ts +4 -5
- package/es/components/message/index.js +13 -35
- package/es/components/message/index.scss +22 -19
- package/es/components/scene-tree/index.js +105 -16
- package/es/components/scene-tree/index.scss +7 -0
- package/es/style.js +1 -1
- package/lib/components/file-list/index.js +4 -1
- package/lib/components/file-list/index.scss +1 -1
- package/lib/components/file-list/item.js +13 -7
- package/lib/components/file-list/merge.scss +1 -1
- package/lib/components/file-list/sealUtil.js +9 -3
- package/lib/components/message/index.d.ts +4 -5
- package/lib/components/message/index.js +13 -36
- package/lib/components/message/index.scss +22 -19
- package/lib/components/scene-tree/index.js +105 -16
- package/lib/components/scene-tree/index.scss +7 -0
- package/lib/style.js +1 -1
- package/lowcode/message/meta.ts +30 -0
- package/lowcode_es/message/meta.js +28 -0
- package/lowcode_es/meta.js +1 -1
- package/lowcode_lib/message/meta.js +28 -0
- package/lowcode_lib/meta.js +1 -1
- package/package.json +3 -3
- package/build/docs/umi.f458a7ca.js +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _Balloon from "@alifd/next/es/balloon";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import { useState } from 'react';
|
|
4
5
|
import { getFileExtension } from "./file.js";
|
|
@@ -216,7 +217,9 @@ var FileList = function FileList(_ref) {
|
|
|
216
217
|
};
|
|
217
218
|
return /*#__PURE__*/React.createElement("div", {
|
|
218
219
|
className: "file_list",
|
|
219
|
-
style: style
|
|
220
|
+
style: _extends({}, style, {
|
|
221
|
+
width: '100%'
|
|
222
|
+
})
|
|
220
223
|
}, fileList.map(function (item, index) {
|
|
221
224
|
return /*#__PURE__*/React.createElement("div", {
|
|
222
225
|
className: "file_level_one"
|
|
@@ -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() {
|
|
@@ -666,9 +670,11 @@ var FileItem = function FileItem(_ref) {
|
|
|
666
670
|
className: "blocks"
|
|
667
671
|
}, /*#__PURE__*/React.createElement("div", {
|
|
668
672
|
className: "status"
|
|
669
|
-
}, isSigned && /*#__PURE__*/React.createElement("div", {
|
|
673
|
+
}, isSigned && isSealed && /*#__PURE__*/React.createElement("div", {
|
|
670
674
|
className: "status_item"
|
|
671
|
-
}, "\u5DF2\u7B7E\
|
|
675
|
+
}, "\u5DF2\u7B7E\u7F72"), isSigned && !isSealed && /*#__PURE__*/React.createElement("div", {
|
|
676
|
+
className: "status_item"
|
|
677
|
+
}, "\u5DF2\u7B7E\u6279"), isSealed && !isSigned && /*#__PURE__*/React.createElement("div", {
|
|
672
678
|
className: "status_item"
|
|
673
679
|
}, "\u5DF2\u7B7E\u7AE0")), fileUrl && /*#__PURE__*/React.createElement("div", {
|
|
674
680
|
className: "btns"
|
|
@@ -707,10 +713,10 @@ var FileItem = function FileItem(_ref) {
|
|
|
707
713
|
}, isSigned && isSealed ? '重新签署' : '签署文件'), !(userInfo.acctType === '20' && signEnable) && signatureEnable && /*#__PURE__*/React.createElement("div", {
|
|
708
714
|
className: "operation_btn",
|
|
709
715
|
onClick: sign
|
|
710
|
-
}, isSigned ? '重新签批' : '
|
|
716
|
+
}, isSigned ? '重新签批' : '签署文件'), !signatureEnable && userInfo.acctType === '20' && signEnable && /*#__PURE__*/React.createElement("div", {
|
|
711
717
|
className: "operation_btn",
|
|
712
718
|
onClick: seal
|
|
713
|
-
}, isSealed ? '重新签章' : '
|
|
719
|
+
}, isSealed ? '重新签章' : '签署文件')) :
|
|
714
720
|
// 展示材料库
|
|
715
721
|
!isShareFile && !isSmart && !disabled && !!materialLib.length && /*#__PURE__*/React.createElement("div", {
|
|
716
722
|
className: "operation_btn",
|
|
@@ -785,7 +791,7 @@ var FileItem = function FileItem(_ref) {
|
|
|
785
791
|
}, "\u786E\u5B9A")))), isShowSignPage && /*#__PURE__*/React.createElement(SignPage, {
|
|
786
792
|
isShowSignPage: isShowSignPage,
|
|
787
793
|
userInfo: userInfo,
|
|
788
|
-
file: file,
|
|
794
|
+
file: sealedFile || file,
|
|
789
795
|
token: token,
|
|
790
796
|
tokenTY: tokenTY,
|
|
791
797
|
baseUrl: baseUrl,
|
|
@@ -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
|
-
|
|
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);
|
|
@@ -4,13 +4,12 @@ export interface MessageProps {
|
|
|
4
4
|
/**
|
|
5
5
|
* 类型
|
|
6
6
|
*/
|
|
7
|
-
type?: "error" | "warning" | "success";
|
|
8
7
|
title: string;
|
|
9
8
|
text: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
cancelText: string;
|
|
10
|
+
okText: string;
|
|
11
|
+
cancel?: () => void;
|
|
12
|
+
ok?: () => void;
|
|
14
13
|
}
|
|
15
14
|
declare const Message: React.FC<MessageProps>;
|
|
16
15
|
export default Message;
|
|
@@ -1,51 +1,29 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import ErrorIcon from "./icons/icon_error.svg";
|
|
3
|
-
import WarningIcon from "./icons/icon_warning.svg";
|
|
4
2
|
import "./index.scss";
|
|
5
3
|
var Message = function Message(_ref) {
|
|
6
|
-
var
|
|
7
|
-
type = _ref$type === void 0 ? 'error' : _ref$type,
|
|
8
|
-
title = _ref.title,
|
|
4
|
+
var title = _ref.title,
|
|
9
5
|
text = _ref.text,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
console.log('goBack', goBack, type);
|
|
15
|
-
var icon = type === 'error' ? ErrorIcon : WarningIcon;
|
|
6
|
+
cancelText = _ref.cancelText,
|
|
7
|
+
okText = _ref.okText,
|
|
8
|
+
cancel = _ref.cancel,
|
|
9
|
+
ok = _ref.ok;
|
|
16
10
|
return /*#__PURE__*/React.createElement("div", {
|
|
17
11
|
className: "message"
|
|
18
12
|
}, /*#__PURE__*/React.createElement("div", {
|
|
19
13
|
className: "content"
|
|
20
|
-
}, /*#__PURE__*/React.createElement("
|
|
21
|
-
className: "icon",
|
|
22
|
-
src: icon,
|
|
23
|
-
alt: "",
|
|
24
|
-
onClick: function onClick() {
|
|
25
|
-
return goBack();
|
|
26
|
-
}
|
|
27
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
14
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
28
15
|
className: "title"
|
|
29
16
|
}, title), /*#__PURE__*/React.createElement("div", {
|
|
30
17
|
className: "text"
|
|
31
18
|
}, text), /*#__PURE__*/React.createElement("div", {
|
|
32
19
|
className: "btns"
|
|
33
|
-
},
|
|
34
|
-
className: "
|
|
35
|
-
onClick:
|
|
36
|
-
},
|
|
37
|
-
className: "
|
|
38
|
-
onClick:
|
|
39
|
-
},
|
|
40
|
-
className: "blue_btn",
|
|
41
|
-
onClick: skip
|
|
42
|
-
}, "\u4EBA\u5DE5\u5BA1\u6838")), skip && close && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
43
|
-
className: "black_btn btn",
|
|
44
|
-
onClick: skip
|
|
45
|
-
}, "\u5FFD\u7565\uFF0C\u7EE7\u7EED\u63D0\u4EA4"), /*#__PURE__*/React.createElement("div", {
|
|
46
|
-
className: "blue_btn btn",
|
|
47
|
-
onClick: close
|
|
48
|
-
}, "\u6211\u518D\u60F3\u60F3")))));
|
|
20
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
21
|
+
className: "left_btn btn",
|
|
22
|
+
onClick: cancel
|
|
23
|
+
}, cancelText), /*#__PURE__*/React.createElement("div", {
|
|
24
|
+
className: "right_btn btn",
|
|
25
|
+
onClick: ok
|
|
26
|
+
}, okText))));
|
|
49
27
|
};
|
|
50
28
|
Message.displayName = 'Message';
|
|
51
29
|
export default Message;
|
|
@@ -19,47 +19,50 @@
|
|
|
19
19
|
justify-content: center;
|
|
20
20
|
align-items: center;
|
|
21
21
|
|
|
22
|
-
.icon {
|
|
23
|
-
width: 32px;
|
|
24
|
-
height: 32px;
|
|
25
|
-
margin-bottom: 8px;
|
|
26
|
-
margin-top: 32px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
22
|
.title {
|
|
23
|
+
margin-top: 12px;
|
|
30
24
|
font-size: 16px;
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
width: 90%;
|
|
26
|
+
color: #333333;
|
|
27
|
+
margin-bottom: 12px;
|
|
28
|
+
font-weight: 400;
|
|
33
29
|
}
|
|
34
30
|
|
|
35
31
|
.text {
|
|
36
32
|
font-size: 14px;
|
|
37
|
-
color: #
|
|
33
|
+
color: #666666;
|
|
38
34
|
margin: 0 29px 17px;
|
|
39
35
|
text-align: center;
|
|
40
36
|
}
|
|
41
37
|
|
|
42
38
|
.btns {
|
|
43
|
-
border-top: 1px solid rgba(0, 0, 0, 0.102);
|
|
44
39
|
width: 100%;
|
|
45
40
|
display: flex;
|
|
46
41
|
flex: 1;
|
|
47
42
|
height: 56px;
|
|
43
|
+
gap: 20px;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
margin-bottom: 12px;
|
|
46
|
+
|
|
48
47
|
|
|
49
48
|
.btn {
|
|
50
|
-
font-size:
|
|
51
|
-
|
|
52
|
-
height:
|
|
53
|
-
line-height:
|
|
49
|
+
font-size: 12px;
|
|
50
|
+
padding: 0px 12px;
|
|
51
|
+
height: 28px;
|
|
52
|
+
line-height: 28px;
|
|
54
53
|
text-align: center;
|
|
54
|
+
border-radius: 3px;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
.
|
|
58
|
-
color: #
|
|
57
|
+
.left_btn {
|
|
58
|
+
color: #ffffff;
|
|
59
|
+
background-color: #3e71f7;
|
|
60
|
+
|
|
59
61
|
}
|
|
60
62
|
|
|
61
|
-
.
|
|
62
|
-
border
|
|
63
|
+
.right_btn {
|
|
64
|
+
border: 1px solid #3e71f7;
|
|
65
|
+
color: #3e71f7;
|
|
63
66
|
}
|
|
64
67
|
}
|
|
65
68
|
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import _Checkbox from "@alifd/next/es/checkbox";
|
|
2
|
+
import _Balloon from "@alifd/next/es/balloon";
|
|
3
|
+
import _Icon from "@alifd/next/es/icon";
|
|
2
4
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
5
|
import _Radio from "@alifd/next/es/radio";
|
|
4
6
|
function _createForOfIteratorHelperLoose(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -64,16 +66,40 @@ var SceneTree = function SceneTree(_ref) {
|
|
|
64
66
|
var targetNodeOfCurTree = _findNodeById(curTree, targetId, targetPId);
|
|
65
67
|
// 删除当前题目的子题目先 可能还留有上次带出来的题目
|
|
66
68
|
targetNodeOfCurTree.children = [];
|
|
69
|
+
// 如果不是初始化的时候就禁用了 重置一下禁用状态和
|
|
70
|
+
targetNodeOfOriginTree.options.forEach(function (option) {
|
|
71
|
+
if (option.preDisabled !== true) {
|
|
72
|
+
option.disabled = false;
|
|
73
|
+
option.showMutuallyExclusivePrompt = false;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
67
76
|
console.log('targetNodeOfCurTree----', targetNodeOfCurTree);
|
|
68
77
|
// 可能是个多选题 val会是个数组
|
|
69
78
|
if (Array.isArray(val)) {
|
|
70
79
|
if (val.length) {
|
|
71
80
|
var optionNameList = [];
|
|
72
81
|
val.forEach(function (item) {
|
|
82
|
+
// 找到当前选项在当前树中
|
|
83
|
+
var curOption = targetNodeOfCurTree.options.find(function (option) {
|
|
84
|
+
return option.id === item;
|
|
85
|
+
});
|
|
86
|
+
curOption.showMutuallyExclusivePrompt = true;
|
|
73
87
|
// 找到对应的选项在源数据中
|
|
74
88
|
var targetOption = targetNodeOfOriginTree.options.find(function (option) {
|
|
75
89
|
return option.id === item;
|
|
76
90
|
});
|
|
91
|
+
// 如果当前选项有互斥选项,找出来禁用掉
|
|
92
|
+
if (Array.isArray(targetOption.mutuallyExclusiveOptions) && targetOption.mutuallyExclusiveOptions.length) {
|
|
93
|
+
targetOption.mutuallyExclusiveOptions.forEach(function (mutuallyExclusiveOption) {
|
|
94
|
+
var targetMutuallyExclusiveOption = targetNodeOfCurTree.options.find(function (option) {
|
|
95
|
+
return option.id === mutuallyExclusiveOption;
|
|
96
|
+
});
|
|
97
|
+
console.log('targetMutuallyExclusiveOption--', targetMutuallyExclusiveOption);
|
|
98
|
+
if (targetMutuallyExclusiveOption) {
|
|
99
|
+
targetMutuallyExclusiveOption.disabled = true;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}
|
|
77
103
|
optionNameList.push(targetOption.name);
|
|
78
104
|
// 拿到这个选中的选项会带出来的子题目 虽然是个数组。但是只有一项 只会带出来一个题目
|
|
79
105
|
var targetNodeChildList = (targetOption.children || []).filter(Boolean).map(function (n) {
|
|
@@ -142,6 +168,13 @@ var SceneTree = function SceneTree(_ref) {
|
|
|
142
168
|
setCurTree(_extends({}, curTree));
|
|
143
169
|
valChange(curTree);
|
|
144
170
|
};
|
|
171
|
+
var trigger = function trigger(style) {
|
|
172
|
+
return /*#__PURE__*/React.createElement(_Icon, {
|
|
173
|
+
type: "help",
|
|
174
|
+
size: "xs",
|
|
175
|
+
style: style
|
|
176
|
+
});
|
|
177
|
+
};
|
|
145
178
|
var _TreeNode = function TreeNode(_ref2) {
|
|
146
179
|
var node = _ref2.node,
|
|
147
180
|
otherStyle = _ref2.style;
|
|
@@ -161,7 +194,19 @@ var SceneTree = function SceneTree(_ref) {
|
|
|
161
194
|
className: !isPC ? 'title' : 'title_pc'
|
|
162
195
|
}, /*#__PURE__*/React.createElement("span", {
|
|
163
196
|
className: "required"
|
|
164
|
-
}, "*"), node.title, !!+node.isMultipleChoice && '(多选)'
|
|
197
|
+
}, "*"), node.title, !!+node.isMultipleChoice && '(多选)', node.description && /*#__PURE__*/React.createElement(_Balloon, {
|
|
198
|
+
v2: true,
|
|
199
|
+
trigger: trigger({
|
|
200
|
+
color: '#666',
|
|
201
|
+
marginTop: '-4px',
|
|
202
|
+
marginLeft: '5px'
|
|
203
|
+
}),
|
|
204
|
+
triggerType: "click",
|
|
205
|
+
align: "t",
|
|
206
|
+
arrowPointToCenter: true,
|
|
207
|
+
title: "",
|
|
208
|
+
delay: 20
|
|
209
|
+
}, node.description)), !+node.isMultipleChoice ? /*#__PURE__*/React.createElement(RadioGroup, {
|
|
165
210
|
className: isPC && 'options_pc',
|
|
166
211
|
value: node.value,
|
|
167
212
|
onChange: onValChange,
|
|
@@ -169,32 +214,76 @@ var SceneTree = function SceneTree(_ref) {
|
|
|
169
214
|
}, node.options.map(function (option, index) {
|
|
170
215
|
console.log('optionsVal', option.value);
|
|
171
216
|
var isOverFlow = option.name.length > 4;
|
|
172
|
-
return /*#__PURE__*/React.createElement(
|
|
217
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
218
|
+
key: index,
|
|
219
|
+
style: {
|
|
220
|
+
display: 'flex',
|
|
221
|
+
alignItems: 'center',
|
|
222
|
+
width: '100%',
|
|
223
|
+
marginTop: index > 0 ? '10px' : '',
|
|
224
|
+
flexWrap: 'wrap'
|
|
225
|
+
}
|
|
226
|
+
}, /*#__PURE__*/React.createElement(_Radio, {
|
|
173
227
|
id: option.pid + "+" + node.pid,
|
|
174
228
|
key: option.id + node.pid + option.value + index,
|
|
175
229
|
value: option.id,
|
|
176
|
-
disabled:
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
230
|
+
disabled: option.disabled
|
|
231
|
+
}, option.name), option.description && /*#__PURE__*/React.createElement(_Balloon, {
|
|
232
|
+
v2: true,
|
|
233
|
+
trigger: trigger({
|
|
234
|
+
color: '#666',
|
|
235
|
+
left: '-10px',
|
|
236
|
+
position: 'relative',
|
|
237
|
+
top: '1px'
|
|
238
|
+
}),
|
|
239
|
+
triggerType: "click",
|
|
240
|
+
align: "t",
|
|
241
|
+
arrowPointToCenter: true,
|
|
242
|
+
title: "",
|
|
243
|
+
delay: 20
|
|
244
|
+
}, option.description));
|
|
182
245
|
})) : /*#__PURE__*/React.createElement(_Checkbox.Group, {
|
|
183
246
|
value: node.value,
|
|
184
247
|
onChange: onValChange,
|
|
185
248
|
className: isPC && 'options_pc'
|
|
186
249
|
}, node.options.map(function (option, index) {
|
|
187
|
-
var
|
|
188
|
-
return /*#__PURE__*/React.createElement(
|
|
250
|
+
var showMutualExclusionPrompt = option.mutualExclusionPrompt;
|
|
251
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
252
|
+
style: {
|
|
253
|
+
display: 'flex',
|
|
254
|
+
alignItems: 'center',
|
|
255
|
+
width: '100%',
|
|
256
|
+
marginTop: index > 0 ? '10px' : '',
|
|
257
|
+
flexWrap: 'wrap'
|
|
258
|
+
}
|
|
259
|
+
}, /*#__PURE__*/React.createElement(_Checkbox, {
|
|
189
260
|
id: option.pid + "+" + node.pid,
|
|
190
261
|
key: option.id + node.pid + option.value + index,
|
|
191
262
|
value: option.id,
|
|
192
|
-
disabled:
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
263
|
+
disabled: option.disabled
|
|
264
|
+
}, option.name), option.description && /*#__PURE__*/React.createElement(_Balloon, {
|
|
265
|
+
v2: true,
|
|
266
|
+
trigger: trigger({
|
|
267
|
+
color: '#666',
|
|
268
|
+
left: '-10px',
|
|
269
|
+
position: 'relative',
|
|
270
|
+
top: '1px'
|
|
271
|
+
}),
|
|
272
|
+
triggerType: "click",
|
|
273
|
+
align: "t",
|
|
274
|
+
arrowPointToCenter: true,
|
|
275
|
+
title: "",
|
|
276
|
+
delay: 20
|
|
277
|
+
}, node.description), option.showMutuallyExclusivePrompt && option.mutualExclusionPrompt && /*#__PURE__*/React.createElement("div", {
|
|
278
|
+
className: "mutualExclusionPrompt"
|
|
279
|
+
}, /*#__PURE__*/React.createElement(_Icon, {
|
|
280
|
+
type: "prompt",
|
|
281
|
+
size: "xs",
|
|
282
|
+
style: {
|
|
283
|
+
color: '#FF6237',
|
|
284
|
+
marginRight: '4px'
|
|
285
|
+
}
|
|
286
|
+
}), option.mutualExclusionPrompt));
|
|
198
287
|
}))), node.children && (node.children || []).map(function (item, index) {
|
|
199
288
|
var _node$children, _node$children2, _node$children3, _node$children4;
|
|
200
289
|
console.log('----', ((_node$children = node.children) === null || _node$children === void 0 ? void 0 : _node$children.length) > 1 && index !== ((_node$children2 = node.children) === null || _node$children2 === void 0 ? void 0 : _node$children2.length) - 1);
|
package/es/style.js
CHANGED
|
@@ -2,6 +2,6 @@ import '@alifd/next/es/icon/style';
|
|
|
2
2
|
import '@alifd/next/es/message/style';
|
|
3
3
|
import '@alifd/next/es/radio/style';
|
|
4
4
|
import '@alifd/next/es/checkbox/style';
|
|
5
|
-
import 'antd/es/cascader/style';
|
|
6
5
|
import '@alifd/next/es/balloon/style';
|
|
6
|
+
import 'antd/es/cascader/style';
|
|
7
7
|
import './index.scss';
|
|
@@ -4,6 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
exports.__esModule = true;
|
|
5
5
|
exports["default"] = void 0;
|
|
6
6
|
var _balloon = _interopRequireDefault(require("@alifd/next/lib/balloon"));
|
|
7
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
9
|
var _file = require("./file.js");
|
|
9
10
|
var _merge = _interopRequireDefault(require("./merge"));
|
|
@@ -221,7 +222,9 @@ var FileList = function FileList(_ref) {
|
|
|
221
222
|
};
|
|
222
223
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
223
224
|
className: "file_list",
|
|
224
|
-
style: style
|
|
225
|
+
style: (0, _extends2["default"])({}, style, {
|
|
226
|
+
width: '100%'
|
|
227
|
+
})
|
|
225
228
|
}, fileList.map(function (item, index) {
|
|
226
229
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
227
230
|
className: "file_level_one"
|
|
@@ -111,7 +111,9 @@ var FileItem = function FileItem(_ref) {
|
|
|
111
111
|
var _useState14 = (0, _react.useState)(''),
|
|
112
112
|
thumbnail = _useState14[0],
|
|
113
113
|
setThumbnail = _useState14[1]; // 缩略图
|
|
114
|
-
|
|
114
|
+
var _useState15 = (0, _react.useState)(),
|
|
115
|
+
sealedFile = _useState15[0],
|
|
116
|
+
setSealedFile = _useState15[1];
|
|
115
117
|
var upload = function upload() {
|
|
116
118
|
if (disabled) return;
|
|
117
119
|
var inputEl = document.createElement('input');
|
|
@@ -318,10 +320,12 @@ var FileItem = function FileItem(_ref) {
|
|
|
318
320
|
// 获取签章结果
|
|
319
321
|
var getSealRes = function getSealRes(val) {
|
|
320
322
|
console.log('sealval---', val);
|
|
321
|
-
valChange(val, fileIndex, index, subIndex);
|
|
322
323
|
// 如果还允许签批 就连住一起做了
|
|
323
324
|
if (signatureEnable) {
|
|
325
|
+
setSealedFile(val);
|
|
324
326
|
sign();
|
|
327
|
+
} else {
|
|
328
|
+
valChange(val, fileIndex, index, subIndex);
|
|
325
329
|
}
|
|
326
330
|
};
|
|
327
331
|
var queryFileLibs = function queryFileLibs() {
|
|
@@ -672,9 +676,11 @@ var FileItem = function FileItem(_ref) {
|
|
|
672
676
|
className: "blocks"
|
|
673
677
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
674
678
|
className: "status"
|
|
675
|
-
}, isSigned && /*#__PURE__*/_react["default"].createElement("div", {
|
|
679
|
+
}, isSigned && isSealed && /*#__PURE__*/_react["default"].createElement("div", {
|
|
676
680
|
className: "status_item"
|
|
677
|
-
}, "\u5DF2\u7B7E\
|
|
681
|
+
}, "\u5DF2\u7B7E\u7F72"), isSigned && !isSealed && /*#__PURE__*/_react["default"].createElement("div", {
|
|
682
|
+
className: "status_item"
|
|
683
|
+
}, "\u5DF2\u7B7E\u6279"), isSealed && !isSigned && /*#__PURE__*/_react["default"].createElement("div", {
|
|
678
684
|
className: "status_item"
|
|
679
685
|
}, "\u5DF2\u7B7E\u7AE0")), fileUrl && /*#__PURE__*/_react["default"].createElement("div", {
|
|
680
686
|
className: "btns"
|
|
@@ -713,10 +719,10 @@ var FileItem = function FileItem(_ref) {
|
|
|
713
719
|
}, isSigned && isSealed ? '重新签署' : '签署文件'), !(userInfo.acctType === '20' && signEnable) && signatureEnable && /*#__PURE__*/_react["default"].createElement("div", {
|
|
714
720
|
className: "operation_btn",
|
|
715
721
|
onClick: sign
|
|
716
|
-
}, isSigned ? '重新签批' : '
|
|
722
|
+
}, isSigned ? '重新签批' : '签署文件'), !signatureEnable && userInfo.acctType === '20' && signEnable && /*#__PURE__*/_react["default"].createElement("div", {
|
|
717
723
|
className: "operation_btn",
|
|
718
724
|
onClick: seal
|
|
719
|
-
}, isSealed ? '重新签章' : '
|
|
725
|
+
}, isSealed ? '重新签章' : '签署文件')) :
|
|
720
726
|
// 展示材料库
|
|
721
727
|
!isShareFile && !isSmart && !disabled && !!materialLib.length && /*#__PURE__*/_react["default"].createElement("div", {
|
|
722
728
|
className: "operation_btn",
|
|
@@ -791,7 +797,7 @@ var FileItem = function FileItem(_ref) {
|
|
|
791
797
|
}, "\u786E\u5B9A")))), isShowSignPage && /*#__PURE__*/_react["default"].createElement(_sign["default"], {
|
|
792
798
|
isShowSignPage: isShowSignPage,
|
|
793
799
|
userInfo: userInfo,
|
|
794
|
-
file: file,
|
|
800
|
+
file: sealedFile || file,
|
|
795
801
|
token: token,
|
|
796
802
|
tokenTY: tokenTY,
|
|
797
803
|
baseUrl: baseUrl,
|
|
@@ -58,7 +58,7 @@ function _initSealPageMethod() {
|
|
|
58
58
|
return _context.abrupt("return", false);
|
|
59
59
|
case 6:
|
|
60
60
|
_context.next = 7;
|
|
61
|
-
return getMobilePageFun(orderId, config);
|
|
61
|
+
return getMobilePageFun(orderId, config, fileObj, fileUrl);
|
|
62
62
|
case 7:
|
|
63
63
|
pageUrl = _context.sent;
|
|
64
64
|
// 将 电子签章地址/文件名称 返回
|
|
@@ -213,7 +213,7 @@ function getSignOrderId(sealList, fileObj, esusFileUrl, userInfo, config) {
|
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
// [第 4 步 - 移动端] 获取电子印章页面
|
|
216
|
-
function getMobilePageFun(orderId, config) {
|
|
216
|
+
function getMobilePageFun(orderId, config, fileObj, fileUrl) {
|
|
217
217
|
// uni.showLoading({ title: '获取移动端签章页面中' })
|
|
218
218
|
var params = {
|
|
219
219
|
accessToken: config.accessToken,
|
|
@@ -222,7 +222,13 @@ function getMobilePageFun(orderId, config) {
|
|
|
222
222
|
};
|
|
223
223
|
return new Promise(function (resolve) {
|
|
224
224
|
if (config.isPC) {
|
|
225
|
-
|
|
225
|
+
var paramsForPc = {
|
|
226
|
+
accessToken: config.accessToken,
|
|
227
|
+
acctType: '20',
|
|
228
|
+
docURL: fileUrl,
|
|
229
|
+
name: fileObj.fileName
|
|
230
|
+
};
|
|
231
|
+
(0, _api.getPcSealUrlApi)(paramsForPc, config).then(function (res) {
|
|
226
232
|
console.log('签章页面 pc----', res);
|
|
227
233
|
if (res.code === 200) {
|
|
228
234
|
resolve(res.data);
|
|
@@ -4,13 +4,12 @@ export interface MessageProps {
|
|
|
4
4
|
/**
|
|
5
5
|
* 类型
|
|
6
6
|
*/
|
|
7
|
-
type?: "error" | "warning" | "success";
|
|
8
7
|
title: string;
|
|
9
8
|
text: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
cancelText: string;
|
|
10
|
+
okText: string;
|
|
11
|
+
cancel?: () => void;
|
|
12
|
+
ok?: () => void;
|
|
14
13
|
}
|
|
15
14
|
declare const Message: React.FC<MessageProps>;
|
|
16
15
|
export default Message;
|