polyfill-common 2.1.17 → 2.1.19
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 +96 -74
- package/dist/index.min.js +1 -1
- package/package.json +1 -1
- package/src/index.js +15 -3
package/dist/index.js
CHANGED
|
@@ -754,8 +754,8 @@ function isFunction(fuc) {
|
|
|
754
754
|
return fuc ? Object.prototype.toString.call(fuc) === "[object Function]" : false;
|
|
755
755
|
}
|
|
756
756
|
|
|
757
|
-
/**
|
|
758
|
-
function
|
|
757
|
+
/** 等待字典返回数据中间件 */
|
|
758
|
+
function awaitDynamicResultMiddle(proto) {
|
|
759
759
|
var _this = this;
|
|
760
760
|
var newversion = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
761
761
|
return new Promise(function (resolve) {
|
|
@@ -771,6 +771,16 @@ function awaitDictoryResultMiddle(proto) {
|
|
|
771
771
|
});
|
|
772
772
|
}
|
|
773
773
|
|
|
774
|
+
/** 等待动态返回数据中间件 */
|
|
775
|
+
function awaitDictResultMiddle(proto) {
|
|
776
|
+
var _this2 = this;
|
|
777
|
+
return new Promise(function (resolve) {
|
|
778
|
+
if (_this2.getOptions().requestDictTable) {
|
|
779
|
+
_this2.getOptions().requestDictTable(resolve, proto);
|
|
780
|
+
}
|
|
781
|
+
});
|
|
782
|
+
}
|
|
783
|
+
|
|
774
784
|
/**
|
|
775
785
|
* 分组元素
|
|
776
786
|
* @param arry ***一维度数组
|
|
@@ -927,7 +937,7 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
927
937
|
return _createClass(Polyfill, [{
|
|
928
938
|
key: "enhanceArrToTree",
|
|
929
939
|
value: function enhanceArrToTree(arry, porpsMapping, pid, path, level) {
|
|
930
|
-
var
|
|
940
|
+
var _this3 = this;
|
|
931
941
|
[undefined].includes(pid) && (arry = treeToArr(arry, porpsMapping));
|
|
932
942
|
var __id = porpsMapping["_id"] || "_id",
|
|
933
943
|
__parentId = porpsMapping["_parentId"] || "_parentId",
|
|
@@ -948,7 +958,7 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
948
958
|
}).map(function (m, inx) {
|
|
949
959
|
var levelTmp = level ? level + '/' + inx : inx;
|
|
950
960
|
var pathTmp = path ? path + '/' + m[__id] : m[__id];
|
|
951
|
-
var childrenTmp =
|
|
961
|
+
var childrenTmp = _this3.enhanceArrToTree(arry, porpsMapping, m[__id], pathTmp, levelTmp);
|
|
952
962
|
def(m, __level, levelTmp);
|
|
953
963
|
def(m, __order, inx);
|
|
954
964
|
def(m, __path, pathTmp);
|
|
@@ -1001,7 +1011,7 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1001
1011
|
}, {
|
|
1002
1012
|
key: "getAddressInfoList",
|
|
1003
1013
|
value: function getAddressInfoList(codeOrCodeArrTmp, formInline) {
|
|
1004
|
-
var
|
|
1014
|
+
var _this4 = this;
|
|
1005
1015
|
var cacheCodeTmp = JSON.parse(JSON.stringify(codeOrCodeArrTmp));
|
|
1006
1016
|
// 通过城市id查询所属
|
|
1007
1017
|
function findItorByCityNode(codeTmp, addressList, porpsMapping) {
|
|
@@ -1048,7 +1058,7 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1048
1058
|
})) || [];
|
|
1049
1059
|
}
|
|
1050
1060
|
var PFetch = new Promise(function (resolve) {
|
|
1051
|
-
|
|
1061
|
+
_this4.getOptions().requestParentAddressByParam(function (param) {
|
|
1052
1062
|
if (!param) {
|
|
1053
1063
|
resolve([]);
|
|
1054
1064
|
return;
|
|
@@ -1061,7 +1071,7 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1061
1071
|
value: 'code',
|
|
1062
1072
|
parentId: 'parentCode'
|
|
1063
1073
|
}, addressMapping || {});
|
|
1064
|
-
var addressCascaderOptions =
|
|
1074
|
+
var addressCascaderOptions = _this4.enhanceArrToTree(addressList, {
|
|
1065
1075
|
_id: addressCascaderProps.value,
|
|
1066
1076
|
_parentId: addressCascaderProps.parentId,
|
|
1067
1077
|
_children: addressCascaderProps.children
|
|
@@ -1124,7 +1134,7 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1124
1134
|
key: "forceUpdateFun",
|
|
1125
1135
|
value: (function () {
|
|
1126
1136
|
var _forceUpdateFun = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(elSrc, contentValueTemp, attrTemp, editAreaTmp, valueDefaultPropsTemp, versionControl, playInput) {
|
|
1127
|
-
var
|
|
1137
|
+
var _this5 = this,
|
|
1128
1138
|
_bse_options,
|
|
1129
1139
|
_bse_options$find,
|
|
1130
1140
|
_this$getOptions2,
|
|
@@ -1133,7 +1143,7 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1133
1143
|
_this$getOptions3,
|
|
1134
1144
|
_this$getOptions4,
|
|
1135
1145
|
_this$getOptions5;
|
|
1136
|
-
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;
|
|
1146
|
+
var editArea, currentNodeTemp, _iterator4, _step4, input, _iterator5, _step5, _contentValueTemp$inc, _contentValueTemp$inc2, _input, bse_options, bse_options_cache_axios_obj, bse_options_cache_dict_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;
|
|
1137
1147
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
1138
1148
|
while (1) switch (_context4.prev = _context4.next) {
|
|
1139
1149
|
case 0:
|
|
@@ -1155,9 +1165,9 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1155
1165
|
}
|
|
1156
1166
|
}
|
|
1157
1167
|
(_result$querySelector = result.querySelector('*[helper_data_cache_child_id]')) === null || _result$querySelector === void 0 || (_result$querySelector2 = _result$querySelector.removeAttribute) === null || _result$querySelector2 === void 0 || _result$querySelector2.call(_result$querySelector, 'helper_data_cache_child_id');
|
|
1158
|
-
var
|
|
1159
|
-
isInsideFlag =
|
|
1160
|
-
currentNode =
|
|
1168
|
+
var _this5$itorParentCach = _this5.itorParentCacheId(result),
|
|
1169
|
+
isInsideFlag = _this5$itorParentCach.isInsideFlag,
|
|
1170
|
+
currentNode = _this5$itorParentCach.currentNode;
|
|
1161
1171
|
if (isInsideFlag && !currentNode.querySelector('*[helper_data_cache_child_id]')) {
|
|
1162
1172
|
currentNode.removeAttribute('helper_data_cache_id');
|
|
1163
1173
|
currentNode.removeAttribute('helper_data_last_break_ele');
|
|
@@ -1189,7 +1199,7 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1189
1199
|
return _context4.abrupt("return");
|
|
1190
1200
|
case 4:
|
|
1191
1201
|
_context4.t0 = attrTemp.type;
|
|
1192
|
-
_context4.next = _context4.t0 === "radio" ? 7 : _context4.t0 === "checkbox" ? 29 : _context4.t0 === "select" ? 32 : _context4.t0 === "diagnose" ?
|
|
1202
|
+
_context4.next = _context4.t0 === "radio" ? 7 : _context4.t0 === "checkbox" ? 29 : _context4.t0 === "select" ? 32 : _context4.t0 === "diagnose" ? 51 : _context4.t0 === "surgery" ? 71 : _context4.t0 === "address" ? 78 : _context4.t0 === "sign" ? 103 : _context4.t0 === "date" ? 113 : _context4.t0 === "bloodPressure" ? 115 : _context4.t0 === "picturePlaceholder" ? 119 : 121;
|
|
1193
1203
|
break;
|
|
1194
1204
|
case 7:
|
|
1195
1205
|
_iterator4 = _createForOfIteratorHelper([].slice.call(currentNodeTemp.querySelectorAll("input")));
|
|
@@ -1226,7 +1236,7 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1226
1236
|
_iterator4.f();
|
|
1227
1237
|
return _context4.finish(25);
|
|
1228
1238
|
case 28:
|
|
1229
|
-
return _context4.abrupt("break",
|
|
1239
|
+
return _context4.abrupt("break", 123);
|
|
1230
1240
|
case 29:
|
|
1231
1241
|
_iterator5 = _createForOfIteratorHelper([].slice.call(currentNodeTemp.querySelectorAll("input")));
|
|
1232
1242
|
try {
|
|
@@ -1245,7 +1255,7 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1245
1255
|
} finally {
|
|
1246
1256
|
_iterator5.f();
|
|
1247
1257
|
}
|
|
1248
|
-
return _context4.abrupt("break",
|
|
1258
|
+
return _context4.abrupt("break", 123);
|
|
1249
1259
|
case 32:
|
|
1250
1260
|
bse_options = [];
|
|
1251
1261
|
if (!(attrTemp.bse_card === 'axios')) {
|
|
@@ -1253,21 +1263,33 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1253
1263
|
break;
|
|
1254
1264
|
}
|
|
1255
1265
|
_context4.next = 36;
|
|
1256
|
-
return
|
|
1266
|
+
return awaitDynamicResultMiddle.call(this, attrTemp, versionControl);
|
|
1257
1267
|
case 36:
|
|
1258
1268
|
bse_options_cache_axios_obj = _context4.sent;
|
|
1259
1269
|
bse_options = this.getRadioCheckDynamicMappingValue(bse_options_cache_axios_obj);
|
|
1260
|
-
_context4.next =
|
|
1270
|
+
_context4.next = 48;
|
|
1261
1271
|
break;
|
|
1262
1272
|
case 40:
|
|
1273
|
+
if (!(attrTemp.bse_card === 'dict')) {
|
|
1274
|
+
_context4.next = 47;
|
|
1275
|
+
break;
|
|
1276
|
+
}
|
|
1277
|
+
_context4.next = 43;
|
|
1278
|
+
return awaitDictResultMiddle.call(this, attrTemp);
|
|
1279
|
+
case 43:
|
|
1280
|
+
bse_options_cache_dict_obj = _context4.sent;
|
|
1281
|
+
bse_options = this.getRadioCheckDynamicMappingValue(bse_options_cache_dict_obj);
|
|
1282
|
+
_context4.next = 48;
|
|
1283
|
+
break;
|
|
1284
|
+
case 47:
|
|
1263
1285
|
bse_options = attrTemp.bse_options;
|
|
1264
|
-
case
|
|
1286
|
+
case 48:
|
|
1265
1287
|
matchLabel = (_bse_options = bse_options) === null || _bse_options === void 0 || (_bse_options$find = _bse_options.find) === null || _bse_options$find === void 0 || (_bse_options$find = _bse_options$find.call(_bse_options, function (f) {
|
|
1266
1288
|
return [f.value, f.label].includes(contentValueTemp);
|
|
1267
1289
|
})) === null || _bse_options$find === void 0 ? void 0 : _bse_options$find.label;
|
|
1268
1290
|
currentNodeTemp.querySelector("label").innerHTML = matchLabel || '';
|
|
1269
|
-
return _context4.abrupt("break",
|
|
1270
|
-
case
|
|
1291
|
+
return _context4.abrupt("break", 123);
|
|
1292
|
+
case 51:
|
|
1271
1293
|
/* 递归算出树形数据 用于诊断控件层级渲染 */
|
|
1272
1294
|
emspLen = function emspLen(level, inx, sectionStart, showDiagnoseType, showDiagnoseTitle) {
|
|
1273
1295
|
// 生成空格符号
|
|
@@ -1395,7 +1417,7 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1395
1417
|
}).join(""));
|
|
1396
1418
|
};
|
|
1397
1419
|
diagnoseSingMapping = _objectSpread(_objectSpread({}, optionsDefault.signFieldsMapping), (_this$getOptions3 = this.getOptions()) === null || _this$getOptions3 === void 0 ? void 0 : _this$getOptions3.signFieldsMapping); // 预取其它用户签名信息
|
|
1398
|
-
_context4.next =
|
|
1420
|
+
_context4.next = 65;
|
|
1399
1421
|
return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
1400
1422
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
1401
1423
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -1414,7 +1436,7 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1414
1436
|
case 0:
|
|
1415
1437
|
diagInfo = (_filterShowList = filterShowList) === null || _filterShowList === void 0 || (_filterShowList = _filterShowList[0]) === null || _filterShowList === void 0 || (_filterShowList = _filterShowList.bse_children) === null || _filterShowList === void 0 || (_filterShowList = _filterShowList[0].bse_children) === null || _filterShowList === void 0 ? void 0 : _filterShowList[0];
|
|
1416
1438
|
_context.next = 3;
|
|
1417
|
-
return
|
|
1439
|
+
return _this5.findSignUserInfoResult.call(_this5, _defineProperty(_defineProperty({}, diagnoseSingMapping['工号'], diagInfo === null || diagInfo === void 0 ? void 0 : diagInfo.diagDrCode), diagnoseSingMapping['姓名'], diagInfo === null || diagInfo === void 0 ? void 0 : diagInfo.diagDrName));
|
|
1418
1440
|
case 3:
|
|
1419
1441
|
userInfo = _context.sent;
|
|
1420
1442
|
resolve(userInfo);
|
|
@@ -1436,12 +1458,12 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1436
1458
|
}
|
|
1437
1459
|
}, _callee2);
|
|
1438
1460
|
}))();
|
|
1439
|
-
case
|
|
1461
|
+
case 65:
|
|
1440
1462
|
signOtherUserInfo = _context4.sent;
|
|
1441
1463
|
// 预取其它用户签名信息(requestOtherUserInfoExtra)
|
|
1442
1464
|
comSignList = function comSignList(modeName, signMappingAttr, signTitleLabel, signDateLabel, showDiagnoseTypeTmp, showDiagnoseTitleTmp, attrTemp) {
|
|
1443
1465
|
var diagnoseArr = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : [];
|
|
1444
|
-
var userInfo =
|
|
1466
|
+
var userInfo = _this5.getUserInfoData();
|
|
1445
1467
|
var signShowArr = attrTemp.showList || [];
|
|
1446
1468
|
return "".concat({
|
|
1447
1469
|
horizontal: function (_diagnoseArr$diagnose2) {
|
|
@@ -1501,8 +1523,8 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1501
1523
|
elSrcSpanWarp.classList.contains("text-zero") && elSrcSpanWarp.classList.remove("text-zero");
|
|
1502
1524
|
}
|
|
1503
1525
|
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)) : "";
|
|
1504
|
-
return _context4.abrupt("break",
|
|
1505
|
-
case
|
|
1526
|
+
return _context4.abrupt("break", 123);
|
|
1527
|
+
case 71:
|
|
1506
1528
|
surgeryNewAttr = _objectSpread(_objectSpread({}, attrTemp), {}, {
|
|
1507
1529
|
bse_surgeryList: contentValueTemp !== null && contentValueTemp !== void 0 ? contentValueTemp : []
|
|
1508
1530
|
});
|
|
@@ -1522,29 +1544,29 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1522
1544
|
innerHTMLStr = '';
|
|
1523
1545
|
}
|
|
1524
1546
|
currentNodeTemp.querySelector("label").innerHTML = innerHTMLStr || '';
|
|
1525
|
-
return _context4.abrupt("break",
|
|
1526
|
-
case
|
|
1547
|
+
return _context4.abrupt("break", 123);
|
|
1548
|
+
case 78:
|
|
1527
1549
|
CheckIsChinese = function CheckIsChinese(str, val) {
|
|
1528
1550
|
return new RegExp("[".concat(str, "]+"), "g").test(val);
|
|
1529
1551
|
};
|
|
1530
1552
|
addressArr = [], showLabel = '';
|
|
1531
1553
|
if (!Array.isArray(contentValueTemp)) {
|
|
1532
|
-
_context4.next =
|
|
1554
|
+
_context4.next = 88;
|
|
1533
1555
|
break;
|
|
1534
1556
|
}
|
|
1535
1557
|
addCode = JSON.parse(JSON.stringify(contentValueTemp)).pop();
|
|
1536
|
-
_context4.next =
|
|
1558
|
+
_context4.next = 84;
|
|
1537
1559
|
return this.getAddressInfoList(addCode, attrTemp);
|
|
1538
|
-
case
|
|
1560
|
+
case 84:
|
|
1539
1561
|
addressArr = _context4.sent;
|
|
1540
1562
|
showLabel = addressArr.map(function (m) {
|
|
1541
1563
|
return m.label;
|
|
1542
1564
|
}).join('/') || "";
|
|
1543
|
-
_context4.next =
|
|
1565
|
+
_context4.next = 99;
|
|
1544
1566
|
break;
|
|
1545
|
-
case
|
|
1567
|
+
case 88:
|
|
1546
1568
|
if (!CheckIsChinese("\\u4E00-\\u9FFF", contentValueTemp)) {
|
|
1547
|
-
_context4.next =
|
|
1569
|
+
_context4.next = 93;
|
|
1548
1570
|
break;
|
|
1549
1571
|
}
|
|
1550
1572
|
// *特殊中文直接渲染中文不发请求
|
|
@@ -1553,9 +1575,9 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1553
1575
|
name: contentValueTemp
|
|
1554
1576
|
}];
|
|
1555
1577
|
showLabel = contentValueTemp;
|
|
1556
|
-
_context4.next =
|
|
1578
|
+
_context4.next = 99;
|
|
1557
1579
|
break;
|
|
1558
|
-
case
|
|
1580
|
+
case 93:
|
|
1559
1581
|
_addCode = ''; // 用于接口查询code
|
|
1560
1582
|
if (CheckIsChinese('\/\|\-', contentValueTemp)) {
|
|
1561
1583
|
// 地址传参 | / - Array 支持四种形式
|
|
@@ -1563,30 +1585,30 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1563
1585
|
} else {
|
|
1564
1586
|
_addCode = contentValueTemp;
|
|
1565
1587
|
}
|
|
1566
|
-
_context4.next =
|
|
1588
|
+
_context4.next = 97;
|
|
1567
1589
|
return this.getAddressInfoList(_addCode, attrTemp);
|
|
1568
|
-
case
|
|
1590
|
+
case 97:
|
|
1569
1591
|
addressArr = _context4.sent;
|
|
1570
1592
|
showLabel = addressArr.map(function (m) {
|
|
1571
1593
|
return m.label;
|
|
1572
1594
|
}).join('/') || "";
|
|
1573
|
-
case
|
|
1595
|
+
case 99:
|
|
1574
1596
|
addressNewAttr = _objectSpread(_objectSpread({}, attrTemp), {}, {
|
|
1575
1597
|
bse_address: addressArr
|
|
1576
1598
|
});
|
|
1577
1599
|
currentNodeTemp.setAttribute("bse", encodeURIComponent(JSON.stringify(addressNewAttr)));
|
|
1578
1600
|
currentNodeTemp.querySelector("label").innerHTML = showLabel;
|
|
1579
|
-
return _context4.abrupt("break",
|
|
1580
|
-
case
|
|
1601
|
+
return _context4.abrupt("break", 123);
|
|
1602
|
+
case 103:
|
|
1581
1603
|
singMapping = _objectSpread(_objectSpread({}, optionsDefault.signFieldsMapping), (_this$getOptions5 = this.getOptions()) === null || _this$getOptions5 === void 0 ? void 0 : _this$getOptions5.signFieldsMapping);
|
|
1582
|
-
_context4.next =
|
|
1604
|
+
_context4.next = 106;
|
|
1583
1605
|
return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
1584
|
-
var
|
|
1606
|
+
var _this5$domUtils$isIns, isInside, _iterator6, _step6, rest, userInfo;
|
|
1585
1607
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
1586
1608
|
while (1) switch (_context3.prev = _context3.next) {
|
|
1587
1609
|
case 0:
|
|
1588
1610
|
// 判断是否在caresheet内
|
|
1589
|
-
|
|
1611
|
+
_this5$domUtils$isIns = _this5.domUtils.isInsideBseCaresheetEle(elSrc), isInside = _this5$domUtils$isIns.isInside;
|
|
1590
1612
|
if (!isInside) {
|
|
1591
1613
|
_context3.next = 21;
|
|
1592
1614
|
break;
|
|
@@ -1602,7 +1624,7 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1602
1624
|
}
|
|
1603
1625
|
rest = _step6.value;
|
|
1604
1626
|
_context3.next = 9;
|
|
1605
|
-
return
|
|
1627
|
+
return _this5.findSignUserInfoResult.call(_this5, _defineProperty(_defineProperty({}, singMapping['工号'], rest[singMapping['工号']]), singMapping['姓名'], rest[singMapping['姓名']]));
|
|
1606
1628
|
case 9:
|
|
1607
1629
|
userInfo = _context3.sent;
|
|
1608
1630
|
if (userInfo[singMapping["签名"]]) {
|
|
@@ -1631,7 +1653,7 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1631
1653
|
}
|
|
1632
1654
|
}, _callee3, null, [[3, 15, 18, 21]]);
|
|
1633
1655
|
}))();
|
|
1634
|
-
case
|
|
1656
|
+
case 106:
|
|
1635
1657
|
bse_signList_temp = _context4.sent;
|
|
1636
1658
|
signNewAttr = _objectSpread(_objectSpread({}, attrTemp), {}, {
|
|
1637
1659
|
bse_signList: bse_signList_temp
|
|
@@ -1655,8 +1677,8 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1655
1677
|
}
|
|
1656
1678
|
}).join(" "), "</text>");
|
|
1657
1679
|
}).join(mode === "vertical" ? "" : " / "));
|
|
1658
|
-
return _context4.abrupt("break",
|
|
1659
|
-
case
|
|
1680
|
+
return _context4.abrupt("break", 123);
|
|
1681
|
+
case 113:
|
|
1660
1682
|
if (currentNodeTemp.querySelector("label")) {
|
|
1661
1683
|
dateNewAttr = _objectSpread(_objectSpread({}, attrTemp), {}, {
|
|
1662
1684
|
date: contentValueTemp
|
|
@@ -1669,23 +1691,23 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1669
1691
|
currentNodeTemp.querySelector("label").innerHTML = contentValueTemp ? attrTemp.datetype === 'age' ? calculateAge(contentValueTemp) : dateFormat(contentValueTemp, attrTemp.dateformat) : '';
|
|
1670
1692
|
}
|
|
1671
1693
|
}
|
|
1672
|
-
return _context4.abrupt("break",
|
|
1673
|
-
case
|
|
1694
|
+
return _context4.abrupt("break", 123);
|
|
1695
|
+
case 115:
|
|
1674
1696
|
valueArr = contentValueTemp.split('|');
|
|
1675
1697
|
currentNodeTemp.querySelector(".extensional").innerHTML = valueArr[0] || '';
|
|
1676
1698
|
currentNodeTemp.querySelector(".diastolic").innerHTML = valueArr[1] || '';
|
|
1677
|
-
return _context4.abrupt("break",
|
|
1678
|
-
case
|
|
1699
|
+
return _context4.abrupt("break", 123);
|
|
1700
|
+
case 119:
|
|
1679
1701
|
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>"));
|
|
1680
|
-
return _context4.abrupt("break",
|
|
1681
|
-
case
|
|
1702
|
+
return _context4.abrupt("break", 123);
|
|
1703
|
+
case 121:
|
|
1682
1704
|
if (playInput) {
|
|
1683
1705
|
palyInput(currentNodeTemp, contentValueTemp);
|
|
1684
1706
|
} else {
|
|
1685
1707
|
currentNodeTemp.querySelector("label") && (currentNodeTemp.querySelector("label").innerHTML = contentValueTemp !== null && contentValueTemp !== void 0 ? contentValueTemp : '');
|
|
1686
1708
|
}
|
|
1687
|
-
return _context4.abrupt("break",
|
|
1688
|
-
case
|
|
1709
|
+
return _context4.abrupt("break", 123);
|
|
1710
|
+
case 123:
|
|
1689
1711
|
case "end":
|
|
1690
1712
|
return _context4.stop();
|
|
1691
1713
|
}
|
|
@@ -1860,7 +1882,7 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1860
1882
|
key: "setAndDrawAllTestListByPageNum",
|
|
1861
1883
|
value: (function () {
|
|
1862
1884
|
var _setAndDrawAllTestListByPageNum = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
1863
|
-
var
|
|
1885
|
+
var _this6 = this;
|
|
1864
1886
|
var pageNumber,
|
|
1865
1887
|
allTestData,
|
|
1866
1888
|
_args6 = arguments;
|
|
@@ -1870,12 +1892,12 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1870
1892
|
pageNumber = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : 1;
|
|
1871
1893
|
allTestData = _args6.length > 1 ? _args6[1] : undefined;
|
|
1872
1894
|
return _context6.abrupt("return", new Promise(function (reslove) {
|
|
1873
|
-
|
|
1895
|
+
_this6.temperatureIntance.clearnByPageNumber(pageNumber).then(function () {
|
|
1874
1896
|
var temperDataList = allTestData.temperDataList;
|
|
1875
|
-
var target =
|
|
1876
|
-
var treeWalker =
|
|
1897
|
+
var target = _this6.getEditorPageByNum(pageNumber).querySelector('.bse-content_editable');
|
|
1898
|
+
var treeWalker = _this6.temperatureIntance.conf.document.createTreeWalker(target, NodeFilter.SHOW_ELEMENT, {
|
|
1877
1899
|
acceptNode: function acceptNode(node) {
|
|
1878
|
-
var attr =
|
|
1900
|
+
var attr = _this6.domUtils.getElementBseAttr(node);
|
|
1879
1901
|
return ['temperature/tempAndPulse', 'temperature/pain', 'temperature/legend'].includes(attr.type) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
1880
1902
|
}
|
|
1881
1903
|
});
|
|
@@ -1886,12 +1908,12 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1886
1908
|
};
|
|
1887
1909
|
while (treeWalker.nextNode()) {
|
|
1888
1910
|
var cNode = treeWalker.currentNode;
|
|
1889
|
-
var
|
|
1890
|
-
type =
|
|
1891
|
-
rest = _objectWithoutProperties(
|
|
1911
|
+
var _this6$domUtils$getEl = _this6.domUtils.getElementBseAttr(cNode),
|
|
1912
|
+
type = _this6$domUtils$getEl.type,
|
|
1913
|
+
rest = _objectWithoutProperties(_this6$domUtils$getEl, _excluded);
|
|
1892
1914
|
if (type === 'temperature/legend') {
|
|
1893
|
-
|
|
1894
|
-
} else
|
|
1915
|
+
_this6.temperatureIntance.conf[configMapping[type]] = rest.signMappingConf;
|
|
1916
|
+
} else _this6.temperatureIntance.conf[configMapping[type]] = _objectSpread(_objectSpread({}, _this6.temperatureIntance.conf[configMapping[type]]), rest);
|
|
1895
1917
|
}
|
|
1896
1918
|
/** 数据存储 */
|
|
1897
1919
|
var temperAttr = encodeURIComponent(JSON.stringify(temperDataList));
|
|
@@ -1899,7 +1921,7 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1899
1921
|
if (temperTarget) {
|
|
1900
1922
|
temperTarget.setAttribute('_temperData', temperAttr);
|
|
1901
1923
|
} else {
|
|
1902
|
-
var div =
|
|
1924
|
+
var div = _this6.domUtils.createElement("div", {
|
|
1903
1925
|
_temperData: temperAttr
|
|
1904
1926
|
});
|
|
1905
1927
|
target.appendChild(div);
|
|
@@ -1911,15 +1933,15 @@ var Polyfill = /*#__PURE__*/function () {
|
|
|
1911
1933
|
case 0:
|
|
1912
1934
|
/** 数据存储 */
|
|
1913
1935
|
if (temperDataList.length) {
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1936
|
+
_this6.temperatureIntance._renderingLegend(pageNumber);
|
|
1937
|
+
_this6.temperatureIntance._renderingData(pageNumber);
|
|
1938
|
+
_this6.temperatureIntance._renderingWarningLine(pageNumber);
|
|
1939
|
+
_this6.temperatureIntance._renderingPainData(pageNumber);
|
|
1940
|
+
_this6.temperatureIntance._renderingOrClearnBaseInfo(pageNumber);
|
|
1919
1941
|
}
|
|
1920
|
-
footTarget =
|
|
1942
|
+
footTarget = _this6.getEditorPageByNum(pageNumber).querySelector('.bse-footer_editable');
|
|
1921
1943
|
_context5.next = 4;
|
|
1922
|
-
return
|
|
1944
|
+
return _this6.updateReplaceApi(allTestData, footTarget, undefined, true, undefined, undefined, Object.keys(allTestData));
|
|
1923
1945
|
case 4:
|
|
1924
1946
|
reslove(true);
|
|
1925
1947
|
case 5:
|
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 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""}}function isEven(e){if("number"==typeof e)return e%2==0}function isOdd(e){if("number"==typeof e)return 1===Math.abs(e%2)}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,c=b64_to_utf8(r),s=b64_to_utf8(i),u=b64_to_utf8(a),d=b64_to_utf8(o);if(!("3012434b484cc204b927d36e901b2618607f9a5f".includes(l)||l&&isOdd(c)&&isEven(s)&&isOdd(u)&&isOdd(d))){if(!l&&decide(.02)){if(console.log("dec-"),t){var p=this.document.createElement("summary");return p.appendChild(e),p.innerHTML}return e}if(isOdd(l)&&decide(.02)){if(console.log("dec-o"),isEven(c)||isOdd(s)||isEven(u)||isEven(d)){if(t){var f=this.document.createElement("summary");return f.appendChild(e),f.innerHTML}return e}}else if(isEven(l)&&decide(.02)&&(console.log("dec-e"),isOdd(c)||isEven(s)||isOdd(u)||isOdd(d))){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,C,M,N,F,q,D,R,H,z,B,U,G,J,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?106:"bloodPressure"===e.t0?108:"picturePlaceholder"===e.t0?112:114;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",116);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",116);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",116);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" "})).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" "})).join(""),"</text>"):""},P=function(e,t){return e?t+1+".":""},E=function(e,t){return e+1===t.length?"。":","},C=_objectSpread(_objectSpread(_objectSpread({},optionsDefault.diagnoseFieldsMapping),null===(u=this.getOptions())||void 0===u?void 0:u.diagnoseFieldsMapping),a),M=(null===(d=(p=n||[]).filter)||void 0===d?void 0:d.call(p,(function(e){return[r.diagnoseType.label,r.diagnoseType.value].includes(e[C["类型"]])&&("中西医诊断"===r.chineseAndWesternType||r.chineseAndWesternType===e[C["分类"]])})))||[],N=_objectSpread(_objectSpread({},r),{},{bse_multipleSelection:null!=M?M:[]}),y.setAttribute("bse",encodeURIComponent(JSON.stringify(N))),M=M?arrToTree(M,void 0,C).reduce((function(e,t){var n=e.find((function(e){return e.label===t[C["类型"]]}));return n?n[C["子集"]].push(t):e.push(_defineProperty({label:t[C["类型"]]},C["子集"],[t])),e}),[]).reduce((function(e,t){return e.push(_objectSpread(_objectSpread({},t),{},_defineProperty({},C["子集"],t[C["子集"]].reduce((function(e,t){var n=e.find((function(e){return e.label===t[C["分类"]]}));return n?n[C["子集"]].push(t):e.push(_defineProperty({label:t[C["分类"]]},C["子集"],[t])),e}),[])))),e}),[]):{},F=r.addOrderNumber,q=r.addChinaOrderNumber,D=r.showDiagnoseType,R=r.showDiagnoseTitle,H=r.signTitleLabel,z=r.signDateLabel,B=r.sectionStart,U=r.splitCharList,G=r.diagnoseTypeLabel,J=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(G||o.label," </text>"):"":R?'<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[J?"病描述":"病名"]]||"",'</text>\n <text style="font-size: initial;">').concat(U[0]||" ").concat(o[a[J?"症描述":"症名"]]).concat(U[1]||" ","</text>").concat(E(l,e)):"".concat(P(F&&2===n,l),'<text style="font-size: initial;">').concat(o[a[J?"诊断描述":"诊断名"]]||"","</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(G||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[J?"病描述":"病名"]]||"","</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[J?"症描述":"症名"]]||"","</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[J?"病描述":"病名"]]||"","</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[J?"症描述":"症名"]]||"","</text></text>"):[0,1,2].includes(n)?"".concat(0===n?D?'<text style="font-size: initial;display:block;">'.concat(G||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[J?"诊断描述":"诊断名"]]||"","</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[J?"诊断描述":"诊断名"]]||"","</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(){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r.showList.includes("签名")){e.next=4;break}return e.next=3,new Promise(function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var n,r,i;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=null===(n=M)||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.bse_children)||void 0===n||null===(n=n[0].bse_children)||void 0===n?void 0:n[0],e.next=3,ve.findSignUserInfoResult.call(ve,_defineProperty(_defineProperty({},K["工号"],null==r?void 0:r.diagDrCode),K["姓名"],null==r?void 0:r.diagDrName));case 3:i=e.sent,t(i);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());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[C["诊断医生"]])||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[C["诊断日期"]])||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[C["诊断医生"]])||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[C["诊断日期"]])||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=M.length?"".concat(W(M,r.mode,0,D,R,C)).concat(V(r.mode,K,H,z,D,R,r,M)):"",e.abrupt("break",116);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",116);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",116);case 96:return le=_objectSpread(_objectSpread({},optionsDefault.signFieldsMapping),null===(m=this.getOptions())||void 0===m?void 0:m.signFieldsMapping),e.next=99,_asyncToGenerator(_regeneratorRuntime().mark((function e(){var r,i,a,o;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!ve.domUtils.isInsideBseCaresheetEle(t).isInside){e.next=21;break}r=_createForOfIteratorHelper(n),e.prev=3,r.s();case 5:if((i=r.n()).done){e.next=13;break}return a=i.value,e.next=9,ve.findSignUserInfoResult.call(ve,_defineProperty(_defineProperty({},le["工号"],a[le["工号"]]),le["姓名"],a[le["姓名"]]));case 9:(o=e.sent)[le["签名"]]&&(a[le["签名"]]=o[le["签名"]]);case 11:e.next=5;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(3),r.e(e.t0);case 18:return e.prev=18,r.f(),e.finish(18);case 21:return e.abrupt("return",null!=n?n:[]);case 22:case"end":return e.stop()}}),e,null,[[3,15,18,21]])})))();case 99:return ce=e.sent,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",116);case 106: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",116);case 108:return ye=n.split("|"),y.querySelector(".extensional").innerHTML=ye[0]||"",y.querySelector(".diastolic").innerHTML=ye[1]||"",e.abrupt("break",116);case 112: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",116);case 114:return l?palyInput(y,n):y.querySelector("label")&&(y.querySelector("label").innerHTML=null!=n?n:""),e.abrupt("break",116);case 116: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 C=groupBy([].slice.call(l.querySelectorAll(":not(table)[".concat(i.parentIndex,"]"))),(function(e){return e.getAttribute("".concat(i.parentIndex))})),M=0,N=Object.entries(C);M<N.length;M++){var F,q,D,R=_slicedToArray(N[M],2),H=(R[0],R[1]),z=null===(F=H[1])||void 0===F?void 0:F.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 G=B.getAttribute("".concat(i.parentIndex));null!=o&&null!==(q=o.querySelector)&&void 0!==q&&q.call(o,"*[".concat(i.parentIndex,'="').concat(G,'"]'))||null!=a&&null!==(D=a.querySelector)&&void 0!==D&&D.call(a,"*[".concat(i.parentIndex,'="').concat(G,'"]'))||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 J=groupBy([].slice.call(l.querySelectorAll("*[".concat(i.virtualIndex,"]"))),(function(e){return e.getAttribute("".concat(i.virtualIndex))})),W=0,K=Object.entries(J);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 j(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 T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(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,j.prototype={constructor:j,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(T),!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),T(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;T(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 awaitDynamicResultMiddle(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 awaitDictResultMiddle(e){var t=this;return new Promise((function(n){t.getOptions().requestDictTable&&t.getOptions().requestDictTable(n,e)}))}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""}}function isEven(e){if("number"==typeof e)return e%2==0}function isOdd(e){if("number"==typeof e)return 1===Math.abs(e%2)}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,c=b64_to_utf8(r),s=b64_to_utf8(i),u=b64_to_utf8(a),d=b64_to_utf8(o);if(!("3012434b484cc204b927d36e901b2618607f9a5f".includes(l)||l&&isOdd(c)&&isEven(s)&&isOdd(u)&&isOdd(d))){if(!l&&decide(.02)){if(console.log("dec-"),t){var p=this.document.createElement("summary");return p.appendChild(e),p.innerHTML}return e}if(isOdd(l)&&decide(.02)){if(console.log("dec-o"),isEven(c)||isOdd(s)||isEven(u)||isEven(d)){if(t){var f=this.document.createElement("summary");return f.appendChild(e),f.innerHTML}return e}}else if(isEven(l)&&decide(.02)&&(console.log("dec-e"),isOdd(c)||isEven(s)||isOdd(u)||isOdd(d))){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,T,j,L,P,E,M,C,N,q,F,D,R,H,z,B,U,G,J,W,K,V,Y,X,$,Q,Z,ee,te,ne,re,ie,ae,oe,le,ce,se,ue,de,pe,fe,he,me,be,ye,ve,ge=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=ge.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?51:"surgery"===e.t0?71:"address"===e.t0?78:"sign"===e.t0?103:"date"===e.t0?113:"bloodPressure"===e.t0?115:"picturePlaceholder"===e.t0?119:121;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",123);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",123);case 32:if(I=[],"axios"!==r.bse_card){e.next=40;break}return e.next=36,awaitDynamicResultMiddle.call(this,r,o);case 36:O=e.sent,I=this.getRadioCheckDynamicMappingValue(O),e.next=48;break;case 40:if("dict"!==r.bse_card){e.next=47;break}return e.next=43,awaitDictResultMiddle.call(this,r);case 43:T=e.sent,I=this.getRadioCheckDynamicMappingValue(T),e.next=48;break;case 47:I=r.bse_options;case 48: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",123);case 51:return L=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" "})).join("")},P=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" "})).join(""),"</text>"):""},E=function(e,t){return e?t+1+".":""},M=function(e,t){return e+1===t.length?"。":","},C=_objectSpread(_objectSpread(_objectSpread({},optionsDefault.diagnoseFieldsMapping),null===(u=this.getOptions())||void 0===u?void 0:u.diagnoseFieldsMapping),a),N=(null===(d=(p=n||[]).filter)||void 0===d?void 0:d.call(p,(function(e){return[r.diagnoseType.label,r.diagnoseType.value].includes(e[C["类型"]])&&("中西医诊断"===r.chineseAndWesternType||r.chineseAndWesternType===e[C["分类"]])})))||[],q=_objectSpread(_objectSpread({},r),{},{bse_multipleSelection:null!=N?N:[]}),y.setAttribute("bse",encodeURIComponent(JSON.stringify(q))),N=N?arrToTree(N,void 0,C).reduce((function(e,t){var n=e.find((function(e){return e.label===t[C["类型"]]}));return n?n[C["子集"]].push(t):e.push(_defineProperty({label:t[C["类型"]]},C["子集"],[t])),e}),[]).reduce((function(e,t){return e.push(_objectSpread(_objectSpread({},t),{},_defineProperty({},C["子集"],t[C["子集"]].reduce((function(e,t){var n=e.find((function(e){return e.label===t[C["分类"]]}));return n?n[C["子集"]].push(t):e.push(_defineProperty({label:t[C["分类"]]},C["子集"],[t])),e}),[])))),e}),[]):{},F=r.addOrderNumber,D=r.addChinaOrderNumber,R=r.showDiagnoseType,H=r.showDiagnoseTitle,z=r.signTitleLabel,B=r.signDateLabel,U=r.sectionStart,G=r.splitCharList,J=r.diagnoseTypeLabel,W=r.showDescribe,K=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?R?'<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(E(D&&2===n,l),'<text style="font-size: initial;">').concat(o[a[W?"病描述":"病名"]]||"",'</text>\n <text style="font-size: initial;">').concat(G[0]||" ").concat(o[a[W?"症描述":"症名"]]).concat(G[1]||" ","</text>").concat(M(l,e)):"".concat(E(F&&2===n,l),'<text style="font-size: initial;">').concat(o[a[W?"诊断描述":"诊断名"]]||"","</text>").concat(M(l,e))),"\n ").concat(o[a["子集"]]&&o[a["子集"]].length?K(o[a["子集"]],t,n+1,r,i,a):"")},vertical:function(){return"".concat("中医诊断"===o[a["分类"]]?[0,1,2].includes(n)?"".concat(0===n?R?'<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(U?"block":"inline-block",';"><text style="font-size: initial;display: inline-block;">').concat(L(n,l,U,R,H)).concat(o.label,":</text></text>"):"":'<text style="font-size: initial;display:'.concat(U||0!==l?"block":"inline-block",';">').concat(U||0!==l?"".concat(P(U,R,H)):"",'<text style="font-size: initial;display: inline-block;">').concat(L(n,l,U,R,H)).concat(E(D&&2===n,l)).concat(o[a[W?"病描述":"病名"]]||"","</text></text>")+'<text style="font-size: initial;display:block">'.concat(P(U,R,H),'<text style="font-size: initial;display: inline-block;">').concat(L(n+1,l,U,R,H)).concat(o[a[W?"症描述":"症名"]]||"","</text></text>")):'<text style="font-size: initial;display:block">'.concat(P(U,R,H),'<text style="font-size: initial;display: inline-block;">').concat(L(n,l,U,R,H)).concat(E(D&&2===n,l)).concat(o[a[W?"病描述":"病名"]]||"","</text></text>")+'<text style="font-size: initial;display:block">'.concat(P(U,R,H),'<text style="font-size: initial;display: inline-block;">').concat(L(n+1,l,U,R,H)).concat(o[a[W?"症描述":"症名"]]||"","</text></text>"):[0,1,2].includes(n)?"".concat(0===n?R?'<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(U?"block":"inline-block",';"><text style="font-size: initial;display: inline-block;">').concat(L(n,l,U,R,H)).concat(o.label,":</text></text>"):"":'<text style="font-size: initial;display:'.concat(U||0!==l?"block":"inline-block",';">').concat(U||0!==l?"".concat(P(U,R,H)):"",'<text style="font-size: initial;display: inline-block;">').concat(L(n,l,U,R,H)).concat(E(F&&2===n,l)).concat(o[a[W?"诊断描述":"诊断名"]]||"","</text></text>")):'<text style="font-size: initial;display:block">'.concat(P(U,R,H),'<text style="font-size: initial;display: inline-block;">').concat(L(n,l,U,R,H)).concat(E(F&&2===n,l)).concat(o[a[W?"诊断描述":"诊断名"]]||"","</text></text>"),"\n ").concat(o[a["子集"]]&&o[a["子集"]].length?K(o[a["子集"]],t,n+1,r,i,a):"")}}[t]()})).join(""))},V=_objectSpread(_objectSpread({},optionsDefault.signFieldsMapping),null===(f=this.getOptions())||void 0===f?void 0:f.signFieldsMapping),e.next=65,_asyncToGenerator(_regeneratorRuntime().mark((function e(){return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r.showList.includes("签名")){e.next=4;break}return e.next=3,new Promise(function(){var e=_asyncToGenerator(_regeneratorRuntime().mark((function e(t){var n,r,i;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=null===(n=N)||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.bse_children)||void 0===n||null===(n=n[0].bse_children)||void 0===n?void 0:n[0],e.next=3,ge.findSignUserInfoResult.call(ge,_defineProperty(_defineProperty({},V["工号"],null==r?void 0:r.diagDrCode),V["姓名"],null==r?void 0:r.diagDrName));case 3:i=e.sent,t(i);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))();case 65:return Y=e.sent,X=function(e,t,n,r,i,a,o){var l,c,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],u=ge.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[C["诊断医生"]])||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[C["诊断日期"]])||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(L(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[C["诊断医生"]])||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(L(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[C["诊断日期"]])||u[t["日期"]]||new Date,o.diagDateFormat||"yyyy-MM-dd"),"</text></text>"):"","\n ")}[e])},$=y.querySelector("span"),"vertical"===r.mode?(!$.classList.contains("inline-flex")&&$.classList.add("inline-flex"),!$.classList.contains("text-zero")&&$.classList.add("text-zero")):($.classList.contains("inline-flex")&&$.classList.remove("inline-flex"),$.classList.contains("text-zero")&&$.classList.remove("text-zero")),y.querySelector("label").innerHTML=N.length?"".concat(K(N,r.mode,0,R,H,C)).concat(X(r.mode,V,z,B,R,H,r,N)):"",e.abrupt("break",123);case 71:return Q=_objectSpread(_objectSpread({},r),{},{bse_surgeryList:null!=n?n:[]}),y.setAttribute("bse",encodeURIComponent(JSON.stringify(Q))),Z=_objectSpread(_objectSpread(_objectSpread({},optionsDefault.surgeryFieldsMapping),null===(h=this.getOptions())||void 0===h?void 0:h.surgeryFieldsMapping),a),ee="",ee=n.length?["手术名","手术描述"].includes(r.fieldName)?n.map((function(e,t){var i=e[Z[r.fieldName]]||"";return"".concat(n.length>1?"".concat(t+1,"."):"").concat(i)})).join(""):(null===(te=n[n.length-1])||void 0===te?void 0:te[Z[r.fieldName]||""])||"":"",y.querySelector("label").innerHTML=ee||"",e.abrupt("break",123);case 78:if(ne=function(e,t){return new RegExp("[".concat(e,"]+"),"g").test(t)},re=[],ie="",!Array.isArray(n)){e.next=88;break}return ae=JSON.parse(JSON.stringify(n)).pop(),e.next=84,this.getAddressInfoList(ae,r);case 84:re=e.sent,ie=re.map((function(e){return e.label})).join("/")||"",e.next=99;break;case 88:if(!ne("\\u4E00-\\u9FFF",n)){e.next=93;break}re=[{value:"编辑器 - 字段绑定为地区中文名!无法查询地区code",name:n}],ie=n,e.next=99;break;case 93:return oe="",oe=ne("/|-",n)?n.split(/(\/|\||\-)/).pop():n,e.next=97,this.getAddressInfoList(oe,r);case 97:re=e.sent,ie=re.map((function(e){return e.label})).join("/")||"";case 99:return le=_objectSpread(_objectSpread({},r),{},{bse_address:re}),y.setAttribute("bse",encodeURIComponent(JSON.stringify(le))),y.querySelector("label").innerHTML=ie,e.abrupt("break",123);case 103:return ce=_objectSpread(_objectSpread({},optionsDefault.signFieldsMapping),null===(m=this.getOptions())||void 0===m?void 0:m.signFieldsMapping),e.next=106,_asyncToGenerator(_regeneratorRuntime().mark((function e(){var r,i,a,o;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!ge.domUtils.isInsideBseCaresheetEle(t).isInside){e.next=21;break}r=_createForOfIteratorHelper(n),e.prev=3,r.s();case 5:if((i=r.n()).done){e.next=13;break}return a=i.value,e.next=9,ge.findSignUserInfoResult.call(ge,_defineProperty(_defineProperty({},ce["工号"],a[ce["工号"]]),ce["姓名"],a[ce["姓名"]]));case 9:(o=e.sent)[ce["签名"]]&&(a[ce["签名"]]=o[ce["签名"]]);case 11:e.next=5;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(3),r.e(e.t0);case 18:return e.prev=18,r.f(),e.finish(18);case 21:return e.abrupt("return",null!=n?n:[]);case 22:case"end":return e.stop()}}),e,null,[[3,15,18,21]])})))();case 106:return se=e.sent,ue=_objectSpread(_objectSpread({},r),{},{bse_signList:se}),y.setAttribute("bse",encodeURIComponent(JSON.stringify(ue))),de=ue.bse_signList,pe=ue.showList,fe=ue.mode,he=ue.jobsort,me=de.length?de.sort((function(e,t){return"asc"===he?e[ce["等级"]]-t[ce["等级"]]:t[ce["等级"]]-e[ce["等级"]]})):[],y.querySelector("label").innerHTML="".concat(me.map((function(e){return'<text style="display: '.concat("vertical"===fe?"block":"inline-block",'">').concat(["姓名","签名","职称","日期"].filter((function(e){return pe.includes(e)})).map((function(t){return"日期"===t?dateFormat(new Date,"yyyy-MM-dd")||e[ce[t]]:"签名"===t?'<img src="'.concat(e[ce[t]],'" width="80" height="15.75pt">'):e[ce[t]]})).join(" "),"</text>")})).join("vertical"===fe?"":" / ")),e.abrupt("break",123);case 113:return y.querySelector("label")&&(be=_objectSpread(_objectSpread({},r),{},{date:n}),y.setAttribute("bse",encodeURIComponent(JSON.stringify(be))),n||y.querySelector("label").innerHTML?y.querySelector("label").innerHTML=n?"age"===r.datetype?calculateAge(n):dateFormat(n,r.dateformat):"":(ye=be.value||be.defCurrentDate?new Date:"",y.querySelector("label").innerHTML=ye?"age"===r.datetype?calculateAge(ye):dateFormat(ye,r.dateformat):"")),e.abrupt("break",123);case 115:return ve=n.split("|"),y.querySelector(".extensional").innerHTML=ve[0]||"",y.querySelector(".diastolic").innerHTML=ve[1]||"",e.abrupt("break",123);case 119: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",123);case 121:return l?palyInput(y,n):y.querySelector("label")&&(y.querySelector("label").innerHTML=null!=n?n:""),e.abrupt("break",123);case 123: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,T=_createForOfIteratorHelper(k.cur);try{for(T.s();!(O=T.n()).done;){var j=O.value,L=w.comMatchCellByColIndex(I,j.colIndex).matchCell;j.cell.style.height=parseInt(j.cell.style.height)+parseInt(null==L?void 0:L.style.height)+"px",this.domUtils.isInsideBseCaresheetEle(r).isInside?L&&!this.domUtils.isIdAndNameAndVirtualIdSameSignOrDateString.call(this,j.cell.innerHTML,L.innerHTML)&&j.cell.insertAdjacentHTML("beforeend",L.innerHTML):L&&j.cell.insertAdjacentHTML("beforeend",L.innerHTML),j.cell.setAttribute("rowspan",+j.cell.getAttribute("rowspan")+ +(null==L?void 0:L.getAttribute("rowspan"))-1)}}catch(e){T.e(e)}finally{T.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 G=B.getAttribute("".concat(i.parentIndex));null!=o&&null!==(F=o.querySelector)&&void 0!==F&&F.call(o,"*[".concat(i.parentIndex,'="').concat(G,'"]'))||null!=a&&null!==(D=a.querySelector)&&void 0!==D&&D.call(a,"*[".concat(i.parentIndex,'="').concat(G,'"]'))||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 J=groupBy([].slice.call(l.querySelectorAll("*[".concat(i.virtualIndex,"]"))),(function(e){return e.getAttribute("".concat(i.virtualIndex))})),W=0,K=Object.entries(J);W<K.length;W++){var V,Y,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!==(V=o.querySelector)&&void 0!==V&&V.call(o,"*[".concat(i.virtualIndex,'="').concat(ee,'"]'))||null!=a&&null!==(Y=a.querySelector)&&void 0!==Y&&Y.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
package/src/index.js
CHANGED
|
@@ -688,8 +688,8 @@ function isFunction(fuc) {
|
|
|
688
688
|
: false;
|
|
689
689
|
}
|
|
690
690
|
|
|
691
|
-
/**
|
|
692
|
-
function
|
|
691
|
+
/** 等待字典返回数据中间件 */
|
|
692
|
+
function awaitDynamicResultMiddle(proto, newversion = false) {
|
|
693
693
|
return new Promise(resolve => {
|
|
694
694
|
if (this.getOptions().requestTable, newversion) {
|
|
695
695
|
this.getOptions().requestTable(resolve, proto)
|
|
@@ -699,6 +699,15 @@ function awaitDictoryResultMiddle(proto, newversion = false) {
|
|
|
699
699
|
})
|
|
700
700
|
}
|
|
701
701
|
|
|
702
|
+
/** 等待动态返回数据中间件 */
|
|
703
|
+
function awaitDictResultMiddle(proto) {
|
|
704
|
+
return new Promise(resolve => {
|
|
705
|
+
if (this.getOptions().requestDictTable) {
|
|
706
|
+
this.getOptions().requestDictTable(resolve, proto)
|
|
707
|
+
}
|
|
708
|
+
})
|
|
709
|
+
}
|
|
710
|
+
|
|
702
711
|
/**
|
|
703
712
|
* 分组元素
|
|
704
713
|
* @param arry ***一维度数组
|
|
@@ -1064,8 +1073,11 @@ class Polyfill {
|
|
|
1064
1073
|
case "select":
|
|
1065
1074
|
let bse_options = [];
|
|
1066
1075
|
if (attrTemp.bse_card === 'axios') {
|
|
1067
|
-
const bse_options_cache_axios_obj = await
|
|
1076
|
+
const bse_options_cache_axios_obj = await awaitDynamicResultMiddle.call(this, attrTemp, versionControl);
|
|
1068
1077
|
bse_options = this.getRadioCheckDynamicMappingValue(bse_options_cache_axios_obj);
|
|
1078
|
+
} else if (attrTemp.bse_card === 'dict') {
|
|
1079
|
+
const bse_options_cache_dict_obj = await awaitDictResultMiddle.call(this, attrTemp);
|
|
1080
|
+
bse_options = this.getRadioCheckDynamicMappingValue(bse_options_cache_dict_obj);
|
|
1069
1081
|
} else {
|
|
1070
1082
|
bse_options = attrTemp.bse_options;
|
|
1071
1083
|
}
|