cnhis-design-vue 3.4.0-beta.9 → 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 (239) 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 +77 -50
  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 +2 -1
  17. package/es/components/button-print/src/utils/print.js +13 -8
  18. package/es/components/callback/src/components/render/popupMaps.d.ts +110 -222
  19. package/es/components/classification/index.d.ts +123 -0
  20. package/es/components/classification/src/components/search-filter/index.vue.d.ts +123 -0
  21. package/es/components/classification/src/components/set-classification/index.vue.d.ts +123 -0
  22. package/es/components/classification/src/index.vue.d.ts +123 -0
  23. package/es/components/classification/src/index.vue2.js +7 -0
  24. package/es/components/date-picker/index.d.ts +41 -0
  25. package/es/components/date-picker/src/DatePicker.vue.d.ts +41 -0
  26. package/es/components/date-picker/src/DatePicker.vue2.js +34 -4
  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 +18 -12
  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 +61 -33
  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 -120
  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 +21 -14
  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 +16 -14
  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 +15 -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 +83 -1
  72. package/es/components/field-set/src/FieldColor.vue2.js +2 -1
  73. package/es/components/field-set/src/FieldFilter.vue.d.ts +1 -1
  74. package/es/components/field-set/src/FieldFilter.vue2.js +2 -1
  75. package/es/components/field-set/src/FieldSet.vue.d.ts +2 -2
  76. package/es/components/field-set/src/FieldSet.vue2.js +4 -1
  77. package/es/components/field-set/src/components/condition.vue.d.ts +41 -0
  78. package/es/components/field-set/src/components/edit-dialog.vue.d.ts +82 -0
  79. package/es/components/field-set/src/components/edit-filter.vue.d.ts +41 -0
  80. package/es/components/field-set/src/components/table-row.vue.d.ts +1 -1
  81. package/es/components/field-set/src/components/table-row.vue2.js +1 -0
  82. package/es/components/form-config/index.d.ts +24 -0
  83. package/es/components/form-config/src/FormConfig.vue.d.ts +24 -0
  84. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +1 -0
  85. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +19 -0
  86. package/es/components/form-config/src/components/FormConfigEdit.vue2.js +48 -24
  87. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +1 -0
  88. package/es/components/form-config/src/constants/index.d.ts +2 -0
  89. package/es/components/form-config/src/constants/index.js +2 -0
  90. package/es/components/form-config/src/hooks/useConfigurationField.js +20 -3
  91. package/es/components/form-render/index.d.ts +1 -0
  92. package/es/components/form-render/src/FormRender.vue.d.ts +1 -0
  93. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +1 -0
  94. package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js +1 -1
  95. package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +1 -0
  96. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -0
  97. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -0
  98. package/es/components/form-render/src/components/renderer/radio_checkbox.js +3 -2
  99. package/es/components/form-render/src/components/renderer/textarea.d.ts +2 -2
  100. package/es/components/form-render/src/components/renderer/textarea.js +1 -1
  101. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -0
  102. package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
  103. package/es/components/form-render/src/hooks/useNewLowCodeReactions.js +8 -0
  104. package/es/components/form-render/src/types/index.d.ts +1 -0
  105. package/es/components/form-render/src/utils/index.d.ts +1 -1
  106. package/es/components/form-render/src/utils/index.js +5 -2
  107. package/es/components/iho-chat/index.d.ts +2785 -302
  108. package/es/components/iho-chat/src/Index.vue.d.ts +2785 -302
  109. package/es/components/iho-chat/src/Index.vue2.js +5 -3
  110. package/es/components/iho-chat/src/api/index.d.ts +89 -16
  111. package/es/components/iho-chat/src/api/index.js +8 -1
  112. package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +104 -22
  113. package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +191 -29
  114. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +191 -29
  115. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +3 -0
  116. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +796 -101
  117. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +611 -51
  118. package/es/components/iho-chat/src/components/ChatMain.vue2.js +27 -28
  119. package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +217 -14
  120. package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +175 -10
  121. package/es/components/iho-chat/src/components/ChatSearch.vue2.js +2 -1
  122. package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +197 -29
  123. package/es/components/iho-chat/src/components/ChatSet.vue2.js +48 -11
  124. package/es/components/iho-chat/src/components/ContextMenu.js +7 -10
  125. package/es/components/iho-chat/src/components/MessageEvent.vue.d.ts +88 -7
  126. package/es/components/iho-chat/src/components/MessageMarkdown.vue.d.ts +158 -0
  127. package/es/components/iho-chat/src/components/MessageMarkdown.vue.js +6 -0
  128. package/es/components/iho-chat/src/components/MessageMarkdown.vue2.js +51 -0
  129. package/es/components/iho-chat/src/components/MessageMergeForward.vue.d.ts +176 -14
  130. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +192 -29
  131. package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +2 -1
  132. package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +91 -8
  133. package/es/components/iho-chat/src/components/SiderList.vue.d.ts +134 -11
  134. package/es/components/iho-chat/src/components/Video.vue.d.ts +89 -8
  135. package/es/components/iho-chat/src/components/userItemRender.js +2 -1
  136. package/es/components/iho-chat/src/constants/index.d.ts +2 -1
  137. package/es/components/iho-chat/src/constants/index.js +1 -0
  138. package/es/components/iho-chat/src/hooks/useData.d.ts +374 -27
  139. package/es/components/iho-chat/src/hooks/useData.js +31 -10
  140. package/es/components/iho-chat/src/hooks/useStreamOutput.d.ts +6 -0
  141. package/es/components/iho-chat/src/hooks/useStreamOutput.js +100 -0
  142. package/es/components/iho-chat/src/hooks/useVideo.d.ts +89 -7
  143. package/es/components/iho-chat/src/hooks/useWebSocket.js +14 -4
  144. package/es/components/iho-chat/src/types/index.d.ts +39 -7
  145. package/es/components/iho-chat/src/utils/index.d.ts +2 -1
  146. package/es/components/iho-chat/src/utils/sseClient.d.ts +22 -0
  147. package/es/components/iho-chat/src/utils/sseClient.js +97 -0
  148. package/es/components/iho-chat/style/index.css +1 -1
  149. package/es/components/iho-table/index.d.ts +109 -222
  150. package/es/components/iho-table/src/IhoTable.vue.d.ts +109 -222
  151. package/es/components/iho-table/src/IhoTable.vue2.js +23 -14
  152. package/es/components/iho-table/src/constants/index.d.ts +3 -3
  153. package/es/components/iho-table/src/constants/index.js +0 -21
  154. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +39 -60
  155. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +1 -1
  156. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
  157. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +43 -4
  158. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue2.js +22 -8
  159. package/es/components/iho-table/src/plugins/highLightSetPlugin.js +7 -2
  160. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin.js +1 -1
  161. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +41 -0
  162. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -1
  163. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +25 -0
  164. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +1 -1
  165. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js +1 -1
  166. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue.d.ts +2 -2
  167. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
  168. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  169. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +2 -2
  170. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
  171. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -1
  172. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.d.ts +1 -1
  173. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.js +8 -2
  174. package/es/components/iho-table/src/types/index.d.ts +3 -1
  175. package/es/components/index.css +1 -1
  176. package/es/components/info-header/index.d.ts +46 -2
  177. package/es/components/info-header/src/InfoHeader.vue.d.ts +46 -2
  178. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +41 -2
  179. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue2.js +2 -1
  180. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +41 -2
  181. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.d.ts +20 -1
  182. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.d.ts +20 -1
  183. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue2.js +9 -6
  184. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +42 -2
  185. package/es/components/info-header/src/components/infoDescription/index.vue2.js +1 -1
  186. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +1 -0
  187. package/es/components/scale-view/index.d.ts +1 -1
  188. package/es/components/scale-view/src/ScaleView.vue.d.ts +1 -1
  189. package/es/components/scale-view/src/ScaleView.vue2.js +9 -3
  190. package/es/components/scale-view/src/hooks/use-event.js +56 -22
  191. package/es/components/select-person/index.d.ts +31 -0
  192. package/es/components/select-person/src/SelectPerson.vue.d.ts +14 -0
  193. package/es/components/select-person/src/SelectPerson.vue2.js +38 -9
  194. package/es/components/select-person/src/index.vue.d.ts +31 -0
  195. package/es/components/select-person/src/index.vue2.js +4 -0
  196. package/es/components/select-person/src/utils/index.js +11 -9
  197. package/es/components/shortcut-provider/src/hooks/useShortcuts.d.ts +3 -0
  198. package/es/components/shortcut-provider/src/hooks/useShortcuts.js +9 -3
  199. package/es/components/shortcut-setter/index.d.ts +2 -0
  200. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +2 -0
  201. package/es/components/table-export-field/index.d.ts +6 -0
  202. package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -0
  203. package/es/components/table-export-field/src/components/SaveProjectModal.vue.d.ts +2 -0
  204. package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +49 -18
  205. package/es/components/table-export-field/src/index.vue.d.ts +6 -0
  206. package/es/components/table-export-field/src/types/index.d.ts +1 -0
  207. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +41 -0
  208. package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +41 -0
  209. package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +41 -0
  210. package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +41 -0
  211. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +82 -0
  212. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +41 -0
  213. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +41 -0
  214. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +82 -0
  215. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +82 -0
  216. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +41 -0
  217. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +43 -0
  218. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue2.js +10 -2
  219. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +41 -0
  220. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +43 -0
  221. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +10 -2
  222. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +168 -0
  223. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +9 -9
  224. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +168 -0
  225. package/es/components/table-filter/src/constants/index.d.ts +1 -0
  226. package/es/components/table-filter/src/constants/index.js +4 -1
  227. package/es/shared/components/CancelRadio/CancelRadio.js +3 -1
  228. package/es/shared/components/Ellipsis/Ellipsis.d.ts +12 -0
  229. package/es/shared/components/Ellipsis/Ellipsis.js +86 -0
  230. package/es/shared/components/Ellipsis/index.d.ts +2 -0
  231. package/es/shared/components/Ellipsis/index.js +2 -0
  232. package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +15 -0
  233. package/es/shared/components/InputNumberSlash/InputNumberSlash.js +24 -10
  234. package/es/shared/package.json.js +1 -1
  235. package/es/shared/types/business.d.ts +3 -2
  236. package/es/shared/utils/business.js +16 -0
  237. package/es/shared/utils/ho-edge.d.ts +12 -0
  238. package/es/shared/utils/ho-edge.js +58 -0
  239. package/package.json +3 -3
