cnhis-design-vue 2.1.140 → 2.1.143

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +51 -19
  2. package/es/age/index.js +2 -2
  3. package/es/big-table/index.js +152 -112
  4. package/es/big-table/style.css +1 -1
  5. package/es/button/index.js +2395 -253
  6. package/es/button/style.css +1 -1
  7. package/es/captcha/index.js +3 -3
  8. package/es/card-reader-sdk/index.js +1 -1
  9. package/es/checkbox/index.js +1 -1
  10. package/es/color-picker/index.js +1 -1
  11. package/es/drag-layout/index.js +3 -3
  12. package/es/editor/index.js +1 -1
  13. package/es/ellipsis/index.js +1 -1
  14. package/es/fabric-chart/index.js +280 -143
  15. package/es/form-table/index.js +20 -20
  16. package/es/full-calendar/index.js +4 -4
  17. package/es/index/index.js +2822 -503
  18. package/es/index/style.css +1 -1
  19. package/es/input/index.js +1 -1
  20. package/es/map/index.js +1 -1
  21. package/es/multi-chat/index.js +25 -25
  22. package/es/multi-chat-client/index.js +19 -19
  23. package/es/multi-chat-history/index.js +4 -4
  24. package/es/multi-chat-record/index.js +4 -4
  25. package/es/multi-chat-setting/index.js +20 -20
  26. package/es/multi-chat-sip/index.js +1 -1
  27. package/es/radio/index.js +1 -1
  28. package/es/scale-container/index.js +1 -1
  29. package/es/scale-view/index.js +27 -27
  30. package/es/select/index.js +4 -4
  31. package/es/select-label/index.js +3 -3
  32. package/es/select-person/index.js +35 -28
  33. package/es/select-person/style.css +1 -1
  34. package/es/select-tag/index.js +4 -4
  35. package/es/shortcut-setter/index.js +2 -2
  36. package/es/slider-tree/index.js +1 -1
  37. package/es/table-filter/index.js +2301 -138
  38. package/es/table-filter/style.css +1 -1
  39. package/es/tag/index.js +1 -1
  40. package/es/verification-code/index.js +2 -2
  41. package/lib/cui.common.js +3064 -716
  42. package/lib/cui.umd.js +3064 -716
  43. package/lib/cui.umd.min.js +66 -66
  44. package/package.json +1 -1
  45. package/packages/big-table/src/BigTable.vue +5 -4
  46. package/packages/big-table/src/utils/headerFilter.js +54 -18
  47. package/packages/button/src/ButtonPrint/index.vue +27 -691
  48. package/packages/button/src/ButtonPrint/js/print.es.min.js +1 -1
  49. package/packages/button/src/ButtonPrint/js/print.es.min1.js +1 -1
  50. package/packages/button/src/ButtonPrint/new.vue +1438 -0
  51. package/packages/button/src/ButtonPrint/old.vue +809 -0
  52. package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +90 -7
  53. package/packages/select-person/select-person.vue +79 -67
  54. package/packages/table-filter/src/components/render-widget/components/CheckboxGroup.vue +18 -4
  55. package/packages/table-filter/src/components/render-widget/index.vue +2 -2
  56. package/packages/table-filter/src/components/render-widget/widgetCfgMaps.js +2 -2
@@ -295,7 +295,7 @@ var es_promise_finally = __webpack_require__("a79d");
295
295
  // EXTERNAL MODULE: external "core-js/modules/es.function.name.js"
296
296
  var es_function_name_js_ = __webpack_require__("db0a");
297
297
 
298
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ed0262d0-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/FabricChart.vue?vue&type=template&id=76395f46&scoped=true&
298
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"9441c33a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/FabricChart.vue?vue&type=template&id=76395f46&scoped=true&
299
299
  var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"c-fabric-chart",style:({ width: _vm.canvasWidth })},[(_vm.rendercanvas)?_c('fabric-canvas',_vm._b({ref:"canvasEle",attrs:{"templateData":_vm.templateData}},'fabric-canvas',_vm.$attrs,false),[_c('fabric-grid'),(_vm.hasXScalevalue)?_c('fabric-text-group',_vm._g({ref:"otherGroups",attrs:{"templateData":_vm.templateData}},_vm.$listeners)):_vm._e(),(_vm.hasTable)?_c('fabric-scale-value',{attrs:{"templateData":_vm.templateData}}):_vm._e(),(_vm.hasTopTable)?_c('fabric-lines',_vm._g({ref:"lines",attrs:{"linesObj":_vm.templateData.top}},_vm.$listeners)):_vm._e(),(_vm.hasTable)?_c('fabric-polylines',_vm._g({ref:"polylines",attrs:{"polyline":_vm.polylines,"other":_vm.templateData.left.other || {},"timeRangeStyle":_vm.templateData.timeRangeStyle || {}},on:{"pointOperation":_vm.pointOperation}},_vm.$listeners)):_vm._e()],1):_vm._e()],1)}
300
300
  var staticRenderFns = []
301
301
 
@@ -308,7 +308,7 @@ var objectSpread2 = __webpack_require__("5530");
308
308
  // EXTERNAL MODULE: ./src/core/create.js
309
309
  var create = __webpack_require__("8aef");
310
310
 
311
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ed0262d0-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/fabric-chart/FabricCanvas.vue?vue&type=template&id=10e4f5d6&
311
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"9441c33a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/fabric-chart/FabricCanvas.vue?vue&type=template&id=10e4f5d6&
312
312
  var FabricCanvasvue_type_template_id_10e4f5d6_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('canvas',{attrs:{"id":_vm.id}}),_vm._t("default")],2)}
313
313
  var FabricCanvasvue_type_template_id_10e4f5d6_staticRenderFns = []
314
314
 
@@ -972,7 +972,7 @@ var component = Object(componentNormalizer["a" /* default */])(
972
972
  )
973
973
 
974
974
  /* harmony default export */ var FabricCanvas = (component.exports);
975
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ed0262d0-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/fabric-chart/FabricPolylines.vue?vue&type=template&id=6769ab15&
975
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"9441c33a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/fabric-chart/FabricPolylines.vue?vue&type=template&id=6769ab15&
976
976
  var FabricPolylinesvue_type_template_id_6769ab15_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"poly-line"},[_c('MouseRightClick',{directives:[{name:"show",rawName:"v-show",value:(_vm.isRightVisible),expression:"isRightVisible"}],attrs:{"getContainer":_vm.getContainer,"nodeList":_vm.rightClickNode,"rightPos":_vm.rightPos},on:{"nodeClick":_vm.handleRightClick,"closeRight":function($event){_vm.isRightVisible = false}}}),_c('DropPopup',{directives:[{name:"show",rawName:"v-show",value:(_vm.isDropVisible),expression:"isDropVisible"}],attrs:{"val":_vm.dropVal,"dropPos":_vm.dropPos}})],1)}
977
977
  var FabricPolylinesvue_type_template_id_6769ab15_staticRenderFns = []
978
978
 
@@ -1855,7 +1855,7 @@ function sortByTime() {
1855
1855
  }
1856
1856
  }
1857
1857
  });
