cnhis-design-vue 3.4.0-release.3 → 3.4.0-release.7

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 (214) hide show
  1. package/es/_virtual/_virtual_i18n-methods.js +5 -1
  2. package/es/components/audio-sdk/index.d.ts +4 -4
  3. package/es/components/audio-sdk/src/Index.vue.d.ts +4 -4
  4. package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +4 -4
  5. package/es/components/audio-sdk/src/components/recording.vue.d.ts +4 -4
  6. package/es/components/base-search/index.d.ts +34 -0
  7. package/es/components/base-search/src/index.vue.d.ts +34 -0
  8. package/es/components/base-search/src/index.vue2.js +9 -1
  9. package/es/components/button-print/index.d.ts +32 -0
  10. package/es/components/button-print/src/ButtonPrint.vue.d.ts +32 -0
  11. package/es/components/button-print/src/ButtonPrint.vue2.js +4 -0
  12. package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +4 -0
  13. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +73 -48
  14. package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +11 -0
  15. package/es/components/button-print/src/components/OldPrintComponent.vue2.js +35 -0
  16. package/es/components/button-print/src/utils/print.d.ts +1 -1
  17. package/es/components/button-print/src/utils/print.js +4 -2
  18. package/es/components/callback/src/components/render/popupMaps.d.ts +38 -24
  19. package/es/components/classification/index.d.ts +84 -0
  20. package/es/components/classification/src/components/search-filter/index.vue.d.ts +84 -0
  21. package/es/components/classification/src/components/set-classification/index.vue.d.ts +84 -0
  22. package/es/components/classification/src/index.vue.d.ts +84 -0
  23. package/es/components/classification/src/index.vue2.js +7 -0
  24. package/es/components/date-picker/index.d.ts +28 -0
  25. package/es/components/date-picker/src/DatePicker.vue.d.ts +28 -0
  26. package/es/components/date-picker/src/DatePicker.vue2.js +26 -1
  27. package/es/components/expand-field/index.d.ts +31 -0
  28. package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +31 -0
  29. package/es/components/expand-field/src/components/PersonModal.vue.d.ts +31 -0
  30. package/es/components/expand-field/src/components/form.vue.d.ts +31 -0
  31. package/es/components/expand-field/src/index.vue.d.ts +31 -0
  32. package/es/components/fabric-chart/index.d.ts +3 -3
  33. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +3 -3
  34. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -0
  35. package/es/components/fabric-chart/src/components/PopupMenu.d.ts +4 -4
  36. package/es/components/fabric-chart/src/components/PopupMenu.js +57 -39
  37. package/es/components/fabric-chart/src/constants/index.d.ts +19 -5
  38. package/es/components/fabric-chart/src/constants/index.js +26 -11
  39. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.d.ts +4 -3
  40. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +119 -193
  41. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +69 -117
  42. package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.js +15 -11
  43. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.d.ts +1 -1
  44. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +39 -27
  45. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.d.ts +2 -2
  46. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +86 -122
  47. package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -0
  48. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.js +65 -113
  49. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +4 -3
  50. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +63 -37
  51. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +31 -14
  52. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.d.ts +4 -3
  53. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +6 -7
  54. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +152 -208
  55. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.d.ts +4 -3
  56. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +8 -9
  57. package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -0
  58. package/es/components/fabric-chart/src/hooks/temperature/useCenter.d.ts +4 -3
  59. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +138 -229
  60. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +5 -2
  61. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +195 -273
  62. package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -0
  63. package/es/components/fabric-chart/src/interface.d.ts +14 -1
  64. package/es/components/fabric-chart/src/utils/eventBus.d.ts +2 -0
  65. package/es/components/fabric-chart/src/utils/eventBus.js +5 -0
  66. package/es/components/fabric-chart/src/utils/index.d.ts +1 -1
  67. package/es/components/fabric-chart/src/utils/index.js +2 -10
  68. package/es/components/fabric-chart/style/index.css +1 -1
  69. package/es/components/field-editor/index.d.ts +1 -0
  70. package/es/components/field-editor/src/FieldEditor.vue.d.ts +1 -0
  71. package/es/components/field-set/src/FieldColor.vue.d.ts +57 -1
  72. package/es/components/field-set/src/FieldFilter.vue.d.ts +1 -1
  73. package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
  74. package/es/components/field-set/src/FieldSet.vue2.js +3 -1
  75. package/es/components/field-set/src/components/condition.vue.d.ts +28 -0
  76. package/es/components/field-set/src/components/edit-dialog.vue.d.ts +56 -0
  77. package/es/components/field-set/src/components/edit-filter.vue.d.ts +28 -0
  78. package/es/components/field-set/src/components/table-row.vue.d.ts +1 -1
  79. package/es/components/form-config/index.d.ts +24 -0
  80. package/es/components/form-config/src/FormConfig.vue.d.ts +24 -0
  81. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +1 -0
  82. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +19 -0
  83. package/es/components/form-config/src/components/FormConfigEdit.vue2.js +48 -24
  84. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +1 -0
  85. package/es/components/form-config/src/constants/index.d.ts +2 -0
  86. package/es/components/form-config/src/constants/index.js +2 -0
  87. package/es/components/form-config/src/hooks/useConfigurationField.js +20 -3
  88. package/es/components/form-render/index.d.ts +1 -0
  89. package/es/components/form-render/src/FormRender.vue.d.ts +1 -0
  90. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +1 -0
  91. package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js +1 -1
  92. package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +1 -0
  93. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -0
  94. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -0
  95. package/es/components/form-render/src/components/renderer/radio_checkbox.js +3 -2
  96. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -0
  97. package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
  98. package/es/components/form-render/src/hooks/useNewLowCodeReactions.js +8 -0
  99. package/es/components/form-render/src/types/index.d.ts +1 -0
  100. package/es/components/form-render/src/utils/index.d.ts +1 -1
  101. package/es/components/form-render/src/utils/index.js +5 -2
  102. package/es/components/iho-chat/index.d.ts +2757 -300
  103. package/es/components/iho-chat/src/Index.vue.d.ts +2757 -300
  104. package/es/components/iho-chat/src/Index.vue2.js +5 -3
  105. package/es/components/iho-chat/src/api/index.d.ts +89 -16
  106. package/es/components/iho-chat/src/api/index.js +8 -1
  107. package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +104 -22
  108. package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +191 -29
  109. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +191 -29
  110. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +3 -0
  111. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +783 -101
  112. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +611 -51
  113. package/es/components/iho-chat/src/components/ChatMain.vue2.js +27 -28
  114. package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +204 -14
  115. package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +175 -10
  116. package/es/components/iho-chat/src/components/ChatSearch.vue2.js +2 -1
  117. package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +197 -29
  118. package/es/components/iho-chat/src/components/ChatSet.vue2.js +48 -11
  119. package/es/components/iho-chat/src/components/ContextMenu.js +7 -10
  120. package/es/components/iho-chat/src/components/MessageEvent.vue.d.ts +88 -7
  121. package/es/components/iho-chat/src/components/MessageMarkdown.vue.d.ts +158 -0
  122. package/es/components/iho-chat/src/components/MessageMarkdown.vue.js +6 -0
  123. package/es/components/iho-chat/src/components/MessageMarkdown.vue2.js +51 -0
  124. package/es/components/iho-chat/src/components/MessageMergeForward.vue.d.ts +176 -14
  125. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +192 -29
  126. package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +2 -1
  127. package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +91 -8
  128. package/es/components/iho-chat/src/components/SiderList.vue.d.ts +121 -11
  129. package/es/components/iho-chat/src/components/Video.vue.d.ts +89 -8
  130. package/es/components/iho-chat/src/components/userItemRender.js +2 -1
  131. package/es/components/iho-chat/src/constants/index.d.ts +2 -1
  132. package/es/components/iho-chat/src/constants/index.js +1 -0
  133. package/es/components/iho-chat/src/hooks/useData.d.ts +374 -27
  134. package/es/components/iho-chat/src/hooks/useData.js +31 -10
  135. package/es/components/iho-chat/src/hooks/useStreamOutput.d.ts +6 -0
  136. package/es/components/iho-chat/src/hooks/useStreamOutput.js +100 -0
  137. package/es/components/iho-chat/src/hooks/useVideo.d.ts +89 -7
  138. package/es/components/iho-chat/src/hooks/useWebSocket.js +14 -4
  139. package/es/components/iho-chat/src/types/index.d.ts +39 -7
  140. package/es/components/iho-chat/src/utils/index.d.ts +2 -1
  141. package/es/components/iho-chat/src/utils/sseClient.d.ts +22 -0
  142. package/es/components/iho-chat/src/utils/sseClient.js +97 -0
  143. package/es/components/iho-chat/style/index.css +1 -1
  144. package/es/components/iho-table/index.d.ts +37 -24
  145. package/es/components/iho-table/src/IhoTable.vue.d.ts +37 -24
  146. package/es/components/iho-table/src/IhoTable.vue2.js +7 -2
  147. package/es/components/iho-table/src/constants/index.d.ts +2 -2
  148. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +3 -3
  149. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +1 -1
  150. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
  151. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +30 -4
  152. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue2.js +22 -8
  153. package/es/components/iho-table/src/plugins/highLightSetPlugin.js +7 -2
  154. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin.js +1 -1
  155. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +28 -0
  156. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.d.ts +2 -2
  157. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +2 -2
  158. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.d.ts +1 -1
  159. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.js +8 -2
  160. package/es/components/iho-table/src/types/index.d.ts +3 -1
  161. package/es/components/index.css +1 -1
  162. package/es/components/info-header/index.d.ts +46 -2
  163. package/es/components/info-header/src/InfoHeader.vue.d.ts +46 -2
  164. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +41 -2
  165. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue2.js +2 -1
  166. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +41 -2
  167. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.d.ts +20 -1
  168. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.d.ts +20 -1
  169. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue2.js +9 -6
  170. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +42 -2
  171. package/es/components/info-header/src/components/infoDescription/index.vue2.js +1 -1
  172. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +1 -0
  173. package/es/components/scale-view/index.d.ts +1 -1
  174. package/es/components/scale-view/src/ScaleView.vue.d.ts +1 -1
  175. package/es/components/scale-view/src/ScaleView.vue2.js +9 -3
  176. package/es/components/scale-view/src/hooks/use-event.js +56 -22
  177. package/es/components/select-person/index.d.ts +31 -0
  178. package/es/components/select-person/src/SelectPerson.vue.d.ts +14 -0
  179. package/es/components/select-person/src/SelectPerson.vue2.js +36 -8
  180. package/es/components/select-person/src/index.vue.d.ts +31 -0
  181. package/es/components/select-person/src/index.vue2.js +4 -0
  182. package/es/components/shortcut-setter/index.d.ts +1 -0
  183. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -0
  184. package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +2 -2
  185. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +28 -0
  186. package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +28 -0
  187. package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +28 -0
  188. package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +28 -0
  189. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +56 -0
  190. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +28 -0
  191. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +28 -0
  192. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +56 -0
  193. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +56 -0
  194. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +28 -0
  195. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +30 -0
  196. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue2.js +10 -2
  197. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +28 -0
  198. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +30 -0
  199. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +10 -2
  200. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +116 -0
  201. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +9 -9
  202. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +116 -0
  203. package/es/components/table-filter/src/constants/index.d.ts +1 -0
  204. package/es/components/table-filter/src/constants/index.js +4 -1
  205. package/es/shared/components/Ellipsis/Ellipsis.d.ts +12 -0
  206. package/es/shared/components/Ellipsis/Ellipsis.js +86 -0
  207. package/es/shared/components/Ellipsis/index.d.ts +2 -0
  208. package/es/shared/components/Ellipsis/index.js +2 -0
  209. package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +15 -0
  210. package/es/shared/components/InputNumberSlash/InputNumberSlash.js +24 -10
  211. package/es/shared/package.json.js +1 -1
  212. package/es/shared/types/business.d.ts +3 -2
  213. package/es/shared/utils/business.js +16 -0
  214. package/package.json +3 -3
