cnhis-design-vue 2.1.34 → 2.1.36

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 (129) hide show
  1. package/CHANGELOG.md +43 -9
  2. package/es/affix/index.js +8 -8
  3. package/es/age/index.js +10 -10
  4. package/es/alert/index.js +8 -8
  5. package/es/anchor/index.js +8 -8
  6. package/es/auto-complete/index.js +8 -8
  7. package/es/avatar/index.js +8 -8
  8. package/es/back-top/index.js +8 -8
  9. package/es/badge/index.js +8 -8
  10. package/es/base/index.js +8 -8
  11. package/es/big-table/index.js +133 -117
  12. package/es/big-table/style.css +1 -1
  13. package/es/breadcrumb/index.js +8 -8
  14. package/es/button/index.js +22 -22
  15. package/es/calendar/index.js +8 -8
  16. package/es/captcha/index.js +3 -3
  17. package/es/card/index.js +8 -8
  18. package/es/carousel/index.js +8 -8
  19. package/es/cascader/index.js +8 -8
  20. package/es/checkbox/index.js +9 -9
  21. package/es/col/index.js +8 -8
  22. package/es/collapse/index.js +8 -8
  23. package/es/color-picker/index.js +1 -1
  24. package/es/comment/index.js +8 -8
  25. package/es/config-provider/index.js +8 -8
  26. package/es/date-picker/index.js +8 -8
  27. package/es/descriptions/index.js +8 -8
  28. package/es/divider/index.js +8 -8
  29. package/es/drag-layout/index.js +3 -3
  30. package/es/drawer/index.js +8 -8
  31. package/es/dropdown/index.js +8 -8
  32. package/es/editor/index.js +1 -1
  33. package/es/empty/index.js +8 -8
  34. package/es/fabric-chart/index.js +646 -2463
  35. package/es/fabric-chart/style.css +1 -1
  36. package/es/form/index.js +8 -8
  37. package/es/form-model/index.js +8 -8
  38. package/es/form-table/index.js +62 -62
  39. package/es/index/index.js +1801 -3244
  40. package/es/index/style.css +1 -1
  41. package/es/input/index.js +9 -9
  42. package/es/input-number/index.js +8 -8
  43. package/es/layout/index.js +8 -8
  44. package/es/list/index.js +8 -8
  45. package/es/locale-provider/index.js +8 -8
  46. package/es/map/index.js +9 -9
  47. package/es/mentions/index.js +8 -8
  48. package/es/menu/index.js +8 -8
  49. package/es/message/index.js +8 -8
  50. package/es/multi-chat/index.js +726 -379
  51. package/es/multi-chat/style.css +1 -1
  52. package/es/multi-chat-client/index.js +653 -325
  53. package/es/multi-chat-client/style.css +1 -1
  54. package/es/multi-chat-history/index.js +4 -4
  55. package/es/multi-chat-record/index.js +120 -40
  56. package/es/multi-chat-setting/index.js +154 -49
  57. package/es/multi-chat-sip/index.js +1 -1
  58. package/es/notification/index.js +8 -8
  59. package/es/page-header/index.js +8 -8
  60. package/es/pagination/index.js +8 -8
  61. package/es/popconfirm/index.js +8 -8
  62. package/es/popover/index.js +8 -8
  63. package/es/progress/index.js +8 -8
  64. package/es/radio/index.js +9 -9
  65. package/es/rate/index.js +8 -8
  66. package/es/result/index.js +8 -8
  67. package/es/row/index.js +8 -8
  68. package/es/scale-view/index.js +33 -33
  69. package/es/select/index.js +11 -11
  70. package/es/select-label/index.js +11 -11
  71. package/es/select-person/index.js +2 -2
  72. package/es/shortcut-setter/index.js +10 -10
  73. package/es/skeleton/index.js +8 -8
  74. package/es/slider/index.js +8 -8
  75. package/es/space/index.js +8 -8
  76. package/es/spin/index.js +8 -8
  77. package/es/statistic/index.js +8 -8
  78. package/es/steps/index.js +8 -8
  79. package/es/switch/index.js +8 -8
  80. package/es/table-filter/index.js +84 -73
  81. package/es/table-filter/style.css +1 -1
  82. package/es/tabs/index.js +8 -8
  83. package/es/tag/index.js +9 -9
  84. package/es/time-picker/index.js +8 -8
  85. package/es/timeline/index.js +8 -8
  86. package/es/tooltip/index.js +8 -8
  87. package/es/transfer/index.js +8 -8
  88. package/es/tree/index.js +8 -8
  89. package/es/tree-select/index.js +8 -8
  90. package/es/upload/index.js +8 -8
  91. package/es/utils/UniRTCv2.js +50 -15
  92. package/es/verification-code/index.js +2 -2
  93. package/lib/cui.common.js +1940 -3417
  94. package/lib/cui.umd.js +1940 -3417
  95. package/lib/cui.umd.min.js +48 -48
  96. package/package.json +2 -1
  97. package/packages/big-table/src/BigTable.vue +10 -8
  98. package/packages/big-table/src/components/AutoLayoutButton.vue +3 -3
  99. package/packages/fabric-chart/src/FabricChart.vue +8 -36
  100. package/packages/fabric-chart/src/FabricGrid.vue +3 -10
  101. package/packages/fabric-chart/src/components/TimeScaleValue.vue +10 -8
  102. package/packages/fabric-chart/src/const/defaultVaule.js +59 -59
  103. package/packages/fabric-chart/src/fabric-chart/FabricCanvas.vue +3 -3
  104. package/packages/fabric-chart/src/fabric-chart/FabricLines.vue +3 -23
  105. package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +49 -41
  106. package/packages/fabric-chart/src/fabric-chart/FabricScaleValue.vue +5 -6
  107. package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +50 -42
  108. package/packages/fabric-chart/src/mixins/draw.js +25 -5
  109. package/packages/fabric-chart/src/mixins/fabricCommon.js +14 -4
  110. package/packages/multi-chat/chat/audio.vue +82 -14
  111. package/packages/multi-chat/chat/chatFooter.vue +3 -1
  112. package/packages/multi-chat/chat/chatMain.vue +17 -2
  113. package/packages/multi-chat/chat/index.vue +23 -3
  114. package/packages/multi-chat/chat/multiVideo.vue +4 -3
  115. package/packages/multi-chat/chat/video.vue +2 -1
  116. package/packages/multi-chat/store/getters.js +12 -0
  117. package/packages/multi-chat/store/mutation.js +12 -0
  118. package/packages/multi-chat/store/state.js +5 -1
  119. package/packages/multi-chat/utils/index.js +53 -0
  120. package/packages/multi-chat/utils/rtc-client.js +50 -3
  121. package/packages/scale-view/scaleView.vue +2010 -2010
  122. package/packages/table-filter/src/base-search-com/BaseSearch.vue +9 -0
  123. package/src/utils/UniRTCv2.js +40 -12
  124. package/packages/fabric-chart/src/fabric-chart2/FabricBottom.vue +0 -108
  125. package/packages/fabric-chart/src/fabric-chart2/FabricCanvas.vue +0 -181
  126. package/packages/fabric-chart/src/fabric-chart2/FabricCenter.vue +0 -612
  127. package/packages/fabric-chart/src/fabric-chart2/FabricLeft.vue +0 -104
  128. package/packages/fabric-chart/src/fabric-chart2/FabricRight.vue +0 -112
  129. package/packages/fabric-chart/src/fabric-chart2/FabricTop.vue +0 -172
@@ -107,6 +107,17 @@ module.exports = String(test) === '[object z]';
107
107
 
108
108
  module.exports = require("core-js/modules/es.object.freeze.js");
109
109
 
110
+ /***/ }),
111
+
112
+ /***/ "0364":
113
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
114
+
115
+ "use strict";
116
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TimeScaleValue_vue_vue_type_style_index_0_id_184c584a_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("b4ea");
117
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TimeScaleValue_vue_vue_type_style_index_0_id_184c584a_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TimeScaleValue_vue_vue_type_style_index_0_id_184c584a_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
118
+ /* unused harmony reexport * */
119
+
120
+
110
121
  /***/ }),
111
122
 
112
123
  /***/ "0366":
@@ -240,6 +251,13 @@ module.exports = require("core-js/modules/es.array.find.js");
240
251
 
241
252
  /***/ }),
242
253
 
254
+ /***/ "0ebb":
255
+ /***/ (function(module, exports, __webpack_require__) {
256
+
257
+ // extracted by mini-css-extract-plugin
258
+
259
+ /***/ }),
260
+
243
261
  /***/ "13e3":
244
262
  /***/ (function(module, exports) {
245
263
 
@@ -288,12 +306,12 @@ var es_promise_finally = __webpack_require__("a79d");
288
306
  // EXTERNAL MODULE: external "core-js/modules/es.function.name.js"
289
307
  var es_function_name_js_ = __webpack_require__("db0a");
290
308
 
291
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"54b2b90d-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=cb500674&scoped=true&
292
- 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(("FabricCanvas" + (_vm.templateData.type || '')),{ref:"canvasEle",tag:"component",attrs:{"id":_vm.id,"templateData":_vm.templateData}},[(_vm.templateData.type)?[_c('fabric-grid'),_c('fabric-top2',{attrs:{"templateData":_vm.templateData}}),_c('fabric-left2',{attrs:{"templateData":_vm.templateData}}),_c('fabric-right2',{attrs:{"templateData":_vm.templateData}}),_c('fabric-bottom2',{attrs:{"templateData":_vm.templateData}}),_c('fabric-center2',_vm._g({attrs:{"other":_vm.templateData.other,"polyline":_vm.templateData.left.leftYScalevalue},on:{"pointOperation":_vm.pointOperation}},_vm.$listeners))]:[(_vm.hasXScalevalue)?_c('fabric-text-group',_vm._g({attrs:{"templateData":_vm.templateData}},_vm.$listeners)):_vm._e(),_c('fabric-grid'),(_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 || {}},on:{"pointOperation":_vm.pointOperation}},_vm.$listeners)):_vm._e()]],2):_vm._e()],1)}
309
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"832f7c18-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=3a1ac827&scoped=true&
310
+ 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),[(_vm.hasXScalevalue)?_c('fabric-text-group',_vm._g({attrs:{"templateData":_vm.templateData}},_vm.$listeners)):_vm._e(),_c('fabric-grid'),(_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 || {}},on:{"pointOperation":_vm.pointOperation}},_vm.$listeners)):_vm._e()],1):_vm._e()],1)}
293
311
  var staticRenderFns = []
294
312
 
295
313
 
296
- // CONCATENATED MODULE: ./packages/fabric-chart/src/FabricChart.vue?vue&type=template&id=cb500674&scoped=true&
314
+ // CONCATENATED MODULE: ./packages/fabric-chart/src/FabricChart.vue?vue&type=template&id=3a1ac827&scoped=true&
297
315
 
298
316
  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
299
317
  var objectSpread2 = __webpack_require__("5530");
@@ -301,12 +319,12 @@ var objectSpread2 = __webpack_require__("5530");
301
319
  // EXTERNAL MODULE: ./src/core/create.js
302
320
  var create = __webpack_require__("8aef");
303
321
 
304
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"54b2b90d-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=8b6630b2&
305
- var FabricCanvasvue_type_template_id_8b6630b2_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)}
306
- var FabricCanvasvue_type_template_id_8b6630b2_staticRenderFns = []
322
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"832f7c18-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=25f6fbee&
323
+ var FabricCanvasvue_type_template_id_25f6fbee_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)}
324
+ var FabricCanvasvue_type_template_id_25f6fbee_staticRenderFns = []
307
325
 
308
326
 
309
- // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart/FabricCanvas.vue?vue&type=template&id=8b6630b2&
327
+ // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart/FabricCanvas.vue?vue&type=template&id=25f6fbee&
310
328
 
311
329
  // EXTERNAL MODULE: external "core-js/modules/es.array.map.js"
312
330
  var es_array_map_js_ = __webpack_require__("4391");
@@ -419,7 +437,7 @@ var defaultVaule_data = {
419
437
  props: {
420
438
  id: {
421
439
  type: String,
422
- required: true
440
+ default: 'c-fabric-canvas'
423
441
  },
424
442
  templateData: {
425
443
  type: Object,
@@ -657,7 +675,8 @@ var defaultVaule_data = {
657
675
 
658
676
  return ((_this$templateData$ta2 = this.templateData.table) === null || _this$templateData$ta2 === void 0 ? void 0 : _this$templateData$ta2.operable) || {
659
677
  set: false,
660
- connect: false
678
+ connect: false,
679
+ lockMovementX: false
661
680
  };
662
681
  }
663
682
  },
@@ -668,7 +687,7 @@ var defaultVaule_data = {
668
687
  init: function init() {
669
688
  var _this$templateData$to14, _this$templateData$to15;
670
689
 
671
- this.canvas = new this.fabric.Canvas('c-fabric-canvas', Object(objectSpread2["a" /* default */])({
690
+ this.canvas = new this.fabric.Canvas(this.id, Object(objectSpread2["a" /* default */])({
672
691
  width: this.templateData.canvasWidth,
673
692
  height: this.templateData.canvasHeight
674
693
  }, this.canvasAttr));
@@ -777,8 +796,8 @@ var componentNormalizer = __webpack_require__("2877");
777
796
 
778
797
  var component = Object(componentNormalizer["a" /* default */])(
779
798
  fabric_chart_FabricCanvasvue_type_script_lang_js_,
780
- FabricCanvasvue_type_template_id_8b6630b2_render,
781
- FabricCanvasvue_type_template_id_8b6630b2_staticRenderFns,
799
+ FabricCanvasvue_type_template_id_25f6fbee_render,
800
+ FabricCanvasvue_type_template_id_25f6fbee_staticRenderFns,
782
801
  false,
783
802
  null,
784
803
  null,
@@ -787,252 +806,12 @@ var component = Object(componentNormalizer["a" /* default */])(
787
806
  )
788
807
 
789
808
  /* harmony default export */ var FabricCanvas = (component.exports);
790
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"54b2b90d-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-chart2/FabricCanvas.vue?vue&type=template&id=d9708486&
791
- var FabricCanvasvue_type_template_id_d9708486_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)}
792
- var FabricCanvasvue_type_template_id_d9708486_staticRenderFns = []
793
-
794
-
795
- // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart2/FabricCanvas.vue?vue&type=template&id=d9708486&
796
-
797
- // EXTERNAL MODULE: external "core-js/modules/es.array.concat.js"
798
- var es_array_concat_js_ = __webpack_require__("ccb0");
799
-
800
- // EXTERNAL MODULE: external "core-js/modules/es.array.flat.js"
801
- var es_array_flat_js_ = __webpack_require__("da6e");
802
-
803
- // EXTERNAL MODULE: external "core-js/modules/es.array.find.js"
804
- var es_array_find_js_ = __webpack_require__("0d58");
805
-
806
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/fabric-chart2/FabricCanvas.vue?vue&type=script&lang=js&
807
-
808
-
809
-
810
-
811
-
812
- //
813
- //
814
- //
815
- //
816
- //
817
- //
818
- //
819
-
820
- /* harmony default export */ var fabric_chart2_FabricCanvasvue_type_script_lang_js_ = ({
821
- name: 'FabricCanvas2',
822
- props: {
823
- id: {
824
- type: String,
825
- required: true
826
- },
827
- templateData: {
828
- type: Object,
829
- required: true
830
- }
831
- },
832
- data: function data() {
833
- return {
834
- canvas: null,
835
- type: 'canvas',
836
- canvasAttr: {
837
- selectable: false,
838
- evented: false,
839
- selection: false,
840
- containerClass: 'c-fabric-canvas-container',
841
- fireRightClick: true
842
- },
843
- fabric: external_fabric_["fabric"]
844
- };
845
- },
846
- provide: function provide() {
847
- var _this = this;
848
-
849
- return {
850
- $canvas: function $canvas() {
851
- return _this.canvas;
852
- },
853
- $group: function $group() {
854
- return null;
855
- },
856
- $fabric: function $fabric() {
857
- return external_fabric_["fabric"];
858
- },
859
- $propItems: function $propItems() {
860
- return {
861
- type: _this.templateData.type,
862
- endX: _this.endX,
863
- endY: _this.endY,
864
- originX: _this.originX,
865
- originY: _this.originY,
866
- gridYNumber: _this.gridYNumber,
867
- gridXNumber: _this.gridXNumber,
868
- canvasWidth: _this.canvasWidth,
869
- canvasHeight: _this.canvasHeight,
870
- xCellWidth: _this.xCellWidth,
871
- yCellHeight: _this.yCellHeight,
872
- table: Object(objectSpread2["a" /* default */])({}, _this.templateData.table),
873
- xScaleList: _this.xScaleList,
874
- xScaleCell: _this.xScaleCell,
875
- breatheYCell: _this.breatheYCell,
876
- pulseYCell: _this.pulseYCell,
877
- centigradeYCell: _this.centigradeYCell,
878
- eventStyle: _this.eventStyle
879
- };
880
- }
881
- };
882
- },
883
- computed: {
884
- canvasWidth: function canvasWidth() {
885
- // 画布宽度
886
- return this.templateData.canvasWidth;
887
- },
888
- canvasHeight: function canvasHeight() {
889
- // 画布高度
890
- return this.templateData.canvasHeight;
891
- },
892
- gridXNumber: function gridXNumber() {
893
- // 网格水平方向总数 如果设置了默认值就直接取用
894
- return this.templateData.table.mainXCell * this.templateData.table.subXCell;
895
- },
896
- gridYNumber: function gridYNumber() {
897
- // 网格垂直方向总数
898
- return this.templateData.table.mainYCell * this.templateData.table.subYCell;
899
- },
900
- originX: function originX() {
901
- var originX = this.templateData.top.titleWidth;
902
- var residue = (this.endX - originX) % this.gridXNumber;
903
- return originX + residue;
904
- },
905
- originY: function originY() {
906
- var _top$date;
907
-
908
- // 顶部列表高度 网格不需要的高度放到顶部始终存在的时间那一行,因为底部不一定存在列表
909
- var top = this.templateData.top;
910
- var dateHeight = ((_top$date = top.date) === null || _top$date === void 0 ? void 0 : _top$date.height) || 0;
911
- var dayHeight = top.dayHeight || 0;
912
- var xScaleHeight = top.xScalevalue.height || 15;
913
- var topHeight = dateHeight + dayHeight + xScaleHeight;
914
- var residue = (this.endY - topHeight) % this.gridYNumber;
915
- return topHeight + residue;
916
- },
917
- endX: function endX() {
918
- // 网格区域水平方向最大坐标值, 也是整个画布右侧列表坐标起始值,网格右下角x轴坐标值
919
- if (!this.templateData.right) return this.templateData.canvasWidth;
920
- var endWidth = this.templateData.right.width || 50;
921
- return this.templateData.canvasWidth - endWidth;
922
- },
923
- endY: function endY() {
924
- // 画布高度 - 底部列表高度 ,网格右下角y轴坐标值
925
- if (!this.templateData.bottom) return this.templateData.canvasHeight;
926
- var endHeight = this.templateData.bottom.height || 30;
927
- return this.canvasHeight - endHeight;
928
- },
929
- xCellWidth: function xCellWidth() {
930
- // 水平方向网格宽度
931
- return (this.endX - this.originX) / this.gridXNumber;
932
- },
933
- yCellHeight: function yCellHeight() {
934
- // 垂直方向网格宽度
935
- return (this.endY - this.originY) / this.gridYNumber;
936
- },
937
- // 转换为时间戳的x轴刻度list
938
- xScaleList: function xScaleList() {
939
- var dateList = this.templateData.top.date.list;
940
- var dayList = this.templateData.top.xScalevalue.list;
941
- var timeList = dateList.map(function (item) {
942
- return dayList.map(function (v) {
943
- return new Date("".concat(item, " ").concat(v, ":00")).getTime();
944
- });
945
- });
946
- return timeList.flat();
947
- },
948
- // x轴每格的时间,比如4小时,不能刻度list长度值除以总格子数计算,因为有可能刻度比较短,不能满足所有的格子
949
- xScaleCell: function xScaleCell() {
950
- return this.xScaleList[1] - this.xScaleList[0]; // 返回时间戳
951
- },
952
- // y轴每一次的呼吸的高度值
953
- breatheYCell: function breatheYCell() {
954
- var leftYScalevalue = this.templateData.left.leftYScalevalue;
955
- var list = leftYScalevalue.find(function (v) {
956
- return v.type === 'breathe';
957
- }).list;
958
- return list ? this.yCellHeight / ((parseInt(list[1]) - parseInt(list[0])) / this.templateData.left.spaceGridNumber) : 0;
959
- },
960
- // y轴每mmHg的脉搏/心率的高度值
961
- pulseYCell: function pulseYCell() {
962
- var leftYScalevalue = this.templateData.left.leftYScalevalue;
963
- var list = leftYScalevalue.find(function (v) {
964
- return v.type === 'pulse';
965
- }).list;
966
- return this.yCellHeight / ((parseInt(list[1]) - parseInt(list[0])) / this.templateData.left.spaceGridNumber);
967
- },
968
- // y轴每摄氏度的高度值
969
- centigradeYCell: function centigradeYCell() {
970
- var _this$templateData$le = this.templateData.left,
971
- leftYScalevalue = _this$templateData$le.leftYScalevalue,
972
- spaceGridNumber = _this$templateData$le.spaceGridNumber;
973
- var list = leftYScalevalue.find(function (v) {
974
- return v.type === 'centigrade';
975
- }).list;
976
- return this.yCellHeight / ((parseInt(list[1]) - parseInt(list[0])) / spaceGridNumber);
977
- },
978
- eventStyle: function eventStyle() {
979
- var _this$templateData$ta;
980
-
981
- return ((_this$templateData$ta = this.templateData.table) === null || _this$templateData$ta === void 0 ? void 0 : _this$templateData$ta.eventStyle) || {
982
- selectable: true,
983
- evented: true
984
- };
985
- }
986
- },
987
- mounted: function mounted() {
988
- this.init();
989
- },
990
- methods: {
991
- init: function init() {
992
- this.canvas = new this.fabric.Canvas('c-fabric-canvas', Object(objectSpread2["a" /* default */])({
993
- width: this.templateData.canvasWidth,
994
- height: this.templateData.canvasHeight
995
- }, this.canvasAttr));
996
- },
997
- toDataURL: function toDataURL(option) {
998
- return this.canvas.toDataURL(option);
999
- },
1000
- renderCanvas: function renderCanvas() {
1001
- this.canvas.clear(); // this.canvas.renderCanvas();
1002
- }
1003
- },
1004
- beforeDestroy: function beforeDestroy() {
1005
- this.canvas.dispose();
1006
- }
1007
- });
1008
- // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart2/FabricCanvas.vue?vue&type=script&lang=js&
1009
- /* harmony default export */ var src_fabric_chart2_FabricCanvasvue_type_script_lang_js_ = (fabric_chart2_FabricCanvasvue_type_script_lang_js_);
1010
- // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart2/FabricCanvas.vue
1011
-
1012
-
1013
-
1014
-
1015
-
1016
- /* normalize component */
1017
-
1018
- var FabricCanvas_component = Object(componentNormalizer["a" /* default */])(
1019
- src_fabric_chart2_FabricCanvasvue_type_script_lang_js_,
1020
- FabricCanvasvue_type_template_id_d9708486_render,
1021
- FabricCanvasvue_type_template_id_d9708486_staticRenderFns,
1022
- false,
1023
- null,
1024
- null,
1025
- null
1026
-
1027
- )
1028
-
1029
- /* harmony default export */ var fabric_chart2_FabricCanvas = (FabricCanvas_component.exports);
1030
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"54b2b90d-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=4464d5bc&
1031
- var FabricPolylinesvue_type_template_id_4464d5bc_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"poly-line"},[(_vm.isRightVisible)?_c('MouseRightClick',{attrs:{"getContainer":_vm.getContainer,"nodeList":_vm.rightClickNode,"rightPos":_vm.rightPos},on:{"nodeClick":_vm.handleRightClick,"closeRight":function($event){_vm.isRightVisible = false}}}):_vm._e(),_c('DropPopup',{directives:[{name:"show",rawName:"v-show",value:(_vm.isDropVisible),expression:"isDropVisible"}],attrs:{"val":_vm.dropVal,"dropPos":_vm.dropPos}})],1)}
1032
- var FabricPolylinesvue_type_template_id_4464d5bc_staticRenderFns = []
809
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"832f7c18-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=6b4be9a4&
810
+ var FabricPolylinesvue_type_template_id_6b4be9a4_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"poly-line"},[(_vm.isRightVisible)?_c('MouseRightClick',{attrs:{"getContainer":_vm.getContainer,"nodeList":_vm.rightClickNode,"rightPos":_vm.rightPos},on:{"nodeClick":_vm.handleRightClick,"closeRight":function($event){_vm.isRightVisible = false}}}):_vm._e(),_c('DropPopup',{directives:[{name:"show",rawName:"v-show",value:(_vm.isDropVisible),expression:"isDropVisible"}],attrs:{"val":_vm.dropVal,"dropPos":_vm.dropPos}})],1)}
811
+ var FabricPolylinesvue_type_template_id_6b4be9a4_staticRenderFns = []
1033
812
 
