polyfill-common 2.1.19 → 2.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -754,33 +754,6 @@ function isFunction(fuc) {
754
754
  return fuc ? Object.prototype.toString.call(fuc) === "[object Function]" : false;
755
755
  }
756
756
 
757
- /** 等待字典返回数据中间件 */
758
- function awaitDynamicResultMiddle(proto) {
759
- var _this = this;
760
- var newversion = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
761
- return new Promise(function (resolve) {
762
- if (_this.getOptions().requestTable, newversion) {
763
- _this.getOptions().requestTable(resolve, proto);
764
- } else {
765
- // 兼容老数据
766
- resolve({
767
- tableOptions: proto.bse_options || [],
768
- tableOptionsMapping: {}
769
- });
770
- }
771
- });
772
- }
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
-
784
757
  /**
785
758
  * 分组元素
786
759
  * @param arry ***一维度数组
@@ -937,7 +910,7 @@ var Polyfill = /*#__PURE__*/function () {
937
910
  return _createClass(Polyfill, [{
938
911
  key: "enhanceArrToTree",
939
912
  value: function enhanceArrToTree(arry, porpsMapping, pid, path, level) {
940
- var _this3 = this;
913
+ var _this = this;
941
914
  [undefined].includes(pid) && (arry = treeToArr(arry, porpsMapping));
942
915
  var __id = porpsMapping["_id"] || "_id",
943
916
  __parentId = porpsMapping["_parentId"] || "_parentId",
@@ -958,7 +931,7 @@ var Polyfill = /*#__PURE__*/function () {
958
931
  }).map(function (m, inx) {
959
932
  var levelTmp = level ? level + '/' + inx : inx;
960
933
  var pathTmp = path ? path + '/' + m[__id] : m[__id];
961
- var childrenTmp = _this3.enhanceArrToTree(arry, porpsMapping, m[__id], pathTmp, levelTmp);
934
+ var childrenTmp = _this.enhanceArrToTree(arry, porpsMapping, m[__id], pathTmp, levelTmp);
962
935
  def(m, __level, levelTmp);
963
936
  def(m, __order, inx);
964
937
  def(m, __path, pathTmp);
@@ -1011,7 +984,7 @@ var Polyfill = /*#__PURE__*/function () {
1011
984
  }, {
1012
985
  key: "getAddressInfoList",
1013
986
  value: function getAddressInfoList(codeOrCodeArrTmp, formInline) {
1014
- var _this4 = this;
987
+ var _this2 = this;
1015
988
  var cacheCodeTmp = JSON.parse(JSON.stringify(codeOrCodeArrTmp));
1016
989
  // 通过城市id查询所属
1017
990
  function findItorByCityNode(codeTmp, addressList, porpsMapping) {
@@ -1058,7 +1031,7 @@ var Polyfill = /*#__PURE__*/function () {
1058
1031
  })) || [];
1059
1032
  }
1060
1033
  var PFetch = new Promise(function (resolve) {
1061
- _this4.getOptions().requestParentAddressByParam(function (param) {
1034
+ _this2.getOptions().requestParentAddressByParam(function (param) {
1062
1035
  if (!param) {
1063
1036
  resolve([]);
1064
1037
  return;
@@ -1071,7 +1044,7 @@ var Polyfill = /*#__PURE__*/function () {
1071
1044
  value: 'code',
1072
1045
  parentId: 'parentCode'
1073
1046
  }, addressMapping || {});
1074
- var addressCascaderOptions = _this4.enhanceArrToTree(addressList, {
1047
+ var addressCascaderOptions = _this2.enhanceArrToTree(addressList, {
1075
1048
  _id: addressCascaderProps.value,
1076
1049
  _parentId: addressCascaderProps.parentId,
1077
1050
  _children: addressCascaderProps.children
@@ -1134,7 +1107,7 @@ var Polyfill = /*#__PURE__*/function () {
1134
1107
  key: "forceUpdateFun",
1135
1108
  value: (function () {
1136
1109
  var _forceUpdateFun = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(elSrc, contentValueTemp, attrTemp, editAreaTmp, valueDefaultPropsTemp, versionControl, playInput) {
1137
- var _this5 = this,
1110
+ var _this3 = this,
1138
1111
  _bse_options,
1139
1112
  _bse_options$find,
1140
1113
  _this$getOptions2,
@@ -1165,9 +1138,9 @@ var Polyfill = /*#__PURE__*/function () {
1165
1138
  }
1166
1139
  }
1167
1140
  (_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');
1168
- var _this5$itorParentCach = _this5.itorParentCacheId(result),
1169
- isInsideFlag = _this5$itorParentCach.isInsideFlag,
1170
- currentNode = _this5$itorParentCach.currentNode;
1141
+ var _this3$itorParentCach = _this3.itorParentCacheId(result),
1142
+ isInsideFlag = _this3$itorParentCach.isInsideFlag,
1143
+ currentNode = _this3$itorParentCach.currentNode;
1171
1144
  if (isInsideFlag && !currentNode.querySelector('*[helper_data_cache_child_id]')) {
1172
1145
  currentNode.removeAttribute('helper_data_cache_id');
1173
1146
  currentNode.removeAttribute('helper_data_last_break_ele');
@@ -1263,7 +1236,9 @@ var Polyfill = /*#__PURE__*/function () {
1263
1236
  break;
1264
1237
  }
1265
1238
  _context4.next = 36;
1266
- return awaitDynamicResultMiddle.call(this, attrTemp, versionControl);
1239
+ return this.awaitDynamicResultMiddle(_objectSpread(_objectSpread({}, attrTemp), {}, {
1240
+ filterText: contentValueTemp
1241
+ }), versionControl);
1267
1242
  case 36:
1268
1243
  bse_options_cache_axios_obj = _context4.sent;
1269
1244
  bse_options = this.getRadioCheckDynamicMappingValue(bse_options_cache_axios_obj);
@@ -1275,7 +1250,9 @@ var Polyfill = /*#__PURE__*/function () {
1275
1250
  break;
1276
1251
  }
1277
1252
  _context4.next = 43;
1278
- return awaitDictResultMiddle.call(this, attrTemp);
1253
+ return this.awaitDictResultMiddle(_objectSpread(_objectSpread({}, attrTemp), {}, {
1254
+ filterText: contentValueTemp
1255
+ }));
1279
1256
  case 43:
1280
1257
  bse_options_cache_dict_obj = _context4.sent;
1281
1258
  bse_options = this.getRadioCheckDynamicMappingValue(bse_options_cache_dict_obj);
@@ -1436,7 +1413,7 @@ var Polyfill = /*#__PURE__*/function () {
1436
1413
  case 0:
1437
1414
  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];
1438
1415
  _context.next = 3;
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));
1416
+ return _this3.findSignUserInfoResult.call(_this3, _defineProperty(_defineProperty({}, diagnoseSingMapping['工号'], diagInfo === null || diagInfo === void 0 ? void 0 : diagInfo.diagDrCode), diagnoseSingMapping['姓名'], diagInfo === null || diagInfo === void 0 ? void 0 : diagInfo.diagDrName));
1440
1417
  case 3:
1441
1418
  userInfo = _context.sent;
1442
1419
  resolve(userInfo);
@@ -1463,7 +1440,7 @@ var Polyfill = /*#__PURE__*/function () {
1463
1440
  // 预取其它用户签名信息(requestOtherUserInfoExtra)
1464
1441
  comSignList = function comSignList(modeName, signMappingAttr, signTitleLabel, signDateLabel, showDiagnoseTypeTmp, showDiagnoseTitleTmp, attrTemp) {
1465
1442
  var diagnoseArr = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : [];
1466
- var userInfo = _this5.getUserInfoData();
1443
+ var userInfo = _this3.getUserInfoData();
1467
1444
  var signShowArr = attrTemp.showList || [];
1468
1445
  return "".concat({
1469
1446
  horizontal: function (_diagnoseArr$diagnose2) {
@@ -1603,12 +1580,12 @@ var Polyfill = /*#__PURE__*/function () {
1603
1580
  singMapping = _objectSpread(_objectSpread({}, optionsDefault.signFieldsMapping), (_this$getOptions5 = this.getOptions()) === null || _this$getOptions5 === void 0 ? void 0 : _this$getOptions5.signFieldsMapping);
1604
1581
  _context4.next = 106;
1605
1582
  return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
1606
- var _this5$domUtils$isIns, isInside, _iterator6, _step6, rest, userInfo;
1583
+ var _this3$domUtils$isIns, isInside, _iterator6, _step6, rest, userInfo;
1607
1584
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1608
1585
  while (1) switch (_context3.prev = _context3.next) {
1609
1586
  case 0:
1610
1587
  // 判断是否在caresheet内
1611
- _this5$domUtils$isIns = _this5.domUtils.isInsideBseCaresheetEle(elSrc), isInside = _this5$domUtils$isIns.isInside;
1588
+ _this3$domUtils$isIns = _this3.domUtils.isInsideBseCaresheetEle(elSrc), isInside = _this3$domUtils$isIns.isInside;
1612
1589
  if (!isInside) {
1613
1590
  _context3.next = 21;
1614
1591
  break;
@@ -1624,7 +1601,7 @@ var Polyfill = /*#__PURE__*/function () {
1624
1601
  }
1625
1602
  rest = _step6.value;
1626
1603
  _context3.next = 9;
1627
- return _this5.findSignUserInfoResult.call(_this5, _defineProperty(_defineProperty({}, singMapping['工号'], rest[singMapping['工号']]), singMapping['姓名'], rest[singMapping['姓名']]));
1604
+ return _this3.findSignUserInfoResult.call(_this3, _defineProperty(_defineProperty({}, singMapping['工号'], rest[singMapping['工号']]), singMapping['姓名'], rest[singMapping['姓名']]));
1628
1605
  case 9:
1629
1606
  userInfo = _context3.sent;
1630
1607
  if (userInfo[singMapping["签名"]]) {
@@ -1882,7 +1859,7 @@ var Polyfill = /*#__PURE__*/function () {
1882
1859
  key: "setAndDrawAllTestListByPageNum",
1883
1860
  value: (function () {
1884
1861
  var _setAndDrawAllTestListByPageNum = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
1885
- var _this6 = this;
1862
+ var _this4 = this;
1886
1863
  var pageNumber,
1887
1864
  allTestData,
1888
1865
  _args6 = arguments;
@@ -1892,12 +1869,12 @@ var Polyfill = /*#__PURE__*/function () {
1892
1869
  pageNumber = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : 1;
1893
1870
  allTestData = _args6.length > 1 ? _args6[1] : undefined;
1894
1871
  return _context6.abrupt("return", new Promise(function (reslove) {
1895
- _this6.temperatureIntance.clearnByPageNumber(pageNumber).then(function () {
1872
+ _this4.temperatureIntance.clearnByPageNumber(pageNumber).then(function () {
1896
1873
  var temperDataList = allTestData.temperDataList;
1897
- var target = _this6.getEditorPageByNum(pageNumber).querySelector('.bse-content_editable');
1898
- var treeWalker = _this6.temperatureIntance.conf.document.createTreeWalker(target, NodeFilter.SHOW_ELEMENT, {
1874
+ var target = _this4.getEditorPageByNum(pageNumber).querySelector('.bse-content_editable');
1875
+ var treeWalker = _this4.temperatureIntance.conf.document.createTreeWalker(target, NodeFilter.SHOW_ELEMENT, {
1899
1876
  acceptNode: function acceptNode(node) {
1900
- var attr = _this6.domUtils.getElementBseAttr(node);
1877
+ var attr = _this4.domUtils.getElementBseAttr(node);
1901
1878
  return ['temperature/tempAndPulse', 'temperature/pain', 'temperature/legend'].includes(attr.type) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
1902
1879
  }
1903
1880
  });
@@ -1908,12 +1885,12 @@ var Polyfill = /*#__PURE__*/function () {
1908
1885
  };
1909
1886
  while (treeWalker.nextNode()) {
1910
1887
  var cNode = treeWalker.currentNode;
1911
- var _this6$domUtils$getEl = _this6.domUtils.getElementBseAttr(cNode),
1912
- type = _this6$domUtils$getEl.type,
1913
- rest = _objectWithoutProperties(_this6$domUtils$getEl, _excluded);
1888
+ var _this4$domUtils$getEl = _this4.domUtils.getElementBseAttr(cNode),
1889
+ type = _this4$domUtils$getEl.type,
1890
+ rest = _objectWithoutProperties(_this4$domUtils$getEl, _excluded);
1914
1891
  if (type === 'temperature/legend') {
1915
- _this6.temperatureIntance.conf[configMapping[type]] = rest.signMappingConf;
1916
- } else _this6.temperatureIntance.conf[configMapping[type]] = _objectSpread(_objectSpread({}, _this6.temperatureIntance.conf[configMapping[type]]), rest);
1892
+ _this4.temperatureIntance.conf[configMapping[type]] = rest.signMappingConf;
1893
+ } else _this4.temperatureIntance.conf[configMapping[type]] = _objectSpread(_objectSpread({}, _this4.temperatureIntance.conf[configMapping[type]]), rest);
1917
1894
  }
1918
1895
  /** 数据存储 */
1919
1896
  var temperAttr = encodeURIComponent(JSON.stringify(temperDataList));
@@ -1921,7 +1898,7 @@ var Polyfill = /*#__PURE__*/function () {
1921
1898
  if (temperTarget) {
1922
1899
  temperTarget.setAttribute('_temperData', temperAttr);
1923
1900
  } else {
1924
- var div = _this6.domUtils.createElement("div", {
1901
+ var div = _this4.domUtils.createElement("div", {
1925
1902
  _temperData: temperAttr
1926
1903
  });
1927
1904
  target.appendChild(div);
@@ -1933,15 +1910,15 @@ var Polyfill = /*#__PURE__*/function () {
1933
1910
  case 0:
1934
1911
  /** 数据存储 */
1935
1912
  if (temperDataList.length) {
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);
1913
+ _this4.temperatureIntance._renderingLegend(pageNumber);
1914
+ _this4.temperatureIntance._renderingData(pageNumber);
1915
+ _this4.temperatureIntance._renderingWarningLine(pageNumber);
1916
+ _this4.temperatureIntance._renderingPainData(pageNumber);
1917
+ _this4.temperatureIntance._renderingOrClearnBaseInfo(pageNumber);
1941
1918
  }
1942
- footTarget = _this6.getEditorPageByNum(pageNumber).querySelector('.bse-footer_editable');
1919
+ footTarget = _this4.getEditorPageByNum(pageNumber).querySelector('.bse-footer_editable');
1943
1920
  _context5.next = 4;
1944
- return _this6.updateReplaceApi(allTestData, footTarget, undefined, true, undefined, undefined, Object.keys(allTestData));
1921
+ return _this4.updateReplaceApi(allTestData, footTarget, undefined, true, undefined, undefined, Object.keys(allTestData));
1945
1922
  case 4:
1946
1923
  reslove(true);
1947
1924
  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 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"&emsp;"})).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"&emsp;"})).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__})());
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 O(r||[]);return i(o,"_invoke",{value:k(e,n,l)}),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",h="completed",m={};function b(){}function y(){}function v(){}var g={};s(g,o,(function(){return this}));var _=Object.getPrototypeOf,x=_&&_(_(L([])));x&&x!==n&&r.call(x,o)&&(g=x);var A=v.prototype=b.prototype=Object.create(g);function S(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function n(i,a,o,l){var c=d(e[i],e,a);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"==_typeof(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,o,l)}),(function(e){n("throw",e,o,l)})):t.resolve(u).then((function(e){s.value=e,o(s)}),(function(e){return n("throw",e,o,l)}))}l(c.arg)}var a;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return a=a?a.then(i,i):i()}})}function k(t,n,r){var i=p;return function(a,o){if(i===f)throw Error("Generator is already running");if(i===h){if("throw"===a)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var l=r.delegate;if(l){var c=I(l,r);if(c){if(c===m)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=f;var s=d(t,n,r);if("normal"===s.type){if(i=r.done?h:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(i=h,r.method="throw",r.arg=s.arg)}}}function I(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,I(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var a=d(i,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,m;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(_typeof(t)+" is not iterable")}return y.prototype=v,i(A,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,c,"GeneratorFunction")),e.prototype=Object.create(A),e},t.awrap=function(e){return{__await:e}},S(w.prototype),s(w.prototype,l,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var o=new w(u(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},S(A),s(A,c,"Generator"),s(A,o,(function(){return this})),s(A,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,O.prototype={constructor:O,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 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,j,T,O,L,P,E,C,M,N,F,q,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,this.awaitDynamicResultMiddle(_objectSpread(_objectSpread({},r),{},{filterText:n}),o);case 36:j=e.sent,I=this.getRadioCheckDynamicMappingValue(j),e.next=48;break;case 40:if("dict"!==r.bse_card){e.next=47;break}return e.next=43,this.awaitDictResultMiddle(_objectSpread(_objectSpread({},r),{},{filterText:n}));case 43:T=e.sent,I=this.getRadioCheckDynamicMappingValue(T),e.next=48;break;case 47:I=r.bse_options;case 48:return O=null===(c=I)||void 0===c||null===(s=c.find)||void 0===s||null===(s=s.call(c,(function(e){return[e.value,e.label].includes(n)})))||void 0===s?void 0:s.label,y.querySelector("label").innerHTML=O||"",e.abrupt("break",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"&emsp;"})).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"&emsp;"})).join(""),"</text>"):""},E=function(e,t){return e?t+1+".":""},C=function(e,t){return e+1===t.length?"。":","},M=_objectSpread(_objectSpread(_objectSpread({},optionsDefault.diagnoseFieldsMapping),null===(u=this.getOptions())||void 0===u?void 0:u.diagnoseFieldsMapping),a),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[M["类型"]])&&("中西医诊断"===r.chineseAndWesternType||r.chineseAndWesternType===e[M["分类"]])})))||[],F=_objectSpread(_objectSpread({},r),{},{bse_multipleSelection:null!=N?N:[]}),y.setAttribute("bse",encodeURIComponent(JSON.stringify(F))),N=N?arrToTree(N,void 0,M).reduce((function(e,t){var n=e.find((function(e){return e.label===t[M["类型"]]}));return n?n[M["子集"]].push(t):e.push(_defineProperty({label:t[M["类型"]]},M["子集"],[t])),e}),[]).reduce((function(e,t){return e.push(_objectSpread(_objectSpread({},t),{},_defineProperty({},M["子集"],t[M["子集"]].reduce((function(e,t){var n=e.find((function(e){return e.label===t[M["分类"]]}));return n?n[M["子集"]].push(t):e.push(_defineProperty({label:t[M["分类"]]},M["子集"],[t])),e}),[])))),e}),[]):{},q=r.addOrderNumber,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(C(l,e)):"".concat(E(q&&2===n,l),'<text style="font-size: initial;">').concat(o[a[W?"诊断描述":"诊断名"]]||"","</text>").concat(C(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(q&&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(q&&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[M["诊断医生"]])||u[t[e]]||"":"签名"===e?'<img width="80" height="15.75" src="'.concat(Y[t[e]]||"",'">'):u[t[e]]||"";var n})).join(" "),"</text>"):"","\n ").concat(d.some((function(e){return["日期"].includes(e)}))?'<text style="font-size: initial;"><text style="display:inline-block;width: '.concat(i?"88pt":"63pt",';text-align: right;">').concat(r||"日期",':</text><text bse_child="diagnoseDdate">').concat(dateFormat((null===(c=s[s.length])||void 0===c?void 0:c[M["诊断日期"]])||u[t["日期"]]||new Date,o.diagDateFormat||"yyyy-MM-dd"),"</text></text>"):"","\n "),vertical:"\n ".concat(d.some((function(e){return["职称","姓名","签名"].includes(e)}))?'<text style="display: block;font-size: initial;"><text style="display:inline-block;text-align: right;">'.concat(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[M["诊断医生"]])||u[t[e]]||"":"签名"===e?'<img width="80" height="15.75" src="'.concat(Y[t[e]]||"",'">'):u[t[e]]||"";var n})).join(" "),"</text>"):"","\n ").concat(d.some((function(e){return["日期"].includes(e)}))?'<text style="display: block;font-size: initial;"><text style="display:inline-block;text-align: right;">'.concat(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[M["诊断日期"]])||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,M)).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 j,T=_createForOfIteratorHelper(k.cur);try{for(T.s();!(j=T.n()).done;){var O=j.value,L=w.comMatchCellByColIndex(I,O.colIndex).matchCell;O.cell.style.height=parseInt(O.cell.style.height)+parseInt(null==L?void 0:L.style.height)+"px",this.domUtils.isInsideBseCaresheetEle(r).isInside?L&&!this.domUtils.isIdAndNameAndVirtualIdSameSignOrDateString.call(this,O.cell.innerHTML,L.innerHTML)&&O.cell.insertAdjacentHTML("beforeend",L.innerHTML):L&&O.cell.insertAdjacentHTML("beforeend",L.innerHTML),O.cell.setAttribute("rowspan",+O.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 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 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polyfill-common",
3
- "version": "2.1.19",
3
+ "version": "2.1.21",
4
4
  "description": "基础依赖库",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -688,26 +688,6 @@ function isFunction(fuc) {
688
688
  : false;
689
689
  }
690
690
 
691
- /** 等待字典返回数据中间件 */
692
- function awaitDynamicResultMiddle(proto, newversion = false) {
693
- return new Promise(resolve => {
694
- if (this.getOptions().requestTable, newversion) {
695
- this.getOptions().requestTable(resolve, proto)
696
- } else { // 兼容老数据
697
- resolve({ tableOptions: proto.bse_options || [], tableOptionsMapping: {} })
698
- }
699
- })
700
- }
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
-
711
691
  /**
712
692
  * 分组元素
713
693
  * @param arry ***一维度数组
@@ -1073,10 +1053,10 @@ class Polyfill {
1073
1053
  case "select":
1074
1054
  let bse_options = [];
1075
1055
  if (attrTemp.bse_card === 'axios') {
1076
- const bse_options_cache_axios_obj = await awaitDynamicResultMiddle.call(this, attrTemp, versionControl);
1056
+ const bse_options_cache_axios_obj = await this.awaitDynamicResultMiddle({ ...attrTemp, filterText: contentValueTemp }, versionControl);
1077
1057
  bse_options = this.getRadioCheckDynamicMappingValue(bse_options_cache_axios_obj);
1078
1058
  } else if (attrTemp.bse_card === 'dict') {
1079
- const bse_options_cache_dict_obj = await awaitDictResultMiddle.call(this, attrTemp);
1059
+ const bse_options_cache_dict_obj = await this.awaitDictResultMiddle({ ...attrTemp, filterText: contentValueTemp });
1080
1060
  bse_options = this.getRadioCheckDynamicMappingValue(bse_options_cache_dict_obj);
1081
1061
  } else {
1082
1062
  bse_options = attrTemp.bse_options;