@@ -1,3 +1,4 @@
1
+ import { onBeforeUnmount } from 'vue';
1
2
  import { fabric } from '../../../../../shared/utils/fabricjs/index.js';
2
3
  import { drawTextGroup, defaultRectStyle, drawTextAndIconGroup, drawText, defaultTextStyle, defaultStyle } from '../useDraw.js';
3
4
  import { useBirthProcessCumputedPoint } from '../useCumputedPoint.js';
@@ -5,7 +6,6 @@ import '../useEvent.js';
5
6
  import '../useShadow.js';
6
7
  import { drawScaleNumber } from '../useScaleColumn.js';
7
8
  import { useCommon } from '../useCommon.js';
8
- import 'vue';
9
9
  import { isEffectiveNode, getScaleNumberList } from '../../utils/index.js';
10
10
  import { cloneDeep, omit, last } from 'lodash-es';
11
11
  import 'date-fns';
@@ -16,6 +16,7 @@ import './useTop.js';
16
16
  import '@vueuse/core';
17
17
  import './useOther.js';
18
18
  import '../../../../../shared/utils/index.js';
19
+ import { singlePointAddEventBus } from '../../utils/eventBus.js';
19
20
 
20
21
  function useLeft(canvas, propItems, emits, pointTipProps, moveLimit, setPopup, updateData, getGridPoints) {
21
22
  const { getYValue, getXValue, computedX } = useBirthProcessCumputedPoint(propItems);
@@ -36,6 +37,7 @@ function useLeft(canvas, propItems, emits, pointTipProps, moveLimit, setPopup, u
36
37
  canvasHeight,
37
38
  xCellWidth
38
39
  } = propItems;
40
+ const icons = /* @__PURE__ */ new Set();
39
41
  function drawTitle() {
40
42
  if (!left)
41
43
  return;
@@ -74,7 +76,7 @@ function useLeft(canvas, propItems, emits, pointTipProps, moveLimit, setPopup, u
74
76
  list.forEach((item) => {
75
77
  var _a;
76
78
  const targetList = !item.linkKey ? item.list : (_a = list.find((_item) => _item.key === item.linkKey)) == null ? void 0 : _a.list;
77
- let firstPointLeft = originX;
79
+ let firstPointLeft = 0;
78
80
  targetList.find((k) => {
79
81
  let con = false;
80
82
  if (isEffectiveNode(k)) {
@@ -85,18 +87,18 @@ function useLeft(canvas, propItems, emits, pointTipProps, moveLimit, setPopup, u
85
87
  }
86
88
  return con;
87
89
  });
88
- item.limitRight = firstPointLeft - xCellWidth;
90
+ item.limitRight = firstPointLeft ? firstPointLeft - xCellWidth : endX;
89
91
  });
90
92
  const externalIconList = cloneDeep(left.externalIconList || []).map((item) => ({
91
93
  ...item,
92
94
  isExternal: true
93
95
  }));
94
- const { projectNameMargin = [5, 30], titleWidth = 20 } = left;
96
+ const { projectNameMargin = [5, 30], titleWidth = 20, projectNameLineHeight = 10 } = left;
95
97
  let topY = endY + markHeight + extracorporealCirculationHeight - projectNameMargin[0];
96
98
  const leftX = titleWidth + projectNameMargin[1];
97
99
  const iconList = [];
98
100
  externalIconList.concat(list.reverse()).forEach((item) => {
99
- topY -= 10;
101
+ topY -= projectNameLineHeight;
100
102
  const title = item.title;
101
103
  const { text, icon } = drawTextAndIconGroup(title, item, {
102
104
  text: {
@@ -107,7 +109,7 @@ function useLeft(canvas, propItems, emits, pointTipProps, moveLimit, setPopup, u
107
109
  leftX,
108
110
  topY,
109
111
  originX: "center",
110
- ...item.isExternal ? { evented: false, selectable: false } : {},
112
+ ...item.isExternal && { evented: false, selectable: false },
111
113
  origin: {
112
114
  linkKey: item.linkKey,
113
115
  limitRight: item.limitRight
@@ -130,8 +132,15 @@ function useLeft(canvas, propItems, emits, pointTipProps, moveLimit, setPopup, u
130
132
  }
131
133
  });
132
134
  icon.linkPoints = linkPoints;
135
+ icons.add(icon);
133
136
  });
134
137
  }
138
+ function listener(params) {
139
+ const { limitRight, key } = params;
140
+ const icon = Array.from(icons).find((_icon) => _icon.origin.key === key);
141
+ icon && setLimitRight(icon, limitRight);
142
+ }
143
+ singlePointAddEventBus.on(listener);
135
144
  function setPointEvent(point) {
136
145
  point.on("moving", () => {
137
146
  point.set("originX", "center");
@@ -153,17 +162,17 @@ function useLeft(canvas, propItems, emits, pointTipProps, moveLimit, setPopup, u
153
162
  handleAddPrevent("repeat");
154
163
  } else {
155
164
  const params = {
156
- data: {
157
- time: getXValue(point.left),
158
- value: getYValue(point.origin.type, point.top),
159
- ...point.origin.linkKey ? { key: point.origin.key } : {}
160
- },
165
+ data: [
166
+ {
167
+ time: getXValue(point.left),
168
+ value: getYValue(point.origin.type, point.top),
169
+ ...point.origin.linkKey && { key: point.origin.key }
170
+ }
171
+ ],
161
172
  ...point.origin
162
173
  };
163
174
  const limitRight = point.left - xCellWidth;
164
- point.linkPoints.forEach((_point) => {
165
- _point.origin.limitRight = limitRight;
166
- });
175
+ setLimitRight(point, limitRight);
167
176
  emits("add", omit(params, ["limitRight"]));
168
177
  updateData({ ...params, key });
169
178
  }
@@ -172,6 +181,11 @@ function useLeft(canvas, propItems, emits, pointTipProps, moveLimit, setPopup, u
172
181
  setRestore(point);
173
182
  });
174
183
  }
184
+ function setLimitRight(point, limitRight) {
185
+ point.linkPoints.forEach((_point) => {
186
+ _point.origin.limitRight = limitRight;
187
+ });
188
+ }
175
189
  function setRestore(point) {
176
190
  point.setCoords().set({ originX: "left", left: point.originLeft, top: point.originTop });
177
191
  }
@@ -244,6 +258,9 @@ function useLeft(canvas, propItems, emits, pointTipProps, moveLimit, setPopup, u
244
258
  drawYScale();
245
259
  drawIcons();
246
260
  drawBorder();
261
+ onBeforeUnmount(() => {
262
+ singlePointAddEventBus.off(listener);
263
+ });
247
264
  }
248
265
 
249
266
  export { useLeft };
@@ -1,11 +1,12 @@
1
1
  import { Ref } from 'vue';
2
2
  import { fabric } from '../../../../../shared/utils/fabricjs';
3
- import { IPointTipProps, IPointMenuProps } from '../../../../../components/fabric-chart/src/interface';
3
+ import { IPointTipProps, IPointMenuProps, PopupMenuItem, ICoordinateValue } from '../../../../../components/fabric-chart/src/interface';
4
4
  import { AnyObject } from '../../../../../shared/types';
5
5
  export declare function useOther(canvas: Ref<fabric.Canvas>, propItems: AnyObject, emits: Function, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps, moveLimit: Function, getContainPoints: Function, showDialog: Function, removeCurrentSelection: Function): {
6
- clickMenu: ({ item, target }: {
7
- item: AnyObject;
6
+ clickMenu: ({ item, target, pointer }: {
7
+ item: PopupMenuItem;
8
8
  target: any;
9
+ pointer: ICoordinateValue;
9
10
  }) => void;
10
11
  handleKeydown: (evt: KeyboardEvent) => void;
11
12
  };
@@ -15,7 +15,7 @@ import './useTop.js';
15
15
  import '@vueuse/core';
16
16
  import '../../../../../shared/utils/index.js';
17
17
 
18
- const NEW_OTHER_MENU = filter(OTHER_MENU, (o) => o.type !== "add");
18
+ const NEW_OTHER_MENU = filter(OTHER_MENU, (o) => o.key !== "add");
19
19
  function useOther(canvas, propItems, emits, pointTipProps, pointMenuProps, moveLimit, getContainPoints, showDialog, removeCurrentSelection) {
20
20
  const { computedX, getXValue } = useBirthProcessCumputedPoint(propItems);
21
21
  const { getEqualXTypes, handleAddPrevent, isGridLimit, getPointEventProps } = useCommon(canvas, emits, propItems);
@@ -216,14 +216,14 @@ function useOther(canvas, propItems, emits, pointTipProps, pointMenuProps, moveL
216
216
  });
217
217
  canvas.value.add(...gridPointsMap.get(key));
218
218
  }
219
- function clickMenu({ item, target }) {
219
+ function clickMenu({ item, target, pointer }) {
220
220
  if (!target)
221
221
  return;
222
- const { type, _type } = item;
222
+ const { key, _type } = item;
223
223
  const params = { ...target.origin, type: _type };
224
- emits(type, params);
225
- if (type === "remove") {
226
- updateData(params, type);
224
+ emits(key, params);
225
+ if (key === "remove") {
226
+ updateData(params, key);
227
227
  }
228
228
  }
229
229
  function updateData(params, mode = "add") {
@@ -295,11 +295,14 @@ function useOther(canvas, propItems, emits, pointTipProps, pointMenuProps, moveL
295
295
  const _endY = endY + extracorporealCirculationHeight;
296
296
  let prevLeft = 0;
297
297
  const pointerObj = {};
298
+ const xList = [];
298
299
  dataList.forEach((markItem, dataIndex) => {
299
300
  const { time, list = [] } = markItem;
300
301
  const x = computedX(time);
301
302
  if (!isLimitX(x))
302
303
  return;
304
+ pointerObj[`x_${x}`] = [];
305
+ pointerObj[`originx_${x}`] = [];
303
306
  let startTop = _endY + 1;
304
307
  list.forEach((item, index) => {
305
308
  var _a;
@@ -327,8 +330,12 @@ function useOther(canvas, propItems, emits, pointTipProps, pointMenuProps, moveL
327
330
  }
328
331
  const { topObj, startTop: _startTop, oldStartTop } = computedTop(startTop, pointHeight);
329
332
  startTop = _startTop;
330
- if (!pointerObj[`x_${x}`])
331
- pointerObj[`x_${x}`] = [];
333
+ xList.forEach((_x) => {
334
+ if (x - _x < xCellWidth) {
335
+ pointerObj[`x_${x}`].push(...pointerObj[`originx_${_x}`]);
336
+ }
337
+ });
338
+ pointerObj[`originx_${x}`].push([oldStartTop, startTop]);
332
339
  pointerObj[`x_${x}`].push([oldStartTop, startTop]);
333
340
  point.set("top", topObj.y2);
334
341
  gridPointsMap.get(key).push(point);
@@ -336,6 +343,7 @@ function useOther(canvas, propItems, emits, pointTipProps, pointMenuProps, moveL
336
343
  canvas.value.add(point);
337
344
  });
338
345
  prevLeft = x;
346
+ xList.push(x);
339
347
  });
340
348
  function computedTop(startTop, lineHeight) {
341
349
  const topObj = {};
@@ -368,7 +376,7 @@ function useOther(canvas, propItems, emits, pointTipProps, pointMenuProps, moveL
368
376
  return (_b = (_a = point.origin) == null ? void 0 : _a.data) == null ? void 0 : _b.isStart;
369
377
  };
370
378
  const startPoint = __arr.find((point) => isStart(point));
371
- const firstPoint = __arr.find((point) => !isStart(point) && point.left > startPoint.left);
379
+ const firstPoint = __arr.find((point) => !isStart(point) && point.left > (startPoint == null ? void 0 : startPoint.left));
372
380
  const otherPoints = __arr.filter((point) => !isStart(point));
373
381
  __arr.forEach((point) => {
374
382
  const limitX = {
@@ -376,10 +384,10 @@ function useOther(canvas, propItems, emits, pointTipProps, pointMenuProps, moveL
376
384
  x2: endX
377
385
  };
378
386
  if (isStart(point)) {
379
- limitX.x2 = firstPoint.left;
387
+ limitX.x2 = firstPoint == null ? void 0 : firstPoint.left;
380
388
  point.otherPoints = otherPoints;
381
389
  } else {
382
- limitX.x1 = startPoint.left;
390
+ limitX.x1 = startPoint == null ? void 0 : startPoint.left;
383
391
  point.startPoint = startPoint;
384
392
  }
385
393
  point.limitX = limitX;
@@ -439,7 +447,6 @@ function useOther(canvas, propItems, emits, pointTipProps, pointMenuProps, moveL
439
447
  pointMenuProps.list = NEW_OTHER_MENU.map((item) => {
440
448
  return {
441
449
  ...item,
442
- renderItem: () => item.label,
443
450
  _type: "other"
444
451
  };
445
452
  });
@@ -541,8 +548,8 @@ function useOther(canvas, propItems, emits, pointTipProps, pointMenuProps, moveL
541
548
  point.otherPoints.forEach((_point) => {
542
549
  _point.limitX.x1 = point.left;
543
550
  });
544
- } else {
545
- const otherPointsLeft = point.startPoint.otherPoints.map((_point) => _point.left);
551
+ } else if (point.startPoint) {
552
+ const otherPointsLeft = point.startPoint.otherPoints.map((_point) => _point.left) || [];
546
553
  const minLeft = Math.min(...otherPointsLeft);
547
554
  point.startPoint.limitX.x2 = minLeft;
548
555
  }
@@ -1,10 +1,10 @@
1
- import { reactive, ref, computed, unref, onMounted, nextTick, onBeforeUnmount, watch, toRefs } from 'vue';
1
+ import { reactive, ref, onMounted, nextTick, onBeforeUnmount, watch, toRefs } from 'vue';
2
2
  import { useDialog } from 'naive-ui';
3
3
  import { defaultBorderStyle } from '../useDraw.js';
4
4
  import '../../../../../shared/utils/fabricjs/index.js';
5
5
  import { format } from 'date-fns';
6
6
  import { getChildrenSize } from '../../utils/index.js';
7
- import { cloneDeep, range, flatten, isFunction } from 'lodash-es';
7
+ import { isFunction, cloneDeep, range, flatten } from 'lodash-es';
8
8
  import '../useEvent.js';
9
9
  import '../useShadow.js';
10
10
  import '../useCommon.js';
@@ -29,229 +29,173 @@ function useSurgicalAnesthesiaChart(canvas, props, emits, canvasRef, pointTipPro
29
29
  const pauseFlickerPoint = ref();
30
30
  let timeout = null;
31
31
  const oldChildrenSize = getChildrenSize(((_a = props.data.top) == null ? void 0 : _a.treeData) || []);
32
- const layout = computed(
33
- () => props.data.layout || {
32
+ function buildDerived() {
33
+ var _a2, _b, _c, _d, _e, _f;
34
+ const layout = props.data.layout || {
34
35
  top: "drug",
35
36
  center: "xAxis",
36
37
  bottom: "intraoperatively"
37
- }
38
- );
39
- const originX = computed(() => {
40
- var _a2;
41
- return (_a2 = props.data.left.width) != null ? _a2 : 0;
42
- });
43
- const gridXNumber = computed(() => {
44
- const { grid } = props.data;
45
- return grid.mainXCell * grid.subXCell;
46
- });
47
- const gridYNumber = computed(() => {
38
+ };
39
+ const originX = (_a2 = props.data.left.width) != null ? _a2 : 0;
48
40
  const { grid } = props.data;
49
- return grid.mainYCell * grid.subYCell;
50
- });
51
- const topGridYNumber = computed(() => {
41
+ const gridXNumber = grid.mainXCell * grid.subXCell;
42
+ const gridYNumber = grid.mainYCell * grid.subYCell;
52
43
  const { show = true, tree = {} } = props.data.top;
53
- if (!show)
54
- return 0;
55
44
  const { rowNumber = oldChildrenSize } = tree;
56
- if (oldChildrenSize < rowNumber) {
57
- return rowNumber;
58
- }
59
- return oldChildrenSize;
60
- });
61
- const topGridYCellHeight = computed(() => props.data.top.tree.cellHeight);
62
- const topGridHeight = computed(() => topGridYCellHeight.value * topGridYNumber.value);
63
- const topGridOriginY = computed(() => {
64
- const currentLayout = getLayout("drug") || "top";
65
- return getOriginTop(currentLayout);
66
- });
67
- const topGridEndY = computed(() => topGridOriginY.value + topGridHeight.value);
68
- const startTime = computed(
69
- () => {
70
- var _a2;
71
- return Date.parse(((_a2 = props.data.xAxis) == null ? void 0 : _a2.startTime) || format(new Date(), "yyyy-MM-dd HH:mm:ss"));
72
- }
73
- );
74
- const xAxis = computed(() => {
45
+ const topGridYNumber = !show ? 0 : oldChildrenSize < rowNumber ? rowNumber : oldChildrenSize;
46
+ const topGridYCellHeight = props.data.top.tree.cellHeight;
47
+ const topGridHeight = topGridYCellHeight * topGridYNumber;
48
+ const startTime = Date.parse(((_b = props.data.xAxis) == null ? void 0 : _b.startTime) || format(new Date(), "yyyy-MM-dd HH:mm:ss"));
75
49
  const cloneXAxis = cloneDeep(props.data.xAxis);
76
50
  const { spaceValue, spaceTimeStamp } = cloneXAxis;
77
- const list = range(gridXNumber.value / spaceValue + 1).map(
78
- (n) => n === 0 ? cloneXAxis.startTime : format(new Date(startTime.value + n * spaceValue * spaceTimeStamp), "yyyy-MM-dd HH:mm:ss")
51
+ const list = range(gridXNumber / spaceValue + 1).map(
52
+ (n) => n === 0 ? cloneXAxis.startTime : format(new Date(startTime + n * spaceValue * spaceTimeStamp), "yyyy-MM-dd HH:mm:ss")
79
53
  );
80
- return {
54
+ const xAxis = {
81
55
  ...cloneXAxis,
82
56
  list,
83
- left: originX.value
57
+ left: originX
84
58
  };
85
- });
86
- const treeData = getTreeData();
87
- const originYXAxis = computed(() => {
88
- const currentLayout = getLayout("xAxis") || "center";
89
- return getOriginTop(currentLayout);
90
- });
91
- const endX = computed(() => {
92
- var _a2;
93
- const { width, right } = props.data;
94
- if (!right)
95
- return width;
96
- const endWidth = (_a2 = right.width) != null ? _a2 : 0;
97
- return width - endWidth;
98
- });
99
- const originY = computed(() => {
100
- const currentLayout = getLayout("intraoperatively") || "bottom";
101
- return getOriginTop(currentLayout);
102
- });
103
- const extracorporealCirculationHeight = computed(() => {
104
- var _a2;
105
- const { show, height } = ((_a2 = props.data.other) == null ? void 0 : _a2.extracorporealCirculation) || {};
106
- if (!show || !height)
107
- return 0;
108
- return height;
109
- });
110
- const markHeight = computed(() => {
111
- var _a2;
112
- const { show, height } = ((_a2 = props.data.other) == null ? void 0 : _a2.mark) || {};
113
- if (!show || !height)
114
- return 0;
115
- return height;
116
- });
117
- const endY = computed(
118
- () => originY.value + (props.data.height - topGridHeight.value - xAxis.value.height - markHeight.value - extracorporealCirculationHeight.value)
119
- );
120
- const xCellWidth = computed(() => (endX.value - originX.value) / gridXNumber.value);
121
- const yCellHeight = computed(() => (endY.value - originY.value) / gridYNumber.value);
122
- const timeXCell = computed(() => xAxis.value.spaceTimeStamp / xCellWidth.value);
123
- const itemList = computed(() => {
124
- const { scaleValues } = props.data;
125
- return flatten(
126
- scaleValues.map((item) => {
127
- return item.dataList.filter((v) => v.show).map((v, dataIndex) => {
128
- return {
129
- ...v,
130
- bigType: item.type,
131
- unit: item.unit,
132
- dataIndex
133
- };
134
- });
135
- })
136
- );
137
- });
138
- const pulseYCell = computed(() => computedYCell("pulse"));
139
- const temperatureYCell = computed(() => computedYCell("temperature"));
140
- const event = computed(() => {
141
- var _a2;
142
- return ((_a2 = props.data.grid) == null ? void 0 : _a2.event) || { selectable: true, evented: true, hovered: true };
143
- });
144
- const propItems = reactive({
145
- canvasWidth: props.data.width,
146
- canvasHeight: props.data.height,
147
- borderStyle: { ...defaultBorderStyle, ...props.data.borderStyle },
148
- pointSelectionStyle: props.data.pointSelectionStyle || {},
149
- grid: props.data.grid,
150
- top: props.data.top,
151
- left: props.data.left,
152
- other: props.data.other,
153
- topGridYNumber: unref(topGridYNumber),
154
- topGridYCellHeight: unref(topGridYCellHeight),
155
- topGridOriginY: unref(topGridOriginY),
156
- topGridEndY: unref(topGridEndY),
157
- treeData,
158
- getTreeData,
159
- xAxis: unref(xAxis),
160
- originYXAxis: unref(originYXAxis),
161
- startTime: unref(startTime),
162
- timeXCell: unref(timeXCell),
163
- gridXNumber: unref(gridXNumber),
164
- gridYNumber: unref(gridYNumber),
165
- xCellWidth: unref(xCellWidth),
166
- yCellHeight: unref(yCellHeight),
167
- originX: unref(originX),
168
- endX: unref(endX),
169
- originY: unref(originY),
170
- endY: unref(endY),
171
- markHeight: unref(markHeight),
172
- extracorporealCirculationHeight: unref(extracorporealCirculationHeight),
173
- itemList: unref(itemList),
174
- scaleValues: props.data.scaleValues,
175
- pulseYCell: unref(pulseYCell),
176
- temperatureYCell: unref(temperatureYCell),
177
- event: unref(event),
178
- dialog,
179
- extraMenuConfig: props.data.extraMenuConfig || {}
180
- });
181
- function getLayout(moduleName) {
182
- let layoutName = "";
183
- Object.entries(layout.value).some(([key, value]) => {
184
- if (value === moduleName) {
185
- layoutName = key;
186
- return true;
187
- }
188
- return;
189
- });
190
- return layoutName;
191
- }
192
- function getLayoutHeight(layoutName) {
193
- const moduleName = layout.value[layoutName];
194
- const xAxisHeight = xAxis.value.height;
195
- switch (moduleName) {
196
- case "drug":
197
- return topGridHeight.value;
198
- case "xAxis":
199
- return xAxisHeight;
200
- default:
201
- return props.data.height - topGridHeight.value - xAxisHeight;
59
+ function getLayout(moduleName) {
60
+ let layoutName = "";
61
+ Object.entries(layout).some(([key, value]) => {
62
+ if (value === moduleName) {
63
+ layoutName = key;
64
+ return true;
65
+ }
66
+ return false;
67
+ });
68
+ return layoutName;
202
69
  }
203
- }
204
- function getOriginTop(layoutName) {
205
- switch (layoutName) {
206
- case "top":
207
- return 0;
208
- case "center":
209
- return getLayoutHeight("top");
210
- default:
211
- return getLayoutHeight("top") + getLayoutHeight("center");
70
+ function getLayoutHeight(layoutName) {
71
+ const moduleName = layout[layoutName];
72
+ const xAxisHeight = xAxis.height;
73
+ switch (moduleName) {
74
+ case "drug":
75
+ return topGridHeight;
76
+ case "xAxis":
77
+ return xAxisHeight;
78
+ default:
79
+ return props.data.height - topGridHeight - xAxisHeight;
80
+ }
212
81
  }
213
- }
214
- function getTreeData() {
215
- const { show = true, tree = {} } = props.data.top;
216
- if (!show)
217
- return [];
218
- const cloneData = cloneDeep(props.data.top.treeData);
219
- let levelRow = 0;
220
- const { cellWidth, cellHeight } = props.data.top.tree;
221
- const { rowNumber = oldChildrenSize } = tree;
222
- if (oldChildrenSize < rowNumber) {
223
- cloneData.push(...range(rowNumber - oldChildrenSize).map(() => ({})));
82
+ function getOriginTop(layoutName) {
83
+ switch (layoutName) {
84
+ case "top":
85
+ return 0;
86
+ case "center":
87
+ return getLayoutHeight("top");
88
+ default:
89
+ return getLayoutHeight("top") + getLayoutHeight("center");
90
+ }
224
91
  }
225
- transferTree(cloneData);
226
- function transferTree(treeData2, deep = 0) {
227
- treeData2.forEach((item) => {
228
- var _a2;
229
- const other = {
230
- top: levelRow * cellHeight + topGridOriginY.value,
231
- left: deep * cellWidth,
232
- width: cellWidth,
233
- height: cellHeight,
234
- uuid: uuidGenerator()
235
- };
236
- levelRow++;
237
- if ((_a2 = item.children) == null ? void 0 : _a2.length) {
238
- levelRow--;
239
- const childrenSize = getChildrenSize(item.children);
240
- other.height = childrenSize * cellHeight;
241
- transferTree(item.children, deep + 1);
242
- } else {
243
- other.width = originX.value - other.left;
244
- }
245
- Object.assign(item, other);
246
- });
92
+ const topGridOriginY = getOriginTop(getLayout("drug") || "top");
93
+ const topGridEndY = topGridOriginY + topGridHeight;
94
+ const originYXAxis = getOriginTop(getLayout("xAxis") || "center");
95
+ const { width, right } = props.data;
96
+ const endX = !right ? width : width - ((_c = right.width) != null ? _c : 0);
97
+ const originY = getOriginTop(getLayout("intraoperatively") || "bottom");
98
+ const { show: ecShow, height: ecHeight } = ((_d = props.data.other) == null ? void 0 : _d.extracorporealCirculation) || {};
99
+ const extracorporealCirculationHeight = !ecShow || !ecHeight ? 0 : ecHeight;
100
+ const { show: markShow, height: markH } = ((_e = props.data.other) == null ? void 0 : _e.mark) || {};
101
+ const markHeight = !markShow || !markH ? 0 : markH;
102
+ const endY = originY + (props.data.height - topGridHeight - xAxis.height - markHeight - extracorporealCirculationHeight);
103
+ const xCellWidth = (endX - originX) / gridXNumber;
104
+ const yCellHeight = (endY - originY) / gridYNumber;
105
+ const timeXCell = xAxis.spaceTimeStamp / xCellWidth;
106
+ const itemList = flatten(
107
+ props.data.scaleValues.map((item) => {
108
+ return item.dataList.filter((v) => v.show).map((v, dataIndex) => ({
109
+ ...v,
110
+ bigType: item.type,
111
+ unit: item.unit,
112
+ dataIndex
113
+ }));
114
+ })
115
+ );
116
+ function computedYCell(type) {
117
+ const { scaleValues } = props.data;
118
+ const item = scaleValues.find((v) => v.type === type);
119
+ return yCellHeight * (item.spaceGridNumber || 1) / (item.spaceValue || 1);
247
120
  }
248
- return cloneData;
249
- }
250
- function computedYCell(type) {
251
- const { scaleValues } = props.data;
252
- const item = scaleValues.find((v) => v.type === type);
253
- return yCellHeight.value * (item.spaceGridNumber || 1) / (item.spaceValue || 1);
121
+ const pulseYCell = computedYCell("pulse");
122
+ const temperatureYCell = computedYCell("temperature");
123
+ const event = ((_f = props.data.grid) == null ? void 0 : _f.event) || { selectable: true, evented: true, hovered: true };
124
+ const getTreeData = () => {
125
+ const { show: show2 = true, tree: tree2 = {} } = props.data.top;
126
+ if (!show2)
127
+ return [];
128
+ const cloneData = cloneDeep(props.data.top.treeData);
129
+ let levelRow = 0;
130
+ const { cellWidth, cellHeight } = props.data.top.tree;
131
+ const { rowNumber: rowNumber2 = oldChildrenSize } = tree2;
132
+ if (oldChildrenSize < rowNumber2) {
133
+ cloneData.push(...range(rowNumber2 - oldChildrenSize).map(() => ({})));
134
+ }
135
+ transferTree(cloneData);
136
+ function transferTree(treeData, deep = 0) {
137
+ treeData.forEach((item) => {
138
+ var _a3;
139
+ const other = {
140
+ top: levelRow * cellHeight + topGridOriginY,
141
+ left: deep * cellWidth,
142
+ width: cellWidth,
143
+ height: cellHeight,
144
+ uuid: uuidGenerator()
145
+ };
146
+ levelRow++;
147
+ if ((_a3 = item.children) == null ? void 0 : _a3.length) {
148
+ levelRow--;
149
+ const childrenSize = getChildrenSize(item.children);
150
+ other.height = childrenSize * cellHeight;
151
+ transferTree(item.children, deep + 1);
152
+ } else {
153
+ other.width = originX - other.left;
154
+ }
155
+ Object.assign(item, other);
156
+ });
157
+ }
158
+ return cloneData;
159
+ };
160
+ return {
161
+ canvasWidth: props.data.width,
162
+ canvasHeight: props.data.height,
163
+ borderStyle: { ...defaultBorderStyle, ...props.data.borderStyle },
164
+ pointSelectionStyle: props.data.pointSelectionStyle || {},
165
+ grid: props.data.grid,
166
+ top: props.data.top,
167
+ left: props.data.left,
168
+ other: props.data.other,
169
+ topGridYNumber,
170
+ topGridYCellHeight,
171
+ topGridOriginY,
172
+ topGridEndY,
173
+ treeData: getTreeData(),
174
+ getTreeData,
175
+ xAxis,
176
+ originYXAxis,
177
+ startTime,
178
+ timeXCell,
179
+ gridXNumber,
180
+ gridYNumber,
181
+ xCellWidth,
182
+ yCellHeight,
183
+ originX,
184
+ endX,
185
+ originY,
186
+ endY,
187
+ markHeight,
188
+ extracorporealCirculationHeight,
189
+ itemList,
190
+ scaleValues: props.data.scaleValues,
191
+ pulseYCell,
192
+ temperatureYCell,
193
+ event,
194
+ dialog,
195
+ extraMenuConfig: props.data.extraMenuConfig || {}
196
+ };
254
197
  }
198
+ const propItems = reactive(buildDerived());
255
199
  onMounted(async () => {
256
200
  await nextTick();
257
201
  const { redrawLinePoints: _redrawLinePoints, clickMenu: _clickTopMenu } = useTop(
@@ -1,11 +1,12 @@
1
1
  import { type Ref } from 'vue';
2
2
  import { fabric } from '../../../../../shared/utils/fabricjs';
3
3
  import { AnyObject } from '../../../../../shared/types';
4
- import { IPointTipProps, IPointMenuProps } from '../../../../../components/fabric-chart/src/interface';
4
+ import { IPointTipProps, IPointMenuProps, ICoordinateValue, PopupMenuItem } from '../../../../../components/fabric-chart/src/interface';
5
5
  export declare function useTop(canvas: Ref<fabric.Canvas>, propItems: AnyObject, emits: Function, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps): {
6
6
  redrawLinePoints: () => void;
7
- clickMenu: ({ item, target }: {
8
- item: AnyObject;
7
+ clickMenu: ({ item, target, pointer }: {
8
+ item: PopupMenuItem;
9
9
  target: any;
10
+ pointer: ICoordinateValue;
10
11
  }) => void;
11
12
  };