1034
813
 
1035
- // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart/FabricPolylines.vue?vue&type=template&id=4464d5bc&
814
+ // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart/FabricPolylines.vue?vue&type=template&id=6b4be9a4&
1036
815
 
1037
816
  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
1038
817
  var asyncToGenerator = __webpack_require__("1da1");
@@ -1055,6 +834,12 @@ var es_array_includes_js_ = __webpack_require__("85f7");
1055
834
  // EXTERNAL MODULE: external "core-js/modules/es.string.includes.js"
1056
835
  var es_string_includes_js_ = __webpack_require__("fd22");
1057
836
 
837
+ // EXTERNAL MODULE: external "core-js/modules/es.array.find.js"
838
+ var es_array_find_js_ = __webpack_require__("0d58");
839
+
840
+ // EXTERNAL MODULE: external "core-js/modules/es.array.concat.js"
841
+ var es_array_concat_js_ = __webpack_require__("ccb0");
842
+
1058
843
  // EXTERNAL MODULE: external "core-js/modules/es.string.replace.js"
1059
844
  var es_string_replace_js_ = __webpack_require__("6378");
1060
845
 
@@ -1085,15 +870,11 @@ var es_array_slice_js_ = __webpack_require__("ea12");
1085
870
  // EXTERNAL MODULE: external "core-js/modules/es.object.freeze.js"
1086
871
  var es_object_freeze_js_ = __webpack_require__("030b");
1087
872
 
1088
- // EXTERNAL MODULE: external "vxe-table"
1089
- var external_vxe_table_ = __webpack_require__("f906");
1090
-
1091
873
  // CONCATENATED MODULE: ./packages/fabric-chart/src/mixins/fabricCommon.js
1092
874
 
1093
875
 
1094
876
 
1095
877
 
1096
-
1097
878
  /* harmony default export */ var fabricCommon = ({
1098
879
  name: 'fabric-common',
1099
880
  inject: ['$canvas', '$group', '$propItems', '$fabric'],
@@ -1114,6 +895,22 @@ var external_vxe_table_ = __webpack_require__("f906");
1114
895
  return this.$propItems();
1115
896
  }
1116
897
  },
898
+ watch: {
899
+ canvas: {
900
+ handler: function handler(value) {
901
+ var _this = this;
902
+
903
+ if (value) {
904
+ this.$nextTick(function () {
905
+ var _this$init;
906
+
907
+ (_this$init = _this.init) === null || _this$init === void 0 ? void 0 : _this$init.call(_this);
908
+ });
909
+ }
910
+ },
911
+ immediate: true
912
+ }
913
+ },
1117
914
  methods: {
1118
915
  // 根据x轴坐标获取对应的时间点
1119
916
  // getXValue(left) {
@@ -1264,10 +1061,6 @@ var type_isObject = function isObject(obj) {
1264
1061
  var lineStyle = this.isObject(style) ? Object(objectSpread2["a" /* default */])({}, style) : {};
1265
1062
  return new this.fabric.Line(points, Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, this.defaultLineStyle), lineStyle));
1266
1063
  },
1267
- // 绘制点
1268
- // drawPoint(points, style) {
1269
- // console.log(points, style);
1270
- // },
1271
1064
  // 绘制文本区
1272
1065
  drawTextGroup: function drawTextGroup(rectStyle, fontStyle, groupStyle) {
1273
1066
  var rect_style = this.isObject(rectStyle) ? Object(objectSpread2["a" /* default */])({}, rectStyle) : {};
@@ -1307,7 +1100,10 @@ var type_isObject = function isObject(obj) {
1307
1100
  // });
1308
1101
  // fabric.loadSVGFromURL的工作方式相同,只不过您传递的是包含URL而不是SVG内容的字符串
1309
1102
  return new Promise(function (resolve, reject) {
1310
- var svg = document.querySelector(iconClassName).querySelector('svg');
1103
+ var _document, _document$querySelect;
1104
+
1105
+ var svg = (_document = document) === null || _document === void 0 ? void 0 : (_document$querySelect = _document.querySelector(iconClassName)) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.querySelector('svg');
1106
+ if (!svg) reject('图片转换svg失败!');
1311
1107
  svg.setAttribute('version', 1.1);
1312
1108
  svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
1313
1109
  svg.style.color = others.color || '#000';
@@ -1413,14 +1209,15 @@ var type_isObject = function isObject(obj) {
1413
1209
  var _this = this;
1414
1210
 
1415
1211
  return Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
1416
- var obj1, obj2;
1212
+ var obj1, obj2, width, height, _width, _height, obj3;
1213
+
1417
1214
  return regeneratorRuntime.wrap(function _callee$(_context) {
1418
1215
  while (1) {
1419
1216
  switch (_context.prev = _context.next) {
1420
1217
  case 0:
1421
1218
  data.hoverCursor = 'pointer';
1422
1219
  _context.t0 = type;
1423
- _context.next = _context.t0 === 'triangle' ? 4 : _context.t0 === 'circle' ? 5 : _context.t0 === 'img' ? 6 : _context.t0 === 'arrow' ? 9 : _context.t0 === '+' ? 10 : _context.t0 === 'shjs' ? 11 : _context.t0 === 'shks' ? 14 : _context.t0 === 'cg' ? 17 : _context.t0 === 'jxtq' ? 20 : 21;
1220
+ _context.next = _context.t0 === 'triangle' ? 4 : _context.t0 === 'circle' ? 5 : _context.t0 === 'img' ? 6 : _context.t0 === 'arrow' ? 9 : _context.t0 === '+' ? 10 : _context.t0 === 'shjs' ? 11 : _context.t0 === 'shks' ? 14 : _context.t0 === 'qgcg' ? 17 : _context.t0 === 'zrhz' ? 21 : _context.t0 === 'cg' ? 26 : _context.t0 === 'jxtq' ? 29 : 30;
1424
1221
  break;
1425
1222
 
1426
1223
  case 4:
@@ -1503,16 +1300,39 @@ var type_isObject = function isObject(obj) {
1503
1300
  }, data)));
1504
1301
 
1505
1302
  case 17:
1303
+ width = data.width, height = data.height;
1304
+ obj1 = new _this.fabric.Line([0, height / 2, width, height / 2], Object(objectSpread2["a" /* default */])({
1305
+ strokeWidth: 1
1306
+ }, data));
1307
+ obj2 = _this.createCircleBorder(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, data), {}, {
1308
+ width: width / 2
1309
+ }));
1310
+ return _context.abrupt("return", new _this.fabric.Group([obj2, obj1], Object(objectSpread2["a" /* default */])({}, data)));
1311
+
1312
+ case 21:
1313
+ _width = data.width, _height = data.height;
1314
+ obj1 = new _this.fabric.Line([0, _height / 2, _width, _height / 2], Object(objectSpread2["a" /* default */])({
1315
+ strokeWidth: 1
1316
+ }, data));
1317
+ obj2 = _this.createCircleBorder(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, data), {}, {
1318
+ width: _width / 2
1319
+ }));
1320
+ obj3 = _this.createCircleBorder(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, data), {}, {
1321
+ width: _width / 3
1322
+ }));
1323
+ return _context.abrupt("return", new _this.fabric.Group([obj2, obj3, obj1], Object(objectSpread2["a" /* default */])({}, data)));
1324
+
1325
+ case 26:
1506
1326
  obj1 = _this.ceateLineArrow(data);
1507
1327
  obj2 = _this.createCircleBorder(data);
1508
1328
  return _context.abrupt("return", new _this.fabric.Group([obj2, obj1], Object(objectSpread2["a" /* default */])({
1509
1329
  scale: 1
1510
1330
  }, data)));
1511
1331
 
1512
- case 20:
1332
+ case 29:
1513
1333
  return _context.abrupt("return", _this.createJXTQ(data));
1514
1334
 
1515
- case 21:
1335
+ case 30:
1516
1336
  // 文字(默认:比如 type === x)
1517
1337
  data.stroke && delete data.stroke;
1518
1338
  return _context.abrupt("return", new _this.fabric.Text(String(type), Object(objectSpread2["a" /* default */])({
@@ -1522,7 +1342,7 @@ var type_isObject = function isObject(obj) {
1522
1342
  fill: '#000'
1523
1343
  }, data)));
1524
1344
 
1525
- case 23:
1345
+ case 32:
1526
1346
  case "end":
1527
1347
  return _context.stop();
1528
1348
  }
@@ -1627,7 +1447,7 @@ var type_isObject = function isObject(obj) {
1627
1447
  }
1628
1448
  }
1629
1449
  });
1630
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"54b2b90d-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&
1450
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"832f7c18-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&
1631
1451
  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)])}
1632
1452
  var MouseRightClickvue_type_template_id_25d4407a_scoped_true_staticRenderFns = []
1633
1453
 
@@ -1735,7 +1555,7 @@ var MouseRightClick_component = Object(componentNormalizer["a" /* default */])(
1735
1555
  )
1736
1556
 
1737
1557
  /* harmony default export */ var MouseRightClick = (MouseRightClick_component.exports);
1738
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"54b2b90d-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&
1558
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"832f7c18-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&
1739
1559
  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)])}
1740
1560
  var DropPopupvue_type_template_id_c4db0ace_scoped_true_staticRenderFns = []
1741
1561
 
@@ -1992,22 +1812,18 @@ var rightClickNodeConnect = [{
1992
1812
  }
1993
1813
  },
1994
1814
  watch: {},
1995
- mounted: function mounted() {
1996
- var _this2 = this;
1997
-
1998
- this.$nextTick(function () {
1999
- _this2.drawPolylineTitle();
2000
-
2001
- _this2.polylinePointList = [];
1815
+ mounted: function mounted() {},
1816
+ methods: {
1817
+ init: function init() {
1818
+ var _this2 = this;
2002
1819
 
2003
- _this2.polyline.forEach(function (polylineType, polylineTypeId) {
1820
+ this.drawPolylineTitle();
1821
+ this.polylinePointList = [];
1822
+ this.polyline.forEach(function (polylineType, polylineTypeId) {
2004
1823
  _this2.createPolyline(polylineType, polylineTypeId);
2005
1824
  });
2006
-
2007
- _this2.eventStyle.evented && _this2.createEvent();
2008
- });
2009
- },
2010
- methods: {
1825
+ this.eventStyle.evented && this.createEvent();
1826
+ },
2011
1827
  createEvent: function createEvent() {
2012
1828
  var _this3 = this;
2013
1829
 
@@ -2106,8 +1922,7 @@ var rightClickNodeConnect = [{
2106
1922
  height: event.pointer.y - selectAreaOrigin.top,
2107
1923
  ponits: [selectAreaOrigin.left, selectAreaOrigin.top, event.pointer.x, event.pointer.y]
2108
1924
  }));
2109
- this.canvas.add(this.selectArea);
2110
- this.canvas.renderAll();
1925
+ this.canvas.add(this.selectArea); // this.canvas.renderAll();
2111
1926
  },
2112
1927
  // 每一个折线类别
2113
1928
  createPolyline: function createPolyline(polylineType, polylineTypeId) {
@@ -2192,7 +2007,7 @@ var rightClickNodeConnect = [{
2192
2007
  selectable: false,
2193
2008
  evented: false
2194
2009
  };
2195
- var types = ['arrow', '+', 'shjs', 'shks', 'cg', 'jxtq'];
2010
+ var types = ['arrow', '+', 'shjs', 'shks', 'cg', 'jxtq', 'qgcg', 'zrhz'];
2196
2011
  leftTitleList.forEach( /*#__PURE__*/function () {
2197
2012
  var _ref = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regeneratorRuntime.mark(function _callee(v, i) {
2198
2013
  var _v$pointAttr2;
@@ -2262,8 +2077,6 @@ var rightClickNodeConnect = [{
2262
2077
  scaleX: 1,
2263
2078
  scaleY: 1
2264
2079
  });
2265
-
2266
- _this6.canvas.renderAll();
2267
2080
  }
2268
2081
 
2269
2082
  if (!cloneIconId) {
@@ -2276,8 +2089,6 @@ var rightClickNodeConnect = [{
2276
2089
  clonedObj.bringForward();
2277
2090
 
2278
2091
  _this6.canvas.add(clonedObj);
2279
-
2280
- _this6.canvas.renderAll();
2281
2092
  });
2282
2093
  }
2283
2094
 
@@ -2293,17 +2104,14 @@ var rightClickNodeConnect = [{
2293
2104
  _this6.showDrapPopup(icon);
2294
2105
  } else {
2295
2106
  _this6.isDropVisible = false;
2296
- }
2107
+ } // this.canvas.renderAll();
2297
2108
 
2298
- _this6.canvas.renderAll();
2299
2109
  }); // 标题折线点停止拖拽后 更新
2300
2110
 
2301
2111
  icon.on('moved', function () {
2302
2112
  icon.set({
2303
2113
  id: icon.id.replace('_isTitle', '')
2304
- });
2305
-
2306
- _this6.canvas.renderAll();
2114
+ }); // this.canvas.renderAll();
2307
2115
 
2308
2116
  _this6.removeTitle();
2309
2117
 
@@ -2339,11 +2147,10 @@ var rightClickNodeConnect = [{
2339
2147
  }
2340
2148
  }
2341
2149
 
2342
- _this6.canvas.add(text, icon);
2150
+ _this6.canvas.add(text, icon); // this.canvas.requestRenderAll();
2343
2151
 
2344
- _this6.canvas.requestRenderAll();
2345
2152
 
2346
- case 23:
2153
+ case 22:
2347
2154
  case "end":
2348
2155
  return _context.stop();
2349
2156
  }
@@ -2455,9 +2262,8 @@ var rightClickNodeConnect = [{
2455
2262
  lines.push(_line, _text);
2456
2263
  }
2457
2264
 
2458
- (_this$canvas = this.canvas).add.apply(_this$canvas, lines);
2265
+ (_this$canvas = this.canvas).add.apply(_this$canvas, lines); // this.canvas.renderAll();
2459
2266
 
2460
- this.canvas.renderAll();
2461
2267
  },
2462
2268
 
2463
2269
  /**
@@ -2535,9 +2341,9 @@ var rightClickNodeConnect = [{
2535
2341
  if (points) {
2536
2342
  Object.assign(pointOthers, {
2537
2343
  originLeft: points[0],
2538
- originTop: points[1]
2344
+ originTop: points[1],
2345
+ time: linePoints.time
2539
2346
  });
2540
- pointOthers.time = linePoints.time;
2541
2347
  point = previousLine ? _this9.drawPoint.apply(_this9, Object(toConsumableArray["a" /* default */])(points).concat([previousLine, line, polyline.type, pointOthers, isInit])) : _this9.drawPoint.apply(_this9, Object(toConsumableArray["a" /* default */])(points).concat([null, line, polyline.type, pointOthers, isInit]));
2542
2348
  }
2543
2349
 
@@ -2586,9 +2392,8 @@ var rightClickNodeConnect = [{
2586
2392
  return v;
2587
2393
  });
2588
2394
 
2589
- (_this9$canvas = _this9.canvas).add.apply(_this9$canvas, Object(toConsumableArray["a" /* default */])(lineList).concat(Object(toConsumableArray["a" /* default */])(res)));
2395
+ (_this9$canvas = _this9.canvas).add.apply(_this9$canvas, Object(toConsumableArray["a" /* default */])(lineList).concat(Object(toConsumableArray["a" /* default */])(res))); // this.canvas.requestRenderAll();
2590
2396
 
2591
- _this9.canvas.requestRenderAll();
2592
2397
  });
2593
2398
  this.createAttrVaule('critical', polyline, polylineIndex, polylineType, polylineTypeId);
2594
2399
  this.createAttrVaule('diffValue', polyline, polylineIndex, polylineType, polylineTypeId);
@@ -2668,9 +2473,8 @@ var rightClickNodeConnect = [{
2668
2473
 
2669
2474
  _this10.pointMoveUpdateLine(point);
2670
2475
 
2671
- _this10.addPoint(point);
2476
+ _this10.addPoint(point); // this.canvas.renderAll();
2672
2477
 
2673
- _this10.canvas.renderAll();
2674
2478
 
2675
2479
  _this10.showDrapPopup(point);
2676
2480
  }); // 折线点停止拖拽后 更新polyline中对应的坐标