@@ -1,8 +1,9 @@
1
- import { reactive, computed, unref, watch, toRefs } from 'vue';
1
+ import { reactive, watch, toRefs } from 'vue';
2
2
  import { defaultBorderStyle, defaultLineStyle, defaultTextStyle } from '../useDraw.js';
3
3
  import '../../../../../shared/utils/fabricjs/index.js';
4
4
  import 'date-fns';
5
- import { cloneDeep, isNumber, last } from 'lodash-es';
5
+ import { getRoundNumber } from '../../utils/index.js';
6
+ import { cloneDeep, last, isNumber } from 'lodash-es';
6
7
  import '../useEvent.js';
7
8
  import '../useShadow.js';
8
9
  import '../useCommon.js';
@@ -25,142 +26,105 @@ function useElectrocardiogramChart(canvas, props, emits, canvasRef, pointTipProp
25
26
  useRectRuler: null
26
27
  });
27
28
  const originX = 0, originY = 0;
28
- const endX = computed(() => props.data.width);
29
- const endY = computed(() => props.data.height);
30
- const __dataList = computed(() => {
31
- const { dataList: dataList2 = [], config = {} } = props.data;
32
- const __dataList2 = cloneDeep(dataList2);
33
- const matchItem = __dataList2.find((item) => config.lastDataKey && item.key === config.lastDataKey);
34
- if (matchItem) {
35
- return [...__dataList2, matchItem];
36
- }
37
- return __dataList2;
38
- });
39
- const xCellWidth = computed(() => {
40
- return (endX.value - originX) / gridXNumber.value;
41
- });
42
- const yCellHeight = computed(() => {
43
- return (endY.value - originY) / gridYNumber.value;
44
- });
45
- const gridXNumber = computed(() => {
46
- var _a, _b, _c;
47
- const { config, grid } = props.data;
48
- if (isNumber(grid.gridXNumber))
49
- return grid.gridXNumber;
50
- const totalLength = (_c = (_b = (_a = last(__dataList.value)) == null ? void 0 : _a.data) == null ? void 0 : _b.length) != null ? _c : 0;
29
+ function buildDerived() {
30
+ var _a, _b, _c, _d, _e, _f;
31
+ const endX = props.data.width;
32
+ const endY = props.data.height;
33
+ const { dataList = [], config = {} } = props.data;
34
+ const list = cloneDeep(dataList);
35
+ const matchItem = list.find((item) => config.lastDataKey && item.key === config.lastDataKey);
36
+ const __dataList = matchItem ? [...list, matchItem] : list;
37
+ const maxLineNumber = list.length + 1;
38
+ const { grid } = props.data;
39
+ const totalLength = (_c = (_b = (_a = last(__dataList)) == null ? void 0 : _a.data) == null ? void 0 : _b.length) != null ? _c : 0;
51
40
  const totalSeconds = totalLength / config.hz;
52
- return Math.ceil(totalSeconds / config.mainXCellValue);
53
- });
54
- const gridYNumber = computed(() => {
55
- const { config, grid } = props.data;
56
- if (isNumber(grid.gridYNumber))
57
- return grid.gridYNumber;
58
- const totalLineLength = __dataList.value.length;
59
- return Math.ceil(totalValueMV.value * totalLineLength * 2 / config.mainYCellValue);
60
- });
61
- const totalValueMV = computed(() => {
62
- var _a;
63
- const { config } = props.data;
64
- const totalData = (_a = last(__dataList.value)) == null ? void 0 : _a.data;
41
+ const gridXNumber = isNumber(grid.gridXNumber) ? grid.gridXNumber : Math.ceil(totalSeconds / config.mainXCellValue);
42
+ const totalData = ((_d = last(__dataList)) == null ? void 0 : _d.data) || [];
65
43
  const maxValue = Math.max(...totalData);
66
44
  const minValue = Math.min(...totalData);
67
45
  const totalValue = maxValue - minValue;
68
- return config.valueUnit === "uv" ? totalValue * 1e-3 : config.valueUnit === "v" ? totalValue * 1e3 : totalValue;
69
- });
70
- const event = computed(() => {
71
- var _a;
72
- return ((_a = props.data.grid) == null ? void 0 : _a.event) || { selectable: true, evented: true };
73
- });
74
- const layoutInfo = computed(() => {
75
- const { mode = "2-6" } = props.data;
76
- const [columnNumber, rowNumber] = mode.split("-").map((n) => +n);
77
- return {
78
- columnNumber,
79
- rowNumber
80
- };
81
- });
82
- const rowSpace = computed(() => {
83
- const { rowNumber } = layoutInfo.value;
84
- const totalLineLength = __dataList.value.length;
85
- return Math.round(gridYNumber.value / (rowNumber + (totalLineLength === ECG.MAXLINENUMBER ? 1 : 0)));
86
- });
87
- const dataList = computed(() => {
88
- const { width, config, grid } = props.data;
89
- const { columnNumber, rowNumber } = layoutInfo.value;
90
- const columnWidth = width / columnNumber;
91
- const dataListLen = __dataList.value.length;
92
- const baseYCellNumber = Math.ceil(rowSpace.value / 2);
93
- const firstRowLineMaxHeight = getFirstRowLineMaxHeight();
94
- const _baseY = yCellHeight.value * baseYCellNumber;
95
- const baseY = columnNumber === 1 || _baseY < firstRowLineMaxHeight ? yCellHeight.value * Math.ceil(firstRowLineMaxHeight / yCellHeight.value) : _baseY;
96
- const baseX = xCellWidth.value;
97
- return __dataList.value.map((item, idx) => {
98
- const itemRowIdx = ECG.MAXLINENUMBER === dataListLen && idx === dataListLen - 1 ? rowNumber : idx % rowNumber;
99
- const itemColumnIdx = ECG.MAXLINENUMBER === dataListLen && idx === dataListLen - 1 ? 0 : Math.floor(idx / rowNumber);
100
- return {
101
- ...item,
102
- origin: {
103
- x: itemColumnIdx * columnWidth + baseX,
104
- y: itemRowIdx * (yCellHeight.value * rowSpace.value) + baseY,
105
- rowIdx: itemRowIdx,
106
- limitX: columnWidth - baseX
107
- }
108
- };
109
- });
46
+ const totalValueMV = config.valueUnit === "uv" ? totalValue * 1e-3 : config.valueUnit === "v" ? totalValue * 1e3 : totalValue;
47
+ const totalLineLength = __dataList.length;
48
+ const gridYNumber = isNumber(grid.gridYNumber) ? grid.gridYNumber : Math.ceil(totalValueMV * totalLineLength * 2 / config.mainYCellValue);
49
+ const xCellWidth = (endX - originX) / gridXNumber;
50
+ const yCellHeight = (endY - originY) / gridYNumber;
51
+ const event = ((_e = props.data.grid) == null ? void 0 : _e.event) || { selectable: true, evented: true };
52
+ const columnNumber = +(props.data.columnNumber || 2);
53
+ const rowNumber = Math.ceil(list.length / columnNumber);
54
+ const dataRowNumber = rowNumber + (totalLineLength === maxLineNumber ? 1 : 0);
55
+ const rowSpace = props.data.isFullyCovered ? getRoundNumber((gridYNumber - 2) / dataRowNumber, 100) : ~~(gridYNumber / dataRowNumber);
56
+ const columnWidth = props.data.width / columnNumber;
57
+ const baseYCellNumber = Math.ceil(rowSpace / 2);
110
58
  function getFirstRowLineMaxHeight() {
111
- const { valueUnit, mainYCellValue } = config;
112
- const data1 = __dataList.value[0].data;
59
+ const { valueUnit, mainYCellValue: mainYCellValue2 } = config;
60
+ const data1 = __dataList[0].data;
113
61
  const data1Max = Math.max(...data1);
114
62
  const data1MaxHeight = computedY(data1Max);
115
63
  if (columnNumber !== 2) {
116
64
  return data1MaxHeight;
117
65
  }
118
- const data7 = __dataList.value[6].data;
119
- const data7Max = Math.max(...data7);
120
- const data7MaxHeight = computedY(data7Max);
121
- return Math.max(data1MaxHeight, data7MaxHeight);
66
+ const halfIndexData = __dataList[rowNumber].data;
67
+ const halfIndexDataMax = Math.max(...halfIndexData);
68
+ const halfIndexDataMaxHeight = computedY(halfIndexDataMax);
69
+ return Math.max(data1MaxHeight, halfIndexDataMaxHeight);
122
70
  function computedY(value) {
123
71
  const currentMV = valueUnit === "uv" ? value * 1e-3 : valueUnit === "v" ? value * 1e3 : value;
124
- return currentMV / mainYCellValue * yCellHeight.value;
72
+ return currentMV / mainYCellValue2 * yCellHeight;
125
73
  }
126
74
  }
127
- });
128
- const calibrationLineHeight = computed(() => {
129
- var _a;
130
- const { calibrationLineGridYNumber, mainYCellValue } = ((_a = props.data) == null ? void 0 : _a.config) || {};
131
- if (calibrationLineGridYNumber)
132
- return yCellHeight.value * calibrationLineGridYNumber;
133
- return mainYCellValue ? yCellHeight.value / mainYCellValue : yCellHeight.value;
134
- });
135
- const propItems = reactive({
136
- canvasWidth: props.data.width,
137
- canvasHeight: props.data.height,
138
- borderStyle: { ...defaultBorderStyle, ...props.data.borderStyle },
139
- lineStyle: { ...defaultLineStyle, ...props.data.lineStyle },
140
- titleStyle: { ...defaultTextStyle, ...props.data.titleStyle },
141
- titleOffset: props.data.titleOffset,
142
- measureLineStyle: { ...defaultLineStyle, ...props.data.measureLineStyle },
143
- measureTextStyle: { ...defaultTextStyle, ...props.data.measureTextStyle },
144
- grid: props.data.grid,
145
- originX,
146
- endX: endX.value,
147
- originY,
148
- endY: endY.value,
149
- xCellWidth: xCellWidth.value,
150
- yCellHeight: yCellHeight.value,
151
- gridXNumber: gridXNumber.value,
152
- gridYNumber: gridYNumber.value,
153
- event: event.value,
154
- dataList: dataList.value,
155
- columnNumber: unref(layoutInfo).columnNumber,
156
- rowNumber: unref(layoutInfo).rowNumber,
157
- config: props.data.config,
158
- calibrationLineHeight: unref(calibrationLineHeight)
159
- });
75
+ const firstRowLineMaxHeight = getFirstRowLineMaxHeight();
76
+ const _baseY = yCellHeight * baseYCellNumber;
77
+ const baseYNumber = props.data.isFullyCovered ? getRoundNumber(firstRowLineMaxHeight / yCellHeight, 100) : Math.ceil(firstRowLineMaxHeight / yCellHeight);
78
+ const baseY = columnNumber === 1 || _baseY < firstRowLineMaxHeight ? yCellHeight * baseYNumber : _baseY;
79
+ const baseX = xCellWidth;
80
+ const derivedDataList = __dataList.map((item, idx) => {
81
+ const isLastLine = maxLineNumber === totalLineLength && idx === totalLineLength - 1;
82
+ const itemRowIdx = isLastLine ? rowNumber : idx % rowNumber;
83
+ const itemColumnIdx = isLastLine ? 0 : ~~(idx / rowNumber);
84
+ return {
85
+ ...item,
86
+ origin: {
87
+ x: itemColumnIdx * columnWidth + baseX,
88
+ y: itemRowIdx * (yCellHeight * rowSpace) + baseY,
89
+ rowIdx: itemRowIdx,
90
+ limitX: columnWidth - baseX
91
+ }
92
+ };
93
+ });
94
+ const { calibrationLineGridYNumber, mainYCellValue } = ((_f = props.data) == null ? void 0 : _f.config) || {};
95
+ const calibrationLineHeight = calibrationLineGridYNumber ? yCellHeight * calibrationLineGridYNumber : mainYCellValue ? yCellHeight / mainYCellValue : yCellHeight;
96
+ return {
97
+ canvasWidth: props.data.width,
98
+ canvasHeight: props.data.height,
99
+ borderStyle: { ...defaultBorderStyle, ...props.data.borderStyle },
100
+ lineStyle: { ...defaultLineStyle, ...props.data.lineStyle },
101
+ titleStyle: { ...defaultTextStyle, ...props.data.titleStyle },
102
+ titleOffset: props.data.titleOffset,
103
+ measureLineStyle: { ...defaultLineStyle, ...props.data.measureLineStyle },
104
+ measureTextStyle: { ...defaultTextStyle, ...props.data.measureTextStyle },
105
+ grid: props.data.grid,
106
+ originX,
107
+ endX,
108
+ originY,
109
+ endY,
110
+ xCellWidth,
111
+ yCellHeight,
112
+ gridXNumber,
113
+ gridYNumber,
114
+ event,
115
+ dataList: derivedDataList,
116
+ columnNumber,
117
+ rowNumber,
118
+ config: props.data.config,
119
+ calibrationLineHeight,
120
+ maxLineNumber
121
+ };
122
+ }
123
+ const propItems = reactive(buildDerived());
160
124
  function getGridInfo() {
161
125
  return {
162
- cellWidth: xCellWidth.value,
163
- cellHeight: yCellHeight.value,
126
+ cellWidth: propItems.xCellWidth,
127
+ cellHeight: propItems.yCellHeight,
164
128
  smallCellNumber: ECG.SMALLCELLNUMBER
165
129
  };
166
130
  }