1858
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ed0262d0-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/components/MouseRightClick.vue?vue&type=template&id=25d4407a&scoped=true&
1858
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"9441c33a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/components/MouseRightClick.vue?vue&type=template&id=25d4407a&scoped=true&
1859
1859
  var MouseRightClickvue_type_template_id_25d4407a_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"c-mouse-right-menu-popup c-animation-in",style:(_vm.dialogStyle)},[_c('div',{staticClass:"c-mouse-right-menu"},_vm._l((_vm.nodeList),function(item,index){return _c('div',{key:index,staticClass:"c-mouse-menu-item",on:{"click":function($event){return _vm.handleNodeClick(item)}}},[_c('span',[_vm._v(_vm._s(item.name))])])}),0)])}
1860
1860
  var MouseRightClickvue_type_template_id_25d4407a_scoped_true_staticRenderFns = []
1861
1861
 
@@ -1963,7 +1963,7 @@ var MouseRightClick_component = Object(componentNormalizer["a" /* default */])(
1963
1963
  )
1964
1964
 
1965
1965
  /* harmony default export */ var MouseRightClick = (MouseRightClick_component.exports);
1966
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ed0262d0-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/components/DropPopup.vue?vue&type=template&id=c4db0ace&scoped=true&
1966
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"9441c33a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/components/DropPopup.vue?vue&type=template&id=c4db0ace&scoped=true&
1967
1967
  var DropPopupvue_type_template_id_c4db0ace_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"c-drop-popup",style:(_vm.dialogStyle)},[_c('div',{staticClass:"c-drop-popup-list"},[_c('span',[_vm._v(_vm._s(_vm.val.title))]),_vm._l((_vm.val.list),function(item){return _c('span',{key:item.id},[_vm._v(" "+_vm._s(((item.name) + ": " + (item.value)))+" ")])})],2)])}
1968
1968
  var DropPopupvue_type_template_id_c4db0ace_scoped_true_staticRenderFns = []
1969
1969
 
@@ -4164,12 +4164,12 @@ var FabricGrid_component = Object(componentNormalizer["a" /* default */])(
4164
4164
  )
4165
4165
 
4166
4166
  /* harmony default export */ var FabricGrid = (FabricGrid_component.exports);
4167
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ed0262d0-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue?vue&type=template&id=4465a097&
4168
- var FabricTextGroupvue_type_template_id_4465a097_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"text-group"},[_c('MouseRightClick',{directives:[{name:"show",rawName:"v-show",value:(_vm.isRightVisible),expression:"isRightVisible"}],attrs:{"getContainer":_vm.getContainer,"nodeList":_vm.rightClickNode,"rightPos":_vm.rightPos},on:{"nodeClick":_vm.handleRightClick,"closeRight":function($event){_vm.isRightVisible = false}}}),_c('DropPopup',{directives:[{name:"show",rawName:"v-show",value:(_vm.isDropVisible),expression:"isDropVisible"}],attrs:{"val":_vm.dropVal,"dropPos":_vm.dropPos}})],1)}
4169
- var FabricTextGroupvue_type_template_id_4465a097_staticRenderFns = []
4167
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"9441c33a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue?vue&type=template&id=adfb5518&
4168
+ var FabricTextGroupvue_type_template_id_adfb5518_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"text-group"},[_c('MouseRightClick',{directives:[{name:"show",rawName:"v-show",value:(_vm.isRightVisible),expression:"isRightVisible"}],attrs:{"getContainer":_vm.getContainer,"nodeList":_vm.rightClickNode,"rightPos":_vm.rightPos},on:{"nodeClick":_vm.handleRightClick,"closeRight":function($event){_vm.isRightVisible = false}}}),_c('DropPopup',{directives:[{name:"show",rawName:"v-show",value:(_vm.isDropVisible),expression:"isDropVisible"}],attrs:{"val":_vm.dropVal,"dropPos":_vm.dropPos}})],1)}
4169
+ var FabricTextGroupvue_type_template_id_adfb5518_staticRenderFns = []
4170
4170
 
4171
4171
 
4172
- // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue?vue&type=template&id=4465a097&
4172
+ // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue?vue&type=template&id=adfb5518&
4173
4173
 
4174
4174
  // EXTERNAL MODULE: external "core-js/modules/es.reflect.has.js"
4175
4175
  var es_reflect_has_js_ = __webpack_require__("bfdc");
@@ -4517,6 +4517,8 @@ var external_lodash_ = __webpack_require__("60bb");
4517
4517
 
4518
4518
 
4519
4519
 
4520
+
4521
+
4520
4522
 
4521
4523
 
4522
4524
 
@@ -4599,6 +4601,8 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
4599
4601
 
4600
4602
  this.markData = sortByTime(Object(external_lodash_["cloneDeep"])((_this$templateData$bo = this.templateData.bottom) === null || _this$templateData$bo === void 0 ? void 0 : _this$templateData$bo.list));
4601
4603
  this.markObjs = [];
4604
+ this.otherListPointHeightRange = [];
4605
+ this.inputObj = null;
4602
4606
  return {
4603
4607
  leftStartX: 0,
4604
4608
  isDropVisible: false,
@@ -4616,7 +4620,13 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
4616
4620
 
4617
4621
  };
4618
4622
  },