@@ -2710,6 +2514,7 @@ var rightClickNodeConnect = [{
2710
2514
  var _this11 = this;
2711
2515
 
2712
2516
  var isInit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
2517
+ var operable = this.propItems.operable;
2713
2518
 
2714
2519
  var _this$getValue = this.getValue(point),
2715
2520
  data = _this$getValue.data,
@@ -2718,7 +2523,7 @@ var rightClickNodeConnect = [{
2718
2523
 
2719
2524
  Object.assign(data, {
2720
2525
  value: {
2721
- time: x,
2526
+ time: operable.lockMovementX ? point.time : x,
2722
2527
  value: y
2723
2528
  },
2724
2529
  isInit: isInit
@@ -2742,8 +2547,16 @@ var rightClickNodeConnect = [{
2742
2547
 
2743
2548
  this.$emit('pointChange', data);
2744
2549
  } else {
2550
+ this.$nextTick(function () {
2551
+ // 拖动新增节点时默认所有节点可删除
2552
+ _this11.currentDelPoint = null;
2553
+ });
2745
2554
  var lastPoint = this.addPointList.at(-1);
2746
- var position = this.polyline[point.polylineTypeId].position; // 如果是重合/连线节点
2555
+ var position = this.polyline[point.polylineTypeId].position;
2556
+
2557
+ var _this$addPointList = Object(slicedToArray["a" /* default */])(this.addPointList, 1),
2558
+ firstPoint = _this$addPointList[0]; // 如果是重合/连线节点
2559
+
2747
2560
 
2748
2561
  if (point.get('scaleX') !== point.scale) {
2749
2562
  var _this$_concatPoint, _this$_concatPoint2;
@@ -2774,7 +2587,7 @@ var rightClickNodeConnect = [{
2774
2587
  return;
2775
2588
  }
2776
2589
 
2777
- !point.line2 && this.addPointList.splice(0, 1);
2590
+ !point.line2 && firstPoint.left <= point.originLeft && this.addPointList.splice(0, 1);
2778
2591
  !point.id.includes('isTitle') && this.removePolyline(point.id);
2779
2592
 
2780
2593
  if (this.addPointList.length > 0) {
@@ -2809,237 +2622,214 @@ var rightClickNodeConnect = [{
2809
2622
  addPoint: function addPoint(point) {
2810
2623
  var _this12 = this;
2811
2624
 
2812
- return Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
2813
- var _this12$propItems, xCellWidth, table, originX, addPointSpaceGridNumber, left, top, originLeft, originTop, currentLeft, startLength, n, spaceWidth, residue, condition, conditionNoLine2, conditionHasLine2, checkPoints, points1, _this12$getValue, data, x, y, concatPoint, polylineTypeId, polylineIndex, polylineObj, _polylineObj$pointLis, endLength;
2814
-
2815
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
2816
- while (1) {
2817
- switch (_context3.prev = _context3.next) {
2818
- case 0:
2819
- concatPoint = function _concatPoint(target) {
2820
- var targetLeft = target.left,
2821
- targetTop = target.top;
2822
- point.setCoords();
2823
-
2824
- if (left >= targetLeft - n && left <= targetLeft + n && top <= targetTop + n && top >= targetTop - n) {
2825
- point.set({
2826
- left: targetLeft,
2827
- top: targetTop,
2828
- scaleX: point.scale === 1 ? 2.5 : 0.1,
2829
- scaleY: point.scale === 1 ? 2.5 : 0.1
2830
- });
2831
- } else {
2832
- point.set({
2833
- scaleX: point.scale,
2834
- scaleY: point.scale
2835
- });
2836
- }
2837
- };
2838
-
2839
- _this12$propItems = _this12.propItems, xCellWidth = _this12$propItems.xCellWidth, table = _this12$propItems.table, originX = _this12$propItems.originX; // const addPointSpaceGridNumbers = table.addPointSpaceGridNumbers || [];
2840
-
2841
- addPointSpaceGridNumber = table.addPointSpaceGridNumber || 1;
2842
- left = point.left, top = point.top, originLeft = point.originLeft, originTop = point.originTop;
2843
- currentLeft = left;
2844
- startLength = _this12.addPointList.length;
2845
- n = 6; // 拖动范围,在需要增加节点的刻度左右吸入的范围值
2846
-
2847
- spaceWidth = xCellWidth * addPointSpaceGridNumber;
2848
- residue = (left - originLeft) % spaceWidth;
2849
- condition = residue > spaceWidth - n || residue < n;
2850
- conditionNoLine2 = !point.line2 && left > originLeft;
2851
- conditionHasLine2 = point.line2 && left > originLeft + spaceWidth; // if (!point.line2 && left > originLeft && condition) {
2625
+ var _this$propItems4 = this.propItems,
2626
+ xCellWidth = _this$propItems4.xCellWidth,
2627
+ table = _this$propItems4.table,
2628
+ originX = _this$propItems4.originX; // const addPointSpaceGridNumbers = table.addPointSpaceGridNumbers || [];
2629
+
2630
+ var addPointSpaceGridNumber = table.addPointSpaceGridNumber || 1;
2631
+ var left = point.left,
2632
+ top = point.top,
2633
+ originLeft = point.originLeft,
2634
+ originTop = point.originTop;
2635
+ var currentLeft = left;
2636
+ var startLength = this.addPointList.length;
2637
+ var n = 6; // 拖动范围,在需要增加节点的刻度左右吸入的范围值
2638
+
2639
+ var spaceWidth = xCellWidth * addPointSpaceGridNumber;
2640
+ var residue = (left - originLeft) % spaceWidth;
2641
+ var condition = residue > 0 && (residue > spaceWidth - n || residue < n);
2642
+ var conditionNoLine2 = !point.line2 && left > originLeft;
2643
+ var conditionHasLine2 = point.line2 && left > originLeft + spaceWidth; // if (!point.line2 && left > originLeft && condition) {
2644
+
2645
+ if (condition && (conditionNoLine2 || conditionHasLine2)) {
2646
+ if (residue > spaceWidth - n) left = left - residue + spaceWidth;
2647
+ if (residue < n) left = left - residue;
2648
+ point.set({
2649
+ left: left
2650
+ });
2852
2651
 
2853
- if (!(condition && (conditionNoLine2 || conditionHasLine2))) {
2854
- _context3.next = 35;
2855
- break;
2856
- }
2652
+ var checkPoints = function checkPoints() {
2653
+ var _this12$addPointList;
2857
2654
 
2858
- if (residue > spaceWidth - n) left = left - residue + spaceWidth;
2859
- if (residue < n) left = left - residue;
2860
- point.set({
2861
- left: left
2862
- });
2655
+ var PointLens = Math.floor((left - originLeft) / spaceWidth);
2863
2656
 
2864
- checkPoints = function checkPoints() {
2865
- var _this12$addPointList;
2657
+ if (PointLens > 1 && ((_this12$addPointList = _this12.addPointList) === null || _this12$addPointList === void 0 ? void 0 : _this12$addPointList.length) <= PointLens) {
2658
+ for (var k = 0; k <= PointLens; k++) {
2659
+ if (k > 0) {
2660
+ (function () {
2661
+ var curLeft = originLeft + spaceWidth * k; // 判断this.addPointList中的left是否包含curLeft,不包含就说明是漏了
2866
2662
 
2867
- var PointLens = Math.floor((left - originLeft) / spaceWidth);
2663
+ var hasPoint = _this12.addPointList.some(function (p) {
2664
+ return Math.abs(p.left - curLeft) <= 0.001;
2665
+ }); // const hasPoint = this.addPointList.some(v => v.left == curLeft);
2868
2666
 
2869
- if (PointLens > 1 && ((_this12$addPointList = _this12.addPointList) === null || _this12$addPointList === void 0 ? void 0 : _this12$addPointList.length) < PointLens) {
2870
- for (var k = 0; k < PointLens; k++) {
2871
- if (k > 0) {
2872
- (function () {
2873
- var curLeft = originLeft + spaceWidth * k; // 判断this.addPointList中的left是否包含curLeft,不包含就说明是漏了
2874
2667
 
2875
- var isNoLack = _this12.addPointList.some(function (v) {
2876
- return v.left === curLeft;
2877
- });
2668
+ if (!hasPoint) {
2669
+ var index;
2878
2670
 
2879
- if (!isNoLack) {
2880
- var index;
2671
+ var pointObj = _this12.addPointList.find(function (v, i) {
2672
+ if (v.left > curLeft) {
2673
+ index = i;
2674
+ }
2881
2675
 
2882
- var pointObj = _this12.addPointList.find(function (v, i) {
2883
- if (v.left > curLeft) {
2884
- index = i;
2885
- }
2676
+ return v.left > curLeft;
2677
+ });
2886
2678
 
2887
- return v.left > curLeft;
2888
- });
2679
+ if (pointObj) {
2680
+ var cloneObj = JSON.parse(JSON.stringify(pointObj));
2681
+ var len = ~~((pointObj.left - (curLeft - spaceWidth)) / spaceWidth);
2682
+ var prePoint = _this12.addPointList[index - 1] || pointObj;
2683
+ var spaceHeight = (pointObj.top - prePoint.top) / len;
2684
+ var position = _this12.polyline[point.polylineTypeId].position;
2685
+ cloneObj.top = prePoint.top + spaceHeight;
2686
+ cloneObj.value.time = _this12.getXValue(curLeft);
2687
+ cloneObj.value.value = _this12.getYValue(position, cloneObj.top);
2688
+ cloneObj.left = curLeft;
2889
2689
 
2890
- if (pointObj) {
2891
- var cloneObj = JSON.parse(JSON.stringify(pointObj));
2892
- cloneObj.value.time = _this12.getXValue(curLeft);
2893
- cloneObj.left = curLeft; // 补充的节点会和滑动的线条对应不上
2894
- // await this.clonePoint(point, [curLeft, cloneObj.top, cloneObj.left, cloneObj.top])
2690
+ _this12.addPointList.splice(index, 0, cloneObj);
2895
2691
 
2896
- _this12.addPointList.splice(index, 0, cloneObj);
2897
- }
2898
- }
2899
- })();
2900
- }
2692
+ _this12.clonePoint(point, [prePoint.left, prePoint.top, cloneObj.left, cloneObj.top]);
2901
2693
  }
2902
2694
  }
2903
- }; // const i = Math.floor((left - originLeft) / spaceWidth);
2904
- // 复制点和线
2695
+ })();
2696
+ }
2697
+ }
2698
+ }
2699
+ }; // const i = Math.floor((left - originLeft) / spaceWidth);
2700
+ // 复制点和线
2701
+
2702
+
2703
+ if (conditionNoLine2 || conditionHasLine2) {
2704
+ // point.line1 && this.removePolyline(point.line1.id);
2705
+ setPointLineColor(point, 'transparent', conditionHasLine2);
2706
+ this.addPointList.length == 0 && this.clonePoint(point, [point.line1 ? point.line1.x1 : originLeft, point.line1 ? point.line1.y1 : originTop, originLeft, originTop]);
2707
+
2708
+ if (this.addPointList.every(function (v) {
2709
+ return v.left !== left;
2710
+ })) {
2711
+ // const points1 = i === 1 ? [originLeft, originTop] : point.prePoints;
2712
+ var points1 = this.addPointList.length == 0 ? [originLeft, originTop] : point.prePoints;
2713
+
2714
+ if (points1) {
2715
+ // this.setAddPointList(point);
2716
+ // 调用上面方法就会导致线段绘制失败,目前还不知道为啥子
2717
+ var _this$getValue3 = this.getValue(point),
2718
+ data = _this$getValue3.data,
2719
+ x = _this$getValue3.x,
2720
+ y = _this$getValue3.y;
2721
+
2722
+ data.value = {
2723
+ time: x,
2724
+ value: y
2725
+ };
2726
+ data.left = left;
2727
+ data.top = top;
2728
+ this.addPointList.push(data);
2729
+ this.clonePoint(point, [].concat(Object(toConsumableArray["a" /* default */])(points1), [left, top]));
2730
+ }
2731
+ }
2905
2732
 
2733
+ checkPoints();
2734
+ }
2735
+ } // 断点相连
2906
2736
 
2907
- if (!(conditionNoLine2 || conditionHasLine2)) {
2908
- _context3.next = 35;
2909
- break;
2910
- }
2911
2737
 
2912
- // point.line1 && this.removePolyline(point.line1.id);
2913
- setPointLineColor(point, 'transparent', conditionHasLine2);
2914
- _context3.t0 = _this12.addPointList.length == 0;
2738
+ function concatPoint(target) {
2739
+ var targetLeft = target.left,
2740
+ targetTop = target.top;
2741
+ point.setCoords();
2915
2742
 
2916
- if (!_context3.t0) {
2917
- _context3.next = 23;
2918
- break;
2919
- }
2920
-
2921
- _context3.next = 23;
2922
- return _this12.clonePoint(point, [point.line1 ? point.line1.x1 : originLeft, point.line1 ? point.line1.y1 : originTop, originLeft, originTop]);
2923
-
2924
- case 23:
2925
- if (!_this12.addPointList.every(function (v) {
2926
- return v.left !== left;
2927
- })) {
2928
- _context3.next = 34;
2929
- break;
2930
- }
2931
-
2932
- // const points1 = i === 1 ? [originLeft, originTop] : point.prePoints;
2933
- points1 = _this12.addPointList.length == 0 ? [originLeft, originTop] : point.prePoints;
2934
- _context3.t1 = points1;
2935
-
2936
- if (!_context3.t1) {
2937
- _context3.next = 29;
2938
- break;
2939
- }
2940
-
2941
- _context3.next = 29;
2942
- return _this12.clonePoint(point, [].concat(Object(toConsumableArray["a" /* default */])(points1), [left, top]));
2943
-
2944
- case 29:
2945
- // this.setAddPointList(point);
2946
- // 调用上面方法就会导致线段绘制失败,目前还不知道为啥子
2947
- _this12$getValue = _this12.getValue(point), data = _this12$getValue.data, x = _this12$getValue.x, y = _this12$getValue.y;
2948
- data.value = {
2949
- time: x,
2950
- value: y
2951
- };
2952
- data.left = point.left;
2953
- data.top = top;
2954
-
2955
- _this12.addPointList.push(data);
2956
-
2957
- case 34:
2958
- checkPoints();
2959
-
2960
- case 35:
2961
- // 检查是否显示重合连线放大节点的标识
2962
- polylineTypeId = point.polylineTypeId, polylineIndex = point.polylineIndex;
2963
- polylineObj = _this12.polylinePointList.find(function (v) {
2964
- return v.polylineTypeId == polylineTypeId && v.polylineIndex == polylineIndex;
2965
- });
2966
- polylineObj === null || polylineObj === void 0 ? void 0 : polylineObj.pointList.forEach(function (v) {
2967
- return v.bringToFront();
2968
- });
2743
+ if (left >= targetLeft - n && left <= targetLeft + n && top <= targetTop + n && top >= targetTop - n) {
2744
+ point.set({
2745
+ left: targetLeft,
2746
+ top: targetTop,
2747
+ scaleX: point.scale === 1 ? 2.5 : 0.1,
2748
+ scaleY: point.scale === 1 ? 2.5 : 0.1
2749
+ });
2750
+ } else {
2751
+ point.set({
2752
+ scaleX: point.scale,
2753
+ scaleY: point.scale
2754
+ });
2755
+ }
2756
+ } // 检查是否显示重合连线放大节点的标识
2969
2757
 
2970
- if (point.nextPoint) {
2971
- _this12._concatIndex = polylineObj === null || polylineObj === void 0 ? void 0 : polylineObj.pointerList.findIndex(function (v) {
2972
- return v + n > left && v > originLeft;
2973
- });
2974
2758
 
2975
- if (!~_this12._concatIndex) {
2976
- point.set({
2977
- scaleX: point.scale,
2978
- scaleY: point.scale
2979
- });
2980
- } else {
2981
- concatPoint(polylineObj === null || polylineObj === void 0 ? void 0 : polylineObj.pointList[_this12._concatIndex]);
2982
- }
2759
+ var polylineTypeId = point.polylineTypeId,
2760
+ polylineIndex = point.polylineIndex;
2761
+ var polylineObj = this.polylinePointList.find(function (v) {
2762
+ return v.polylineTypeId == polylineTypeId && v.polylineIndex == polylineIndex;
2763
+ });
2764
+ polylineObj === null || polylineObj === void 0 ? void 0 : polylineObj.pointList.forEach(function (v) {
2765
+ return v.bringToFront();
2766
+ });
2983
2767
 
2984
- _this12._concatPoint = (polylineObj === null || polylineObj === void 0 ? void 0 : (_polylineObj$pointLis = polylineObj.pointList) === null || _polylineObj$pointLis === void 0 ? void 0 : _polylineObj$pointLis[_this12._concatIndex]) || null; // 被覆盖节点置灰配置
2768
+ if (point.nextPoint) {
2769
+ var _polylineObj$pointLis;
2985
2770
 
2986
- polylineObj === null || polylineObj === void 0 ? void 0 : polylineObj.pointerList.forEach(function (v, i) {
2987
- var obj = polylineObj === null || polylineObj === void 0 ? void 0 : polylineObj.pointList[i];
2771
+ this._concatIndex = polylineObj === null || polylineObj === void 0 ? void 0 : polylineObj.pointerList.findIndex(function (v) {
2772
+ return v + n > left && v > originLeft;
2773
+ });
2988
2774
 
2989
- if (v > originLeft && v < left) {
2990
- var _obj$line;
2775
+ if (!~this._concatIndex) {
2776
+ point.set({
2777
+ scaleX: point.scale,
2778
+ scaleY: point.scale
2779
+ });
2780
+ } else {
2781
+ concatPoint(polylineObj === null || polylineObj === void 0 ? void 0 : polylineObj.pointList[this._concatIndex]);
2782
+ }
2991
2783
 
2992
- // 此处需要递归遍历group节点的所有子节点,然后更改其颜色
2993
- resetPointColor([obj], '#999');
2994
- (_obj$line = obj.line2) === null || _obj$line === void 0 ? void 0 : _obj$line.set({
2995
- stroke: '#999'
2996
- });
2997
- } else {
2998
- var _obj$line2;
2784
+ this._concatPoint = (polylineObj === null || polylineObj === void 0 ? void 0 : (_polylineObj$pointLis = polylineObj.pointList) === null || _polylineObj$pointLis === void 0 ? void 0 : _polylineObj$pointLis[this._concatIndex]) || null; // 被覆盖节点置灰配置
2999
2785
 
3000
- resetPointColor([obj], polylineObj.color);
3001
- (_obj$line2 = obj.line2) === null || _obj$line2 === void 0 ? void 0 : _obj$line2.set({
3002
- stroke: polylineObj.color
3003
- });
3004
- }
3005
- });
2786
+ polylineObj === null || polylineObj === void 0 ? void 0 : polylineObj.pointerList.forEach(function (v, i) {
2787
+ var obj = polylineObj === null || polylineObj === void 0 ? void 0 : polylineObj.pointList[i];
3006
2788
 
3007
- if ((point.line1 || point.line2) && left < originLeft + spaceWidth) {
3008
- setPointLineColor(point, polylineObj.color, true);
3009
- } else {
3010
- setPointLineColor(point, 'transparent', true);
3011
- }
3012
- } // 如果往回拖动则删除经过的已存在的节点
2789
+ if (v > originLeft && v < left) {
2790
+ var _obj$line;
3013
2791
 
2792
+ // 此处需要递归遍历group节点的所有子节点,然后更改其颜色
2793
+ resetPointColor([obj], '#999');
2794
+ (_obj$line = obj.line2) === null || _obj$line === void 0 ? void 0 : _obj$line.set({
2795
+ stroke: '#999'
2796
+ });
2797
+ } else {
2798
+ var _obj$line2;
3014
2799
 
3015
- if (startLength > 0 && currentLeft <= _this12.addPointList[startLength - 1].left) {
3016
- _this12.removePolyline('increasePointBatch', left);
2800
+ resetPointColor([obj], polylineObj.color);
2801
+ (_obj$line2 = obj.line2) === null || _obj$line2 === void 0 ? void 0 : _obj$line2.set({
2802
+ stroke: polylineObj.color
2803
+ });
2804
+ }
2805
+ });
3017
2806
 
3018
- _this12.addPointList = _this12.addPointList.filter(function (v) {
3019
- return v.left < left;
3020
- });
3021
- endLength = _this12.addPointList.length;
2807
+ if ((point.line1 || point.line2) && left < originLeft + spaceWidth) {
2808
+ setPointLineColor(point, polylineObj.color, true);
2809
+ } else {
2810
+ setPointLineColor(point, 'transparent', true);
2811
+ }
2812
+ } // 如果往回拖动则删除经过的已存在的节点
3022
2813
 
3023
- if (endLength === 0) {
3024
- setPointLineColor(point, polylineObj === null || polylineObj === void 0 ? void 0 : polylineObj.color, conditionHasLine2);
3025
2814
 
3026
- _this12.removePolyline('increasePointBatch', originLeft);
3027
- }
2815
+ if (startLength > 0 && currentLeft <= this.addPointList[startLength - 1].left) {
2816
+ this.removePolyline('increasePointBatch', left);
2817
+ this.addPointList = this.addPointList.filter(function (v) {
2818
+ return v.left < left;
2819
+ });
2820
+ var endLength = this.addPointList.length;
3028
2821
 
3029
- if (endLength > 0) {
3030
- point.set({
3031
- prePoints: [_this12.addPointList[endLength - 1].left, _this12.addPointList[endLength - 1].top]
3032
- });
3033
- }
3034
- }
2822
+ if (endLength === 0) {
2823
+ setPointLineColor(point, polylineObj === null || polylineObj === void 0 ? void 0 : polylineObj.color, conditionHasLine2);
2824
+ this.removePolyline('increasePointBatch', originLeft);
2825
+ }
3035
2826
 
3036
- case 40:
3037
- case "end":
3038
- return _context3.stop();
3039
- }
3040
- }
3041
- }, _callee3);
3042
- }))();
2827
+ if (endLength > 0) {
2828
+ point.set({
2829
+ prePoints: [this.addPointList[endLength - 1].left, this.addPointList[endLength - 1].top]
2830
+ });
2831
+ }
2832
+ }
3043
2833
  },
3044
2834
  clonePoint: function clonePoint(point, points) {
3045
2835
  var _this13 = this;
@@ -3064,9 +2854,7 @@ var rightClickNodeConnect = [{
3064
2854
  scaleY: point.scale
3065
2855
  });
3066
2856
  clonedObj.hasControls = clonedObj.hasBorders = false;
3067
- point.set({
3068
- prePoints: [point.left, point.top]
3069
- });
2857
+ point.prePoints = [point.left, point.top];
3070
2858
 
3071
2859
  var line = _this13.drawLine(Object(toConsumableArray["a" /* default */])(points), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({
3072
2860
  evented: evented,
@@ -3085,8 +2873,6 @@ var rightClickNodeConnect = [{
3085
2873
 
3086
2874
  _this13.canvas.add(clonedObj);
3087
2875
 
3088
- _this13.canvas.renderAll();
3089
-
3090
2876
  resolve(clonedObj);
3091
2877
  });
3092
2878
  });
@@ -3104,12 +2890,11 @@ var rightClickNodeConnect = [{
3104
2890
  y: y
3105
2891
  };
3106
2892
  } else {
3107
- var _left = this.getYValue('left', point.top);
3108
-
2893
+ var left = this.getYValue('left', point.top);
3109
2894
  var right = this.getYValue('right', point.top);
3110
2895
  return {
3111
2896
  x: x,
3112
- left: _left,
2897
+ left: left,
3113
2898
  right: right
3114
2899
  };
3115
2900
  }
@@ -3152,10 +2937,10 @@ var rightClickNodeConnect = [{
3152
2937
  }
3153
2938
  };
3154
2939
 
3155
- var _this$getValue3 = this.getValue(point),
3156
- x = _this$getValue3.x,
3157
- y = _this$getValue3.y,
3158
- data = _this$getValue3.data;
2940
+ var _this$getValue4 = this.getValue(point),
2941
+ x = _this$getValue4.x,
2942
+ y = _this$getValue4.y,
2943
+ data = _this$getValue4.data;
3159
2944
 
3160
2945
  var getY = function getY(y) {
3161
2946
  if ((data === null || data === void 0 ? void 0 : data.position) == 'right') {
@@ -3163,9 +2948,9 @@ var rightClickNodeConnect = [{
3163
2948
  var _y$toString$split = y.toString().split('.'),
3164
2949
  _y$toString$split2 = Object(slicedToArray["a" /* default */])(_y$toString$split, 2),
3165
2950
  m = _y$toString$split2[0],
3166
- _n = _y$toString$split2[1];
2951
+ n = _y$toString$split2[1];
3167
2952
 
3168
- return parseFloat("".concat(m, ".").concat(_n.slice(0, 1))) * 10 / 10;
2953
+ return parseFloat("".concat(m, ".").concat(n.slice(0, 1))) * 10 / 10;
3169
2954
  }
3170
2955
 
3171
2956
  return y;
@@ -3408,8 +3193,8 @@ var rightClickNodeConnect = [{
3408
3193
 
3409
3194
  var FabricPolylines_component = Object(componentNormalizer["a" /* default */])(
3410
3195
  fabric_chart_FabricPolylinesvue_type_script_lang_js_,
3411
- FabricPolylinesvue_type_template_id_4464d5bc_render,
3412
- FabricPolylinesvue_type_template_id_4464d5bc_staticRenderFns,
3196
+ FabricPolylinesvue_type_template_id_6b4be9a4_render,
3197
+ FabricPolylinesvue_type_template_id_6b4be9a4_staticRenderFns,
3413
3198
  false,
3414
3199
  null,
3415
3200
  null,
@@ -3429,15 +3214,8 @@ var FabricPolylines_component = Object(componentNormalizer["a" /* default */])(
3429
3214
  data: function data() {
3430
3215
  return {};
3431
3216
  },
3432
- mounted: function mounted() {
3433
- var _this = this;
3434
-
3435
- this.$nextTick(function () {
3436
- _this.initGrid();
3437
- });
3438
- },
3439
3217
  methods: {
3440
- initGrid: function initGrid() {
3218
+ init: function init() {
3441
3219
  // 主表格
3442
3220
  this.createGrid(this.propItems.originY, this.propItems.endY, this.propItems.gridYNumber, this.propItems.yCellHeight); // 上方表格
3443
3221
 
@@ -3483,8 +3261,7 @@ var FabricPolylines_component = Object(componentNormalizer["a" /* default */])(
3483
3261
  selectable: false
3484
3262
  });
3485
3263
  this.canvas.add(group);
3486
- this.canvas.sendToBack(group);
3487
- this.canvas.renderAll();
3264
+ this.canvas.sendToBack(group); // this.canvas.renderAll();
3488
3265
  }
3489
3266
  },
3490
3267
  render: function render(h) {
@@ -3513,12 +3290,12 @@ var FabricGrid_component = Object(componentNormalizer["a" /* default */])(
3513
3290
  )
3514
3291
 
3515
3292
  /* harmony default export */ var FabricGrid = (FabricGrid_component.exports);
3516
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"54b2b90d-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=84b14bd8&
3517
- var FabricTextGroupvue_type_template_id_84b14bd8_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"text-group"},[(_vm.isRightVisible)?_c('MouseRightClick',{attrs:{"getContainer":_vm.getContainer,"nodeList":_vm.rightClickNode,"rightPos":_vm.rightPos},on:{"nodeClick":_vm.handleRightClick,"closeRight":function($event){_vm.isRightVisible = false}}}):_vm._e(),(_vm.isDropVisible)?_c('DropPopup',{attrs:{"val":_vm.dropVal,"dropPos":_vm.dropPos}}):_vm._e()],1)}
3518
- var FabricTextGroupvue_type_template_id_84b14bd8_staticRenderFns = []
3293
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"832f7c18-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=44a2641e&
3294
+ var FabricTextGroupvue_type_template_id_44a2641e_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"text-group"},[(_vm.isRightVisible)?_c('MouseRightClick',{attrs:{"getContainer":_vm.getContainer,"nodeList":_vm.rightClickNode,"rightPos":_vm.rightPos},on:{"nodeClick":_vm.handleRightClick,"closeRight":function($event){_vm.isRightVisible = false}}}):_vm._e(),(_vm.isDropVisible)?_c('DropPopup',{attrs:{"val":_vm.dropVal,"dropPos":_vm.dropPos}}):_vm._e()],1)}
3295
+ var FabricTextGroupvue_type_template_id_44a2641e_staticRenderFns = []
3519
3296
 
3520
3297
 
3521
- // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue?vue&type=template&id=84b14bd8&
3298
+ // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue?vue&type=template&id=44a2641e&
3522
3299
 
3523
3300
  // EXTERNAL MODULE: external "core-js/modules/es.array.sort.js"
3524
3301
  var es_array_sort_js_ = __webpack_require__("4c07");
@@ -3591,10 +3368,15 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
3591
3368
  watch: {
3592
3369
  'templateData.other': {
3593
3370
  handler: function handler(value) {
3371
+ var _this = this;
3372
+
3594
3373
  if (value) {
3595
- this.removeOther();
3596
- this.drawTextDataGroup(value);
3597
- this.canvas.renderAll();
3374
+ this.$nextTick(function () {
3375
+ _this.removeOther();
3376
+
3377
+ _this.drawTextDataGroup(value); // this.canvas.renderAll();
3378
+
3379
+ });
3598
3380
  }
3599
3381
  },
3600
3382
  deep: true
@@ -3619,13 +3401,7 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
3619
3401
 
3620
3402
  };
3621
3403
  },
3622
- mounted: function mounted() {
3623
- var _this = this;
3624
-
3625
- this.$nextTick(function () {
3626
- _this.init();
3627
- });
3628
- },
3404
+ mounted: function mounted() {},
3629
3405
  computed: {
3630
3406
  girdLineStyle: function girdLineStyle() {
3631
3407
  return Object.assign({}, defaultVaule.borderStyle, this.templateData.borderStyle || {});
@@ -3653,8 +3429,8 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
3653
3429
  this.templateData.left && this.drawLeftScaleGroup(this.templateData.left);
3654
3430
  this.templateData.other && this.drawTextDataGroup(this.templateData.other);
3655
3431
  this.eventStyle.evented && this.createEvent();
3656
- this.drawBorder();
3657
- this.canvas.renderAll();
3432
+ this.drawBorder(); // this.canvas.renderAll();
3433
+
3658
3434
  this.templateData.bottom && this.drawBottomTextDataGroup(this.templateData.bottom);
3659
3435
  },
3660
3436
  drawBorder: function drawBorder() {
@@ -3842,9 +3618,13 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
3842
3618
  dataIndex: index,
3843
3619
  index: i,
3844
3620
  type: 'colList',
3845
- id: "".concat(index, "_").concat(i, "_other_").concat(Date.now())
3621
+ id: "".concat(index, "_").concat(i, "_other_").concat(Date.now()),
3622
+ name: v.value
3846
3623
  }, _this7.eventStyle));
3847
3624
  text.hasControls = text.hasBorders = false;
3625
+
3626
+ _this7.setPopup(text);
3627
+
3848
3628
  textList.push(text);
3849
3629
  });
3850
3630
  }
@@ -3891,9 +3671,13 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
3891
3671
  dataIndex: index,
3892
3672
  index: i,
3893
3673
  type: 'list',
3894
- id: "".concat(index, "_").concat(i, "_other_").concat(Date.now())
3674
+ id: "".concat(index, "_").concat(i, "_other_").concat(Date.now()),
3675
+ name: v.value
3895
3676
  }, _this8.eventStyle));
3896
3677
  text.hasControls = text.hasBorders = false;
3678
+
3679
+ _this8.setPopup(text);
3680
+
3897
3681
  textList.push(text);
3898
3682
  }
3899
3683
  });
@@ -3901,6 +3685,16 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
3901
3685
 
3902
3686
  (_this$canvas3 = this.canvas).add.apply(_this$canvas3, textList);
3903
3687
  },
3688
+ setPopup: function setPopup(point) {
3689
+ var _this9 = this;
3690
+
3691
+ point.on('mouseover', function () {
3692
+ _this9.showDrapPopup(point, true);
3693
+ });
3694
+ point.on('mouseout', function () {
3695
+ _this9.isDropVisible = false;
3696
+ });
3697
+ },
3904
3698
  // 判断当前时间是否超出网格区域
3905
3699
  isLimit: function isLimit(value) {
3906
3700
  var xScaleList = this.propItems.xScaleList;
@@ -3910,11 +3704,11 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
3910
3704
  return time >= minTime && time <= maxTime;
3911
3705
  },
3912
3706
  removeMark: function removeMark() {
3913
- var _this9 = this;
3707
+ var _this10 = this;
3914
3708
 
3915
3709
  this.canvas.forEachObject(function (obj) {
3916
3710
  if (obj.type && obj.type === 'mark') {
3917
- _this9.canvas.remove(obj);
3711
+ _this10.canvas.remove(obj);
3918
3712
  }
3919
3713
  });
3920
3714
  },
@@ -3924,7 +3718,7 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
3924
3718
  _obj$iconStyle,
3925
3719
  _obj$seqStyle,
3926
3720
  _obj$seqStyle$circle,
3927
- _this10 = this;
3721
+ _this11 = this;
3928
3722
 
3929
3723
  if (!obj.list) {
3930
3724
  return;
@@ -3957,41 +3751,53 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
3957
3751
  var lineHeightText = (((_obj$style = obj.style) === null || _obj$style === void 0 ? void 0 : _obj$style.fontSize) || 12) + 2;
3958
3752
  var lineHeightImg = (((_obj$iconStyle = obj.iconStyle) === null || _obj$iconStyle === void 0 ? void 0 : _obj$iconStyle.height) || 12) + 2;
3959
3753
  var lineHeightSeq = (((_obj$seqStyle = obj.seqStyle) === null || _obj$seqStyle === void 0 ? void 0 : (_obj$seqStyle$circle = _obj$seqStyle.circle) === null || _obj$seqStyle$circle === void 0 ? void 0 : _obj$seqStyle$circle.radius) || 9) * 2 + 2;
3960
- obj.list.forEach(function (item, index) {
3961
- var limitIndex = -1; // 标志点是否往上排列的标志,大于-1则表示需要往上排列
3962
3754
 
3963
- var y = baseY;
3755
+ var addCanvas = function addCanvas(point) {
3756
+ point.hasControls = point.hasBorders = false;
3757
+
3758
+ _this11.pointEvent(point);
3759
+
3760
+ _this11.canvas.add(point); // this.canvas.requestRenderAll();
3761
+
3762
+ };
3763
+
3764
+ var setTop = function setTop(lineHeight, i, condition) {
3765
+ if (!~condition.limitIndex) {
3766
+ condition.y += i === 0 ? lineHeight / 2 : lineHeight;
3767
+
3768
+ if (condition.y >= canvasHeight - lineHeight / 2) {
3769
+ condition.limitIndex++;
3770
+
3771
+ if (condition.limitIndex === 0) {
3772
+ condition.y = baseYLimit;
3773
+ condition.y -= lineHeight / 2;
3774
+ }
3775
+ }
3776
+ } else {
3777
+ condition.y -= lineHeight;
3778
+ }
3779
+
3780
+ return condition.y;
3781
+ };
3782
+
3783
+ obj.list.forEach(function (item, index) {
3784
+ var condition = {
3785
+ limitIndex: -1,
3786
+ // 标志点是否往上排列的标志,大于-1则表示需要往上排列
3787
+ y: baseY
3788
+ };
3964
3789
 
3965
- var x = _this10.cumputedX(item[0]);
3790
+ var x = _this11.cumputedX(item[0]);
3966
3791
 
3967
- if (_this10.isLimit(item[0])) {
3792
+ if (_this11.isLimit(item[0])) {
3968
3793
  item[1].forEach( /*#__PURE__*/function () {
3969
- var _ref2 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(v, i) {
3970
- var common, setTop, eventStyle, addCanvas, option, ele, img, _obj$seqStyle2, _obj$seqStyle3, circle, text, group, _text;
3794
+ var _ref2 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regeneratorRuntime.mark(function _callee(v, i) {
3795
+ var common, eventStyle, option, ele, img, _obj$seqStyle2, _obj$seqStyle3, circle, text, group, _text;
3971
3796
 
3972
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
3797
+ return regeneratorRuntime.wrap(function _callee$(_context) {
3973
3798
  while (1) {
3974
- switch (_context2.prev = _context2.next) {
3799
+ switch (_context.prev = _context.next) {
3975
3800
  case 0:
3976
- setTop = function _setTop(lineHeight) {
3977
- if (!~limitIndex) {
3978
- y += i === 0 ? lineHeight / 2 : lineHeight;
3979
-
3980
- if (y >= canvasHeight - lineHeight / 2) {
3981
- limitIndex++;
3982
-
3983
- if (limitIndex === 0) {
3984
- y = baseYLimit;
3985
- y -= lineHeight / 2;
3986
- }
3987
- }
3988
- } else {
3989
- y -= lineHeight;
3990
- }
3991
-
3992
- common.top = y;
3993
- };
3994
-
3995
3801
  common = {
3996
3802
  left: x,
3997
3803
  originX: 'center',
@@ -4002,109 +3808,82 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
4002
3808
  name: v.name,
4003
3809
  type: 'mark'
4004
3810
  };
4005
- eventStyle = !_this10.eventStyle.evented ? {
3811
+ eventStyle = !_this11.eventStyle.evented ? {
4006
3812
  lockMovementX: true,
4007
3813
  lockMovementY: true
4008
3814
  } : {};
4009
3815
 
4010
- addCanvas = /*#__PURE__*/function () {
4011
- var _ref3 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regeneratorRuntime.mark(function _callee(point) {
4012
- return regeneratorRuntime.wrap(function _callee$(_context) {
4013
- while (1) {
4014
- switch (_context.prev = _context.next) {
4015
- case 0:
4016
- point.hasControls = point.hasBorders = false;
4017
-
4018
- _this10.pointEvent(point);
4019
-
4020
- _this10.canvas.add(point);
4021
-
4022
- _this10.canvas.requestRenderAll();
4023
-
4024
- case 4:
4025
- case "end":
4026
- return _context.stop();
4027
- }
4028
- }
4029
- }, _callee);
4030
- }));
4031
-
4032
- return function addCanvas(_x3) {
4033
- return _ref3.apply(this, arguments);
4034
- };
4035
- }();
4036
-
4037
- if (!(_this10.isObject(v) && !v.value)) {
4038
- _context2.next = 17;
3816
+ if (!(_this11.isObject(v) && !v.value)) {
3817
+ _context.next = 15;
4039
3818
  break;
4040
3819
  }
4041
3820
 
4042
- setTop(lineHeightImg);
3821
+ common.top = setTop(lineHeightImg, i, condition);
4043
3822
  option = Object.assign({}, obj.iconStyle || {}, v || {}, Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, common), eventStyle));
4044
3823
 
4045
3824
  if (!(v !== null && v !== void 0 && v.iconClassName)) {
4046
- _context2.next = 11;
3825
+ _context.next = 9;
4047
3826
  break;
4048
3827
  }
4049
3828
 
4050
- _context2.next = 10;
4051
- return _this10.createImage(v.iconClassName, v);
3829
+ _context.next = 8;
3830
+ return _this11.createImage(v.iconClassName, v);
4052
3831
 
4053
- case 10:
4054
- ele = _context2.sent;
3832
+ case 8:
3833
+ ele = _context.sent;
4055
3834
 
4056
- case 11:
4057
- _context2.next = 13;
4058
- return _this10.createPoint(v !== null && v !== void 0 && v.url || v !== null && v !== void 0 && v.iconClassName ? 'img' : v.type, Object(objectSpread2["a" /* default */])({
3835
+ case 9:
3836
+ _context.next = 11;
3837
+ return _this11.createPoint(v !== null && v !== void 0 && v.url || v !== null && v !== void 0 && v.iconClassName ? 'img' : v.type, Object(objectSpread2["a" /* default */])({
4059
3838
  ele: ele || ''
4060
3839
  }, option));
4061
3840
 
4062
- case 13:
4063
- img = _context2.sent;
3841
+ case 11:
3842
+ img = _context.sent;
4064
3843
  addCanvas(img);
4065
- _context2.next = 31;
3844
+ _context.next = 29;
4066
3845
  break;
4067
3846
 
4068
- case 17:
3847
+ case 15:
4069
3848
  if (!v.value) {
4070
- _context2.next = 31;
3849
+ _context.next = 29;
4071
3850
  break;
4072
3851
  }
4073
3852
 
4074
3853
  if (!v.seq) {
4075
- _context2.next = 28;
3854
+ _context.next = 26;
4076
3855
  break;
4077
3856
  }
4078
3857
 
4079
- setTop(lineHeightSeq); // 标记增加序号
3858
+ common.top = setTop(lineHeightSeq, i, condition); // 标记增加序号
4080
3859
 
4081
- _context2.next = 22;
4082
- return _this10.createPoint('circle', Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, common), {}, {
3860
+ _context.next = 20;
3861
+ return _this11.createPoint('circle', Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, common), {}, {
4083
3862
  radius: 5,
4084
3863
  strokeWidth: 1,
4085
3864
  stroke: '#000',
4086
3865
  fill: 'transparent'
4087
3866
  }, ((_obj$seqStyle2 = obj.seqStyle) === null || _obj$seqStyle2 === void 0 ? void 0 : _obj$seqStyle2.circle) || {}));
4088
3867
 
4089
- case 22:
4090
- circle = _context2.sent;
4091
- text = new _this10.fabric.Text(String(v.value), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.textStyle), common), ((_obj$seqStyle3 = obj.seqStyle) === null || _obj$seqStyle3 === void 0 ? void 0 : _obj$seqStyle3.text) || {}));
4092
- group = new _this10.fabric.Group([circle, text], Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, common), eventStyle));
3868
+ case 20:
3869
+ circle = _context.sent;
3870
+ text = new _this11.fabric.Text(String(v.value), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.textStyle), common), ((_obj$seqStyle3 = obj.seqStyle) === null || _obj$seqStyle3 === void 0 ? void 0 : _obj$seqStyle3.text) || {}));
3871
+ group = new _this11.fabric.Group([circle, text], Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, common), eventStyle));
4093
3872
  addCanvas(group);
4094
- _context2.next = 31;
3873
+ _context.next = 29;
4095
3874
  break;
4096
3875
 
4097
- case 28:
4098
- setTop(lineHeightText);
4099
- _text = new _this10.fabric.Text(String(v.value), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.textStyle), obj.style), common), eventStyle));
3876
+ case 26:
3877
+ common.top = setTop(lineHeightText, i, condition);
3878
+ _text = new _this11.fabric.Text(String(v.value), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.textStyle), obj.style), common), eventStyle));
4100
3879
  addCanvas(_text);
4101
3880
 
4102
- case 31:
3881
+ case 29:
4103
3882
  case "end":
4104
- return _context2.stop();
3883
+ return _context.stop();
4105
3884
  }
4106
3885
  }
4107
- }, _callee2);
3886
+ }, _callee);
4108
3887
  }));