@@ -6,6 +6,7 @@ import '../useEvent.js';
6
6
  import '../useShadow.js';
7
7
  import '../useCommon.js';
8
8
  import { isNumber } from 'lodash-es';
9
+ import '../../utils/eventBus.js';
9
10
  import 'date-fns';
10
11
  import '../../constants/index.js';
11
12
  import '@vueuse/shared';
@@ -1,4 +1,4 @@
1
- import { ref, computed, reactive, watch } from 'vue';
1
+ import { ref, reactive, watch } from 'vue';
2
2
  import { defaultBorderStyle } from '../useDraw.js';
3
3
  import '../../../../../shared/utils/fabricjs/index.js';
4
4
  import { format } from 'date-fns';
@@ -18,125 +18,77 @@ import { useNewBirthProcess } from './useNewBirthProcess.js';
18
18
 
19
19
  function useNewBirthProcessChart(canvas, props, emits, canvasRef, pointTipProps, pointMenuProps) {
20
20
  const redrawPoints = ref();
21
- const leftScales = computed(
22
- () => props.data.scaleValues.filter((item) => item.layout === "left" && item.show)
23
- );
24
- const rightScales = computed(
25
- () => props.data.scaleValues.filter((item) => item.layout === "right" && item.show)
26
- );
27
- const originX = computed(
28
- () => {
29
- var _a;
30
- return (_a = leftScales.value) == null ? void 0 : _a.reduce((width, item) => {
31
- width += item.width;
32
- return width;
33
- }, 0);
34
- }
35
- );
36
- const endX = computed(() => {
37
- var _a;
38
- const { width } = props.data;
39
- const rightScalesWidth = (_a = rightScales.value) == null ? void 0 : _a.reduce((width2, item) => {
40
- width2 += item.width;
41
- return width2;
42
- }, 0);
43
- return width - (rightScalesWidth || 15);
44
- });
45
- const gridXNumber = computed(() => props.data.grid.mainXCell || 20);
46
- const gridYNumber = computed(() => props.data.grid.mainYCell || 8);
47
- const xCellWidth = computed(() => {
48
- return (endX.value - originX.value) / gridXNumber.value;
49
- });
50
- const yCellHeight = computed(() => {
51
- var _a;
21
+ function buildDerived() {
22
+ var _a, _b, _c, _d, _e, _f, _g, _h;
23
+ const leftScales = props.data.scaleValues.filter((item) => item.layout === "left" && item.show);
24
+ const rightScales = props.data.scaleValues.filter((item) => item.layout === "right" && item.show);
25
+ const originX = leftScales == null ? void 0 : leftScales.reduce((width, item) => width + item.width, 0);
26
+ const rightScalesWidth = rightScales == null ? void 0 : rightScales.reduce((width, item) => width + item.width, 0);
27
+ const endX = props.data.width - (rightScalesWidth || 15);
28
+ const gridXNumber = props.data.grid.mainXCell || 20;
29
+ const gridYNumber = props.data.grid.mainYCell || 8;
30
+ const timeXAxisHeight = ((_b = (_a = leftScales.concat(rightScales)) == null ? void 0 : _a.length) != null ? _b : 0) > 0 ? 20 : 0;
52
31
  const { xAxis, height, other } = props.data;
53
- const xAxisNumber = Object.values(xAxis).reduce((num, item) => {
54
- if (item.show)
55
- num++;
56
- return num;
57
- }, 0);
58
- const hasAlertLine = ((_a = other == null ? void 0 : other.alertLineList.length) != null ? _a : 0) > 0;
59
- return (height - timeXAxisHeight.value) / (gridYNumber.value + xAxisNumber + (hasAlertLine ? 1 : 0));
60
- });
61
- const originY = computed(() => {
62
- var _a;
63
- const { xAxis, other } = props.data;
64
- const xAxisNumber = Object.values(xAxis).reduce((num, item) => {
65
- if (item.show && item.position === "top")
66
- num++;
67
- return num;
68
- }, 0);
69
- const hasAlertLine = ((_a = other == null ? void 0 : other.alertLineList.length) != null ? _a : 0) > 0;
70
- return yCellHeight.value * (xAxisNumber || hasAlertLine ? 1 : 0);
71
- });
72
- const endY = computed(() => {
73
- const { xAxis, height } = props.data;
74
- const xAxisNumber = Object.values(xAxis).reduce((num, item) => {
75
- if (item.show && item.position === "bottom")
76
- num++;
77
- return num;
78
- }, 0);
79
- return height - yCellHeight.value * xAxisNumber - timeXAxisHeight.value;
80
- });
81
- const timeXAxisHeight = computed(() => {
82
- const scalesList = leftScales.value.concat(rightScales.value);
83
- return (scalesList == null ? void 0 : scalesList.length) > 0 ? 20 : 0;
84
- });
85
- const startTime = computed(() => getTime(props.data.xAxis.time.startTime));
86
- const timeXCell = computed(() => {
32
+ const xAxisNumberAll = Object.values(xAxis).reduce((num, item) => item.show ? num + 1 : num, 0);
33
+ const hasAlertLine = ((_c = other == null ? void 0 : other.alertLineList.length) != null ? _c : 0) > 0;
34
+ const yCellHeight = (height - timeXAxisHeight) / (gridYNumber + xAxisNumberAll + (hasAlertLine ? 1 : 0));
35
+ const xAxisNumberTop = Object.values(xAxis).reduce(
36
+ (num, item) => item.show && item.position === "top" ? num + 1 : num,
37
+ 0
38
+ );
39
+ const originY = yCellHeight * (xAxisNumberTop || hasAlertLine ? 1 : 0);
40
+ const xAxisNumberBottom = Object.values(xAxis).reduce(
41
+ (num, item) => item.show && item.position === "bottom" ? num + 1 : num,
42
+ 0
43
+ );
44
+ const endY = height - yCellHeight * xAxisNumberBottom - timeXAxisHeight;
45
+ const xCellWidth = (endX - originX) / gridXNumber;
46
+ const startTime = getTime(props.data.xAxis.time.startTime);
87
47
  const { spaceValue, spaceGridNumber } = props.data.xAxis.time || {};
88
- return spaceValue * 60 * 60 * 1e3 / (xCellWidth.value * spaceGridNumber);
89
- });
90
- const extraTimeXAxisList = computed(() => {
91
- var _a, _b, _c;
92
- const scalesTimeList = (_c = (_b = (_a = leftScales.value.concat(rightScales.value)) == null ? void 0 : _a[0]) == null ? void 0 : _b.data) == null ? void 0 : _c.map((item) => getTime(item.time));
48
+ const timeXCell = spaceValue * 60 * 60 * 1e3 / (xCellWidth * spaceGridNumber);
49
+ const scalesTimeList = ((_f = (_e = (_d = leftScales.concat(rightScales)) == null ? void 0 : _d[0]) == null ? void 0 : _e.data) == null ? void 0 : _f.map((item) => getTime(item.time))) || [];
93
50
  const min = Math.min(...scalesTimeList);
94
51
  let max = Math.min(Math.max(...scalesTimeList));
95
- const timesXCell = timeXCell.value * xCellWidth.value;
96
- const xCellTimeList = range(1, gridXNumber.value + 1).reduce(
97
- (timeList, cur, next) => timeList.concat(startTime.value + cur * timesXCell),
98
- [startTime.value]
52
+ const timesXCell = timeXCell * xCellWidth;
53
+ const xCellTimeList = range(1, gridXNumber + 1).reduce(
54
+ (timeList, cur) => timeList.concat(startTime + cur * timesXCell),
55
+ [startTime]
99
56
  );
100
- max = Math.min(max, last(xCellTimeList));
57
+ max = Math.min(max, (_g = last(xCellTimeList)) != null ? _g : max);
101
58
  const startIndx = xCellTimeList.findIndex((time) => Math.abs(time - min) < timesXCell);
102
59
  const endIndx = xCellTimeList.findIndex((time) => Math.abs(time - max) < timesXCell) + 1;
103
- return xCellTimeList.filter((time, idx) => idx >= startIndx && idx <= endIndx).map((time) => format(new Date(time), "yyyy-MM-dd HH:mm:ss"));
104
- });
105
- const cervixYCell = computed(() => {
106
- const { scaleValues } = props.data;
107
- const cervixItem = scaleValues.find((item) => item.key === "cervix");
108
- return yCellHeight.value / ((cervixItem == null ? void 0 : cervixItem.spaceValue) || 1);
109
- });
110
- const event = computed(() => {
111
- var _a;
112
- return ((_a = props.data.grid) == null ? void 0 : _a.event) || { selectable: true, evented: true, hovered: true };
113
- });
114
- const propItems = reactive({
115
- canvasWidth: props.data.width,
116
- canvasHeight: props.data.height,
117
- borderStyle: { ...defaultBorderStyle, ...props.data.borderStyle || {} },
118
- selectionStyle: props.data.selectionStyle || {},
119
- grid: props.data.grid,
120
- other: props.data.other,
121
- originX: originX.value,
122
- endX: endX.value,
123
- originY: originY.value,
124
- endY: endY.value,
125
- xCellWidth: xCellWidth.value,
126
- yCellHeight: yCellHeight.value,
127
- gridXNumber: gridXNumber.value,
128
- gridYNumber: gridYNumber.value,
129
- xAxis: props.data.xAxis,
130
- leftScales: leftScales.value,
131
- rightScales: rightScales.value,
132
- startTime: startTime.value,
133
- timeXCell: timeXCell.value,
134
- cervixYCell: cervixYCell.value,
135
- scaleValues: props.data.scaleValues,
136
- timeXAxisHeight: timeXAxisHeight.value,
137
- extraTimeXAxisList: extraTimeXAxisList.value,
138
- event: event.value
139
- });
60
+ const extraTimeXAxisList = xCellTimeList.filter((time, idx) => idx >= startIndx && idx <= endIndx).map((time) => format(new Date(time), "yyyy-MM-dd HH:mm:ss"));
61
+ const cervixItem = props.data.scaleValues.find((item) => item.key === "cervix");
62
+ const cervixYCell = yCellHeight / ((cervixItem == null ? void 0 : cervixItem.spaceValue) || 1);
63
+ const event = ((_h = props.data.grid) == null ? void 0 : _h.event) || { selectable: true, evented: true, hovered: true };
64
+ return {
65
+ canvasWidth: props.data.width,
66
+ canvasHeight: props.data.height,
67
+ borderStyle: { ...defaultBorderStyle, ...props.data.borderStyle },
68
+ selectionStyle: props.data.selectionStyle || {},
69
+ grid: props.data.grid,
70
+ other: props.data.other,
71
+ originX,
72
+ endX,
73
+ originY,
74
+ endY,
75
+ xCellWidth,
76
+ yCellHeight,
77
+ gridXNumber,
78
+ gridYNumber,
79
+ xAxis: props.data.xAxis,
80
+ leftScales,
81
+ rightScales,
82
+ startTime,
83
+ timeXCell,
84
+ cervixYCell,
85
+ scaleValues: props.data.scaleValues,
86
+ timeXAxisHeight,
87
+ extraTimeXAxisList,
88
+ event
89
+ };
90
+ }
91
+ const propItems = reactive(buildDerived());
140
92
  watch(
141
93
  () => canvas.value,
142
94
  (value) => {
@@ -1,12 +1,13 @@
1
1
  import { type Ref } from 'vue';
2
2
  import { fabric } from '../../../../../shared/utils/fabricjs';
3
3
  import { AnyObject } from '../../../../../shared/types';
4
- import { IObject, IPointTipProps, IPointMenuProps } from '../../../../../components/fabric-chart/src/interface';
4
+ import { IObject, ICoordinateValue, IPointTipProps, IPointMenuProps, PopupMenuItem } from '../../../../../components/fabric-chart/src/interface';
5
5
  export declare function useCenter(canvas: Ref<fabric.Canvas>, propItems: AnyObject, emits: Function, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps, isPopupTipRender: boolean): {
6
6
  redrawPoints: (ItemObj?: AnyObject) => void;
7
- clickMenu: ({ item, target }: {
8
- item: any;
7
+ clickMenu: ({ item, target, pointer }: {
8
+ item: PopupMenuItem;
9
9
  target: any;
10
+ pointer: ICoordinateValue;
10
11
  }) => void;
11
12
  moveLimit: (point: IObject, limitRight?: any) => void;
12
13
  setPopup: (point: any, status?: string) => void;
@@ -17,6 +17,7 @@ import './useTop.js';
17
17
  import './useOther.js';
18
18
  import '../../../../../shared/utils/index.js';
19
19
  import { useIntervalFn } from '@vueuse/core';
20
+ import { singlePointAddEventBus } from '../../utils/eventBus.js';
20
21
 
21
22
  function useCenter(canvas, propItems, emits, pointTipProps, pointMenuProps, isPopupTipRender) {
22
23
  const {
@@ -248,6 +249,21 @@ function useCenter(canvas, propItems, emits, pointTipProps, pointMenuProps, isPo
248
249
  currentSelection && canvas.value.remove(currentSelection);
249
250
  currentSelection = null;
250
251
  }
252
+ function createChildrenMenuList(itemList2) {
253
+ return itemList2.map((item) => ({
254
+ key: item.key,
255
+ label: item.title,
256
+ mode: "add",
257
+ origin: {
258
+ title: item.title,
259
+ unit: item.unit,
260
+ type: item.bigType,
261
+ dataIndex: item.dataIndex,
262
+ key: item.key,
263
+ linkKey: item.linkKey
264
+ }
265
+ }));
266
+ }
251
267
  function handleRightClick(event2) {
252
268
  pointTipProps.show = false;
253
269
  const {
@@ -260,14 +276,8 @@ function useCenter(canvas, propItems, emits, pointTipProps, pointMenuProps, isPo
260
276
  const {
261
277
  menuList = []
262
278
  } = extraMenuConfig;
263
- pointMenuProps.list = filter(OTHER_MENU, (o) => o.type === "add").concat(menuList).map((item) => {
264
- return {
265
- ...item,
266
- renderItem: () => item.label,
267
- type: item.key || item.type,
268
- pointer: event2.pointer
269
- };
270
- });
279
+ pointMenuProps.list = filter(OTHER_MENU, (o) => o.key === "add").concat(menuList);
280
+ pointMenuProps.list[0].children = createChildrenMenuList(itemList);
271
281
  } else {
272
282
  if (event2.target.__type !== "main")
273
283
  return;
@@ -276,22 +286,21 @@ function useCenter(canvas, propItems, emits, pointTipProps, pointMenuProps, isPo
276
286
  x: point.left,
277
287
  y: point.top
278
288
  }, event2.target, []);
279
- pointMenuProps.list = filter(OTHER_MENU, (o) => o.type !== "edit").map((item) => {
289
+ pointMenuProps.list = filter(OTHER_MENU, (o) => o.key !== "edit").map((item) => {
280
290
  return {
281
291
  ...item,
282
- renderItem: () => item.label,
283
- type: item.key || item.type,
284
- pointer: {
285
- x: point.left,
286
- y: point.top
287
- },
288
- ...item.type === "add" ? {} : {
292
+ ...item.key !== "add" && {
289
293
  origin: {
290
294
  ...point.origin
291
295
  }
292
296
  }
293
297
  };
294
298
  });
299
+ const newChildren = itemList.filter((item) => {
300
+ const key = item.linkKey || item.key;
301
+ return !getEqualXTypes(getGridPoints(), point.left, "key", xCellWidth).includes(key);
302
+ });
303
+ pointMenuProps.list[0].children = createChildrenMenuList(newChildren);
295
304
  }
296
305
  }
297
306
  function setPointMenuProps(point, target, list) {
@@ -305,32 +314,46 @@ function useCenter(canvas, propItems, emits, pointTipProps, pointMenuProps, isPo
305
314
  }
306
315
  function clickMenu({
307
316
  item,
308
- target
317
+ target,
318
+ pointer
309
319
  }) {
310
- var _a;
320
+ var _a, _b, _c;
311
321
  const {
312
- type,
322
+ key,
313
323
  origin,
314
- pointer
324
+ mode
315
325
  } = item;
316
326
  const params = {
317
327
  ...origin
318
328
  };
319
- if (!origin) {
320
- Object.assign(params, {
321
- data: {
322
- time: getXValue(pointer.x)
323
- },
324
- type: null
325
- });
326
- }
327
- if (filter(OTHER_MENU, (o) => o.type !== "edit").map((item2) => item2.type).includes(type)) {
328
- if (type === "remove") {
329
+ if (key === "remove" || mode === "add") {
330
+ const eventName = key === "remove" ? "remove" : "add";
331
+ if (key === "remove") {
329
332
  updateData(params, "remove");
333
+ } else {
334
+ const pointKey = origin.linkKey || origin.key;
335
+ params.data = [{
336
+ time: getXValue(pointer.x),
337
+ value: getYValue(origin.type, pointer.y),
338
+ ...origin.linkKey && {
339
+ key: origin.key
340
+ }
341
+ }];
342
+ updateData({
343
+ ...params,
344
+ key: pointKey
345
+ }, "add");
346
+ const firstLeft = pointKey ? (_b = (_a = gridPointsMap.get(pointKey)) == null ? void 0 : _a[0]) == null ? void 0 : _b.left : void 0;
347
+ const minLeft = firstLeft != null ? firstLeft : pointer.x;
348
+ const limitRight = minLeft - xCellWidth;
349
+ singlePointAddEventBus.emit({
350
+ ...origin,
351
+ limitRight
352
+ });
330
353
  }
331
- emits(type, params);
354
+ emits(eventName, params);
332
355
  } else {
333
- (_a = extraMenuConfig.click) == null ? void 0 : _a.call(extraMenuConfig, type, params);
356
+ (_c = extraMenuConfig.click) == null ? void 0 : _c.call(extraMenuConfig, key, params);
334
357
  }
335
358
  }
336
359
  function drawCordonLine(item, scaleValue) {
@@ -524,7 +547,8 @@ function useCenter(canvas, propItems, emits, pointTipProps, pointMenuProps, isPo
524
547
  const {
525
548
  type,
526
549
  selfKey,
527
- dataIndex
550
+ dataIndex,
551
+ data: oldData
528
552
  } = point.origin;
529
553
  const params = {
530
554
  ...point.origin,
@@ -575,7 +599,8 @@ function useCenter(canvas, propItems, emits, pointTipProps, pointMenuProps, isPo
575
599
  } else {
576
600
  emits("change", {
577
601
  ...omit(params, ["selfKey", "lineAttr"]),
578
- key: selfKey
602
+ key: selfKey,
603
+ oldData
579
604
  });
580
605
  updateData(params, "change");
581
606
  }
@@ -813,7 +838,7 @@ function useCenter(canvas, propItems, emits, pointTipProps, pointMenuProps, isPo
813
838
  });
814
839
  }
815
840
  function redrawPoints(ItemObj) {
816
- var _a, _b, _c;
841
+ var _a, _b, _c, _d;
817
842
  batchAddPoints.size && ((_a = canvas.value) == null ? void 0 : _a.remove(...doRemovePoints([...batchAddPoints])));
818
843
  batchAddPoints.clear();
819
844
  batchAddDatas = [];
@@ -823,12 +848,13 @@ function useCenter(canvas, propItems, emits, pointTipProps, pointMenuProps, isPo
823
848
  scaleValue
824
849
  } = ItemObj;
825
850
  const item = scaleValue.dataList[dataIndex];
826
- (_b = canvas.value) == null ? void 0 : _b.remove(...doRemovePoints(gridPointsMap.get(item.key)));
851
+ const points = (_b = gridPointsMap.get(item.key)) != null ? _b : [];
852
+ (_c = canvas.value) == null ? void 0 : _c.remove(...doRemovePoints(points));
827
853
  gridPointsMap.delete(item.key);
828
854
  drawPolyLine(item, dataIndex, scaleValue);
829
855
  } else {
830
856
  yScaleValue = cloneDeep(scaleValues);
831
- gridPointsMap.size && ((_c = canvas.value) == null ? void 0 : _c.remove(...doRemovePoints(getGridPoints())));
857
+ gridPointsMap.size && ((_d = canvas.value) == null ? void 0 : _d.remove(...doRemovePoints(getGridPoints())));
832
858
  gridPointsMap.clear();
833
859
  init();
834
860
  }