4619
- mounted: function mounted() {},
4623
+ mounted: function mounted() {
4624
+ var _this2 = this;
4625
+
4626
+ setTimeout(function () {
4627
+ document.addEventListener('keydown', _this2.handleInputBoxEnterEvent, true);
4628
+ });
4629
+ },
4620
4630
  computed: {
4621
4631
  girdLineStyle: function girdLineStyle() {
4622
4632
  return Object.assign({}, defaultVaule.borderStyle, this.templateData.borderStyle || {});
@@ -4669,28 +4679,140 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
4669
4679
  this.canvas.add(this.drawLine([0, 0, 0, canvasHeight], Object(objectSpread2["a" /* default */])({}, this.girdLineStyle)));
4670
4680
  },
4671
4681
  createEvent: function createEvent() {
4672
- var _this2 = this;
4682
+ var _this3 = this;
4673
4683
 
4674
4684
  this.canvas.on('mouse:up', function (event) {
4675
- if (event.button === 3) {
4676
- var _event$pointer = event.pointer,
4677
- x = _event$pointer.x,
4678
- y = _event$pointer.y;
4685
+ var button = event.button,
4686
+ target = event.target,
4687
+ pointer = event.pointer;
4688
+ var x = pointer.x,
4689
+ y = pointer.y;
4679
4690
 
4680
- if (_this2.isGridLimit(x, y)) {
4681
- _this2.activeEvent = event;
4682
- !_this2.isAddEventListenerContextmenu && _this2.canvas.wrapperEl.addEventListener('contextmenu', _this2.addEventListenerContextmenu, true);
4683
- _this2.isAddEventListenerContextmenu = true;
4691
+ if (_this3.isGridLimit(x, y)) {
4692
+ if (button === 3) {
4693
+ _this3.activeEvent = event;
4694
+ !_this3.isAddEventListenerContextmenu && _this3.canvas.wrapperEl.addEventListener('contextmenu', _this3.addEventListenerContextmenu, true);
4695
+ _this3.isAddEventListenerContextmenu = true;
4696
+ }
4697
+
4698
+ if (button === 1) {
4699
+ var _this3$otherListPoint, _target$id;
4700
+
4701
+ if (!((_this3$otherListPoint = _this3.otherListPointHeightRange) !== null && _this3$otherListPoint !== void 0 && _this3$otherListPoint.length) || _this3.inputObj) return;
4702
+ if (target !== null && target !== void 0 && target.id && (!(target !== null && target !== void 0 && (_target$id = target.id) !== null && _target$id !== void 0 && _target$id.includes('_other')) || (target === null || target === void 0 ? void 0 : target.type) !== 'list' || target.isTitle)) return;
4703
+ var content = '';
4704
+
4705
+ if (target) {
4706
+ if (target.moving) {
4707
+ target.moving = false;
4708
+ return;
4709
+ } else {
4710
+ var _target$origin, _target$origin$value;
4711
+
4712
+ content = (_target$origin = target.origin) === null || _target$origin === void 0 ? void 0 : (_target$origin$value = _target$origin.value) === null || _target$origin$value === void 0 ? void 0 : _target$origin$value.toString();
4713
+ }
4714
+ }
4715
+
4716
+ var item = _this3.otherListPointHeightRange.find(function (_ref) {
4717
+ var y1 = _ref.y1,
4718
+ y2 = _ref.y2;
4719
+ return y >= y1 && y <= y2;
4720
+ });
4721
+
4722
+ if (Object(external_lodash_["isNumber"])(item === null || item === void 0 ? void 0 : item.dataIndex)) {
4723
+ _this3.inputObj = new _this3.fabric.Textbox(content, {
4724
+ left: x,
4725
+ top: y,
4726
+ width: 100,
4727
+ height: 100,
4728
+ fontSize: 18,
4729
+ objectCaching: false,
4730
+ hasControls: false,
4731
+ borderColor: '#000',
4732
+ editingBorderColor: '#000',
4733
+ backgroundColor: '#fff',
4734
+ fontFamily: '微软雅黑',
4735
+ otherListPointHeightRangeItem: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, item), {}, {
4736
+ left: x,
4737
+ target: target
4738
+ })
4739
+ });
4740
+
4741
+ _this3.canvas.add(_this3.inputObj).setActiveObject(_this3.inputObj);
4742
+
4743
+ _this3.inputObj.enterEditing();
4744
+
4745
+ if (content) {
4746
+ _this3.inputObj.setSelectionEnd(content.length);
4747
+ }
4748
+ }
4749
+ }
4750
+ }
4751
+ });
4752
+ this.canvas.on('selection:cleared', function (_ref2) {
4753
+ var deselected = _ref2.deselected;
4754
+
4755
+ if (deselected !== null && deselected !== void 0 && deselected.find(function (obj) {
4756
+ return obj.otherListPointHeightRangeItem;
4757
+ })) {
4758
+ var _this3$inputObj = _this3.inputObj,
4759
+ text = _this3$inputObj.text,
4760
+ otherListPointHeightRangeItem = _this3$inputObj.otherListPointHeightRangeItem;
4761
+ text = text.replace(/^\s+|\s+$/g, '');
4762
+
4763
+ _this3.canvas.remove(_this3.inputObj);
4764
+
4765
+ _this3.inputObj = null;
4766
+ if (!text) return;
4767
+ var dataList = otherListPointHeightRangeItem.dataList,
4768
+ left = otherListPointHeightRangeItem.left,
4769
+ target = otherListPointHeightRangeItem.target;
4770
+
4771
+ if (target) {
4772
+ var _target$origin2;
4773
+
4774
+ var params = _this3.getOtherParams(target);
4775
+
4776
+ if (text == ((_target$origin2 = target.origin) === null || _target$origin2 === void 0 ? void 0 : _target$origin2.value)) return;
4777
+
4778
+ _this3.$emit('otherChange', Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, params), {}, {
4779
+ data: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, params.data), {}, {
4780
+ value: text
4781
+ })
4782
+ }));
4783
+ } else {
4784
+ var index = dataList.findIndex(function (_left) {
4785
+ return _left > left;
4786
+ });
4787
+
4788
+ var _params = _this3.getOtherParams(otherListPointHeightRangeItem);
4789
+
4790
+ _this3.$emit('addOhter', Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, _params), {}, {
4791
+ index: !~index ? dataList.length : index,
4792
+ data: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, _params.data), {}, {
4793
+ value: text
4794
+ })
4795
+ }));
4684
4796
  }
4685
4797
  }
4686
4798
  });
4687
4799
  bus.$on('deleteOther', function (otherList) {
4688
- return _this2.$emit('deleteOther', otherList);
4800
+ return _this3.$emit('deleteOther', otherList);
4689
4801
  });
4690
4802
  },
4803
+ handleInputBoxEnterEvent: function handleInputBoxEnterEvent(e) {
4804
+ if (!this.inputObj || ![13, 27].includes(e.keyCode)) return;
4805
+
4806
+ if (e.keyCode === 27) {
4807
+ this.inputObj.text = '';
4808
+ }
4809
+
4810
+ this.inputObj.exitEditing();
4811
+ this.canvas.discardActiveObject(this.inputObj);
4812
+ },
4691
4813
  // 打开右键菜单
4692
4814
  openRightModal: function openRightModal() {
4693
- var _this3 = this;
4815
+ var _this4 = this;
4694
4816
 
4695
4817
  // 一下方法不会生效,因为,polylines组件中timeRangeData.enabled设置为false操作晚于当前操作,需换一种方式
4696
4818
  // if (this.$parent.$children.find(children => /polylines/.test(children.$vnode.tag))?.componentInstance?.timeRangeData?.enabled) return;
@@ -4708,31 +4830,31 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
4708
4830
  var id = (target === null || target === void 0 ? void 0 : target.id) || '';
4709
4831
  this.$nextTick(function () {
4710
4832
  if (id && id.includes('_other')) {
4711
- _this3._currentPoint = target || '';
4712
- _this3.rightClickNode = Object.freeze(FabricTextGroupvue_type_script_lang_js_rightClickNode.slice());
4713
- _this3.isRightVisible = true;
4833
+ _this4._currentPoint = target || '';
4834
+ _this4.rightClickNode = Object.freeze(FabricTextGroupvue_type_script_lang_js_rightClickNode.slice());
4835
+ _this4.isRightVisible = true;
4714
4836
  }
4715
4837
  });
4716
4838
  },
4717
4839
  // 关闭右键菜单,打开添加节点弹窗表单