4109
3888
 
4110
3889
  return function (_x, _x2) {
@@ -4115,32 +3894,26 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
4115
3894
  }); // this.canvas.add(...textList);
4116
3895
  },
4117
3896
  pointEvent: function pointEvent(point) {
4118
- var _this11 = this;
3897
+ var _this12 = this;
4119
3898
 
4120
- point.on('mouseover', function () {
4121
- _this11.showDrapPopup(point, true);
4122
- });
4123
- point.on('mouseout', function () {
4124
- _this11.isDropVisible = false;
4125
- }); // 移动中 实时更新相关联的线的坐标
3899
+ this.setPopup(point); // 移动中 实时更新相关联的线的坐标
4126
3900
 
4127
3901
  if (this.eventStyle.evented) {
4128
3902
  point.on('moving', function () {
4129
- _this11.moveLimit(point);
3903
+ _this12.moveLimit(point); // this.canvas.renderAll();
4130
3904
 
4131
- _this11.canvas.renderAll();
4132
3905
 
4133
- _this11.showDrapPopup(point);
3906
+ _this12.showDrapPopup(point);
4134
3907
  });
4135
3908
  point.on('moved', function () {
4136
- _this11.isDropVisible = false;
3909
+ _this12.isDropVisible = false;
4137
3910
  var value = {
4138
3911
  data: point.data,
4139
3912
  oldVal: point.time,
4140
- newVal: _this11.getXValue(point.left)
3913
+ newVal: _this12.getXValue(point.left)
4141
3914
  };
4142
3915
 
4143
- _this11.$emit('markChange', value);
3916
+ _this12.$emit('markChange', value);
4144
3917
  });
4145
3918
  }
4146
3919
  },
@@ -4295,8 +4068,8 @@ var getTopTotalList = function getTopTotalList(tree, topTotalList) {
4295
4068
 
4296
4069
  var FabricTextGroup_component = Object(componentNormalizer["a" /* default */])(
4297
4070
  fabric_chart_FabricTextGroupvue_type_script_lang_js_,
4298
- FabricTextGroupvue_type_template_id_84b14bd8_render,
4299
- FabricTextGroupvue_type_template_id_84b14bd8_staticRenderFns,
4071
+ FabricTextGroupvue_type_template_id_44a2641e_render,
4072
+ FabricTextGroupvue_type_template_id_44a2641e_staticRenderFns,
4300
4073
  false,
4301
4074
  null,
4302
4075
  null,
@@ -4305,19 +4078,19 @@ var FabricTextGroup_component = Object(componentNormalizer["a" /* default */])(
4305
4078
  )
4306
4079
 
4307
4080
  /* harmony default export */ var FabricTextGroup = (FabricTextGroup_component.exports);
4308
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"54b2b90d-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=e702a32a&
4309
- var FabricScaleValuevue_type_template_id_e702a32a_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.templateData.top.xScalevalue.popupTop)?_c('TimeScaleValue',{attrs:{"times":_vm.timeList,"templateData":_vm.templateData}}):_vm._e()}
4310
- var FabricScaleValuevue_type_template_id_e702a32a_staticRenderFns = []
4081
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"832f7c18-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=9c461680&
4082
+ var FabricScaleValuevue_type_template_id_9c461680_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.templateData.top.xScalevalue.popupTop)?_c('TimeScaleValue',{attrs:{"times":_vm.timeList,"templateData":_vm.templateData}}):_vm._e()}
4083
+ var FabricScaleValuevue_type_template_id_9c461680_staticRenderFns = []
4311
4084
 
4312
4085
 
4313
- // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart/FabricScaleValue.vue?vue&type=template&id=e702a32a&
4086
+ // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart/FabricScaleValue.vue?vue&type=template&id=9c461680&
4314
4087
 
4315
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"54b2b90d-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=a10b6e3e&scoped=true&
4316
- var TimeScaleValuevue_type_template_id_a10b6e3e_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)}
4317
- var TimeScaleValuevue_type_template_id_a10b6e3e_scoped_true_staticRenderFns = []
4088
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"832f7c18-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=184c584a&scoped=true&
4089
+ var TimeScaleValuevue_type_template_id_184c584a_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)}
4090
+ var TimeScaleValuevue_type_template_id_184c584a_scoped_true_staticRenderFns = []
4318
4091
 
4319
4092
 
4320
- // CONCATENATED MODULE: ./packages/fabric-chart/src/components/TimeScaleValue.vue?vue&type=template&id=a10b6e3e&scoped=true&
4093
+ // CONCATENATED MODULE: ./packages/fabric-chart/src/components/TimeScaleValue.vue?vue&type=template&id=184c584a&scoped=true&
4321
4094
 
4322
4095
  // EXTERNAL MODULE: external "cnhis-design-vue/es/utils/vexutils"
4323
4096
  var vexutils_ = __webpack_require__("9715");
@@ -4375,15 +4148,17 @@ var vexutils_default = /*#__PURE__*/__webpack_require__.n(vexutils_);
4375
4148
  mounted: function mounted() {
4376
4149
  var _this = this;
4377
4150
 
4378
- this.$nextTick(function () {
4379
- setTimeout(function () {
4380
- _this.init();
4381
- }, 0);
4382
- });
4151
+ this._timer = setInterval(function () {
4152
+ if (document.readyState === 'complete') {
4153
+ _this.initDoc();
4154
+
4155
+ clearInterval(_this._timer);
4156
+ }
4157
+ }, 500);
4383
4158
  },
4384
4159
  methods: {
4385
- init: function init() {
4386
- var _xScalevalue$style;
4160
+ initDoc: function initDoc() {
4161
+ var _this$cFabricChart, _this$cFabricChart$ge, _this$cFabricChart2, _this$cFabricChart2$g, _xScalevalue$style;
4387
4162
 
4388
4163
  // this.to = this.templateData.top?.xScalevalue?.to || 'body';
4389
4164
  var _ref = this.$attrs.templateData.top || {},
@@ -4395,9 +4170,9 @@ var vexutils_default = /*#__PURE__*/__webpack_require__.n(vexutils_);
4395
4170
  xCellWidth = _this$propItems.xCellWidth;
4396
4171
  this.cFabricChart = document.querySelector('.c-fabric-chart'); // this.bodyHeight = document.body.getBoundingClientRect().height;
4397
4172
 
4398
- this.top = this.cFabricChart.getBoundingClientRect().top;
4173
+ this.top = ((_this$cFabricChart = this.cFabricChart) === null || _this$cFabricChart === void 0 ? void 0 : (_this$cFabricChart$ge = _this$cFabricChart.getBoundingClientRect()) === null || _this$cFabricChart$ge === void 0 ? void 0 : _this$cFabricChart$ge.top) || 0;
4399
4174
  this.popupStyle = {
4400
- left: "".concat(this.cFabricChart.getBoundingClientRect().left, "px"),
4175
+ left: "".concat(((_this$cFabricChart2 = this.cFabricChart) === null || _this$cFabricChart2 === void 0 ? void 0 : (_this$cFabricChart2$g = _this$cFabricChart2.getBoundingClientRect()) === null || _this$cFabricChart2$g === void 0 ? void 0 : _this$cFabricChart2$g.left) || 0, "px"),
4401
4176
  top: "".concat((xScalevalue === null || xScalevalue === void 0 ? void 0 : xScalevalue.popupTop) || 0, "px"),
4402
4177
  width: "".concat(canvasWidth, "px"),
4403
4178
  height: "".concat(spaceHeight, "px"),
@@ -4426,13 +4201,14 @@ var vexutils_default = /*#__PURE__*/__webpack_require__.n(vexutils_);
4426
4201
  }
4427
4202
  },
4428
4203
  beforeDestroy: function beforeDestroy() {
4204
+ this._timer && clearInterval(this._timer);
4429
4205
  window.removeEventListener('scroll', this.scroll, true);
4430
4206
  }
4431
4207
  });
4432
4208
  // CONCATENATED MODULE: ./packages/fabric-chart/src/components/TimeScaleValue.vue?vue&type=script&lang=js&
4433
4209
  /* harmony default export */ var components_TimeScaleValuevue_type_script_lang_js_ = (TimeScaleValuevue_type_script_lang_js_);
4434
- // EXTERNAL MODULE: ./packages/fabric-chart/src/components/TimeScaleValue.vue?vue&type=style&index=0&id=a10b6e3e&lang=less&scoped=true&
4435
- var TimeScaleValuevue_type_style_index_0_id_a10b6e3e_lang_less_scoped_true_ = __webpack_require__("e350");
4210
+ // EXTERNAL MODULE: ./packages/fabric-chart/src/components/TimeScaleValue.vue?vue&type=style&index=0&id=184c584a&lang=less&scoped=true&
4211
+ var TimeScaleValuevue_type_style_index_0_id_184c584a_lang_less_scoped_true_ = __webpack_require__("0364");
4436
4212
 
4437
4213
  // CONCATENATED MODULE: ./packages/fabric-chart/src/components/TimeScaleValue.vue
4438
4214
 
@@ -4445,11 +4221,11 @@ var TimeScaleValuevue_type_style_index_0_id_a10b6e3e_lang_less_scoped_true_ = __
4445
4221
 
4446
4222
  var TimeScaleValue_component = Object(componentNormalizer["a" /* default */])(
4447
4223
  components_TimeScaleValuevue_type_script_lang_js_,
4448
- TimeScaleValuevue_type_template_id_a10b6e3e_scoped_true_render,
4449
- TimeScaleValuevue_type_template_id_a10b6e3e_scoped_true_staticRenderFns,
4224
+ TimeScaleValuevue_type_template_id_184c584a_scoped_true_render,
4225
+ TimeScaleValuevue_type_template_id_184c584a_scoped_true_staticRenderFns,
4450
4226
  false,
4451
4227
  null,
4452
- "a10b6e3e",
4228
+ "184c584a",
4453
4229
  null
4454
4230
 
4455
4231
  )
@@ -4495,23 +4271,16 @@ var TimeScaleValue_component = Object(componentNormalizer["a" /* default */])(
4495
4271
  });
4496
4272
  }
4497
4273
  },
