hoeditor-web 3.1.76 → 3.1.78
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/lib/hoeditor.umd.js +396 -220
- package/lib/hoeditor.umd.min.js +5 -5
- package/package.json +1 -1
package/lib/hoeditor.umd.js
CHANGED
|
@@ -15853,7 +15853,7 @@ var component = (0,componentNormalizer/* default */.Z)(
|
|
|
15853
15853
|
|
|
15854
15854
|
/***/ }),
|
|
15855
15855
|
|
|
15856
|
-
/***/
|
|
15856
|
+
/***/ 8494:
|
|
15857
15857
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
15858
15858
|
|
|
15859
15859
|
"use strict";
|
|
@@ -15869,7 +15869,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
15869
15869
|
var es_function_name = __webpack_require__(68309);
|
|
15870
15870
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
|
|
15871
15871
|
var es_array_concat = __webpack_require__(92222);
|
|
15872
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/sign/Sign.vue?vue&type=template&id=
|
|
15872
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/sign/Sign.vue?vue&type=template&id=9c073ac8&
|
|
15873
15873
|
|
|
15874
15874
|
|
|
15875
15875
|
var render = function render() {
|
|
@@ -15953,7 +15953,7 @@ var render = function render() {
|
|
|
15953
15953
|
attrs: {
|
|
15954
15954
|
"value": 4
|
|
15955
15955
|
}
|
|
15956
|
-
}, [_vm._v("
|
|
15956
|
+
}, [_vm._v("自定义多人签名(自定义签名格式)")])], 1)], 1)]), _vm.signType == 2 ? _c('li', {
|
|
15957
15957
|
staticClass: "control-item"
|
|
15958
15958
|
}, [_c('span', {
|
|
15959
15959
|
staticClass: "label"
|
|
@@ -16256,7 +16256,19 @@ var render = function render() {
|
|
|
16256
16256
|
"value": dateTime.dataId
|
|
16257
16257
|
}
|
|
16258
16258
|
}, [_vm._v(_vm._s("".concat(dateTime.name, "(").concat(dateTime.dataId, ")")))]);
|
|
16259
|
-
}), 1)], 1)] : _vm._e()
|
|
16259
|
+
}), 1)], 1)] : _vm._e(), _vm.signType !== 1 ? _c('li', {
|
|
16260
|
+
staticClass: "control-item"
|
|
16261
|
+
}, [_c('span', {
|
|
16262
|
+
staticClass: "label"
|
|
16263
|
+
}, [_vm._v("上级医师签名")]), _c('a-checkbox', {
|
|
16264
|
+
model: {
|
|
16265
|
+
value: _vm.isHigher,
|
|
16266
|
+
callback: function callback($$v) {
|
|
16267
|
+
_vm.isHigher = $$v;
|
|
16268
|
+
},
|
|
16269
|
+
expression: "isHigher"
|
|
16270
|
+
}
|
|
16271
|
+
})], 1) : _vm._e()], 2), _vm.signType >= 9 ? _c('div', {
|
|
16260
16272
|
staticClass: "section-right"
|
|
16261
16273
|
}, [_c('div', {
|
|
16262
16274
|
staticClass: "custom-format-tool-box"
|
|
@@ -16358,7 +16370,7 @@ var render = function render() {
|
|
|
16358
16370
|
};
|
|
16359
16371
|
var staticRenderFns = [];
|
|
16360
16372
|
|
|
16361
|
-
;// CONCATENATED MODULE: ./src/components/controls/sign/Sign.vue?vue&type=template&id=
|
|
16373
|
+
;// CONCATENATED MODULE: ./src/components/controls/sign/Sign.vue?vue&type=template&id=9c073ac8&
|
|
16362
16374
|
|
|
16363
16375
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
|
|
16364
16376
|
var objectSpread2 = __webpack_require__(63442);
|
|
@@ -16388,6 +16400,8 @@ var es_array_filter = __webpack_require__(57327);
|
|
|
16388
16400
|
var es_string_includes = __webpack_require__(32023);
|
|
16389
16401
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.slice.js
|
|
16390
16402
|
var es_array_slice = __webpack_require__(47042);
|
|
16403
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js
|
|
16404
|
+
var es_object_keys = __webpack_require__(47941);
|
|
16391
16405
|
// EXTERNAL MODULE: ./src/HOEditorFactorys.ts
|
|
16392
16406
|
var HOEditorFactorys = __webpack_require__(74089);
|
|
16393
16407
|
// EXTERNAL MODULE: ./src/editor/dom/treeNode/SignNode.ts
|
|
@@ -16411,6 +16425,7 @@ var SignNode = __webpack_require__(24701);
|
|
|
16411
16425
|
|
|
16412
16426
|
|
|
16413
16427
|
|
|
16428
|
+
|
|
16414
16429
|
/* harmony default export */ var Signvue_type_script_lang_js_ = ({
|
|
16415
16430
|
name: 'Sign',
|
|
16416
16431
|
props: {
|
|
@@ -16427,7 +16442,6 @@ var SignNode = __webpack_require__(24701);
|
|
|
16427
16442
|
inject: ['getCustomProperty'],
|
|
16428
16443
|
data: function data() {
|
|
16429
16444
|
return {
|
|
16430
|
-
height: 20,
|
|
16431
16445
|
name: '',
|
|
16432
16446
|
signType: 0,
|
|
16433
16447
|
signFormat: '<医师姓名>',
|
|
@@ -16441,10 +16455,14 @@ var SignNode = __webpack_require__(24701);
|
|
|
16441
16455
|
defaultFormatList: ['<医师姓名>', '<医师姓名>(<医师职称>)', '<医师姓名>:<医师职称>', '<医师姓名>:<医师职称>\n<签名时间>'],
|
|
16442
16456
|
animationClassNames: 'control-modal-contents sign-modal animation-in',
|
|
16443
16457
|
isDisplayTitle: false,
|
|
16458
|
+
isHigher: false,
|
|
16444
16459
|
isDisplayTime: false,
|
|
16445
16460
|
timePosition: '0',
|
|
16446
16461
|
dateTimeList: [],
|
|
16447
|
-
associatedElement: ''
|
|
16462
|
+
associatedElement: '',
|
|
16463
|
+
modifyProps: {},
|
|
16464
|
+
unwatchProps: [],
|
|
16465
|
+
watchProps: ['name', 'signType', 'signFormat', 'connectMode', 'connectChar', 'isFront', 'signTimeFormat', 'customFormatContent', 'isDisplayTitle', 'isDisplayTime', 'timePosition', 'associatedElement', 'isHigher']
|
|
16448
16466
|
};
|
|
16449
16467
|
},
|
|
16450
16468
|
mounted: function mounted() {
|
|
@@ -16462,7 +16480,7 @@ var SignNode = __webpack_require__(24701);
|
|
|
16462
16480
|
if (this.controlStatus === 'update') {
|
|
16463
16481
|
var node = this.getCurrentSelectNode();
|
|
16464
16482
|
if (node) {
|
|
16465
|
-
var _node$otherProperties, _node$otherProperties2, _node$otherProperties3, _node$otherProperties4, _node$otherProperties5;
|
|
16483
|
+
var _node$otherProperties, _node$otherProperties2, _node$otherProperties3, _node$otherProperties4, _node$otherProperties5, _node$otherProperties6, _node$otherProperties7;
|
|
16466
16484
|
this.name = node.name;
|
|
16467
16485
|
if (node.attribute == 2) {
|
|
16468
16486
|
this.signType = 2; // 自定义多人签名(带职称)
|
|
@@ -16486,10 +16504,11 @@ var SignNode = __webpack_require__(24701);
|
|
|
16486
16504
|
this.isFront = node.isFront === true || node.isFront === 'true' ? true : false;
|
|
16487
16505
|
this.signTimeFormat = node.signTimeFormat;
|
|
16488
16506
|
this.customFormatContent = node.customFormatContent ? node.customFormatContent : '';
|
|
16489
|
-
this.customSignFormatList = node.customSignFormatList ? node.customSignFormatList : [];
|
|
16507
|
+
// this.customSignFormatList = node.customSignFormatList ? node.customSignFormatList : [];
|
|
16490
16508
|
this.isDisplayTitle = ((_node$otherProperties = node.otherProperties) === null || _node$otherProperties === void 0 ? void 0 : _node$otherProperties.isDisplayTitle) === 'true' | ((_node$otherProperties2 = node.otherProperties) === null || _node$otherProperties2 === void 0 ? void 0 : _node$otherProperties2.isDisplayTitle) === true ? true : false;
|
|
16491
|
-
this.
|
|
16492
|
-
this.
|
|
16509
|
+
this.isHigher = ((_node$otherProperties3 = node.otherProperties) === null || _node$otherProperties3 === void 0 ? void 0 : _node$otherProperties3.isHigher) === 'true' | ((_node$otherProperties4 = node.otherProperties) === null || _node$otherProperties4 === void 0 ? void 0 : _node$otherProperties4.isHigher) === true ? true : false;
|
|
16510
|
+
this.isDisplayTime = ((_node$otherProperties5 = node.otherProperties) === null || _node$otherProperties5 === void 0 ? void 0 : _node$otherProperties5.isDisplayTime) === 'true' | ((_node$otherProperties6 = node.otherProperties) === null || _node$otherProperties6 === void 0 ? void 0 : _node$otherProperties6.isDisplayTime) === true ? true : false;
|
|
16511
|
+
this.timePosition = ((_node$otherProperties7 = node.otherProperties) === null || _node$otherProperties7 === void 0 ? void 0 : _node$otherProperties7.timePosition) == '1' ? '1' : '0';
|
|
16493
16512
|
this.associatedElement = node.associatedElement ? node.associatedElement : '';
|
|
16494
16513
|
list.forEach(function (v) {
|
|
16495
16514
|
if (v.nodeType == 8 && (!associatedElementList.includes(v.dataId) || node.associatedElement == v.dataId)) {
|
|
@@ -16497,6 +16516,7 @@ var SignNode = __webpack_require__(24701);
|
|
|
16497
16516
|
_this.dateTimeList.push(v);
|
|
16498
16517
|
}
|
|
16499
16518
|
});
|
|
16519
|
+
this.setWatchProps();
|
|
16500
16520
|
}
|
|
16501
16521
|
} else {
|
|
16502
16522
|
list.forEach(function (v) {
|
|
@@ -16508,6 +16528,19 @@ var SignNode = __webpack_require__(24701);
|
|
|
16508
16528
|
}
|
|
16509
16529
|
},
|
|
16510
16530
|
methods: {
|
|
16531
|
+
setWatchProps: function setWatchProps() {
|
|
16532
|
+
var _this2 = this;
|
|
16533
|
+
this.watchProps.forEach(function (key) {
|
|
16534
|
+
_this2.unwatchProps.push(_this2.$watch("".concat(key), function (newValue, oldValue) {
|
|
16535
|
+
this.modifyProps[key] = newValue;
|
|
16536
|
+
}));
|
|
16537
|
+
});
|
|
16538
|
+
},
|
|
16539
|
+
clearWatchProps: function clearWatchProps() {
|
|
16540
|
+
this.unwatchProps.forEach(function (func) {
|
|
16541
|
+
func && func();
|
|
16542
|
+
});
|
|
16543
|
+
},
|
|
16511
16544
|
getCurrentSelectNode: function getCurrentSelectNode() {
|
|
16512
16545
|
var _hoEditorFactory$vueC;
|
|
16513
16546
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this.hoEditorFactoryId);
|
|
@@ -16574,32 +16607,56 @@ var SignNode = __webpack_require__(24701);
|
|
|
16574
16607
|
}
|
|
16575
16608
|
if (this.controlStatus === 'add') {
|
|
16576
16609
|
if (this.signType === 9) {
|
|
16577
|
-
//
|
|
16578
|
-
this.vueController.insertEmptySignNode(this.name ? this.name : '自定义医生签名', 1, this.signFormat, this.signTimeFormat, customProperty, this.connectMode, this.isFront, this.allowEditSignTime, 0, '', {
|
|
16610
|
+
// 自定义医生签名
|
|
16611
|
+
this.vueController.insertEmptySignNode(this.name ? this.name : '自定义医生签名', 1, this.signFormat, this.signTimeFormat, customProperty, this.connectMode, this.isFront, this.allowEditSignTime, 0, '', {
|
|
16612
|
+
isHigher: this.isHigher
|
|
16613
|
+
}, this.associatedElement);
|
|
16579
16614
|
} else if (this.signType === 2) {
|
|
16580
|
-
//
|
|
16581
|
-
this.vueController.insertEmptySignNode(this.name ? this.name : '自定义多人签名(默认带出职称)', 0, '', '', customProperty, '', undefined, undefined, this.signType, this.connectChar, {
|
|
16615
|
+
// 多人签名(默认带职称)
|
|
16616
|
+
this.vueController.insertEmptySignNode(this.name ? this.name : '自定义多人签名(默认带出职称)', 0, '', '', customProperty, '', undefined, undefined, this.signType, this.connectChar, {
|
|
16617
|
+
isHigher: this.isHigher
|
|
16618
|
+
}, this.associatedElement);
|
|
16582
16619
|
} else if (this.signType === 3) {
|
|
16583
|
-
//
|
|
16584
|
-
this.vueController.insertEmptySignNode(this.name ? this.name : '自定义多人签名(默认带出职称和日期)', 0, '', '', customProperty, '', undefined, undefined, this.signType, this.connectChar, {
|
|
16620
|
+
// 自定义多人签名(默认带出职称和日期)
|
|
16621
|
+
this.vueController.insertEmptySignNode(this.name ? this.name : '自定义多人签名(默认带出职称和日期)', 0, '', '', customProperty, '', undefined, undefined, this.signType, this.connectChar, {
|
|
16622
|
+
isHigher: this.isHigher
|
|
16623
|
+
}, this.associatedElement);
|
|
16585
16624
|
} else if (this.signType === 4) {
|
|
16586
|
-
//
|
|
16625
|
+
// 自定义多人签名(职称,连接符可选)
|
|
16587
16626
|
this.vueController.insertEmptySignNode(this.name ? this.name : '自定义多人签名(职称,连接符可选)', 0, '', this.signTimeFormat, customProperty, this.connectMode, undefined, undefined, this.signType, this.connectChar, (0,objectSpread2/* default */.Z)({
|
|
16588
|
-
isDisplayTitle: this.isDisplayTitle
|
|
16627
|
+
isDisplayTitle: this.isDisplayTitle,
|
|
16628
|
+
isHigher: this.isHigher
|
|
16589
16629
|
}, otherProperty), this.associatedElement);
|
|
16590
16630
|
} else {
|
|
16591
16631
|
var name = this.name ? this.name : this.signType == 1 ? '患者签名' : '医生签名';
|
|
16592
|
-
|
|
16632
|
+
var otherProperties = {
|
|
16633
|
+
isHigher: this.isHigher
|
|
16634
|
+
};
|
|
16635
|
+
if (this.signType == 1) {
|
|
16636
|
+
otherProperties = {};
|
|
16637
|
+
}
|
|
16638
|
+
this.vueController.insertEmptySignNode(name, 0, '', '', customProperty, '', undefined, undefined, this.signType, '', otherProperties, this.associatedElement);
|
|
16593
16639
|
}
|
|
16594
16640
|
} else if (this.controlStatus === 'update') {
|
|
16641
|
+
this.clearWatchProps();
|
|
16595
16642
|
var node = this.getCurrentSelectNode();
|
|
16596
16643
|
var _name = this.name ? this.name : node.name;
|
|
16597
16644
|
var attribute = this.signType === 9 ? 0 : this.signType;
|
|
16598
16645
|
var signType = this.signType == 9 ? 1 : 0; // 自定义签名的signType=1 其他签名 signType=0
|
|
16599
|
-
var
|
|
16600
|
-
isDisplayTitle: this.isDisplayTitle
|
|
16646
|
+
var _otherProperties = (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, node.otherProperties), {}, {
|
|
16647
|
+
isDisplayTitle: this.isDisplayTitle,
|
|
16648
|
+
isHigher: this.isHigher
|
|
16601
16649
|
}, otherProperty);
|
|
16602
|
-
|
|
16650
|
+
if (Object.keys(this.modifyProps).length) {
|
|
16651
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this.hoEditorFactoryId);
|
|
16652
|
+
var record = hoEditorFactory.docTree.elementChangeRecords.get('|' + node.dataId);
|
|
16653
|
+
if (!record || record.indexOf('add') < 0) {
|
|
16654
|
+
hoEditorFactory.docTree.elementChangeRecords.set('|' + node.dataId, ['update', {
|
|
16655
|
+
nodeTypes: 'sign'
|
|
16656
|
+
}]);
|
|
16657
|
+
}
|
|
16658
|
+
}
|
|
16659
|
+
this.vueController.updateEmptySignNode(node, _name, attribute, this.connectChar, signType, this.signFormat, this.signor, '', this.signTimeFormat, this.connectMode, _otherProperties, this.isFront, this.associatedElement);
|
|
16603
16660
|
}
|
|
16604
16661
|
this.handleClose();
|
|
16605
16662
|
},
|
|
@@ -16611,10 +16668,10 @@ var SignNode = __webpack_require__(24701);
|
|
|
16611
16668
|
});
|
|
16612
16669
|
;// CONCATENATED MODULE: ./src/components/controls/sign/Sign.vue?vue&type=script&lang=js&
|
|
16613
16670
|
/* harmony default export */ var sign_Signvue_type_script_lang_js_ = (Signvue_type_script_lang_js_);
|
|
16614
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-32.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/sign/Sign.vue?vue&type=style&index=0&id=
|
|
16671
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-32.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/controls/sign/Sign.vue?vue&type=style&index=0&id=9c073ac8&prod&lang=less&
|
|
16615
16672
|
// extracted by mini-css-extract-plugin
|
|
16616
16673
|
|
|
16617
|
-
;// CONCATENATED MODULE: ./src/components/controls/sign/Sign.vue?vue&type=style&index=0&id=
|
|
16674
|
+
;// CONCATENATED MODULE: ./src/components/controls/sign/Sign.vue?vue&type=style&index=0&id=9c073ac8&prod&lang=less&
|
|
16618
16675
|
|
|
16619
16676
|
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
16620
16677
|
var componentNormalizer = __webpack_require__(70713);
|
|
@@ -35748,9 +35805,9 @@ var Print = /*#__PURE__*/function () {
|
|
|
35748
35805
|
if (isPrintFirstDoc && firstPageIndex == -1) {
|
|
35749
35806
|
hoEditorFactory.docTree.mainNodes.forEach(function (node) {
|
|
35750
35807
|
if (node instanceof ParagraphNode/* ParagraphNode */.C && node.printAsSinglePage) {
|
|
35751
|
-
if (node.drawlines[0].parent instanceof DrawPageMainDoc/* DrawPageMainDoc */.$) {
|
|
35808
|
+
if (firstPageIndex == -1 && node.drawlines[0].parent instanceof DrawPageMainDoc/* DrawPageMainDoc */.$) {
|
|
35752
35809
|
firstPageIndex = node.drawlines[0].parent.pageIndex;
|
|
35753
|
-
} else if (node.drawlines[0] instanceof DrawTable/* DrawTable */.t && node.drawlines[0].drawPageTables[0].parent instanceof DrawPageMainDoc/* DrawPageMainDoc */.$) {
|
|
35810
|
+
} else if (firstPageIndex == -1 && node.drawlines[0] instanceof DrawTable/* DrawTable */.t && node.drawlines[0].drawPageTables[0].parent instanceof DrawPageMainDoc/* DrawPageMainDoc */.$) {
|
|
35754
35811
|
firstPageIndex = node.drawlines[0].drawPageTables[0].parent.pageIndex;
|
|
35755
35812
|
}
|
|
35756
35813
|
}
|
|
@@ -87642,7 +87699,7 @@ var NodeStyleUndoUnit = /*#__PURE__*/function () {
|
|
|
87642
87699
|
/* harmony export */ F: function() { return /* binding */ NodesDeleteUndoUnit; }
|
|
87643
87700
|
/* harmony export */ });
|
|
87644
87701
|
/* harmony import */ var ant_design_vue_es_message_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(94310);
|
|
87645
|
-
/* harmony import */ var
|
|
87702
|
+
/* harmony import */ var ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(40735);
|
|
87646
87703
|
/* harmony import */ var D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(80543);
|
|
87647
87704
|
/* harmony import */ var D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(81448);
|
|
87648
87705
|
/* harmony import */ var D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27222);
|
|
@@ -87689,11 +87746,13 @@ var NodeStyleUndoUnit = /*#__PURE__*/function () {
|
|
|
87689
87746
|
/* harmony import */ var _dom_treeNode_RadioAndCheckBoxNode__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(99152);
|
|
87690
87747
|
/* harmony import */ var _dom_treeNode_DateTimeNode__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(92501);
|
|
87691
87748
|
/* harmony import */ var _dom_treeNode_DownListNode__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(45712);
|
|
87692
|
-
/* harmony import */ var
|
|
87693
|
-
/* harmony import */ var
|
|
87694
|
-
/* harmony import */ var
|
|
87695
|
-
/* harmony import */ var
|
|
87696
|
-
/* harmony import */ var
|
|
87749
|
+
/* harmony import */ var _NodeInsertUndoUnit__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(64465);
|
|
87750
|
+
/* harmony import */ var _dom_treeNode_SignNode__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(24701);
|
|
87751
|
+
/* harmony import */ var _dom_NodePosition__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(42921);
|
|
87752
|
+
/* harmony import */ var _dom_treeNode_TableFormula__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(90832);
|
|
87753
|
+
/* harmony import */ var _dom_treeNode_RareCharNode__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(34910);
|
|
87754
|
+
/* harmony import */ var _draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(51760);
|
|
87755
|
+
|
|
87697
87756
|
|
|
87698
87757
|
|
|
87699
87758
|
|
|
@@ -88102,7 +88161,7 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
88102
88161
|
var epnode = e.parentNode;
|
|
88103
88162
|
var pnode = epnode;
|
|
88104
88163
|
if (spnode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_25__/* .TextInputFieldNode */ .re && epnode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_25__/* .TextInputFieldNode */ .re && spnode != epnode) {
|
|
88105
|
-
var result =
|
|
88164
|
+
var result = _dom_NodePosition__WEBPACK_IMPORTED_MODULE_39__/* .NodePosition */ .F.nodePositionCompare(spnode.StartMarkNode, epnode.StartMarkNode);
|
|
88106
88165
|
if (result < 0) {
|
|
88107
88166
|
pnode = spnode;
|
|
88108
88167
|
}
|
|
@@ -88166,25 +88225,39 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
88166
88225
|
}
|
|
88167
88226
|
}, {
|
|
88168
88227
|
key: "ParentRepaint",
|
|
88169
|
-
value: function
|
|
88170
|
-
|
|
88171
|
-
|
|
88172
|
-
|
|
88173
|
-
|
|
88174
|
-
|
|
88175
|
-
|
|
88176
|
-
|
|
88177
|
-
|
|
88178
|
-
|
|
88179
|
-
|
|
88180
|
-
|
|
88181
|
-
|
|
88182
|
-
|
|
88183
|
-
|
|
88184
|
-
|
|
88185
|
-
|
|
88228
|
+
value: function () {
|
|
88229
|
+
var _ParentRepaint = (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)( /*#__PURE__*/(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)().mark(function _callee2(Anode) {
|
|
88230
|
+
var hoEditorFactory, contentMark, styleIndex, contentMarkNode, insertPath;
|
|
88231
|
+
return (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)().wrap(function _callee2$(_context2) {
|
|
88232
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
88233
|
+
case 0:
|
|
88234
|
+
if (Anode && Anode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_25__/* .TextInputFieldNode */ .re) {
|
|
88235
|
+
hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_32__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
88236
|
+
if (Anode.childNodes.length === 2) {
|
|
88237
|
+
contentMark = Anode.childNodes2[1];
|
|
88238
|
+
styleIndex = Anode.childNodes[0].styleIndex;
|
|
88239
|
+
contentMarkNode = new _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_26__/* .MarkNode */ .j(this._hoEditorFactoryID, Anode.childNodes[0].rootNodes, Anode, _dom_treeNode_BaseNode__WEBPACK_IMPORTED_MODULE_21__/* .NodeType */ .Jq.ntMark, contentMark.text, styleIndex, _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_26__/* .MarkNodeType */ .q.mtContent);
|
|
88240
|
+
insertPath = hoEditorFactory.docTree.getNodeLastPath(Anode.childNodes[0]);
|
|
88241
|
+
hoEditorFactory.undoService.begin();
|
|
88242
|
+
hoEditorFactory.undoService.add(new _NodeInsertUndoUnit__WEBPACK_IMPORTED_MODULE_37__/* .NodeInsertUndoUnit */ .R(this._hoEditorFactoryID, insertPath, contentMarkNode));
|
|
88243
|
+
hoEditorFactory.undoService.commit();
|
|
88244
|
+
// Anode.childNodes.splice(1, 0, contentMarkNode);
|
|
88245
|
+
// await (Anode as TextInputFieldNode).update(0);
|
|
88246
|
+
} else {
|
|
88247
|
+
Anode.update();
|
|
88248
|
+
}
|
|
88249
|
+
}
|
|
88250
|
+
case 1:
|
|
88251
|
+
case "end":
|
|
88252
|
+
return _context2.stop();
|
|
88253
|
+
}
|
|
88254
|
+
}, _callee2, this);
|
|
88255
|
+
}));
|
|
88256
|
+
function ParentRepaint(_x) {
|
|
88257
|
+
return _ParentRepaint.apply(this, arguments);
|
|
88186
88258
|
}
|
|
88187
|
-
|
|
88259
|
+
return ParentRepaint;
|
|
88260
|
+
}()
|
|
88188
88261
|
}, {
|
|
88189
88262
|
key: "redo",
|
|
88190
88263
|
value: function redo() {
|
|
@@ -88194,32 +88267,32 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
88194
88267
|
}, {
|
|
88195
88268
|
key: "doRedo",
|
|
88196
88269
|
value: function () {
|
|
88197
|
-
var _doRedo = (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)( /*#__PURE__*/(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)().mark(function
|
|
88270
|
+
var _doRedo = (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)( /*#__PURE__*/(0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)().mark(function _callee3() {
|
|
88198
88271
|
var _currRange$npEnd$node;
|
|
88199
88272
|
var currRange, hoEditorFactory, textStyle, nodes, lastNode, ePath, sPath, n, node, tip, pnode, pTiNode, _res, changeEvent, startPath, endPath, res, cgEvent, aNode;
|
|
88200
|
-
return (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)().wrap(function
|
|
88201
|
-
while (1) switch (
|
|
88273
|
+
return (0,D_project_go_test_createJS_hoeditor_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)().wrap(function _callee3$(_context3) {
|
|
88274
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
88202
88275
|
case 0:
|
|
88203
88276
|
this.initParam();
|
|
88204
88277
|
currRange = new _dom_DomRange__WEBPACK_IMPORTED_MODULE_20__/* .DomRange */ .a(this._hoEditorFactoryID, this._startPath, this._endPath).normalize();
|
|
88205
88278
|
hoEditorFactory = _HOEditorFactorys__WEBPACK_IMPORTED_MODULE_32__/* .HOEditorFactorys */ .b.instance().getFactory(this._hoEditorFactoryID);
|
|
88206
88279
|
hoEditorFactory.docTree.curDomRange = currRange;
|
|
88207
|
-
if (!(hoEditorFactory.drawTree.paintStatus ===
|
|
88208
|
-
|
|
88280
|
+
if (!(hoEditorFactory.drawTree.paintStatus === _draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_42__/* .PaintState */ .Dh.psReview)) {
|
|
88281
|
+
_context3.next = 11;
|
|
88209
88282
|
break;
|
|
88210
88283
|
}
|
|
88211
88284
|
if (!(currRange.npEnd.node && currRange.npEnd.node instanceof _dom_treeNode_TextNode__WEBPACK_IMPORTED_MODULE_18__/* .TextNode */ .R)) {
|
|
88212
|
-
|
|
88285
|
+
_context3.next = 11;
|
|
88213
88286
|
break;
|
|
88214
88287
|
}
|
|
88215
88288
|
textStyle = hoEditorFactory.docTree.styles[currRange.npEnd.node.styleIndex];
|
|
88216
88289
|
if (!(textStyle.strikeout && currRange.npEnd.node.text.length > 0)) {
|
|
88217
|
-
|
|
88290
|
+
_context3.next = 11;
|
|
88218
88291
|
break;
|
|
88219
88292
|
}
|
|
88220
|
-
|
|
88293
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_43__/* ["default"] */ .Z.warn("该内容当前已处于删除状态!");
|
|
88221
88294
|
this._isError = true;
|
|
88222
|
-
return
|
|
88295
|
+
return _context3.abrupt("return");
|
|
88223
88296
|
case 11:
|
|
88224
88297
|
nodes = _dom_DomRange__WEBPACK_IMPORTED_MODULE_20__/* .DomRange */ .a.getSelectDomNodesForDelete(this._hoEditorFactoryID, this._startPath, this._endPath); // const npFirst = hoEditorFactory.docTree.findNodePositionByPath(this._startPath);
|
|
88225
88298
|
// if (npFirst && npFirst.node) {
|
|
@@ -88230,30 +88303,30 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
88230
88303
|
// if (!nodes.includes(npFirst.node)) nodes.splice(0, 0, npFirst.node);
|
|
88231
88304
|
// //}
|
|
88232
88305
|
// }
|
|
88233
|
-
if (!(hoEditorFactory.drawTree.paintStatus !==
|
|
88234
|
-
|
|
88306
|
+
if (!(hoEditorFactory.drawTree.paintStatus !== _draw_drawTree_DrawTree__WEBPACK_IMPORTED_MODULE_42__/* .PaintState */ .Dh.psDesign && !this._isForceDelete)) {
|
|
88307
|
+
_context3.next = 68;
|
|
88235
88308
|
break;
|
|
88236
88309
|
}
|
|
88237
88310
|
lastNode = nodes[nodes.length - 1];
|
|
88238
88311
|
if (!(lastNode instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_26__/* .MarkNode */ .j && lastNode.MarkNodeType === 0)) {
|
|
88239
|
-
|
|
88312
|
+
_context3.next = 22;
|
|
88240
88313
|
break;
|
|
88241
88314
|
}
|
|
88242
88315
|
if (!(nodes.length === 1)) {
|
|
88243
|
-
|
|
88316
|
+
_context3.next = 19;
|
|
88244
88317
|
break;
|
|
88245
88318
|
}
|
|
88246
|
-
return
|
|
88319
|
+
return _context3.abrupt("return");
|
|
88247
88320
|
case 19:
|
|
88248
88321
|
ePath = hoEditorFactory.docTree.getNodeLastPath(lastNode.previousLeaf());
|
|
88249
88322
|
hoEditorFactory.docTree.curDomRange.endPath = ePath;
|
|
88250
88323
|
nodes.splice(nodes.length - 1, 1);
|
|
88251
88324
|
case 22:
|
|
88252
88325
|
if (!(nodes.length === 1 && nodes[0] instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_26__/* .MarkNode */ .j && nodes[0].MarkNodeType === 2)) {
|
|
88253
|
-
|
|
88326
|
+
_context3.next = 24;
|
|
88254
88327
|
break;
|
|
88255
88328
|
}
|
|
88256
|
-
return
|
|
88329
|
+
return _context3.abrupt("return");
|
|
88257
88330
|
case 24:
|
|
88258
88331
|
if (nodes.length === 2 && nodes[0] instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_26__/* .MarkNode */ .j && nodes[0].MarkNodeType === 0) {
|
|
88259
88332
|
sPath = nodes[0].getNodePath();
|
|
@@ -88261,18 +88334,18 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
88261
88334
|
nodes.splice(0, 1);
|
|
88262
88335
|
}
|
|
88263
88336
|
if (!(nodes.length === 2 && nodes[1] instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_26__/* .MarkNode */ .j && nodes[1].MarkNodeType === 2 && !nodes[1].parentNode.canModifyContent)) {
|
|
88264
|
-
|
|
88337
|
+
_context3.next = 30;
|
|
88265
88338
|
break;
|
|
88266
88339
|
}
|
|
88267
|
-
|
|
88268
|
-
|
|
88340
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_43__/* ["default"] */ .Z.destroy();
|
|
88341
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_43__/* ["default"] */ .Z.warn("该元素不允许编辑。");
|
|
88269
88342
|
this._isError = true;
|
|
88270
|
-
return
|
|
88343
|
+
return _context3.abrupt("return");
|
|
88271
88344
|
case 30:
|
|
88272
88345
|
n = 0;
|
|
88273
88346
|
case 31:
|
|
88274
88347
|
if (!(n < nodes.length)) {
|
|
88275
|
-
|
|
88348
|
+
_context3.next = 67;
|
|
88276
88349
|
break;
|
|
88277
88350
|
}
|
|
88278
88351
|
node = nodes[n]; // if (node instanceof MarkNode && node.parentNode instanceof TextInputFieldNode && node.MarkNodeType === 1 && !node.parentNode.isAllowDelete) {
|
|
@@ -88280,12 +88353,12 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
88280
88353
|
// this._isError = true;
|
|
88281
88354
|
// return;
|
|
88282
88355
|
// }
|
|
88283
|
-
if (!(node instanceof _dom_treeNode_ControlNode__WEBPACK_IMPORTED_MODULE_33__/* .ControlNode */ .w && !(node instanceof
|
|
88284
|
-
|
|
88356
|
+
if (!(node instanceof _dom_treeNode_ControlNode__WEBPACK_IMPORTED_MODULE_33__/* .ControlNode */ .w && !(node instanceof _dom_treeNode_RareCharNode__WEBPACK_IMPORTED_MODULE_41__/* .RareCharNode */ .Q) || node instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_25__/* .TextInputFieldNode */ .re)) {
|
|
88357
|
+
_context3.next = 44;
|
|
88285
88358
|
break;
|
|
88286
88359
|
}
|
|
88287
88360
|
if (node.isAllowDelete) {
|
|
88288
|
-
|
|
88361
|
+
_context3.next = 44;
|
|
88289
88362
|
break;
|
|
88290
88363
|
}
|
|
88291
88364
|
tip = "";
|
|
@@ -88301,49 +88374,49 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
88301
88374
|
if (node instanceof _dom_treeNode_DownListNode__WEBPACK_IMPORTED_MODULE_36__/* .DownListNode */ .yF) {
|
|
88302
88375
|
tip = "下拉列表";
|
|
88303
88376
|
}
|
|
88304
|
-
|
|
88305
|
-
|
|
88377
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_43__/* ["default"] */ .Z.destroy();
|
|
88378
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_43__/* ["default"] */ .Z.warn(tip + "元素已设置为不允许删除。");
|
|
88306
88379
|
this._isError = true;
|
|
88307
|
-
return
|
|
88380
|
+
return _context3.abrupt("return");
|
|
88308
88381
|
case 44:
|
|
88309
88382
|
if (!(node instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_26__/* .MarkNode */ .j && node.MarkNodeType === 0)) {
|
|
88310
|
-
|
|
88383
|
+
_context3.next = 49;
|
|
88311
88384
|
break;
|
|
88312
88385
|
}
|
|
88313
|
-
|
|
88314
|
-
|
|
88386
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_43__/* ["default"] */ .Z.destroy();
|
|
88387
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_43__/* ["default"] */ .Z.warn("元素已设置为不允许删除,请正确操作。");
|
|
88315
88388
|
this._isError = true;
|
|
88316
|
-
return
|
|
88389
|
+
return _context3.abrupt("return");
|
|
88317
88390
|
case 49:
|
|
88318
|
-
if (!(node instanceof
|
|
88319
|
-
|
|
88391
|
+
if (!(node instanceof _dom_treeNode_TableFormula__WEBPACK_IMPORTED_MODULE_40__/* .TableFormula */ .N)) {
|
|
88392
|
+
_context3.next = 54;
|
|
88320
88393
|
break;
|
|
88321
88394
|
}
|
|
88322
|
-
|
|
88323
|
-
|
|
88395
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_43__/* ["default"] */ .Z.destroy();
|
|
88396
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_43__/* ["default"] */ .Z.warn("不允许删除表格计算公式");
|
|
88324
88397
|
this._isError = true;
|
|
88325
|
-
return
|
|
88398
|
+
return _context3.abrupt("return");
|
|
88326
88399
|
case 54:
|
|
88327
88400
|
if (!(node instanceof _dom_treeNode_TableNode__WEBPACK_IMPORTED_MODULE_31__/* .TableNode */ .Fh)) {
|
|
88328
|
-
|
|
88401
|
+
_context3.next = 59;
|
|
88329
88402
|
break;
|
|
88330
88403
|
}
|
|
88331
|
-
|
|
88332
|
-
|
|
88404
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_43__/* ["default"] */ .Z.destroy();
|
|
88405
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_43__/* ["default"] */ .Z.warn("不允许删除表格");
|
|
88333
88406
|
this._isError = true;
|
|
88334
|
-
return
|
|
88407
|
+
return _context3.abrupt("return");
|
|
88335
88408
|
case 59:
|
|
88336
|
-
if (!(node instanceof
|
|
88337
|
-
|
|
88409
|
+
if (!(node instanceof _dom_treeNode_SignNode__WEBPACK_IMPORTED_MODULE_38__/* .SignNode */ .N)) {
|
|
88410
|
+
_context3.next = 64;
|
|
88338
88411
|
break;
|
|
88339
88412
|
}
|
|
88340
|
-
|
|
88341
|
-
|
|
88413
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_43__/* ["default"] */ .Z.destroy();
|
|
88414
|
+
ant_design_vue_es_message__WEBPACK_IMPORTED_MODULE_43__/* ["default"] */ .Z.warn("不允许直接删除签名!");
|
|
88342
88415
|
this._isError = true;
|
|
88343
|
-
return
|
|
88416
|
+
return _context3.abrupt("return");
|
|
88344
88417
|
case 64:
|
|
88345
88418
|
n++;
|
|
88346
|
-
|
|
88419
|
+
_context3.next = 31;
|
|
88347
88420
|
break;
|
|
88348
88421
|
case 67:
|
|
88349
88422
|
if (nodes.length === 1 && nodes[0] instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_25__/* .TextInputFieldNode */ .re && !nodes[0].isAllowDelete && nodes[0].childNodes[1] instanceof _dom_treeNode_MarkNode__WEBPACK_IMPORTED_MODULE_26__/* .MarkNode */ .j) {
|
|
@@ -88352,7 +88425,7 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
88352
88425
|
case 68:
|
|
88353
88426
|
pnode = (_currRange$npEnd$node = currRange.npEnd.node) === null || _currRange$npEnd$node === void 0 ? void 0 : _currRange$npEnd$node.parentNode;
|
|
88354
88427
|
if (!(pnode && pnode instanceof _dom_treeNode_TextInputFieldNode__WEBPACK_IMPORTED_MODULE_25__/* .TextInputFieldNode */ .re && currRange.npEnd.path != hoEditorFactory.docTree.getNodeLastPath(pnode))) {
|
|
88355
|
-
|
|
88428
|
+
_context3.next = 74;
|
|
88356
88429
|
break;
|
|
88357
88430
|
}
|
|
88358
88431
|
//判断当前TextInputField是否可编辑
|
|
@@ -88364,15 +88437,15 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
88364
88437
|
// this._undo.commit();
|
|
88365
88438
|
});
|
|
88366
88439
|
if (_res[0]) {
|
|
88367
|
-
|
|
88440
|
+
_context3.next = 74;
|
|
88368
88441
|
break;
|
|
88369
88442
|
}
|
|
88370
|
-
return
|
|
88443
|
+
return _context3.abrupt("return");
|
|
88371
88444
|
case 74:
|
|
88372
88445
|
changeEvent = new _events_NodeChangeEvent__WEBPACK_IMPORTED_MODULE_19__/* .NodeChangeEvent */ .G(this._hoEditorFactoryID, _editor_dom_DocTree__WEBPACK_IMPORTED_MODULE_17__/* .DocAction */ .gk.daUndoInsert, currRange.startPath, ""); //FIXME:deleteRange函数完成后调用这个
|
|
88373
88446
|
// hoEditorFactory.docTree.deleteRange(arange.startPath, arange.endPath);
|
|
88374
88447
|
if (currRange.npStart.node && currRange.npEnd.node) {
|
|
88375
|
-
|
|
88448
|
+
_context3.next = 77;
|
|
88376
88449
|
break;
|
|
88377
88450
|
}
|
|
88378
88451
|
throw _events_Exception__WEBPACK_IMPORTED_MODULE_27__/* .Exception */ .P.NodeNotFound();
|
|
@@ -88388,12 +88461,12 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
88388
88461
|
changeEvent.oldDrawTreeLines = new _draw_SelectRange__WEBPACK_IMPORTED_MODULE_30__/* .SelectRange */ .E(this._hoEditorFactoryID).getRangeDrawTreeLines(startPath, endPath);
|
|
88389
88462
|
res = this.deleteRange(currRange.endPath, currRange.startPath);
|
|
88390
88463
|
if (!(res == 1)) {
|
|
88391
|
-
|
|
88464
|
+
_context3.next = 89;
|
|
88392
88465
|
break;
|
|
88393
88466
|
}
|
|
88394
88467
|
changeEvent.beforeChangePath = startPath;
|
|
88395
88468
|
changeEvent.afterChangePath = this._tmp.start;
|
|
88396
|
-
|
|
88469
|
+
_context3.next = 87;
|
|
88397
88470
|
return hoEditorFactory.docTree.change(changeEvent);
|
|
88398
88471
|
case 87:
|
|
88399
88472
|
cgEvent = new _events_SelectionChangeEvent__WEBPACK_IMPORTED_MODULE_23__/* .SelectionChangeEvent */ .r(hoEditorFactory.docTree.curDomRange, new _dom_DomRange__WEBPACK_IMPORTED_MODULE_20__/* .DomRange */ .a(this._hoEditorFactoryID, this._tmp.start, this._tmp.start));
|
|
@@ -88406,16 +88479,16 @@ var NodesDeleteUndoUnit = /*#__PURE__*/function () {
|
|
|
88406
88479
|
pnode = aNode.parentNode;
|
|
88407
88480
|
}
|
|
88408
88481
|
if (!(aNode && pnode)) {
|
|
88409
|
-
|
|
88482
|
+
_context3.next = 96;
|
|
88410
88483
|
break;
|
|
88411
88484
|
}
|
|
88412
|
-
|
|
88485
|
+
_context3.next = 96;
|
|
88413
88486
|
return this.ParentRepaint(pnode);
|
|
88414
88487
|
case 96:
|
|
88415
88488
|
case "end":
|
|
88416
|
-
return
|
|
88489
|
+
return _context3.stop();
|
|
88417
88490
|
}
|
|
88418
|
-
},
|
|
88491
|
+
}, _callee3, this);
|
|
88419
88492
|
}));
|
|
88420
88493
|
function doRedo() {
|
|
88421
88494
|
return _doRedo.apply(this, arguments);
|
|
@@ -166367,7 +166440,7 @@ var map = {
|
|
|
166367
166440
|
"./qrCode/QrCode.vue": 59805,
|
|
166368
166441
|
"./radioCheckBox/RadioCheckbox.vue": 22876,
|
|
166369
166442
|
"./selectDialog/SelectDialog.vue": 32497,
|
|
166370
|
-
"./sign/Sign.vue":
|
|
166443
|
+
"./sign/Sign.vue": 8494,
|
|
166371
166444
|
"./table/TableCellPoper.vue": 97628,
|
|
166372
166445
|
"./table/TableCellPoper1.vue": 44645,
|
|
166373
166446
|
"./table/TableCellProperty.vue": 63689,
|
|
@@ -207008,7 +207081,7 @@ var TextNode = __webpack_require__(27198);
|
|
|
207008
207081
|
// EXTERNAL MODULE: ./src/editor/dom/treeNode/ParagraphNode.ts
|
|
207009
207082
|
var ParagraphNode = __webpack_require__(67945);
|
|
207010
207083
|
;// CONCATENATED MODULE: ./src/components/version.ts
|
|
207011
|
-
/* harmony default export */ var version = ('3.1.
|
|
207084
|
+
/* harmony default export */ var version = ('3.1.78');
|
|
207012
207085
|
// EXTERNAL MODULE: ./src/components/controls/poperTipText/PoperTipText.vue + 5 modules
|
|
207013
207086
|
var PoperTipText = __webpack_require__(50987);
|
|
207014
207087
|
;// CONCATENATED MODULE: ./src/components/controls/poperTipText/index.ts
|
|
@@ -213729,6 +213802,9 @@ var TOHTMLConverter = /*#__PURE__*/function () {
|
|
|
213729
213802
|
this.convert.set(BaseNode/* NodeType */.Jq[BaseNode/* NodeType */.Jq.ntLabel], function (val) {
|
|
213730
213803
|
return _this.TransText(val);
|
|
213731
213804
|
});
|
|
213805
|
+
this.convert.set(BaseNode/* NodeType */.Jq[BaseNode/* NodeType */.Jq.ntSign], function (val) {
|
|
213806
|
+
return _this.TransText(val);
|
|
213807
|
+
});
|
|
213732
213808
|
// this.convert.set(NodeType[NodeType.ntControl], (val: Record<string, any>) => {
|
|
213733
213809
|
// return this.TransText(val);
|
|
213734
213810
|
// });
|
|
@@ -213852,6 +213928,14 @@ var TOHTMLConverter = /*#__PURE__*/function () {
|
|
|
213852
213928
|
if (jnode.nodeType == BaseNode/* NodeType */.Jq[BaseNode/* NodeType */.Jq.ntControl]) {
|
|
213853
213929
|
str += jnode.text;
|
|
213854
213930
|
}
|
|
213931
|
+
if (jnode.nodeType == BaseNode/* NodeType */.Jq[BaseNode/* NodeType */.Jq.ntSign]) {
|
|
213932
|
+
if (jnode.type == "2") {
|
|
213933
|
+
str += jnode.imgSrc;
|
|
213934
|
+
}
|
|
213935
|
+
if (jnode.type == "1") {
|
|
213936
|
+
return this.TransImg(jnode);
|
|
213937
|
+
}
|
|
213938
|
+
}
|
|
213855
213939
|
return "<span style=\"".concat(style, "\">").concat(str, "</span>");
|
|
213856
213940
|
}
|
|
213857
213941
|
}, {
|
|
@@ -213864,9 +213948,15 @@ var TOHTMLConverter = /*#__PURE__*/function () {
|
|
|
213864
213948
|
}, {
|
|
213865
213949
|
key: "TransImg",
|
|
213866
213950
|
value: function TransImg(jnode) {
|
|
213867
|
-
var style =
|
|
213868
|
-
|
|
213869
|
-
|
|
213951
|
+
var style = "";
|
|
213952
|
+
if (jnode.nodeType == "ntSign") {
|
|
213953
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
213954
|
+
style = "height:" + hoEditorFactory.signHeight + "px;";
|
|
213955
|
+
} else {
|
|
213956
|
+
style = this.ToHTMLStyle(jnode);
|
|
213957
|
+
}
|
|
213958
|
+
var img = jnode.imageDataBase64String || jnode.imgSrc;
|
|
213959
|
+
return "<img id=\"".concat(jnode.id ? jnode.id : jnode.dataId, "\" style=\"").concat(style, "\" src=\"").concat(img, "\"/>");
|
|
213870
213960
|
}
|
|
213871
213961
|
}, {
|
|
213872
213962
|
key: "TransPara",
|
|
@@ -213931,7 +214021,7 @@ var TOHTMLConverter = /*#__PURE__*/function () {
|
|
|
213931
214021
|
var content = "";
|
|
213932
214022
|
for (var n = 0; n < jnode.childNodes.item.length; n++) {
|
|
213933
214023
|
//这里只分析Cell
|
|
213934
|
-
|
|
214024
|
+
//console.log(n);
|
|
213935
214025
|
var item = this.iterator.next();
|
|
213936
214026
|
if (item.done) break;
|
|
213937
214027
|
item.value["style"] = jnode.colInfos.item[n];
|
|
@@ -213964,7 +214054,7 @@ var TOHTMLConverter = /*#__PURE__*/function () {
|
|
|
213964
214054
|
if (node['nodeType'] == 'ntRow') {
|
|
213965
214055
|
//TODO:row属性CSS
|
|
213966
214056
|
rtnText += "margin: 0;";
|
|
213967
|
-
var hp = style['rowHeight'] ? "height:".concat(style.rowHeight, "
|
|
214057
|
+
var hp = style['rowHeight'] ? "height:".concat(style.rowHeight, "pt;") : '';
|
|
213968
214058
|
if (style['rowProperty']) {
|
|
213969
214059
|
hp = style.rowProperty['rowHeight'] && style.rowProperty['rowHeight'] != 0 ? "height:".concat(style.rowProperty.rowHeight, "cm;") : hp;
|
|
213970
214060
|
}
|
|
@@ -213972,7 +214062,7 @@ var TOHTMLConverter = /*#__PURE__*/function () {
|
|
|
213972
214062
|
} else if (node['nodeType'] == BaseNode/* NodeType */.Jq[BaseNode/* NodeType */.Jq.ntCell]) {
|
|
213973
214063
|
//TODO:col属性CSS
|
|
213974
214064
|
rtnText += "margin: 0;";
|
|
213975
|
-
rtnText += style['colWidth'] ? "width:".concat(style.colWidth, "
|
|
214065
|
+
rtnText += style['colWidth'] ? "width:".concat(style.colWidth, "pt;") : '';
|
|
213976
214066
|
if (style['crossLineType']) {
|
|
213977
214067
|
switch (style.crossLineType) {
|
|
213978
214068
|
case CellNode/* CrossLineType */.v[CellNode/* CrossLineType */.v.ct02]:
|
|
@@ -214011,19 +214101,27 @@ var TOHTMLConverter = /*#__PURE__*/function () {
|
|
|
214011
214101
|
rtnText += "margin-top:".concat(topMarginPx, "px;");
|
|
214012
214102
|
rtnText += "margin-bottom:".concat(bottomMarginPx, "px;");
|
|
214013
214103
|
}
|
|
214104
|
+
var unit = 'pt';
|
|
214105
|
+
if (node['nodeType'] == BaseNode/* NodeType */.Jq[BaseNode/* NodeType */.Jq.ntImage]) {
|
|
214106
|
+
unit = 'px';
|
|
214107
|
+
}
|
|
214014
214108
|
if (node["width"]) {
|
|
214015
|
-
rtnText += "width:".concat(node.width, "
|
|
214109
|
+
rtnText += "width:".concat(node.width).concat(unit, ";");
|
|
214016
214110
|
}
|
|
214017
214111
|
if (node["height"]) {
|
|
214018
|
-
rtnText += "height:".concat(node.height, "
|
|
214112
|
+
rtnText += "height:".concat(node.height).concat(unit, ";");
|
|
214019
214113
|
}
|
|
214020
214114
|
} else {
|
|
214021
214115
|
//其他什么只要是需要放到属性里都放这
|
|
214116
|
+
var _unit = 'pt';
|
|
214117
|
+
if (node['nodeType'] == BaseNode/* NodeType */.Jq[BaseNode/* NodeType */.Jq.ntImage]) {
|
|
214118
|
+
_unit = 'px';
|
|
214119
|
+
}
|
|
214022
214120
|
if (node["width"]) {
|
|
214023
|
-
rtnText += "width:".concat(node.width, "
|
|
214121
|
+
rtnText += "width:".concat(node.width).concat(_unit, ";");
|
|
214024
214122
|
}
|
|
214025
214123
|
if (node["height"]) {
|
|
214026
|
-
rtnText += "height:".concat(node.height, "
|
|
214124
|
+
rtnText += "height:".concat(node.height).concat(_unit, ";");
|
|
214027
214125
|
}
|
|
214028
214126
|
if (node['nodeType'] == BaseNode/* NodeType */.Jq[BaseNode/* NodeType */.Jq.ntTable]) {
|
|
214029
214127
|
rtnText += 'border-collapse: collapse;';
|
|
@@ -214037,7 +214135,7 @@ var TOHTMLConverter = /*#__PURE__*/function () {
|
|
|
214037
214135
|
key: "CombineStyleToHTMLStyle",
|
|
214038
214136
|
value: function CombineStyleToHTMLStyle(val) {
|
|
214039
214137
|
var spanText = "";
|
|
214040
|
-
spanText += "font-size:" + val.size + "
|
|
214138
|
+
spanText += "font-size:" + val.size + "pt;";
|
|
214041
214139
|
spanText += "font-family:" + val.font + ";";
|
|
214042
214140
|
spanText += val.bold ? "font-weight:bold;" : "";
|
|
214043
214141
|
spanText += val.italic ? "font-style:italic;" : "";
|
|
@@ -220724,19 +220822,18 @@ var VueController = /*#__PURE__*/function () {
|
|
|
220724
220822
|
hoEditorFactory.docTree.curDomRange = newRange;
|
|
220725
220823
|
hoEditorFactory.drawTree.moveCaretToPath(curDomRange.startPath);
|
|
220726
220824
|
}
|
|
220727
|
-
/**
|
|
220728
|
-
* 查询光标所在位置之前的文本内容
|
|
220729
|
-
*/
|
|
220730
220825
|
}, {
|
|
220731
|
-
key: "
|
|
220732
|
-
value: function
|
|
220733
|
-
|
|
220734
|
-
|
|
220735
|
-
|
|
220826
|
+
key: "getCaretPreviousNode",
|
|
220827
|
+
value: function getCaretPreviousNode(node) {
|
|
220828
|
+
if (!node) {
|
|
220829
|
+
return "";
|
|
220830
|
+
}
|
|
220736
220831
|
var text = '';
|
|
220737
220832
|
var getText = function getText(previousNode) {
|
|
220738
220833
|
if (previousNode instanceof TextNode/* TextNode */.R || previousNode instanceof LabelNode/* LabelNode */.P || previousNode instanceof DownListNode/* DownListNode */.yF) {
|
|
220739
220834
|
return previousNode.text;
|
|
220835
|
+
} else if (node instanceof MarkNode/* MarkNode */.j) {
|
|
220836
|
+
return "";
|
|
220740
220837
|
} else if ((previousNode === null || previousNode === void 0 ? void 0 : previousNode.parentNode) instanceof TextInputFieldNode/* TextInputFieldNode */.re && (previousNode === null || previousNode === void 0 ? void 0 : previousNode.parentNode.inputFieldType) === TextInputFieldNode/* InputFieldType */.Zi.dropDownList) {
|
|
220741
220838
|
return previousNode === null || previousNode === void 0 ? void 0 : previousNode.parentNode.text;
|
|
220742
220839
|
}
|
|
@@ -220748,16 +220845,17 @@ var VueController = /*#__PURE__*/function () {
|
|
|
220748
220845
|
text = getText(node.previousLeaf());
|
|
220749
220846
|
}
|
|
220750
220847
|
} else if (node instanceof SignNode/* SignNode */.N && node.type !== 3 || node instanceof ParagraphNode/* ParagraphNode */.C) {
|
|
220751
|
-
text =
|
|
220848
|
+
text = "";
|
|
220752
220849
|
} else if (node instanceof LabelNode/* LabelNode */.P) {
|
|
220753
220850
|
text = node.text;
|
|
220851
|
+
} else if (node instanceof MarkNode/* MarkNode */.j) {
|
|
220852
|
+
text = "";
|
|
220754
220853
|
} else if ((node === null || node === void 0 ? void 0 : node.parentNode) instanceof TextInputFieldNode/* TextInputFieldNode */.re) {
|
|
220755
|
-
text =
|
|
220854
|
+
text = node.text;
|
|
220756
220855
|
if (!text) {
|
|
220757
|
-
text = getText(node.previousLeaf());
|
|
220856
|
+
text = getText(node.parentNode.previousLeaf());
|
|
220758
220857
|
}
|
|
220759
|
-
}
|
|
220760
|
-
if (!text && (node === null || node === void 0 ? void 0 : node.parentNode) instanceof CellNode/* CellNode */.D) {
|
|
220858
|
+
} else if (!text && (node === null || node === void 0 ? void 0 : node.parentNode) instanceof CellNode/* CellNode */.D) {
|
|
220761
220859
|
var cellNode = node === null || node === void 0 ? void 0 : node.parentNode;
|
|
220762
220860
|
var colNo = cellNode.row.indexOf(cellNode);
|
|
220763
220861
|
if (colNo != 0) {
|
|
@@ -220775,9 +220873,41 @@ var VueController = /*#__PURE__*/function () {
|
|
|
220775
220873
|
}
|
|
220776
220874
|
}
|
|
220777
220875
|
}
|
|
220778
|
-
|
|
220779
|
-
|
|
220780
|
-
|
|
220876
|
+
if (text) {
|
|
220877
|
+
text = text.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
|
|
220878
|
+
if (text.length > 8) {
|
|
220879
|
+
text = text.substring(text.length - 8, text.length);
|
|
220880
|
+
}
|
|
220881
|
+
}
|
|
220882
|
+
return text;
|
|
220883
|
+
}
|
|
220884
|
+
/**
|
|
220885
|
+
* 查询光标所在位置之前的文本内容
|
|
220886
|
+
*/
|
|
220887
|
+
}, {
|
|
220888
|
+
key: "getCaretPreviousTextNode",
|
|
220889
|
+
value: function getCaretPreviousTextNode() {
|
|
220890
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
220891
|
+
var curDomRange = hoEditorFactory.docTree.curDomRange.normalize();
|
|
220892
|
+
var node = curDomRange.npEnd.node;
|
|
220893
|
+
var count = 0;
|
|
220894
|
+
var text = "";
|
|
220895
|
+
var whileText = "";
|
|
220896
|
+
while (node && text.length < 3 && count < 12) {
|
|
220897
|
+
var _node5;
|
|
220898
|
+
count++;
|
|
220899
|
+
if (node instanceof SignNode/* SignNode */.N || node instanceof MarkNode/* MarkNode */.j || node instanceof TextNode/* TextNode */.R || node instanceof LabelNode/* LabelNode */.P || node instanceof DownListNode/* DownListNode */.yF) {
|
|
220900
|
+
node = node.previousLeaf();
|
|
220901
|
+
} else if (((_node5 = node) === null || _node5 === void 0 ? void 0 : _node5.parentNode) instanceof TextInputFieldNode/* TextInputFieldNode */.re) {
|
|
220902
|
+
node = node.parentNode.previousLeaf();
|
|
220903
|
+
} else {
|
|
220904
|
+
node = node.previousLeaf();
|
|
220905
|
+
}
|
|
220906
|
+
whileText = this.getCaretPreviousNode(node);
|
|
220907
|
+
text = whileText + text;
|
|
220908
|
+
}
|
|
220909
|
+
if (text.length < 3) {
|
|
220910
|
+
console.error("\u7B7E\u540D\u5143\u7D20\u524D\u6587\u672C\u5173\u952E\u5B57\u3010".concat(text, "\u3011,\u67E5\u8BE2\u8282\u70B9\u6B21\u6570\u3010").concat(count, "\u3011"));
|
|
220781
220911
|
}
|
|
220782
220912
|
return text ? text : '';
|
|
220783
220913
|
}
|
|
@@ -220975,42 +221105,42 @@ var VueController = /*#__PURE__*/function () {
|
|
|
220975
221105
|
var downNames = [];
|
|
220976
221106
|
hoEditorFactory.docTree.curDomRange = new DomRange/* DomRange */.a(this._hoEditorFactoryID, curDomRange.startPath, curDomRange.startPath);
|
|
220977
221107
|
for (var i = 0; i < nodes.length; i++) {
|
|
220978
|
-
var
|
|
220979
|
-
if (
|
|
220980
|
-
if (fieldNames.indexOf(
|
|
220981
|
-
fieldNames.push(
|
|
220982
|
-
var sameNameEles = this.getNodesByName('all', true,
|
|
221108
|
+
var _node6 = nodes[i];
|
|
221109
|
+
if (_node6 instanceof TextInputFieldNode/* TextInputFieldNode */.re) {
|
|
221110
|
+
if (fieldNames.indexOf(_node6.name) === -1) {
|
|
221111
|
+
fieldNames.push(_node6.name);
|
|
221112
|
+
var sameNameEles = this.getNodesByName('all', true, _node6.name);
|
|
220983
221113
|
for (var j = 0; j < sameNameEles.length; j++) {
|
|
220984
221114
|
var ele = sameNameEles[j];
|
|
220985
221115
|
if (nodes.indexOf(ele) >= 0) continue;
|
|
220986
221116
|
if (ele instanceof TextInputFieldNode/* TextInputFieldNode */.re) {
|
|
220987
|
-
ele.setFieldText(
|
|
221117
|
+
ele.setFieldText(_node6.text);
|
|
220988
221118
|
}
|
|
220989
221119
|
}
|
|
220990
221120
|
}
|
|
220991
221121
|
}
|
|
220992
|
-
if (
|
|
220993
|
-
if (dateNames.indexOf(
|
|
220994
|
-
dateNames.push(
|
|
220995
|
-
var _sameNameEles = this.getNodesByName('all', true,
|
|
221122
|
+
if (_node6 instanceof DateTimeNode/* DateTimeNode */.Z) {
|
|
221123
|
+
if (dateNames.indexOf(_node6.name) === -1) {
|
|
221124
|
+
dateNames.push(_node6.name);
|
|
221125
|
+
var _sameNameEles = this.getNodesByName('all', true, _node6.name);
|
|
220996
221126
|
for (var _j = 0; _j < _sameNameEles.length; _j++) {
|
|
220997
221127
|
var _ele = _sameNameEles[_j];
|
|
220998
221128
|
if (nodes.indexOf(_ele) >= 0) continue;
|
|
220999
221129
|
if (_ele instanceof DateTimeNode/* DateTimeNode */.Z) {
|
|
221000
|
-
_ele.setDateTimeText(
|
|
221130
|
+
_ele.setDateTimeText(_node6.text);
|
|
221001
221131
|
}
|
|
221002
221132
|
}
|
|
221003
221133
|
}
|
|
221004
221134
|
}
|
|
221005
|
-
if (
|
|
221006
|
-
if (downNames.indexOf(
|
|
221007
|
-
downNames.push(
|
|
221008
|
-
var _sameNameEles2 = this.getNodesByName('all', true,
|
|
221135
|
+
if (_node6 instanceof DownListNode/* DownListNode */.yF) {
|
|
221136
|
+
if (downNames.indexOf(_node6.name) === -1) {
|
|
221137
|
+
downNames.push(_node6.name);
|
|
221138
|
+
var _sameNameEles2 = this.getNodesByName('all', true, _node6.name);
|
|
221009
221139
|
for (var _j2 = 0; _j2 < _sameNameEles2.length; _j2++) {
|
|
221010
221140
|
var _ele2 = _sameNameEles2[_j2];
|
|
221011
221141
|
if (nodes.indexOf(_ele2) >= 0) continue;
|
|
221012
221142
|
if (_ele2 instanceof DownListNode/* DownListNode */.yF) {
|
|
221013
|
-
_ele2.setDownListText(
|
|
221143
|
+
_ele2.setDownListText(_node6.text);
|
|
221014
221144
|
}
|
|
221015
221145
|
}
|
|
221016
221146
|
}
|
|
@@ -221141,29 +221271,29 @@ var VueController = /*#__PURE__*/function () {
|
|
|
221141
221271
|
var hasEmptyDoctorSign = false;
|
|
221142
221272
|
var getAllNodes = function getAllNodes(nodes) {
|
|
221143
221273
|
for (var i = 0; i < nodes.length; i++) {
|
|
221144
|
-
var
|
|
221145
|
-
if (
|
|
221274
|
+
var _node7 = nodes[i];
|
|
221275
|
+
if (_node7 instanceof SignNode/* SignNode */.N) {
|
|
221146
221276
|
// 有值的患者签名
|
|
221147
|
-
if (attribute == 1 &&
|
|
221277
|
+
if (attribute == 1 && _node7.attribute === 1) {
|
|
221148
221278
|
patientSignCount++;
|
|
221149
221279
|
}
|
|
221150
|
-
if (attribute == 1 &&
|
|
221280
|
+
if (attribute == 1 && _node7.attribute === 1 && (_node7.imgSrc !== '' || _node7.fingerPrintSrc !== '')) {
|
|
221151
221281
|
hasEmptyPatientSign = true;
|
|
221152
221282
|
break;
|
|
221153
221283
|
}
|
|
221154
221284
|
// 空的医生签名
|
|
221155
|
-
if (attribute != 1 &&
|
|
221285
|
+
if (attribute != 1 && _node7.attribute != 1 && _node7.imgSrc === '') {
|
|
221156
221286
|
hasEmptyDoctorSign = true;
|
|
221157
221287
|
break;
|
|
221158
221288
|
}
|
|
221159
221289
|
}
|
|
221160
|
-
if (
|
|
221290
|
+
if (_node7 instanceof BaseCombineNode/* BaseCombineNode */.V && attribute === 1 && hasEmptyPatientSign) {
|
|
221161
221291
|
// 患者签名已存在的情况不在深层调用深层遍历
|
|
221162
|
-
getAllNodes(
|
|
221292
|
+
getAllNodes(_node7.childNodes);
|
|
221163
221293
|
}
|
|
221164
|
-
if (
|
|
221294
|
+
if (_node7 instanceof BaseCombineNode/* BaseCombineNode */.V && attribute != 1 && !hasEmptyDoctorSign) {
|
|
221165
221295
|
// 医生签名不存在的情况不在深层调用深层遍历
|
|
221166
|
-
getAllNodes(
|
|
221296
|
+
getAllNodes(_node7.childNodes);
|
|
221167
221297
|
}
|
|
221168
221298
|
}
|
|
221169
221299
|
};
|
|
@@ -221379,28 +221509,28 @@ var VueController = /*#__PURE__*/function () {
|
|
|
221379
221509
|
var signList = [];
|
|
221380
221510
|
var getAllNodes = function getAllNodes(nodes) {
|
|
221381
221511
|
for (var i = 0; i < nodes.length; i++) {
|
|
221382
|
-
var
|
|
221383
|
-
if (
|
|
221512
|
+
var _node8 = nodes[i];
|
|
221513
|
+
if (_node8 instanceof SignNode/* SignNode */.N) {
|
|
221384
221514
|
// 空的医生签名
|
|
221385
|
-
if (
|
|
221515
|
+
if (_node8.attribute != 1) {
|
|
221386
221516
|
var sign = {
|
|
221387
221517
|
type: 'sign',
|
|
221388
221518
|
signed: false,
|
|
221389
|
-
isTemplate:
|
|
221390
|
-
number:
|
|
221391
|
-
isVerify:
|
|
221392
|
-
customProperty:
|
|
221519
|
+
isTemplate: _node8.isTemplate,
|
|
221520
|
+
number: _node8.number,
|
|
221521
|
+
isVerify: _node8.otherProperties && _node8.otherProperties.isVerify ? true : false,
|
|
221522
|
+
customProperty: _node8.customProperty,
|
|
221393
221523
|
previousText: '',
|
|
221394
|
-
dataId:
|
|
221395
|
-
name:
|
|
221524
|
+
dataId: _node8.dataId,
|
|
221525
|
+
name: _node8.name
|
|
221396
221526
|
};
|
|
221397
|
-
sign.previousText = _this8.getPreviousText(
|
|
221527
|
+
sign.previousText = _this8.getPreviousText(_node8);
|
|
221398
221528
|
signList.push(sign);
|
|
221399
221529
|
}
|
|
221400
221530
|
}
|
|
221401
|
-
if (
|
|
221531
|
+
if (_node8 instanceof BaseCombineNode/* BaseCombineNode */.V) {
|
|
221402
221532
|
// 医生签名不存在的情况不在深层调用深层遍历
|
|
221403
|
-
getAllNodes(
|
|
221533
|
+
getAllNodes(_node8.childNodes);
|
|
221404
221534
|
}
|
|
221405
221535
|
}
|
|
221406
221536
|
};
|
|
@@ -221418,23 +221548,23 @@ var VueController = /*#__PURE__*/function () {
|
|
|
221418
221548
|
var arr = [];
|
|
221419
221549
|
var getAllNodes = function getAllNodes(nodes) {
|
|
221420
221550
|
for (var i = 0; i < nodes.length; i++) {
|
|
221421
|
-
var
|
|
221422
|
-
if (
|
|
221551
|
+
var _node9 = nodes[i];
|
|
221552
|
+
if (_node9 instanceof SignNode/* SignNode */.N) {
|
|
221423
221553
|
// 空的医生签名
|
|
221424
221554
|
// if (node.attribute != 1) {
|
|
221425
221555
|
var sign = {
|
|
221426
221556
|
type: 'sign',
|
|
221427
221557
|
signed: false,
|
|
221428
|
-
isTemplate:
|
|
221429
|
-
number:
|
|
221430
|
-
isVerify:
|
|
221431
|
-
customProperty:
|
|
221558
|
+
isTemplate: _node9.isTemplate,
|
|
221559
|
+
number: _node9.number,
|
|
221560
|
+
isVerify: _node9.otherProperties && _node9.otherProperties.isVerify ? true : false,
|
|
221561
|
+
customProperty: _node9.customProperty,
|
|
221432
221562
|
previousText: '',
|
|
221433
|
-
dataId:
|
|
221434
|
-
name:
|
|
221435
|
-
node:
|
|
221563
|
+
dataId: _node9.dataId,
|
|
221564
|
+
name: _node9.name,
|
|
221565
|
+
node: _node9
|
|
221436
221566
|
};
|
|
221437
|
-
sign.previousText = _this9.getPreviousText(
|
|
221567
|
+
sign.previousText = _this9.getPreviousText(_node9);
|
|
221438
221568
|
if (sign.number == 0 || sign.number == 1) {
|
|
221439
221569
|
if (arr.length > 0) {
|
|
221440
221570
|
signList.push(arr);
|
|
@@ -221448,9 +221578,9 @@ var VueController = /*#__PURE__*/function () {
|
|
|
221448
221578
|
// }
|
|
221449
221579
|
}
|
|
221450
221580
|
|
|
221451
|
-
if (
|
|
221581
|
+
if (_node9 instanceof BaseCombineNode/* BaseCombineNode */.V) {
|
|
221452
221582
|
// 医生签名不存在的情况不在深层调用深层遍历
|
|
221453
|
-
getAllNodes(
|
|
221583
|
+
getAllNodes(_node9.childNodes);
|
|
221454
221584
|
}
|
|
221455
221585
|
}
|
|
221456
221586
|
};
|
|
@@ -221482,15 +221612,15 @@ var VueController = /*#__PURE__*/function () {
|
|
|
221482
221612
|
var isHasDoctorSign = false;
|
|
221483
221613
|
var getAllNodes = function getAllNodes(nodes) {
|
|
221484
221614
|
for (var i = 0; i < nodes.length; i++) {
|
|
221485
|
-
var
|
|
221486
|
-
if (
|
|
221615
|
+
var _node10 = nodes[i];
|
|
221616
|
+
if (_node10 instanceof SignNode/* SignNode */.N && _node10.type !== 3 && _node10.imgSrc) {
|
|
221487
221617
|
isHasDoctorSign = true;
|
|
221488
221618
|
break; // 医生签名已存在的情况中断当前层的遍历
|
|
221489
221619
|
}
|
|
221490
221620
|
|
|
221491
|
-
if (
|
|
221621
|
+
if (_node10 instanceof BaseCombineNode/* BaseCombineNode */.V && !isHasDoctorSign) {
|
|
221492
221622
|
// 医生签名已存在的情况不在深层调用深层遍历
|
|
221493
|
-
getAllNodes(
|
|
221623
|
+
getAllNodes(_node10.childNodes);
|
|
221494
221624
|
}
|
|
221495
221625
|
}
|
|
221496
221626
|
};
|
|
@@ -221945,9 +222075,9 @@ var VueController = /*#__PURE__*/function () {
|
|
|
221945
222075
|
var xmlRoot = '<?xml version="1.0" encoding="utf-8"?>';
|
|
221946
222076
|
var doc2XmlJson = function doc2XmlJson(nodes) {
|
|
221947
222077
|
for (var _i9 = 0; _i9 < nodes.length; _i9++) {
|
|
221948
|
-
var
|
|
221949
|
-
if (
|
|
221950
|
-
var nodeJson = node2Json(
|
|
222078
|
+
var _node11 = nodes[_i9];
|
|
222079
|
+
if (_node11 instanceof TextNode/* TextNode */.R || _node11 instanceof ParagraphNode/* ParagraphNode */.C || _node11 instanceof TableNode/* TableNode */.Fh || _node11 instanceof ImageNode/* ImageNode */.H) {
|
|
222080
|
+
var nodeJson = node2Json(_node11);
|
|
221951
222081
|
xmlRoot += x2js.js2xml(nodeJson);
|
|
221952
222082
|
}
|
|
221953
222083
|
}
|
|
@@ -222175,9 +222305,9 @@ var VueController = /*#__PURE__*/function () {
|
|
|
222175
222305
|
paragraphRecordId: recordId
|
|
222176
222306
|
});
|
|
222177
222307
|
}
|
|
222178
|
-
var
|
|
222179
|
-
if (
|
|
222180
|
-
nodes.push(
|
|
222308
|
+
var _node12 = hoEditorFactory.structureConvert.convertNode(temp, hoEditorFactory.docTree.mainNodes, null);
|
|
222309
|
+
if (_node12) {
|
|
222310
|
+
nodes.push(_node12);
|
|
222181
222311
|
}
|
|
222182
222312
|
}
|
|
222183
222313
|
if (nodes.length > 0) {
|
|
@@ -222277,12 +222407,12 @@ var VueController = /*#__PURE__*/function () {
|
|
|
222277
222407
|
var ret = [];
|
|
222278
222408
|
var getAllNodes = function getAllNodes(nodes) {
|
|
222279
222409
|
for (var i = 0; i < nodes.length; i++) {
|
|
222280
|
-
var
|
|
222281
|
-
if (
|
|
222282
|
-
ret.push(
|
|
222410
|
+
var _node13 = nodes[i];
|
|
222411
|
+
if (_node13 instanceof QrcodeNode/* QrcodeNode */.d) {
|
|
222412
|
+
ret.push(_node13);
|
|
222283
222413
|
}
|
|
222284
|
-
if (
|
|
222285
|
-
getAllNodes(
|
|
222414
|
+
if (_node13 instanceof BaseCombineNode/* BaseCombineNode */.V) {
|
|
222415
|
+
getAllNodes(_node13.childNodes);
|
|
222286
222416
|
}
|
|
222287
222417
|
}
|
|
222288
222418
|
};
|
|
@@ -222314,12 +222444,12 @@ var VueController = /*#__PURE__*/function () {
|
|
|
222314
222444
|
var ret = [];
|
|
222315
222445
|
var getAllNodes = function getAllNodes(nodes) {
|
|
222316
222446
|
for (var i = 0; i < nodes.length; i++) {
|
|
222317
|
-
var
|
|
222318
|
-
if (
|
|
222319
|
-
ret.push(
|
|
222447
|
+
var _node14 = nodes[i];
|
|
222448
|
+
if (_node14 instanceof QrcodeNode/* QrcodeNode */.d) {
|
|
222449
|
+
ret.push(_node14);
|
|
222320
222450
|
}
|
|
222321
|
-
if (
|
|
222322
|
-
getAllNodes(
|
|
222451
|
+
if (_node14 instanceof BaseCombineNode/* BaseCombineNode */.V) {
|
|
222452
|
+
getAllNodes(_node14.childNodes);
|
|
222323
222453
|
}
|
|
222324
222454
|
}
|
|
222325
222455
|
};
|
|
@@ -222661,11 +222791,11 @@ var VueController = /*#__PURE__*/function () {
|
|
|
222661
222791
|
var table = null;
|
|
222662
222792
|
var i = 0;
|
|
222663
222793
|
for (var k = 0; k < hoEditorFactory.docTree.mainNodes.length; k++) {
|
|
222664
|
-
var
|
|
222665
|
-
if (
|
|
222794
|
+
var _node15 = hoEditorFactory.docTree.mainNodes[k];
|
|
222795
|
+
if (_node15 instanceof TableNode/* TableNode */.Fh) {
|
|
222666
222796
|
i++;
|
|
222667
222797
|
if (i === index) {
|
|
222668
|
-
table =
|
|
222798
|
+
table = _node15;
|
|
222669
222799
|
break;
|
|
222670
222800
|
}
|
|
222671
222801
|
}
|
|
@@ -222826,18 +222956,36 @@ var VueController = /*#__PURE__*/function () {
|
|
|
222826
222956
|
downLists: value[1].downLists
|
|
222827
222957
|
});
|
|
222828
222958
|
}
|
|
222829
|
-
|
|
222830
|
-
|
|
222831
|
-
|
|
222832
|
-
|
|
222833
|
-
|
|
222834
|
-
|
|
222835
|
-
|
|
222959
|
+
if (value[1].nodeTypes == 'sign') {
|
|
222960
|
+
var _node16 = _this13.getNodeByDataID('main', key.replace('|', ''));
|
|
222961
|
+
if (_node16 instanceof SignNode/* SignNode */.N) {
|
|
222962
|
+
var signJsons = _node16.node2Json();
|
|
222963
|
+
var signXml = x2js.js2xml(signJsons);
|
|
222964
|
+
obj = {
|
|
222965
|
+
"type": value[0],
|
|
222966
|
+
"id": '',
|
|
222967
|
+
"dataid": key.split("|")[1],
|
|
222968
|
+
"record": {
|
|
222969
|
+
nodeTypes: 'sign',
|
|
222970
|
+
content: signXml
|
|
222971
|
+
}
|
|
222972
|
+
};
|
|
222973
|
+
recordArr.push(obj);
|
|
222974
|
+
}
|
|
222975
|
+
} else {
|
|
222976
|
+
obj = {
|
|
222977
|
+
"type": value[0],
|
|
222978
|
+
"id": key.split("|")[0],
|
|
222979
|
+
"dataid": key.split("|")[1],
|
|
222980
|
+
"record": value[1]
|
|
222981
|
+
};
|
|
222982
|
+
recordArr.push(obj);
|
|
222983
|
+
}
|
|
222836
222984
|
}
|
|
222837
222985
|
}
|
|
222838
222986
|
} else {
|
|
222839
222987
|
var id = key.split("|")[0];
|
|
222840
|
-
var
|
|
222988
|
+
var _node17 = _this13.getNodeByID('all', id);
|
|
222841
222989
|
}
|
|
222842
222990
|
});
|
|
222843
222991
|
return recordArr;
|
|
@@ -222885,6 +223033,32 @@ var VueController = /*#__PURE__*/function () {
|
|
|
222885
223033
|
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
222886
223034
|
return hoEditorFactory.docTree.mainNodes;
|
|
222887
223035
|
}
|
|
223036
|
+
}, {
|
|
223037
|
+
key: "getFileHtml",
|
|
223038
|
+
value: function getFileHtml() {
|
|
223039
|
+
var hoEditorFactory = HOEditorFactorys/* HOEditorFactorys */.b.instance().getFactory(this._hoEditorFactoryID);
|
|
223040
|
+
var firstHead = hoEditorFactory.subDocManger.getHeaderPageNodes()[0];
|
|
223041
|
+
var headerEnd = hoEditorFactory.docTree.getNodeLastPath(firstHead[firstHead.length - 1]);
|
|
223042
|
+
var headerRange = new DomRange/* DomRange */.a(this._hoEditorFactoryID, 'header/0/0', headerEnd);
|
|
223043
|
+
hoEditorFactory.structureNode.Copy(headerRange, null);
|
|
223044
|
+
var headHtml = hoEditorFactory.structureNode.htmldata;
|
|
223045
|
+
var mainNodes = hoEditorFactory.docTree.mainNodes;
|
|
223046
|
+
var mainEnd = hoEditorFactory.docTree.getNodeLastPath(mainNodes[mainNodes.length - 1]);
|
|
223047
|
+
var mainRange = new DomRange/* DomRange */.a(this._hoEditorFactoryID, 'main/0', mainEnd);
|
|
223048
|
+
hoEditorFactory.structureNode.Copy(mainRange, null);
|
|
223049
|
+
var mainHtml = hoEditorFactory.structureNode.htmldata;
|
|
223050
|
+
var padding = "".concat(hoEditorFactory.pageProperty.headerYPixes, "px ").concat(hoEditorFactory.pageProperty.rightMarginPixes, "px ").concat(hoEditorFactory.pageProperty.bottomMarginPixes, "px ").concat(hoEditorFactory.pageProperty.leftMarginPixes, "px");
|
|
223051
|
+
var content = "";
|
|
223052
|
+
var head = headHtml.match(/<!--StartFragment-->([\s\S]*?)<!--EndFragment-->/);
|
|
223053
|
+
var main = mainHtml.match(/<!--StartFragment-->([\s\S]*?)<!--EndFragment-->/);
|
|
223054
|
+
if (head && head[1]) {
|
|
223055
|
+
content += head[1];
|
|
223056
|
+
}
|
|
223057
|
+
if (main && main[1]) {
|
|
223058
|
+
content += main[1];
|
|
223059
|
+
}
|
|
223060
|
+
return "\n <html>\n <head>\n <style>\n html, body {\n padding: 0;\n margin: 0;\n background: #f2f4f7;\n }\n #hoEmrContent {\n margin: 20px auto;\n background: #fff;\n box-shadow: 0px 2px 12px 0px #c7cacf;\n }\n </style>\n </head>\n <body>\n <div id=\"hoEmrContent\" style='width: ".concat(hoEditorFactory.pageProperty.widthPixes, "px; padding: ").concat(padding, ";'>\n ").concat(content, "\n </div>\n </body>\n </html>");
|
|
223061
|
+
}
|
|
222888
223062
|
}]);
|
|
222889
223063
|
return VueController;
|
|
222890
223064
|
}();
|
|
@@ -224024,7 +224198,7 @@ var EditController = /*#__PURE__*/function () {
|
|
|
224024
224198
|
message/* default */.Z.error("本列已完成签名,不允许修改编辑。");
|
|
224025
224199
|
return false;
|
|
224026
224200
|
}
|
|
224027
|
-
if (colProperty.editorProperty === TableProperty/* EditorProperty */.YS.OrderNumber) {
|
|
224201
|
+
if (pNode.table.tableProperty.addRowByOrder && colProperty.editorProperty === TableProperty/* EditorProperty */.YS.OrderNumber) {
|
|
224028
224202
|
message/* default */.Z.destroy();
|
|
224029
224203
|
message/* default */.Z.error("不允许编辑该列");
|
|
224030
224204
|
return false;
|
|
@@ -229150,7 +229324,7 @@ if(bch>>8){/* something left after dividing by 256 second time */throw new Error
|
|
|
229150
229324
|
*/return to8bitStream(text,flags).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)");};var beginPage=API.__private__.beginPage=function(format){pages[++page]=[];pagesContext[page]={objId:0,contentsObjId:0,userUnit:Number(userUnit),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(format[0]),topRightY:Number(format[1])}};_setPage(page);setOutputDestination(pages[currentPage]);};var _addPage=function _addPage(parmFormat,parmOrientation){var dimensions,width,height;orientation=parmOrientation||orientation;if(typeof parmFormat==="string"){dimensions=getPageFormat(parmFormat.toLowerCase());if(Array.isArray(dimensions)){width=dimensions[0];height=dimensions[1];}}if(Array.isArray(parmFormat)){width=parmFormat[0]*scaleFactor;height=parmFormat[1]*scaleFactor;}if(isNaN(width)){width=format[0];height=format[1];}if(width>14400||height>14400){jspdf_console.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400");width=Math.min(14400,width);height=Math.min(14400,height);}format=[width,height];switch(orientation.substr(0,1)){case"l":if(height>width){format=[height,width];}break;case"p":if(width>height){format=[height,width];}break;}beginPage(format);// Set line width
|
|
229151
229325
|
setLineWidth(lineWidth);// Set draw color
|
|
229152
229326
|
out(strokeColor);// resurrecting non-default line caps, joins
|
|
229153
|
-
if(lineCapID!==0){out(lineCapID+" J");}if(lineJoinID!==0){out(lineJoinID+" j");}events.publish("addPage",{pageNumber:page});};var _deletePage=function _deletePage(n){if(n>0&&n<=page){pages.splice(n,1);pagesContext.splice(n,1);page--;if(currentPage>page){currentPage=page;}jspdf_console.log(page);this.setPage(currentPage);}};var _setPage=function _setPage(n){if(n>0&&n<=page){currentPage=n;}};var getNumberOfPages=API.__private__.getNumberOfPages=API.getNumberOfPages=function(){return pages.length-1;};/**
|
|
229327
|
+
if(lineCapID!==0){out(lineCapID+" J");}if(lineJoinID!==0){out(lineJoinID+" j");}events.publish("addPage",{pageNumber:page});};var _deletePage=function _deletePage(n){if(n>0&&n<=page){pages.splice(n,1);pagesContext.splice(n,1);page--;if(currentPage>page){currentPage=page;}jspdf_console.log(page,'delete page');this.setPage(currentPage);}};var _setPage=function _setPage(n){if(n>0&&n<=page){currentPage=n;}};var getNumberOfPages=API.__private__.getNumberOfPages=API.getNumberOfPages=function(){return pages.length-1;};/**
|
|
229154
229328
|
* Returns a document-specific font key - a label assigned to a
|
|
229155
229329
|
* font name + font type combination at the time the font was added
|
|
229156
229330
|
* to the font inventory.
|
|
@@ -232035,7 +232209,9 @@ data=dataAsBinaryString||data;data=this.__addimage__.isArrayBuffer(data)?new Uin
|
|
|
232035
232209
|
var PNG=function(){var APNG_BLEND_OP_SOURCE,APNG_DISPOSE_OP_BACKGROUND,APNG_DISPOSE_OP_PREVIOUS,makeImage,scratchCanvas,scratchCtx;APNG_DISPOSE_OP_BACKGROUND=1;APNG_DISPOSE_OP_PREVIOUS=2;APNG_BLEND_OP_SOURCE=0;function PNG(data){var chunkSize,colors,palLen,delayDen,delayNum,frame,i,index,key,section,palShort,text,_i,_j,_ref;this.data=data;this.pos=8;this.palette=[];this.imgData=[];this.transparency={};this.animation=null;this.text={};frame=null;while(true){chunkSize=this.readUInt32();section=function(){var _i,_results;_results=[];for(i=_i=0;_i<4;i=++_i){_results.push(String.fromCharCode(this.data[this.pos++]));}return _results;}.call(this).join("");switch(section){case"IHDR":this.width=this.readUInt32();this.height=this.readUInt32();this.bits=this.data[this.pos++];this.colorType=this.data[this.pos++];this.compressionMethod=this.data[this.pos++];this.filterMethod=this.data[this.pos++];this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||Infinity,frames:[]};break;case"PLTE":this.palette=this.read(chunkSize);break;case"fcTL":if(frame){this.animation.frames.push(frame);}this.pos+=4;frame={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()};delayNum=this.readUInt16();delayDen=this.readUInt16()||100;frame.delay=1000*delayNum/delayDen;frame.disposeOp=this.data[this.pos++];frame.blendOp=this.data[this.pos++];frame.data=[];break;case"IDAT":case"fdAT":if(section==="fdAT"){this.pos+=4;chunkSize-=4;}data=(frame!=null?frame.data:void 0)||this.imgData;for(i=_i=0;0<=chunkSize?_i<chunkSize:_i>chunkSize;i=0<=chunkSize?++_i:--_i){data.push(this.data[this.pos++]);}break;case"tRNS":this.transparency={};switch(this.colorType){case 3:palLen=this.palette.length/3;this.transparency.indexed=this.read(chunkSize);if(this.transparency.indexed.length>palLen)throw new Error("More transparent colors than palette size");/*
|
|
232036
232210
|
* According to the PNG spec trns should be increased to the same size as palette if shorter
|
|
232037
232211
|
*/ //palShort = 255 - this.transparency.indexed.length;
|
|
232038
|
-
palShort=palLen-this.transparency.indexed.length;if(palShort>0){for(i=_j=0;0<=palShort?_j<palShort:_j>palShort;i=0<=palShort?++_j:--_j){this.transparency.indexed.push(255);}}break;case 0:this.transparency.grayscale=this.read(chunkSize)[0];break;case 2:this.transparency.rgb=this.read(chunkSize);}break;case"tEXt":text=this.read(chunkSize);index=text.indexOf(0);key=String.fromCharCode.apply(String,text.slice(0,index));this.text[key]=String.fromCharCode.apply(String,text.slice(index+1));break;case"IEND":if(frame){this.animation.frames.push(frame);}this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3;}}.call(this);this.hasAlphaChannel=(_ref=this.colorType)===4||_ref===6;colors=this.colors+(this.hasAlphaChannel?1:0);this.pixelBitlength=this.bits*colors;this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB";}}.call(this);this.imgData=new Uint8Array(this.imgData);return;default:this.pos+=chunkSize;}this.pos+=4;if(this.pos>this.data.length){throw new Error("Incomplete or corrupt PNG file");}}}PNG.prototype.read=function(bytes){var i,_i,_results;_results=[];for(i=_i=0;0<=bytes?_i<bytes:_i>bytes;i=0<=bytes?++_i:--_i){_results.push(this.data[this.pos++]);}return _results;};PNG.prototype.readUInt32=function(){var b1,b2,b3,b4;b1=this.data[this.pos++]<<24;b2=this.data[this.pos++]<<16;b3=this.data[this.pos++]<<8;b4=this.data[this.pos++];return b1|b2|b3|b4;};PNG.prototype.readUInt16=function(){var b1,b2;b1=this.data[this.pos++]<<8;b2=this.data[this.pos++];return b1|b2;};PNG.prototype.decodePixels=function(data){var pixelBytes=this.pixelBitlength/8;var fullPixels=new Uint8Array(this.width*this.height*pixelBytes);var pos=0;var _this=this;if(data==null){data=this.imgData;}if(data.length===0){return new Uint8Array(0);}data=unzlibSync(data);function pass(x0,y0,dx,dy){var abyte,c,col,i,left,length,p,pa,paeth,pb,pc,pixels,row,scanlineLength,upper,upperLeft,_i,_j,_k,_l,_m;var w=Math.ceil((_this.width-x0)/dx),h=Math.ceil((_this.height-y0)/dy);var isFull=_this.width==w&&_this.height==h;scanlineLength=pixelBytes*w;pixels=isFull?fullPixels:new Uint8Array(scanlineLength*h);length=data.length;row=0;c=0;while(row<h&&pos<length){switch(data[pos++]){case 0:for(i=_i=0;_i<scanlineLength;i=_i+=1){pixels[c++]=data[pos++];}break;case 1:for(i=_j=0;_j<scanlineLength;i=_j+=1){abyte=data[pos++];left=i<pixelBytes?0:pixels[c-pixelBytes];pixels[c++]=(abyte+left)%256;}break;case 2:for(i=_k=0;_k<scanlineLength;i=_k+=1){abyte=data[pos++];col=(i-i%pixelBytes)/pixelBytes;upper=row&&pixels[(row-1)*scanlineLength+col*pixelBytes+i%pixelBytes];pixels[c++]=(upper+abyte)%256;}break;case 3:for(i=_l=0;_l<scanlineLength;i=_l+=1){abyte=data[pos++];col=(i-i%pixelBytes)/pixelBytes;left=i<pixelBytes?0:pixels[c-pixelBytes];upper=row&&pixels[(row-1)*scanlineLength+col*pixelBytes+i%pixelBytes];pixels[c++]=(abyte+Math.floor((left+upper)/2))%256;}break;case 4:for(i=_m=0;_m<scanlineLength;i=_m+=1){abyte=data[pos++];col=(i-i%pixelBytes)/pixelBytes;left=i<pixelBytes?0:pixels[c-pixelBytes];if(row===0){upper=upperLeft=0;}else{upper=pixels[(row-1)*scanlineLength+col*pixelBytes+i%pixelBytes];upperLeft=col&&pixels[(row-1)*scanlineLength+(col-1)*pixelBytes+i%pixelBytes];}p=left+upper-upperLeft;pa=Math.abs(p-left);pb=Math.abs(p-upper);pc=Math.abs(p-upperLeft);if(pa<=pb&&pa<=pc){paeth=left;}else if(pb<=pc){paeth=upper;}else{paeth=upperLeft;}pixels[c++]=(abyte+paeth)%256;}break;default
|
|
232212
|
+
palShort=palLen-this.transparency.indexed.length;if(palShort>0){for(i=_j=0;0<=palShort?_j<palShort:_j>palShort;i=0<=palShort?++_j:--_j){this.transparency.indexed.push(255);}}break;case 0:this.transparency.grayscale=this.read(chunkSize)[0];break;case 2:this.transparency.rgb=this.read(chunkSize);}break;case"tEXt":text=this.read(chunkSize);index=text.indexOf(0);key=String.fromCharCode.apply(String,text.slice(0,index));this.text[key]=String.fromCharCode.apply(String,text.slice(index+1));break;case"IEND":if(frame){this.animation.frames.push(frame);}this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3;}}.call(this);this.hasAlphaChannel=(_ref=this.colorType)===4||_ref===6;colors=this.colors+(this.hasAlphaChannel?1:0);this.pixelBitlength=this.bits*colors;this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB";}}.call(this);this.imgData=new Uint8Array(this.imgData);return;default:this.pos+=chunkSize;}this.pos+=4;if(this.pos>this.data.length){throw new Error("Incomplete or corrupt PNG file");}}}PNG.prototype.read=function(bytes){var i,_i,_results;_results=[];for(i=_i=0;0<=bytes?_i<bytes:_i>bytes;i=0<=bytes?++_i:--_i){_results.push(this.data[this.pos++]);}return _results;};PNG.prototype.readUInt32=function(){var b1,b2,b3,b4;b1=this.data[this.pos++]<<24;b2=this.data[this.pos++]<<16;b3=this.data[this.pos++]<<8;b4=this.data[this.pos++];return b1|b2|b3|b4;};PNG.prototype.readUInt16=function(){var b1,b2;b1=this.data[this.pos++]<<8;b2=this.data[this.pos++];return b1|b2;};PNG.prototype.decodePixels=function(data){var pixelBytes=this.pixelBitlength/8;var fullPixels=new Uint8Array(this.width*this.height*pixelBytes);var pos=0;var _this=this;if(data==null){data=this.imgData;}if(data.length===0){return new Uint8Array(0);}data=unzlibSync(data);function pass(x0,y0,dx,dy){var abyte,c,col,i,left,length,p,pa,paeth,pb,pc,pixels,row,scanlineLength,upper,upperLeft,_i,_j,_k,_l,_m;var w=Math.ceil((_this.width-x0)/dx),h=Math.ceil((_this.height-y0)/dy);var isFull=_this.width==w&&_this.height==h;scanlineLength=pixelBytes*w;pixels=isFull?fullPixels:new Uint8Array(scanlineLength*h);length=data.length;row=0;c=0;while(row<h&&pos<length){switch(data[pos++]){case 0:for(i=_i=0;_i<scanlineLength;i=_i+=1){pixels[c++]=data[pos++];}break;case 1:for(i=_j=0;_j<scanlineLength;i=_j+=1){abyte=data[pos++];left=i<pixelBytes?0:pixels[c-pixelBytes];pixels[c++]=(abyte+left)%256;}break;case 2:for(i=_k=0;_k<scanlineLength;i=_k+=1){abyte=data[pos++];col=(i-i%pixelBytes)/pixelBytes;upper=row&&pixels[(row-1)*scanlineLength+col*pixelBytes+i%pixelBytes];pixels[c++]=(upper+abyte)%256;}break;case 3:for(i=_l=0;_l<scanlineLength;i=_l+=1){abyte=data[pos++];col=(i-i%pixelBytes)/pixelBytes;left=i<pixelBytes?0:pixels[c-pixelBytes];upper=row&&pixels[(row-1)*scanlineLength+col*pixelBytes+i%pixelBytes];pixels[c++]=(abyte+Math.floor((left+upper)/2))%256;}break;case 4:for(i=_m=0;_m<scanlineLength;i=_m+=1){abyte=data[pos++];col=(i-i%pixelBytes)/pixelBytes;left=i<pixelBytes?0:pixels[c-pixelBytes];if(row===0){upper=upperLeft=0;}else{upper=pixels[(row-1)*scanlineLength+col*pixelBytes+i%pixelBytes];upperLeft=col&&pixels[(row-1)*scanlineLength+(col-1)*pixelBytes+i%pixelBytes];}p=left+upper-upperLeft;pa=Math.abs(p-left);pb=Math.abs(p-upper);pc=Math.abs(p-upperLeft);if(pa<=pb&&pa<=pc){paeth=left;}else if(pb<=pc){paeth=upper;}else{paeth=upperLeft;}pixels[c++]=(abyte+paeth)%256;}break;default:// 自定义修改 忽略图片格式解析报错,仅在控制台打印警告日志
|
|
232213
|
+
jspdf_console.warn("Invalid filter algorithm: ".concat((data[pos-1],data[pos]),"--png\u683C\u5F0F\u56FE\u7247\u53EA\u5305\u542B[01234]"));// throw new Error("Invalid filter algorithm: " + data[pos - 1]);
|
|
232214
|
+
}if(!isFull){var fullPos=((y0+row*dy)*_this.width+x0)*pixelBytes;var partPos=row*scanlineLength;for(i=0;i<w;i+=1){for(var j=0;j<pixelBytes;j+=1){fullPixels[fullPos++]=pixels[partPos++];}fullPos+=(dx-1)*pixelBytes;}}row++;}}if(_this.interlaceMethod==1){/*
|
|
232039
232215
|
1 6 4 6 2 6 4 6
|
|
232040
232216
|
7 7 7 7 7 7 7 7
|
|
232041
232217
|
5 6 5 6 5 6 5 6
|