4718
- handleRightClick: function handleRightClick(_ref) {
4719
- var type = _ref.type;
4840
+ handleRightClick: function handleRightClick(_ref3) {
4841
+ var type = _ref3.type;
4720
4842
  this.isRightVisible = false;
4721
4843
  var text = this._currentPoint;
4722
4844
  this._currentPoint = '';
4723
4845
  this.$emit("".concat(type, "Other"), this.getOtherParams(text, false));
4724
4846
  },
4725
4847
  removeOther: function removeOther() {
4726
- var _this4 = this;
4848
+ var _this5 = this;
4727
4849
 
4728
4850
  this.canvas.forEachObject(function (obj) {
4729
4851
  if (obj.id && obj.id.includes('_other')) {
4730
- _this4.canvas.remove(obj);
4852
+ _this5.canvas.remove(obj);
4731
4853
  }
4732
4854
  });
4733
4855
  },
4734
4856
  drawTopTotal: function drawTopTotal(topTotalList) {
4735
- var _this5 = this,
4857
+ var _this6 = this,
4736
4858
  _this$canvas;
4737
4859
 
4738
4860
  var _this$propItems2 = this.propItems,
@@ -4752,7 +4874,7 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
4752
4874
  var _topTotal$divider;
4753
4875
 
4754
4876
  var top = i * yCellHeightTop + yCellHeightTopHalf + originYTop;
4755
- var text = v ? new _this5.fabric.Text(String(v), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.style), topTotal.style || defaultVaule.textStyle), {}, {
4877
+ var text = v ? new _this6.fabric.Text(String(v), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.style), topTotal.style || defaultVaule.textStyle), {}, {
4756
4878
  left: left,
4757
4879
  top: top,
4758
4880
  originX: 'center',
@@ -4770,7 +4892,7 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
4770
4892
  if ((_topTotal$divider = topTotal.divider) !== null && _topTotal$divider !== void 0 && _topTotal$divider.show) {
4771
4893
  var dividerY = top + yCellHeightTopHalf;
4772
4894
 
4773
- var divider = _this5.drawLine([endX, dividerY, endX + totalWidth, dividerY], topTotal.divider.style);
4895
+ var divider = _this6.drawLine([endX, dividerY, endX + totalWidth, dividerY], topTotal.divider.style);
4774
4896
 
4775
4897
  textList.push(divider);
4776
4898
  }
@@ -4789,33 +4911,33 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
4789
4911
  (_this$canvas = this.canvas).add.apply(_this$canvas, textList.concat([title]));
4790
4912
  },
4791
4913
  topTreeTextGroup: function topTreeTextGroup(list) {
4792
- var _this6 = this;
4914
+ var _this7 = this;
4793
4915
 
4794
4916
  list.forEach(function (item) {
4795
4917
  var _item$children2;
4796
4918
 
4797
4919
  if (item !== null && item !== void 0 && (_item$children2 = item.children) !== null && _item$children2 !== void 0 && _item$children2.length) {
4798
- _this6.canvas.add(_this6.drawTextGroup({
4920
+ _this7.canvas.add(_this7.drawTextGroup({
4799
4921
  width: item.width,
4800
4922
  height: item.height,
4801
4923
  strokeWidth: 1
4802
4924
  }, Object(objectSpread2["a" /* default */])({
4803
4925
  text: String(item.title)
4804
- }, _this6.templateData.top.treeTableTextStyle || {}), {
4926
+ }, _this7.templateData.top.treeTableTextStyle || {}), {
4805
4927
  left: item.left,
4806
4928
  top: item.top
4807
4929
  }));
4808
4930
 
4809
- _this6.topTreeTextGroup(item.children);
4931
+ _this7.topTreeTextGroup(item.children);
4810
4932
  } else {
4811
4933
  // 此处的文本text的中心源的定位由于draw.js中封装反向的,所以此时文本需要向左排列originX值应为right
4812
- _this6.canvas.add(_this6.drawTextGroup({
4934
+ _this7.canvas.add(_this7.drawTextGroup({
4813
4935
  width: item.width,
4814
4936
  height: item.height,
4815
4937
  strokeWidth: 1
4816
4938
  }, Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({
4817
4939
  text: String(item.title)
4818
- }, _this6.templateData.top.treeTableTextStyle || {}), {}, {
4940
+ }, _this7.templateData.top.treeTableTextStyle || {}), {}, {
4819
4941
  originX: 'right',
4820
4942
  left: -Math.floor(item.width / 2) + 5
4821
4943
  }), {
@@ -4836,7 +4958,7 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
4836
4958
  }
4837
4959
  },
4838
4960
  drawTextDataGroupColList: function drawTextDataGroupColList(colList) {
4839
- var _this7 = this,
4961
+ var _this8 = this,
4840
4962
  _this$canvas2;
4841
4963
 
4842
4964
  var _this$propItems3 = this.propItems,
@@ -4846,14 +4968,14 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
4846
4968
  colList.forEach(function (item, index) {
4847
4969
  var baseTop = originY + (item.marginTop || 10);
4848
4970
 
4849
- if (_this7.isLimit(item.scalevalue)) {
4971
+ if (_this8.isLimit(item.scalevalue)) {
4850
4972
  var textItemPoints = [];
4851
4973
 
4852
- var left = _this7.computedX(item.scalevalue);
4974
+ var left = _this8.computedX(item.scalevalue);
4853
4975
 
4854
4976
  item.dataList.forEach(function (v, i) {
4855
4977
  var top = baseTop + i * (item.lineHeight || 15);
4856
- var text = new _this7.fabric.Text(String(v.value), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.style), defaultVaule.textStyle), item.style), {}, {
4978
+ var text = new _this8.fabric.Text(String(v.value), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.style), defaultVaule.textStyle), item.style), {}, {
4857
4979
  originX: 'left',
4858
4980
  originY: 'center',
4859
4981
  left: left,
@@ -4868,10 +4990,10 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
4868
4990
  origin: Object(objectSpread2["a" /* default */])({
4869
4991
  time: item.scalevalue
4870
4992
  }, v)
4871
- }, _this7.eventStyle));
4993
+ }, _this8.eventStyle));
4872
4994
  textItemPoints.push(text);
4873
4995
 
4874
- _this7.pointOtherEvent(text);
4996
+ _this8.pointOtherEvent(text);
4875
4997
 
4876
4998
  textList.push(text);
4877
4999
  });
@@ -4892,25 +5014,26 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
4892
5014
  (_this$canvas2 = this.canvas).add.apply(_this$canvas2, textList);
4893
5015
  },
4894
5016
  drawTextDataGroupList: function drawTextDataGroupList(list) {
4895
- var _this8 = this;
5017
+ var _this9 = this;
4896
5018
 
4897
5019
  return Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
4898
- var _this8$canvas;
5020
+ var _this9$canvas;
4899
5021
 
4900
- var textList, _this8$propItems, originX, originY, top, index, len, _item$titleStyle, item, marginLeft, left, originOptions, title, _ref2, _ref2$icon, _icon, dataList, prevPoint, i, _len, v, commonOptions, _left2, icon, iconHalfWidth, text, groupObj;
5022
+ var textList, _this9$propItems, originX, originY, top, index, len, _item$titleStyle, item, marginLeft, left, originOptions, title, _ref4, _ref4$icon, _icon, dataList, prevPoint, i, _len, v, commonOptions, _left2, icon, iconHalfWidth, text, groupObj;
4901
5023
 
4902
5024
  return regeneratorRuntime.wrap(function _callee$(_context) {
4903
5025
  while (1) {
4904
5026
  switch (_context.prev = _context.next) {
4905
5027
  case 0:
5028
+ _this9.otherListPointHeightRange = [];
4906
5029
  textList = [];
4907
- _this8$propItems = _this8.propItems, originX = _this8$propItems.originX, originY = _this8$propItems.originY;
5030
+ _this9$propItems = _this9.propItems, originX = _this9$propItems.originX, originY = _this9$propItems.originY;
4908
5031
  top = originY + 10;
4909
5032
  index = 0, len = list.length;
4910
5033
 
4911
- case 4:
5034
+ case 5:
4912
5035
  if (!(index < len)) {
4913
- _context.next = 43;
5036
+ _context.next = 45;
4914
5037
  break;
4915
5038
  }
4916
5039
 
@@ -4927,36 +5050,46 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
4927
5050
  left: left,
4928
5051
  top: top
4929
5052
  };
4930
- title = new _this8.fabric.Text(String(item.title), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.style), defaultVaule.textStyle), item.style), item.titleStyle || {}), {}, {
5053
+ title = new _this9.fabric.Text(String(item.title), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.style), defaultVaule.textStyle), item.style), item.titleStyle || {}), {}, {
4931
5054
  originY: 'center',
4932
5055
  id: "".concat(index, "_other_").concat(Date.now()),
4933
5056
  dataIndex: index,
4934
5057
  type: 'list',
4935
5058
  hasControls: false,
4936
5059
  hasBorders: false
4937
- }, originOptions), _this8.eventStyle), {}, {
4938
- dataList: []
5060
+ }, originOptions), _this9.eventStyle), {}, {
5061
+ dataList: [],
5062
+ isTitle: true
4939
5063
  }));