4498
- mounted: function mounted() {
4499
- var _this = this;
4500
-
4501
- this.$nextTick(function () {
4502
- _this.topScaleValue(_this.templateData.top);
4503
-
4504
- _this.rightScaleValue(_this.templateData.right);
4505
-
4506
- _this.leftScaleValue(_this.templateData.left);
4507
-
4508
- _this.canvas.renderAll();
4509
- });
4510
- },
4274
+ mounted: function mounted() {},
4511
4275
  methods: {
4276
+ init: function init() {
4277
+ this.topScaleValue(this.templateData.top);
4278
+ this.rightScaleValue(this.templateData.right);
4279
+ this.leftScaleValue(this.templateData.left); // this.canvas.renderAll();
4280
+ },
4512
4281
  // x轴时间刻度绘制
4513
4282
  topScaleValue: function topScaleValue(obj) {
4514
- var _this2 = this;
4283
+ var _this = this;
4515
4284
 
4516
4285
  var _this$propItems = this.propItems,
4517
4286
  originX = _this$propItems.originX,
@@ -4529,11 +4298,11 @@ var TimeScaleValue_component = Object(componentNormalizer["a" /* default */])(
4529
4298
  list.reduce(function (pre, cur, i) {
4530
4299
  var newStyle = pre && new Date(cur).getTime() - new Date(pre).getTime() < defaultSpaceTime ? Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, style), customStyle) : style;
4531
4300
 
4532
- var text = _this2.createText(cur.slice(-5), originX + i * spaceGridNumber * xCellWidth, top, 'center', newStyle);
4301
+ var text = _this.createText(cur.slice(-5), originX + i * spaceGridNumber * xCellWidth, top, 'center', newStyle);
4533
4302
 
4534
4303
  textList.push(text);
4535
4304
 
4536
- _this2.timeList.push({
4305
+ _this.timeList.push({
4537
4306
  time: cur.slice(-5),
4538
4307
  left: originX + i * spaceGridNumber * xCellWidth,
4539
4308
  width: text.width
@@ -4549,7 +4318,7 @@ var TimeScaleValue_component = Object(componentNormalizer["a" /* default */])(
4549
4318
  this.canvas.sendBackwards(group);
4550
4319
  },
4551
4320
  rightScaleValue: function rightScaleValue(obj) {
4552
- var _this3 = this;
4321
+ var _this2 = this;
4553
4322
 
4554
4323
  if (!obj) return;
4555
4324
  var spaceGridNumber = obj.rightYScalevalue.spaceGridNumber || 2;
@@ -4558,7 +4327,7 @@ var TimeScaleValue_component = Object(componentNormalizer["a" /* default */])(
4558
4327
  var style = obj.rightYScalevalue.style ? obj.rightYScalevalue.style : {};
4559
4328
  var textList = [];
4560
4329
  obj.rightYScalevalue.list.forEach(function (item, index) {
4561
- textList.push(_this3.createText(item, originX, _this3.propItems.endY - index * _this3.propItems.yCellHeight * spaceGridNumber, 'left', style));
4330
+ textList.push(_this2.createText(item, originX, _this2.propItems.endY - index * _this2.propItems.yCellHeight * spaceGridNumber, 'left', style));
4562
4331
  }); // 添加单位
4563
4332
 
4564
4333
  if (obj.rightYScalevalue.unit) {
@@ -4575,7 +4344,7 @@ var TimeScaleValue_component = Object(componentNormalizer["a" /* default */])(
4575
4344
  },
4576
4345
  leftScaleValue: function leftScaleValue(obj) {
4577
4346
  var _obj$leftYScalevalue,
4578
- _this4 = this;
4347
+ _this3 = this;
4579
4348
 
4580
4349
  var _this$propItems2 = this.propItems,
4581
4350
  endY = _this$propItems2.endY,
@@ -4592,7 +4361,7 @@ var TimeScaleValue_component = Object(componentNormalizer["a" /* default */])(
4592
4361
  var originX = this.propItems.originX;
4593
4362
  var textList = [];
4594
4363
  obj.leftYScalevalue.list.forEach(function (item, index) {
4595
- textList.push(_this4.createText(item, originX - listMarginRight, endY - index * yCellHeight * spaceGridNumber, 'right', style));
4364
+ textList.push(_this3.createText(item, originX - listMarginRight, endY - index * yCellHeight * spaceGridNumber, 'right', style));
4596
4365
  }); // 添加标题和单位
4597
4366
 
4598
4367
  var txt = '';
@@ -4636,8 +4405,8 @@ var TimeScaleValue_component = Object(componentNormalizer["a" /* default */])(
4636
4405
 
4637
4406
  var FabricScaleValue_component = Object(componentNormalizer["a" /* default */])(
4638
4407
  fabric_chart_FabricScaleValuevue_type_script_lang_js_,
4639
- FabricScaleValuevue_type_template_id_e702a32a_render,
4640
- FabricScaleValuevue_type_template_id_e702a32a_staticRenderFns,
4408
+ FabricScaleValuevue_type_template_id_9c461680_render,
4409
+ FabricScaleValuevue_type_template_id_9c461680_staticRenderFns,
4641
4410
  false,
4642
4411
  null,
4643
4412
  null,
@@ -4646,12 +4415,12 @@ var FabricScaleValue_component = Object(componentNormalizer["a" /* default */])(
4646
4415
  )
4647
4416
 
4648
4417
  /* harmony default export */ var FabricScaleValue = (FabricScaleValue_component.exports);
4649
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"54b2b90d-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=229d2d58&
4650
- var FabricLinesvue_type_template_id_229d2d58_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"line"},[(_vm.isRightVisible)?_c('MouseRightClick',{attrs:{"getContainer":_vm.getContainer,"nodeList":_vm.rightClickNode,"rightPos":_vm.rightPos},on:{"nodeClick":_vm.handleRightClick,"closeRight":function($event){_vm.isRightVisible = false}}}):_vm._e(),(_vm.isDropVisible)?_c('DropPopup',{attrs:{"val":_vm.dropVal,"dropPos":_vm.dropPos}}):_vm._e()],1)}
4651
- var FabricLinesvue_type_template_id_229d2d58_staticRenderFns = []
4418
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"832f7c18-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=c6adb3bc&
4419
+ var FabricLinesvue_type_template_id_c6adb3bc_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"line"},[(_vm.isRightVisible)?_c('MouseRightClick',{attrs:{"getContainer":_vm.getContainer,"nodeList":_vm.rightClickNode,"rightPos":_vm.rightPos},on:{"nodeClick":_vm.handleRightClick,"closeRight":function($event){_vm.isRightVisible = false}}}):_vm._e(),(_vm.isDropVisible)?_c('DropPopup',{attrs:{"val":_vm.dropVal,"dropPos":_vm.dropPos}}):_vm._e()],1)}
4420
+ var FabricLinesvue_type_template_id_c6adb3bc_staticRenderFns = []
4652
4421
 
4653
4422
 
4654
- // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart/FabricLines.vue?vue&type=template&id=229d2d58&
4423
+ // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart/FabricLines.vue?vue&type=template&id=c6adb3bc&
4655
4424
 
4656
4425
  // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./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=script&lang=js&
4657
4426
 
@@ -4727,26 +4496,7 @@ var FabricLinesvue_type_script_lang_js_rightClickNode = [{
4727
4496
  };
4728
4497
  }
4729
4498
  },
4730
- watch: {// linesObj: {
4731
- // handler(value) {
4732
- // if (value) {
4733
- // if (this.lines.length) {
4734
- // this.removeLines();
4735
- // }
4736
- // this.getLineList(this.linesObj.list);
4737
- // this.createLine();
4738
- // }
4739
- // },
4740
- // deep: true
4741
- // },
4742
- },
4743
- mounted: function mounted() {
4744
- var _this = this;
4745
-
4746
- this.$nextTick(function () {
4747
- _this.init();
4748
- });
4749
- },
4499
+ mounted: function mounted() {},
4750
4500
  methods: {
4751
4501
  init: function init() {
4752
4502
  this.getLineList(this.linesObj.list);
@@ -4754,7 +4504,7 @@ var FabricLinesvue_type_script_lang_js_rightClickNode = [{
4754
4504
  this.eventStyle.evented && this.createEvent();
4755
4505
  },
4756
4506
  createEvent: function createEvent() {
4757
- var _this2 = this;
4507
+ var _this = this;
4758
4508
 
4759
4509
  this.canvas.on('mouse:up', function (event) {
4760
4510
  if (event.button === 3) {
@@ -4762,14 +4512,14 @@ var FabricLinesvue_type_script_lang_js_rightClickNode = [{
4762
4512
  x = _event$pointer.x,
4763
4513
  y = _event$pointer.y;
4764
4514
 
4765
- var _this2$$propItems = _this2.$propItems(),
4766
- originX = _this2$$propItems.originX,
4767
- endX = _this2$$propItems.endX,
4768
- endYTop = _this2$$propItems.endYTop;
4515
+ var _this$$propItems = _this.$propItems(),
4516
+ originX = _this$$propItems.originX,
4517
+ endX = _this$$propItems.endX,
4518
+ endYTop = _this$$propItems.endYTop;
4769
4519
 
4770
4520
  if (!(x < originX || x > endX || y < 0 || y > endYTop)) {
4771
- _this2.activeEvent = event;
4772
- document.querySelector('.upper-canvas').addEventListener('contextmenu', _this2.addEventListenerContextmenu, true);
4521
+ _this.activeEvent = event;
4522
+ document.querySelector('.upper-canvas').addEventListener('contextmenu', _this.addEventListenerContextmenu, true);
4773
4523
  }
4774
4524
  }
4775
4525
  });
@@ -4783,10 +4533,10 @@ var FabricLinesvue_type_script_lang_js_rightClickNode = [{
4783
4533
  var x = event.offsetX;
4784
4534
  var y = event.offsetY;
4785
4535
 
4786
- var _this$$propItems = this.$propItems(),
4787
- originX = _this$$propItems.originX,
4788
- endX = _this$$propItems.endX,
4789
- endYTop = _this$$propItems.endYTop;
4536
+ var _this$$propItems2 = this.$propItems(),
4537
+ originX = _this$$propItems2.originX,
4538
+ endX = _this$$propItems2.endX,
4539
+ endYTop = _this$$propItems2.endYTop;
4790
4540
 
4791
4541
  if (!(x < originX || x > endX || y < 0 || y > endYTop)) {
4792
4542
  this.openRightModal(this.activeEvent);
@@ -4796,7 +4546,7 @@ var FabricLinesvue_type_script_lang_js_rightClickNode = [{
4796
4546
  },
4797
4547
  // 打开右键菜单
4798
4548
  openRightModal: function openRightModal(event) {
4799
- var _this3 = this;
4549
+ var _this2 = this;
4800
4550
 
4801
4551
  this.rightPos = {
4802
4552
  clientX: event.e.clientX || event.e.pageX,
@@ -4807,9 +4557,9 @@ var FabricLinesvue_type_script_lang_js_rightClickNode = [{
4807
4557
  var id = target ? target.id : '';
4808
4558
  this.$nextTick(function () {
4809
4559
  if (id && id.includes('_lineGroup_')) {
4810
- _this3._currentPoint = target || '';
4811
- _this3.rightClickNode = Object.freeze(FabricLinesvue_type_script_lang_js_rightClickNode.slice());
4812
- _this3.isRightVisible = true;
4560
+ _this2._currentPoint = target || '';
4561
+ _this2.rightClickNode = Object.freeze(FabricLinesvue_type_script_lang_js_rightClickNode.slice());
4562
+ _this2.isRightVisible = true;
4813
4563
  }
4814
4564
  });
4815
4565
  },
@@ -4828,29 +4578,29 @@ var FabricLinesvue_type_script_lang_js_rightClickNode = [{
4828
4578
  },
4829
4579
  // 递归返回一维数据
4830
4580
  getLineList: function getLineList(list) {
4831
- var _this4 = this;
4581
+ var _this3 = this;
4832
4582
 
4833
4583
  list.forEach(function (item) {
4834
4584
  var _item$children;
4835
4585
 
4836
4586
  if (item !== null && item !== void 0 && (_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length) {
4837
- _this4.getLineList(item.children);
4587
+ _this3.getLineList(item.children);
4838
4588
  } else {
4839
4589
  var obj = JSON.parse(JSON.stringify(item));
4840
4590
 
4841
- _this4.lines.push(obj);
4591
+ _this3.lines.push(obj);
4842
4592
  }
4843
4593
  });
4844
4594
  },
4845
4595
  createLine: function createLine() {
4846
- var _this5 = this;
4596
+ var _this4 = this;
4847
4597
 
4848
4598
  this.lines.forEach(function (line, i) {
4849
- _this5.drawLineData(line, i);
4599
+ _this4.drawLineData(line, i);
4850
4600
  });
4851
4601
  },
4852
4602
  drawLineData: function drawLineData(line, i) {
4853
- var _this6 = this,
4603
+ var _this5 = this,
4854
4604
  _this$canvas;
4855
4605
 
4856
4606
  var lineList = line.lineList || [];
@@ -4873,9 +4623,9 @@ var FabricLinesvue_type_script_lang_js_rightClickNode = [{
4873
4623
  var startMinute = new Date(item[0]).getTime();
4874
4624
  var endMinute = item[1] ? new Date(item[1]).getTime() : '';
4875
4625
 
4876
- var x1 = _this6.cumputedX(item[0]);
4626
+ var x1 = _this5.cumputedX(item[0]);
4877
4627
 
4878
- var x2 = _this6.cumputedX(item[1]); // 数字文字
4628
+ var x2 = _this5.cumputedX(item[1]); // 数字文字
4879
4629
 
4880
4630
 
4881
4631
  var textObj = item[3] || {};
@@ -4884,7 +4634,7 @@ var FabricLinesvue_type_script_lang_js_rightClickNode = [{
4884
4634
  var leftLine;
4885
4635
 
4886
4636
  if (x1 && x1 >= originX && x1 <= endX) {
4887
- leftLine = _this6.drawGroup(x1, x2, y1 + spaceHeight, y2 - spaceHeight, i, j, {
4637
+ leftLine = _this5.drawGroup(x1, x2, y1 + spaceHeight, y2 - spaceHeight, i, j, {
4888
4638
  position: 'left'
4889
4639
  });
4890
4640
  lineItemList.push(leftLine);
@@ -4906,7 +4656,7 @@ var FabricLinesvue_type_script_lang_js_rightClickNode = [{
4906
4656
  var centerLine;
4907
4657
 
4908
4658
  if (item[1] && !(endMinute >= maxMinute && startMinute >= maxMinute) && !(endMinute <= minMinute && startMinute <= minMinute)) {
4909
- centerLine = _this6.drawLine([x1, y1 + yCellHeightTop / 2, x2, y1 + yCellHeightTop / 2], Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, _this6.linesObj.dataLineStyle), {}, {
4659
+ centerLine = _this5.drawLine([x1, y1 + yCellHeightTop / 2, x2, y1 + yCellHeightTop / 2], Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, _this5.linesObj.dataLineStyle), {}, {
4910
4660
  selectable: false,
4911
4661
  evented: false,
4912
4662
  id: '_lineGroup_' + new Date().getTime(),
@@ -4914,7 +4664,7 @@ var FabricLinesvue_type_script_lang_js_rightClickNode = [{
4914
4664
  }));
4915
4665
  lineItemList.push(centerLine); // 添加透明矩形,便于选择横线右键删除
4916
4666
 
4917
- var centerRect = new _this6.fabric.Rect({
4667
+ var centerRect = new _this5.fabric.Rect({
4918
4668
  id: '_lineGroup_' + new Date().getTime(),
4919
4669
  fill: 'transparent',
4920
4670
  width: x2 - x1 - 20,
@@ -4931,7 +4681,7 @@ var FabricLinesvue_type_script_lang_js_rightClickNode = [{
4931
4681
  centerRect.lockMovementX = centerRect.lockMovementY = true;
4932
4682
  centerRect.hasControls = centerRect.hasBorders = false;
4933
4683
 
4934
- _this6.hoverEvent(centerRect, {
4684
+ _this5.hoverEvent(centerRect, {
4935
4685
  textObj: textObj,
4936
4686
  startTime: item[0],
4937
4687
  endTime: item[1]
@@ -4945,7 +4695,7 @@ var FabricLinesvue_type_script_lang_js_rightClickNode = [{
4945
4695
  var rightLine;
4946
4696
 
4947
4697
  if (item[1] && endMinute <= maxMinute && endMinute >= minMinute) {
4948
- rightLine = _this6.drawGroup(x1, x2, y1 + spaceHeight, y2 - spaceHeight, i, j, {
4698
+ rightLine = _this5.drawGroup(x1, x2, y1 + spaceHeight, y2 - spaceHeight, i, j, {
4949
4699
  position: 'right'
4950
4700
  });
4951
4701
  lineItemList.push(rightLine);
@@ -4954,23 +4704,23 @@ var FabricLinesvue_type_script_lang_js_rightClickNode = [{
4954
4704
 
4955
4705
  var textTop = x2 ? (y1 + y2) / 2 : y1 + yCellHeightTop / 2;
4956
4706
  var textLimitRight;
4957
- var text = endMinute === '' && leftLine || item[1] && !(x1 === originX && x2 === originX) && !(x1 === endX && x2 === endX) ? _this6.drawLineText(textArr.concat([textContent]), textTop, i, j, centerLine, x1, x2) : null; // 文字内容居右侧竖线且超出当前线段右边界则移除
4707
+ var text = endMinute === '' && leftLine || item[1] && !(x1 === originX && x2 === originX) && !(x1 === endX && x2 === endX) ? _this5.drawLineText(textArr.concat([textContent]), textTop, i, j, centerLine, x1, x2) : null; // 文字内容居右侧竖线且超出当前线段右边界则移除
4958
4708
 
4959
4709
  if (text) {
4960
4710
  var _lineList;
4961
4711
 
4962
- textLimitRight = (_lineList = lineList[j + 1]) !== null && _lineList !== void 0 && _lineList[0] && _this6.cumputedX(lineList[j + 1][0]) <= endX ? _this6.cumputedX(lineList[j + 1][0]) : endX;
4712
+ textLimitRight = (_lineList = lineList[j + 1]) !== null && _lineList !== void 0 && _lineList[0] && _this5.cumputedX(lineList[j + 1][0]) <= endX ? _this5.cumputedX(lineList[j + 1][0]) : endX;
4963
4713
 
4964
4714
  if (text.originX === 'left' && text.left + text.width + 2 >= textLimitRight) {
4965
4715
  textLimitRight !== endX && textArr.push(textContent);
4966
4716
 
4967
- _this6.canvas.remove(text);
4717
+ _this5.canvas.remove(text);
4968
4718
 
4969
4719
  text = null;
4970
4720
  } else {
4971
4721
  textArr = [];
4972
4722
 
4973
- _this6.hoverEvent(text, {
4723
+ _this5.hoverEvent(text, {
4974
4724
  textObj: textObj,
4975
4725
  startTime: item[0],
4976
4726
  endTime: item[1]
@@ -4992,10 +4742,10 @@ var FabricLinesvue_type_script_lang_js_rightClickNode = [{
4992
4742
 
4993
4743
  if (preItem1) {
4994
4744
  var preEndMinute = new Date(preItem1).getTime();
4995
- if (preEndMinute >= minMinute && preEndMinute < maxMinute) leftLimit.x1 = _this6.cumputedX(preItem1);
4745
+ if (preEndMinute >= minMinute && preEndMinute < maxMinute) leftLimit.x1 = _this5.cumputedX(preItem1);
4996
4746
  } else {
4997
4747
  var preStartMinute = new Date(preItem0).getTime();
4998
- if (preStartMinute >= minMinute && preStartMinute < maxMinute) leftLimit.x1 = _this6.cumputedX(preItem0);
4748
+ if (preStartMinute >= minMinute && preStartMinute < maxMinute) leftLimit.x1 = _this5.cumputedX(preItem0);
4999
4749
  }
5000
4750
  }
5001
4751
 
@@ -5010,11 +4760,11 @@ var FabricLinesvue_type_script_lang_js_rightClickNode = [{
5010
4760
  if (_preItem) {
5011
4761
  var _preStartMinute = new Date(_preItem).getTime();
5012
4762
 
5013
- if (_preStartMinute > minMinute && _preStartMinute <= maxMinute) rightLimt.x2 = _this6.cumputedX(_preItem);
4763
+ if (_preStartMinute > minMinute && _preStartMinute <= maxMinute) rightLimt.x2 = _this5.cumputedX(_preItem);
5014
4764
  }
5015
4765
  }
5016
4766
 
5017
- _this6.lineEvent({
4767
+ _this5.lineEvent({
5018
4768
  line: leftLine,
5019
4769
  line1: centerLine,
5020
4770
  text: text,
@@ -5026,7 +4776,7 @@ var FabricLinesvue_type_script_lang_js_rightClickNode = [{
5026
4776
  textLimitRight: textLimitRight
5027
4777
  });
5028
4778
 
5029
- _this6.lineEvent({
4779
+ _this5.lineEvent({
5030
4780
  line: rightLine,
5031
4781
  line2: centerLine,
5032
4782
  text: text,
@@ -5039,9 +4789,8 @@ var FabricLinesvue_type_script_lang_js_rightClickNode = [{
5039
4789
  });
5040
4790
  });
5041
4791
 
5042
- (_this$canvas = this.canvas).add.apply(_this$canvas, lineItemList.concat(textList));
4792
+ (_this$canvas = this.canvas).add.apply(_this$canvas, lineItemList.concat(textList)); // this.canvas.requestRenderAll();
5043
4793
 
5044
- this.canvas.requestRenderAll();
5045
4794
  },
5046
4795
  drawLineText: function drawLineText(textArr, top, i, j, centerLine, x1, x2) {
5047
4796
  // const value = textArr.map(v => {
@@ -5127,7 +4876,7 @@ var FabricLinesvue_type_script_lang_js_rightClickNode = [{
5127
4876
  }));
5128
4877
  },
5129
4878
  hoverEvent: function hoverEvent(point, attr) {
5130
- var _this7 = this;
4879
+ var _this6 = this;
5131
4880
 
5132
4881
  var textObj = attr.textObj,
5133
4882
  startTime = attr.startTime,
@@ -5136,14 +4885,14 @@ var FabricLinesvue_type_script_lang_js_rightClickNode = [{
5136
4885
  endTime && (point.endTime = endTime);
5137
4886
  textObj && (point.textObj = textObj);
5138
4887
  point.on('mouseover', function () {
5139
- _this7.showDrapPopup(point);
4888
+ _this6.showDrapPopup(point);
5140
4889
  });
5141
4890
  point.on('mouseout', function () {
5142
- _this7.isDropVisible = false;
4891
+ _this6.isDropVisible = false;
5143
4892
  });
5144
4893
  },
5145
4894
  lineEvent: function lineEvent(attr) {
5146
- var _this8 = this;
4895
+ var _this7 = this;
5147
4896
 
5148
4897
  var line = attr.line,
5149
4898
  line1 = attr.line1,
@@ -5171,27 +4920,26 @@ var FabricLinesvue_type_script_lang_js_rightClickNode = [{
5171
4920
  }); // 移动中 实时更新相关联的线的坐标
5172
4921
 
5173
4922
  line.on('moving', function () {
5174
- _this8.lineMoveLimit(line);
4923
+ _this7.lineMoveLimit(line);
5175
4924
 
5176
- _this8.lineMoveUpdateLine(line);
4925
+ _this7.lineMoveUpdateLine(line);
5177
4926
 
5178
- _this8.textUpdatePositionX(line);
4927
+ _this7.textUpdatePositionX(line); // this.canvas.renderAll();
5179
4928
 
5180
- _this8.canvas.renderAll();
5181
4929
 
5182
- _this8.showDrapPopup(line);
4930
+ _this7.showDrapPopup(line);
5183
4931
  });
5184
4932
  line.on('moved', function () {
5185
4933
  // const objBoundingBox = line.getBoundingRect();
5186
4934
  if (line && line.id.includes('_lineGroup_')) {
5187
- _this8.isDropVisible = false;
4935
+ _this7.isDropVisible = false;
5188
4936
 
5189
- var _this8$updateData = _this8.updateData(line),
5190
- lineObj = _this8$updateData.lineObj;
4937
+ var _this7$updateData = _this7.updateData(line),
4938
+ lineObj = _this7$updateData.lineObj;
5191
4939
 
5192
- _this8.updateLine(line.rowIndex);
4940
+ _this7.updateLine(line.rowIndex);
5193
4941
 
5194
- _this8.$emit('lineChange', {
4942
+ _this7.$emit('lineChange', {
5195
4943
  ponits: {
5196
4944
  x: line.left,
5197
4945
  y: line.top
@@ -5287,1633 +5035,128 @@ var FabricLinesvue_type_script_lang_js_rightClickNode = [{
5287
5035
 
5288
5036
  return {
5289
5037
  lineObj: {
5290
- title: linesRow.title,
5291
- obj: linesRow.lineList[colIndex],
5292
- val: x
5293
- },
5294
- x: x
5295
- };
5296
- },
5297
- // 直线数组更新后 移除旧的直线并绘制新的直线,处理拖动限制不能更新的问题
5298
- updateLine: function updateLine(rowIndex) {
5299
- var _this9 = this;
5300
-
5301
- this.canvas.forEachObject(function (obj) {
5302
- if (obj.rowIndex === rowIndex) {
5303
- _this9.canvas.remove(obj);
5304
- }
5305
- });
5306
- this.drawLineData(this.lines[rowIndex], rowIndex);
5307
- },
5308
- // 移除头部表格所有线条数字数据
5309
- removeLines: function removeLines() {
5310
- var _this10 = this;
5311
-
5312
- this.canvas.forEachObject(function (obj) {
5313
- if (obj.id && obj.id.includes('_lineGroup_')) {
5314
- _this10.canvas.remove(obj);
5315
- }
5316
- });
5317
- this.lines = [];
5318
- },
5319
- drawLine: function drawLine(lines, others) {
5320
- var line = new this.fabric.Line(lines, Object(objectSpread2["a" /* default */])({
5321
- objectCaching: false
5322
- }, others));
5323
- return line;
5324
- },
5325
- lineMoveLimit: function lineMoveLimit(line) {
5326
- line.setCoords(); // 需调用setCoords()才能重新计算控制位置(改变Object状态)
5327
-
5328
- if (line.left < line.limitX.x1) {
5329
- line.set('left', line.limitX.x1);
5330
- }
5331
-
5332
- if (line.left > line.limitX.x2) {
5333
- line.set('left', line.limitX.x2);
5334
- }
5335
- },
5336
- lineMoveUpdateLine: function lineMoveUpdateLine(line) {
5337
- if (line.line1) {
5338
- line.line1.setCoords();
5339
- line.line1.set({
5340
- x1: line.left
5341
- });
5342
- }
5343
-
5344
- if (line.line2) {
5345
- line.line2.setCoords();
5346
- line.line2.set({
5347
- x2: line.left
5348
- });
5349
- }
5350
- },
5351
- textUpdatePositionX: function textUpdatePositionX(line) {
5352
- var text = line.text || null;
5353
-
5354
- if (text) {
5355
- // 如果line2存在说明当前拖动的是右边手柄,line1存在则是左边手柄,都不存在说明不存在中间线
5356
- var centerLine = line.line1 || line.line2 || null;
5357
- var left = line.left;
5358
-
5359
- var _limitWidth = text.width + 2;
5360
-
5361
- var originX = text.originX;
5362
- var v;
5363
-
5364
- if ((centerLine === null || centerLine === void 0 ? void 0 : centerLine.x2) - (centerLine === null || centerLine === void 0 ? void 0 : centerLine.x1) > _limitWidth) {
5365
- v = left + centerLine.width / 2 * (line.line2 ? -1 : 1);
5366
- originX = 'center';
5367
- } else {
5368
- v = this.textMarginLeft + (centerLine ? centerLine.x2 : left);
5369
- originX = 'left'; // 移动到最右边界时候文字超出当前线段可拖动的右边界的情况
5370
-
5371
- if (line.textLimitRight && v + _limitWidth > line.textLimitRight) {
5372
- v = this.propItems.endX + 100; // 此值随便设置,只要达到隐藏效果即可
5373
- }
5374
- }
5375
-
5376
- text.setCoords();
5377
- text.set({
5378
- left: v,
5379
- originX: originX
5380
- });
5381
- } // 拖动左侧竖线时需要更改上一线段文字的位置,以防止文字被遮挡
5382
-
5383
-
5384
- var preText = line.preText || null;
5385
- if (!preText) return;
5386
- var limitWidth = preText.width + 2;
5387
-
5388
- if (preText.originX === 'left' && preText.left + limitWidth > line.left) {
5389
- var _v = this.propItems.endX + 100; // 此值随便设置,只要达到隐藏效果即可
5390
-
5391
-
5392
- preText.setCoords();
5393
- preText.set({
5394
- left: _v
5395
- });
5396
- }
5397
- },
5398
- repaintLine: function repaintLine() {
5399
- if (this.lines.length) {
5400
- this.removeLines();
5401
- }
5402
-
5403
- this.getLineList(this.linesObj.list);
5404
- this.createLine();
5405
- }
5406
- },
5407
- beforeDestroy: function beforeDestroy() {}
5408
- });
5409
- // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart/FabricLines.vue?vue&type=script&lang=js&
5410
- /* harmony default export */ var fabric_chart_FabricLinesvue_type_script_lang_js_ = (FabricLinesvue_type_script_lang_js_);
5411
- // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart/FabricLines.vue
5412
-
5413
-
5414
-
5415
-
5416
-
5417
- /* normalize component */
5418
-
5419
- var FabricLines_component = Object(componentNormalizer["a" /* default */])(
5420
- fabric_chart_FabricLinesvue_type_script_lang_js_,
5421
- FabricLinesvue_type_template_id_229d2d58_render,
5422
- FabricLinesvue_type_template_id_229d2d58_staticRenderFns,
5423
- false,
5424
- null,
5425
- null,
5426
- null
5427
-
5428
- )
5429
-
5430
- /* harmony default export */ var FabricLines = (FabricLines_component.exports);
5431
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/fabric-chart2/FabricTop.vue?vue&type=script&lang=js&
5432
-
5433
-
5434
-
5435
-
5436
-
5437
-
5438
-
5439
- /* harmony default export */ var FabricTopvue_type_script_lang_js_ = ({
5440
- name: 'fabric-top2',
5441
- mixins: [fabricCommon, draw],
5442
- props: {
5443
- templateData: {
5444
- type: Object,
5445
- required: true
5446
- }
5447
- },
5448
- data: function data() {
5449
- return {};
5450
- },
5451
- mounted: function mounted() {
5452
- var _this = this;
5453
-
5454
- this.$nextTick(function () {
5455
- _this.init();
5456
- });
5457
- },
5458
- computed: {
5459
- girdLineStyle: function girdLineStyle() {
5460
- return Object.assign({}, defaultVaule.borderStyle, this.templateData.borderStyle || {});
5461
- }
5462
- },
5463
- methods: {
5464
- init: function init() {
5465
- this.drawTop(this.templateData.top);
5466
- this.canvas.renderAll();
5467
- },
5468
- drawTop: function drawTop(top) {
5469
- var list = []; // 日期
5470
-
5471
- this.drawTopDate(top, list); // 上午/下午
5472
-
5473
- this.drawTopDay(top, list); // 时间刻度
5474
-
5475
- this.drawTopTime(top, list);
5476
- var group = list.length > 0 ? new this.fabric.Group([].concat(list), Object(objectSpread2["a" /* default */])({}, defaultVaule.style)) : null;
5477
- group && group.sendToBack(); // 向下跳底层
5478
-
5479
- group && this.canvas.add(group);
5480
- },
5481
- drawTopTime: function drawTopTime(top, list) {
5482
- var _top$date,
5483
- _this2 = this;
5484
-
5485
- var _this$propItems = this.propItems,
5486
- originX = _this$propItems.originX,
5487
- originY = _this$propItems.originY,
5488
- xCellWidth = _this$propItems.xCellWidth,
5489
- table = _this$propItems.table;
5490
- var dateHeight = ((_top$date = top.date) === null || _top$date === void 0 ? void 0 : _top$date.height) || 0;
5491
- var dayHeight = top.dayHeight || 0;
5492
- var height = originY - dateHeight - dayHeight;
5493
- var titleHeight = dayHeight + height; // 标题
5494
-
5495
- var title = this.drawTextGroup(Object(objectSpread2["a" /* default */])({
5496
- width: originX,
5497
- height: titleHeight
5498
- }, defaultVaule.rectStyle), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({
5499
- text: String(top.xScalevalue.title)
5500
- }, defaultVaule.textStyle), top.textGroupStyle), {
5501
- left: 0,
5502
- top: dateHeight
5503
- });
5504
- list.push(title); // 时间列表
5505
-
5506
- var timeList = [];
5507
-
5508
- for (var j = 0; j < table.mainXCell; j++) {
5509
- timeList.push(top.xScalevalue.list);
5510
- }
5511
-
5512
- timeList.flat().forEach(function (v, i) {
5513
- var left = originX + i * xCellWidth;
5514
-
5515
- var textGroup = _this2.drawTextGroup({
5516
- width: xCellWidth,
5517
- height: height
5518
- }, Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({
5519
- text: String(v)
5520
- }, defaultVaule.textStyle), top.textGroupStyle), {
5521
- left: left,
5522
- top: dateHeight + dayHeight
5523
- });
5524
-
5525
- list.push(textGroup);
5526
- });
5527
- },
5528
- drawTopDay: function drawTopDay(top, list) {
5529
- if (!top.dayHeight) return false;
5530
- var _this$propItems2 = this.propItems,
5531
- originX = _this$propItems2.originX,
5532
- xCellWidth = _this$propItems2.xCellWidth,
5533
- gridXNumber = _this$propItems2.gridXNumber,
5534
- table = _this$propItems2.table;
5535
- var height = top.dayHeight; // 上午下午列表
5536
-
5537
- var width = xCellWidth * table.subSecondXCell;
5538
- var dayList = gridXNumber / table.subSecondXCell;
5539
-
5540
- for (var i = 0; i < dayList; i++) {
5541
- var left = originX + i * width;
5542
- var value = i % 2 === 0 ? '上午' : '下午';
5543
- var textGroup = this.drawTextGroup({
5544
- width: width,
5545
- height: height
5546
- }, Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({
5547
- text: String(value)
5548
- }, defaultVaule.textStyle), top.textGroupStyle), {
5549
- left: left,
5550
- top: top.date.height || 0
5551
- });
5552
- list.push(textGroup);
5553
- }
5554
- },
5555
- drawTopDate: function drawTopDate(top, list) {
5556
- var _this3 = this;
5557
-
5558
- if (!top.date.height) return false;
5559
- var _this$propItems3 = this.propItems,
5560
- originX = _this$propItems3.originX,
5561
- xCellWidth = _this$propItems3.xCellWidth,
5562
- table = _this$propItems3.table;
5563
- var height = top.date.height; // 标题
5564
-
5565
- var title = this.drawTextGroup(Object(objectSpread2["a" /* default */])({
5566
- width: originX,
5567
- height: height
5568
- }, defaultVaule.rectStyle), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({
5569
- text: String(top.date.title)
5570
- }, defaultVaule.textStyle), top.textGroupStyle), {
5571
- left: 0,
5572
- top: 0
5573
- });
5574
- list.push(title); // 日期列表
5575
-
5576
- var width = xCellWidth * table.subXCell;
5577
- top.date.list.forEach(function (v, i) {
5578
- var left = originX + i * width;
5579
-
5580
- var textGroup = _this3.drawTextGroup({
5581
- width: width,
5582
- height: height
5583
- }, Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({
5584
- text: String(v)
5585
- }, defaultVaule.textStyle), top.textGroupStyle), {
5586
- left: left,
5587
- top: 0
5588
- });
5589
-
5590
- list.push(textGroup);
5591
- });
5592
- }
5593
- },
5594
- render: function render(h) {
5595
- return this.$slots.default ? h('div', this.$slots.default) : undefined;
5596
- }
5597
- });
5598
- // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart2/FabricTop.vue?vue&type=script&lang=js&
5599
- /* harmony default export */ var fabric_chart2_FabricTopvue_type_script_lang_js_ = (FabricTopvue_type_script_lang_js_);
5600
- // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart2/FabricTop.vue
5601
- var FabricTop_render, FabricTop_staticRenderFns
5602
-
5603
-
5604
-
5605
-
5606
- /* normalize component */
5607
-
5608
- var FabricTop_component = Object(componentNormalizer["a" /* default */])(
5609
- fabric_chart2_FabricTopvue_type_script_lang_js_,
5610
- FabricTop_render,
5611
- FabricTop_staticRenderFns,
5612
- false,
5613
- null,
5614
- null,
5615
- null
5616
-
5617
- )
5618
-
5619
- /* harmony default export */ var FabricTop = (FabricTop_component.exports);
5620
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/fabric-chart2/FabricLeft.vue?vue&type=script&lang=js&
5621
-
5622
-
5623
-
5624
-
5625
-
5626
-
5627
- /* harmony default export */ var FabricLeftvue_type_script_lang_js_ = ({
5628
- name: 'fabric-left2',
5629
- mixins: [fabricCommon],
5630
- props: {
5631
- templateData: {
5632
- type: Object,
5633
- required: true
5634
- }
5635
- },
5636
- data: function data() {
5637
- return {};
5638
- },
5639
- computed: {
5640
- defaultTextStyle: function defaultTextStyle() {
5641
- return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.style), defaultVaule.textStyle), {}, {
5642
- centeredRotation: true,
5643
- originX: 'center',
5644
- originY: 'center'
5645
- });
5646
- }
5647
- },
5648
- mounted: function mounted() {
5649
- var _this = this;
5650
-
5651
- this.$nextTick(function () {
5652
- _this.init();
5653
- });
5654
- },
5655
- methods: {
5656
- init: function init() {
5657
- this.leftScaleValue(this.templateData.left);
5658
- this.canvas.renderAll();
5659
- },
5660
- leftScaleValue: function leftScaleValue(left) {
5661
- var _this2 = this;
5662
-
5663
- var groupList = [];
5664
- var _this$propItems = this.propItems,
5665
- originX = _this$propItems.originX,
5666
- originY = _this$propItems.originY,
5667
- endY = _this$propItems.endY,
5668
- yCellHeight = _this$propItems.yCellHeight;
5669
- var column = left.leftYScalevalue.length;
5670
- var colWidth = originX / column;
5671
- var residue = originX % column;
5672
- var firstColWidth = colWidth + residue;
5673
- left.leftYScalevalue.forEach(function (item, index) {
5674
- var list = []; // 刻度外框
5675
-
5676
- var rectWidth = index === 0 ? firstColWidth : colWidth;
5677
- var rectLeft = index === 0 ? 0 : firstColWidth + (index - 1) * colWidth;
5678
- var line = index > 0 ? new _this2.fabric.Line([rectLeft, originY, rectLeft, endY], Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.style), defaultVaule.borderStyle)) : null;
5679
- line && list.push(line);
5680
- var leftVal = rectLeft + rectWidth / 2; // 刻度列表
5681
-
5682
- item.list.forEach(function (v, i) {
5683
- var top = endY - i * yCellHeight * left.spaceGridNumber;
5684
-
5685
- var text = _this2.createText(v, leftVal, i === 0 ? top - 5 : top, 'center', item.style);
5686
-
5687
- list.push(text);
5688
- }); // 添加标题和单位
5689
-
5690
- var title = item.name || '';
5691
- if (item.unit) title += '\n' + item.unit;
5692
- title && list.push(_this2.createText(title, leftVal, originY + yCellHeight * left.spaceGridNumber / 2, 'center', Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, item.style), {}, {
5693
- textAlign: 'center'
5694
- })));
5695
- var group = new _this2.fabric.Group(list, defaultVaule.style);
5696
- groupList.push(group);
5697
- }); // 外框
5698
-
5699
- groupList.push(new this.fabric.Rect(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.style), defaultVaule.rectStyle), {}, {
5700
- width: originX,
5701
- height: endY - originY,
5702
- left: 0,
5703
- top: originY
5704
- })));
5705
- var group = groupList.length > 0 ? new this.fabric.Group([].concat(groupList), Object(objectSpread2["a" /* default */])({}, defaultVaule.style)) : null;
5706
- group && group.sendToBack(); // 向下跳底层
5707
-
5708
- group && this.canvas.add(group);
5709
- },
5710
- createText: function createText(text, left, top, originX, style) {
5711
- return new this.fabric.Text(String(text), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, this.defaultTextStyle), {}, {
5712
- left: left,
5713
- top: top,
5714
- originX: originX
5715
- }, style));
5716
- }
5717
- },
5718
- render: function render(h) {
5719
- return this.$slots.default ? h('div', this.$slots.default) : undefined;
5720
- }
5721
- });
5722
- // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart2/FabricLeft.vue?vue&type=script&lang=js&
5723
- /* harmony default export */ var fabric_chart2_FabricLeftvue_type_script_lang_js_ = (FabricLeftvue_type_script_lang_js_);
5724
- // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart2/FabricLeft.vue
5725
- var FabricLeft_render, FabricLeft_staticRenderFns
5726
-
5727
-
5728
-
5729
-
5730
- /* normalize component */
5731
-
5732
- var FabricLeft_component = Object(componentNormalizer["a" /* default */])(
5733
- fabric_chart2_FabricLeftvue_type_script_lang_js_,
5734
- FabricLeft_render,
5735
- FabricLeft_staticRenderFns,
5736
- false,
5737
- null,
5738
- null,
5739
- null
5740
-
5741
- )
5742
-
5743
- /* harmony default export */ var FabricLeft = (FabricLeft_component.exports);
5744
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/fabric-chart2/FabricRight.vue?vue&type=script&lang=js&
5745
-
5746
-
5747
-
5748
-
5749
-
5750
-
5751
-
5752
-
5753
-
5754
-
5755
- /* harmony default export */ var FabricRightvue_type_script_lang_js_ = ({
5756
- name: 'fabric-right2',
5757
- mixins: [fabricCommon],
5758
- props: {
5759
- templateData: {
5760
- type: Object,
5761
- required: true
5762
- }
5763
- },
5764
- data: function data() {
5765
- return {};
5766
- },
5767
- computed: {
5768
- defaultTextStyle: function defaultTextStyle() {
5769
- return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.style), defaultVaule.textStyle), {}, {
5770
- centeredRotation: true,
5771
- originX: 'center',
5772
- originY: 'center'
5773
- });
5774
- }
5775
- },
5776
- mounted: function mounted() {
5777
- var _this = this;
5778
-
5779
- this.$nextTick(function () {
5780
- _this.init();
5781
- });
5782
- },
5783
- methods: {
5784
- init: function init() {
5785
- this.rightScaleValue(this.templateData.right || null);
5786
- this.canvas.renderAll();
5787
- },
5788
- rightScaleValue: function rightScaleValue(right) {
5789
- var _this2 = this;
5790
-
5791
- var _this$propItems = this.propItems,
5792
- endX = _this$propItems.endX,
5793
- endY = _this$propItems.endY,
5794
- centigradeYCell = _this$propItems.centigradeYCell,
5795
- canvasWidth = _this$propItems.canvasWidth,
5796
- canvasHeight = _this$propItems.canvasHeight;
5797
-
5798
- if (!right) {
5799
- this.canvas.add(new this.fabric.Line([canvasWidth - 1, 0, canvasWidth - 1, canvasHeight], defaultVaule.borderStyle));
5800
- return false;
5801
- }
5802
-
5803
- var list = []; // 华氏度外框
5804
-
5805
- list.push(new this.fabric.Rect(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.style), defaultVaule.rectStyle), {}, {
5806
- width: canvasWidth - endX - 1,
5807
- height: canvasHeight - 1,
5808
- left: endX,
5809
- top: 0
5810
- }))); // 华氏度列表,目前是整数列表(33℃对应91℉,所以存在误差),如果是正对应的如33℃对应91.4℉则不需要计算difVal和spaceHVaule和spaceHVaule0
5811
-
5812
- var difVal = 6;
5813
- var spaceScaleNumber = right.rightYScalevalue.spaceScaleNumber || 5;
5814
- var mainScaleWidth = 9;
5815
- var subScaleWidth = 5;
5816
- var cList = this.templateData.left.leftYScalevalue.find(function (v) {
5817
- return v.type === 'centigrade';
5818
- }).list; // 左侧摄氏度温度list
5819
-
5820
- var minC = Math.min.apply(Math, Object(toConsumableArray["a" /* default */])(cList)); // 左侧温度刻度最小值
5821
-
5822
- var h1 = right.rightYScalevalue.list[1];
5823
- var h0 = right.rightYScalevalue.list[0];
5824
- var c1 = 5 * (h1 - 32) / 9;
5825
- var c0 = 5 * (h0 - 32) / 9;
5826
- var top1 = endY - (c1 - minC) * centigradeYCell - difVal;
5827
- var top0 = endY - (c0 - minC) * centigradeYCell - difVal;
5828
- var spaceHVaule = (top0 - top1) / spaceScaleNumber; // 每华氏度之间的间隔高度值
5829
-
5830
- var endTop; // 记录最上一个刻度数的高度值,用于计算单位的高度
5831
-
5832
- right.rightYScalevalue.list.forEach(function (v, i) {
5833
- var c = 5 * (v - 32) / 9; // 华氏转换为摄氏,此为固定公式
5834
-
5835
- var top = endY - (c - minC) * centigradeYCell - difVal; // 存在6px的误差,因为比如34℃=93.2华氏度而不是93华氏度
5836
-
5837
- if (i === right.rightYScalevalue.list.length - 1) endTop = top;
5838
-
5839
- var text = _this2.createText("".concat(v, "\xB0"), endX + mainScaleWidth, i === 0 ? endY - 5 : top, 'left', right.rightYScalevalue.style);
5840
-
5841
- list.push(text); // 刻度横线
5842
-
5843
- var spaceHVaule0 = (endY - top1) / spaceScaleNumber; // 第一个-每华氏度之间的间隔高度值
5844
-
5845
- for (var k = 0; k < spaceScaleNumber; k++) {
5846
- var scaleTop = i === 0 ? endY - k * spaceHVaule0 : top - k * spaceHVaule;
5847
- var line = new _this2.fabric.Line([endX, scaleTop, k > 0 ? endX + subScaleWidth : endX + mainScaleWidth, scaleTop], Object(objectSpread2["a" /* default */])({}, defaultVaule.borderStyle));
5848
- list.push(line);
5849
- }
5850
- }); // 单位
5851
-
5852
- var width = canvasWidth - endX;
5853
- var unit = right.rightYScalevalue.unit ? this.createText(right.rightYScalevalue.unit.split('').join('\n'), endX + width / 2, endTop / 2, 'center', right.rightYScalevalue.style) : null;
5854
- unit && list.push(unit);
5855
- var group = list.length > 0 ? new this.fabric.Group([].concat(list), Object(objectSpread2["a" /* default */])({}, defaultVaule.style)) : null;
5856
- group && group.sendToBack(); // 向下跳底层
5857
-
5858
- group && this.canvas.add(group);
5859
- },
5860
- createText: function createText(text, left, top, originX, style) {
5861
- return new this.fabric.Text(String(text), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, this.defaultTextStyle), {}, {
5862
- left: left,
5863
- top: top,
5864
- originX: originX
5865
- }, style));
5866
- }
5867
- },
5868
- render: function render(h) {
5869
- return this.$slots.default ? h('div', this.$slots.default) : undefined;
5870
- }
5871
- });
5872
- // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart2/FabricRight.vue?vue&type=script&lang=js&
5873
- /* harmony default export */ var fabric_chart2_FabricRightvue_type_script_lang_js_ = (FabricRightvue_type_script_lang_js_);
5874
- // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart2/FabricRight.vue
5875
- var FabricRight_render, FabricRight_staticRenderFns
5876
-
5877
-
5878
-
5879
-
5880
- /* normalize component */
5881
-
5882
- var FabricRight_component = Object(componentNormalizer["a" /* default */])(
5883
- fabric_chart2_FabricRightvue_type_script_lang_js_,
5884
- FabricRight_render,
5885
- FabricRight_staticRenderFns,
5886
- false,
5887
- null,
5888
- null,
5889
- null
5890
-
5891
- )
5892
-
5893
- /* harmony default export */ var FabricRight = (FabricRight_component.exports);
5894
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/fabric-chart2/FabricBottom.vue?vue&type=script&lang=js&
5895
-
5896
-
5897
-
5898
-
5899
-
5900
-
5901
-
5902
- /* harmony default export */ var FabricBottomvue_type_script_lang_js_ = ({
5903
- name: 'fabric-bottom2',
5904
- mixins: [fabricCommon, draw],
5905
- props: {
5906
- templateData: {
5907
- type: Object,
5908
- required: true
5909
- }
5910
- },
5911
- data: function data() {
5912
- return {};
5913
- },
5914
- mounted: function mounted() {
5915
- var _this = this;
5916
-
5917
- this.$nextTick(function () {
5918
- _this.init();
5919
- });
5920
- },
5921
- computed: {
5922
- girdLineStyle: function girdLineStyle() {
5923
- return Object.assign({}, defaultVaule.borderStyle, this.templateData.borderStyle || {});
5924
- }
5925
- },
5926
- methods: {
5927
- init: function init() {
5928
- this.drawBottom(this.templateData.bottom || null);
5929
- this.canvas.renderAll();
5930
- },
5931
- drawBottom: function drawBottom(bottom) {
5932
- var _this2 = this;
5933
-
5934
- var _this$propItems = this.propItems,
5935
- xScaleList = _this$propItems.xScaleList,
5936
- xScaleCell = _this$propItems.xScaleCell,
5937
- originX = _this$propItems.originX,
5938
- endX = _this$propItems.endX,
5939
- endY = _this$propItems.endY,
5940
- xCellWidth = _this$propItems.xCellWidth,
5941
- canvasHeight = _this$propItems.canvasHeight;
5942
-
5943
- if (!bottom) {
5944
- this.canvas.add(new this.fabric.Line([0, canvasHeight - 1, endX, canvasHeight - 1], defaultVaule.borderStyle));
5945
- return false;
5946
- }
5947
-
5948
- var height = canvasHeight - endY;
5949
- var list = [];
5950
- var flag = true; // 定义呼吸数值显示为靠上还是靠下
5951
- // 数据列表
5952
-
5953
- xScaleList.forEach(function (item, index) {
5954
- var left = originX + index * xCellWidth;
5955
- var text = '';
5956
- bottom.list.forEach(function (v, i) {
5957
- var time = new Date(v.time).getTime();
5958
- if (time >= item && time < item + xScaleCell) text = v.value;
5959
- });
5960
- var style = flag ? {
5961
- top: -(height / 2 - 10)
5962
- } : {
5963
- top: height / 2 - 10
5964
- };
5965
- if (text) flag = !flag;
5966
-
5967
- var group = _this2.drawTextGroup(Object(objectSpread2["a" /* default */])({
5968
- width: xCellWidth,
5969
- height: height
5970
- }, defaultVaule.rectStyle), Object.assign({}, Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({
5971
- text: String(text)
5972
- }, defaultVaule.textStyle), top.textGroupStyle), text ? style : {}), {
5973
- left: left,
5974
- top: endY
5975
- });
5976
-
5977
- list.push(group);
5978
- }); // 底部外框和标题名称
5979
-
5980
- var titleGroup = this.drawTextGroup(Object(objectSpread2["a" /* default */])({
5981
- width: endX,
5982
- height: height - 1
5983
- }, defaultVaule.rectStyle), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({
5984
- text: String(bottom.name + bottom.unit)
5985
- }, defaultVaule.textStyle), top.textGroupStyle), {}, {
5986
- left: -((endX - originX) / 2)
5987
- }), {
5988
- left: 0,
5989
- top: endY
5990
- });
5991
- list.push(titleGroup);
5992
- var group = list.length > 0 ? new this.fabric.Group([].concat(list), Object(objectSpread2["a" /* default */])({}, defaultVaule.style)) : null;
5993
- group && group.sendToBack(); // 向下跳底层
5994
-
5995
- group && this.canvas.add(group);
5996
- }
5997
- },
5998
- render: function render(h) {
5999
- return this.$slots.default ? h('div', this.$slots.default) : undefined;
6000
- }
6001
- });
6002
- // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart2/FabricBottom.vue?vue&type=script&lang=js&
6003
- /* harmony default export */ var fabric_chart2_FabricBottomvue_type_script_lang_js_ = (FabricBottomvue_type_script_lang_js_);
6004
- // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart2/FabricBottom.vue
6005
- var FabricBottom_render, FabricBottom_staticRenderFns
6006
-
6007
-
6008
-
6009
-
6010
- /* normalize component */
6011
-
6012
- var FabricBottom_component = Object(componentNormalizer["a" /* default */])(
6013
- fabric_chart2_FabricBottomvue_type_script_lang_js_,
6014
- FabricBottom_render,
6015
- FabricBottom_staticRenderFns,
6016
- false,
6017
- null,
6018
- null,
6019
- null
6020
-
6021
- )
6022
-
6023
- /* harmony default export */ var FabricBottom = (FabricBottom_component.exports);
6024
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"54b2b90d-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-chart2/FabricCenter.vue?vue&type=template&id=4d90e644&
6025
- var FabricCentervue_type_template_id_4d90e644_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"poly-line"},[(_vm.isRightVisible)?_c('MouseRightClick',{attrs:{"getContainer":_vm.getContainer,"nodeList":_vm.rightClickNode,"rightPos":_vm.rightPos},on:{"nodeClick":_vm.handleRightClick,"closeRight":function($event){_vm.isRightVisible = false}}}):_vm._e(),(_vm.isDropVisible)?_c('DropPopup',{attrs:{"val":_vm.dropVal,"dropPos":_vm.dropPos}}):_vm._e()],1)}
6026
- var FabricCentervue_type_template_id_4d90e644_staticRenderFns = []
6027
-
6028
-
6029
- // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart2/FabricCenter.vue?vue&type=template&id=4d90e644&
6030
-
6031
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/fabric-chart/src/fabric-chart2/FabricCenter.vue?vue&type=script&lang=js&
6032
-
6033
-
6034
-
6035
-
6036
-
6037
-
6038
-
6039
-
6040
-
6041
-
6042
-
6043
-
6044
-
6045
-
6046
-
6047
-
6048
-
6049
-
6050
-
6051
-
6052
-
6053
- //
6054
- //
6055
- //
6056
- //
6057
- //
6058
- //
6059
- //
6060
-
6061
-
6062
-
6063
-
6064
-
6065
-
6066
- var FabricCentervue_type_script_lang_js_rightClickNode = [{
6067
- name: '新增节点',
6068
- type: 'add'
6069
- }, {
6070
- name: '删除节点',
6071
- type: 'delete'
6072
- }];
6073
- /* harmony default export */ var FabricCentervue_type_script_lang_js_ = ({
6074
- name: 'fabric-center2',
6075
- mixins: [fabricCommon, draw, eventCommon],
6076
- props: {
6077
- other: {
6078
- type: Object,
6079
- default: function _default() {}
6080
- },
6081
- polyline: {
6082
- type: Array,
6083
- required: true
6084
- }
6085
- },
6086
- components: {
6087
- MouseRightClick: MouseRightClick,
6088
- DropPopup: DropPopup
6089
- },
6090
- data: function data() {
6091
- return {
6092
- polylineList: [],
6093
- isDropVisible: false,
6094
- dropVal: {},
6095
- dropPos: {
6096
- clientX: 0,
6097
- clientY: 0
6098
- },
6099
- isRightVisible: false,
6100
- rightPos: {
6101
- clientX: 0,
6102
- clientY: 0
6103
- },
6104
- rightClickNode: [],
6105
- activeEvent: null // 当前可右键活动的对象
6106
-
6107
- };
6108
- },
6109
- watch: {
6110
- polyline: {
6111
- handler: function handler(value) {
6112
- if (value) {
6113
- this.repaintPolyline();
6114
- }
6115
- },
6116
- deep: true
6117
- },
6118
- polylineList: function polylineList(value) {
6119
- var _this = this;
6120
-
6121
- if (value) {
6122
- this.polylineList.forEach(function (polylineType, index) {
6123
- _this.createPolyline(polylineType, polylineType.type);
6124
- });
6125
- }
6126
- }
6127
- },
6128
- created: function created() {},
6129
- mounted: function mounted() {
6130
- var _this2 = this;
6131
-
6132
- this.$nextTick(function () {
6133
- _this2.init();
6134
- });
6135
- },
6136
- computed: {
6137
- eventStyle: function eventStyle() {
6138
- return this.propItems.eventStyle;
6139
- }
6140
- },
6141
- methods: {
6142
- init: function init() {
6143
- this.drawOther(this.other);
6144
- this.eventStyle.evented && this.createEvent();
6145
- this.polylineList = JSON.parse(JSON.stringify(this.polyline));
6146
- },
6147
- getContainer: function getContainer() {
6148
- return this.$el;
6149
- },
6150
- createEvent: function createEvent() {
6151
- var _this3 = this;
6152
-
6153
- this.canvas.on('mouse:up', function (event) {
6154
- if (event.button === 3) {
6155
- var _event$pointer = event.pointer,
6156
- x = _event$pointer.x,
6157
- y = _event$pointer.y;
6158
-
6159
- var _this3$$propItems = _this3.$propItems(),
6160
- originX = _this3$$propItems.originX,
6161
- originY = _this3$$propItems.originY,
6162
- endX = _this3$$propItems.endX,
6163
- endY = _this3$$propItems.endY;
6164
-
6165
- if (!(x < originX || x > endX || y < originY || y > endY)) {
6166
- _this3.activeEvent = event;
6167
- document.querySelector('.upper-canvas').addEventListener('contextmenu', _this3.addEventListenerContextmenu, true);
6168
- }
6169
- }
6170
- });
6171
- },
6172
- createPolyline: function createPolyline(polylineType, type) {
6173
- var _this4 = this;
6174
-
6175
- polylineType.dataList.forEach(function (item, index) {
6176
- _this4.drawPolyline(item, index, polylineType, type);
6177
- });
6178
- var data = this.getShadowData(polylineType, type);
6179
- (data === null || data === void 0 ? void 0 : data.length) && this.drawShadow(data, polylineType.shadowStyle);
6180
- },
6181
- // 画出阴影线段
6182
- drawShadow: function drawShadow(data, shadowStyle) {
6183
- var _this5 = this,
6184
- _this$canvas;
6185
-
6186
- var canvasHeight = this.propItems.canvasHeight;
6187
- var lines = [];
6188
- data.forEach(function (v) {
6189
- var line1 = _this5.computeShadow(v.line1, shadowStyle.moveMode);
6190
-
6191
- var line2 = _this5.computeShadow(v.line2, shadowStyle.moveMode);
6192
-
6193
- var maxLine = line1.length >= line2.length ? line1 : line2;
6194
- var minLine = line1.length < line2.length ? line1 : line2; // 如果存在两个数组长度不相等,则节点多的数组多余节点的阴影线段只存在节点多的线段组上,而没有与长度小的线段组相交
6195
-
6196
- var i = 0;
6197
- maxLine.forEach(function (k, j) {
6198
- if (minLine[j]) {
6199
- var line = _this5.drawLine([k.x, canvasHeight - k.y, minLine[j].x, canvasHeight - minLine[j].y], Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.style), shadowStyle));
6200
-
6201
- lines.push(line);
6202
- } else {
6203
- if (i % 2 === 0 && maxLine[j + 1]) {
6204
- var _line = _this5.drawLine([k.x, canvasHeight - k.y, maxLine[j + 1].x, canvasHeight - maxLine[j + 1].y], Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.style), shadowStyle));
6205
-
6206
- lines.push(_line);
6207
- }
6208
-
6209
- i++;
6210
- }
6211
- });
6212
- });
6213
-
6214
- (_this$canvas = this.canvas).add.apply(_this$canvas, lines);
6215
-
6216
- this.canvas.renderAll();
6217
- },
6218
-
6219
- /**
6220
- * @description: 计算阴影线段坐标数组
6221
- * @param {*} lineGroup
6222
- * @param {*} moveMode
6223
- * @return {*}
6224
- */
6225
- computeShadow: function computeShadow(lineGroup, moveMode) {
6226
- var canvasWidth = this.propItems.canvasWidth; // 结果坐标集合
6227
-
6228
- var resultArr = [];
6229
- if (lineGroup.length < 2) return;
6230
- var beginPoint = lineGroup[0];
6231
- var endPoint = lineGroup[lineGroup.length - 1];
6232
- var b = beginPoint.y + beginPoint.x; // y = b - x;(斜率k的值为-1)
6233
- // const count = Math.round((endPoint.x - beginPoint.x) / moveMode);
6234
-
6235
- var count = Math.round(canvasWidth / moveMode);
6236
-
6237
- for (var i = 0; i < count; i++) {
6238
- for (var j = 0; j < lineGroup.length; j++) {
6239
- if (lineGroup[j + 1]) {
6240
- var point1 = lineGroup[j];
6241
- var point2 = lineGroup[j + 1];
6242
- var point11 = {
6243
- x: 0,
6244
- y: b + moveMode * i
6245
- };
6246
- var point22 = {
6247
- x: endPoint.x,
6248
- y: b + moveMode * i - endPoint.x
6249
- };
6250
- var intersectPoint = this.getIntersectPoint(point1, point2, point11, point22);
6251
- intersectPoint && resultArr.push(intersectPoint);
6252
- }
6253
- }
6254
- }
6255
-
6256
- return resultArr;
6257
- },
6258
- // 获取两个线段相交的点的坐标,ab一个线段,cd一个线段
6259
- getIntersectPoint: function getIntersectPoint(a, b, c, d) {
6260
- // 三角形abc 面积的2倍
6261
- var area_abc = (a.x - c.x) * (b.y - c.y) - (a.y - c.y) * (b.x - c.x); // 三角形abd 面积的2倍
6262
-
6263
- var area_abd = (a.x - d.x) * (b.y - d.y) - (a.y - d.y) * (b.x - d.x); // 面积符号相同则两点在线段同侧,不相交 (对点在线段上的情况,本例当作不相交处理);
6264
-
6265
- if (area_abc * area_abd >= 0) {
6266
- return false;
6267
- } // 三角形cda 面积的2倍
6268
-
6269
-
6270
- var area_cda = (c.x - a.x) * (d.y - a.y) - (c.y - a.y) * (d.x - a.x); // 三角形cdb 面积的2倍
6271
- // 注意: 这里有一个小优化.不需要再用公式计算面积,而是通过已知的三个面积加减得出.
6272
-
6273
- var area_cdb = area_cda + area_abc - area_abd;
6274
-
6275
- if (area_cda * area_cdb >= 0) {
6276
- return false;
6277
- } // 计算交点坐标
6278
-
6279
-
6280
- var t = area_cda / (area_abd - area_abc);
6281
- var dx = t * (b.x - a.x),
6282
- dy = t * (b.y - a.y);
6283
- return {
6284
- x: a.x + dx,
6285
- y: a.y + dy
6286
- };
6287
- },
6288
-
6289
- /**
6290
- * @description: 获取阴影部分所有点的数组
6291
- * @param {*} polylineType 折线数据,leftYScalevalue
6292
- * @param {*} type 类型,呼吸还是心率等
6293
- * @return {*} 返回一个数组,数组中每一个对象{line1, line2}即表示一块阴影,eg: [{line1, line2}, {line1, line2}]
6294
- */
6295
- getShadowData: function getShadowData(polylineType, type) {
6296
- var _this6 = this;
6297
-
6298
- // 说明,次方法待完善,存在阴影部分上下线段的节点个数不同的情况和时间不等值也不等的节点的情况(拖动节点后就会出现了。)
6299
- var dataList = polylineType.dataList;
6300
- var canvasHeight = this.propItems.canvasHeight;
6301
- var data = [];
6302
-
6303
- if (type === 'pulse' && dataList.length > 1) {
6304
- dataList.forEach(function (v, i) {
6305
- if (i === 0) {
6306
- var line1 = [];
6307
- var line2 = [];
6308
- var list = v.list.flat();
6309
- var list2 = dataList[1].list.flat();
6310
- list.forEach(function (k, j) {
6311
- if (k.time === list2[j].time && k.value !== list2[j].value) {
6312
- line1.push({
6313
- x: _this6.cumputedX(k.time),
6314
- y: canvasHeight - _this6.cumputedY(polylineType, k.value, type)
6315
- });
6316
- line2.push({
6317
- x: _this6.cumputedX(k.time),
6318
- y: canvasHeight - _this6.cumputedY(polylineType, list2[j].value, type)
6319
- });
6320
-
6321
- if (list[j - 1] && line1.length === 1) {
6322
- var obj = {
6323
- x: _this6.cumputedX(list[j - 1].time),
6324
- y: canvasHeight - _this6.cumputedY(polylineType, list[j - 1].value, type)
6325
- };
6326
- line1.unshift(obj);
6327
- line2.unshift(obj);
6328
- }
6329
-
6330
- if (list[j + 1] && list[j + 1].time === list2[j + 1].time && list[j + 1].value === list2[j + 1].value) {
6331
- var _obj = {
6332
- x: _this6.cumputedX(list[j + 1].time),
6333
- y: canvasHeight - _this6.cumputedY(polylineType, list[j + 1].value, type)
6334
- };
6335
- line1.push(_obj);
6336
- line2.push(_obj);
6337
- }
6338
- } else {
6339
- line1.length && line2.length && data.push({
6340
- line1: line1,
6341
- line2: line2
6342
- });
6343
- line1 = [];
6344
- line2 = [];
6345
- }
6346
- });
6347
- }
6348
- });
6349
- }
6350
-
6351
- return data;
6352
- },
6353
- drawPolyline: function drawPolyline(polyline, polylineIndex, polylineType, type) {
6354
- var _this7 = this;
6355
-
6356
- var pointAttr = polyline.pointAttr;
6357
- this._iconClassName = polyline.type === 'img' && pointAttr.iconClassName ? pointAttr.iconClassName : '';
6358
- var list = polyline.list;
6359
- var pointList = [];
6360
- var lineList = [];
6361
- var otherList = [];
6362
- var otherAsyncList = [];
6363
- var _this$propItems = this.propItems,
6364
- xScaleList = _this$propItems.xScaleList,
6365
- yCellHeight = _this$propItems.yCellHeight;
6366
- var minTime = Math.min.apply(Math, Object(toConsumableArray["a" /* default */])(xScaleList));
6367
- var maxTime = Math.max.apply(Math, Object(toConsumableArray["a" /* default */])(xScaleList));
6368
- list.forEach(function (v, i) {
6369
- // 当前点
6370
- var points = null;
6371
-
6372
- if (v.time && v.value) {
6373
- var x = _this7.cumputedX(v.time);
6374
-
6375
- var y = _this7.cumputedY(polylineType, v.value, type);
6376
-
6377
- var time = new Date(v.time).getTime();
6378
- if (time >= minTime && time <= maxTime) points = [x, y];
6379
- } // 下一个点
6380
-
6381
-
6382
- var nextPoints = list[i + 1];
6383
- var nextPoint = null;
6384
-
6385
- if (nextPoints !== null && nextPoints !== void 0 && nextPoints.time && nextPoints !== null && nextPoints !== void 0 && nextPoints.value) {
6386
- var nextX = _this7.cumputedX(nextPoints.time);
6387
-
6388
- var nextY = _this7.cumputedY(polylineType, nextPoints.value, type);
6389
-
6390
- var nextTime = new Date(nextPoints.time).getTime();
6391
- if (nextTime > minTime && nextTime <= maxTime) nextPoint = [nextX, nextY];
6392
- }
6393
-
6394
- var pointOthers = Object(objectSpread2["a" /* default */])({
6395
- type: type,
6396
- polylineIndex: polylineIndex,
6397
- pointIndex: i
6398
- }, pointAttr); // 其他标志
6399
-
6400
-
6401
- var coolLine, coolPoint, noRiseText, arrowGroup, verifiedText;
6402
-
6403
- if (points && type === 'centigrade') {
6404
- // 体温不升
6405
- if (v.noRise) {
6406
- var noRiseStyle = polyline.noRiseStyle; // 文字形式
6407
-
6408
- if (v.noRise.text) {
6409
- noRiseText = _this7.drawText(v.noRise.text.split('').join('\n'), points[0], points[1] + 5, Object(objectSpread2["a" /* default */])({
6410
- polylineIndex: polylineIndex,
6411
- pointIndex: i,
6412
- originX: 'center'
6413
- }, noRiseStyle));
6414
- otherList.push(noRiseText);
6415
- } else {
6416
- // 下箭头形式
6417
- var top = points[1] + yCellHeight * 2;
6418
-
6419
- var arrowLine = _this7.drawLine([].concat(Object(toConsumableArray["a" /* default */])(points), [points[0], top]), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({
6420
- polylineIndex: polylineIndex,
6421
- lineIndex: i
6422
- }, polyline.lineAttr), {}, {
6423
- stroke: noRiseStyle.fill
6424
- }));
6425
-
6426
- var arrow = _this7.drawText('v', points[0] + 0.5, top + 3, Object(objectSpread2["a" /* default */])({
6427
- polylineIndex: polylineIndex,
6428
- pointIndex: i,
6429
- originX: 'center',
6430
- originY: 'bottom',
6431
- fontSize: 16
6432
- }, noRiseStyle)); // 加0.5会虚,不加箭头没有完全对称,top值同理
6433
-
6434
-
6435
- arrowGroup = new _this7.fabric.Group([arrowLine, arrow], Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultVaule.style), {}, {
6436
- originX: 'center',
6437
- originY: 'top'
6438
- }));
6439
- otherList.push(arrowGroup);
6440
- }
6441
- } // 体温已核实
6442
-
6443
-
6444
- if (v.verified) {
6445
- var verifiedStyle = polyline.verifiedStyle;
6446
- verifiedText = _this7.drawText('v', points[0], points[1] - 5, Object(objectSpread2["a" /* default */])({
6447
- polylineIndex: polylineIndex,
6448
- pointIndex: i,
6449
- originX: 'center',
6450
- originY: 'bottom'
6451
- }, verifiedStyle));
6452
- otherList.push(verifiedText);
6453
- } // 物理降温
6454
-
6455
-
6456
- if (v.cooling) {
6457
- var coolingStyle = polyline.coolingStyle;
6458
-
6459
- var coolingLineStyle = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, polyline.lineAttr), {}, {
6460
- stroke: coolingStyle.stroke,
6461
- strokeDashArray: [3, 3]
6462
- });
6463
-
6464
- var coolY = _this7.cumputedY(polylineType, v.cooling, type);
6465
-
6466
- coolLine = _this7.drawLine([].concat(Object(toConsumableArray["a" /* default */])(points), [points[0], coolY]), Object(objectSpread2["a" /* default */])({
6467
- polylineIndex: polylineIndex,
6468
- lineIndex: i
6469
- }, coolingLineStyle));
6470
- var otherObj = Object.assign({}, pointOthers, coolingStyle, {
6471
- isCooling: true
6472
- });
6473
- var lineObj = {
6474
- line1: coolLine,
6475
- line2: null,
6476
- line3: null,
6477
- noRiseText: noRiseText,
6478
- arrowGroup: arrowGroup,
6479
- verifiedText: verifiedText
6480
- };
6481
- coolPoint = _this7.drawPoint(points[0], coolY, lineObj, 'circle', otherObj);
6482
- otherList.push(coolLine);
6483
- otherAsyncList.push(coolPoint);
6484
- }
6485
- }
6486
-
6487
- var line;
6488
- var point;
6489
- var previousLine;
6490
- line = points && nextPoint ? _this7.drawLine([].concat(Object(toConsumableArray["a" /* default */])(points), Object(toConsumableArray["a" /* default */])(nextPoint)), Object(objectSpread2["a" /* default */])({
6491
- polylineIndex: polylineIndex,
6492
- lineIndex: i
6493
- }, polyline.lineAttr)) : null;
6494
- previousLine = lineList[i - 1];
6495
-
6496
- if (previousLine) {
6497
- var _lineObj = {
6498
- line1: previousLine,
6499
- line2: line,
6500
- line3: coolLine,
6501
- noRiseText: noRiseText,
6502
- arrowGroup: arrowGroup,
6503
- verifiedText: verifiedText
6504
- };
6505
- point = points && _this7.drawPoint(previousLine.get('x2'), previousLine.get('y2'), _lineObj, polyline.type, pointOthers);
6506
- } else {
6507
- if (points) {
6508
- var _lineObj2 = {
6509
- line1: null,
6510
- line2: line,
6511
- line3: coolLine,
6512
- noRiseText: noRiseText,
6513
- arrowGroup: arrowGroup,
6514
- verifiedText: verifiedText
6515
- };
6516
- point = _this7.drawPoint.apply(_this7, Object(toConsumableArray["a" /* default */])(points).concat([_lineObj2, polyline.type, pointOthers]));
6517
- }
6518
- }
6519
-
6520
- lineList.push(line);
6521
- point && pointList.push(point);
6522
- });
6523
- Promise.all(pointList).then(function (res) {
6524
- lineList = lineList.filter(function (v) {
6525
- return v;
6526
- });
6527
- var prevPoint = null;
6528
- res = res.filter(function (v) {
6529
- if (v && prevPoint) {
6530
- prevPoint.nextPoint = v; // 记录下一个点 id
6531
-
6532
- v.prevPoint = prevPoint;
6533
- }
6534
-
6535
- prevPoint = v || prevPoint;
6536
- return v;
6537
- });
6538
- Promise.all(otherAsyncList).then(function (r) {
6539
- var _this7$canvas;
6540
-
6541
- (_this7$canvas = _this7.canvas).add.apply(_this7$canvas, Object(toConsumableArray["a" /* default */])(lineList).concat(Object(toConsumableArray["a" /* default */])(res), otherList, Object(toConsumableArray["a" /* default */])(r)));
6542
-
6543
- _this7.canvas.requestRenderAll();
6544
- });
6545
- });
6546
- },
6547
-
6548
- /**
6549
- * 绘制折线点
6550
- * @param {left, top} 折线点坐标
6551
- * @param {lineObj} 与折线点关联的对象
6552
- * @param {type} 折线点类型
6553
- * @param {others} 参数 polylineIndex | pointIndex | ...polyline.pointAttr
6554
- */
6555
- drawPoint: function drawPoint(left, top, lineObj, type, others) {
6556
- var _this8 = this;
6557
-
6558
- return Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
6559
- var pointId, ele, point;
6560
- return regeneratorRuntime.wrap(function _callee$(_context) {
6561
- while (1) {
6562
- switch (_context.prev = _context.next) {
6563
- case 0:
6564
- pointId = "".concat(others.type, "_").concat(others.polylineIndex, "_").concat(others.pointIndex, "_polylinePoint_").concat(new Date().getTime());
6565
- _context.t0 = _this8._iconClassName;
6566
-
6567
- if (!_context.t0) {
6568
- _context.next = 6;
6569
- break;
6570
- }
6571
-
6572
- _context.next = 5;
6573
- return _this8.createImage(_this8._iconClassName, others);
6574
-
6575
- case 5:
6576
- _context.t0 = _context.sent;
6577
-
6578
- case 6:
6579
- ele = _context.t0;
6580
- _context.next = 9;
6581
- return _this8.createPoint(type, Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({
6582
- id: pointId,
6583
- left: left,
6584
- top: top,
6585
- ele: ele || ''
6586
- }, defaultVaule.pointStyle), others), _this8.propItems.eventStyle));
6587
-
6588
- case 9:
6589
- point = _context.sent;
6590
- point.hasControls = point.hasBorders = false;
6591
- lineObj.line1 && (point.line1 = lineObj.line1);
6592
- lineObj.line2 && (point.line2 = lineObj.line2);
6593
- lineObj.line3 && (point.line3 = lineObj.line3);
6594
- lineObj.noRiseText && (point.noRiseText = lineObj.noRiseText);
6595
- lineObj.arrowGroup && (point.arrowGroup = lineObj.arrowGroup);
6596
- lineObj.verifiedText && (point.verifiedText = lineObj.verifiedText);
6597
- point.on('mouseover', function () {
6598
- _this8.showDrapPopup(point);
6599
- });
6600
- point.on('mouseout', function () {
6601
- _this8.isDropVisible = false;
6602
- }); // 折线点移动中 实时更新相关联的线的坐标
6603
-
6604
- point.on('moving', function () {
6605
- _this8.pointMoveLimit(point);
6606
-
6607
- _this8.pointMoveUpdateLine(point);
6608
-
6609
- _this8.canvas.renderAll();
6610
-
6611
- _this8.showDrapPopup(point);
6612
- }); // 折线点停止拖拽后 更新polylineList中对应的坐标
6613
-
6614
- point.on('moved', function () {
6615
- if (point && point.id.includes('_polylinePoint_')) {
6616
- _this8.isDropVisible = false;
6617
-
6618
- var data = _this8.getValue(point);
6619
-
6620
- _this8.$emit('pointChange', data);
6621
- }
6622
- });
6623
- return _context.abrupt("return", point);
6624
-
6625
- case 22:
6626
- case "end":
6627
- return _context.stop();
6628
- }
6629
- }
6630
- }, _callee);
6631
- }))();
6632
- },
6633
- showDrapPopup: function showDrapPopup(point) {
6634
- this.isDropVisible = true;
6635
- this.dropPos = {
6636
- left: point.left,
6637
- top: point.top
6638
- };
6639
-
6640
- var _this$getValue = this.getValue(point),
6641
- value = _this$getValue.value,
6642
- title = _this$getValue.title;
6643
-
6644
- this.dropVal = {
6645
- title: title,
6646
- list: [{
6647
- id: '11',
6648
- name: '时间',
6649
- value: value.time
6650
- }, {
6651
- id: '22',
6652
- name: '值',
6653
- value: Math.round(value.value)
6654
- }]
6655
- };
6656
- },
6657
- // 折线点移动时 setCoords()方法手动更新相关联的线坐标
6658
- pointMoveUpdateLine: function pointMoveUpdateLine(point) {
6659
- if (point.line1) {
6660
- point.line1.setCoords();
6661
- point.line1.set({
6662
- x2: point.left,
6663
- y2: point.top
6664
- });
6665
- }
6666
-
6667
- if (point.line2) {
6668
- point.line2.setCoords();
6669
- point.line2.set({
6670
- x1: point.left,
6671
- y1: point.top
6672
- });
6673
- }
6674
-
6675
- if (point.line3) {
6676
- point.line3.setCoords();
6677
- point.line3.set({
6678
- x1: point.left,
6679
- y1: point.top
6680
- });
6681
- }
6682
-
6683
- if (point.noRiseText) {
6684
- point.noRiseText.setCoords();
6685
- point.noRiseText.set({
6686
- left: point.left,
6687
- top: point.top + 5
6688
- });
6689
- }
5038
+ title: linesRow.title,
5039
+ obj: linesRow.lineList[colIndex],
5040
+ val: x
5041
+ },
5042
+ x: x
5043
+ };
5044
+ },
5045
+ // 直线数组更新后 移除旧的直线并绘制新的直线,处理拖动限制不能更新的问题
5046
+ updateLine: function updateLine(rowIndex) {
5047
+ var _this8 = this;
6690
5048
 
6691
- if (point.arrowGroup) {
6692
- point.arrowGroup.setCoords();
6693
- point.arrowGroup.set({
6694
- left: point.left,
6695
- top: point.top
6696
- });
6697
- }
5049
+ this.canvas.forEachObject(function (obj) {
5050
+ if (obj.rowIndex === rowIndex) {
5051
+ _this8.canvas.remove(obj);
5052
+ }
5053
+ });
5054
+ this.drawLineData(this.lines[rowIndex], rowIndex);
5055
+ },
5056
+ // 移除头部表格所有线条数字数据
5057
+ removeLines: function removeLines() {
5058
+ var _this9 = this;
6698
5059
 
6699
- if (point.verifiedText) {
6700
- point.verifiedText.setCoords();
6701
- point.verifiedText.set({
6702
- left: point.left,
6703
- top: point.top - 5
6704
- });
6705
- }
5060
+ this.canvas.forEachObject(function (obj) {
5061
+ if (obj.id && obj.id.includes('_lineGroup_')) {
5062
+ _this9.canvas.remove(obj);
5063
+ }
5064
+ });
5065
+ this.lines = [];
6706
5066
  },
6707
5067
  drawLine: function drawLine(lines, others) {
6708
- var lineId = "".concat(others.polylineIndex, "_").concat(others.pointIndex, "_polylineLine_").concat(new Date().getTime());
6709
5068
  var line = new this.fabric.Line(lines, Object(objectSpread2["a" /* default */])({
6710
- id: lineId,
6711
- hoverCursor: 'pointer',
6712
- objectCaching: false,
6713
- selectable: false,
6714
- evented: false
5069
+ objectCaching: false
6715
5070
  }, others));
6716
5071
  return line;
6717
5072
  },
6718
- drawText: function drawText(value, left, top, others) {
6719
- var id = "".concat(others.polylineIndex, "_").concat(others.pointIndex, "_polylineText_").concat(new Date().getTime());
6720
- var text = new this.fabric.Text(String(value), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({
6721
- id: id,
6722
- originX: others.originX || 'left',
6723
- originY: others.originY || 'top',
6724
- left: left,
6725
- top: top
6726
- }, defaultVaule.style), defaultVaule.textStyle), others));
6727
- return text;
6728
- },
6729
- cumputedX: function cumputedX(value) {
6730
- var _this$propItems2 = this.propItems,
6731
- xScaleList = _this$propItems2.xScaleList,
6732
- xScaleCell = _this$propItems2.xScaleCell,
6733
- originX = _this$propItems2.originX,
6734
- xCellWidth = _this$propItems2.xCellWidth;
6735
- var time = new Date(value).getTime();
6736
- var minScale = Math.min.apply(Math, Object(toConsumableArray["a" /* default */])(xScaleList));
6737
- var i = Math.floor((time - minScale) / xScaleCell);
6738
- return originX + xCellWidth * i + xCellWidth / 2;
6739
- },
6740
- cumputedY: function cumputedY(polylineType, value, type) {
6741
- var yScaleCell = this.propItems["".concat(type, "YCell")];
6742
- var yCellUnit = value - Math.min.apply(Math, Object(toConsumableArray["a" /* default */])(polylineType.list));
6743
- return this.propItems.endY - yScaleCell * yCellUnit;
6744
- },
6745
- getXValue: function getXValue(left) {
6746
- var _this$propItems3 = this.propItems,
6747
- xScaleList = _this$propItems3.xScaleList,
6748
- xScaleCell = _this$propItems3.xScaleCell,
6749
- xCellWidth = _this$propItems3.xCellWidth,
6750
- originX = _this$propItems3.originX;
6751
- var minScale = Math.min.apply(Math, Object(toConsumableArray["a" /* default */])(xScaleList));
6752
- var time = minScale + (left - originX) / xCellWidth * xScaleCell;
6753
- var d = new Date(time);
6754
- var month = "00".concat(d.getMonth() + 1).slice(-2);
6755
- var day = "00".concat(d.getDate()).slice(-2);
6756
- var date = "".concat(d.getFullYear(), "-").concat(month, "-").concat(day, " ").concat(d.getHours(), ":00");
6757
- return date;
6758
- },
6759
- getYValue: function getYValue(type, top) {
6760
- var _this$polyline$find;
5073
+ lineMoveLimit: function lineMoveLimit(line) {
5074
+ line.setCoords(); // 需调用setCoords()才能重新计算控制位置(改变Object状态)
6761
5075
 
6762
- var yScaleCell = this.propItems["".concat(type, "YCell")];
6763
- var list = ((_this$polyline$find = this.polyline.find(function (v) {
6764
- return v.type === type;
6765
- })) === null || _this$polyline$find === void 0 ? void 0 : _this$polyline$find.list) || [];
6766
- var minVal = list.length ? Math.min.apply(Math, Object(toConsumableArray["a" /* default */])(list)) : 0;
6767
- var y = (this.propItems.endY - top) / yScaleCell + minVal;
6768
- return y;
6769
- },
6770
- getValue: function getValue(point) {
6771
- var _this9 = this;
5076
+ if (line.left < line.limitX.x1) {
5077
+ line.set('left', line.limitX.x1);
5078
+ }
6772
5079
 
6773
- if (point.id) {
6774
- var _data$dataList, _data$dataList$polyli, _data$dataList2, _data$dataList2$polyl, _data$dataList2$polyl2, _data$dataList2$polyl3;
6775
-
6776
- var polylineIndex = point.polylineIndex,
6777
- pointIndex = point.pointIndex,
6778
- type = point.type,
6779
- left = point.left,
6780
- top = point.top;
6781
- var data = this.polylineList.find(function (v) {
6782
- return v.type === type;
5080
+ if (line.left > line.limitX.x2) {
5081
+ line.set('left', line.limitX.x2);
5082
+ }
5083
+ },
5084
+ lineMoveUpdateLine: function lineMoveUpdateLine(line) {
5085
+ if (line.line1) {
5086
+ line.line1.setCoords();
5087
+ line.line1.set({
5088
+ x1: line.left
6783
5089
  });
6784
- var title = (data === null || data === void 0 ? void 0 : (_data$dataList = data.dataList) === null || _data$dataList === void 0 ? void 0 : (_data$dataList$polyli = _data$dataList[polylineIndex]) === null || _data$dataList$polyli === void 0 ? void 0 : _data$dataList$polyli.title) || ''; // const obj = this.getListIndexValue(data?.dataList?.[polylineIndex]?.list, pointIndex);
5090
+ }
6785
5091
 
6786
- var obj = {
6787
- data: (data === null || data === void 0 ? void 0 : (_data$dataList2 = data.dataList) === null || _data$dataList2 === void 0 ? void 0 : (_data$dataList2$polyl = _data$dataList2[polylineIndex]) === null || _data$dataList2$polyl === void 0 ? void 0 : (_data$dataList2$polyl2 = _data$dataList2$polyl.list) === null || _data$dataList2$polyl2 === void 0 ? void 0 : (_data$dataList2$polyl3 = _data$dataList2$polyl2[pointIndex]) === null || _data$dataList2$polyl3 === void 0 ? void 0 : _data$dataList2$polyl3.data) || '',
6788
- value: {}
6789
- };
6790
- obj.value.time = this.getXValue(left);
6791
- obj.value.value = this.getYValue(type, top);
6792
- return Object(objectSpread2["a" /* default */])({
6793
- title: title,
6794
- type: type,
6795
- dataIndex: polylineIndex,
6796
- pointIndex: pointIndex
6797
- }, obj);
6798
- } else {
6799
- var x = this.getXValue(point.left);
6800
- var valueList = this.polylineList.map(function (v) {
6801
- return {
6802
- type: v.type,
6803
- value: _this9.getYValue(v.type, point.top)
6804
- };
5092
+ if (line.line2) {
5093
+ line.line2.setCoords();
5094
+ line.line2.set({
5095
+ x2: line.left
6805
5096
  });
6806
- return {
6807
- x: x,
6808
- valueList: valueList
6809
- };
6810
5097
  }
6811
5098
  },
6812
- drawOther: function drawOther(other) {
6813
- var _this10 = this;
6814
-
6815
- var originY = this.propItems.originY;
6816
- if (!other || !other.list) return false;
6817
- var list = []; // 数据列表
5099
+ textUpdatePositionX: function textUpdatePositionX(line) {
5100
+ var text = line.text || null;
6818
5101
 
6819
- other.list.forEach(function (arr) {
6820
- arr.dataList.forEach(function (v, i) {
6821
- var text = new _this10.fabric.Text(String(v[1].split('').join('\n')), Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({
6822
- originX: 'center',
6823
- top: originY,
6824
- left: _this10.cumputedX(v[0]),
6825
- textAlign: 'center'
6826
- }, defaultVaule.style), arr.style));
6827
- list.push(text);
6828
- });
6829
- });
6830
- var group = list.length > 0 ? new this.fabric.Group([].concat(list), Object(objectSpread2["a" /* default */])({}, defaultVaule.style)) : null;
6831
- group && group.sendToBack(); // 向下跳底层
5102
+ if (text) {
5103
+ // 如果line2存在说明当前拖动的是右边手柄,line1存在则是左边手柄,都不存在说明不存在中间线
5104
+ var centerLine = line.line1 || line.line2 || null;
5105
+ var left = line.left;
6832
5106
 
6833
- group && this.canvas.add(group);
6834
- this.canvas.renderAll();
6835
- },
6836
- // 关闭右键菜单,打开添加节点弹窗表单
6837
- handleRightClick: function handleRightClick(_ref) {
6838
- var type = _ref.type;
6839
- this.isRightVisible = false;
6840
- var point = this._currentPoint;
6841
- this._currentPoint = '';
6842
- var _this$_active = this._active,
6843
- left = _this$_active.left,
6844
- top = _this$_active.top;
6845
- var data = point ? this.getValue(point) : this.getValue({
6846
- left: left,
6847
- top: top
6848
- });
6849
- this.$emit('pointOperation', type, data);
6850
- },
6851
- // 打开右键菜单
6852
- openRightModal: function openRightModal(event) {
6853
- var _this11 = this;
5107
+ var _limitWidth = text.width + 2;
6854
5108
 
6855
- if (!this.propItems.eventStyle.evented) {
6856
- return;
6857
- }
5109
+ var originX = text.originX;
5110
+ var v;
6858
5111
 
6859
- this.rightPos = {
6860
- clientX: event.e.clientX || event.e.pageX,
6861
- clientY: event.e.clientY || event.e.pageY
6862
- };
6863
- this.isRightVisible = false;
6864
- var target = event.target;
6865
- var id = target ? target.id : '';
6866
- var nextId = target ? target.nextId : '';
6867
- this.$nextTick(function () {
6868
- if (id && id.includes('_polylinePoint_')) {
6869
- _this11._currentPoint = target;
6870
- _this11.rightClickNode = Object.freeze(FabricCentervue_type_script_lang_js_rightClickNode.slice());
5112
+ if ((centerLine === null || centerLine === void 0 ? void 0 : centerLine.x2) - (centerLine === null || centerLine === void 0 ? void 0 : centerLine.x1) > _limitWidth) {
5113
+ v = left + centerLine.width / 2 * (line.line2 ? -1 : 1);
5114
+ originX = 'center';
6871
5115
  } else {
6872
- _this11._currentPoint = '';
6873
- _this11.rightClickNode = Object.freeze(FabricCentervue_type_script_lang_js_rightClickNode.slice(0, 1));
6874
- }
5116
+ v = this.textMarginLeft + (centerLine ? centerLine.x2 : left);
5117
+ originX = 'left'; // 移动到最右边界时候文字超出当前线段可拖动的右边界的情况
6875
5118
 
6876
- _this11.isRightVisible = true;
6877
- });
6878
- },
6879
- removePolyline: function removePolyline(id) {
6880
- var _this12 = this;
5119
+ if (line.textLimitRight && v + _limitWidth > line.textLimitRight) {
5120
+ v = this.propItems.endX + 100; // 此值随便设置,只要达到隐藏效果即可
5121
+ }
5122
+ }
6881
5123
 
6882
- if (id) {
6883
- var point = this.canvas.getObjects().find(function (item) {
6884
- return item.id === id;
5124
+ text.setCoords();
5125
+ text.set({
5126
+ left: v,
5127
+ originX: originX
6885
5128
  });
5129
+ } // 拖动左侧竖线时需要更改上一线段文字的位置,以防止文字被遮挡
6886
5130
 
6887
- if (point) {
6888
- this.canvas.remove(point);
6889
- point.line1 && this.canvas.remove(point.line1);
6890
- point.line3 && this.canvas.remove(point.line3);
6891
- point.noRiseText && this.canvas.remove(point.noRiseText);
6892
- point.arrowGroup && this.canvas.remove(point.arrowGroup);
6893
- point.verifiedText && this.canvas.remove(point.verifiedText);
6894
- }
6895
5131
 
6896
- return;
6897
- }
5132
+ var preText = line.preText || null;
5133
+ if (!preText) return;
5134
+ var limitWidth = preText.width + 2;
6898
5135
 
6899
- this.canvas.forEachObject(function (obj) {
6900
- if (obj.id && /_polyline(Point|Line|Text)_/.test(obj.id)) {
6901
- _this12.canvas.remove(obj);
6902
- }
6903
- });
5136
+ if (preText.originX === 'left' && preText.left + limitWidth > line.left) {
5137
+ var _v = this.propItems.endX + 100; // 此值随便设置,只要达到隐藏效果即可
5138
+
5139
+
5140
+ preText.setCoords();
5141
+ preText.set({
5142
+ left: _v
5143
+ });
5144
+ }
6904
5145
  },
6905
- repaintPolyline: function repaintPolyline() {
6906
- if (this.polylineList.length) {
6907
- this.removePolyline();
5146
+ repaintLine: function repaintLine() {
5147
+ if (this.lines.length) {
5148
+ this.removeLines();
6908
5149
  }
6909
5150
 
6910
- this.polylineList = JSON.parse(JSON.stringify(this.polyline));
5151
+ this.getLineList(this.linesObj.list);
5152
+ this.createLine();
6911
5153
  }
6912
- }
5154
+ },
5155
+ beforeDestroy: function beforeDestroy() {}
6913
5156
  });
6914
- // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart2/FabricCenter.vue?vue&type=script&lang=js&
6915
- /* harmony default export */ var fabric_chart2_FabricCentervue_type_script_lang_js_ = (FabricCentervue_type_script_lang_js_);
6916
- // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart2/FabricCenter.vue
5157
+ // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart/FabricLines.vue?vue&type=script&lang=js&
5158
+ /* harmony default export */ var fabric_chart_FabricLinesvue_type_script_lang_js_ = (FabricLinesvue_type_script_lang_js_);
5159
+ // CONCATENATED MODULE: ./packages/fabric-chart/src/fabric-chart/FabricLines.vue
6917
5160
 
6918
5161
 
6919
5162
 
@@ -6921,10 +5164,10 @@ var FabricCentervue_type_script_lang_js_rightClickNode = [{
6921
5164
 
6922
5165
  /* normalize component */
6923
5166
 
6924
- var FabricCenter_component = Object(componentNormalizer["a" /* default */])(
6925
- fabric_chart2_FabricCentervue_type_script_lang_js_,
6926
- FabricCentervue_type_template_id_4d90e644_render,
6927
- FabricCentervue_type_template_id_4d90e644_staticRenderFns,
5167
+ var FabricLines_component = Object(componentNormalizer["a" /* default */])(
5168
+ fabric_chart_FabricLinesvue_type_script_lang_js_,
5169
+ FabricLinesvue_type_template_id_c6adb3bc_render,
5170
+ FabricLinesvue_type_template_id_c6adb3bc_staticRenderFns,
6928
5171
  false,
6929
5172
  null,
6930
5173
  null,
@@ -6932,20 +5175,9 @@ var FabricCenter_component = Object(componentNormalizer["a" /* default */])(
6932
5175
 
6933
5176
  )
6934
5177
 
6935
- /* harmony default export */ var FabricCenter = (FabricCenter_component.exports);
5178
+ /* harmony default export */ var FabricLines = (FabricLines_component.exports);
6936
5179
  // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./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=script&lang=js&
6937
5180
 
6938
- //
6939
- //
6940
- //
6941
- //
6942
- //
6943
- //
6944
- //
6945
- //
6946
- //
6947
- //
6948
- //
6949
5181
  //
6950
5182
  //
6951
5183
  //
@@ -6972,20 +5204,9 @@ var FabricCenter_component = Object(componentNormalizer["a" /* default */])(
6972
5204
 
6973
5205
 
6974
5206
 
6975
-
6976
-
6977
-
6978
-
6979
-
6980
-
6981
5207
  /* harmony default export */ var FabricChartvue_type_script_lang_js_ = (Object(create["a" /* default */])({
6982
5208
  name: 'fabric-chart',
6983
5209
  props: {
6984
- id: {
6985
- type: String,
6986
- required: false,
6987
- default: 'c-fabric-canvas'
6988
- },
6989
5210
  templateData: {
6990
5211
  type: Object,
6991
5212
  required: true
@@ -6993,17 +5214,11 @@ var FabricCenter_component = Object(componentNormalizer["a" /* default */])(
6993
5214
  },
6994
5215
  components: {
6995
5216
  FabricCanvas: FabricCanvas,
6996
- FabricCanvas2: fabric_chart2_FabricCanvas,
6997
5217
  FabricGrid: FabricGrid,
6998
5218
  FabricTextGroup: FabricTextGroup,
6999
5219
  FabricPolylines: FabricPolylines,
7000
5220
  FabricScaleValue: FabricScaleValue,
7001
- FabricLines: FabricLines,
7002
- FabricTop2: FabricTop,
7003
- FabricLeft2: FabricLeft,
7004
- FabricRight2: FabricRight,
7005
- FabricBottom2: FabricBottom,
7006
- FabricCenter2: FabricCenter
5221
+ FabricLines: FabricLines
7007
5222
  },
7008
5223
  computed: {
7009
5224
  polylines: function polylines() {
@@ -7118,8 +5333,8 @@ var FabricCenter_component = Object(componentNormalizer["a" /* default */])(
7118
5333
  }));
7119
5334
  // CONCATENATED MODULE: ./packages/fabric-chart/src/FabricChart.vue?vue&type=script&lang=js&
7120
5335
  /* harmony default export */ var src_FabricChartvue_type_script_lang_js_ = (FabricChartvue_type_script_lang_js_);
7121
- // EXTERNAL MODULE: ./packages/fabric-chart/src/FabricChart.vue?vue&type=style&index=0&id=cb500674&lang=less&scoped=true&
7122
- var FabricChartvue_type_style_index_0_id_cb500674_lang_less_scoped_true_ = __webpack_require__("26a0");
5336
+ // EXTERNAL MODULE: ./packages/fabric-chart/src/FabricChart.vue?vue&type=style&index=0&id=3a1ac827&lang=less&scoped=true&
5337
+ var FabricChartvue_type_style_index_0_id_3a1ac827_lang_less_scoped_true_ = __webpack_require__("6945");
7123
5338
 
7124
5339
  // CONCATENATED MODULE: ./packages/fabric-chart/src/FabricChart.vue
7125
5340
 
@@ -7136,7 +5351,7 @@ var FabricChart_component = Object(componentNormalizer["a" /* default */])(
7136
5351
  staticRenderFns,
7137
5352
  false,
7138
5353
  null,
7139
- "cb500674",
5354
+ "3a1ac827",
7140
5355
  null
7141
5356
 
7142
5357
  )
@@ -7492,17 +5707,6 @@ module.exports = function (CONSTRUCTOR_NAME) {
7492
5707
  };
7493
5708
 
7494
5709
 
7495
- /***/ }),
7496
-
7497
- /***/ "26a0":
7498
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
7499
-
7500
- "use strict";
7501
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FabricChart_vue_vue_type_style_index_0_id_cb500674_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("bb2d");
7502
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FabricChart_vue_vue_type_style_index_0_id_cb500674_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FabricChart_vue_vue_type_style_index_0_id_cb500674_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
7503
- /* unused harmony reexport * */
7504
-
7505
-
7506
5710
  /***/ }),
7507
5711
 
7508
5712
  /***/ "2871":
@@ -8478,6 +6682,17 @@ module.exports = require("core-js/modules/es.string.replace.js");
8478
6682
  /* unused harmony reexport * */
8479
6683
 
8480
6684
 
6685
+ /***/ }),
6686
+
6687
+ /***/ "6945":
6688
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
6689
+
6690
+ "use strict";
6691
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FabricChart_vue_vue_type_style_index_0_id_3a1ac827_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("0ebb");
6692
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FabricChart_vue_vue_type_style_index_0_id_3a1ac827_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_FabricChart_vue_vue_type_style_index_0_id_3a1ac827_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
6693
+ /* unused harmony reexport * */
6694
+
6695
+
8481
6696
  /***/ }),
8482
6697
 
8483
6698
  /***/ "69f3":
@@ -9025,13 +7240,6 @@ module.exports = require("core-js/modules/es.object.to-string.js");
9025
7240
 
9026
7241
  /***/ }),
9027
7242
 
9028
- /***/ "98a5":
9029
- /***/ (function(module, exports, __webpack_require__) {
9030
-
9031
- // extracted by mini-css-extract-plugin
9032
-
9033
- /***/ }),
9034
-
9035
7243
  /***/ "9b22":
9036
7244
  /***/ (function(module, exports) {
9037
7245
 
@@ -9267,6 +7475,13 @@ module.exports = {
9267
7475
  };
9268
7476
 
9269
7477
 
7478
+ /***/ }),
7479
+
7480
+ /***/ "b4ea":
7481
+ /***/ (function(module, exports, __webpack_require__) {
7482
+
7483
+ // extracted by mini-css-extract-plugin
7484
+
9270
7485
  /***/ }),
9271
7486
 
9272
7487
  /***/ "b575":
@@ -9384,13 +7599,6 @@ module.exports = function (name) {
9384
7599
  };
9385
7600
 
9386
7601
 
9387
- /***/ }),
9388
-
9389
- /***/ "bb2d":
9390
- /***/ (function(module, exports, __webpack_require__) {
9391
-
9392
- // extracted by mini-css-extract-plugin
9393
-
9394
7602
  /***/ }),
9395
7603
 
9396
7604
  /***/ "be94":
@@ -9754,13 +7962,6 @@ module.exports = USE_SYMBOL_AS_UID ? function (it) {
9754
7962
  };
9755
7963
 
9756
7964
 
9757
- /***/ }),
9758
-
9759
- /***/ "da6e":
9760
- /***/ (function(module, exports) {
9761
-
9762
- module.exports = require("core-js/modules/es.array.flat.js");
9763
-
9764
7965
  /***/ }),
9765
7966
 
9766
7967
  /***/ "da84":
@@ -9920,17 +8121,6 @@ module.exports = function (target, src, options) {
9920
8121
  };
9921
8122
 
9922
8123
 
9923
- /***/ }),
9924
-
9925
- /***/ "e350":
9926
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
9927
-
9928
- "use strict";
9929
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TimeScaleValue_vue_vue_type_style_index_0_id_a10b6e3e_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("98a5");
9930
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TimeScaleValue_vue_vue_type_style_index_0_id_a10b6e3e_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_10_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_10_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_10_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_10_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TimeScaleValue_vue_vue_type_style_index_0_id_a10b6e3e_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
9931
- /* unused harmony reexport * */
9932
-
9933
-
9934
8124
  /***/ }),
9935
8125
 
9936
8126
  /***/ "e667":
@@ -10480,13 +8670,6 @@ module.exports = function (key) {
10480
8670
  };
10481
8671
 
10482
8672
 
10483
- /***/ }),
10484
-
10485
- /***/ "f906":
10486
- /***/ (function(module, exports) {
10487
-
10488
- module.exports = require("vxe-table");
10489
-
10490
8673
  /***/ }),
10491
8674
 
10492
8675
  /***/ "f989":