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,7 +1,8 @@
1
1
  import { fabric } from '../../../../../shared/utils/fabricjs/index.js';
2
2
  import { drawLine, defaultStyle } from '../useDraw.js';
3
- import { parse, isBefore, addDays, getDate } from 'date-fns';
3
+ import { parse } from 'date-fns';
4
4
  import { last, cloneDeep } from 'lodash-es';
5
+ import '../../utils/eventBus.js';
5
6
  import '../useEvent.js';
6
7
  import '../useShadow.js';
7
8
  import '../useCommon.js';
@@ -25,28 +26,30 @@ function useOther(canvas, propItems, emits, computedX, computedY, fixedNoRisePoi
25
26
  };
26
27
  const _yCellHeight = getYCellHeight();
27
28
  let textDiff = 0;
28
- function handleCrossDayLayout(currentTime, itemLeft, lastLeft, eventList) {
29
- const newLeft = itemLeft + xCellWidth;
29
+ function handleCrossDayLayout(currentTime, lastLeft, eventList) {
30
+ const newLeft = lastLeft + xCellWidth;
30
31
  const nextTime = getXValue(newLeft);
31
- if (isCrossDay(currentTime, nextTime)) {
32
+ if (!(other == null ? void 0 : other.allowCrossDay) && isCrossDay(currentTime, nextTime)) {
32
33
  adjustEventsForCrossDay(eventList);
33
- return itemLeft;
34
+ return lastLeft;
34
35
  } else {
35
36
  return lastLeft + xCellWidth;
36
37
  }
37
38
  }
38
39
  function adjustEventsForCrossDay(eventList) {
40
+ var _a, _b;
39
41
  const currentColumnEvents = [...eventList];
40
42
  const sortedEvents = currentColumnEvents.sort((a, b) => (b.trueLeft || 0) - (a.trueLeft || 0));
41
43
  for (let i = 0; i < sortedEvents.length; i++) {
42
44
  const event = sortedEvents[i];
43
45
  const nextEvent = sortedEvents[i + 1];
44
- const prevLeft = event.trueLeft - xCellWidth;
46
+ const currentLeft = (_a = event.trueLeft) != null ? _a : 0;
47
+ const prevLeft = currentLeft - xCellWidth;
45
48
  if (prevLeft >= originX) {
46
49
  event.set("left", prevLeft);
47
50
  event.trueLeft = prevLeft;
48
51
  }
49
- if (nextEvent && (event.trueLeft || 0) - (nextEvent.trueLeft || 0) > xCellWidth + 1) {
52
+ if (nextEvent && currentLeft - ((_b = nextEvent.trueLeft) != null ? _b : 0) > xCellWidth + 1) {
50
53
  break;
51
54
  }
52
55
  }
@@ -96,7 +99,7 @@ function useOther(canvas, propItems, emits, computedX, computedY, fixedNoRisePoi
96
99
  item.vertical.forEach((v, i) => {
97
100
  var _a2, _b2, _c, _d, _e;
98
101
  const baseTop = (v.baseTop || 0) * yCellHeight;
99
- const lastLeft = ((_a2 = last(list)) == null ? void 0 : _a2.left) || 0;
102
+ const lastLeft = ((_a2 = last(list)) == null ? void 0 : _a2.trueLeft) || 0;
100
103
  if (i === 0 && item.left <= lastLeft) {
101
104
  leftX = lastLeft + xCellWidth;
102
105
  }
@@ -124,9 +127,9 @@ function useOther(canvas, propItems, emits, computedX, computedY, fixedNoRisePoi
124
127
  var _a2, _b2;
125
128
  const topY2 = vitalSignsOriginY.originY + (v.baseTop || 0) * yCellHeight;
126
129
  fixedTopY = fixedTop;
127
- const lastLeft = ((_a2 = last(list)) == null ? void 0 : _a2.left) || 0;
130
+ const lastLeft = ((_a2 = last(list)) == null ? void 0 : _a2.trueLeft) || 0;
128
131
  if (item.left <= lastLeft + 0.1) {
129
- leftX = handleCrossDayLayout(v.time, item.left, lastLeft, list);
132
+ leftX = handleCrossDayLayout(v.time, lastLeft, list);
130
133
  }
131
134
  if (String(v.value).length) {
132
135
  list.push(drawEventText(v, leftX, topY2));
@@ -223,10 +226,9 @@ function useOther(canvas, propItems, emits, computedX, computedY, fixedNoRisePoi
223
226
  function isCrossDay(dateStr1, dateStr2) {
224
227
  const date1 = parse(dateStr1, "yyyy-MM-dd HH:mm", new Date());
225
228
  const date2 = parse(dateStr2, "yyyy-MM-dd HH:mm", new Date());
226
- const earlierDate = isBefore(date1, date2) ? date1 : date2;
227
- const laterDate = isBefore(date1, date2) ? date2 : date1;
228
- const earlierDatePlusOneDay = addDays(earlierDate, 1);
229
- return getDate(earlierDatePlusOneDay) === getDate(laterDate);
229
+ const date1String = `${date1.getFullYear()}-${date1.getMonth()}-${date1.getDate()}`;
230
+ const date2String = `${date2.getFullYear()}-${date2.getMonth()}-${date2.getDate()}`;
231
+ return date1String !== date2String;
230
232
  }
231
233
 
232
234
  export { useOther };
@@ -1,4 +1,4 @@
1
- import { reactive, computed, watch, toRefs } from 'vue';
1
+ import { reactive, watch, toRefs } from 'vue';
2
2
  import { defaultBorderStyle } from '../useDraw.js';
3
3
  import '../../../../../shared/utils/fabricjs/index.js';
4
4
  import { useCumputedPoint } from '../useCumputedPoint.js';
@@ -8,10 +8,10 @@ import '../useCommon.js';
8
8
  import { setOtherType, isOneLine, getFloorNumber } from '../../utils/index.js';
9
9
  import { flatten } from 'lodash-es';
10
10
  import { format, addDays } from 'date-fns';
11
+ import '../../constants/index.js';
11
12
  import 'naive-ui';
12
13
  import '../surgicalAnesthesia/useTop.js';
13
14
  import '@vueuse/core';
14
- import '../../constants/index.js';
15
15
  import '../surgicalAnesthesia/useOther.js';
16
16
  import '../../../../../shared/utils/index.js';
17
17
  import { useTop } from './useTop.js';
@@ -28,284 +28,206 @@ function useTemperatureChart(canvas, props, emits, canvasRef, pointTipProps, poi
28
28
  redrawPoints: null,
29
29
  clickMenu: null
30
30
  });
31
- const painSurplusCell = computed(() => {
32
- const { painSurplusCell: painSurplusCell2 = [0, 0] } = props.data.grid || {};
33
- if (!~painIndex.value)
34
- return [0, 0];
35
- return painSurplusCell2;
36
- });
37
- const surplusCell = computed(() => {
38
- var _a, _b;
39
- const surplusCell2 = ((_b = (_a = props.data.grid) == null ? void 0 : _a.surplusCell) == null ? void 0 : _b.slice()) || [0, 0, 0, 0];
40
- if (painIndex.value === 0) {
41
- surplusCell2[0] = surplusCell2[0] + painSurplusCell.value[1];
42
- } else if (painIndex.value > 0) {
43
- surplusCell2[2] = surplusCell2[2] + painSurplusCell.value[0];
44
- }
45
- return surplusCell2;
46
- });
47
- const mainSurplusCell = computed(() => {
48
- if (painIndex.value === 0) {
49
- return [painSurplusCell.value[0], surplusCell.value[1], surplusCell.value[2], surplusCell.value[3]];
50
- } else if (painIndex.value > 0) {
51
- return [surplusCell.value[0], surplusCell.value[1], painSurplusCell.value[1], surplusCell.value[3]];
52
- }
53
- return surplusCell.value;
54
- });
55
- const dateHeight = computed(() => {
56
- const { top } = props.data;
57
- return top.date.show && (top.date.height || defaultHeight) || 0;
58
- });
59
- const hospitalDaysHeight = computed(() => {
60
- var _a;
61
- const { top } = props.data;
62
- return ((_a = top.hospitalDays) == null ? void 0 : _a.show) && (top.hospitalDays.height || defaultHeight) || 0;
63
- });
64
- const operationDaysHeight = computed(() => {
65
- var _a;
66
- const { top } = props.data;
67
- return ((_a = top.operationDays) == null ? void 0 : _a.show) && (top.operationDays.height || defaultHeight) || 0;
68
- });
69
- const xScalevalueHeight = computed(() => {
70
- var _a, _b, _c;
71
- const { top } = props.data;
72
- const height = ((_a = top.xScalevalue) == null ? void 0 : _a.show) && (top.xScalevalue.height || defaultHeight) || 0;
73
- const dayHeight = ((_b = top.xScalevalue) == null ? void 0 : _b.show) ? (_c = top.dayHeight) != null ? _c : 0 : 0;
74
- return height + dayHeight;
75
- });
76
- const childbirthDaysHeight = computed(() => {
77
- var _a;
78
- const { top } = props.data;
79
- return ((_a = top.childbirthDays) == null ? void 0 : _a.show) && (top.childbirthDays.height || defaultHeight) || 0;
80
- });
81
- const breathingHeight = computed(() => {
82
- var _a;
83
- const { bottom } = props.data;
84
- return ((_a = bottom == null ? void 0 : bottom.breathing) == null ? void 0 : _a.show) && (bottom.breathing.height || defaultHeight * 2) || 0;
85
- });
86
- const gridXNumber = computed(() => {
87
- const { grid } = props.data;
88
- return grid.mainXCell * grid.subXCell + surplusCell.value[1] + surplusCell.value[3];
89
- });
90
- const gridYNumber = computed(() => {
91
- const { mainYCell, subYCell, painSubYCell = 5 } = props.data.grid;
92
- const painSurplusCellNumber = painIndex.value > 0 ? painSurplusCell.value[1] : painSurplusCell.value[0];
93
- return (mainYCell - 1) * subYCell + painSubYCell + surplusCell.value[0] + surplusCell.value[2] + painSurplusCellNumber;
94
- });
95
- const endX = computed(() => {
96
- var _a;
97
- const { width, right = null, top } = props.data;
98
- if (!right)
99
- return width;
100
- const endWidth = (_a = right.width) != null ? _a : 0;
101
- return width - endWidth;
102
- });
103
- const endXLimit = computed(() => {
104
- return endX.value - surplusCell.value[1] * xCellWidth.value;
105
- });
106
- const originX = computed(() => {
107
- const { top, left } = props.data;
108
- const originX2 = top.titleWidth + iconsWidth.value;
109
- return originX2;
110
- });
111
- const endY = computed(() => {
112
- const { bottom = null, height } = props.data;
113
- if (!bottom)
114
- return height;
115
- const endHeight = bottom.height || 30;
116
- return height - endHeight;
117
- });
118
- const originY = computed(() => {
119
- var _a;
120
- const { top } = props.data;
121
- const dayHeight = top.xScalevalue.show && ((_a = top.dayHeight) != null ? _a : 0) || 0;
122
- const xScaleHeight = top.xScalevalue.show && (top.xScalevalue.height || defaultHeight) || 0;
123
- const topHeight = dateHeight.value + dayHeight + xScaleHeight + hospitalDaysHeight.value + operationDaysHeight.value + childbirthDaysHeight.value;
124
- return topHeight;
125
- });
126
- const xCellWidth = computed(() => {
127
- return (endX.value - originX.value) / gridXNumber.value;
128
- });
129
- const yCellHeight = computed(() => {
130
- return (endY.value - originY.value) / gridYNumber.value;
131
- });
132
- const iconsWidth = computed(() => {
133
- var _a, _b;
134
- const { left } = props.data;
135
- return ((_a = left.icons) == null ? void 0 : _a.show) && (((_b = left.icons) == null ? void 0 : _b.width) || 100) || 0;
136
- });
137
- const xScaleList = computed(() => {
138
- var _a, _b;
139
- const { top, grid } = props.data;
140
- const dateList = ((_b = (_a = top.date.list) == null ? void 0 : _a.slice) == null ? void 0 : _b.call(_a, 0, grid.mainXCell)) || [];
141
- const times = top.xScalevalue.times;
142
- let left = originX.value - xCellWidth.value;
143
- const startDate = top.date.startDate || format(new Date(), "yyyy-MM-dd");
144
- const newDateList = dateList.reduce(
145
- (arr, item, index) => index === 0 ? arr.concat(startDate) : arr.concat(format(addDays(new Date(startDate.replace(/-/g, "/")), index), "yyyy-MM-dd")),
146
- []
147
- );
148
- const timeList = newDateList.map((item) => {
149
- return times.map((v) => {
150
- left += xCellWidth.value;
151
- const start = Date.parse(`${item} ${v.start}`);
152
- const end = Date.parse(`${item} ${v.end}`);
153
- return {
154
- start,
155
- end,
156
- left,
157
- center: left + xCellWidth.value / 2,
158
- scaleCell: (end - start) / xCellWidth.value
159
- };
160
- });
161
- });
162
- return flatten(timeList);
163
- });
164
- const event = computed(() => {
165
- var _a;
166
- return ((_a = props.data.grid) == null ? void 0 : _a.event) || { selectable: true, evented: true, hovered: true };
167
- });
168
- const itemList = computed(() => {
169
- const { left } = props.data;
170
- return flatten(
171
- left.yScaleValue.filter((v) => v.show).map((item) => {
172
- return item.dataList.filter((v) => v.show).map((v, dataIndex) => {
31
+ function buildDerived() {
32
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
33
+ const { grid, top, left, right, bottom } = props.data;
34
+ const iconsWidth = ((_a = left.icons) == null ? void 0 : _a.show) && (((_b = left.icons) == null ? void 0 : _b.width) || 100) || 0;
35
+ const dateHeight = top.date.show && (top.date.height || defaultHeight) || 0;
36
+ const hospitalDaysHeight = ((_c = top.hospitalDays) == null ? void 0 : _c.show) && (top.hospitalDays.height || defaultHeight) || 0;
37
+ const operationDaysHeight = ((_d = top.operationDays) == null ? void 0 : _d.show) && (top.operationDays.height || defaultHeight) || 0;
38
+ const xScaleHeight = ((_e = top.xScalevalue) == null ? void 0 : _e.show) && (top.xScalevalue.height || defaultHeight) || 0;
39
+ const dayHeight = ((_f = top.xScalevalue) == null ? void 0 : _f.show) ? (_g = top.dayHeight) != null ? _g : 0 : 0;
40
+ const xScalevalueHeight = xScaleHeight + dayHeight;
41
+ const childbirthDaysHeight = ((_h = top.childbirthDays) == null ? void 0 : _h.show) && (top.childbirthDays.height || defaultHeight) || 0;
42
+ const breathingHeight = ((_i = bottom == null ? void 0 : bottom.breathing) == null ? void 0 : _i.show) && (bottom.breathing.height || defaultHeight * 2) || 0;
43
+ const painIndex = (() => {
44
+ const index = left.yScaleValue.findIndex((v) => v.type === "pain");
45
+ return index > -1 && left.yScaleValue[index].show ? index : -1;
46
+ })();
47
+ const painSurplusCell = (() => {
48
+ const { painSurplusCell: painSurplusCell2 = [0, 0] } = grid || {};
49
+ if (!~painIndex)
50
+ return [0, 0];
51
+ return painSurplusCell2;
52
+ })();
53
+ const surplusCell = (() => {
54
+ var _a2;
55
+ const sc = ((_a2 = grid == null ? void 0 : grid.surplusCell) == null ? void 0 : _a2.slice()) || [0, 0, 0, 0];
56
+ if (painIndex === 0) {
57
+ sc[0] = sc[0] + painSurplusCell[1];
58
+ } else if (painIndex > 0) {
59
+ sc[2] = sc[2] + painSurplusCell[0];
60
+ }
61
+ return sc;
62
+ })();
63
+ const mainSurplusCell = (() => {
64
+ if (painIndex === 0) {
65
+ return [painSurplusCell[0], surplusCell[1], surplusCell[2], surplusCell[3]];
66
+ } else if (painIndex > 0) {
67
+ return [surplusCell[0], surplusCell[1], painSurplusCell[1], surplusCell[3]];
68
+ }
69
+ return surplusCell;
70
+ })();
71
+ const originX = top.titleWidth + iconsWidth;
72
+ const endX = !right ? props.data.width : props.data.width - ((_j = right.width) != null ? _j : 0);
73
+ const endXLimit = endX - surplusCell[1] * ((endX - originX) / (grid.mainXCell * grid.subXCell + surplusCell[1] + surplusCell[3]));
74
+ const endY = !bottom ? props.data.height : props.data.height - (bottom.height || 30);
75
+ const originY = dateHeight + dayHeight + xScaleHeight + hospitalDaysHeight + operationDaysHeight + childbirthDaysHeight;
76
+ const gridXNumber = grid.mainXCell * grid.subXCell + surplusCell[1] + surplusCell[3];
77
+ const { mainYCell, subYCell, painSubYCell = 5 } = grid;
78
+ const painSurplusCellNumber = painIndex > 0 ? painSurplusCell[1] : painSurplusCell[0];
79
+ const gridYNumber = (mainYCell - 1) * subYCell + painSubYCell + surplusCell[0] + surplusCell[2] + painSurplusCellNumber;
80
+ const xCellWidth = (endX - originX) / gridXNumber;
81
+ const yCellHeight = (endY - originY) / gridYNumber;
82
+ const xScaleList = (() => {
83
+ var _a2, _b2;
84
+ const dateList = ((_b2 = (_a2 = top.date.list) == null ? void 0 : _a2.slice) == null ? void 0 : _b2.call(_a2, 0, grid.mainXCell)) || [];
85
+ const times = top.xScalevalue.times;
86
+ let leftPos = originX - xCellWidth;
87
+ const startDate = top.date.startDate || format(new Date(), "yyyy-MM-dd");
88
+ const newDateList = dateList.reduce(
89
+ (arr, _item, index) => index === 0 ? arr.concat(startDate) : arr.concat(format(addDays(new Date(startDate.replace(/-/g, "/")), index), "yyyy-MM-dd")),
90
+ []
91
+ );
92
+ const timeList = newDateList.map((item) => {
93
+ return times.map((v) => {
94
+ leftPos += xCellWidth;
95
+ const start = Date.parse(`${item} ${v.start}`);
96
+ const end = Date.parse(`${item} ${v.end}`);
173
97
  return {
174
- ...v,
175
- bigType: setOtherType(v.key, item.type),
176
- unit: item.unit,
177
- dataIndex,
178
- isOneLine: isOneLine(item)
98
+ start,
99
+ end,
100
+ left: leftPos,
101
+ center: leftPos + xCellWidth / 2,
102
+ scaleCell: (end - start) / xCellWidth
179
103
  };
180
104
  });
181
- })
105
+ });
106
+ return flatten(timeList);
107
+ })();
108
+ const event = ((_k = props.data.grid) == null ? void 0 : _k.event) || { selectable: true, evented: true, hovered: true };
109
+ const itemList = flatten(
110
+ left.yScaleValue.filter((v) => v.show).map(
111
+ (item) => item.dataList.filter((v) => v.show).map((v, dataIndex) => ({
112
+ ...v,
113
+ bigType: setOtherType(v.key, item.type),
114
+ unit: item.unit,
115
+ dataIndex,
116
+ isOneLine: isOneLine(item)
117
+ }))
118
+ )
182
119
  );
183
- });
184
- const painScalePositionSurplusHeight = computed(() => {
185
- const { left } = props.data;
186
120
  const painItem = left.yScaleValue.find((v) => v.type === "pain");
187
- if (!painItem)
188
- return 0;
189
- const { numberVerticalPosition = "bottom", spaceGridNumber = 1 } = painItem;
190
- return numberVerticalPosition === "center" ? yCellHeight.value * spaceGridNumber / 2 : 0;
191
- });
192
- const painIndex = computed(() => {
193
- const { left } = props.data;
194
- const index = left.yScaleValue.findIndex((v) => v.type === "pain");
195
- return index > -1 && left.yScaleValue[index].show ? index : -1;
196
- });
197
- const painHeight = computed(() => {
198
- const { painSubYCell = 5 } = props.data.grid;
199
- return painIndex.value === -1 ? 0 : yCellHeight.value * painSubYCell;
200
- });
201
- const painBorderColor = computed(() => {
202
- const { left } = props.data;
203
- return (left.yScaleValue.find((v) => v.type === "pain") || {}).borderColor;
204
- });
205
- const painOriginY = computed(() => {
206
- const { left } = props.data;
207
- const obj = {
208
- originY: originY.value + painSurplusCell.value[0] * yCellHeight.value,
209
- endY: endY.value - painSurplusCell.value[1] * yCellHeight.value - painScalePositionSurplusHeight.value
210
- };
211
- if (painIndex.value === 0 && left.yScaleValue.length > 1) {
212
- obj.endY = obj.originY + painHeight.value - painScalePositionSurplusHeight.value;
213
- } else if (painIndex.value === left.yScaleValue.length - 1) {
214
- obj.originY = obj.endY - painHeight.value + painScalePositionSurplusHeight.value;
215
- }
216
- return obj;
217
- });
218
- const vitalSignsOriginY = computed(() => {
219
- const { left } = props.data;
220
- const obj = {
221
- originY: originY.value + surplusCell.value[0] * yCellHeight.value,
222
- endY: endY.value - surplusCell.value[2] * yCellHeight.value
223
- };
224
- if (painIndex.value === 0 && left.yScaleValue.length > 1) {
225
- obj.originY = painOriginY.value.endY + painScalePositionSurplusHeight.value + surplusCell.value[0] * yCellHeight.value;
226
- } else if (painIndex.value === left.yScaleValue.length - 1) {
227
- obj.endY = painOriginY.value.originY - surplusCell.value[2] * yCellHeight.value;
228
- }
229
- return obj;
230
- });
231
- const topList = computed(() => {
232
- var _a, _b;
233
- const { top, grid } = props.data;
234
- const topList2 = [];
235
- for (const i in top) {
236
- if (top[i].show) {
237
- topList2.push({
238
- ...top[i],
239
- list: ((_b = (_a = top[i].list) == null ? void 0 : _a.slice) == null ? void 0 : _b.call(_a, 0, grid.mainXCell)) || [],
240
- key: i
121
+ const painScalePositionSurplusHeight = (() => {
122
+ if (!painItem)
123
+ return 0;
124
+ const { numberVerticalPosition = "bottom", spaceGridNumber = 1 } = painItem;
125
+ return numberVerticalPosition === "center" ? yCellHeight * spaceGridNumber / 2 : 0;
126
+ })();
127
+ const painHeight = painIndex === -1 ? 0 : yCellHeight * ((_l = grid.painSubYCell) != null ? _l : 5);
128
+ const painBorderColor = (painItem || {}).borderColor;
129
+ const painOriginY = (() => {
130
+ const obj = {
131
+ originY: originY + painSurplusCell[0] * yCellHeight,
132
+ endY: endY - painSurplusCell[1] * yCellHeight - painScalePositionSurplusHeight
133
+ };
134
+ if (painIndex === 0 && left.yScaleValue.length > 1) {
135
+ obj.endY = obj.originY + painHeight - painScalePositionSurplusHeight;
136
+ } else if (painIndex === left.yScaleValue.length - 1) {
137
+ obj.originY = obj.endY - painHeight + painScalePositionSurplusHeight;
138
+ }
139
+ return obj;
140
+ })();
141
+ const vitalSignsOriginY = (() => {
142
+ const obj = {
143
+ originY: originY + surplusCell[0] * yCellHeight,
144
+ endY: endY - surplusCell[2] * yCellHeight
145
+ };
146
+ if (painIndex === 0 && left.yScaleValue.length > 1) {
147
+ obj.originY = painOriginY.endY + painScalePositionSurplusHeight + surplusCell[0] * yCellHeight;
148
+ } else if (painIndex === left.yScaleValue.length - 1) {
149
+ obj.endY = painOriginY.originY - surplusCell[2] * yCellHeight;
150
+ }
151
+ return obj;
152
+ })();
153
+ const topList = (() => {
154
+ var _a2, _b2;
155
+ const list = [];
156
+ for (const i in top) {
157
+ if (top[i].show) {
158
+ list.push({
159
+ ...top[i],
160
+ list: ((_b2 = (_a2 = top[i].list) == null ? void 0 : _a2.slice) == null ? void 0 : _b2.call(_a2, 0, grid.mainXCell)) || [],
161
+ key: i
162
+ });
163
+ }
164
+ }
165
+ return list.sort((a, b) => a.seq - b.seq);
166
+ })();
167
+ const getRightInfo = (() => {
168
+ var _a2;
169
+ const temperatureObj = left.yScaleValue.find((v) => v.type === "temperature");
170
+ const yScaleValue = (right == null ? void 0 : right.yScaleValue) ? { ...right.yScaleValue } : {};
171
+ if ((_a2 = temperatureObj == null ? void 0 : temperatureObj.list) == null ? void 0 : _a2.length) {
172
+ const detailedList = (yScaleValue == null ? void 0 : yScaleValue.showdetailedScale) ? temperatureObj.list.reduce((res) => {
173
+ const lastItem = res[res.length - 1];
174
+ return lastItem ? res.concat([lastItem + 1, lastItem + 2]) : res.concat([92]);
175
+ }, []) : [];
176
+ const list = temperatureObj.list.map((v) => getFloorNumber(1.8 * v + 32));
177
+ Object.assign(yScaleValue, {
178
+ list,
179
+ detailedList,
180
+ spaceGridNumber: temperatureObj.spaceGridNumber
241
181
  });
242
182
  }
243
- }
244
- return topList2.sort((a, b) => a.seq - b.seq);
245
- });
246
- const getRightInfo = computed(() => {
247
- var _a;
248
- const { left, right } = props.data;
249
- const temperatureObj = left.yScaleValue.find((v) => v.type === "temperature");
250
- const yScaleValue = (right == null ? void 0 : right.yScaleValue) || {};
251
- if ((_a = temperatureObj == null ? void 0 : temperatureObj.list) == null ? void 0 : _a.length) {
252
- const detailedList = (yScaleValue == null ? void 0 : yScaleValue.showdetailedScale) ? temperatureObj.list.reduce((res) => {
253
- const lastItem = res[res.length - 1];
254
- return lastItem ? res.concat([lastItem + 1, lastItem + 2]) : res.concat([92]);
255
- }, []) : [];
256
- const list = temperatureObj.list.map((v) => getFloorNumber(1.8 * v + 32));
257
- Object.assign(yScaleValue, {
258
- list,
259
- detailedList,
260
- spaceGridNumber: temperatureObj.spaceGridNumber
261
- });
262
- }
263
- return yScaleValue;
264
- });
265
- const propItems = reactive({
266
- canvasWidth: props.data.width,
267
- canvasHeight: props.data.height,
268
- borderStyle: { ...defaultBorderStyle, ...props.data.borderStyle || {} },
269
- selectionStyle: props.data.selectionStyle || {},
270
- dateHeight: dateHeight.value,
271
- hospitalDaysHeight: hospitalDaysHeight.value,
272
- operationDaysHeight: operationDaysHeight.value,
273
- xScalevalueHeight: xScalevalueHeight.value,
274
- childbirthDaysHeight: childbirthDaysHeight.value,
275
- topList: topList.value,
276
- breathingHeight: breathingHeight.value,
277
- hospitalizationDate: props.data.hospitalizationDate,
278
- grid: props.data.grid,
279
- top: props.data.top,
280
- left: props.data.left,
281
- right: props.data.right,
282
- bottom: props.data.bottom,
283
- other: props.data.other,
284
- painIndex: painIndex.value,
285
- painHeight: painHeight.value,
286
- painOriginY: painOriginY.value,
287
- vitalSignsOriginY: vitalSignsOriginY.value,
288
- gridXNumber: gridXNumber.value,
289
- gridYNumber: gridYNumber.value,
290
- iconsWidth: iconsWidth.value,
291
- originX: originX.value,
292
- originY: originY.value,
293
- endX: endX.value,
294
- endXLimit: endXLimit.value,
295
- endY: endY.value,
296
- xCellWidth: xCellWidth.value,
297
- yCellHeight: yCellHeight.value,
298
- xScaleList: xScaleList.value,
299
- event: event.value,
300
- itemList: itemList.value,
301
- getRightInfo: getRightInfo.value,
302
- config: props.data.config || {},
303
- surplusCell: surplusCell.value,
304
- painSurplusCell: painSurplusCell.value,
305
- mainSurplusCell: mainSurplusCell.value,
306
- painScalePositionSurplusHeight: painScalePositionSurplusHeight.value,
307
- painBorderColor: painBorderColor.value
308
- });
183
+ return yScaleValue;
184
+ })();
185
+ return {
186
+ canvasWidth: props.data.width,
187
+ canvasHeight: props.data.height,
188
+ borderStyle: { ...defaultBorderStyle, ...props.data.borderStyle },
189
+ selectionStyle: props.data.selectionStyle || {},
190
+ dateHeight,
191
+ hospitalDaysHeight,
192
+ operationDaysHeight,
193
+ xScalevalueHeight,
194
+ childbirthDaysHeight,
195
+ topList,
196
+ breathingHeight,
197
+ hospitalizationDate: props.data.hospitalizationDate,
198
+ grid: props.data.grid,
199
+ top: props.data.top,
200
+ left: props.data.left,
201
+ right: props.data.right,
202
+ bottom: props.data.bottom,
203
+ other: props.data.other,
204
+ painIndex,
205
+ painHeight,
206
+ painOriginY,
207
+ vitalSignsOriginY,
208
+ gridXNumber,
209
+ gridYNumber,
210
+ iconsWidth,
211
+ originX,
212
+ originY,
213
+ endX,
214
+ endXLimit,
215
+ endY,
216
+ xCellWidth,
217
+ yCellHeight,
218
+ xScaleList,
219
+ event,
220
+ itemList,
221
+ getRightInfo,
222
+ config: props.data.config || {},
223
+ surplusCell,
224
+ painSurplusCell,
225
+ mainSurplusCell,
226
+ painScalePositionSurplusHeight,
227
+ painBorderColor
228
+ };
229
+ }
230
+ const propItems = reactive(buildDerived());
309
231
  const { computedX, computedY, getXValue, getYValue } = useCumputedPoint(propItems);
310
232
  watch(
311
233
  () => canvas.value,
@@ -2,6 +2,7 @@ import { fabric } from '../../../../../shared/utils/fabricjs/index.js';
2
2
  import { drawLine, defaultStyle, drawTextGroup, defaultTextStyle } from '../useDraw.js';
3
3
  import 'date-fns';
4
4
  import { flatten } from 'lodash-es';
5
+ import '../../utils/eventBus.js';
5
6
  import '../useEvent.js';
6
7
  import '../useShadow.js';
7
8
  import '../useCommon.js';
@@ -1,4 +1,4 @@
1
- import { type Ref } from 'vue';
1
+ import { type Ref, VNode } from 'vue';
2
2
  import { fabric } from '../../../shared/utils/fabricjs';
3
3
  import { AnyObject, AnyFn } from '../../../shared/types';
4
4
  export type IType = 'temperature' | 'birthProcess' | 'surgicalAnesthesia' | 'electrocardiogram' | 'newBirthProcess' | undefined;
@@ -95,6 +95,7 @@ interface IOther {
95
95
  highlightColor?: string;
96
96
  eventHighlight?: boolean;
97
97
  splitLineNumber?: number;
98
+ allowCrossDay?: boolean;
98
99
  list: Array<IPoint>;
99
100
  }
100
101
  export interface IDate {
@@ -197,4 +198,17 @@ export type IexposeMethods = Partial<{
197
198
  useRectRuler: AnyFn | null;
198
199
  redrawLinePoints: AnyFn | null;
199
200
  }>;
201
+ export type PopupMenuItem = {
202
+ label: string;
203
+ key: string;
204
+ value?: any;
205
+ _type?: 'tree' | 'other';
206
+ mode?: 'add' | 'remove';
207
+ origin?: AnyObject;
208
+ isTitle?: boolean;
209
+ hasInput?: boolean;
210
+ renderItem?: () => VNode;
211
+ children?: PopupMenuItem[];
212
+ [key: string]: any;
213
+ };
200
214
  export {};
@@ -0,0 +1,2 @@
1
+ import { AnyObject } from '../../../../shared/types';
2
+ export declare const singlePointAddEventBus: import("@vueuse/core").UseEventBusReturn<AnyObject, any>;
@@ -0,0 +1,5 @@
1
+ import { useEventBus } from '@vueuse/core';
2
+
3
+ const singlePointAddEventBus = useEventBus("single-point-add");
4
+
5
+ export { singlePointAddEventBus };