4940
5064
 
4941
- _this8.setMovingEvent(title, originOptions);
5065
+ _this9.setMovingEvent(title, originOptions);
4942
5066
 
4943
5067
  textList.push(title);
4944
- _ref2 = item || {}, _ref2$icon = _ref2.icon, _icon = _ref2$icon === void 0 ? {
5068
+
5069
+ _this9.otherListPointHeightRange.push({
5070
+ type: 'list',
5071
+ dataIndex: index,
5072
+ dataList: title.dataList,
5073
+ y1: top - title.height / 2,
5074
+ y2: top + title.height / 2
5075
+ });
5076
+
5077
+ _ref4 = item || {}, _ref4$icon = _ref4.icon, _icon = _ref4$icon === void 0 ? {
4945
5078
  type: 'circle'
4946
- } : _ref2$icon, dataList = _ref2.dataList;
5079
+ } : _ref4$icon, dataList = _ref4.dataList;
4947
5080
  prevPoint = void 0;
4948
5081
  i = 0, _len = dataList.length;
4949
5082
 
4950
- case 16:
5083
+ case 18:
4951
5084
  if (!(i < _len)) {
4952
- _context.next = 40;
5085
+ _context.next = 42;
4953
5086
  break;
4954
5087
  }
4955
5088
 
4956
5089
  v = dataList[i];
4957
5090
 
4958
- if (!_this8.isLimit(v.time)) {
4959
- _context.next = 37;
5091
+ if (!_this9.isLimit(v.time)) {
5092
+ _context.next = 39;
4960
5093
  break;
4961
5094
  }
4962
5095
 
@@ -4969,41 +5102,41 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
4969
5102
  objectCaching: false,
4970
5103
  origin: v
4971
5104
  };
4972
- _left2 = _this8.computedX(v.time);
5105
+ _left2 = _this9.computedX(v.time);
4973
5106
  title.dataList.push(_left2);
4974
5107
 
4975
5108
  if (!(!Reflect.has(_icon, 'show') || _icon.show)) {
4976
- _context.next = 28;
5109
+ _context.next = 30;
4977
5110
  break;
4978
5111
  }
4979
5112
 
4980
- _context.next = 25;
4981
- return _this8.createPoint(_icon.type, Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({
5113
+ _context.next = 27;
5114
+ return _this9.createPoint(_icon.type, Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({
4982
5115
  originX: 'center',
4983
5116
  left: _left2
4984
5117
  }, item.style), item.style ? {
4985
5118
  stroke: item.style.fill
4986
5119
  } : {}), _icon.style || {}), commonOptions));
4987
5120
 
4988
- case 25:
5121
+ case 27:
4989
5122
  _context.t0 = _context.sent;
4990
- _context.next = 29;
5123
+ _context.next = 31;
4991
5124
  break;
4992
5125
 
4993
- case 28:
5126
+ case 30:
4994
5127
  _context.t0 = null;
4995
5128
 
4996
- case 29:
5129
+ case 31:
4997
5130
  icon = _context.t0;
4998
5131
  iconHalfWidth = icon ? icon.width / 2 : 0;
4999
- text = new _this8.fabric.Text(String(v.value), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.style), defaultVaule.textStyle), item.style), {}, {
5132
+ text = new _this9.fabric.Text(String(v.value), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.style), defaultVaule.textStyle), item.style), {}, {
5000
5133
  left: _left2 + iconHalfWidth,
5001
5134
  name: v.value
5002
5135
  }, commonOptions));
5003
- groupObj = new _this8.fabric.Group(icon ? [icon, text] : [text], Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({
5136
+ groupObj = new _this9.fabric.Group(icon ? [icon, text] : [text], Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({
5004
5137
  id: "".concat(index, "_").concat(i, "_other_").concat(Date.now()),
5005
5138
  lockMovementY: true
5006
- }, commonOptions), _this8.eventStyle), {}, {
5139
+ }, commonOptions), _this9.eventStyle), {}, {
5007
5140
  realLeft: _left2,
5008
5141
  iconHalfWidth: iconHalfWidth
5009
5142
  }));
@@ -5015,24 +5148,24 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5015
5148
 
5016
5149
  prevPoint = groupObj;
5017
5150
 
5018
- _this8.pointOtherEvent(groupObj);
5151
+ _this9.pointOtherEvent(groupObj);
5019
5152
 
5020
5153
  textList.push(groupObj);
5021
5154
 
5022
- case 37:
5155
+ case 39:
5023
5156
  i++;
5024
- _context.next = 16;
5157
+ _context.next = 18;
5025
5158
  break;
5026
5159
 
5027
- case 40:
5160
+ case 42:
5028
5161
  index++;
5029
- _context.next = 4;
5162
+ _context.next = 5;
5030
5163
  break;
5031
5164
 
5032
- case 43:
5033
- (_this8$canvas = _this8.canvas).add.apply(_this8$canvas, textList);
5165
+ case 45:
5166
+ (_this9$canvas = _this9.canvas).add.apply(_this9$canvas, textList);
5034
5167
 
5035
- case 44:
5168
+ case 46:
5036
5169
  case "end":
5037
5170
  return _context.stop();
5038
5171
  }
@@ -5050,7 +5183,7 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5050
5183
  }
5051
5184
  },
