polyfill-common 2.1.8 → 2.1.11

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/dist/index.js CHANGED
@@ -1118,7 +1118,7 @@ var Polyfill = /*#__PURE__*/function () {
1118
1118
  }, {
1119
1119
  key: "forceUpdateFun",
1120
1120
  value: (function () {
1121
- var _forceUpdateFun = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(elSrc, contentValueTemp, attrTemp, editAreaTmp, valueDefaultPropsTemp, versionControl, playInput) {
1121
+ var _forceUpdateFun = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(elSrc, contentValueTemp, attrTemp, editAreaTmp, valueDefaultPropsTemp, versionControl, playInput) {
1122
1122
  var _this4 = this,
1123
1123
  _bse_options,
1124
1124
  _bse_options$find,
@@ -1128,9 +1128,9 @@ var Polyfill = /*#__PURE__*/function () {
1128
1128
  _this$getOptions3,
1129
1129
  _this$getOptions4,
1130
1130
  _this$getOptions5;
1131
- var editArea, currentNodeTemp, _iterator4, _step4, input, _iterator5, _step5, _contentValueTemp$inc, _contentValueTemp$inc2, _input, bse_options, bse_options_cache_axios_obj, matchLabel, emspLen, createText, addOrder, addCommaFullstop, diagnoseMapping, filterShowList, diagnoseNewAttr, addOrderNumber, addChinaOrderNumber, showDiagnoseType, showDiagnoseTitle, signTitleLabel, signDateLabel, sectionStart, splitCharList, diagnoseTypeLabel, showDescribe, _comChildLi, diagnoseSingMapping, comSignList, elSrcSpanWarp, surgeryNewAttr, surgeryMapping, innerHTMLStr, _contentValueTemp, CheckIsChinese, addressArr, showLabel, addCode, _addCode, addressNewAttr, singMapping, bse_signList_temp, signNewAttr, bse_signList, showList, mode, jobsort, bae_signList_temp, dateNewAttr, currentDate, valueArr;
1132
- return _regeneratorRuntime().wrap(function _callee$(_context) {
1133
- while (1) switch (_context.prev = _context.next) {
1131
+ var editArea, currentNodeTemp, _iterator4, _step4, input, _iterator5, _step5, _contentValueTemp$inc, _contentValueTemp$inc2, _input, bse_options, bse_options_cache_axios_obj, matchLabel, emspLen, createText, addOrder, addCommaFullstop, diagnoseMapping, filterShowList, diagnoseNewAttr, addOrderNumber, addChinaOrderNumber, showDiagnoseType, showDiagnoseTitle, signTitleLabel, signDateLabel, sectionStart, splitCharList, diagnoseTypeLabel, showDescribe, _comChildLi, diagnoseSingMapping, signOtherUserInfo, comSignList, elSrcSpanWarp, surgeryNewAttr, surgeryMapping, innerHTMLStr, _contentValueTemp, CheckIsChinese, addressArr, showLabel, addCode, _addCode, addressNewAttr, singMapping, bse_signList_temp, signNewAttr, bse_signList, showList, mode, jobsort, bae_signList_temp, dateNewAttr, currentDate, valueArr;
1132
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1133
+ while (1) switch (_context2.prev = _context2.next) {
1134
1134
  case 0:
1135
1135
  editArea = editAreaTmp || this.getEditorPageArea();
1136
1136
  currentNodeTemp = function (_elSrc$querySelector) {
@@ -1178,50 +1178,50 @@ var Polyfill = /*#__PURE__*/function () {
1178
1178
  }
1179
1179
  }();
1180
1180
  if (currentNodeTemp) {
1181
- _context.next = 4;
1181
+ _context2.next = 4;
1182
1182
  break;
1183
1183
  }
1184
- return _context.abrupt("return");
1184
+ return _context2.abrupt("return");
1185
1185
  case 4:
1186
- _context.t0 = attrTemp.type;
1187
- _context.next = _context.t0 === "radio" ? 7 : _context.t0 === "checkbox" ? 29 : _context.t0 === "select" ? 32 : _context.t0 === "diagnose" ? 44 : _context.t0 === "surgery" ? 61 : _context.t0 === "address" ? 68 : _context.t0 === "sign" ? 93 : _context.t0 === "date" ? 101 : _context.t0 === "bloodPressure" ? 103 : _context.t0 === "picturePlaceholder" ? 107 : 109;
1186
+ _context2.t0 = attrTemp.type;
1187
+ _context2.next = _context2.t0 === "radio" ? 7 : _context2.t0 === "checkbox" ? 29 : _context2.t0 === "select" ? 32 : _context2.t0 === "diagnose" ? 44 : _context2.t0 === "surgery" ? 64 : _context2.t0 === "address" ? 71 : _context2.t0 === "sign" ? 96 : _context2.t0 === "date" ? 104 : _context2.t0 === "bloodPressure" ? 106 : _context2.t0 === "picturePlaceholder" ? 110 : 112;
1188
1188
  break;
1189
1189
  case 7:
1190
1190
  _iterator4 = _createForOfIteratorHelper([].slice.call(currentNodeTemp.querySelectorAll("input")));
1191
- _context.prev = 8;
1191
+ _context2.prev = 8;
1192
1192
  _iterator4.s();
1193
1193
  case 10:
1194
1194
  if ((_step4 = _iterator4.n()).done) {
1195
- _context.next = 20;
1195
+ _context2.next = 20;
1196
1196
  break;
1197
1197
  }
1198
1198
  input = _step4.value;
1199
1199
  if (![input.getAttribute("value"), input.getAttribute("label")].includes(contentValueTemp)) {
1200
- _context.next = 17;
1200
+ _context2.next = 17;
1201
1201
  break;
1202
1202
  }
1203
1203
  input.setAttribute('checked', 'checked');
1204
1204
  // input.checked = true
1205
- return _context.abrupt("break", 20);
1205
+ return _context2.abrupt("break", 20);
1206
1206
  case 17:
1207
1207
  input.removeAttribute('checked');
1208
1208
  // input.checked = false
1209
1209
  case 18:
1210
- _context.next = 10;
1210
+ _context2.next = 10;
1211
1211
  break;
1212
1212
  case 20:
1213
- _context.next = 25;
1213
+ _context2.next = 25;
1214
1214
  break;
1215
1215
  case 22:
1216
- _context.prev = 22;
1217
- _context.t1 = _context["catch"](8);
1218
- _iterator4.e(_context.t1);
1216
+ _context2.prev = 22;
1217
+ _context2.t1 = _context2["catch"](8);
1218
+ _iterator4.e(_context2.t1);
1219
1219
  case 25:
1220
- _context.prev = 25;
1220
+ _context2.prev = 25;
1221
1221
  _iterator4.f();
1222
- return _context.finish(25);
1222
+ return _context2.finish(25);
1223
1223
  case 28:
1224
- return _context.abrupt("break", 111);
1224
+ return _context2.abrupt("break", 114);
1225
1225
  case 29:
1226
1226
  _iterator5 = _createForOfIteratorHelper([].slice.call(currentNodeTemp.querySelectorAll("input")));
1227
1227
  try {
@@ -1240,19 +1240,19 @@ var Polyfill = /*#__PURE__*/function () {
1240
1240
  } finally {
1241
1241
  _iterator5.f();
1242
1242
  }
1243
- return _context.abrupt("break", 111);
1243
+ return _context2.abrupt("break", 114);
1244
1244
  case 32:
1245
1245
  bse_options = [];
1246
1246
  if (!(attrTemp.bse_card === 'axios')) {
1247
- _context.next = 40;
1247
+ _context2.next = 40;
1248
1248
  break;
1249
1249
  }
1250
- _context.next = 36;
1250
+ _context2.next = 36;
1251
1251
  return awaitDictoryResultMiddle.call(this, attrTemp, versionControl);
1252
1252
  case 36:
1253
- bse_options_cache_axios_obj = _context.sent;
1253
+ bse_options_cache_axios_obj = _context2.sent;
1254
1254
  bse_options = this.getRadioCheckDynamicMappingValue(bse_options_cache_axios_obj);
1255
- _context.next = 41;
1255
+ _context2.next = 41;
1256
1256
  break;
1257
1257
  case 40:
1258
1258
  bse_options = attrTemp.bse_options;
@@ -1261,7 +1261,7 @@ var Polyfill = /*#__PURE__*/function () {
1261
1261
  return [f.value, f.label].includes(contentValueTemp);
1262
1262
  })) === null || _bse_options$find === void 0 ? void 0 : _bse_options$find.label;
1263
1263
  currentNodeTemp.querySelector("label").innerHTML = matchLabel || '';
1264
- return _context.abrupt("break", 111);
1264
+ return _context2.abrupt("break", 114);
1265
1265
  case 44:
1266
1266
  /* 递归算出树形数据 用于诊断控件层级渲染 */
1267
1267
  emspLen = function emspLen(level, inx, sectionStart, showDiagnoseType, showDiagnoseTitle) {
@@ -1389,7 +1389,32 @@ var Polyfill = /*#__PURE__*/function () {
1389
1389
  }[modeName]();
1390
1390
  }).join(""));
1391
1391
  };
1392
- diagnoseSingMapping = _objectSpread(_objectSpread({}, optionsDefault.signFieldsMapping), (_this$getOptions3 = this.getOptions()) === null || _this$getOptions3 === void 0 ? void 0 : _this$getOptions3.signFieldsMapping);
1392
+ diagnoseSingMapping = _objectSpread(_objectSpread({}, optionsDefault.signFieldsMapping), (_this$getOptions3 = this.getOptions()) === null || _this$getOptions3 === void 0 ? void 0 : _this$getOptions3.signFieldsMapping); // 预取其它用户签名信息(requestOtherUserInfoExtra)
1393
+ _context2.next = 58;
1394
+ return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
1395
+ var _this4$getOptions;
1396
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1397
+ while (1) switch (_context.prev = _context.next) {
1398
+ case 0:
1399
+ if (!(attrTemp.showList.includes('签名') && (_this4$getOptions = _this4.getOptions()) !== null && _this4$getOptions !== void 0 && _this4$getOptions.requestOtherUserInfoExtra)) {
1400
+ _context.next = 4;
1401
+ break;
1402
+ }
1403
+ _context.next = 3;
1404
+ return new Promise(function (resolve) {
1405
+ _this4.getOptions().requestOtherUserInfoExtra(resolve, filterShowList);
1406
+ });
1407
+ case 3:
1408
+ return _context.abrupt("return", _context.sent);
1409
+ case 4:
1410
+ case "end":
1411
+ return _context.stop();
1412
+ }
1413
+ }, _callee);
1414
+ }))();
1415
+ case 58:
1416
+ signOtherUserInfo = _context2.sent;
1417
+ // 预取其它用户签名信息(requestOtherUserInfoExtra)
1393
1418
  comSignList = function comSignList(modeName, signMappingAttr, signTitleLabel, signDateLabel, showDiagnoseTypeTmp, showDiagnoseTitleTmp, attrTemp) {
1394
1419
  var diagnoseArr = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : [];
1395
1420
  var userInfo = _this4.getUserInfoData();
@@ -1397,9 +1422,9 @@ var Polyfill = /*#__PURE__*/function () {
1397
1422
  return "".concat({
1398
1423
  horizontal: function (_diagnoseArr$diagnose2) {
1399
1424
  return "\n ".concat(signShowArr.length ? '<text style="display: block;height: 0px;margin: 0;"></text>' : '', "\n ").concat(signShowArr.some(function (s) {
1400
- return ['职称', '姓名'].includes(s);
1425
+ return ['职称', '姓名', '签名'].includes(s);
1401
1426
  }) ? "<text style=\"font-size: initial;\"><text style=\"display:inline-block;width: ".concat(showDiagnoseTypeTmp ? '88pt' : '63pt', ";text-align: right;\">").concat(signTitleLabel || '医师签名', "\uFF1A</text>").concat(signShowArr.filter(function (f) {
1402
- return ['职称', '姓名'].includes(f);
1427
+ return ['职称', '姓名', '签名'].includes(f);
1403
1428
  }).map(function (li) {
1404
1429
  if (li === '职称') {
1405
1430
  return "(".concat(userInfo[signMappingAttr[li]] || '', ")");
@@ -1408,6 +1433,9 @@ var Polyfill = /*#__PURE__*/function () {
1408
1433
  var _diagnoseArr$diagnose;
1409
1434
  return ((_diagnoseArr$diagnose = diagnoseArr[diagnoseArr.length]) === null || _diagnoseArr$diagnose === void 0 ? void 0 : _diagnoseArr$diagnose[diagnoseMapping['诊断医生']]) || userInfo[signMappingAttr[li]] || '';
1410
1435
  }
1436
+ if (li === '签名') {
1437
+ return "<img width=\"80\" height=\"15.75\" src=\"".concat(signOtherUserInfo[signMappingAttr[li]] || '', "\">");
1438
+ }
1411
1439
  return userInfo[signMappingAttr[li]] || '';
1412
1440
  }).join(" "), "</text>") : '', "\n ").concat(signShowArr.some(function (s) {
1413
1441
  return ['日期'].includes(s);
@@ -1418,9 +1446,9 @@ var Polyfill = /*#__PURE__*/function () {
1418
1446
  // }
1419
1447
  vertical: function (_diagnoseArr$diagnose4) {
1420
1448
  return "\n ".concat(signShowArr.some(function (s) {
1421
- return ['职称', '姓名'].includes(s);
1449
+ return ['职称', '姓名', '签名'].includes(s);
1422
1450
  }) ? "<text style=\"display: block;font-size: initial;\"><text style=\"display:inline-block;text-align: right;\">".concat(emspLen(1, 'sign', true, showDiagnoseTypeTmp, showDiagnoseTitleTmp)).concat(signTitleLabel || '医师签名', "\uFF1A</text>").concat(signShowArr.filter(function (f) {
1423
- return ['职称', '姓名'].includes(f);
1451
+ return ['职称', '姓名', '签名'].includes(f);
1424
1452
  }).map(function (li) {
1425
1453
  if (li === '职称') {
1426
1454
  return "(".concat(userInfo[signMappingAttr[li]] || '', ")");
@@ -1429,6 +1457,9 @@ var Polyfill = /*#__PURE__*/function () {
1429
1457
  var _diagnoseArr$diagnose3;
1430
1458
  return ((_diagnoseArr$diagnose3 = diagnoseArr[diagnoseArr.length]) === null || _diagnoseArr$diagnose3 === void 0 ? void 0 : _diagnoseArr$diagnose3[diagnoseMapping['诊断医生']]) || userInfo[signMappingAttr[li]] || '';
1431
1459
  }
1460
+ if (li === '签名') {
1461
+ return "<img width=\"80\" height=\"15.75\" src=\"".concat(signOtherUserInfo[signMappingAttr[li]] || '', "\">");
1462
+ }
1432
1463
  return userInfo[signMappingAttr[li]] || '';
1433
1464
  }).join(" "), "</text>") : '', "\n ").concat(signShowArr.some(function (s) {
1434
1465
  return ['日期'].includes(s);
@@ -1446,8 +1477,8 @@ var Polyfill = /*#__PURE__*/function () {
1446
1477
  elSrcSpanWarp.classList.contains("text-zero") && elSrcSpanWarp.classList.remove("text-zero");
1447
1478
  }
1448
1479
  currentNodeTemp.querySelector("label").innerHTML = filterShowList.length ? "".concat(_comChildLi(filterShowList, attrTemp.mode, 0, showDiagnoseType, showDiagnoseTitle, diagnoseMapping)).concat(comSignList(attrTemp.mode, diagnoseSingMapping, signTitleLabel, signDateLabel, showDiagnoseType, showDiagnoseTitle, attrTemp, filterShowList)) : "";
1449
- return _context.abrupt("break", 111);
1450
- case 61:
1480
+ return _context2.abrupt("break", 114);
1481
+ case 64:
1451
1482
  surgeryNewAttr = _objectSpread(_objectSpread({}, attrTemp), {}, {
1452
1483
  bse_surgeryList: contentValueTemp !== null && contentValueTemp !== void 0 ? contentValueTemp : []
1453
1484
  });
@@ -1467,29 +1498,29 @@ var Polyfill = /*#__PURE__*/function () {
1467
1498
  innerHTMLStr = '';
1468
1499
  }
1469
1500
  currentNodeTemp.querySelector("label").innerHTML = innerHTMLStr || '';
1470
- return _context.abrupt("break", 111);
1471
- case 68:
1501
+ return _context2.abrupt("break", 114);
1502
+ case 71:
1472
1503
  CheckIsChinese = function CheckIsChinese(str, val) {
1473
1504
  return new RegExp("[".concat(str, "]+"), "g").test(val);
1474
1505
  };
1475
1506
  addressArr = [], showLabel = '';
1476
1507
  if (!Array.isArray(contentValueTemp)) {
1477
- _context.next = 78;
1508
+ _context2.next = 81;
1478
1509
  break;
1479
1510
  }
1480
1511
  addCode = JSON.parse(JSON.stringify(contentValueTemp)).pop();
1481
- _context.next = 74;
1512
+ _context2.next = 77;
1482
1513
  return this.getAddressInfoList(addCode, attrTemp);
1483
- case 74:
1484
- addressArr = _context.sent;
1514
+ case 77:
1515
+ addressArr = _context2.sent;
1485
1516
  showLabel = addressArr.map(function (m) {
1486
1517
  return m.label;
1487
1518
  }).join('/') || "";
1488
- _context.next = 89;
1519
+ _context2.next = 92;
1489
1520
  break;
1490
- case 78:
1521
+ case 81:
1491
1522
  if (!CheckIsChinese("\\u4E00-\\u9FFF", contentValueTemp)) {
1492
- _context.next = 83;
1523
+ _context2.next = 86;
1493
1524
  break;
1494
1525
  }
1495
1526
  // *特殊中文直接渲染中文不发请求
@@ -1498,9 +1529,9 @@ var Polyfill = /*#__PURE__*/function () {
1498
1529
  name: contentValueTemp
1499
1530
  }];
1500
1531
  showLabel = contentValueTemp;
1501
- _context.next = 89;
1532
+ _context2.next = 92;
1502
1533
  break;
1503
- case 83:
1534
+ case 86:
1504
1535
  _addCode = ''; // 用于接口查询code
1505
1536
  if (CheckIsChinese('\/\|\-', contentValueTemp)) {
1506
1537
  // 地址传参 | / - Array 支持四种形式
@@ -1508,21 +1539,21 @@ var Polyfill = /*#__PURE__*/function () {
1508
1539
  } else {
1509
1540
  _addCode = contentValueTemp;
1510
1541
  }
1511
- _context.next = 87;
1542
+ _context2.next = 90;
1512
1543
  return this.getAddressInfoList(_addCode, attrTemp);
1513
- case 87:
1514
- addressArr = _context.sent;
1544
+ case 90:
1545
+ addressArr = _context2.sent;
1515
1546
  showLabel = addressArr.map(function (m) {
1516
1547
  return m.label;
1517
1548
  }).join('/') || "";
1518
- case 89:
1549
+ case 92:
1519
1550
  addressNewAttr = _objectSpread(_objectSpread({}, attrTemp), {}, {
1520
1551
  bse_address: addressArr
1521
1552
  });
1522
1553
  currentNodeTemp.setAttribute("bse", encodeURIComponent(JSON.stringify(addressNewAttr)));
1523
1554
  currentNodeTemp.querySelector("label").innerHTML = showLabel;
1524
- return _context.abrupt("break", 111);
1525
- case 93:
1555
+ return _context2.abrupt("break", 114);
1556
+ case 96:
1526
1557
  singMapping = _objectSpread(_objectSpread({}, optionsDefault.signFieldsMapping), (_this$getOptions5 = this.getOptions()) === null || _this$getOptions5 === void 0 ? void 0 : _this$getOptions5.signFieldsMapping);
1527
1558
  bse_signList_temp = contentValueTemp !== null && contentValueTemp !== void 0 ? contentValueTemp : [];
1528
1559
  signNewAttr = _objectSpread(_objectSpread({}, attrTemp), {}, {
@@ -1541,14 +1572,14 @@ var Polyfill = /*#__PURE__*/function () {
1541
1572
  // 按照规定顺序显示
1542
1573
  return dateFormat(new Date(), "yyyy-MM-dd") || m[singMapping[g]];
1543
1574
  } else if (g === "签名") {
1544
- return "<img src=\"".concat(m[singMapping[g]], "\" width=80 height=30/>");
1575
+ return "<img src=\"".concat(m[singMapping[g]], "\" width=\"80\" height=\"15.75pt\">");
1545
1576
  } else {
1546
1577
  return m[singMapping[g]];
1547
1578
  }
1548
1579
  }).join(" "), "</text>");
1549
1580
  }).join(mode === "vertical" ? "" : " / "));
1550
- return _context.abrupt("break", 111);
1551
- case 101:
1581
+ return _context2.abrupt("break", 114);
1582
+ case 104:
1552
1583
  if (currentNodeTemp.querySelector("label")) {
1553
1584
  dateNewAttr = _objectSpread(_objectSpread({}, attrTemp), {}, {
1554
1585
  date: contentValueTemp
@@ -1561,27 +1592,27 @@ var Polyfill = /*#__PURE__*/function () {
1561
1592
  currentNodeTemp.querySelector("label").innerHTML = contentValueTemp ? attrTemp.datetype === 'age' ? calculateAge(contentValueTemp) : dateFormat(contentValueTemp, attrTemp.dateformat) : '';
1562
1593
  }
1563
1594
  }
1564
- return _context.abrupt("break", 111);
1565
- case 103:
1595
+ return _context2.abrupt("break", 114);
1596
+ case 106:
1566
1597
  valueArr = contentValueTemp.split('|');
1567
1598
  currentNodeTemp.querySelector(".extensional").innerHTML = valueArr[0] || '';
1568
1599
  currentNodeTemp.querySelector(".diastolic").innerHTML = valueArr[1] || '';
1569
- return _context.abrupt("break", 111);
1570
- case 107:
1600
+ return _context2.abrupt("break", 114);
1601
+ case 110:
1571
1602
  currentNodeTemp.querySelector("label") && (currentNodeTemp.querySelector("label").innerHTML = contentValueTemp ? "<img width=\"".concat(attrTemp.width, "\" height=\"").concat(attrTemp.height, "\" src=\"").concat(contentValueTemp, "\" />") : "<svg width=\"".concat(attrTemp.width, "\" height=\"").concat(attrTemp.height, "\" viewBox=\"0 0 200 200\"><rect width=\"200\" height=\"200\" fill=\"transparent\" stroke=\"black\" stroke-width=\"2\" stroke-dasharray=\"5, 5\" rx=\"10\" ry=\"10\"></rect><text x=\"50%\" y=\"50%\" text-anchor=\"middle\" dominant-baseline=\"central\">\u56FE\u7247\u5360\u4F4D\u533A</text><text font-size=\"200\" fill=\"transparent\" stroke-opacity=\"0.1\" stroke-dasharray=\"5, 5\" stroke=\"black\" stroke-width=\"1\" x=\"50%\" y=\"50%\" text-anchor=\"middle\" dominant-baseline=\"central\">+</text></svg>"));
1572
- return _context.abrupt("break", 111);
1573
- case 109:
1603
+ return _context2.abrupt("break", 114);
1604
+ case 112:
1574
1605
  if (playInput) {
1575
1606
  palyInput(currentNodeTemp, contentValueTemp);
1576
1607
  } else {
1577
1608
  currentNodeTemp.querySelector("label") && (currentNodeTemp.querySelector("label").innerHTML = contentValueTemp !== null && contentValueTemp !== void 0 ? contentValueTemp : '');
1578
1609
  }
1579
- return _context.abrupt("break", 111);
1580
- case 111:
1610
+ return _context2.abrupt("break", 114);
1611
+ case 114:
1581
1612
  case "end":
1582
- return _context.stop();
1613
+ return _context2.stop();
1583
1614
  }
1584
- }, _callee, this, [[8, 22, 25, 28]]);
1615
+ }, _callee2, this, [[8, 22, 25, 28]]);
1585
1616
  }));
1586
1617
  function forceUpdateFun(_x, _x2, _x3, _x4, _x5, _x6, _x7) {
1587
1618
  return _forceUpdateFun.apply(this, arguments);
@@ -1751,17 +1782,17 @@ var Polyfill = /*#__PURE__*/function () {
1751
1782
  }, {
1752
1783
  key: "setAndDrawAllTestListByPageNum",
1753
1784
  value: (function () {
1754
- var _setAndDrawAllTestListByPageNum = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
1785
+ var _setAndDrawAllTestListByPageNum = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
1755
1786
  var _this5 = this;
1756
1787
  var pageNumber,
1757
1788
  allTestData,
1758
- _args3 = arguments;
1759
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1760
- while (1) switch (_context3.prev = _context3.next) {
1789
+ _args4 = arguments;
1790
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
1791
+ while (1) switch (_context4.prev = _context4.next) {
1761
1792
  case 0:
1762
- pageNumber = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : 1;
1763
- allTestData = _args3.length > 1 ? _args3[1] : undefined;
1764
- return _context3.abrupt("return", new Promise(function (reslove) {
1793
+ pageNumber = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : 1;
1794
+ allTestData = _args4.length > 1 ? _args4[1] : undefined;
1795
+ return _context4.abrupt("return", new Promise(function (reslove) {
1765
1796
  _this5.temperatureIntance.clearnByPageNumber(pageNumber).then(function () {
1766
1797
  var temperDataList = allTestData.temperDataList;
1767
1798
  var target = _this5.getEditorPageByNum(pageNumber).querySelector('.bse-content_editable');
@@ -1796,10 +1827,10 @@ var Polyfill = /*#__PURE__*/function () {
1796
1827
  });
1797
1828
  target.appendChild(div);
1798
1829
  }
1799
- requestAnimationFrame(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
1830
+ requestAnimationFrame(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
1800
1831
  var footTarget;
1801
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1802
- while (1) switch (_context2.prev = _context2.next) {
1832
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1833
+ while (1) switch (_context3.prev = _context3.next) {
1803
1834
  case 0:
1804
1835
  /** 数据存储 */
1805
1836
  if (temperDataList.length) {
@@ -1810,23 +1841,23 @@ var Polyfill = /*#__PURE__*/function () {
1810
1841
  _this5.temperatureIntance._renderingOrClearnBaseInfo(pageNumber);
1811
1842
  }
1812
1843
  footTarget = _this5.getEditorPageByNum(pageNumber).querySelector('.bse-footer_editable');
1813
- _context2.next = 4;
1844
+ _context3.next = 4;
1814
1845
  return _this5.updateReplaceApi(allTestData, footTarget, undefined, true, undefined, undefined, Object.keys(allTestData));
1815
1846
  case 4:
1816
1847
  reslove(true);
1817
1848
  case 5:
1818
1849
  case "end":
1819
- return _context2.stop();
1850
+ return _context3.stop();
1820
1851
  }
1821
- }, _callee2);
1852
+ }, _callee3);
1822
1853
  })));
1823
1854
  });
1824
1855
  }));
1825
1856
  case 3:
1826
1857
  case "end":
1827
- return _context3.stop();
1858
+ return _context4.stop();
1828
1859
  }
1829
- }, _callee3);
1860
+ }, _callee4);
1830
1861
  }));
1831
1862
  function setAndDrawAllTestListByPageNum() {
1832
1863
  return _setAndDrawAllTestListByPageNum.apply(this, arguments);
package/dist/index.min.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see index.min.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.index=t():e.index=t()}(self,()=>(()=>{"use strict";var __webpack_require__={d:(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},__webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__});var _excluded=["type"];function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _objectWithoutProperties(e,t){if(null==e)return{};var n,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _regeneratorRuntime(){_regeneratorRuntime=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var a=t&&t.prototype instanceof b?t:b,o=Object.create(a.prototype),l=new T(r||[]);return i(o,"_invoke",{value:k(e,n,l)}),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function b(){}function y(){}function v(){}var g={};s(g,o,(function(){return this}));var _=Object.getPrototypeOf,x=_&&_(_(L([])));x&&x!==n&&r.call(x,o)&&(g=x);var A=v.prototype=b.prototype=Object.create(g);function S(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function n(i,a,o,l){var c=d(e[i],e,a);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"==_typeof(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,o,l)}),(function(e){n("throw",e,o,l)})):t.resolve(u).then((function(e){s.value=e,o(s)}),(function(e){return n("throw",e,o,l)}))}l(c.arg)}var a;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return a=a?a.then(i,i):i()}})}function k(t,n,r){var i=p;return function(a,o){if(i===f)throw Error("Generator is already running");if(i===h){if("throw"===a)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var l=r.delegate;if(l){var c=I(l,r);if(c){if(c===m)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=f;var s=d(t,n,r);if("normal"===s.type){if(i=r.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(i=h,r.method="throw",r.arg=s.arg)}}}function I(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,I(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var a=d(i,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,m;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(_typeof(t)+" is not iterable")}return y.prototype=v,i(A,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,c,"GeneratorFunction")),e.prototype=Object.create(A),e},t.awrap=function(e){return{__await:e}},S(w.prototype),s(w.prototype,l,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var o=new w(u(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},S(A),s(A,c,"Generator"),s(A,o,(function(){return this})),s(A,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return l.type="throw",l.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(c&&s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function asyncGeneratorStep(e,t,n,r,i,a,o){try{var l=e[a](o),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,i)}function _asyncToGenerator(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){asyncGeneratorStep(a,r,i,o,l,"next",e)}function l(e){asyncGeneratorStep(a,r,i,o,l,"throw",e)}o(void 0)}))}}function _createForOfIteratorHelper(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw a}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_toPropertyKey(r.key),r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var optionsDefault={baseUrl:"",mode:"designMode",loading:!1,autoPaging:!0,height:"",el:null,footer:"技术支持",iframeCssSrc:[],iframeJsSrc:[],beforeunload:!0,paper:"A4",papersizes:{A4:{w:210,h:297,pt:20,pb:15,pl:15,pr:15},A5:{w:148,h:210,pt:20,pb:15,pl:15,pr:15},A6:{w:105,h:148,pt:20,pb:15,pl:15,pr:15}},toolbars:{nav:[{name:"file",title:"文件",items:[{name:"打开",title:"打开",disabled:!0},{name:"保存",title:"保存",disabled:!0},{name:"打印",title:"打印",items:[{name:"预览",title:"预览",disabled:!0},{name:"print",title:"打印"},{name:"续打",title:"续打",disabled:!0},{name:"套打",title:"套打",disabled:!0}]},{name:"页面设置",title:"页面设置",items:[{name:"A4",title:"A4"},{name:"A5",title:"A5"},{name:"A6",title:"A6"}]},{name:"mode",title:"浏览模式选择",items:[{name:"editMode",title:"编辑模式"},{name:"designMode",title:"设计模式"},{name:"previewMode",title:"预览模式"}]}]},{name:"edit",title:"编辑",items:[{name:"undo",title:"撤销"},{name:"redo",title:"恢复"},{name:"paste",title:"粘贴"},{name:"选择性粘贴",title:"选择性粘贴",disabled:!0},{name:"copy",title:"复制"},{name:"cut",title:"剪切"},{name:"removeFormat",title:"清除格式"},{name:"subscript",title:"下标"},{name:"superscript",title:"上标"},{name:"bold",title:"加粗 ctrl+b"},{name:"italic",title:"倾斜 ctrl+i"},{name:"underline",title:"下划线"},{name:"strikeThrough",title:"删除线"},{name:"insertHorizontalRule",title:"分割线"},{name:"selectAll",title:"选择全部 ctrl+a"},{name:"justifyLeft",title:"向左对齐"},{name:"justifyCenter",title:"居中对齐"},{name:"justifyRight",title:"向右对齐"},{name:"justifyFull",title:"两端对齐"},{name:"insertUnorderedList",title:"无序编号"},{name:"insertOrderedList",title:"有序编号"}]},{name:"element",title:"元素",items:[{name:"radio",title:"单选框"},{name:"checkbox",title:"多选框"},{name:"date",title:"日期"},{name:"input",title:"输入框"},{name:"select",title:"下拉框"},{name:"label",title:"标签"},{name:"number",title:"数字"},{name:"diagnose",title:"诊断"},{name:"surgery",title:"手术"},{name:"sign",title:"签名"},{name:"bloodPressure",title:"血压"},{name:"insertPicture",title:"图片"},{name:"pagination",title:"页码"},{name:"medicalExpression",title:"医学表达式"}]},{name:"test",title:"测试功能",items:[{name:"testCopyContentHtml",title:"【复制】内容html"},{name:"testSetContentEmpty",title:"【设置】内容为空"},{name:"testCopyFullContentHtml",title:"【复制】整个html"},{name:"testExportFullContentHtml",title:"【导出】整个html"},{name:"exportXml",title:"【导出】整个xml"}]}],common:[{name:"undo",title:"撤销"},{name:"redo",title:"恢复"},{name:"paste",title:"粘贴"},{name:"copy",title:"复制"},{name:"cut",title:"剪切"},{name:"fontName",title:"字体"},{name:"fontSize",title:"字号"},{name:"foreColor",title:"文字颜色"},{name:"hiliteColor",title:"背景颜色"},{name:"removeFormat",title:"清除格式"},{name:"subscript",title:"下标"},{name:"superscript",title:"上标"},{name:"bold",title:"加粗 ctrl+b"},{name:"italic",title:"倾斜 ctrl+i"},{name:"underline",title:"下划线"},{name:"strikeThrough",title:"删除线"},{name:"insertHorizontalRule",title:"分割线"},{name:"selectAll",title:"选择全部 ctrl+a"},{name:"spechars",title:"特殊字符"},{name:"justifyLeft",title:"向左对齐"},{name:"justifyCenter",title:"居中对齐"},{name:"justifyRight",title:"向右对齐"},{name:"justifyFull",title:"两端对齐"},{name:"insertUnorderedList",title:"无序编号"},{name:"insertOrderedList",title:"有序编号"}]},diagnoseFieldsMapping:{"主键":"bse_id","父主键":"bse_parentId","子集":"bse_children","分类":"bse_type","类型":"bse_categery","病名":"bse_disease_name","病描述":"bse_disease_name_desc","症名":"bse_symptom_name","症描述":"bse_symptom_name_desc","诊断名":"bse_diagnose_name","诊断描述":"bse_diagnose_name_desc","序号":"bse_sort","诊断日期":"bse_diagnose_date","诊断医生":"bse_diagnose_doctor"},surgeryFieldsMapping:{"类型":"bse_type","手术编码":"bse_code","手术名":"bse_name","手术描述":"bse_describe","日期":"bse_date","手术等级":"bse_surgeryLevel","术者":"bse_doctor","一助":"bse_firstAssistant","二助":"bse_secondAssistant","护士姓名":"bse_nurseName","切口等级":"bse_incisionLevel","愈合等级":"bse_healingLevel","麻醉方法":"bse_anesthesia","麻醉医师":"bse_anesthesiologist"},signFieldsMapping:{"姓名":"bse_userName","签名":"bse_signName","职称":"bse_professionalTitle","日期":"bse_data","工号":"bse_jobNumber","等级":"bse_level"}};function dateFormat(e,t){if(e){var n,r={"y+":(e=new Date(e)).getFullYear().toString(),"M+":(e.getMonth()+1).toString(),"d+":e.getDate().toString(),"H+":e.getHours().toString(),"m+":e.getMinutes().toString(),"s+":e.getSeconds().toString()};for(var i in r)(n=new RegExp("("+i+")").exec(t))&&(t=t.replace(n[1],1==n[1].length?r[i]:r[i].padStart(n[1].length,"0")));return t}}function calculateAge(e){if(!e)return"";var t=new Date(e);if(isNaN(t.getTime()))return"";var n=new Date,r=n.getFullYear()-t.getFullYear(),i=n.getMonth()-t.getMonth(),a=n.getDate()-t.getDate();a<0&&(i--,a+=new Date(n.getFullYear(),n.getMonth(),0).getDate());return i<0&&(r--,i+=12),r>=2?"".concat(r,"岁"):r>=1?"".concat(r,"年").concat(i,"个月"):i>=1?"".concat(i,"个月"):"".concat(Math.max(a,1),"天")}function def(e,t,n){try{e instanceof Object&&Object.defineProperty(e,t,{writable:!0,value:n,configurable:!1,enumerable:!1})}catch(e){}}function trim(e){return e.replace(/(^[ \t\n\r]+)|([ \t\n\r]+$)/g,"")}function treeToArr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];e=JSON.parse(JSON.stringify(e));var i=t._children||"_children",a=t._id||"_id",o=t._parentId||"_parentId";return e.forEach((function(e){r.push(_objectSpread(_objectSpread({},e),{},_defineProperty({},o,n))),e[i]&&e[i].length&&treeToArr(e[i],t,e[a],r),delete e[i]})),r}function arrToTree(e,t,n){return(e=JSON.parse(JSON.stringify(e))).filter((function(r){return void 0===t?0===r[n["父主键"]]||!e.map((function(e){return e[n["主键"]]})).includes(r[n["父主键"]]):r[n["父主键"]]===t})).map((function(t){return t[n["子集"]]=arrToTree(e,t[n["主键"]],n),t})).sort((function(e,t){return e[n["序号"]]-t[n["序号"]]}))}function jsonparse(jsonify){try{return JSON.parse(jsonify)}catch(_unused){try{return JSON.parse(decodeURIComponent(jsonify))}catch(_unused2){var str=decodeURIComponent(jsonify),evalObj=eval("("+str+")");return evalObj}}}function isBseElement(e){return e&&e.hasAttribute&&e.hasAttribute("bse")}function getElementAttribute(e){return isBseElement(e)?e&&jsonparse(e.getAttribute&&e.getAttribute("bse")):{descr:'不是"bse"标签元素'}}function getItorElementBseAttrAndEl(e){for(var t={descr:'不是"bse"标签元素'};e&&"BODY"!==e.nodeName;){var n=getElementAttribute(e);if('不是"bse"标签元素'!==n.descr){t=_objectSpread(_objectSpread({},n),{},{elSrc:e});break}e=e.parentNode}return t}function isFunction(e){return!!e&&"[object Function]"===Object.prototype.toString.call(e)}function awaitDictoryResultMiddle(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise((function(r){t.getOptions().requestTable,n?t.getOptions().requestTable(r,e):r({tableOptions:e.bse_options||[],tableOptionsMapping:{}})}))}function groupBy(e,t){return e.reduce((function(e,n){return e[t(n)]?e[t(n)].push(n):e[t(n)]=[n],e}),{})}function itorMergeBreakEle(e,t,n){for(var r=e.getAttribute("".concat(n.childIndex))?e:e.querySelector("*[".concat(n.childIndex,"]")),i=t.getAttribute("".concat(n.childIndex))?t:t.querySelector("*[".concat(n.childIndex,"]"));i&&!["#document-fragment","TD"].includes(i.nodeName);){var a,o,l,c,s;if(!r){var u,d=null===(u=i)||void 0===u?void 0:u.getAttribute("".concat(n.childIndex));if(d){var p,f,h=e.getAttribute("".concat(n.parentIndex));return null==e||e.setAttribute("tem_".concat(n.parentIndex),h),null===(p=i)||void 0===p||p.setAttribute("tem_".concat(n.childIndex),d),null==e||null===(f=e.insertAdjacentHTML)||void 0===f||f.call(e,"beforeend",t.innerHTML),t.remove(),e}}var m=null===(a=i)||void 0===a?void 0:a.getAttribute("tem_".concat(n.childIndex));if(m){var b;null===(b=r)||void 0===b||b.setAttribute("tem_".concat(n.childIndex),m)}else{var y,v,g,_=null===(y=r)||void 0===y||null===(v=(g=y).getAttribute)||void 0===v?void 0:v.call(g,"tem_".concat(n.childIndex));_&&i.setAttribute("tem_".concat(n.childIndex),_)}null===(o=r)||void 0===o||null===(l=(c=o).insertAdjacentHTML)||void 0===l||l.call(c,"beforeend",i.innerHTML),r=null===(s=r)||void 0===s?void 0:s.parentNode;var x=i.parentNode;i.remove(),i=x}return e}function b64_to_utf8(e){try{return decodeURIComponent(escape(atob(e)))}catch(e){return""}}var isEven=function(e){return e%2==0},isOdd=function(e){return e%2==1};function decide(e){return Math.random()<e}function randomVaildate(e,t){var n=this.getOptions(),r=n._questTable,i=n._questCascaderBindOptions,a=n._questDiagnoseTypeOptions,o=n._questUserInfoExtra,l=n.keyMode;if(!"3012434b484cc204b927d36e901b2618607f9a5f".includes(l)){if(!l&&decide(.02)){if(console.log("dec-"),t){var c=this.document.createElement("summary");return c.appendChild(e),c.innerHTML}return e}var s=b64_to_utf8(r),u=b64_to_utf8(i),d=b64_to_utf8(a),p=b64_to_utf8(o);if(isOdd(l)&&decide(.02)){if(console.log("dec-o"),isEven(s)||isOdd(u)||isEven(d)||isEven(p)){if(t){var f=this.document.createElement("summary");return f.appendChild(e),f.innerHTML}return e}}else if(isEven(l)&&decide(.02)&&(isOdd(s)||isEven(u)||isOdd(d)||isOdd(p))){if(t){var h=this.document.createElement("summary");return h.appendChild(e),h.innerHTML}return e}}}function palyInput(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;n<=t.length&&requestAnimationFrame((function(){var r;e.querySelector("label")&&(e.querySelector("label").innerHTML=null!==(r=t.slice(0,n))&&void 0!==r?r:""),palyInput(e,t,n+1)}))}var Polyfill=function(){return _createClass((function e(t){return _classCallCheck(this,e),t.use=this.use.bind(t),t.forceUpdateFun=this.forceUpdateFun.bind(t),t.registerCommand=this.registerCommand.bind(t),t.enhanceArrToTree=this.enhanceArrToTree.bind(t),t.getAddressInfoList=this.getAddressInfoList.bind(t),t.itorParentCacheId=this.itorParentCacheId.bind(t),t.mergeAndRemoveAttrBreakEleString=this.mergeAndRemoveAttrBreakEleString.bind(t),t.getDomRectRelative=this.getDomRectRelative.bind(t),t.setAndDrawAllTestListByPageNum=this.setAndDrawAllTestListByPageNum.bind(t),t}),[{key:"enhanceArrToTree",value:function(e,t,n,r,i){var a=this;[void 0].includes(n)&&(e=treeToArr(e,t));var o=t._id||"_id",l=t._parentId||"_parentId",c=t._children||"_children",s=t._order||"_order",u=t._level||"_level",d=t._path||"_path";return e.filter((function(t){return[void 0].includes(n)?!e.map((function(e){return e[o]})).includes(t[l]):t[l]===n})).sort((function(e,t){return e[s]-t[s]})).map((function(n,l){var p=i?i+"/"+l:l,f=r?r+"/"+n[o]:n[o],h=a.enhanceArrToTree(e,t,n[o],f,p);return def(n,u,p),def(n,s,l),def(n,d,f),h.length?n[c]=h:delete n[c],n}))}},{key:"use",value:function(e){var t;null===(t=e.install)||void 0===t||t.call(this)}},{key:"registerCommand",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{init:new Function,execCommand:"",queryCommandState:"",queryCommandValue:""},r=_createForOfIteratorHelper(trim(e).split(/\s+/));try{for(r.s();!(t=r.n()).done;){var i=t.value;this.commands&&Object.hasOwn(this.commands,i)&&"development"==process.env.VUE_APP_ENV&&console.warn("【warning】:".concat(i,"命令名存在相同,无法注册")),isFunction(n)?n.apply(this,arguments):(isFunction(n.init)&&n.init.apply(this,arguments),this.commands?this.commands[i]=n:this.commands=_defineProperty({},i,n))}}catch(e){r.e(e)}finally{r.f()}}},{key:"getAddressInfoList",value:function(e,t){var n=this,r=JSON.parse(JSON.stringify(e));function i(e,t,n){var r=n.value,i=n.children,a={};return function e(t,n){var o,l=_createForOfIteratorHelper(t);try{for(l.s();!(o=l.n()).done;){var c=o.value;if(c[r]===n)return a=c,!0;if(c[i]&&c[i].length){var s=e(c[i],n);if(s)return s}}}catch(e){l.e(e)}finally{l.f()}}(t,e),a}var a=new Promise((function(a){n.getOptions().requestParentAddressByParam((function(t){if(t){var r=t.addressMapping,o=Array.isArray(t)?t:(null==t?void 0:t.addressList)||[],l=Object.assign({children:"children",label:"name",value:"code",parentId:"parentCode"},r||{}),c=n.enhanceArrToTree(o,{_id:l.value,_parentId:l.parentId,_children:l.children}),s=function(e,t,n){var r,a=Array.isArray(e)?e:null===(r=i(e,t,n))||void 0===r||null===(r=r._path)||void 0===r?void 0:r.split("/"),o=n.value,l=n.label;return(null==a?void 0:a.map((function(e){var r=i(e,t,n);return{value:r[o],label:r[l]}})))||[]}(e,c,{label:l.label,value:l.value,children:l.children});a(s)}else a([])}),Array.isArray(r)?r.pop():e,t)})),o=new Promise((function(e,t){setTimeout((function(){t(new Error("操作超时"))}),8e3)}));return Promise.race([a,o]).then((function(e){return e})).catch((function(e){return[]}))}},{key:"itorParentCacheId",value:function(e){for(var t=!1,n=e,r=e;n&&!t&&!["BODY","DIV"].includes(n.nodeName);){if(n.hasAttribute("helper_data_cache_id")){t=!0;break}n=n.parentNode}return{isInsideFlag:t,currentNode:n,directNode:r}}},{key:"forceUpdateFun",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,n,r,i,a,o,l){var c,s,u,d,p,f,h,m,b,y,v,g,_,x,A,S,w,k,I,j,O,T,L,P,E,M,C,N,F,q,D,H,R,z,B,U,J,G,W,K,Y,V,X,$,Q,Z,ee,te,ne,re,ie,ae,oe,le,ce,se,ue,de,pe,fe,he,me,be,ye=this;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(b=i||this.getEditorPageArea(),y=function(e){var n=t.getAttribute("helper_data_cache_child_id")||(null===(e=t.querySelector("*[helper_data_cache_child_id]"))||void 0===e?void 0:e.getAttribute("helper_data_cache_child_id"));if(n){for(var r,a,o=b.querySelectorAll('*[helper_data_cache_child_id="'.concat(n,'"]')),l=null,c=o.length-1;c>=0;c--)c?(getItorElementBseAttrAndEl(o[c]).elSrc.remove(),console.log("remove break ele")):l=getItorElementBseAttrAndEl(o[c]).elSrc;null===(r=l.querySelector("*[helper_data_cache_child_id]"))||void 0===r||null===(a=r.removeAttribute)||void 0===a||a.call(r,"helper_data_cache_child_id");var s=ye.itorParentCacheId(l),u=s.isInsideFlag,d=s.currentNode;if(u&&!d.querySelector("*[helper_data_cache_child_id]")&&(d.removeAttribute("helper_data_cache_id"),d.removeAttribute("helper_data_last_break_ele")),i){var p,f=_createForOfIteratorHelper([].slice.call(l.querySelectorAll("*[helper_data_virtual_id]")));try{for(f.s();!(p=f.n()).done;){var h=p.value;h.removeAttribute("helper_data_virtual_id"),h.removeAttribute("helper_data_virtual_node")}}catch(e){f.e(e)}finally{f.f()}}return l}return t}()){e.next=4;break}return e.abrupt("return");case 4:e.t0=r.type,e.next="radio"===e.t0?7:"checkbox"===e.t0?29:"select"===e.t0?32:"diagnose"===e.t0?44:"surgery"===e.t0?61:"address"===e.t0?68:"sign"===e.t0?93:"date"===e.t0?101:"bloodPressure"===e.t0?103:"picturePlaceholder"===e.t0?107:109;break;case 7:v=_createForOfIteratorHelper([].slice.call(y.querySelectorAll("input"))),e.prev=8,v.s();case 10:if((g=v.n()).done){e.next=20;break}if(![(_=g.value).getAttribute("value"),_.getAttribute("label")].includes(n)){e.next=17;break}return _.setAttribute("checked","checked"),e.abrupt("break",20);case 17:_.removeAttribute("checked");case 18:e.next=10;break;case 20:e.next=25;break;case 22:e.prev=22,e.t1=e.catch(8),v.e(e.t1);case 25:return e.prev=25,v.f(),e.finish(25);case 28:return e.abrupt("break",111);case 29:x=_createForOfIteratorHelper([].slice.call(y.querySelectorAll("input")));try{for(x.s();!(A=x.n()).done;)k=A.value,null!=n&&null!==(S=n.includes)&&void 0!==S&&S.call(n,k.getAttribute("value"))||null!=n&&null!==(w=n.includes)&&void 0!==w&&w.call(n,k.getAttribute("label"))?k.setAttribute("checked","checked"):k.removeAttribute("checked")}catch(e){x.e(e)}finally{x.f()}return e.abrupt("break",111);case 32:if(I=[],"axios"!==r.bse_card){e.next=40;break}return e.next=36,awaitDictoryResultMiddle.call(this,r,o);case 36:j=e.sent,I=this.getRadioCheckDynamicMappingValue(j),e.next=41;break;case 40:I=r.bse_options;case 41:return O=null===(c=I)||void 0===c||null===(s=c.find)||void 0===s||null===(s=s.call(c,(function(e){return[e.value,e.label].includes(n)})))||void 0===s?void 0:s.label,y.querySelector("label").innerHTML=O||"",e.abrupt("break",111);case 44:return T=function(e,t,n,r,i){var a=e;return!n&&r&&i?(e>1&&(a-=2),a*=2):n?"sign"===t?(r&&i||a--,a*=2):(r||a--,i||a--,a*=2):!r&&i?1===e?a--:2===e?0===t?a-=2:(a*=2,a++):e&&(a*=2,a++):r&&!i?(a--,a*=2):r||i||(a-=2,a*=2),Array(a).fill().map((function(){return"&emsp;"})).join("")},L=function(e,t,n){var r=!0;return t&&n&&!e||(r=!1),r?'<text style="display:inline-block;">'.concat(Array(7).fill().map((function(){return"&emsp;"})).join(""),"</text>"):""},P=function(e,t){return e?t+1+".":""},E=function(e,t){return e+1===t.length?"。":","},M=_objectSpread(_objectSpread(_objectSpread({},optionsDefault.diagnoseFieldsMapping),null===(u=this.getOptions())||void 0===u?void 0:u.diagnoseFieldsMapping),a),C=(null===(d=(p=n||[]).filter)||void 0===d?void 0:d.call(p,(function(e){return[r.diagnoseType.label,r.diagnoseType.value].includes(e[M["类型"]])&&("中西医诊断"===r.chineseAndWesternType||r.chineseAndWesternType===e[M["分类"]])})))||[],N=_objectSpread(_objectSpread({},r),{},{bse_multipleSelection:null!=C?C:[]}),y.setAttribute("bse",encodeURIComponent(JSON.stringify(N))),C=C?arrToTree(C,void 0,M).reduce((function(e,t){var n=e.find((function(e){return e.label===t[M["类型"]]}));return n?n[M["子集"]].push(t):e.push(_defineProperty({label:t[M["类型"]]},M["子集"],[t])),e}),[]).reduce((function(e,t){return e.push(_objectSpread(_objectSpread({},t),{},_defineProperty({},M["子集"],t[M["子集"]].reduce((function(e,t){var n=e.find((function(e){return e.label===t[M["分类"]]}));return n?n[M["子集"]].push(t):e.push(_defineProperty({label:t[M["分类"]]},M["子集"],[t])),e}),[])))),e}),[]):{},F=r.addOrderNumber,q=r.addChinaOrderNumber,D=r.showDiagnoseType,H=r.showDiagnoseTitle,R=r.signTitleLabel,z=r.signDateLabel,B=r.sectionStart,U=r.splitCharList,J=r.diagnoseTypeLabel,G=r.showDescribe,W=function(e,t,n,r,i,a){return"".concat(e.map((function(o,l){return{horizontal:function(){return"".concat([0,1].includes(n)?"".concat("".concat(0===n?D?'<text style="font-size: initial;font-weight: bold;">'.concat(J||o.label," </text>"):"":H?'<text style="font-size: initial;">'.concat(o.label,": </text>"):"")):"".concat("中医诊断"===o[a["分类"]]?"".concat(P(q&&2===n,l),'<text style="font-size: initial;">').concat(o[a[G?"病描述":"病名"]]||"",'</text>\n <text style="font-size: initial;">').concat(U[0]||" ").concat(o[a[G?"症描述":"症名"]]).concat(U[1]||" ","</text>").concat(E(l,e)):"".concat(P(F&&2===n,l),'<text style="font-size: initial;">').concat(o[a[G?"诊断描述":"诊断名"]]||"","</text>").concat(E(l,e))),"\n ").concat(o[a["子集"]]&&o[a["子集"]].length?W(o[a["子集"]],t,n+1,r,i,a):"")},vertical:function(){return"".concat("中医诊断"===o[a["分类"]]?[0,1,2].includes(n)?"".concat(0===n?D?'<text style="font-size: initial;display:block;font-size: initial;">'.concat(J||o.label,"</text>"):"":1===n?H?'<text style="display:block;"></text><text style="font-size: initial;display:'.concat(B?"block":"inline-block",';"><text style="font-size: initial;display: inline-block;">').concat(T(n,l,B,D,H)).concat(o.label,":</text></text>"):"":'<text style="font-size: initial;display:'.concat(B||0!==l?"block":"inline-block",';">').concat(B||0!==l?"".concat(L(B,D,H)):"",'<text style="font-size: initial;display: inline-block;">').concat(T(n,l,B,D,H)).concat(P(q&&2===n,l)).concat(o[a[G?"病描述":"病名"]]||"","</text></text>")+'<text style="font-size: initial;display:block">'.concat(L(B,D,H),'<text style="font-size: initial;display: inline-block;">').concat(T(n+1,l,B,D,H)).concat(o[a[G?"症描述":"症名"]]||"","</text></text>")):'<text style="font-size: initial;display:block">'.concat(L(B,D,H),'<text style="font-size: initial;display: inline-block;">').concat(T(n,l,B,D,H)).concat(P(q&&2===n,l)).concat(o[a[G?"病描述":"病名"]]||"","</text></text>")+'<text style="font-size: initial;display:block">'.concat(L(B,D,H),'<text style="font-size: initial;display: inline-block;">').concat(T(n+1,l,B,D,H)).concat(o[a[G?"症描述":"症名"]]||"","</text></text>"):[0,1,2].includes(n)?"".concat(0===n?D?'<text style="font-size: initial;display:block;">'.concat(J||o.label,"</text>"):"":1===n?H?'<text style="display:block;"></text><text style="font-size: initial;display:'.concat(B?"block":"inline-block",';"><text style="font-size: initial;display: inline-block;">').concat(T(n,l,B,D,H)).concat(o.label,":</text></text>"):"":'<text style="font-size: initial;display:'.concat(B||0!==l?"block":"inline-block",';">').concat(B||0!==l?"".concat(L(B,D,H)):"",'<text style="font-size: initial;display: inline-block;">').concat(T(n,l,B,D,H)).concat(P(F&&2===n,l)).concat(o[a[G?"诊断描述":"诊断名"]]||"","</text></text>")):'<text style="font-size: initial;display:block">'.concat(L(B,D,H),'<text style="font-size: initial;display: inline-block;">').concat(T(n,l,B,D,H)).concat(P(F&&2===n,l)).concat(o[a[G?"诊断描述":"诊断名"]]||"","</text></text>"),"\n ").concat(o[a["子集"]]&&o[a["子集"]].length?W(o[a["子集"]],t,n+1,r,i,a):"")}}[t]()})).join(""))},K=_objectSpread(_objectSpread({},optionsDefault.signFieldsMapping),null===(f=this.getOptions())||void 0===f?void 0:f.signFieldsMapping),Y=function(e,t,n,r,i,a,o){var l,c,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],u=ye.getUserInfoData(),d=o.showList||[];return"".concat({horizontal:"\n ".concat(d.length?'<text style="display: block;height: 0px;margin: 0;"></text>':"","\n ").concat(d.some((function(e){return["职称","姓名"].includes(e)}))?'<text style="font-size: initial;"><text style="display:inline-block;width: '.concat(i?"88pt":"63pt",';text-align: right;">').concat(n||"医师签名",":</text>").concat(d.filter((function(e){return["职称","姓名"].includes(e)})).map((function(e){return"职称"===e?"(".concat(u[t[e]]||"",")"):"姓名"===e?(null===(n=s[s.length])||void 0===n?void 0:n[M["诊断医生"]])||u[t[e]]||"":u[t[e]]||"";var n})).join(" "),"</text>"):"","\n ").concat(d.some((function(e){return["日期"].includes(e)}))?'<text style="font-size: initial;"><text style="display:inline-block;width: '.concat(i?"88pt":"63pt",';text-align: right;">').concat(r||"日期",':</text><text bse_child="diagnoseDdate">').concat(dateFormat((null===(c=s[s.length])||void 0===c?void 0:c[M["诊断日期"]])||u[t["日期"]]||new Date,o.diagDateFormat||"yyyy-MM-dd"),"</text></text>"):"","\n "),vertical:"\n ".concat(d.some((function(e){return["职称","姓名"].includes(e)}))?'<text style="display: block;font-size: initial;"><text style="display:inline-block;text-align: right;">'.concat(T(1,"sign",!0,i,a)).concat(n||"医师签名",":</text>").concat(d.filter((function(e){return["职称","姓名"].includes(e)})).map((function(e){return"职称"===e?"(".concat(u[t[e]]||"",")"):"姓名"===e?(null===(n=s[s.length])||void 0===n?void 0:n[M["诊断医生"]])||u[t[e]]||"":u[t[e]]||"";var n})).join(" "),"</text>"):"","\n ").concat(d.some((function(e){return["日期"].includes(e)}))?'<text style="display: block;font-size: initial;"><text style="display:inline-block;text-align: right;">'.concat(T(2,"sign",!0,i,a)).concat(r||"日期",':</text><text bse_child="diagnoseDdate">').concat(dateFormat((null===(l=s[s.length])||void 0===l?void 0:l[M["诊断日期"]])||u[t["日期"]]||new Date,o.diagDateFormat||"yyyy-MM-dd"),"</text></text>"):"","\n ")}[e])},V=y.querySelector("span"),"vertical"===r.mode?(!V.classList.contains("inline-flex")&&V.classList.add("inline-flex"),!V.classList.contains("text-zero")&&V.classList.add("text-zero")):(V.classList.contains("inline-flex")&&V.classList.remove("inline-flex"),V.classList.contains("text-zero")&&V.classList.remove("text-zero")),y.querySelector("label").innerHTML=C.length?"".concat(W(C,r.mode,0,D,H,M)).concat(Y(r.mode,K,R,z,D,H,r,C)):"",e.abrupt("break",111);case 61:return X=_objectSpread(_objectSpread({},r),{},{bse_surgeryList:null!=n?n:[]}),y.setAttribute("bse",encodeURIComponent(JSON.stringify(X))),$=_objectSpread(_objectSpread(_objectSpread({},optionsDefault.surgeryFieldsMapping),null===(h=this.getOptions())||void 0===h?void 0:h.surgeryFieldsMapping),a),Q="",Q=n.length?["手术名","手术描述"].includes(r.fieldName)?n.map((function(e,t){var i=e[$[r.fieldName]]||"";return"".concat(n.length>1?"".concat(t+1,"."):"").concat(i)})).join(""):(null===(Z=n[n.length-1])||void 0===Z?void 0:Z[$[r.fieldName]||""])||"":"",y.querySelector("label").innerHTML=Q||"",e.abrupt("break",111);case 68:if(ee=function(e,t){return new RegExp("[".concat(e,"]+"),"g").test(t)},te=[],ne="",!Array.isArray(n)){e.next=78;break}return re=JSON.parse(JSON.stringify(n)).pop(),e.next=74,this.getAddressInfoList(re,r);case 74:te=e.sent,ne=te.map((function(e){return e.label})).join("/")||"",e.next=89;break;case 78:if(!ee("\\u4E00-\\u9FFF",n)){e.next=83;break}te=[{value:"编辑器 - 字段绑定为地区中文名!无法查询地区code",name:n}],ne=n,e.next=89;break;case 83:return ie="",ie=ee("/|-",n)?n.split(/(\/|\||\-)/).pop():n,e.next=87,this.getAddressInfoList(ie,r);case 87:te=e.sent,ne=te.map((function(e){return e.label})).join("/")||"";case 89:return ae=_objectSpread(_objectSpread({},r),{},{bse_address:te}),y.setAttribute("bse",encodeURIComponent(JSON.stringify(ae))),y.querySelector("label").innerHTML=ne,e.abrupt("break",111);case 93:return oe=_objectSpread(_objectSpread({},optionsDefault.signFieldsMapping),null===(m=this.getOptions())||void 0===m?void 0:m.signFieldsMapping),le=null!=n?n:[],ce=_objectSpread(_objectSpread({},r),{},{bse_signList:le}),y.setAttribute("bse",encodeURIComponent(JSON.stringify(ce))),se=ce.bse_signList,ue=ce.showList,de=ce.mode,pe=ce.jobsort,fe=se.length?se.sort((function(e,t){return"asc"===pe?e[oe["等级"]]-t[oe["等级"]]:t[oe["等级"]]-e[oe["等级"]]})):[],y.querySelector("label").innerHTML="".concat(fe.map((function(e){return'<text style="display: '.concat("vertical"===de?"block":"inline-block",'">').concat(["姓名","签名","职称","日期"].filter((function(e){return ue.includes(e)})).map((function(t){return"日期"===t?dateFormat(new Date,"yyyy-MM-dd")||e[oe[t]]:"签名"===t?'<img src="'.concat(e[oe[t]],'" width=80 height=30/>'):e[oe[t]]})).join(" "),"</text>")})).join("vertical"===de?"":" / ")),e.abrupt("break",111);case 101:return y.querySelector("label")&&(he=_objectSpread(_objectSpread({},r),{},{date:n}),y.setAttribute("bse",encodeURIComponent(JSON.stringify(he))),n||y.querySelector("label").innerHTML?y.querySelector("label").innerHTML=n?"age"===r.datetype?calculateAge(n):dateFormat(n,r.dateformat):"":(me=he.value||he.defCurrentDate?new Date:"",y.querySelector("label").innerHTML=me?"age"===r.datetype?calculateAge(me):dateFormat(me,r.dateformat):"")),e.abrupt("break",111);case 103:return be=n.split("|"),y.querySelector(".extensional").innerHTML=be[0]||"",y.querySelector(".diastolic").innerHTML=be[1]||"",e.abrupt("break",111);case 107:return y.querySelector("label")&&(y.querySelector("label").innerHTML=n?'<img width="'.concat(r.width,'" height="').concat(r.height,'" src="').concat(n,'" />'):'<svg width="'.concat(r.width,'" height="').concat(r.height,'" viewBox="0 0 200 200"><rect width="200" height="200" fill="transparent" stroke="black" stroke-width="2" stroke-dasharray="5, 5" rx="10" ry="10"></rect><text x="50%" y="50%" text-anchor="middle" dominant-baseline="central">图片占位区</text><text font-size="200" fill="transparent" stroke-opacity="0.1" stroke-dasharray="5, 5" stroke="black" stroke-width="1" x="50%" y="50%" text-anchor="middle" dominant-baseline="central">+</text></svg>')),e.abrupt("break",111);case 109:return l?palyInput(y,n):y.querySelector("label")&&(y.querySelector("label").innerHTML=null!=n?n:""),e.abrupt("break",111);case 111:case"end":return e.stop()}}),e,this,[[8,22,25,28]])}))),function(e,n,r,i,a,o,l){return t.apply(this,arguments)})},{key:"mergeAndRemoveAttrBreakEleString",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{tdCacheIndex:"helper_data_cache_id",tdParentIndex:"helper_data_cache_id",tdChildIndex:"helper_data_cache_child_id",parentIndex:"helper_data_cache_id",childIndex:"helper_data_cache_child_id",virtualIndex:"helper_data_virtual_id"},a=null==r?void 0:r.previousSibling,o=null==r||null===(t=r.nextSibling)||void 0===t?void 0:t.nextSibling,l=this.document.createRange().createContextualFragment(e),c=randomVaildate.call(this,l,n);if(c)return c;for(var s=groupBy([].slice.call(l.querySelectorAll("table[".concat(i.parentIndex,"]"))),(function(e){return e.getAttribute("".concat(i.parentIndex))})),u=0,d=Object.entries(s);u<d.length;u++)for(var p=_slicedToArray(d[u],2),f=(p[0],p[1]),h=f.length-1;h>0;h--){var m,b,y=h-1,v=f[y],g=f[h],_=v.getAttribute("".concat(i.parentIndex)),x=v.getAttribute("minmergesplitrownumber");if(x){var A=g.getAttribute("minmergesplitrownumber"),S=parseInt(x)+parseInt(A)-1;S?v.setAttribute("minmergesplitrownumber",S):v.removeAttribute("minmergesplitrownumber"),null!=a&&null!==(m=a.querySelector)&&void 0!==m&&m.call(a,"*[".concat(i.tdCacheIndex,'="').concat(_,'"]'))||null!=o&&null!==(b=o.querySelector)&&void 0!==b&&b.call(o,"*[".concat(i.tdCacheIndex,'="').concat(_,'"]'))||(v.removeAttribute("".concat(i.tdCacheIndex)),v.removeAttribute("minmergesplitrownumber"));var w=this.bse_dragger,k=w.getMatchRowOrColAllCell("row",x,(function(e,t){if(t.rowIndex+t.rowSpan==e)return"cur"}),v),I=g.querySelector("tbody tr");if(k&&k.cur){var j,O=_createForOfIteratorHelper(k.cur);try{for(O.s();!(j=O.n()).done;){var T=j.value,L=w.comMatchCellByColIndex(I,T.colIndex).matchCell;T.cell.style.height=parseInt(T.cell.style.height)+parseInt(null==L?void 0:L.style.height)+"px",this.domUtils.isInsideBseCaresheetEle(r).isInside?L&&!this.domUtils.isIdAndNameAndVirtualIdSameSignOrDateString.call(this,T.cell.innerHTML,L.innerHTML)&&T.cell.insertAdjacentHTML("beforeend",L.innerHTML):L&&T.cell.insertAdjacentHTML("beforeend",L.innerHTML),T.cell.setAttribute("rowspan",+T.cell.getAttribute("rowspan")+ +(null==L?void 0:L.getAttribute("rowspan"))-1)}}catch(e){O.e(e)}finally{O.f()}}null==I||I.remove();var P=g.querySelector("tbody");v.querySelector("tbody").appendChild(P),this.domUtils.removePrentNode(P),g.remove()}else{var E=g.querySelector("tbody");v.querySelector("tbody").appendChild(E),this.domUtils.removePrentNode(E),g.remove()}}for(var M=groupBy([].slice.call(l.querySelectorAll(":not(table)[".concat(i.parentIndex,"]"))),(function(e){return e.getAttribute("".concat(i.parentIndex))})),C=0,N=Object.entries(M);C<N.length;C++){var F,q,D,H=_slicedToArray(N[C],2),R=(H[0],H[1]),z=null===(F=R[1])||void 0===F?void 0:F.getAttribute("tem_".concat(i.parentIndex));z&&R[0].setAttribute("tem_".concat(i.parentIndex),z);var B=null;for(var U in R)B=U>0?itorMergeBreakEle(B,R[U],i):R[U];var J=B.getAttribute("".concat(i.parentIndex));null!=o&&null!==(q=o.querySelector)&&void 0!==q&&q.call(o,"*[".concat(i.parentIndex,'="').concat(J,'"]'))||null!=a&&null!==(D=a.querySelector)&&void 0!==D&&D.call(a,"*[".concat(i.parentIndex,'="').concat(J,'"]'))||B.removeAttribute("".concat(i.parentIndex)),[B.querySelector("*[".concat(i.childIndex,"]")),B].forEach((function(e){if(e){var t,n,r,l=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"".concat(i.childIndex));null!=o&&null!==(n=o.querySelector)&&void 0!==n&&n.call(o,"*[".concat(i.childIndex,'="').concat(l,'"]'))||null!=a&&null!==(r=a.querySelector)&&void 0!==r&&r.call(a,"*[".concat(i.childIndex,'="').concat(l,'"]'))||null==e||e.removeAttribute("".concat(i.childIndex))}}))}for(var G=groupBy([].slice.call(l.querySelectorAll("*[".concat(i.virtualIndex,"]"))),(function(e){return e.getAttribute("".concat(i.virtualIndex))})),W=0,K=Object.entries(G);W<K.length;W++){var Y,V,X=_slicedToArray(K[W],2),$=(X[0],X[1]),Q=null;for(var Z in $)Z>0?$[Z].remove():Q=$[Z];var ee=Q.getAttribute("".concat(i.virtualIndex));null!=o&&null!==(Y=o.querySelector)&&void 0!==Y&&Y.call(o,"*[".concat(i.virtualIndex,'="').concat(ee,'"]'))||null!=a&&null!==(V=a.querySelector)&&void 0!==V&&V.call(a,"*[".concat(i.virtualIndex,'="').concat(ee,'"]'))||Q.removeAttribute("".concat(i.virtualIndex))}if(this.removeBreakPTagSignAndSup(l),n){var te=this.document.createElement("summary");return te.appendChild(l),te.innerHTML}return l}},{key:"setAndDrawAllTestListByPageNum",value:(e=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,n,r=this,i=arguments;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&void 0!==i[0]?i[0]:1,n=i.length>1?i[1]:void 0,e.abrupt("return",new Promise((function(e){r.temperatureIntance.clearnByPageNumber(t).then((function(){for(var i=n.temperDataList,a=r.getEditorPageByNum(t).querySelector(".bse-content_editable"),o=r.temperatureIntance.conf.document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,{acceptNode:function(e){var t=r.domUtils.getElementBseAttr(e);return["temperature/tempAndPulse","temperature/pain","temperature/legend"].includes(t.type)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),l={"temperature/tempAndPulse":"splitTempAndPulseConf","temperature/pain":"splitPainConf","temperature/legend":"signMappingConf"};o.nextNode();){var c=o.currentNode,s=r.domUtils.getElementBseAttr(c),u=s.type,d=_objectWithoutProperties(s,_excluded);r.temperatureIntance.conf[l[u]]="temperature/legend"===u?d.signMappingConf:_objectSpread(_objectSpread({},r.temperatureIntance.conf[l[u]]),d)}var p=encodeURIComponent(JSON.stringify(i)),f=a.querySelector("*[_temperData]");if(f)f.setAttribute("_temperData",p);else{var h=r.domUtils.createElement("div",{_temperData:p});a.appendChild(h)}requestAnimationFrame(_asyncToGenerator(_regeneratorRuntime().mark((function a(){var o;return _regeneratorRuntime().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return i.length&&(r.temperatureIntance._renderingLegend(t),r.temperatureIntance._renderingData(t),r.temperatureIntance._renderingWarningLine(t),r.temperatureIntance._renderingPainData(t),r.temperatureIntance._renderingOrClearnBaseInfo(t)),o=r.getEditorPageByNum(t).querySelector(".bse-footer_editable"),a.next=4,r.updateReplaceApi(n,o,void 0,!0,void 0,void 0,Object.keys(n));case 4:e(!0);case 5:case"end":return a.stop()}}),a)}))))}))})));case 3:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})},{key:"getDomRectRelative",value:function(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.getOptions().scaleMultiple,r=e,i=0,a=0;r;){var o=0,l=0;if("svg"===r.nodeName){var c=r.getBoundingClientRect();o=c.top,l=c.left,i+=o-r.scrollTop,a+=l-r.scrollLeft}else if("HTML"===r.nodeName&&t){var s=r.scrollWidth-r.offsetWidth*n,u=s>0?s/2:s;l=u/n,i+=(o=r.offsetTop)-r.scrollTop/n,a+=l-r.scrollLeft/n}else o=r.offsetTop,l=r.offsetLeft,i+=o-r.scrollTop,a+=l-r.scrollLeft;r="BODY"===r.nodeName?r.parentNode:r.offsetParent}if(a*=n,i*=n,!t)return{left:a,top:i};for(var d=this.iframe;d&&"bse-ui_container"!==d.id;)i+=d.offsetTop-d.scrollTop,a+=d.offsetLeft-d.scrollLeft,d=d.offsetParent;return{left:a,top:i}}}]);var e,t}();const __WEBPACK_DEFAULT_EXPORT__=Polyfill;return __webpack_exports__=__webpack_exports__.default,__webpack_exports__})());
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.index=t():e.index=t()}(self,()=>(()=>{"use strict";var __webpack_require__={d:(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},__webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__});var _excluded=["type"];function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _objectWithoutProperties(e,t){if(null==e)return{};var n,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _regeneratorRuntime(){_regeneratorRuntime=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var a=t&&t.prototype instanceof b?t:b,o=Object.create(a.prototype),l=new T(r||[]);return i(o,"_invoke",{value:k(e,n,l)}),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function b(){}function y(){}function v(){}var g={};s(g,o,(function(){return this}));var _=Object.getPrototypeOf,x=_&&_(_(L([])));x&&x!==n&&r.call(x,o)&&(g=x);var A=v.prototype=b.prototype=Object.create(g);function S(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function n(i,a,o,l){var c=d(e[i],e,a);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"==_typeof(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,o,l)}),(function(e){n("throw",e,o,l)})):t.resolve(u).then((function(e){s.value=e,o(s)}),(function(e){return n("throw",e,o,l)}))}l(c.arg)}var a;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return a=a?a.then(i,i):i()}})}function k(t,n,r){var i=p;return function(a,o){if(i===f)throw Error("Generator is already running");if(i===h){if("throw"===a)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var l=r.delegate;if(l){var c=I(l,r);if(c){if(c===m)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=f;var s=d(t,n,r);if("normal"===s.type){if(i=r.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(i=h,r.method="throw",r.arg=s.arg)}}}function I(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,I(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var a=d(i,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,m;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(_typeof(t)+" is not iterable")}return y.prototype=v,i(A,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,c,"GeneratorFunction")),e.prototype=Object.create(A),e},t.awrap=function(e){return{__await:e}},S(w.prototype),s(w.prototype,l,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var o=new w(u(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},S(A),s(A,c,"Generator"),s(A,o,(function(){return this})),s(A,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(j),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return l.type="throw",l.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(c&&s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;j(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function asyncGeneratorStep(e,t,n,r,i,a,o){try{var l=e[a](o),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,i)}function _asyncToGenerator(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){asyncGeneratorStep(a,r,i,o,l,"next",e)}function l(e){asyncGeneratorStep(a,r,i,o,l,"throw",e)}o(void 0)}))}}function _createForOfIteratorHelper(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw a}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_toPropertyKey(r.key),r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var optionsDefault={baseUrl:"",mode:"designMode",loading:!1,autoPaging:!0,height:"",el:null,footer:"技术支持",iframeCssSrc:[],iframeJsSrc:[],beforeunload:!0,paper:"A4",papersizes:{A4:{w:210,h:297,pt:20,pb:15,pl:15,pr:15},A5:{w:148,h:210,pt:20,pb:15,pl:15,pr:15},A6:{w:105,h:148,pt:20,pb:15,pl:15,pr:15}},toolbars:{nav:[{name:"file",title:"文件",items:[{name:"打开",title:"打开",disabled:!0},{name:"保存",title:"保存",disabled:!0},{name:"打印",title:"打印",items:[{name:"预览",title:"预览",disabled:!0},{name:"print",title:"打印"},{name:"续打",title:"续打",disabled:!0},{name:"套打",title:"套打",disabled:!0}]},{name:"页面设置",title:"页面设置",items:[{name:"A4",title:"A4"},{name:"A5",title:"A5"},{name:"A6",title:"A6"}]},{name:"mode",title:"浏览模式选择",items:[{name:"editMode",title:"编辑模式"},{name:"designMode",title:"设计模式"},{name:"previewMode",title:"预览模式"}]}]},{name:"edit",title:"编辑",items:[{name:"undo",title:"撤销"},{name:"redo",title:"恢复"},{name:"paste",title:"粘贴"},{name:"选择性粘贴",title:"选择性粘贴",disabled:!0},{name:"copy",title:"复制"},{name:"cut",title:"剪切"},{name:"removeFormat",title:"清除格式"},{name:"subscript",title:"下标"},{name:"superscript",title:"上标"},{name:"bold",title:"加粗 ctrl+b"},{name:"italic",title:"倾斜 ctrl+i"},{name:"underline",title:"下划线"},{name:"strikeThrough",title:"删除线"},{name:"insertHorizontalRule",title:"分割线"},{name:"selectAll",title:"选择全部 ctrl+a"},{name:"justifyLeft",title:"向左对齐"},{name:"justifyCenter",title:"居中对齐"},{name:"justifyRight",title:"向右对齐"},{name:"justifyFull",title:"两端对齐"},{name:"insertUnorderedList",title:"无序编号"},{name:"insertOrderedList",title:"有序编号"}]},{name:"element",title:"元素",items:[{name:"radio",title:"单选框"},{name:"checkbox",title:"多选框"},{name:"date",title:"日期"},{name:"input",title:"输入框"},{name:"select",title:"下拉框"},{name:"label",title:"标签"},{name:"number",title:"数字"},{name:"diagnose",title:"诊断"},{name:"surgery",title:"手术"},{name:"sign",title:"签名"},{name:"bloodPressure",title:"血压"},{name:"insertPicture",title:"图片"},{name:"pagination",title:"页码"},{name:"medicalExpression",title:"医学表达式"}]},{name:"test",title:"测试功能",items:[{name:"testCopyContentHtml",title:"【复制】内容html"},{name:"testSetContentEmpty",title:"【设置】内容为空"},{name:"testCopyFullContentHtml",title:"【复制】整个html"},{name:"testExportFullContentHtml",title:"【导出】整个html"},{name:"exportXml",title:"【导出】整个xml"}]}],common:[{name:"undo",title:"撤销"},{name:"redo",title:"恢复"},{name:"paste",title:"粘贴"},{name:"copy",title:"复制"},{name:"cut",title:"剪切"},{name:"fontName",title:"字体"},{name:"fontSize",title:"字号"},{name:"foreColor",title:"文字颜色"},{name:"hiliteColor",title:"背景颜色"},{name:"removeFormat",title:"清除格式"},{name:"subscript",title:"下标"},{name:"superscript",title:"上标"},{name:"bold",title:"加粗 ctrl+b"},{name:"italic",title:"倾斜 ctrl+i"},{name:"underline",title:"下划线"},{name:"strikeThrough",title:"删除线"},{name:"insertHorizontalRule",title:"分割线"},{name:"selectAll",title:"选择全部 ctrl+a"},{name:"spechars",title:"特殊字符"},{name:"justifyLeft",title:"向左对齐"},{name:"justifyCenter",title:"居中对齐"},{name:"justifyRight",title:"向右对齐"},{name:"justifyFull",title:"两端对齐"},{name:"insertUnorderedList",title:"无序编号"},{name:"insertOrderedList",title:"有序编号"}]},diagnoseFieldsMapping:{"主键":"bse_id","父主键":"bse_parentId","子集":"bse_children","分类":"bse_type","类型":"bse_categery","病名":"bse_disease_name","病描述":"bse_disease_name_desc","症名":"bse_symptom_name","症描述":"bse_symptom_name_desc","诊断名":"bse_diagnose_name","诊断描述":"bse_diagnose_name_desc","序号":"bse_sort","诊断日期":"bse_diagnose_date","诊断医生":"bse_diagnose_doctor"},surgeryFieldsMapping:{"类型":"bse_type","手术编码":"bse_code","手术名":"bse_name","手术描述":"bse_describe","日期":"bse_date","手术等级":"bse_surgeryLevel","术者":"bse_doctor","一助":"bse_firstAssistant","二助":"bse_secondAssistant","护士姓名":"bse_nurseName","切口等级":"bse_incisionLevel","愈合等级":"bse_healingLevel","麻醉方法":"bse_anesthesia","麻醉医师":"bse_anesthesiologist"},signFieldsMapping:{"姓名":"bse_userName","签名":"bse_signName","职称":"bse_professionalTitle","日期":"bse_data","工号":"bse_jobNumber","等级":"bse_level"}};function dateFormat(e,t){if(e){var n,r={"y+":(e=new Date(e)).getFullYear().toString(),"M+":(e.getMonth()+1).toString(),"d+":e.getDate().toString(),"H+":e.getHours().toString(),"m+":e.getMinutes().toString(),"s+":e.getSeconds().toString()};for(var i in r)(n=new RegExp("("+i+")").exec(t))&&(t=t.replace(n[1],1==n[1].length?r[i]:r[i].padStart(n[1].length,"0")));return t}}function calculateAge(e){if(!e)return"";var t=new Date(e);if(isNaN(t.getTime()))return"";var n=new Date,r=n.getFullYear()-t.getFullYear(),i=n.getMonth()-t.getMonth(),a=n.getDate()-t.getDate();a<0&&(i--,a+=new Date(n.getFullYear(),n.getMonth(),0).getDate());return i<0&&(r--,i+=12),r>=2?"".concat(r,"岁"):r>=1?"".concat(r,"年").concat(i,"个月"):i>=1?"".concat(i,"个月"):"".concat(Math.max(a,1),"天")}function def(e,t,n){try{e instanceof Object&&Object.defineProperty(e,t,{writable:!0,value:n,configurable:!1,enumerable:!1})}catch(e){}}function trim(e){return e.replace(/(^[ \t\n\r]+)|([ \t\n\r]+$)/g,"")}function treeToArr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];e=JSON.parse(JSON.stringify(e));var i=t._children||"_children",a=t._id||"_id",o=t._parentId||"_parentId";return e.forEach((function(e){r.push(_objectSpread(_objectSpread({},e),{},_defineProperty({},o,n))),e[i]&&e[i].length&&treeToArr(e[i],t,e[a],r),delete e[i]})),r}function arrToTree(e,t,n){return(e=JSON.parse(JSON.stringify(e))).filter((function(r){return void 0===t?0===r[n["父主键"]]||!e.map((function(e){return e[n["主键"]]})).includes(r[n["父主键"]]):r[n["父主键"]]===t})).map((function(t){return t[n["子集"]]=arrToTree(e,t[n["主键"]],n),t})).sort((function(e,t){return e[n["序号"]]-t[n["序号"]]}))}function jsonparse(jsonify){try{return JSON.parse(jsonify)}catch(_unused){try{return JSON.parse(decodeURIComponent(jsonify))}catch(_unused2){var str=decodeURIComponent(jsonify),evalObj=eval("("+str+")");return evalObj}}}function isBseElement(e){return e&&e.hasAttribute&&e.hasAttribute("bse")}function getElementAttribute(e){return isBseElement(e)?e&&jsonparse(e.getAttribute&&e.getAttribute("bse")):{descr:'不是"bse"标签元素'}}function getItorElementBseAttrAndEl(e){for(var t={descr:'不是"bse"标签元素'};e&&"BODY"!==e.nodeName;){var n=getElementAttribute(e);if('不是"bse"标签元素'!==n.descr){t=_objectSpread(_objectSpread({},n),{},{elSrc:e});break}e=e.parentNode}return t}function isFunction(e){return!!e&&"[object Function]"===Object.prototype.toString.call(e)}function awaitDictoryResultMiddle(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise((function(r){t.getOptions().requestTable,n?t.getOptions().requestTable(r,e):r({tableOptions:e.bse_options||[],tableOptionsMapping:{}})}))}function groupBy(e,t){return e.reduce((function(e,n){return e[t(n)]?e[t(n)].push(n):e[t(n)]=[n],e}),{})}function itorMergeBreakEle(e,t,n){for(var r=e.getAttribute("".concat(n.childIndex))?e:e.querySelector("*[".concat(n.childIndex,"]")),i=t.getAttribute("".concat(n.childIndex))?t:t.querySelector("*[".concat(n.childIndex,"]"));i&&!["#document-fragment","TD"].includes(i.nodeName);){var a,o,l,c,s;if(!r){var u,d=null===(u=i)||void 0===u?void 0:u.getAttribute("".concat(n.childIndex));if(d){var p,f,h=e.getAttribute("".concat(n.parentIndex));return null==e||e.setAttribute("tem_".concat(n.parentIndex),h),null===(p=i)||void 0===p||p.setAttribute("tem_".concat(n.childIndex),d),null==e||null===(f=e.insertAdjacentHTML)||void 0===f||f.call(e,"beforeend",t.innerHTML),t.remove(),e}}var m=null===(a=i)||void 0===a?void 0:a.getAttribute("tem_".concat(n.childIndex));if(m){var b;null===(b=r)||void 0===b||b.setAttribute("tem_".concat(n.childIndex),m)}else{var y,v,g,_=null===(y=r)||void 0===y||null===(v=(g=y).getAttribute)||void 0===v?void 0:v.call(g,"tem_".concat(n.childIndex));_&&i.setAttribute("tem_".concat(n.childIndex),_)}null===(o=r)||void 0===o||null===(l=(c=o).insertAdjacentHTML)||void 0===l||l.call(c,"beforeend",i.innerHTML),r=null===(s=r)||void 0===s?void 0:s.parentNode;var x=i.parentNode;i.remove(),i=x}return e}function b64_to_utf8(e){try{return decodeURIComponent(escape(atob(e)))}catch(e){return""}}var isEven=function(e){return e%2==0},isOdd=function(e){return e%2==1};function decide(e){return Math.random()<e}function randomVaildate(e,t){var n=this.getOptions(),r=n._questTable,i=n._questCascaderBindOptions,a=n._questDiagnoseTypeOptions,o=n._questUserInfoExtra,l=n.keyMode;if(!"3012434b484cc204b927d36e901b2618607f9a5f".includes(l)){if(!l&&decide(.02)){if(console.log("dec-"),t){var c=this.document.createElement("summary");return c.appendChild(e),c.innerHTML}return e}var s=b64_to_utf8(r),u=b64_to_utf8(i),d=b64_to_utf8(a),p=b64_to_utf8(o);if(isOdd(l)&&decide(.02)){if(console.log("dec-o"),isEven(s)||isOdd(u)||isEven(d)||isEven(p)){if(t){var f=this.document.createElement("summary");return f.appendChild(e),f.innerHTML}return e}}else if(isEven(l)&&decide(.02)&&(isOdd(s)||isEven(u)||isOdd(d)||isOdd(p))){if(t){var h=this.document.createElement("summary");return h.appendChild(e),h.innerHTML}return e}}}function palyInput(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;n<=t.length&&requestAnimationFrame((function(){var r;e.querySelector("label")&&(e.querySelector("label").innerHTML=null!==(r=t.slice(0,n))&&void 0!==r?r:""),palyInput(e,t,n+1)}))}var Polyfill=function(){return _createClass((function e(t){return _classCallCheck(this,e),t.use=this.use.bind(t),t.forceUpdateFun=this.forceUpdateFun.bind(t),t.registerCommand=this.registerCommand.bind(t),t.enhanceArrToTree=this.enhanceArrToTree.bind(t),t.getAddressInfoList=this.getAddressInfoList.bind(t),t.itorParentCacheId=this.itorParentCacheId.bind(t),t.mergeAndRemoveAttrBreakEleString=this.mergeAndRemoveAttrBreakEleString.bind(t),t.getDomRectRelative=this.getDomRectRelative.bind(t),t.setAndDrawAllTestListByPageNum=this.setAndDrawAllTestListByPageNum.bind(t),t}),[{key:"enhanceArrToTree",value:function(e,t,n,r,i){var a=this;[void 0].includes(n)&&(e=treeToArr(e,t));var o=t._id||"_id",l=t._parentId||"_parentId",c=t._children||"_children",s=t._order||"_order",u=t._level||"_level",d=t._path||"_path";return e.filter((function(t){return[void 0].includes(n)?!e.map((function(e){return e[o]})).includes(t[l]):t[l]===n})).sort((function(e,t){return e[s]-t[s]})).map((function(n,l){var p=i?i+"/"+l:l,f=r?r+"/"+n[o]:n[o],h=a.enhanceArrToTree(e,t,n[o],f,p);return def(n,u,p),def(n,s,l),def(n,d,f),h.length?n[c]=h:delete n[c],n}))}},{key:"use",value:function(e){var t;null===(t=e.install)||void 0===t||t.call(this)}},{key:"registerCommand",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{init:new Function,execCommand:"",queryCommandState:"",queryCommandValue:""},r=_createForOfIteratorHelper(trim(e).split(/\s+/));try{for(r.s();!(t=r.n()).done;){var i=t.value;this.commands&&Object.hasOwn(this.commands,i)&&"development"==process.env.VUE_APP_ENV&&console.warn("【warning】:".concat(i,"命令名存在相同,无法注册")),isFunction(n)?n.apply(this,arguments):(isFunction(n.init)&&n.init.apply(this,arguments),this.commands?this.commands[i]=n:this.commands=_defineProperty({},i,n))}}catch(e){r.e(e)}finally{r.f()}}},{key:"getAddressInfoList",value:function(e,t){var n=this,r=JSON.parse(JSON.stringify(e));function i(e,t,n){var r=n.value,i=n.children,a={};return function e(t,n){var o,l=_createForOfIteratorHelper(t);try{for(l.s();!(o=l.n()).done;){var c=o.value;if(c[r]===n)return a=c,!0;if(c[i]&&c[i].length){var s=e(c[i],n);if(s)return s}}}catch(e){l.e(e)}finally{l.f()}}(t,e),a}var a=new Promise((function(a){n.getOptions().requestParentAddressByParam((function(t){if(t){var r=t.addressMapping,o=Array.isArray(t)?t:(null==t?void 0:t.addressList)||[],l=Object.assign({children:"children",label:"name",value:"code",parentId:"parentCode"},r||{}),c=n.enhanceArrToTree(o,{_id:l.value,_parentId:l.parentId,_children:l.children}),s=function(e,t,n){var r,a=Array.isArray(e)?e:null===(r=i(e,t,n))||void 0===r||null===(r=r._path)||void 0===r?void 0:r.split("/"),o=n.value,l=n.label;return(null==a?void 0:a.map((function(e){var r=i(e,t,n);return{value:r[o],label:r[l]}})))||[]}(e,c,{label:l.label,value:l.value,children:l.children});a(s)}else a([])}),Array.isArray(r)?r.pop():e,t)})),o=new Promise((function(e,t){setTimeout((function(){t(new Error("操作超时"))}),8e3)}));return Promise.race([a,o]).then((function(e){return e})).catch((function(e){return[]}))}},{key:"itorParentCacheId",value:function(e){for(var t=!1,n=e,r=e;n&&!t&&!["BODY","DIV"].includes(n.nodeName);){if(n.hasAttribute("helper_data_cache_id")){t=!0;break}n=n.parentNode}return{isInsideFlag:t,currentNode:n,directNode:r}}},{key:"forceUpdateFun",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,n,r,i,a,o,l){var c,s,u,d,p,f,h,m,b,y,v,g,_,x,A,S,w,k,I,O,j,T,L,P,E,M,C,N,q,F,D,R,H,z,B,U,J,G,W,K,Y,V,X,$,Q,Z,ee,te,ne,re,ie,ae,oe,le,ce,se,ue,de,pe,fe,he,me,be,ye,ve=this;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(b=i||this.getEditorPageArea(),y=function(e){var n=t.getAttribute("helper_data_cache_child_id")||(null===(e=t.querySelector("*[helper_data_cache_child_id]"))||void 0===e?void 0:e.getAttribute("helper_data_cache_child_id"));if(n){for(var r,a,o=b.querySelectorAll('*[helper_data_cache_child_id="'.concat(n,'"]')),l=null,c=o.length-1;c>=0;c--)c?(getItorElementBseAttrAndEl(o[c]).elSrc.remove(),console.log("remove break ele")):l=getItorElementBseAttrAndEl(o[c]).elSrc;null===(r=l.querySelector("*[helper_data_cache_child_id]"))||void 0===r||null===(a=r.removeAttribute)||void 0===a||a.call(r,"helper_data_cache_child_id");var s=ve.itorParentCacheId(l),u=s.isInsideFlag,d=s.currentNode;if(u&&!d.querySelector("*[helper_data_cache_child_id]")&&(d.removeAttribute("helper_data_cache_id"),d.removeAttribute("helper_data_last_break_ele")),i){var p,f=_createForOfIteratorHelper([].slice.call(l.querySelectorAll("*[helper_data_virtual_id]")));try{for(f.s();!(p=f.n()).done;){var h=p.value;h.removeAttribute("helper_data_virtual_id"),h.removeAttribute("helper_data_virtual_node")}}catch(e){f.e(e)}finally{f.f()}}return l}return t}()){e.next=4;break}return e.abrupt("return");case 4:e.t0=r.type,e.next="radio"===e.t0?7:"checkbox"===e.t0?29:"select"===e.t0?32:"diagnose"===e.t0?44:"surgery"===e.t0?64:"address"===e.t0?71:"sign"===e.t0?96:"date"===e.t0?104:"bloodPressure"===e.t0?106:"picturePlaceholder"===e.t0?110:112;break;case 7:v=_createForOfIteratorHelper([].slice.call(y.querySelectorAll("input"))),e.prev=8,v.s();case 10:if((g=v.n()).done){e.next=20;break}if(![(_=g.value).getAttribute("value"),_.getAttribute("label")].includes(n)){e.next=17;break}return _.setAttribute("checked","checked"),e.abrupt("break",20);case 17:_.removeAttribute("checked");case 18:e.next=10;break;case 20:e.next=25;break;case 22:e.prev=22,e.t1=e.catch(8),v.e(e.t1);case 25:return e.prev=25,v.f(),e.finish(25);case 28:return e.abrupt("break",114);case 29:x=_createForOfIteratorHelper([].slice.call(y.querySelectorAll("input")));try{for(x.s();!(A=x.n()).done;)k=A.value,null!=n&&null!==(S=n.includes)&&void 0!==S&&S.call(n,k.getAttribute("value"))||null!=n&&null!==(w=n.includes)&&void 0!==w&&w.call(n,k.getAttribute("label"))?k.setAttribute("checked","checked"):k.removeAttribute("checked")}catch(e){x.e(e)}finally{x.f()}return e.abrupt("break",114);case 32:if(I=[],"axios"!==r.bse_card){e.next=40;break}return e.next=36,awaitDictoryResultMiddle.call(this,r,o);case 36:O=e.sent,I=this.getRadioCheckDynamicMappingValue(O),e.next=41;break;case 40:I=r.bse_options;case 41:return j=null===(c=I)||void 0===c||null===(s=c.find)||void 0===s||null===(s=s.call(c,(function(e){return[e.value,e.label].includes(n)})))||void 0===s?void 0:s.label,y.querySelector("label").innerHTML=j||"",e.abrupt("break",114);case 44:return T=function(e,t,n,r,i){var a=e;return!n&&r&&i?(e>1&&(a-=2),a*=2):n?"sign"===t?(r&&i||a--,a*=2):(r||a--,i||a--,a*=2):!r&&i?1===e?a--:2===e?0===t?a-=2:(a*=2,a++):e&&(a*=2,a++):r&&!i?(a--,a*=2):r||i||(a-=2,a*=2),Array(a).fill().map((function(){return"&emsp;"})).join("")},L=function(e,t,n){var r=!0;return t&&n&&!e||(r=!1),r?'<text style="display:inline-block;">'.concat(Array(7).fill().map((function(){return"&emsp;"})).join(""),"</text>"):""},P=function(e,t){return e?t+1+".":""},E=function(e,t){return e+1===t.length?"。":","},M=_objectSpread(_objectSpread(_objectSpread({},optionsDefault.diagnoseFieldsMapping),null===(u=this.getOptions())||void 0===u?void 0:u.diagnoseFieldsMapping),a),C=(null===(d=(p=n||[]).filter)||void 0===d?void 0:d.call(p,(function(e){return[r.diagnoseType.label,r.diagnoseType.value].includes(e[M["类型"]])&&("中西医诊断"===r.chineseAndWesternType||r.chineseAndWesternType===e[M["分类"]])})))||[],N=_objectSpread(_objectSpread({},r),{},{bse_multipleSelection:null!=C?C:[]}),y.setAttribute("bse",encodeURIComponent(JSON.stringify(N))),C=C?arrToTree(C,void 0,M).reduce((function(e,t){var n=e.find((function(e){return e.label===t[M["类型"]]}));return n?n[M["子集"]].push(t):e.push(_defineProperty({label:t[M["类型"]]},M["子集"],[t])),e}),[]).reduce((function(e,t){return e.push(_objectSpread(_objectSpread({},t),{},_defineProperty({},M["子集"],t[M["子集"]].reduce((function(e,t){var n=e.find((function(e){return e.label===t[M["分类"]]}));return n?n[M["子集"]].push(t):e.push(_defineProperty({label:t[M["分类"]]},M["子集"],[t])),e}),[])))),e}),[]):{},q=r.addOrderNumber,F=r.addChinaOrderNumber,D=r.showDiagnoseType,R=r.showDiagnoseTitle,H=r.signTitleLabel,z=r.signDateLabel,B=r.sectionStart,U=r.splitCharList,J=r.diagnoseTypeLabel,G=r.showDescribe,W=function(e,t,n,r,i,a){return"".concat(e.map((function(o,l){return{horizontal:function(){return"".concat([0,1].includes(n)?"".concat("".concat(0===n?D?'<text style="font-size: initial;font-weight: bold;">'.concat(J||o.label," </text>"):"":R?'<text style="font-size: initial;">'.concat(o.label,": </text>"):"")):"".concat("中医诊断"===o[a["分类"]]?"".concat(P(F&&2===n,l),'<text style="font-size: initial;">').concat(o[a[G?"病描述":"病名"]]||"",'</text>\n <text style="font-size: initial;">').concat(U[0]||" ").concat(o[a[G?"症描述":"症名"]]).concat(U[1]||" ","</text>").concat(E(l,e)):"".concat(P(q&&2===n,l),'<text style="font-size: initial;">').concat(o[a[G?"诊断描述":"诊断名"]]||"","</text>").concat(E(l,e))),"\n ").concat(o[a["子集"]]&&o[a["子集"]].length?W(o[a["子集"]],t,n+1,r,i,a):"")},vertical:function(){return"".concat("中医诊断"===o[a["分类"]]?[0,1,2].includes(n)?"".concat(0===n?D?'<text style="font-size: initial;display:block;font-size: initial;">'.concat(J||o.label,"</text>"):"":1===n?R?'<text style="display:block;"></text><text style="font-size: initial;display:'.concat(B?"block":"inline-block",';"><text style="font-size: initial;display: inline-block;">').concat(T(n,l,B,D,R)).concat(o.label,":</text></text>"):"":'<text style="font-size: initial;display:'.concat(B||0!==l?"block":"inline-block",';">').concat(B||0!==l?"".concat(L(B,D,R)):"",'<text style="font-size: initial;display: inline-block;">').concat(T(n,l,B,D,R)).concat(P(F&&2===n,l)).concat(o[a[G?"病描述":"病名"]]||"","</text></text>")+'<text style="font-size: initial;display:block">'.concat(L(B,D,R),'<text style="font-size: initial;display: inline-block;">').concat(T(n+1,l,B,D,R)).concat(o[a[G?"症描述":"症名"]]||"","</text></text>")):'<text style="font-size: initial;display:block">'.concat(L(B,D,R),'<text style="font-size: initial;display: inline-block;">').concat(T(n,l,B,D,R)).concat(P(F&&2===n,l)).concat(o[a[G?"病描述":"病名"]]||"","</text></text>")+'<text style="font-size: initial;display:block">'.concat(L(B,D,R),'<text style="font-size: initial;display: inline-block;">').concat(T(n+1,l,B,D,R)).concat(o[a[G?"症描述":"症名"]]||"","</text></text>"):[0,1,2].includes(n)?"".concat(0===n?D?'<text style="font-size: initial;display:block;">'.concat(J||o.label,"</text>"):"":1===n?R?'<text style="display:block;"></text><text style="font-size: initial;display:'.concat(B?"block":"inline-block",';"><text style="font-size: initial;display: inline-block;">').concat(T(n,l,B,D,R)).concat(o.label,":</text></text>"):"":'<text style="font-size: initial;display:'.concat(B||0!==l?"block":"inline-block",';">').concat(B||0!==l?"".concat(L(B,D,R)):"",'<text style="font-size: initial;display: inline-block;">').concat(T(n,l,B,D,R)).concat(P(q&&2===n,l)).concat(o[a[G?"诊断描述":"诊断名"]]||"","</text></text>")):'<text style="font-size: initial;display:block">'.concat(L(B,D,R),'<text style="font-size: initial;display: inline-block;">').concat(T(n,l,B,D,R)).concat(P(q&&2===n,l)).concat(o[a[G?"诊断描述":"诊断名"]]||"","</text></text>"),"\n ").concat(o[a["子集"]]&&o[a["子集"]].length?W(o[a["子集"]],t,n+1,r,i,a):"")}}[t]()})).join(""))},K=_objectSpread(_objectSpread({},optionsDefault.signFieldsMapping),null===(f=this.getOptions())||void 0===f?void 0:f.signFieldsMapping),e.next=58,_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r.showList.includes("签名")||null===(t=ve.getOptions())||void 0===t||!t.requestOtherUserInfoExtra){e.next=4;break}return e.next=3,new Promise((function(e){ve.getOptions().requestOtherUserInfoExtra(e,C)}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))();case 58:return Y=e.sent,V=function(e,t,n,r,i,a,o){var l,c,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],u=ve.getUserInfoData(),d=o.showList||[];return"".concat({horizontal:"\n ".concat(d.length?'<text style="display: block;height: 0px;margin: 0;"></text>':"","\n ").concat(d.some((function(e){return["职称","姓名","签名"].includes(e)}))?'<text style="font-size: initial;"><text style="display:inline-block;width: '.concat(i?"88pt":"63pt",';text-align: right;">').concat(n||"医师签名",":</text>").concat(d.filter((function(e){return["职称","姓名","签名"].includes(e)})).map((function(e){return"职称"===e?"(".concat(u[t[e]]||"",")"):"姓名"===e?(null===(n=s[s.length])||void 0===n?void 0:n[M["诊断医生"]])||u[t[e]]||"":"签名"===e?'<img width="80" height="15.75" src="'.concat(Y[t[e]]||"",'">'):u[t[e]]||"";var n})).join(" "),"</text>"):"","\n ").concat(d.some((function(e){return["日期"].includes(e)}))?'<text style="font-size: initial;"><text style="display:inline-block;width: '.concat(i?"88pt":"63pt",';text-align: right;">').concat(r||"日期",':</text><text bse_child="diagnoseDdate">').concat(dateFormat((null===(c=s[s.length])||void 0===c?void 0:c[M["诊断日期"]])||u[t["日期"]]||new Date,o.diagDateFormat||"yyyy-MM-dd"),"</text></text>"):"","\n "),vertical:"\n ".concat(d.some((function(e){return["职称","姓名","签名"].includes(e)}))?'<text style="display: block;font-size: initial;"><text style="display:inline-block;text-align: right;">'.concat(T(1,"sign",!0,i,a)).concat(n||"医师签名",":</text>").concat(d.filter((function(e){return["职称","姓名","签名"].includes(e)})).map((function(e){return"职称"===e?"(".concat(u[t[e]]||"",")"):"姓名"===e?(null===(n=s[s.length])||void 0===n?void 0:n[M["诊断医生"]])||u[t[e]]||"":"签名"===e?'<img width="80" height="15.75" src="'.concat(Y[t[e]]||"",'">'):u[t[e]]||"";var n})).join(" "),"</text>"):"","\n ").concat(d.some((function(e){return["日期"].includes(e)}))?'<text style="display: block;font-size: initial;"><text style="display:inline-block;text-align: right;">'.concat(T(2,"sign",!0,i,a)).concat(r||"日期",':</text><text bse_child="diagnoseDdate">').concat(dateFormat((null===(l=s[s.length])||void 0===l?void 0:l[M["诊断日期"]])||u[t["日期"]]||new Date,o.diagDateFormat||"yyyy-MM-dd"),"</text></text>"):"","\n ")}[e])},X=y.querySelector("span"),"vertical"===r.mode?(!X.classList.contains("inline-flex")&&X.classList.add("inline-flex"),!X.classList.contains("text-zero")&&X.classList.add("text-zero")):(X.classList.contains("inline-flex")&&X.classList.remove("inline-flex"),X.classList.contains("text-zero")&&X.classList.remove("text-zero")),y.querySelector("label").innerHTML=C.length?"".concat(W(C,r.mode,0,D,R,M)).concat(V(r.mode,K,H,z,D,R,r,C)):"",e.abrupt("break",114);case 64:return $=_objectSpread(_objectSpread({},r),{},{bse_surgeryList:null!=n?n:[]}),y.setAttribute("bse",encodeURIComponent(JSON.stringify($))),Q=_objectSpread(_objectSpread(_objectSpread({},optionsDefault.surgeryFieldsMapping),null===(h=this.getOptions())||void 0===h?void 0:h.surgeryFieldsMapping),a),Z="",Z=n.length?["手术名","手术描述"].includes(r.fieldName)?n.map((function(e,t){var i=e[Q[r.fieldName]]||"";return"".concat(n.length>1?"".concat(t+1,"."):"").concat(i)})).join(""):(null===(ee=n[n.length-1])||void 0===ee?void 0:ee[Q[r.fieldName]||""])||"":"",y.querySelector("label").innerHTML=Z||"",e.abrupt("break",114);case 71:if(te=function(e,t){return new RegExp("[".concat(e,"]+"),"g").test(t)},ne=[],re="",!Array.isArray(n)){e.next=81;break}return ie=JSON.parse(JSON.stringify(n)).pop(),e.next=77,this.getAddressInfoList(ie,r);case 77:ne=e.sent,re=ne.map((function(e){return e.label})).join("/")||"",e.next=92;break;case 81:if(!te("\\u4E00-\\u9FFF",n)){e.next=86;break}ne=[{value:"编辑器 - 字段绑定为地区中文名!无法查询地区code",name:n}],re=n,e.next=92;break;case 86:return ae="",ae=te("/|-",n)?n.split(/(\/|\||\-)/).pop():n,e.next=90,this.getAddressInfoList(ae,r);case 90:ne=e.sent,re=ne.map((function(e){return e.label})).join("/")||"";case 92:return oe=_objectSpread(_objectSpread({},r),{},{bse_address:ne}),y.setAttribute("bse",encodeURIComponent(JSON.stringify(oe))),y.querySelector("label").innerHTML=re,e.abrupt("break",114);case 96:return le=_objectSpread(_objectSpread({},optionsDefault.signFieldsMapping),null===(m=this.getOptions())||void 0===m?void 0:m.signFieldsMapping),ce=null!=n?n:[],se=_objectSpread(_objectSpread({},r),{},{bse_signList:ce}),y.setAttribute("bse",encodeURIComponent(JSON.stringify(se))),ue=se.bse_signList,de=se.showList,pe=se.mode,fe=se.jobsort,he=ue.length?ue.sort((function(e,t){return"asc"===fe?e[le["等级"]]-t[le["等级"]]:t[le["等级"]]-e[le["等级"]]})):[],y.querySelector("label").innerHTML="".concat(he.map((function(e){return'<text style="display: '.concat("vertical"===pe?"block":"inline-block",'">').concat(["姓名","签名","职称","日期"].filter((function(e){return de.includes(e)})).map((function(t){return"日期"===t?dateFormat(new Date,"yyyy-MM-dd")||e[le[t]]:"签名"===t?'<img src="'.concat(e[le[t]],'" width="80" height="15.75pt">'):e[le[t]]})).join(" "),"</text>")})).join("vertical"===pe?"":" / ")),e.abrupt("break",114);case 104:return y.querySelector("label")&&(me=_objectSpread(_objectSpread({},r),{},{date:n}),y.setAttribute("bse",encodeURIComponent(JSON.stringify(me))),n||y.querySelector("label").innerHTML?y.querySelector("label").innerHTML=n?"age"===r.datetype?calculateAge(n):dateFormat(n,r.dateformat):"":(be=me.value||me.defCurrentDate?new Date:"",y.querySelector("label").innerHTML=be?"age"===r.datetype?calculateAge(be):dateFormat(be,r.dateformat):"")),e.abrupt("break",114);case 106:return ye=n.split("|"),y.querySelector(".extensional").innerHTML=ye[0]||"",y.querySelector(".diastolic").innerHTML=ye[1]||"",e.abrupt("break",114);case 110:return y.querySelector("label")&&(y.querySelector("label").innerHTML=n?'<img width="'.concat(r.width,'" height="').concat(r.height,'" src="').concat(n,'" />'):'<svg width="'.concat(r.width,'" height="').concat(r.height,'" viewBox="0 0 200 200"><rect width="200" height="200" fill="transparent" stroke="black" stroke-width="2" stroke-dasharray="5, 5" rx="10" ry="10"></rect><text x="50%" y="50%" text-anchor="middle" dominant-baseline="central">图片占位区</text><text font-size="200" fill="transparent" stroke-opacity="0.1" stroke-dasharray="5, 5" stroke="black" stroke-width="1" x="50%" y="50%" text-anchor="middle" dominant-baseline="central">+</text></svg>')),e.abrupt("break",114);case 112:return l?palyInput(y,n):y.querySelector("label")&&(y.querySelector("label").innerHTML=null!=n?n:""),e.abrupt("break",114);case 114:case"end":return e.stop()}}),e,this,[[8,22,25,28]])}))),function(e,n,r,i,a,o,l){return t.apply(this,arguments)})},{key:"mergeAndRemoveAttrBreakEleString",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{tdCacheIndex:"helper_data_cache_id",tdParentIndex:"helper_data_cache_id",tdChildIndex:"helper_data_cache_child_id",parentIndex:"helper_data_cache_id",childIndex:"helper_data_cache_child_id",virtualIndex:"helper_data_virtual_id"},a=null==r?void 0:r.previousSibling,o=null==r||null===(t=r.nextSibling)||void 0===t?void 0:t.nextSibling,l=this.document.createRange().createContextualFragment(e),c=randomVaildate.call(this,l,n);if(c)return c;for(var s=groupBy([].slice.call(l.querySelectorAll("table[".concat(i.parentIndex,"]"))),(function(e){return e.getAttribute("".concat(i.parentIndex))})),u=0,d=Object.entries(s);u<d.length;u++)for(var p=_slicedToArray(d[u],2),f=(p[0],p[1]),h=f.length-1;h>0;h--){var m,b,y=h-1,v=f[y],g=f[h],_=v.getAttribute("".concat(i.parentIndex)),x=v.getAttribute("minmergesplitrownumber");if(x){var A=g.getAttribute("minmergesplitrownumber"),S=parseInt(x)+parseInt(A)-1;S?v.setAttribute("minmergesplitrownumber",S):v.removeAttribute("minmergesplitrownumber"),null!=a&&null!==(m=a.querySelector)&&void 0!==m&&m.call(a,"*[".concat(i.tdCacheIndex,'="').concat(_,'"]'))||null!=o&&null!==(b=o.querySelector)&&void 0!==b&&b.call(o,"*[".concat(i.tdCacheIndex,'="').concat(_,'"]'))||(v.removeAttribute("".concat(i.tdCacheIndex)),v.removeAttribute("minmergesplitrownumber"));var w=this.bse_dragger,k=w.getMatchRowOrColAllCell("row",x,(function(e,t){if(t.rowIndex+t.rowSpan==e)return"cur"}),v),I=g.querySelector("tbody tr");if(k&&k.cur){var O,j=_createForOfIteratorHelper(k.cur);try{for(j.s();!(O=j.n()).done;){var T=O.value,L=w.comMatchCellByColIndex(I,T.colIndex).matchCell;T.cell.style.height=parseInt(T.cell.style.height)+parseInt(null==L?void 0:L.style.height)+"px",this.domUtils.isInsideBseCaresheetEle(r).isInside?L&&!this.domUtils.isIdAndNameAndVirtualIdSameSignOrDateString.call(this,T.cell.innerHTML,L.innerHTML)&&T.cell.insertAdjacentHTML("beforeend",L.innerHTML):L&&T.cell.insertAdjacentHTML("beforeend",L.innerHTML),T.cell.setAttribute("rowspan",+T.cell.getAttribute("rowspan")+ +(null==L?void 0:L.getAttribute("rowspan"))-1)}}catch(e){j.e(e)}finally{j.f()}}null==I||I.remove();var P=g.querySelector("tbody");v.querySelector("tbody").appendChild(P),this.domUtils.removePrentNode(P),g.remove()}else{var E=g.querySelector("tbody");v.querySelector("tbody").appendChild(E),this.domUtils.removePrentNode(E),g.remove()}}for(var M=groupBy([].slice.call(l.querySelectorAll(":not(table)[".concat(i.parentIndex,"]"))),(function(e){return e.getAttribute("".concat(i.parentIndex))})),C=0,N=Object.entries(M);C<N.length;C++){var q,F,D,R=_slicedToArray(N[C],2),H=(R[0],R[1]),z=null===(q=H[1])||void 0===q?void 0:q.getAttribute("tem_".concat(i.parentIndex));z&&H[0].setAttribute("tem_".concat(i.parentIndex),z);var B=null;for(var U in H)B=U>0?itorMergeBreakEle(B,H[U],i):H[U];var J=B.getAttribute("".concat(i.parentIndex));null!=o&&null!==(F=o.querySelector)&&void 0!==F&&F.call(o,"*[".concat(i.parentIndex,'="').concat(J,'"]'))||null!=a&&null!==(D=a.querySelector)&&void 0!==D&&D.call(a,"*[".concat(i.parentIndex,'="').concat(J,'"]'))||B.removeAttribute("".concat(i.parentIndex)),[B.querySelector("*[".concat(i.childIndex,"]")),B].forEach((function(e){if(e){var t,n,r,l=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"".concat(i.childIndex));null!=o&&null!==(n=o.querySelector)&&void 0!==n&&n.call(o,"*[".concat(i.childIndex,'="').concat(l,'"]'))||null!=a&&null!==(r=a.querySelector)&&void 0!==r&&r.call(a,"*[".concat(i.childIndex,'="').concat(l,'"]'))||null==e||e.removeAttribute("".concat(i.childIndex))}}))}for(var G=groupBy([].slice.call(l.querySelectorAll("*[".concat(i.virtualIndex,"]"))),(function(e){return e.getAttribute("".concat(i.virtualIndex))})),W=0,K=Object.entries(G);W<K.length;W++){var Y,V,X=_slicedToArray(K[W],2),$=(X[0],X[1]),Q=null;for(var Z in $)Z>0?$[Z].remove():Q=$[Z];var ee=Q.getAttribute("".concat(i.virtualIndex));null!=o&&null!==(Y=o.querySelector)&&void 0!==Y&&Y.call(o,"*[".concat(i.virtualIndex,'="').concat(ee,'"]'))||null!=a&&null!==(V=a.querySelector)&&void 0!==V&&V.call(a,"*[".concat(i.virtualIndex,'="').concat(ee,'"]'))||Q.removeAttribute("".concat(i.virtualIndex))}if(this.removeBreakPTagSignAndSup(l),n){var te=this.document.createElement("summary");return te.appendChild(l),te.innerHTML}return l}},{key:"setAndDrawAllTestListByPageNum",value:(e=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,n,r=this,i=arguments;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&void 0!==i[0]?i[0]:1,n=i.length>1?i[1]:void 0,e.abrupt("return",new Promise((function(e){r.temperatureIntance.clearnByPageNumber(t).then((function(){for(var i=n.temperDataList,a=r.getEditorPageByNum(t).querySelector(".bse-content_editable"),o=r.temperatureIntance.conf.document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,{acceptNode:function(e){var t=r.domUtils.getElementBseAttr(e);return["temperature/tempAndPulse","temperature/pain","temperature/legend"].includes(t.type)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),l={"temperature/tempAndPulse":"splitTempAndPulseConf","temperature/pain":"splitPainConf","temperature/legend":"signMappingConf"};o.nextNode();){var c=o.currentNode,s=r.domUtils.getElementBseAttr(c),u=s.type,d=_objectWithoutProperties(s,_excluded);r.temperatureIntance.conf[l[u]]="temperature/legend"===u?d.signMappingConf:_objectSpread(_objectSpread({},r.temperatureIntance.conf[l[u]]),d)}var p=encodeURIComponent(JSON.stringify(i)),f=a.querySelector("*[_temperData]");if(f)f.setAttribute("_temperData",p);else{var h=r.domUtils.createElement("div",{_temperData:p});a.appendChild(h)}requestAnimationFrame(_asyncToGenerator(_regeneratorRuntime().mark((function a(){var o;return _regeneratorRuntime().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return i.length&&(r.temperatureIntance._renderingLegend(t),r.temperatureIntance._renderingData(t),r.temperatureIntance._renderingWarningLine(t),r.temperatureIntance._renderingPainData(t),r.temperatureIntance._renderingOrClearnBaseInfo(t)),o=r.getEditorPageByNum(t).querySelector(".bse-footer_editable"),a.next=4,r.updateReplaceApi(n,o,void 0,!0,void 0,void 0,Object.keys(n));case 4:e(!0);case 5:case"end":return a.stop()}}),a)}))))}))})));case 3:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})},{key:"getDomRectRelative",value:function(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.getOptions().scaleMultiple,r=e,i=0,a=0;r;){var o=0,l=0;if("svg"===r.nodeName){var c=r.getBoundingClientRect();o=c.top,l=c.left,i+=o-r.scrollTop,a+=l-r.scrollLeft}else if("HTML"===r.nodeName&&t){var s=r.scrollWidth-r.offsetWidth*n,u=s>0?s/2:s;l=u/n,i+=(o=r.offsetTop)-r.scrollTop/n,a+=l-r.scrollLeft/n}else o=r.offsetTop,l=r.offsetLeft,i+=o-r.scrollTop,a+=l-r.scrollLeft;r="BODY"===r.nodeName?r.parentNode:r.offsetParent}if(a*=n,i*=n,!t)return{left:a,top:i};for(var d=this.iframe;d&&"bse-ui_container"!==d.id;)i+=d.offsetTop-d.scrollTop,a+=d.offsetLeft-d.scrollLeft,d=d.offsetParent;return{left:a,top:i}}}]);var e,t}();const __WEBPACK_DEFAULT_EXPORT__=Polyfill;return __webpack_exports__=__webpack_exports__.default,__webpack_exports__})());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polyfill-common",
3
- "version": "2.1.8",
3
+ "version": "2.1.11",
4
4
  "description": "基础依赖库",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -1301,6 +1301,17 @@ class Polyfill {
1301
1301
  ...optionsDefault.signFieldsMapping,
1302
1302
  ...this.getOptions()?.signFieldsMapping,
1303
1303
  };
1304
+
1305
+ // 预取其它用户签名信息(requestOtherUserInfoExtra)
1306
+ const signOtherUserInfo = await (async () => {
1307
+ if (attrTemp.showList.includes('签名') && this.getOptions()?.requestOtherUserInfoExtra) {
1308
+ return await new Promise(resolve => {
1309
+ this.getOptions().requestOtherUserInfoExtra(resolve, filterShowList);
1310
+ });
1311
+ }
1312
+ })();
1313
+ // 预取其它用户签名信息(requestOtherUserInfoExtra)
1314
+
1304
1315
  const comSignList = (modeName, signMappingAttr, signTitleLabel, signDateLabel, showDiagnoseTypeTmp, showDiagnoseTitleTmp, attrTemp, diagnoseArr = []) => {
1305
1316
  const userInfo = this.getUserInfoData();
1306
1317
  const signShowArr = attrTemp.showList || []
@@ -1310,15 +1321,18 @@ class Polyfill {
1310
1321
  signShowArr.length ? '<text style="display: block;height: 0px;margin: 0;"></text>' : ''
1311
1322
  }
1312
1323
  ${
1313
- signShowArr.some(s => ['职称', '姓名'].includes(s)) ?
1324
+ signShowArr.some(s => ['职称', '姓名', '签名'].includes(s)) ?
1314
1325
  `<text style="font-size: initial;"><text style="display:inline-block;width: ${ showDiagnoseTypeTmp ? '88pt' : '63pt' };text-align: right;">${signTitleLabel || '医师签名'}:</text>${
1315
- signShowArr.filter(f => ['职称', '姓名'].includes(f)).map(li => {
1326
+ signShowArr.filter(f => ['职称', '姓名', '签名'].includes(f)).map(li => {
1316
1327
  if (li === '职称') {
1317
1328
  return `(${userInfo[signMappingAttr[li]] || ''})`
1318
1329
  }
1319
1330
  if (li === '姓名') {
1320
1331
  return diagnoseArr[diagnoseArr.length]?.[diagnoseMapping['诊断医生']] || userInfo[signMappingAttr[li]] || ''
1321
1332
  }
1333
+ if (li === '签名') {
1334
+ return `<img width="80" height="15.75" src="${signOtherUserInfo[signMappingAttr[li]] || ''}">`
1335
+ }
1322
1336
  return userInfo[signMappingAttr[li]] || ''
1323
1337
  }
1324
1338
  ).join(" ")
@@ -1336,15 +1350,18 @@ class Polyfill {
1336
1350
  // }
1337
1351
  vertical: (() => `
1338
1352
  ${
1339
- signShowArr.some(s => ['职称', '姓名'].includes(s)) ?
1353
+ signShowArr.some(s => ['职称', '姓名', '签名'].includes(s)) ?
1340
1354
  `<text style="display: block;font-size: initial;"><text style="display:inline-block;text-align: right;">${emspLen(1, 'sign', true, showDiagnoseTypeTmp, showDiagnoseTitleTmp)}${signTitleLabel || '医师签名'}:</text>${
1341
- signShowArr.filter(f => ['职称', '姓名'].includes(f)).map(li => {
1355
+ signShowArr.filter(f => ['职称', '姓名', '签名'].includes(f)).map(li => {
1342
1356
  if (li === '职称') {
1343
1357
  return `(${userInfo[signMappingAttr[li]] || ''})`
1344
1358
  }
1345
1359
  if (li === '姓名') {
1346
1360
  return diagnoseArr[diagnoseArr.length]?.[diagnoseMapping['诊断医生']] || userInfo[signMappingAttr[li]] || ''
1347
1361
  }
1362
+ if (li === '签名') {
1363
+ return `<img width="80" height="15.75" src="${signOtherUserInfo[signMappingAttr[li]] || ''}">`
1364
+ }
1348
1365
  return userInfo[signMappingAttr[li]] || ''
1349
1366
  }
1350
1367
  ).join(" ")
@@ -1361,6 +1378,7 @@ class Polyfill {
1361
1378
  `)(),
1362
1379
  }[modeName]}`;
1363
1380
  };
1381
+
1364
1382
  // const styleStr = attrTemp.mode === 'vertical' ? 'display:inline-flex;font-size: 0;' : 'display:unset;'
1365
1383
  // currentNodeTemp.querySelector("span").setAttribute('style', styleStr)
1366
1384
  const elSrcSpanWarp = currentNodeTemp.querySelector("span")
@@ -1476,7 +1494,7 @@ class Polyfill {
1476
1494
  dateFormat(new Date(), "yyyy-MM-dd") || m[singMapping[g]]
1477
1495
  );
1478
1496
  } else if (g === "签名") {
1479
- return `<img src="${m[singMapping[g]]}" width=80 height=30/>`;
1497
+ return `<img src="${m[singMapping[g]]}" width="80" height="15.75pt">`;
1480
1498
  } else {
1481
1499
  return m[singMapping[g]];
1482
1500
  }