ydb-components-material 0.1.180 → 0.1.182

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.
@@ -201,14 +201,18 @@ var FileItem = function FileItem(_ref) {
201
201
  var _useState16 = useState(false),
202
202
  showSignerInfo = _useState16[0],
203
203
  setShowSignerInfo = _useState16[1];
204
- var _useState17 = useState(true),
205
- showSignPageClose = _useState17[0],
206
- setShowSignPageClose = _useState17[1];
207
- var _useState18 = useState(0),
208
- signKey = _useState18[0],
209
- setSignKey = _useState18[1];
204
+ var _useState17 = useState(0),
205
+ componentTop = _useState17[0],
206
+ setComponentTop = _useState17[1]; // 当前组件距离浏览器窗口顶部的距离
207
+ var _useState18 = useState(true),
208
+ showSignPageClose = _useState18[0],
209
+ setShowSignPageClose = _useState18[1];
210
+ var _useState19 = useState(0),
211
+ signKey = _useState19[0],
212
+ setSignKey = _useState19[1];
210
213
  var timerRef = useRef(null);
211
214
  var originalUrlRef = useRef('');
215
+ var rootRef = useRef(null);
212
216
  var getSignedFile = /*#__PURE__*/function () {
213
217
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(documentIdVal, contractIdVal, nameVal) {
214
218
  var newFile;
@@ -574,10 +578,18 @@ var FileItem = function FileItem(_ref) {
574
578
  return _ref5.apply(this, arguments);
575
579
  };
576
580
  }();
581
+
582
+ // 打开维护签署人信息弹窗,同时记录当前组件距离浏览器窗口顶部的距离,用于弹窗定位
583
+ var openSignerInfo = function openSignerInfo() {
584
+ if (rootRef.current) {
585
+ setComponentTop(rootRef.current.getBoundingClientRect().top);
586
+ }
587
+ setShowSignerInfo(true);
588
+ };
577
589
  var signAndSeal = function signAndSeal() {
578
590
  // 当前是个人 不需要签批。需要签他人签署 就直接打开维护签署人信息,这种情况属于签章开启 但是个人待办法人事项的时候
579
591
  if (userInfo.acctType !== '20' && !signatureEnable && needOtherSign) {
580
- setShowSignerInfo(true);
592
+ openSignerInfo();
581
593
  return;
582
594
  }
583
595
  var safeSignatureSelfRole = signatureSelfRole !== null && signatureSelfRole !== void 0 ? signatureSelfRole : [];
@@ -592,7 +604,7 @@ var FileItem = function FileItem(_ref) {
592
604
  var notNeedSelfSign = !safeSignatureRole.includes(SELF) && !safeSignRole.includes(SELF);
593
605
  var needOtherSignInScenario = safeSignatureRole.includes(OTHER) || safeSignRole.includes(OTHER);
594
606
  if (notNeedSelfSign && needOtherSignInScenario) {
595
- setShowSignerInfo(true);
607
+ openSignerInfo();
596
608
  return;
597
609
  }
598
610
  // 如果不能签章就直接签批
@@ -955,7 +967,7 @@ var FileItem = function FileItem(_ref) {
955
967
  // 打开后立即回调清除标记,避免下次切换材料位置时误弹
956
968
  useEffect(function () {
957
969
  if (autoShowSignerInfo) {
958
- setShowSignerInfo(true);
970
+ openSignerInfo();
959
971
  onCloseSignerInfo && onCloseSignerInfo();
960
972
  }
961
973
  }, [autoShowSignerInfo, onCloseSignerInfo]);
@@ -1001,7 +1013,8 @@ var FileItem = function FileItem(_ref) {
1001
1013
  }, [fileId]);
1002
1014
  return /*#__PURE__*/React.createElement("div", {
1003
1015
  className: "file_item",
1004
- style: style
1016
+ style: style,
1017
+ ref: rootRef
1005
1018
  }, /*#__PURE__*/React.createElement("p", {
1006
1019
  className: "file_name"
1007
1020
  }, fileName), /*#__PURE__*/React.createElement("div", {
@@ -1307,7 +1320,8 @@ var FileItem = function FileItem(_ref) {
1307
1320
  subIndex: subIndex,
1308
1321
  valChange: valChange,
1309
1322
  env: env,
1310
- isPC: isPC
1323
+ isPC: isPC,
1324
+ componentTop: componentTop
1311
1325
  }));
1312
1326
  };
1313
1327
  FileItem.displayName = 'FileItem';
@@ -29,7 +29,8 @@ function SignerInfo(props) {
29
29
  fileItemIndex = props.index,
30
30
  subIndex = props.subIndex,
31
31
  env = props.env,
32
- isPC = props.isPC;
32
+ isPC = props.isPC,
33
+ componentTop = props.componentTop;
33
34
  var _React$useState = React.useState([]),
34
35
  signerInfoList = _React$useState[0],
35
36
  setSignerInfoList = _React$useState[1];
@@ -242,7 +243,10 @@ function SignerInfo(props) {
242
243
  return /*#__PURE__*/React.createElement("div", {
243
244
  className: "signer-info-mask"
244
245
  }, !showQRcode && /*#__PURE__*/React.createElement("div", {
245
- className: "signer-info" + (isPC ? ' signer-info-pc' : '')
246
+ className: "signer-info" + (isPC ? ' signer-info-pc' : ''),
247
+ style: isPC && componentTop ? {
248
+ top: componentTop - 200
249
+ } : undefined
246
250
  }, /*#__PURE__*/React.createElement("div", {
247
251
  className: "signer-info-title"
248
252
  }, /*#__PURE__*/React.createElement("span", null, "\u7EF4\u62A4\u7B7E\u7F72\u4FE1\u606F"), /*#__PURE__*/React.createElement("img", {
@@ -72,11 +72,15 @@
72
72
  background: #FFFFFF;
73
73
  width: 70vw;
74
74
  border-radius: 16px;
75
- max-height: 80vh;
75
+ min-height: 450px;
76
76
  // flex 纵向布局:标题固定,内容区滚动,footer 始终贴底
77
77
  display: flex;
78
78
  flex-direction: column;
79
79
  overflow: hidden;
80
+
81
+ .signer-info-content {
82
+ margin-bottom: 70px !important;
83
+ }
80
84
  // 卡片标题行:横向排布
81
85
  .signer-info-item-title {
82
86
  align-items: center;
@@ -92,7 +96,6 @@
92
96
  gap: 8px 16px;
93
97
  padding: 16px;
94
98
  box-sizing: border-box;
95
- margin-bottom: 70px !important;
96
99
 
97
100
  .signer-info-item-box {
98
101
  display: flex;
@@ -348,6 +351,7 @@
348
351
  padding: 40px 32px;
349
352
  box-sizing: border-box;
350
353
  text-align: center;
354
+ min-height: 450px;
351
355
 
352
356
  .qrcode-canvas {
353
357
  margin: 0 auto;
@@ -207,14 +207,18 @@ var FileItem = function FileItem(_ref) {
207
207
  var _useState16 = (0, _react.useState)(false),
208
208
  showSignerInfo = _useState16[0],
209
209
  setShowSignerInfo = _useState16[1];
210
- var _useState17 = (0, _react.useState)(true),
211
- showSignPageClose = _useState17[0],
212
- setShowSignPageClose = _useState17[1];
213
- var _useState18 = (0, _react.useState)(0),
214
- signKey = _useState18[0],
215
- setSignKey = _useState18[1];
210
+ var _useState17 = (0, _react.useState)(0),
211
+ componentTop = _useState17[0],
212
+ setComponentTop = _useState17[1]; // 当前组件距离浏览器窗口顶部的距离
213
+ var _useState18 = (0, _react.useState)(true),
214
+ showSignPageClose = _useState18[0],
215
+ setShowSignPageClose = _useState18[1];
216
+ var _useState19 = (0, _react.useState)(0),
217
+ signKey = _useState19[0],
218
+ setSignKey = _useState19[1];
216
219
  var timerRef = (0, _react.useRef)(null);
217
220
  var originalUrlRef = (0, _react.useRef)('');
221
+ var rootRef = (0, _react.useRef)(null);
218
222
  var getSignedFile = /*#__PURE__*/function () {
219
223
  var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(documentIdVal, contractIdVal, nameVal) {
220
224
  var newFile;
@@ -580,10 +584,18 @@ var FileItem = function FileItem(_ref) {
580
584
  return _ref5.apply(this, arguments);
581
585
  };
582
586
  }();
587
+
588
+ // 打开维护签署人信息弹窗,同时记录当前组件距离浏览器窗口顶部的距离,用于弹窗定位
589
+ var openSignerInfo = function openSignerInfo() {
590
+ if (rootRef.current) {
591
+ setComponentTop(rootRef.current.getBoundingClientRect().top);
592
+ }
593
+ setShowSignerInfo(true);
594
+ };
583
595
  var signAndSeal = function signAndSeal() {
584
596
  // 当前是个人 不需要签批。需要签他人签署 就直接打开维护签署人信息,这种情况属于签章开启 但是个人待办法人事项的时候
585
597
  if (userInfo.acctType !== '20' && !signatureEnable && needOtherSign) {
586
- setShowSignerInfo(true);
598
+ openSignerInfo();
587
599
  return;
588
600
  }
589
601
  var safeSignatureSelfRole = signatureSelfRole !== null && signatureSelfRole !== void 0 ? signatureSelfRole : [];
@@ -598,7 +610,7 @@ var FileItem = function FileItem(_ref) {
598
610
  var notNeedSelfSign = !safeSignatureRole.includes(SELF) && !safeSignRole.includes(SELF);
599
611
  var needOtherSignInScenario = safeSignatureRole.includes(OTHER) || safeSignRole.includes(OTHER);
600
612
  if (notNeedSelfSign && needOtherSignInScenario) {
601
- setShowSignerInfo(true);
613
+ openSignerInfo();
602
614
  return;
603
615
  }
604
616
  // 如果不能签章就直接签批
@@ -961,7 +973,7 @@ var FileItem = function FileItem(_ref) {
961
973
  // 打开后立即回调清除标记,避免下次切换材料位置时误弹
962
974
  (0, _react.useEffect)(function () {
963
975
  if (autoShowSignerInfo) {
964
- setShowSignerInfo(true);
976
+ openSignerInfo();
965
977
  onCloseSignerInfo && onCloseSignerInfo();
966
978
  }
967
979
  }, [autoShowSignerInfo, onCloseSignerInfo]);
@@ -1007,7 +1019,8 @@ var FileItem = function FileItem(_ref) {
1007
1019
  }, [fileId]);
1008
1020
  return /*#__PURE__*/_react["default"].createElement("div", {
1009
1021
  className: "file_item",
1010
- style: style
1022
+ style: style,
1023
+ ref: rootRef
1011
1024
  }, /*#__PURE__*/_react["default"].createElement("p", {
1012
1025
  className: "file_name"
1013
1026
  }, fileName), /*#__PURE__*/_react["default"].createElement("div", {
@@ -1313,7 +1326,8 @@ var FileItem = function FileItem(_ref) {
1313
1326
  subIndex: subIndex,
1314
1327
  valChange: valChange,
1315
1328
  env: env,
1316
- isPC: isPC
1329
+ isPC: isPC,
1330
+ componentTop: componentTop
1317
1331
  }));
1318
1332
  };
1319
1333
  FileItem.displayName = 'FileItem';
@@ -35,7 +35,8 @@ function SignerInfo(props) {
35
35
  fileItemIndex = props.index,
36
36
  subIndex = props.subIndex,
37
37
  env = props.env,
38
- isPC = props.isPC;
38
+ isPC = props.isPC,
39
+ componentTop = props.componentTop;
39
40
  var _React$useState = _react["default"].useState([]),
40
41
  signerInfoList = _React$useState[0],
41
42
  setSignerInfoList = _React$useState[1];
@@ -248,7 +249,10 @@ function SignerInfo(props) {
248
249
  return /*#__PURE__*/_react["default"].createElement("div", {
249
250
  className: "signer-info-mask"
250
251
  }, !showQRcode && /*#__PURE__*/_react["default"].createElement("div", {
251
- className: "signer-info" + (isPC ? ' signer-info-pc' : '')
252
+ className: "signer-info" + (isPC ? ' signer-info-pc' : ''),
253
+ style: isPC && componentTop ? {
254
+ top: componentTop - 200
255
+ } : undefined
252
256
  }, /*#__PURE__*/_react["default"].createElement("div", {
253
257
  className: "signer-info-title"
254
258
  }, /*#__PURE__*/_react["default"].createElement("span", null, "\u7EF4\u62A4\u7B7E\u7F72\u4FE1\u606F"), /*#__PURE__*/_react["default"].createElement("img", {
@@ -72,11 +72,15 @@
72
72
  background: #FFFFFF;
73
73
  width: 70vw;
74
74
  border-radius: 16px;
75
- max-height: 80vh;
75
+ min-height: 450px;
76
76
  // flex 纵向布局:标题固定,内容区滚动,footer 始终贴底
77
77
  display: flex;
78
78
  flex-direction: column;
79
79
  overflow: hidden;
80
+
81
+ .signer-info-content {
82
+ margin-bottom: 70px !important;
83
+ }
80
84
  // 卡片标题行:横向排布
81
85
  .signer-info-item-title {
82
86
  align-items: center;
@@ -92,7 +96,6 @@
92
96
  gap: 8px 16px;
93
97
  padding: 16px;
94
98
  box-sizing: border-box;
95
- margin-bottom: 70px !important;
96
99
 
97
100
  .signer-info-item-box {
98
101
  display: flex;
@@ -348,6 +351,7 @@
348
351
  padding: 40px 32px;
349
352
  box-sizing: border-box;
350
353
  text-align: center;
354
+ min-height: 450px;
351
355
 
352
356
  .qrcode-canvas {
353
357
  margin: 0 auto;
@@ -98,7 +98,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
98
98
  packageName = 'ydb-components-material';
99
99
  }
100
100
  if (version === void 0) {
101
- version = '0.1.180';
101
+ version = '0.1.182';
102
102
  }
103
103
  if (basicLibraryVersion === void 0) {
104
104
  basicLibraryVersion = {
@@ -103,7 +103,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
103
103
  packageName = 'ydb-components-material';
104
104
  }
105
105
  if (version === void 0) {
106
- version = '0.1.180';
106
+ version = '0.1.182';
107
107
  }
108
108
  if (basicLibraryVersion === void 0) {
109
109
  basicLibraryVersion = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ydb-components-material",
3
- "version": "0.1.180",
3
+ "version": "0.1.182",
4
4
  "description": "ydb-components-material",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -102,10 +102,10 @@
102
102
  },
103
103
  "componentConfig": {
104
104
  "isComponentLibrary": true,
105
- "materialSchema": "https://unpkg.com/ydb-components-material@0.1.180/build/lowcode/assets-prod.json"
105
+ "materialSchema": "https://unpkg.com/ydb-components-material@0.1.182/build/lowcode/assets-prod.json"
106
106
  },
107
107
  "lcMeta": {
108
108
  "type": "component"
109
109
  },
110
- "homepage": "https://unpkg.com/ydb-components-material@0.1.180/build/index.html"
110
+ "homepage": "https://unpkg.com/ydb-components-material@0.1.182/build/index.html"
111
111
  }