5052
5185
  setMovingEvent: function setMovingEvent(point) {
5053
- var _this9 = this;
5186
+ var _this10 = this;
5054
5187
 
5055
5188
  var _this$propItems4 = this.propItems,
5056
5189
  originX = _this$propItems4.originX,
@@ -5068,28 +5201,28 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5068
5201
  !point.isClone && point.clone(function (obj) {
5069
5202
  obj.set('originX', 'right');
5070
5203
 
5071
- _this9.canvas.add(obj);
5204
+ _this10.canvas.add(obj);
5072
5205
 
5073
5206
  cloneObj = obj;
5074
5207
  point.isClone = true;
5075
5208
  });
5076
5209
 
5077
5210
  if (isLimit()) {
5078
- _this9.emitMouseoverTarget(point);
5211
+ _this10.emitMouseoverTarget(point);
5079
5212
  } else {
5080
- _this9.emitMouseoverTarget();
5213
+ _this10.emitMouseoverTarget();
5081
5214
  }
5082
5215
  });
5083
5216
  point.on('moved', function () {
5084
- _this9.canvas.remove(cloneObj);
5217
+ _this10.canvas.remove(cloneObj);
5085
5218
 
5086
5219
  point.isClone = false;
5087
5220
 
5088
- _this9.removeOther();
5221
+ _this10.removeOther();
5089
5222
 
5090
- _this9.drawTextDataGroup(_this9.templateData.other);
5223
+ _this10.drawTextDataGroup(_this10.templateData.other);
5091
5224
 
5092
- _this9.emitMouseoverTarget();
5225
+ _this10.emitMouseoverTarget();
5093
5226
 
5094
5227
  if (isLimit()) {
5095
5228
  var left = point.left,
@@ -5099,15 +5232,15 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5099
5232
  }); // 使用定时器,是因为:防止上方移除重绘过慢新增完后再次触发移除重绘导致页面多次重绘节点
5100
5233
 
5101
5234
  setTimeout(function () {
5102
- _this9.$emit('addOhter', Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, _this9.getOtherParams(point)), {}, {
5103
- index: !~index ? dataList.length ? dataList.length - 1 : 0 : index
5235
+ _this10.$emit('addOhter', Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, _this10.getOtherParams(point)), {}, {
5236
+ index: !~index ? dataList.length : index
5104
5237
  }));
5105
5238
  });
5106
5239
  }
5107
5240
  });
5108
5241
  },
5109
5242
  pointOtherEvent: function pointOtherEvent(point) {
5110
- var _this10 = this;
5243
+ var _this11 = this;
5111
5244
 
5112
5245
  point.hasControls = point.hasBorders = false;
5113
5246
  this.setPopup(point); // 移动中 实时更新相关联的线的坐标
@@ -5117,6 +5250,7 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5117
5250
  endX = _this$propItems5.endX,
5118
5251
  originX = _this$propItems5.originX;
5119
5252
  point.on('moving', function () {
5253
+ point.moving = true;
5120
5254
  point.setCoords();
5121
5255
  var prevPoint = point.prevPoint,
5122
5256
  nextPoint = point.nextPoint;
@@ -5142,12 +5276,12 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5142
5276
  });
5143
5277
  }
5144
5278
 
5145
- _this10.showDrapPopup(point);
5279
+ _this11.showDrapPopup(point);
5146
5280
  });
5147
5281
  point.on('moved', function () {
5148
- _this10.isDropVisible = false;
5282
+ _this11.isDropVisible = false;
5149
5283
 
5150
- _this10.$emit('otherChange', _this10.getOtherParams(point));
5284
+ _this11.$emit('otherChange', _this11.getOtherParams(point));
5151
5285
  });
5152
5286
  }
5153
5287
  },
@@ -5169,13 +5303,13 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5169
5303
  };
5170
5304
  },
5171
5305
  setPopup: function setPopup(point) {
5172
- var _this11 = this;
5306
+ var _this12 = this;
5173
5307
 
5174
5308
  point.on('mouseover', function () {
5175
- return _this11.emitMouseoverTarget(point);
5309
+ return _this12.emitMouseoverTarget(point);
5176
5310
  });
5177
5311
  point.on('mouseout', function () {
5178
- return _this11.emitMouseoverTarget();
5312
+ return _this12.emitMouseoverTarget();
5179
5313
  });
5180
5314
  },
5181
5315
  // 判断当前时间是否超出网格区域
@@ -5187,10 +5321,10 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5187
5321
  return time >= minTime && time <= maxTime;
5188
5322
  },
5189
5323
  removeMark: function removeMark() {
5190
- var _this12 = this;
5324
+ var _this13 = this;
5191
5325
 
5192
5326
  this.markObjs.forEach(function (obj) {
5193
- return _this12.canvas.remove(obj);
5327
+ return _this13.canvas.remove(obj);
5194
5328
  });
5195
5329
  },
5196
5330
  drawTopTotalLineAndTitle: function drawTopTotalLineAndTitle() {
@@ -5226,7 +5360,7 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5226
5360
  // 底部标记
5227
5361
  drawBottomTextDataGroup: function drawBottomTextDataGroup() {
5228
5362
  var _this$markData,
5229
- _this13 = this,
5363
+ _this14 = this,
5230
5364
  _obj$style,
5231
5365
  _obj$iconStyle,
5232
5366
  _obj$seqStyle,
@@ -5245,7 +5379,7 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5245
5379
 
5246
5380
  if (this.markObjs.length) {
5247
5381
  Object(toConsumableArray["a" /* default */])(this.markObjs).forEach(function (obj) {
5248
- return _this13.canvas.remove(obj);
5382
+ return _this14.canvas.remove(obj);
5249
5383
  });
5250
5384
 
5251
5385
  this.markObjs = [];
@@ -5265,14 +5399,14 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5265
5399
  var prevLeft = 0;
5266
5400
  var pointerObj = {};
5267
5401
  this.markData.forEach(function (item, index) {
5268
- var x = _this13.computedX(item[0]);
5402
+ var x = _this14.computedX(item[0]);
5269
5403
 
5270
- if (_this13.isLimit(item[0])) {
5404
+ if (_this14.isLimit(item[0])) {
5271
5405
  pointerObj["x_".concat(x)] = [];
5272
5406
  var pointList = [];
5273
5407
  var startTop = baseY;
5274
5408
  item[1].forEach( /*#__PURE__*/function () {
5275
- var _ref3 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(v, i) {
5409
+ var _ref5 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(v, i) {
5276
5410
  var common, lineHeight, isShowDesc, _computedTop, topObj, _startTop, oldStartTop;
5277
5411
 
5278
5412
  return regeneratorRuntime.wrap(function _callee2$(_context2) {
@@ -5288,7 +5422,7 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5288
5422
  objectCaching: false
5289
5423
  };
5290
5424
 
5291
- if (_this13.isObject(v) && !v.value) {
5425
+ if (_this14.isObject(v) && !v.value) {
5292
5426
  lineHeight = lineHeightImg;
5293
5427
  } else if (v.value) {
5294
5428
  if (v.seq) {
@@ -5302,10 +5436,10 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5302
5436
  isShowDesc = v.desc && obj.showDesc; // 错位显示处理
5303
5437
 
5304
5438
  if (prevLeft && x - prevLeft <= xCellWidth) {
5305
- pointerObj["x_".concat(prevLeft)].forEach(function (_ref4) {
5306
- var _ref5 = Object(slicedToArray["a" /* default */])(_ref4, 2),
5307
- y1 = _ref5[0],
5308
- y2 = _ref5[1];
5439
+ pointerObj["x_".concat(prevLeft)].forEach(function (_ref6) {
5440
+ var _ref7 = Object(slicedToArray["a" /* default */])(_ref6, 2),
5441
+ y1 = _ref7[0],
5442
+ y2 = _ref7[1];
5309
5443
 
5310
5444
  if (startTop + lineHeight + (isShowDesc ? lineHeightText : 0) >= endY + markHeight) {
5311
5445
  startTop = baseYTop;
@@ -5324,7 +5458,7 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5324
5458
  _computedTop = computedTop(isShowDesc, startTop, lineHeight), topObj = _computedTop.topObj, _startTop = _computedTop.startTop, oldStartTop = _computedTop.oldStartTop;
5325
5459
  startTop = _startTop;
5326
5460
  pointerObj["x_".concat(x)].push([oldStartTop, startTop]);
5327
- pointList.push(_this13.drawMarkPoint(v, common, obj, topObj, x));
5461
+ pointList.push(_this14.drawMarkPoint(v, common, obj, topObj, x));
5328
5462
  }
5329
5463
 
5330
5464
  case 3:
@@ -5336,16 +5470,16 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5336
5470
  }));
5337
5471
 
5338
5472
  return function (_x, _x2) {
5339
- return _ref3.apply(this, arguments);
5473
+ return _ref5.apply(this, arguments);
5340
5474
  };
5341
5475
  }());
5342
5476
  prevLeft = x;
5343
5477
  Promise.all(pointList).then(function (res) {
5344
- var _this13$markObjs, _this13$canvas;
5478
+ var _this14$markObjs, _this14$canvas;
5345
5479
 
5346
- (_this13$markObjs = _this13.markObjs).push.apply(_this13$markObjs, Object(toConsumableArray["a" /* default */])(res));
5480
+ (_this14$markObjs = _this14.markObjs).push.apply(_this14$markObjs, Object(toConsumableArray["a" /* default */])(res));
5347
5481
 
5348
- (_this13$canvas = _this13.canvas).add.apply(_this13$canvas, Object(toConsumableArray["a" /* default */])(res));
5482
+ (_this14$canvas = _this14.canvas).add.apply(_this14$canvas, Object(toConsumableArray["a" /* default */])(res));
5349
5483
  });
5350
5484
  }
5351
5485
  });
@@ -5396,8 +5530,8 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5396
5530
  };
5397
5531
  }
5398
5532
  },
5399
- drawMarkPoint: function drawMarkPoint(v, option, obj, _ref6, x) {
5400
- var _this14 = this;
5533
+ drawMarkPoint: function drawMarkPoint(v, option, obj, _ref8, x) {
5534
+ var _this15 = this;
5401
5535
 
5402
5536
  return Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
5403
5537
  var y1, y2, positionObj, point, eventStyle, ele, _obj$seqStyle2, _obj$seqStyle3, circle, text, descPoint;
@@ -5406,19 +5540,19 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5406
5540
  while (1) {
5407
5541
  switch (_context3.prev = _context3.next) {
5408
5542
  case 0:
5409
- y1 = _ref6.y1, y2 = _ref6.y2;
5543
+ y1 = _ref8.y1, y2 = _ref8.y2;
5410
5544
  positionObj = {
5411
5545
  left: x,
5412
5546
  originX: 'center',
5413
5547
  originY: 'center',
5414
5548
  top: y2
5415
5549
  };
5416
- eventStyle = !_this14.eventStyle.evented ? {
5550
+ eventStyle = !_this15.eventStyle.evented ? {
5417
5551
  lockMovementX: true,
5418
5552
  lockMovementY: true
5419
5553
  } : {};
5420
5554
 
5421
- if (!(_this14.isObject(v) && !v.value)) {
5555
+ if (!(_this15.isObject(v) && !v.value)) {
5422
5556
  _context3.next = 13;
5423
5557
  break;
5424
5558
  }
@@ -5429,14 +5563,14 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5429
5563
  }
5430
5564
 
5431
5565
  _context3.next = 7;
5432
- return _this14.createImage(v.iconClassName, v);
5566
+ return _this15.createImage(v.iconClassName, v);
5433
5567
 
5434
5568
  case 7:
5435
5569
  ele = _context3.sent;
5436
5570
 
5437
5571
  case 8:
5438
5572
  _context3.next = 10;
5439
- return _this14.createPoint(v !== null && v !== void 0 && v.url || v !== null && v !== void 0 && v.iconClassName ? 'img' : v.type, Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({
5573
+ return _this15.createPoint(v !== null && v !== void 0 && v.url || v !== null && v !== void 0 && v.iconClassName ? 'img' : v.type, Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({
5440
5574
  ele: ele || ''
5441
5575
  }, positionObj), obj.iconStyle), v), option), eventStyle));
5442
5576
 
@@ -5457,7 +5591,7 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5457
5591
  }
5458
5592
 
5459
5593
  _context3.next = 17;
5460
- return _this14.createPoint('circle', Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, positionObj), option), {}, {
5594
+ return _this15.createPoint('circle', Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, positionObj), option), {}, {
5461
5595
  radius: 5,
5462
5596
  strokeWidth: 1,
5463
5597
  stroke: '#000',
@@ -5466,9 +5600,9 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5466
5600
 
5467
5601
  case 17:
5468
5602
  circle = _context3.sent;
5469
- text = new _this14.fabric.Text(String(v.value), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.textStyle), positionObj), option), ((_obj$seqStyle3 = obj.seqStyle) === null || _obj$seqStyle3 === void 0 ? void 0 : _obj$seqStyle3.text) || {}));
5603
+ text = new _this15.fabric.Text(String(v.value), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.textStyle), positionObj), option), ((_obj$seqStyle3 = obj.seqStyle) === null || _obj$seqStyle3 === void 0 ? void 0 : _obj$seqStyle3.text) || {}));
5470
5604
  _context3.next = 21;
5471
- return new _this14.fabric.Group([circle, text], Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, positionObj), option), eventStyle));
5605
+ return new _this15.fabric.Group([circle, text], Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, positionObj), option), eventStyle));
5472
5606
 
5473
5607
  case 21:
5474
5608
  point = _context3.sent;
@@ -5477,7 +5611,7 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5477
5611
 
5478
5612
  case 24:
5479
5613
  _context3.next = 26;
5480
- return new _this14.fabric.Text(String(v.value), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.textStyle), obj.style), positionObj), option), eventStyle));
5614
+ return new _this15.fabric.Text(String(v.value), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.textStyle), obj.style), positionObj), option), eventStyle));
5481
5615
 
5482
5616
  case 26:
5483
5617
  point = _context3.sent;
@@ -5488,11 +5622,11 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5488
5622
  break;
5489
5623
  }
5490
5624
 
5491
- descPoint = new _this14.fabric.Text(String(v.desc), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.textStyle), positionObj), option), obj.style), {}, {
5625
+ descPoint = new _this15.fabric.Text(String(v.desc), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.textStyle), positionObj), option), obj.style), {}, {
5492
5626
  top: y1
5493
5627
  }));
5494
5628
  _context3.next = 31;
5495
- return new _this14.fabric.Group([descPoint, point], Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, option), {}, {
5629
+ return new _this15.fabric.Group([descPoint, point], Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, option), {}, {
5496
5630
  left: x,
5497
5631
  originX: 'center'
5498
5632
  }, eventStyle));
@@ -5503,7 +5637,7 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5503
5637
  case 32:
5504
5638
  point.hasControls = point.hasBorders = false;
5505
5639
 
5506
- _this14.pointEvent(point);
5640
+ _this15.pointEvent(point);
5507
5641
 
5508
5642
  return _context3.abrupt("return", point);
5509
5643
 
@@ -5516,38 +5650,38 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5516
5650
  }))();
5517
5651
  },
5518
5652
  pointEvent: function pointEvent(point) {
5519
- var _this15 = this;
5653
+ var _this16 = this;
5520
5654
 
5521
5655
  this.setPopup(point); // 移动中 实时更新相关联的线的坐标
5522
5656
 
5523
5657
  if (this.eventStyle.evented) {
5524
5658
  point.on('moving', function () {
5525
- _this15.moveLimit(point); // this.canvas.renderAll();
5659
+ _this16.moveLimit(point); // this.canvas.renderAll();
5526
5660
 
5527
5661
 
5528
- _this15.showDrapPopup(point);
5662
+ _this16.showDrapPopup(point);
5529
5663
  });
5530
5664
  point.on('moved', function () {
5531
- _this15.isDropVisible = false;
5665
+ _this16.isDropVisible = false;
5532
5666
  var value = {
5533
5667
  data: point.data,
5534
5668
  oldVal: point.time,
5535
- newVal: _this15.getXValue(point.left)
5669
+ newVal: _this16.getXValue(point.left)
5536
5670
  };
5537
5671
 
5538
- _this15.$emit('markChange', value);
5672
+ _this16.$emit('markChange', value);
5539
5673
 
5540
- _this15.updateMarkData(value);
5674
+ _this16.updateMarkData(value);
5541
5675
 
5542
- _this15.drawBottomTextDataGroup();
5676
+ _this16.drawBottomTextDataGroup();
5543
5677
 
5544
- _this15.canvas.discardActiveObject();
5678
+ _this16.canvas.discardActiveObject();
5545
5679
  });
5546
5680
  }
5547
5681
  },
5548
- updateMarkData: function updateMarkData(_ref7) {
5549
- var data = _ref7.data,
5550
- newVal = _ref7.newVal;
5682
+ updateMarkData: function updateMarkData(_ref9) {
5683
+ var data = _ref9.data,
5684
+ newVal = _ref9.newVal;
5551
5685
  var id = data.id;
5552
5686
  var listIndex, index;
5553
5687
  listIndex = this.markData.findIndex(function (v) {
@@ -5716,6 +5850,9 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5716
5850
  }));
5717
5851
  }
5718
5852
  }
5853
+ },
5854
+ beforeDestroy: function beforeDestroy() {
5855
+ document.removeEventListener('keydown', this.handleInputBoxEnterEvent);
5719
5856
  }
5720
5857
  });
5721
5858
  // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue?vue&type=script&lang=js&
@@ -5730,8 +5867,8 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
5730
5867
 
5731
5868
  var FabricTextGroup_component = Object(componentNormalizer["a" /* default */])(
5732
5869
  fabric_chart_FabricTextGroupvue_type_script_lang_js_,
5733
- FabricTextGroupvue_type_template_id_4465a097_render,
5734
- FabricTextGroupvue_type_template_id_4465a097_staticRenderFns,
5870
+ FabricTextGroupvue_type_template_id_adfb5518_render,
5871
+ FabricTextGroupvue_type_template_id_adfb5518_staticRenderFns,
5735
5872
  false,
5736
5873
  null,
5737
5874
  null,
@@ -5740,14 +5877,14 @@ var FabricTextGroup_component = Object(componentNormalizer["a" /* default */])(
5740
5877
  )
5741
5878
 
5742
5879
  /* harmony default export */ var FabricTextGroup = (FabricTextGroup_component.exports);
5743
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ed0262d0-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/fabric-chart/FabricScaleValue.vue?vue&type=template&id=68258044&
5880
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"9441c33a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/fabric-chart/FabricScaleValue.vue?vue&type=template&id=68258044&
5744
5881
  var FabricScaleValuevue_type_template_id_68258044_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.show)?_c('TimeScaleValue',{attrs:{"times":_vm.timeList,"templateData":_vm.templateData}}):_vm._e()}
5745
5882
  var FabricScaleValuevue_type_template_id_68258044_staticRenderFns = []
5746
5883
 
5747
5884
 
5748
5885
  // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart/FabricScaleValue.vue?vue&type=template&id=68258044&
5749
5886
 
5750
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ed0262d0-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/components/TimeScaleValue.vue?vue&type=template&id=0aa2f038&scoped=true&
5887
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"9441c33a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/components/TimeScaleValue.vue?vue&type=template&id=0aa2f038&scoped=true&
5751
5888
  var TimeScaleValuevue_type_template_id_0aa2f038_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.isShow),expression:"isShow"}],staticClass:"c-time-scalevalue",style:({ '--left': _vm.popupStyle.left, '--top': _vm.popupStyle.top, '--height': _vm.popupStyle.height, '--width': _vm.popupStyle.width })},_vm._l((_vm.times),function(item,index){return _c('span',{directives:[{name:"show",rawName:"v-show",value:(index % 2 == 0),expression:"index % 2 == 0"}],key:item.left,staticClass:"c-time-scalevalue-list",style:({ left: ((item.left - item.width / 2) + "px"), '--font-size': _vm.popupStyle.fontSize })},[_vm._v(" "+_vm._s(item.time)+" ")])}),0)}
5752
5889
  var TimeScaleValuevue_type_template_id_0aa2f038_scoped_true_staticRenderFns = []
5753
5890
 
@@ -6131,7 +6268,7 @@ var FabricScaleValue_component = Object(componentNormalizer["a" /* default */])(
6131
6268
  )
6132
6269
 
6133
6270
  /* harmony default export */ var FabricScaleValue = (FabricScaleValue_component.exports);
6134
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ed0262d0-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/fabric-chart/FabricLines.vue?vue&type=template&id=74aef744&
6271
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"9441c33a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/fabric-chart/FabricLines.vue?vue&type=template&id=74aef744&
6135
6272
  var FabricLinesvue_type_template_id_74aef744_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"line"},[_c('MouseRightClick',{directives:[{name:"show",rawName:"v-show",value:(_vm.isRightVisible),expression:"isRightVisible"}],attrs:{"getContainer":_vm.getContainer,"nodeList":_vm.rightClickNode,"rightPos":_vm.rightPos},on:{"nodeClick":_vm.handleRightClick,"closeRight":function($event){_vm.isRightVisible = false}}}),_c('DropPopup',{directives:[{name:"show",rawName:"v-show",value:(_vm.isDropVisible),expression:"isDropVisible"}],attrs:{"val":_vm.dropVal,"dropPos":_vm.dropPos}})],1)}
6136
6273
  var FabricLinesvue_type_template_id_74aef744_staticRenderFns = []
6137
6274