cnhis-design-vue 3.2.14-release.0 → 3.2.15-beta.10

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 (366) hide show
  1. package/README.md +87 -87
  2. package/es/components/ai-chat/index.d.ts +1 -0
  3. package/es/components/ai-chat/src/Index.vue.d.ts +1 -0
  4. package/es/components/ai-chat/src/components/ChatCard.js +1 -1
  5. package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +1 -0
  6. package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
  7. package/es/components/ai-chat/src/components/ChatMain.js +1 -1
  8. package/es/components/ai-chat/src/components/ChatPatient.vue2.js +1 -1
  9. package/es/components/ai-chat/src/components/ChatPrompt.vue2.js +1 -1
  10. package/es/components/ai-chat/style/index.css +1 -1
  11. package/es/components/audio-sdk/src/components/recording.vue2.js +1 -1
  12. package/es/components/base-search/index.d.ts +8 -3
  13. package/es/components/base-search/src/index.vue.d.ts +8 -3
  14. package/es/components/base-search/src/index.vue2.js +1 -1
  15. package/es/components/big-table/src/BigTable.vue2.js +1 -1
  16. package/es/components/big-table/src/components/NoData.vue2.js +1 -1
  17. package/es/components/big-table/src/components/edit-form/edit-date.js +1 -1
  18. package/es/components/big-table/src/components/edit-form/edit-input.js +1 -1
  19. package/es/components/big-table/src/components/edit-form/edit-select.js +1 -1
  20. package/es/components/big-table/src/components/edit-form/edit-time.js +1 -1
  21. package/es/components/big-table/src/components/input-button.vue2.js +1 -1
  22. package/es/components/big-table/src/hooks/useNestTable.js +1 -1
  23. package/es/components/big-table/src/hooks/useTableParse.js +1 -1
  24. package/es/components/body-select/src/index.vue2.js +1 -1
  25. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  26. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  27. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  28. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  29. package/es/components/branch-notice/index.d.ts +479 -0
  30. package/es/components/branch-notice/index.js +1 -0
  31. package/es/components/branch-notice/src/BranchNotice.vue.d.ts +433 -0
  32. package/es/components/branch-notice/src/BranchNotice.vue.js +1 -0
  33. package/es/components/branch-notice/src/BranchNotice.vue2.js +1 -0
  34. package/es/components/branch-notice/src/canstants.d.ts +8 -0
  35. package/es/components/branch-notice/src/canstants.js +1 -0
  36. package/es/components/branch-notice/src/components/NoticeItem.vue.d.ts +275 -0
  37. package/es/components/branch-notice/src/components/NoticeItem.vue.js +1 -0
  38. package/es/components/branch-notice/src/components/NoticeItem.vue2.js +1 -0
  39. package/es/components/branch-notice/src/components/NoticeItemAside.vue.d.ts +104 -0
  40. package/es/components/branch-notice/src/components/NoticeItemAside.vue.js +1 -0
  41. package/es/components/branch-notice/src/components/NoticeItemAside.vue2.js +1 -0
  42. package/es/components/branch-notice/src/components/NoticeOperationList.vue.d.ts +49 -0
  43. package/es/components/branch-notice/src/components/NoticeOperationList.vue.js +1 -0
  44. package/es/components/branch-notice/src/components/NoticeOperationList.vue2.js +1 -0
  45. package/es/components/branch-notice/src/drawLine.d.ts +2 -0
  46. package/es/components/branch-notice/src/drawLine.js +1 -0
  47. package/es/components/branch-notice/src/hooks/useTheme.d.ts +1 -0
  48. package/es/components/branch-notice/src/hooks/useTheme.js +1 -0
  49. package/es/components/branch-notice/src/types.d.ts +32 -0
  50. package/es/components/branch-notice/src/types.js +1 -0
  51. package/es/components/branch-notice/style/index.css +1 -0
  52. package/es/components/button-print/index.d.ts +4 -0
  53. package/es/components/button-print/src/ButtonPrint.vue.d.ts +4 -0
  54. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  55. package/es/components/button-print/src/components/EditFormat.vue2.js +1 -1
  56. package/es/components/button-print/src/components/IdentityVerification.vue2.js +1 -1
  57. package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +4 -0
  58. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  59. package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
  60. package/es/components/button-print/src/components/Preview.vue2.js +1 -1
  61. package/es/components/button-print/src/utils/dialog.js +1 -1
  62. package/es/components/button-print/src/utils/print.js +1 -1
  63. package/es/components/calendar/index.d.ts +4 -4
  64. package/es/components/calendar/src/Calendar.vue.d.ts +4 -4
  65. package/es/components/card-reader-sdk/src/components/readCardDialog.vue2.js +1 -1
  66. package/es/components/card-reader-sdk/src/utils/readHealthCard.js +1 -1
  67. package/es/components/classification/index.d.ts +1 -0
  68. package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
  69. package/es/components/classification/src/components/set-classification/index.vue2.js +1 -1
  70. package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
  71. package/es/components/classification/src/components/table-modal/index.vue2.js +1 -1
  72. package/es/components/classification/src/index.vue.d.ts +1 -0
  73. package/es/components/classification/src/index.vue2.js +1 -1
  74. package/es/components/classification/style/index.css +1 -1
  75. package/es/components/default-page/src/constants/index.js +1 -1
  76. package/es/components/default-page/src/index.vue2.js +1 -1
  77. package/es/components/expand-field/src/components/FormBatchOptionsModal.vue2.js +1 -1
  78. package/es/components/expand-field/src/components/FormItemPerson.vue2.js +1 -1
  79. package/es/components/expand-field/src/components/PersonModal.vue2.js +1 -1
  80. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  81. package/es/components/expand-field/src/index.vue2.js +1 -1
  82. package/es/components/expand-field/src/utils/constant.js +1 -1
  83. package/es/components/fabric-chart/index.d.ts +23 -4
  84. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +23 -4
  85. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
  86. package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
  87. package/es/components/fabric-chart/src/components/PopupTip.vue.d.ts +13 -0
  88. package/es/components/fabric-chart/src/components/PopupTip.vue2.js +1 -1
  89. package/es/components/fabric-chart/src/components/useStyle.js +1 -1
  90. package/es/components/fabric-chart/src/constants/index.d.ts +1 -1
  91. package/es/components/fabric-chart/src/constants/index.js +1 -1
  92. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  93. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.d.ts +1 -0
  94. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
  95. package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.js +1 -1
  96. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  97. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.d.ts +1 -0
  98. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  99. package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -1
  100. package/es/components/fabric-chart/src/hooks/index.d.ts +1 -0
  101. package/es/components/fabric-chart/src/hooks/index.js +1 -1
  102. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcess.js +1 -1
  103. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.js +1 -1
  104. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +1 -1
  105. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  106. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
  107. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
  108. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts +1 -0
  109. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  110. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.d.ts +7 -1
  111. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
  112. package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -1
  113. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  114. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  115. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
  116. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.d.ts +1 -0
  117. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  118. package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
  119. package/es/components/fabric-chart/src/hooks/useCommon.js +1 -1
  120. package/es/components/fabric-chart/src/hooks/useDraw.js +1 -1
  121. package/es/components/fabric-chart/src/hooks/{temperature/useShadow.d.ts → useShadow.d.ts} +2 -2
  122. package/es/components/fabric-chart/src/hooks/useShadow.js +1 -0
  123. package/es/components/fabric-chart/src/interface.d.ts +3 -0
  124. package/es/components/fabric-chart/src/utils/index.d.ts +2 -1
  125. package/es/components/fabric-chart/src/utils/index.js +1 -1
  126. package/es/components/field-set/src/FieldColor.vue.d.ts +7 -7
  127. package/es/components/field-set/src/FieldColor.vue2.js +1 -1
  128. package/es/components/field-set/src/FieldFilter.vue.d.ts +9 -8
  129. package/es/components/field-set/src/FieldFilter.vue2.js +1 -1
  130. package/es/components/field-set/src/FieldSet.vue.d.ts +7 -7
  131. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  132. package/es/components/field-set/src/Index.vue2.js +1 -1
  133. package/es/components/field-set/src/TableStyle.vue2.js +1 -1
  134. package/es/components/field-set/src/components/condition.vue2.js +1 -1
  135. package/es/components/field-set/src/components/edit-dialog.vue.d.ts +1 -1
  136. package/es/components/field-set/src/components/edit-dialog.vue2.js +1 -1
  137. package/es/components/field-set/src/components/edit-filter.vue2.js +1 -1
  138. package/es/components/field-set/src/components/table-row.vue.d.ts +6 -6
  139. package/es/components/field-set/src/components/table-row.vue2.js +1 -1
  140. package/es/components/field-set/src/constants/filter.d.ts +21 -12
  141. package/es/components/field-set/src/constants/filter.js +1 -1
  142. package/es/components/field-set/src/constants/index.js +1 -1
  143. package/es/components/field-set/src/types/index.d.ts +1 -1
  144. package/es/components/form-config/index.d.ts +108 -3
  145. package/es/components/form-config/src/FormConfig.vue.d.ts +108 -3
  146. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  147. package/es/components/form-config/src/components/FormConfigEventSetting.vue.js +1 -0
  148. package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -0
  149. package/es/components/form-config/src/constants/index.js +1 -1
  150. package/es/components/form-config/src/hooks/useLocale.js +1 -1
  151. package/es/components/form-render/index.js +1 -1
  152. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  153. package/es/components/form-render/src/components/renderer/combination/combination.js +1 -1
  154. package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js +1 -1
  155. package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +1 -1
  156. package/es/components/form-render/src/components/renderer/combination/tableCombination.js +1 -1
  157. package/es/components/form-render/src/components/renderer/complex.js +1 -1
  158. package/es/components/form-render/src/components/renderer/date.js +1 -1
  159. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  160. package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
  161. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  162. package/es/components/form-render/src/components/renderer/select.js +1 -1
  163. package/es/components/form-render/src/components/renderer/switch.js +1 -1
  164. package/es/components/form-render/src/components/renderer/text.js +1 -1
  165. package/es/components/form-render/src/components/renderer/textarea.js +1 -1
  166. package/es/components/form-render/src/hooks/useAnchor.js +1 -1
  167. package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
  168. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
  169. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  170. package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
  171. package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
  172. package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
  173. package/es/components/form-render/src/hooks/usePresetScope.d.ts +1 -1
  174. package/es/components/form-render/src/hooks/usePresetScope.js +1 -1
  175. package/es/components/form-render/src/utils/index.d.ts +1 -0
  176. package/es/components/form-render/src/utils/index.js +1 -1
  177. package/es/components/iho-chat/index.d.ts +885 -66
  178. package/es/components/iho-chat/src/Index.vue.d.ts +888 -73
  179. package/es/components/iho-chat/src/Index.vue2.js +1 -1
  180. package/es/components/iho-chat/src/api/index.d.ts +1 -0
  181. package/es/components/iho-chat/src/api/index.js +1 -1
  182. package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +33 -1
  183. package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
  184. package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +54 -3
  185. package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
  186. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +54 -2
  187. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  188. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +232 -13
  189. package/es/components/iho-chat/src/components/ChatHeader.vue2.js +1 -1
  190. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +86 -7
  191. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  192. package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +20 -1
  193. package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
  194. package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +44 -5
  195. package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
  196. package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +75 -5
  197. package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
  198. package/es/components/iho-chat/src/components/ContextMenu.d.ts +11 -2
  199. package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
  200. package/es/components/iho-chat/src/components/MessageTemplate.vue.d.ts +1 -1
  201. package/es/components/iho-chat/src/components/MessageTemplate.vue2.js +1 -1
  202. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +53 -2
  203. package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
  204. package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +21 -2
  205. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  206. package/es/components/iho-chat/src/components/SiderList.vue.d.ts +276 -5
  207. package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
  208. package/es/components/iho-chat/src/components/Video.vue.d.ts +20 -1
  209. package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
  210. package/es/components/iho-chat/src/components/userItemRender.d.ts +18 -0
  211. package/es/components/iho-chat/src/components/userItemRender.js +1 -0
  212. package/es/components/iho-chat/src/constants/index.d.ts +12 -3
  213. package/es/components/iho-chat/src/constants/index.js +1 -1
  214. package/es/components/iho-chat/src/hooks/index.d.ts +2 -2
  215. package/es/components/iho-chat/src/hooks/index.js +1 -1
  216. package/es/components/iho-chat/src/hooks/useData.d.ts +96 -0
  217. package/es/components/iho-chat/src/hooks/useData.js +1 -0
  218. package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -1
  219. package/es/components/iho-chat/src/hooks/useVideo.d.ts +20 -1
  220. package/es/components/iho-chat/src/hooks/useVideo.js +1 -1
  221. package/es/components/iho-chat/src/hooks/useWebSocket.d.ts +3 -0
  222. package/es/components/iho-chat/src/hooks/useWebSocket.js +1 -0
  223. package/es/components/iho-chat/src/types/index.d.ts +2 -6
  224. package/es/components/iho-chat/src/types/index.js +1 -1
  225. package/es/components/iho-chat/src/utils/chatSock.js +1 -1
  226. package/es/components/iho-chat/src/utils/index.d.ts +2 -0
  227. package/es/components/iho-chat/src/utils/index.js +1 -1
  228. package/es/components/iho-chat/style/index.css +1 -1
  229. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
  230. package/es/components/iho-table/src/plugins/dynamicFilterRenderPlugin/dynamicFilter.vue2.js +1 -1
  231. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
  232. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  233. package/es/components/iho-table/src/plugins/filterTextPlugin/filter.vue2.js +1 -1
  234. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
  235. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  236. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  237. package/es/components/iho-table/src/utils/index.js +1 -1
  238. package/es/components/index.css +1 -1
  239. package/es/components/index.d.ts +2 -1
  240. package/es/components/index.js +1 -1
  241. package/es/components/info-header/src/components/patientInfo/index.vue2.js +1 -1
  242. package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
  243. package/es/components/keyboard/src/components/NumberPanel.vue2.js +1 -1
  244. package/es/components/map/src/Map.vue2.js +1 -1
  245. package/es/components/picture-clipper/src/PictureClipper.vue2.js +1 -1
  246. package/es/components/quick-search/index.d.ts +3 -1
  247. package/es/components/quick-search/src/index.vue.d.ts +3 -1
  248. package/es/components/quick-search/src/index.vue2.js +1 -1
  249. package/es/components/quick-search/style/index.css +1 -1
  250. package/es/components/recommend-search/src/components/BaseSearch.js +1 -1
  251. package/es/components/recommend-search/src/components/RecommendInput.vue2.js +1 -1
  252. package/es/components/recommend-search/src/components/RecommendSelect.vue2.js +1 -1
  253. package/es/components/scale-view/index.d.ts +31 -0
  254. package/es/components/scale-view/src/ScaleView.vue.d.ts +13 -0
  255. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  256. package/es/components/scale-view/src/components/NoData.vue2.js +1 -1
  257. package/es/components/scale-view/src/components/composables/choose-common.js +1 -1
  258. package/es/components/scale-view/src/components/formitem/r-cascader.js +1 -1
  259. package/es/components/scale-view/src/components/formitem/r-checkbox.d.ts +9 -0
  260. package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -1
  261. package/es/components/scale-view/src/components/formitem/r-input.d.ts +9 -0
  262. package/es/components/scale-view/src/components/formitem/r-input.js +1 -1
  263. package/es/components/scale-view/src/components/formitem/r-map.js +1 -1
  264. package/es/components/scale-view/src/components/formitem/r-radio.d.ts +9 -0
  265. package/es/components/scale-view/src/components/formitem/r-radio.js +1 -1
  266. package/es/components/scale-view/src/components/formitem/r-select.js +1 -1
  267. package/es/components/scale-view/src/components/formitem/r-sign.js +1 -1
  268. package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -1
  269. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
  270. package/es/components/scale-view/src/hooks/scaleview-methods.js +1 -1
  271. package/es/components/scale-view/src/hooks/scaleview-props.d.ts +4 -0
  272. package/es/components/scale-view/src/hooks/scaleview-props.js +1 -1
  273. package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
  274. package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -1
  275. package/es/components/scale-view/src/hooks/use-component.d.ts +72 -0
  276. package/es/components/scale-view/style/index.css +1 -1
  277. package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
  278. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  279. package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
  280. package/es/components/select-label/src/components/label-classify.vue2.js +1 -1
  281. package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue2.js +1 -1
  282. package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +1 -1
  283. package/es/components/select-label/src/ihoLabel/iho-label-classify.vue2.js +1 -1
  284. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  285. package/es/components/select-person/src/SelectPersonType.vue2.js +1 -1
  286. package/es/components/select-person/src/components/SearchOrgAndStaff.vue2.js +1 -1
  287. package/es/components/select-person/src/index.vue2.js +1 -1
  288. package/es/components/slider-tree/src/index.vue2.js +1 -1
  289. package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -1
  290. package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +1 -1
  291. package/es/components/table-export-field/src/index.vue2.js +1 -1
  292. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue2.js +1 -1
  293. package/es/components/table-filter/src/components/bi-filter/helpers/options.js +1 -1
  294. package/es/components/table-filter/src/components/bi-filter/index.vue2.js +1 -1
  295. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +1 -1
  296. package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
  297. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
  298. package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue2.js +1 -1
  299. package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue2.js +1 -1
  300. package/es/components/table-filter/src/components/classify-filter/helpers/options.js +1 -1
  301. package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +1 -1
  302. package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -1
  303. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue2.js +1 -1
  304. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue2.js +1 -1
  305. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -1
  306. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +1 -1
  307. package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue2.js +1 -1
  308. package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue2.js +1 -1
  309. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue2.js +1 -1
  310. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +4 -7
  311. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -1
  312. package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue2.js +1 -1
  313. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +4 -7
  314. package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +1 -1
  315. package/es/components/table-filter/src/components/render-widget/helpers/selectExtraMap.js +1 -1
  316. package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +3 -1
  317. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  318. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +4 -7
  319. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  320. package/es/components/table-filter/src/tool/baseOptions.js +1 -1
  321. package/es/components/template-render/src/components/index.d.ts +23 -23
  322. package/es/components/tooth-bitmap/src/ToothBitmap.vue2.js +1 -1
  323. package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +1 -1
  324. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +1 -1
  325. package/es/components/vod-chunk-upload/src/vod-upload-modal.js +1 -1
  326. package/es/env.d.ts +25 -25
  327. package/es/shared/assets/img/ai__avatar.png.js +1 -1
  328. package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
  329. package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
  330. package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
  331. package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
  332. package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
  333. package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
  334. package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
  335. package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
  336. package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
  337. package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
  338. package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
  339. package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
  340. package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
  341. package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
  342. package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
  343. package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
  344. package/es/shared/assets/img/failure.png.js +1 -1
  345. package/es/shared/assets/img/logo.png.js +1 -1
  346. package/es/shared/assets/img/no-permission.png.js +1 -1
  347. package/es/shared/assets/img/nodata.png.js +1 -1
  348. package/es/shared/assets/img/notfound.png.js +1 -1
  349. package/es/shared/assets/img/qr.png.js +1 -1
  350. package/es/shared/assets/img/success.png.js +1 -1
  351. package/es/shared/assets/img/table_style_2.png.js +1 -1
  352. package/es/shared/assets/img/video.png.js +1 -1
  353. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  354. package/es/shared/assets/img/xb_big.png.js +1 -1
  355. package/es/shared/assets/img/xb_small.png.js +1 -1
  356. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  357. package/es/shared/hooks/useLevelSearchCascader.js +1 -1
  358. package/es/shared/package.json.js +1 -1
  359. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  360. package/es/shared/utils/tapable/index.d.ts +139 -0
  361. package/package.json +2 -2
  362. package/es/components/fabric-chart/src/hooks/temperature/useShadow.js +0 -1
  363. package/es/components/iho-chat/src/hooks/useSession.d.ts +0 -12
  364. package/es/components/iho-chat/src/hooks/useSession.js +0 -1
  365. package/es/components/iho-chat/src/hooks/useState.d.ts +0 -18
  366. package/es/components/iho-chat/src/hooks/useState.js +0 -1
@@ -50,12 +50,14 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
50
50
  onSelect?: ((...args: any[]) => any) | undefined;
51
51
  onChange?: ((...args: any[]) => any) | undefined;
52
52
  onRemove?: ((...args: any[]) => any) | undefined;
53
+ onEdit?: ((...args: any[]) => any) | undefined;
53
54
  onAdd?: ((...args: any[]) => any) | undefined;
55
+ "onRight-click"?: ((...args: any[]) => any) | undefined;
54
56
  "onAdd:prevent"?: ((...args: any[]) => any) | undefined;
55
57
  "onClick:grid"?: ((...args: any[]) => any) | undefined;
56
- onEventClick?: ((...args: any[]) => any) | undefined;
58
+ "onEvent-click"?: ((...args: any[]) => any) | undefined;
57
59
  }>>;
58
- emits: (event: "remove" | "change" | "add" | "select" | "add:prevent" | "click:grid" | "eventClick", ...args: any[]) => void;
60
+ emits: (event: "remove" | "edit" | "change" | "add" | "right-click" | "select" | "add:prevent" | "click:grid" | "event-click", ...args: any[]) => void;
59
61
  canvasRef: import("vue").Ref<HTMLCanvasElement | null>;
60
62
  canvas: import("vue").Ref<any>;
61
63
  pointTipProps: {
@@ -68,6 +70,7 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
68
70
  movable: boolean;
69
71
  sourceData: import("../../shared/types").AnyObject[];
70
72
  isTarget: boolean;
73
+ marginTop?: number | undefined;
71
74
  };
72
75
  pointMenuProps: {
73
76
  show: boolean;
@@ -93,6 +96,7 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
93
96
  useRectRuler: any;
94
97
  updatePolyline: any;
95
98
  getGridInfo: any;
99
+ redrawLinePoints: any;
96
100
  init: () => import("../../shared/types").AnyObject;
97
101
  PopupTip: import("vue").DefineComponent<{
98
102
  show: {
@@ -128,6 +132,10 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
128
132
  isTarget: {
129
133
  type: BooleanConstructor;
130
134
  };
135
+ marginTop: {
136
+ type: NumberConstructor;
137
+ default: number;
138
+ };
131
139
  }, {
132
140
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
133
141
  show: {
@@ -163,6 +171,10 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
163
171
  isTarget: {
164
172
  type: BooleanConstructor;
165
173
  };
174
+ marginTop: {
175
+ type: NumberConstructor;
176
+ default: number;
177
+ };
166
178
  }>> & {}>>;
167
179
  pointStyle: import("vue").ComputedRef<{
168
180
  top: string;
@@ -208,8 +220,13 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
208
220
  isTarget: {
209
221
  type: BooleanConstructor;
210
222
  };
223
+ marginTop: {
224
+ type: NumberConstructor;
225
+ default: number;
226
+ };
211
227
  }>>, {
212
228
  list: string[];
229
+ marginTop: number;
213
230
  show: boolean;
214
231
  movable: boolean;
215
232
  isTarget: boolean;
@@ -257,7 +274,7 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
257
274
  list: unknown[];
258
275
  show: boolean;
259
276
  }>;
260
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("remove" | "change" | "add" | "select" | "add:prevent" | "click:grid" | "eventClick")[], "remove" | "change" | "add" | "select" | "add:prevent" | "click:grid" | "eventClick", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
277
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("remove" | "edit" | "change" | "add" | "right-click" | "select" | "add:prevent" | "click:grid" | "event-click")[], "remove" | "edit" | "change" | "add" | "right-click" | "select" | "add:prevent" | "click:grid" | "event-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
261
278
  type: {
262
279
  type: import("vue").PropType<import("./src/interface").IType>;
263
280
  default: string;
@@ -284,10 +301,12 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
284
301
  onSelect?: ((...args: any[]) => any) | undefined;
285
302
  onChange?: ((...args: any[]) => any) | undefined;
286
303
  onRemove?: ((...args: any[]) => any) | undefined;
304
+ onEdit?: ((...args: any[]) => any) | undefined;
287
305
  onAdd?: ((...args: any[]) => any) | undefined;
306
+ "onRight-click"?: ((...args: any[]) => any) | undefined;
288
307
  "onAdd:prevent"?: ((...args: any[]) => any) | undefined;
289
308
  "onClick:grid"?: ((...args: any[]) => any) | undefined;
290
- onEventClick?: ((...args: any[]) => any) | undefined;
309
+ "onEvent-click"?: ((...args: any[]) => any) | undefined;
291
310
  }, {
292
311
  type: import("./src/interface").IType;
293
312
  }>>;
@@ -44,12 +44,14 @@ declare const _default: import("vue").DefineComponent<{
44
44
  onSelect?: ((...args: any[]) => any) | undefined;
45
45
  onChange?: ((...args: any[]) => any) | undefined;
46
46
  onRemove?: ((...args: any[]) => any) | undefined;
47
+ onEdit?: ((...args: any[]) => any) | undefined;
47
48
  onAdd?: ((...args: any[]) => any) | undefined;
49
+ "onRight-click"?: ((...args: any[]) => any) | undefined;
48
50
  "onAdd:prevent"?: ((...args: any[]) => any) | undefined;
49
51
  "onClick:grid"?: ((...args: any[]) => any) | undefined;
50
- onEventClick?: ((...args: any[]) => any) | undefined;
52
+ "onEvent-click"?: ((...args: any[]) => any) | undefined;
51
53
  }>>;
52
- emits: (event: "remove" | "change" | "add" | "select" | "add:prevent" | "click:grid" | "eventClick", ...args: any[]) => void;
54
+ emits: (event: "remove" | "edit" | "change" | "add" | "right-click" | "select" | "add:prevent" | "click:grid" | "event-click", ...args: any[]) => void;
53
55
  canvasRef: import("vue").Ref<HTMLCanvasElement | null>;
54
56
  canvas: import("vue").Ref<any>;
55
57
  pointTipProps: {
@@ -62,6 +64,7 @@ declare const _default: import("vue").DefineComponent<{
62
64
  movable: boolean;
63
65
  sourceData: AnyObject[];
64
66
  isTarget: boolean;
67
+ marginTop?: number | undefined;
65
68
  };
66
69
  pointMenuProps: {
67
70
  show: boolean;
@@ -87,6 +90,7 @@ declare const _default: import("vue").DefineComponent<{
87
90
  useRectRuler: any;
88
91
  updatePolyline: any;
89
92
  getGridInfo: any;
93
+ redrawLinePoints: any;
90
94
  init: () => AnyObject;
91
95
  PopupTip: import("vue").DefineComponent<{
92
96
  show: {
@@ -122,6 +126,10 @@ declare const _default: import("vue").DefineComponent<{
122
126
  isTarget: {
123
127
  type: BooleanConstructor;
124
128
  };
129
+ marginTop: {
130
+ type: NumberConstructor;
131
+ default: number;
132
+ };
125
133
  }, {
126
134
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
127
135
  show: {
@@ -157,6 +165,10 @@ declare const _default: import("vue").DefineComponent<{
157
165
  isTarget: {
158
166
  type: BooleanConstructor;
159
167
  };
168
+ marginTop: {
169
+ type: NumberConstructor;
170
+ default: number;
171
+ };
160
172
  }>> & {}>>;
161
173
  pointStyle: import("vue").ComputedRef<{
162
174
  top: string;
@@ -202,8 +214,13 @@ declare const _default: import("vue").DefineComponent<{
202
214
  isTarget: {
203
215
  type: BooleanConstructor;
204
216
  };
217
+ marginTop: {
218
+ type: NumberConstructor;
219
+ default: number;
220
+ };
205
221
  }>>, {
206
222
  list: string[];
223
+ marginTop: number;
207
224
  show: boolean;
208
225
  movable: boolean;
209
226
  isTarget: boolean;
@@ -251,7 +268,7 @@ declare const _default: import("vue").DefineComponent<{
251
268
  list: unknown[];
252
269
  show: boolean;
253
270
  }>;
254
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("remove" | "change" | "add" | "select" | "add:prevent" | "click:grid" | "eventClick")[], "remove" | "change" | "add" | "select" | "add:prevent" | "click:grid" | "eventClick", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
271
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("remove" | "edit" | "change" | "add" | "right-click" | "select" | "add:prevent" | "click:grid" | "event-click")[], "remove" | "edit" | "change" | "add" | "right-click" | "select" | "add:prevent" | "click:grid" | "event-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
255
272
  type: {
256
273
  type: PropType<IType>;
257
274
  default: string;
@@ -274,10 +291,12 @@ declare const _default: import("vue").DefineComponent<{
274
291
  onSelect?: ((...args: any[]) => any) | undefined;
275
292
  onChange?: ((...args: any[]) => any) | undefined;
276
293
  onRemove?: ((...args: any[]) => any) | undefined;
294
+ onEdit?: ((...args: any[]) => any) | undefined;
277
295
  onAdd?: ((...args: any[]) => any) | undefined;
296
+ "onRight-click"?: ((...args: any[]) => any) | undefined;
278
297
  "onAdd:prevent"?: ((...args: any[]) => any) | undefined;
279
298
  "onClick:grid"?: ((...args: any[]) => any) | undefined;
280
- onEventClick?: ((...args: any[]) => any) | undefined;
299
+ "onEvent-click"?: ((...args: any[]) => any) | undefined;
281
300
  }, {
282
301
  type: IType;
283
302
  }>;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as r,reactive as t,computed as o,onMounted as s,onBeforeUnmount as a,openBlock as i,createElementBlock as u,normalizeStyle as l,unref as p,createElementVNode as n,Fragment as c,createVNode as h,mergeProps as d,createCommentVNode as m}from"vue";import{fabric as f}from"../../../shared/utils/fabricjs/index.js";import v from"./components/PopupTip.vue.js";import g from"./components/PopupMenu.js";import"./hooks/useDraw.js";import"date-fns";import"lodash-es";import"./hooks/useEvent.js";import{useBirthProcessChart as w}from"./hooks/birthProcess/useBirthProcessChart.js";import{useTemperatureChart as C}from"./hooks/temperature/useTemperatureChart.js";import{useSurgicalAnesthesiaChart as k}from"./hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js";import{useElectrocardiogramChart as R}from"./hooks/electrocardiogram/useElectrocardiogramChart.js";import{useNewBirthProcessChart as y}from"./hooks/newBirthProcess/useNewBirthProcessChart.js";var j=e({__name:"FabricChart",props:{type:{type:String,default:"temperature"},data:{type:Object,required:!0},popupTipRender:{type:Function},addRenderItem:{type:Function}},emits:["change","add","remove","select","add:prevent","click:grid","eventClick"],setup(e,{expose:j,emit:P}){const b=e,x=r(null),I=r(),T=t({show:!1,point:{x:0,y:0},list:[],movable:!1,sourceData:[],isTarget:!1}),M=t({show:!1,point:{x:0,y:0},list:[],target:null}),B=o((()=>{var e;return null==(e=I.value)?void 0:e.wrapperEl})),A=o((()=>({width:`${b.data.width||800}px`,height:`${b.data.height||500}px`}))),{propItems:E,redrawPoints:F,select:S,clickMenu:_,useMeasureRuler:D,useCaliper:G,useCaliperRuler:$,useRectRuler:q,updatePolyline:H,getGridInfo:N}=function(){const e=[I,b,P,x,T,M];switch(b.type){case"birthProcess":return w(...e);case"surgicalAnesthesia":return k(...e,!!b.popupTipRender);case"electrocardiogram":return R(...e);case"newBirthProcess":return y(...e);default:return C(...e)}}();return s((()=>{I.value=new f.Canvas(x.value,{width:E.canvasWidth,height:E.canvasHeight,backgroundColor:"#fff",selection:!1,stopContextMenu:!0,fireRightClick:!0,allowTouchScrolling:!0})})),a((()=>{var e,r,t,o;null==(r=null==(e=I.value)?void 0:e.off)||r.call(e),null==(o=null==(t=I.value)?void 0:t.clear)||o.call(t)})),j({redrawPoints:F,select:S,canvas:I,useMeasureRuler:D,useCaliper:G,useCaliperRuler:$,useRectRuler:q,updatePolyline:H,getGridInfo:N}),(r,t)=>(i(),u("div",{class:"c-fabric-chart",style:l(p(A))},[n("canvas",{ref_key:"canvasRef",ref:x},null,512),p(B)?(i(),u(c,{key:0},[h(v,d({popupTipRender:e.popupTipRender,...T},{propItems:p(E)}),null,16,["propItems"]),h(p(g),d({propItems:p(E)},M,{show:M.show,"onUpdate:show":t[0]||(t[0]=e=>M.show=e),onClickMenu:p(_)}),null,16,["propItems","show","onClickMenu"])],64)):m("v-if",!0)],4))}});export{j as default};
1
+ import{defineComponent as e,ref as r,reactive as t,computed as o,onMounted as s,onBeforeUnmount as a,openBlock as i,createElementBlock as u,normalizeStyle as n,unref as l,createElementVNode as p,Fragment as c,createVNode as h,mergeProps as d,createCommentVNode as m}from"vue";import{fabric as f}from"../../../shared/utils/fabricjs/index.js";import v from"./components/PopupTip.vue.js";import w from"./components/PopupMenu.js";import"./hooks/useDraw.js";import"date-fns";import"lodash-es";import"./hooks/useEvent.js";import"./hooks/useShadow.js";import"./hooks/useCommon.js";import{useBirthProcessChart as g}from"./hooks/birthProcess/useBirthProcessChart.js";import{useTemperatureChart as k}from"./hooks/temperature/useTemperatureChart.js";import{useSurgicalAnesthesiaChart as C}from"./hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js";import{useElectrocardiogramChart as R}from"./hooks/electrocardiogram/useElectrocardiogramChart.js";import{useNewBirthProcessChart as j}from"./hooks/newBirthProcess/useNewBirthProcessChart.js";var P=e({__name:"FabricChart",props:{type:{type:String,default:"temperature"},data:{type:Object,required:!0},popupTipRender:{type:Function},addRenderItem:{type:Function}},emits:["change","add","remove","edit","right-click","select","add:prevent","click:grid","event-click"],setup(e,{expose:P,emit:y}){const b=e,x=r(null),I=r(),T=t({show:!1,point:{x:0,y:0},list:[],movable:!1,sourceData:[],isTarget:!1}),M=t({show:!1,point:{x:0,y:0},list:[],target:null}),B=o((()=>{var e;return null==(e=I.value)?void 0:e.wrapperEl})),S=o((()=>({width:`${b.data.width||800}px`,height:`${b.data.height||500}px`}))),{propItems:A,redrawPoints:E,select:F,clickMenu:_,useMeasureRuler:D,useCaliper:G,useCaliperRuler:L,useRectRuler:$,updatePolyline:q,getGridInfo:H,redrawLinePoints:N}=function(){const e=[I,b,y,x,T,M];switch(b.type){case"birthProcess":return g(...e);case"surgicalAnesthesia":return C(...e,!!b.popupTipRender);case"electrocardiogram":return R(...e);case"newBirthProcess":return j(...e);default:return k(...e)}}();return s((()=>{I.value=new f.Canvas(x.value,{width:A.canvasWidth,height:A.canvasHeight,backgroundColor:"#fff",selection:!1,stopContextMenu:!0,fireRightClick:!0,allowTouchScrolling:!0})})),a((()=>{var e,r,t,o;null==(r=null==(e=I.value)?void 0:e.off)||r.call(e),null==(o=null==(t=I.value)?void 0:t.clear)||o.call(t)})),P({redrawPoints:E,redrawLinePoints:N,select:F,canvas:I,useMeasureRuler:D,useCaliper:G,useCaliperRuler:L,useRectRuler:$,updatePolyline:q,getGridInfo:H}),(r,t)=>(i(),u("div",{class:"c-fabric-chart",style:n(l(S))},[p("canvas",{ref_key:"canvasRef",ref:x},null,512),l(B)?(i(),u(c,{key:0},[h(v,d({popupTipRender:e.popupTipRender,...T},{propItems:l(A)}),null,16,["propItems"]),h(l(w),d({propItems:l(A)},M,{show:M.show,"onUpdate:show":t[0]||(t[0]=e=>M.show=e),onClickMenu:l(_)}),null,16,["propItems","show","onClickMenu"])],64)):m("v-if",!0)],4))}});export{P as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,watch as l,withDirectives as o,createVNode as a,vShow as r}from"vue";import{NSpace as s,NInputNumber as u}from"naive-ui";import n from"./useStyle.js";import{useEventListener as p,onClickOutside as i}from"@vueuse/core";var c=e({name:"PopupMenu",inheritAttrs:!1,props:{show:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},point:{type:Object},propItems:{type:Object},target:{type:Object}},emits:["update:show","clickMenu"],setup(e,{attrs:c,slots:f,emit:m}){const h=t(null);p(h,"contextmenu",(e=>(e.preventDefault(),!1))),i(h,(e=>{m("update:show",!1)})),e.propItems;const v=n(e);function d(e){if("string"==typeof e&&(e.startsWith("新增")||e.startsWith("删除")))return!0}function y(e){return"string"==typeof e?e:"boolean"==typeof e.value?e.label:e.renderItem?e.renderItem():a(s,{inline:!0,align:"center"},{default:()=>[a("span",null,[e.label]),a(u,{style:"width: 110px",size:"small",value:e.value,"onUpdate:value":t=>e.value=t,clearable:!0,placeholder:"请输入数值",showButton:!1,onFocus:()=>m("update:show",!0)},null)]})}return l((()=>e.show),(t=>{t&&e.list.forEach((e=>{"object"==typeof e&&Reflect.has(e,"value")&&"boolean"!=typeof e.value&&(e.value=void 0)}))})),()=>o(a("ul",{ref:h,class:"c-fabric-chart-popup c-fabric-chart-popup__menu",style:v.value},[e.list.map((t=>e.show?a("li",{class:{"no-click":d(t)},onClick:l=>function(t,l){d(l)||""===(null==t?void 0:t.target.className)&&(m("update:show",!1),m("clickMenu",{item:l,target:e.target}))}(l,t)},[y(t)]):null))]),[[r,e.show]])}});export{c as default};
1
+ import{defineComponent as e,ref as t,watch as l,withDirectives as o,createVNode as a,vShow as n}from"vue";import{NSpace as u,NInputNumber as r}from"naive-ui";import i from"./useStyle.js";import{useEventListener as s,onClickOutside as p}from"@vueuse/core";var c=e({name:"PopupMenu",inheritAttrs:!1,props:{show:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},point:{type:Object},propItems:{type:Object},target:{type:Object}},emits:["update:show","clickMenu"],setup(e,{attrs:c,slots:d,emit:f}){const w=t(null);s(w,"contextmenu",(e=>(e.preventDefault(),!1))),p(w,(e=>{f("update:show",!1)})),e.propItems;const m=i(e);function v(e){var t,l;if("string"==typeof e&&(e.startsWith((null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.279"))||"新增")||e.startsWith((null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.215"))||"删除")))return!0}function y(e){return"string"==typeof e?e:"boolean"==typeof e.value?e.label:e.renderItem?e.renderItem():a(u,{inline:!0,align:"center"},{default:()=>{var t;return[a("span",null,[e.label]),a(r,{style:"width: 110px",size:"small",value:e.value,"onUpdate:value":t=>e.value=t,clearable:!0,placeholder:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.207"))||"请输入数值",showButton:!1,onFocus:()=>f("update:show",!0)},null)]}})}return l((()=>e.show),(t=>{t&&e.list.forEach((e=>{"object"==typeof e&&Reflect.has(e,"value")&&"boolean"!=typeof e.value&&(e.value=void 0)}))})),()=>o(a("ul",{ref:w,class:"c-fabric-chart-popup c-fabric-chart-popup__menu",style:m.value},[e.list.map((t=>e.show?a("li",{class:{"no-click":v(t)},onClick:l=>function(t,l){v(l)||""===(null==t?void 0:t.target.className)&&(f("update:show",!1),f("clickMenu",{item:l,target:e.target}))}(l,t),key:t.type||t},[y(t)]):null))]),[[n,e.show]])}});export{c as default};
@@ -33,6 +33,10 @@ declare const _default: import("vue").DefineComponent<{
33
33
  isTarget: {
34
34
  type: BooleanConstructor;
35
35
  };
36
+ marginTop: {
37
+ type: NumberConstructor;
38
+ default: number;
39
+ };
36
40
  }, {
37
41
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
38
42
  show: {
@@ -66,6 +70,10 @@ declare const _default: import("vue").DefineComponent<{
66
70
  isTarget: {
67
71
  type: BooleanConstructor;
68
72
  };
73
+ marginTop: {
74
+ type: NumberConstructor;
75
+ default: number;
76
+ };
69
77
  }>> & {}>>;
70
78
  pointStyle: import("vue").ComputedRef<{
71
79
  top: string;
@@ -109,8 +117,13 @@ declare const _default: import("vue").DefineComponent<{
109
117
  isTarget: {
110
118
  type: BooleanConstructor;
111
119
  };
120
+ marginTop: {
121
+ type: NumberConstructor;
122
+ default: number;
123
+ };
112
124
  }>>, {
113
125
  list: string[];
126
+ marginTop: number;
114
127
  show: boolean;
115
128
  movable: boolean;
116
129
  isTarget: boolean;
@@ -1 +1 @@
1
- import{defineComponent as e,withDirectives as p,openBlock as t,createElementBlock as o,normalizeStyle as r,unref as a,Fragment as i,renderList as l,toDisplayString as s,createBlock as u,resolveDynamicComponent as n,vShow as c}from"vue";import y from"./useStyle.js";const d={key:0,class:"default-box"};var f=e({__name:"PopupTip",props:{show:{type:Boolean,default:!1},point:{type:Object,required:!0},list:{type:Array,default:()=>[]},propItems:{type:Object},popupTipRender:{type:Function},movable:{type:Boolean},sourceData:{type:Array},isTarget:{type:Boolean}},setup(e){const f=e,m=y(f);return(y,T)=>{return p((t(),o("div",{class:"c-fabric-chart-popup c-fabric-chart-popup__tip",style:r(a(m))},[e.popupTipRender?(t(),u(n(null==(b=f.popupTipRender)?void 0:b.call(f,{isTarget:f.isTarget,pointer:f.point,data:f.sourceData})),{key:1})):(t(),o("ul",d,[(t(!0),o(i,null,l(e.list,(e=>(t(),o("li",{key:e},s(e),1)))),128))]))],4)),[[c,e.show]]);var b}}});export{f as default};
1
+ import{defineComponent as e,withDirectives as p,openBlock as t,createElementBlock as r,normalizeStyle as o,unref as a,Fragment as u,renderList as i,toDisplayString as l,createBlock as s,resolveDynamicComponent as n,vShow as c}from"vue";import y from"./useStyle.js";const d={key:0,class:"default-box"};var f=e({__name:"PopupTip",props:{show:{type:Boolean,default:!1},point:{type:Object,required:!0},list:{type:Array,default:()=>[]},propItems:{type:Object},popupTipRender:{type:Function},movable:{type:Boolean},sourceData:{type:Array},isTarget:{type:Boolean},marginTop:{type:Number,default:-15}},setup(e){const f=e,m=y(f);return(y,T)=>{return p((t(),r("div",{class:"c-fabric-chart-popup c-fabric-chart-popup__tip",style:o(a(m))},[e.popupTipRender?(t(),s(n(null==(b=f.popupTipRender)?void 0:b.call(f,{isTarget:f.isTarget,pointer:f.point,data:f.sourceData})),{key:1})):(t(),r("ul",d,[(t(!0),r(u,null,i(e.list,(e=>(t(),r("li",{key:e},l(e),1)))),128))]))],4)),[[c,e.show]]);var b}}});export{f as default};
@@ -1 +1 @@
1
- import{computed as t}from"vue";function o(o){const{canvasWidth:r,canvasHeight:n}=o.propItems;return t((()=>{const{x:t,y:i}=o.point,p={top:"",bottom:"",left:"",right:"","transform-origin":""};return r-(t+15)<200?(p.right=r-t+15+"px",p["transform-origin"]="right"):(p.left=t+15+"px",p["transform-origin"]="left"),n-(i+-15)<200?(p.bottom=n-i-15+"px",p["transform-origin"]+=" bottom"):(p.top=i+-15+"px",p["transform-origin"]+=" top"),p}))}export{o as default};
1
+ import{computed as t}from"vue";function o(o){const{canvasWidth:r,canvasHeight:n}=o.propItems;return t((()=>{var t;const{x:i,y:a}=o.point,p=null!=(t=o.marginTop)?t:-15,m={top:"",bottom:"",left:"",right:"","transform-origin":""};return r-(i+15)<200?(m.right=r-i+15+"px",m["transform-origin"]="right"):(m.left=i+15+"px",m["transform-origin"]="left"),n-(a+p)<200?(m.bottom=n-a+p+"px",m["transform-origin"]+=" bottom"):(m.top=a+p+"px",m["transform-origin"]+=" top"),m}))}export{o as default};
@@ -12,7 +12,7 @@ export declare const PAIN_MENU: {
12
12
  value: undefined;
13
13
  type: string;
14
14
  }[];
15
- export declare const OTHER_MENU: {
15
+ export declare const OTHER_MENU: readonly {
16
16
  label: string;
17
17
  type: string;
18
18
  }[];
@@ -1 +1 @@
1
- const e=[{label:"升温",value:!0,type:"rise"},{label:"药物降温",value:void 0,type:"drugReduce"},{label:"物理降温",value:void 0,type:"physicsReduce"},{label:"不升",value:!0,type:"noRise"}],i=[{label:"药物降痛",value:void 0,type:"drugReduce"},{label:"物理降痛",value:void 0,type:"physicsReduce"}],l=[{label:"修改",type:"change"},{label:"删除",type:"remove"}],r="#2563F4",a="#FF1818",s={yemai:{stroke:a,strokeX:r,strokeWidth:1,strokeWidthX:1,radius:6,angle:45},koumai:{stroke:a,strokeWidth:1,radius:6,radiusCircle:3,fillCircle:r},gangmai:{radius:6,radiusCircle:3,stroke:r,fillCircle:a},xinmai:{radius:6,radiusCircle:3,stroke:a,fillCircle:a},humai:{radius:6,radiusCircle:3,stroke:a,fillCircle:r},ermai:{stroke:a,strokeWidth:1,radius:6,radiusCircle:3,fillCircle:r}};var d=(e=>(e[e.SMALLCELLNUMBER=5]="SMALLCELLNUMBER",e[e.MAXLINENUMBER=13]="MAXLINENUMBER",e[e.DEFAULTMAINXCELLVALUE=.2]="DEFAULTMAINXCELLVALUE",e))(d||{});export{d as ECG,l as OTHER_MENU,s as OVERLAP,i as PAIN_MENU,e as TEMPERATURE_MENU};
1
+ var e,l,i,a,d,o,u,n,r;const t=[{label:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.208"))||"升温",value:!0,type:"rise"},{label:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.209"))||"药物降温",value:void 0,type:"drugReduce"},{label:(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.210"))||"物理降温",value:void 0,type:"physicsReduce"},{label:(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.211"))||"不升",value:!0,type:"noRise"}],w=[{label:(null==(d=window.getLanguageByCode)?void 0:d.call(window,"10010.1.212"))||"药物降痛",value:void 0,type:"drugReduce"},{label:(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.213"))||"物理降痛",value:void 0,type:"physicsReduce"}],g=Object.freeze([{label:(null==(u=window.getLanguageByCode)?void 0:u.call(window,"10010.1.279"))||"新增",type:"add"},{label:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.214"))||"修改",type:"edit"},{label:(null==(r=window.getLanguageByCode)?void 0:r.call(window,"10010.1.215"))||"删除",type:"remove"}]),s="#2563F4",c="#FF1818",L={yemai:{stroke:c,strokeX:s,strokeWidth:1,strokeWidthX:1,radius:6,angle:45},koumai:{stroke:c,strokeWidth:1,radius:6,radiusCircle:3,fillCircle:s},gangmai:{radius:6,radiusCircle:3,stroke:s,fillCircle:c},xinmai:{radius:6,radiusCircle:3,stroke:c,fillCircle:c},humai:{radius:6,radiusCircle:3,stroke:c,fillCircle:s},ermai:{stroke:c,strokeWidth:1,radius:6,radiusCircle:3,fillCircle:s}};var C=(e=>(e[e.SMALLCELLNUMBER=5]="SMALLCELLNUMBER",e[e.MAXLINENUMBER=13]="MAXLINENUMBER",e[e.DEFAULTMAINXCELLVALUE=.2]="DEFAULTMAINXCELLVALUE",e))(C||{});export{C as ECG,g as OTHER_MENU,L as OVERLAP,w as PAIN_MENU,t as TEMPERATURE_MENU};
@@ -1 +1 @@
1
- import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as t,drawArrow as o,drawPoint as n,defaultStyle as i,drawText as r,defaultTextStyle as l,drawTextAndIconGroup as s,defaultRectStyle as a}from"../useDraw.js";import{useGrid as c}from"../useGrid.js";import{useBirthProcessCumputedPoint as u}from"../useCumputedPoint.js";import"../useEvent.js";import{getScaleInfo as d,drawScaleNumber as f,drawScaleLine as h}from"../useScaleColumn.js";import{useCommon as p}from"../useCommon.js";import"vue";import{getIndex as g,isEffectiveNode as v,getTime as m,getScaleNumberList as y}from"../../utils/index.js";import{cloneDeep as b,last as k,range as j}from"lodash-es";import"../temperature/useShadow.js";import"@vueuse/shared";import{format as w}from"date-fns";import"naive-ui";import"@vueuse/core";function x(x,S,C,P,E){const{computedX:X,computedY:O,getXValue:A,getYValue:L}=u(S),{getEqualXTypes:M,handleAddPrevent:Y,isGridLimit:H,setPrevAndNextPoint:T,getPointEventProps:I}=p(x,C,S),{xAxis:D,grid:G,originX:N,originY:W,xCellWidth:V,endY:B,startTime:F,leftAddAreaWidth:R,leftScales:$,rightScales:q,yCellHeight:z,endX:J,scaleValues:K,canvasWidth:Q,borderStyle:U,rightAddAreaWidth:Z,event:_,originYCervix:ee,other:te,canvasHeight:oe,scalebarBorder:ne,padding:ie}=S,re=b(K),le=new Set;function se(){re.filter((({showData:e=!0})=>e)).forEach(((e,s)=>{var a;const c=[],u=[],d=[],{pointAttr:f={},lineAttr:h={},title:p="",key:g,type:v="circle",childbirthStyle:m={},surgicalDeliveryStyle:y={},dystociaStyle:b={}}=e;function k(r,l,s,a){if(l[s]){const{type:c="circle",style:u={},arrowStyle:f={}}=e[s+"Style"],p=X(l[s]),g=t([...r,p,r[1]],{...h,strokeDashArray:[4,2],...i}),v="dystocia"===s&&r[1]-W>=z?r[1]-z:r[1],m=n(c,{left:p,top:v,...u,...i}),y=v+m.height/2,b="dystocia"===s?o([p,y+z,y],h,"up"):null;g&&(d.push(g),a[s+"Line"]={obj:g,type:"line",left:p-r[0]}),m&&(d.push(m),a[s]={obj:m,left:p-r[0]}),b&&(d.push(b),a[s+"Arrow"]={obj:b,left:p-r[0],moveHide:!0})}}null==(a=e.data)||a.forEach(((a,y)=>{!function(a,y,b){let j,S;const E=e.data[b+1],X=fe(E,e);if(a&&X&&!y.breakpoint)S=t([...a,...X],{...h});else if(a&&!X&&!y.breakpoint){const o=fe(E,e);S=o?t([...a,...o],{...h}):null}const O={};if(["fetalPresentation","cervix"].includes(g)){let e,t;if(y.childbirth){const{type:s="arrow",style:c={},textStyle:u={}}=m;if("arrow"===s){const t=a[1]+z;e=o([a[0],a[1],t],c)}else e=n(s,{left:a[0],top:a[1],...c,...i,hoverCursor:"default"});t=r([a[0]+V/2,a[1]+z/2],{value:String(y.childbirth),...l,originX:"left",originY:"center",...u}),e&&(d.push(e),Object.assign(O,{childbirthIcon:{obj:e,type:s}})),t&&(d.push(t),Object.assign(O,{childbirthText:{obj:t,left:V/2,top:z/2}}))}}"fetalPresentation"===g&&(k(a,y,"surgicalDelivery",O),k(a,y,"dystocia",O));const M=u[b-1],Y={origin:{data:y,title:p,key:g||"",dataIndex:s,index:b},leftLine:M,rightLine:S,otherObj:O,...f,...I()};a&&(M||(Y.leftLine=null),j=n(v,{left:a[0],top:a[1],...Y}));u.push(S),j&&(!function(e){_.hovered&&(e.on("mouseover",(()=>{de(e,"hover")})),e.on("mouseout",(()=>{P.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{ue(e),function(e){var t,o;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(o=e.rightLine)||o.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:o,top:n=0,left:i=0,type:r="",moveHide:l}=t||{};o&&("line"===r?o.setCoords().set({x1:e.left,y1:e.top,x2:e.left+i,y2:e.top}):o.setCoords().set({left:e.left+i,top:e.top+n}),l&&(x.value.remove(o),delete e.otherObj.obj))}))}(e),_.hovered&&de(e)})),e.on("mouseup",(t=>{if(P.show=!1,1===t.button){const{key:t}=e.origin,o={...e.origin,data:{...e.origin.data,time:A(e.left),value:L(t,e.top)}};["surgicalDelivery","dystocia"].some((t=>{var n;(null==(n=e.otherObj[t])?void 0:n.obj)&&(o.data[t]=w(new Date(A(e.left+e.otherObj[t].left)),"yyyy-MM-dd HH:mm"))})),x.value.discardActiveObject(),C("change",o),ae(o,"change")}}))}(j),c.push(j),le.add(j))}(fe(a,e),a,y)})),Promise.all(c).then((e=>{const t=u.filter((e=>e));T(e),Promise.all(d).then((o=>{x.value.add(...t,...e,...o),e.forEach((e=>{null==e||e.bringToFront();const{childbirthIcon:t}=e.otherObj||{};(null==t?void 0:t.obj)&&"arrow"!==(null==t?void 0:t.type)&&t.obj.bringToFront()}))}))}))}))}function ae(e,t="add"){const{dataIndex:o,data:n,index:i,key:r}=e,l=re.find((e=>e.key===r));switch(t){case"remove":l.data.splice(i,1);break;case"change":l.data[i]=n;break;default:{const e=g(n.time,l.data);l.data.splice(e,0,n);break}}ce()}function ce(){var e;le.size&&(null==(e=x.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),Object.values((null==e?void 0:e.otherObj)||{}).forEach((e=>{(null==e?void 0:e.obj)&&t.push(null==e?void 0:e.obj)}))})),t}([...le]))),le.clear(),se()}function ue(e){const t=e.prevPoint?e.prevPoint.left:N,o=e.nextPoint?e.nextPoint.left:J;e.setCoords(),["cervix","fetalPresentation"].includes(e.origin.key)&&e.top<ee&&e.set("top",ee),e.top<W&&e.set("top",W),e.top>B&&e.set("top",B),e.left<t&&e.set("left",t),e.left>o&&e.set("left",o)}function de(e,t="moving"){const{title:o,key:n,data:i}=e.origin;P.point={x:e.left,y:e.top},P.list=[`${o} ${"hover"===t?i.value:L(n,e.top)}`,`时间 ${A(e.left).slice(-5)}`],P.show=!0}function fe(e,t){if(v(e)&&function(e){const t=F+864e5,o=m(e);return o>=F&&o<=t}(e.time)){const o=X(e.time),n=O(t.key,t.range,e.value);return[o,n<W?W:n>B?B:n]}}function he(e,t){return e+1>t[1]?t[0]:e+1}return c(x,S),function(){const t=ne?{width:Q-R-Z-1,left:R}:{width:J-N-(q.length?0:1),left:N},o=new e.Rect({...U,height:B-ie[0]-1,top:ie[0],fill:"transparent",...t});x.value.add(o)}(),function(){function t(t,o="left"){let n="left"===o?R:J;t.forEach(((t,o)=>{const{range:s,spaceValue:c,width:u,title:p,titleStyle:g,key:v,position:m="center",spaceGridNumber:b=1,showNumber:k=!0,showMaxMinNumber:j=!0,showName:w=!0}=t,S=[],C=[],P=n+u/2,E=y(s,c),X=E.length,{lineXMain:O,lineXSub:A,textLeft:L}=d(m,n,u);E.forEach(((e,o)=>{const n=B-o*z*b,i=0===o?B-8:o!==E.length-1||!ie[0]||ee&&"FHR"!==v?n:W+8;!k||(0===o||o===X-1)&&!j||S.push(f(String(e),t,L,i)),C.push(...h(t,o,O,A,n,z,W,X,1))}));const M=[],Y=ne?new e.Rect({...a,strokeWidth:.5,width:u,height:B-ie[0],left:P,top:ie[0]+(B-ie[0])/2}):null;if(Y&&M.push(Y),w){const e=r([P,W-ie[0]>0?W-z/2:z/2],{value:String(p),...l,...g});e&&M.push(e)}const H=new e.Group([...C,...S,...M],{objectCaching:!1,...i});x.value.add(H),H.sendToBack(),n+=u}))}t($),t(q,"right")}(),function(){const{show:t,startTime:o,range:n=[0,23],position:s="top",style:a}=D.time,{show:c,range:u=[0,23],position:d,style:f={}}=D.processTime;if(t||c){const h=[],p=j(u[0],u[1]+1),g=[],v=[],m=z/2;for(let e=0;e<G.mainXCell;e++){if(t){const{textAlign:t="center"}=a,i=N+("center"===t?V/2:0),c=0===e&&"center"!==t?i+5:i,u=0===e?+o.slice(11,13):he(k(h),n);h.push(u);const d="top"===s?W-m:B+m;g.push(r([c+e*V,d],{value:String(u),...l,...a})),e===G.mainXCell-1&&"center"!==t&&g.push(r([J-1,d],{value:String(he(k(h),n)),...l,...a,originX:"center"!==t?"right":"center"}))}if(c&&e<=p.length){const{textAlign:t="center"}=f,o=N+("center"===t?V/2:0),n=0===e&&"center"!==t?o+5:o,i="top"===d?m:oe-m;v.push(r([n+e*V,i],{value:String(p[e]),...l,...f})),e===G.mainXCell-1&&"center"!==t&&v.push(r([J-1,i],{value:String(k(p)),...l,...a,originX:"center"!==t?"right":"center"}))}}const y=new e.Group([...g,...v],{objectCaching:!1,...i});x.value.add(y),x.value.sendToBack(y)}}(),function(){var e;const o=Object.values(te),n=[],i={},r=re.find((e=>"cervix"===e.key&&e.show)),l=null==(e=null==r?void 0:r.data)?void 0:e.find((e=>3==+e.value));function s(e,t){const{key:o,range:n}=r||{},i=O(o,n,10),l=[0,t],s=[-t/e,0],a=[(B-i-t)/e,B-i],c=[J-N,e*(J-N)+t];let u=[],d=[];function f([o,n]){return Math.abs(n-e*o-t)<=1}function h([e,t]){const[o,n]=[...p([e,t])];return o>=N&&o<=J&&n>=i&&n<=B}function p([e,t]){return[N+e,B-t]}return f(l)&&h(l)&&(u=p(l)),f(s)&&h(s)&&(u=p(s)),f(a)&&h(a)&&(d=p(a)),f(c)&&h(c)&&(d=p(c)),[...u,...d]}o.forEach((e=>{if(!e.show)return;const{key:o}=e;switch(o){case"fetalPresentation":{const{range:i,show:r}=re.find((e=>e.key===o));if(r){const r=O(o,i,0);n.push(t([N,r,J,r],{...e}))}break}case"alert":if(l){const{key:o,range:a}=r||{},c=216e5,u={time:w(new Date(m(l.time)+c),"yyyy-MM-dd HH:mm"),value:10},[d,f]=[X(l.time)-N,B-O(o,a,l.value)],[h,p]=[X(u.time)-N,B-O(o,a,u.value)],g=(p-f)/(h-d),v=f-d*g,y=s(g,v);y.length>0&&(n.push(t(y,{...e})),Object.assign(i,{k:g,b:v}))}break;case"handling":if(l){const{k:o,b:r}=i,a=144e5,c=s(o,r-(X(w(new Date(m(l.time)+a),"yyyy-MM-dd HH:mm"))-X(l.time))*o);c.length>0&&n.push(t(c,{...e}))}}})),x.value.add(...n)}(),se(),function(){function e(e,t){const o=re.findIndex((t=>t.key===e.key));return{renderItem:()=>e.title,origin:{title:e.title,unit:e.unit,dataIndex:o,key:e.key},pointer:t}}S.event.evented&&x.value.on("mouse:up",(t=>{if(3===t.button){const{x:o=0,y:n=0}=t.pointer||{};o>=N&&o<=J&&n>=W&&n<=B&&(E.point={x:o,y:n},E.show=!0,t.target?(E.target=t.target,E.list=["删除节点"],[...le].forEach((e=>{e.origin&&e.left===t.target.left&&e.top===t.target.top&&E.list.push({renderItem:()=>e.origin.title,origin:{...e.origin},mode:"remove",pointer:t.pointer})}))):(E.target=null,E.list=["新增节点"],re.filter((e=>e.show)).forEach((i=>{if(!M([...le],o,"key").includes(i.key)){if(["cervix","fetalPresentation"].includes(i.key)&&n<ee)return;E.list.push(e(i,t.pointer))}})),1===E.list.length&&(E.show=!1,Y("repeat"),console.log("当前时间段内无可新增节点"))))}}))}(),function(){const e=Q-Z/2;function t(e,t){if(!e.length)return;let n=W;const i=[];e.forEach((e=>{const o=(e.alias||e.title).split("").join("\n"),a=K.findIndex((t=>t.key===e.key));if(e.alias){const s=r([t,n],{value:o,...l,originY:"top",...e.titleStyle});o&&(n+=s.height+15,i.push(s))}else{const{text:r,icon:l}=s(o,e,{text:{originX:"center",originY:"top",left:t,top:n},icon:{left:t,topY:n,originX:"center",originY:"top",origin:{type:e.type,dataIndex:a},...S.event}},"vertical");n+=r.height+l.height+15,(c=l).on("moving",(()=>{c.set("originY","center"),H(c)?(ue(c),de(c)):P.show=!1})),c.on("mouseup:before",(e=>{if(P.show=!1,0===e.e.button&&H(c))if(M([...le],c.left,"key").includes(c.origin.key))Y("repeat");else{const e={data:{time:A(c.left),value:L(c.origin.key,c.top)},...c.origin};C("add",e),ae(e)}!function(e){e.setCoords().set({originY:"top",left:e.originLeft,top:e.originTop})}(c)})),i.push(r,l)}var c})),o(i),x.value.add(...i)}function o(e){const t=k(e),o=(B-W)/2,n=(t.height+t.top-W)/2;e.forEach((e=>{const t=e.top+o-n;e.set({top:t,originTop:t})}))}t($,R/2),t(q,e)}(),{clickMenu:function({item:e,target:t}){const o={...e.origin};"remove"===e.mode?(C("remove",o),ae(o,"remove")):(Object.assign(o,{data:{time:A(e.pointer.x),value:L(e.origin.key,e.pointer.y)}}),C("add",o),ae(o))},redrawPoints:ce}}export{x as useBirthProcess};
1
+ import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as t,drawArrow as o,drawPoint as n,defaultStyle as i,drawText as r,defaultTextStyle as l,drawTextAndIconGroup as s,defaultRectStyle as a}from"../useDraw.js";import{useGrid as c}from"../useGrid.js";import{useBirthProcessCumputedPoint as u}from"../useCumputedPoint.js";import"../useEvent.js";import"../useShadow.js";import{getScaleInfo as d,drawScaleNumber as h,drawScaleLine as f}from"../useScaleColumn.js";import{useCommon as p}from"../useCommon.js";import"vue";import{getIndex as g,isEffectiveNode as v,getTime as m,getScaleNumberList as y}from"../../utils/index.js";import{cloneDeep as b,last as w,range as j}from"lodash-es";import"../../constants/index.js";import"@vueuse/shared";import{format as k}from"date-fns";import"naive-ui";import"../surgicalAnesthesia/useTop.js";import"@vueuse/core";import"../surgicalAnesthesia/useOther.js";import"../../../../../shared/utils/index.js";function x(x,S,C,P,A){const{computedX:E,computedY:O,getXValue:X,getYValue:L}=u(S),{getEqualXTypes:M,handleAddPrevent:Y,isGridLimit:T,setPrevAndNextPoint:H,getPointEventProps:I}=p(x,C,S),{xAxis:D,grid:B,originX:G,originY:N,xCellWidth:W,endY:V,startTime:F,leftAddAreaWidth:R,leftScales:$,rightScales:q,yCellHeight:z,endX:J,scaleValues:K,canvasWidth:Q,borderStyle:U,rightAddAreaWidth:Z,event:_,originYCervix:ee,other:te,canvasHeight:oe,scalebarBorder:ne,padding:ie}=S,re=b(K),le=new Set;function se(){re.filter((({showData:e=!0})=>e)).forEach(((e,s)=>{var a;const c=[],u=[],d=[],{pointAttr:h={},lineAttr:f={},title:p="",key:g,type:v="circle",childbirthStyle:m={},surgicalDeliveryStyle:y={},dystociaStyle:b={}}=e;function w(r,l,s,a){if(l[s]){const{type:c="circle",style:u={},arrowStyle:h={}}=e[s+"Style"],p=E(l[s]),g=t([...r,p,r[1]],{...f,strokeDashArray:[4,2],...i}),v="dystocia"===s&&r[1]-N>=z?r[1]-z:r[1],m=n(c,{left:p,top:v,...u,...i}),y=v+m.height/2,b="dystocia"===s?o([p,y+z,y],f,"up"):null;g&&(d.push(g),a[s+"Line"]={obj:g,type:"line",left:p-r[0]}),m&&(d.push(m),a[s]={obj:m,left:p-r[0]}),b&&(d.push(b),a[s+"Arrow"]={obj:b,left:p-r[0],moveHide:!0})}}null==(a=e.data)||a.forEach(((a,y)=>{!function(a,y,b){let j,S;const A=e.data[b+1],E=he(A,e);if(a&&E&&!y.breakpoint)S=t([...a,...E],{...f});else if(a&&!E&&!y.breakpoint){const o=he(A,e);S=o?t([...a,...o],{...f}):null}const O={};if(["fetalPresentation","cervix"].includes(g)){let e,t;if(y.childbirth){const{type:s="arrow",style:c={},textStyle:u={}}=m;if("arrow"===s){const t=a[1]+z;e=o([a[0],a[1],t],c)}else e=n(s,{left:a[0],top:a[1],...c,...i,hoverCursor:"default"});t=r([a[0]+W/2,a[1]+z/2],{value:String(y.childbirth),...l,originX:"left",originY:"center",...u}),e&&(d.push(e),Object.assign(O,{childbirthIcon:{obj:e,type:s}})),t&&(d.push(t),Object.assign(O,{childbirthText:{obj:t,left:W/2,top:z/2}}))}}"fetalPresentation"===g&&(w(a,y,"surgicalDelivery",O),w(a,y,"dystocia",O));const M=u[b-1],Y={origin:{data:y,title:p,key:g||"",dataIndex:s,index:b},leftLine:M,rightLine:S,otherObj:O,...h,...I()};a&&(M||(Y.leftLine=null),j=n(v,{left:a[0],top:a[1],...Y}));u.push(S),j&&(!function(e){_.hovered&&(e.on("mouseover",(()=>{de(e,"hover")})),e.on("mouseout",(()=>{P.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{ue(e),function(e){var t,o;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(o=e.rightLine)||o.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:o,top:n=0,left:i=0,type:r="",moveHide:l}=t||{};o&&("line"===r?o.setCoords().set({x1:e.left,y1:e.top,x2:e.left+i,y2:e.top}):o.setCoords().set({left:e.left+i,top:e.top+n}),l&&(x.value.remove(o),delete e.otherObj.obj))}))}(e),_.hovered&&de(e)})),e.on("mouseup",(t=>{if(P.show=!1,1===t.button){const{key:t}=e.origin,o={...e.origin,data:{...e.origin.data,time:X(e.left),value:L(t,e.top)}};["surgicalDelivery","dystocia"].some((t=>{var n;(null==(n=e.otherObj[t])?void 0:n.obj)&&(o.data[t]=k(new Date(X(e.left+e.otherObj[t].left)),"yyyy-MM-dd HH:mm"))})),x.value.discardActiveObject(),C("change",o),ae(o,"change")}}))}(j),c.push(j),le.add(j))}(he(a,e),a,y)})),Promise.all(c).then((e=>{const t=u.filter((e=>e));H(e),Promise.all(d).then((o=>{x.value.add(...t,...e,...o),e.forEach((e=>{null==e||e.bringToFront();const{childbirthIcon:t}=e.otherObj||{};(null==t?void 0:t.obj)&&"arrow"!==(null==t?void 0:t.type)&&t.obj.bringToFront()}))}))}))}))}function ae(e,t="add"){const{dataIndex:o,data:n,index:i,key:r}=e,l=re.find((e=>e.key===r));switch(t){case"remove":l.data.splice(i,1);break;case"change":l.data[i]=n;break;default:{const e=g(n.time,l.data);l.data.splice(e,0,n);break}}ce()}function ce(){var e;le.size&&(null==(e=x.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),Object.values((null==e?void 0:e.otherObj)||{}).forEach((e=>{(null==e?void 0:e.obj)&&t.push(null==e?void 0:e.obj)}))})),t}([...le]))),le.clear(),se()}function ue(e){const t=e.prevPoint?e.prevPoint.left:G,o=e.nextPoint?e.nextPoint.left:J;e.setCoords(),["cervix","fetalPresentation"].includes(e.origin.key)&&e.top<ee&&e.set("top",ee),e.top<N&&e.set("top",N),e.top>V&&e.set("top",V),e.left<t&&e.set("left",t),e.left>o&&e.set("left",o)}function de(e,t="moving"){const{title:o,key:n,data:i}=e.origin;P.point={x:e.left,y:e.top},P.list=[`${o} ${"hover"===t?i.value:L(n,e.top)}`,`时间 ${X(e.left).slice(-5)}`],P.show=!0}function he(e,t){if(v(e)&&function(e){const t=F+864e5,o=m(e);return o>=F&&o<=t}(e.time)){const o=E(e.time),n=O(t.key,t.range,e.value);return[o,n<N?N:n>V?V:n]}}function fe(e,t){return e+1>t[1]?t[0]:e+1}return c(x,S),function(){const t=ne?{width:Q-R-Z-1,left:R}:{width:J-G-(q.length?0:1),left:G},o=new e.Rect({...U,height:V-ie[0]-1,top:ie[0],fill:"transparent",...t});x.value.add(o)}(),function(){function t(t,o="left"){let n="left"===o?R:J;t.forEach(((t,o)=>{const{range:s,spaceValue:c,width:u,title:p,titleStyle:g,key:v,position:m="center",spaceGridNumber:b=1,showNumber:w=!0,showMaxMinNumber:j=!0,showName:k=!0}=t,S=[],C=[],P=n+u/2,A=y(s,c),E=A.length,{lineXMain:O,lineXSub:X,textLeft:L}=d(m,n,u);A.forEach(((e,o)=>{const n=V-o*z*b,i=0===o?V-8:o!==A.length-1||!ie[0]||ee&&"FHR"!==v?n:N+8;!w||(0===o||o===E-1)&&!j||S.push(h(String(e),t,L,i)),C.push(...f(t,o,O,X,n,z,N,E,1))}));const M=[],Y=ne?new e.Rect({...a,strokeWidth:.5,width:u,height:V-ie[0],left:P,top:ie[0]+(V-ie[0])/2}):null;if(Y&&M.push(Y),k){const e=r([P,N-ie[0]>0?N-z/2:z/2],{value:String(p),...l,...g});e&&M.push(e)}const T=new e.Group([...C,...S,...M],{objectCaching:!1,...i});x.value.add(T),T.sendToBack(),n+=u}))}t($),t(q,"right")}(),function(){const{show:t,startTime:o,range:n=[0,23],position:s="top",style:a}=D.time,{show:c,range:u=[0,23],position:d,style:h={}}=D.processTime;if(t||c){const f=[],p=j(u[0],u[1]+1),g=[],v=[],m=z/2;for(let e=0;e<B.mainXCell;e++){if(t){const{textAlign:t="center"}=a,i=G+("center"===t?W/2:0),c=0===e&&"center"!==t?i+5:i,u=0===e?+o.slice(11,13):fe(w(f),n);f.push(u);const d="top"===s?N-m:V+m;g.push(r([c+e*W,d],{value:String(u),...l,...a})),e===B.mainXCell-1&&"center"!==t&&g.push(r([J-1,d],{value:String(fe(w(f),n)),...l,...a,originX:"center"!==t?"right":"center"}))}if(c&&e<=p.length){const{textAlign:t="center"}=h,o=G+("center"===t?W/2:0),n=0===e&&"center"!==t?o+5:o,i="top"===d?m:oe-m;v.push(r([n+e*W,i],{value:String(p[e]),...l,...h})),e===B.mainXCell-1&&"center"!==t&&v.push(r([J-1,i],{value:String(w(p)),...l,...a,originX:"center"!==t?"right":"center"}))}}const y=new e.Group([...g,...v],{objectCaching:!1,...i});x.value.add(y),x.value.sendToBack(y)}}(),function(){var e;const o=Object.values(te),n=[],i={},r=re.find((e=>"cervix"===e.key&&e.show)),l=null==(e=null==r?void 0:r.data)?void 0:e.find((e=>3==+e.value));function s(e,t){const{key:o,range:n}=r||{},i=O(o,n,10),l=[0,t],s=[-t/e,0],a=[(V-i-t)/e,V-i],c=[J-G,e*(J-G)+t];let u=[],d=[];function h([o,n]){return Math.abs(n-e*o-t)<=1}function f([e,t]){const[o,n]=[...p([e,t])];return o>=G&&o<=J&&n>=i&&n<=V}function p([e,t]){return[G+e,V-t]}return h(l)&&f(l)&&(u=p(l)),h(s)&&f(s)&&(u=p(s)),h(a)&&f(a)&&(d=p(a)),h(c)&&f(c)&&(d=p(c)),[...u,...d]}o.forEach((e=>{if(!e.show)return;const{key:o}=e;switch(o){case"fetalPresentation":{const{range:i,show:r}=re.find((e=>e.key===o));if(r){const r=O(o,i,0);n.push(t([G,r,J,r],{...e}))}break}case"alert":if(l){const{key:o,range:a}=r||{},c=216e5,u={time:k(new Date(m(l.time)+c),"yyyy-MM-dd HH:mm"),value:10},[d,h]=[E(l.time)-G,V-O(o,a,l.value)],[f,p]=[E(u.time)-G,V-O(o,a,u.value)],g=(p-h)/(f-d),v=h-d*g,y=s(g,v);y.length>0&&(n.push(t(y,{...e})),Object.assign(i,{k:g,b:v}))}break;case"handling":if(l){const{k:o,b:r}=i,a=144e5,c=s(o,r-(E(k(new Date(m(l.time)+a),"yyyy-MM-dd HH:mm"))-E(l.time))*o);c.length>0&&n.push(t(c,{...e}))}}})),x.value.add(...n)}(),se(),function(){function e(e,t){const o=re.findIndex((t=>t.key===e.key));return{renderItem:()=>e.title,origin:{title:e.title,unit:e.unit,dataIndex:o,key:e.key},pointer:t}}S.event.evented&&x.value.on("mouse:up",(t=>{var o,n;if(3===t.button){const{x:i=0,y:r=0}=t.pointer||{};i>=G&&i<=J&&r>=N&&r<=V&&(A.point={x:i,y:r},A.show=!0,t.target?(A.target=t.target,A.list=[(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.220"))||"删除节点"],[...le].forEach((e=>{e.origin&&e.left===t.target.left&&e.top===t.target.top&&A.list.push({renderItem:()=>e.origin.title,origin:{...e.origin},mode:"remove",pointer:t.pointer})}))):(A.target=null,A.list=[(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.219"))||"新增节点"],re.filter((e=>e.show)).forEach((o=>{if(!M([...le],i,"key").includes(o.key)){if(["cervix","fetalPresentation"].includes(o.key)&&r<ee)return;A.list.push(e(o,t.pointer))}})),1===A.list.length&&(A.show=!1,Y("repeat"),console.log("当前时间段内无可新增节点"))))}}))}(),function(){const e=Q-Z/2;function t(e,t){if(!e.length)return;let n=N;const i=[];e.forEach((e=>{const o=(e.alias||e.title).split("").join("\n"),a=K.findIndex((t=>t.key===e.key));if(e.alias){const s=r([t,n],{value:o,...l,originY:"top",...e.titleStyle});o&&(n+=s.height+15,i.push(s))}else{const{text:r,icon:l}=s(o,e,{text:{originX:"center",originY:"top",left:t,top:n},icon:{left:t,topY:n,originX:"center",originY:"top",origin:{type:e.type,dataIndex:a},...S.event}},"vertical");n+=r.height+l.height+15,(c=l).on("moving",(()=>{c.set("originY","center"),T(c)?(ue(c),de(c)):P.show=!1})),c.on("mouseup:before",(e=>{if(P.show=!1,0===e.e.button&&T(c))if(M([...le],c.left,"key").includes(c.origin.key))Y("repeat");else{const e={data:{time:X(c.left),value:L(c.origin.key,c.top)},...c.origin};C("add",e),ae(e)}!function(e){e.setCoords().set({originY:"top",left:e.originLeft,top:e.originTop})}(c)})),i.push(r,l)}var c})),o(i),x.value.add(...i)}function o(e){const t=w(e),o=(V-N)/2,n=(t.height+t.top-N)/2;e.forEach((e=>{const t=e.top+o-n;e.set({top:t,originTop:t})}))}t($,R/2),t(q,e)}(),{clickMenu:function({item:e,target:t}){const o={...e.origin};"remove"===e.mode?(C("remove",o),ae(o,"remove")):(Object.assign(o,{data:{time:X(e.pointer.x),value:L(e.origin.key,e.pointer.y)}}),C("add",o),ae(o))},redrawPoints:ce}}export{x as useBirthProcess};
@@ -11,5 +11,6 @@ export declare function useBirthProcessChart(canvas: Ref<fabric.Canvas>, props:
11
11
  useCaliper?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
12
12
  useCaliperRuler?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
13
13
  useRectRuler?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
14
+ redrawLinePoints?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
14
15
  propItems: any;
15
16
  };
@@ -1 +1 @@
1
- import{reactive as e,computed as a,watch as t,toRefs as l}from"vue";import{defaultBorderStyle as r}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import{getTime as u}from"../../utils/index.js";import"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";import{useBirthProcess as i}from"./useBirthProcess.js";function n(n,d,s,o,v,c){const h=e({select:null,redrawPoints:null,clickMenu:null}),m=a((()=>d.data.scaleValues.map((e=>{var a;return{...e,width:null!=(a=e.width)?a:60}})).filter((({layout:e="left",show:a=!0})=>"left"===e&&a)))),p=a((()=>d.data.scaleValues.map((e=>{var a;return{...e,width:null!=(a=e.width)?a:60}})).filter((({layout:e="left",show:a=!0})=>"right"===e&&a)))),f=a((()=>{var e;return(null==(e=p.value)?void 0:e.length)?30:0})),g=a((()=>{var e;return 30+(null==(e=m.value)?void 0:e.reduce(((e,a)=>e+=a.width),0))})),w=a((()=>{var e;const{width:a}=d.data,t=null==(e=p.value)?void 0:e.reduce(((e,a)=>e+=a.width),0);return a-f.value-t})),x=a((()=>d.data.grid.mainXCell)),y=a((()=>{const e=d.data.grid.mainYCell||14;return d.data.scaleValues.find((e=>e.show&&"FHR"===e.key))||14!==e?e:10})),V=a((()=>(w.value-g.value)/x.value)),b=a((()=>{const e=d.data.padding||[5,5],a=B("top"),t=B("bottom");return[a?0:e[0],t?0:e[1]]})),k=a((()=>{const{height:e}=d.data,a=B();return(e-b.value.reduce(((e,a)=>e+a),0))/(y.value+a)})),C=a((()=>{const e=B("top");return k.value*e+b.value[0]})),j=a((()=>{var e;const{scaleValues:a}=d.data;if(!(null==(e=a.find((e=>"FHR"===e.key)))?void 0:e.show)&&!C.value)return C.value;const t=a.find((e=>"cervix"===e.key)),[,l]=(null==t?void 0:t.range)||[0,10],r=(null==t?void 0:t.spaceValue)||1;return A.value-b.value[0]-l*r*k.value})),A=a((()=>{const{height:e}=d.data,a=B("bottom");return e-k.value*a-b.value[1]})),Y=a((()=>u(d.data.xAxis.time.startTime))),S=a((()=>36e5/V.value)),H=a((()=>{const{scaleValues:e}=d.data,a=e.find((e=>"cervix"===e.key));return k.value/((null==a?void 0:a.spaceValue)||1)})),P=a((()=>{const{scaleValues:e}=d.data,a=e.find((e=>"FHR"===e.key));return k.value/((null==a?void 0:a.spaceValue)||10)})),R=a((()=>{const{scaleValues:e}=d.data,a=e.find((e=>"fetalPresentation"===e.key));return k.value/((null==a?void 0:a.spaceValue)||1)})),X=a((()=>{var e;return(null==(e=d.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}}));function B(e){const{xAxis:a}=d.data;return Object.values(a).reduce(((a,t)=>(t.show&&(!e||e&&t.position===e)&&a++,a)),0)}const F=e({canvasWidth:d.data.width,canvasHeight:d.data.height,borderStyle:{...r,...d.data.borderStyle||{}},selectionStyle:d.data.selectionStyle||{},grid:d.data.grid,other:d.data.other,originX:g.value,endX:w.value,originY:C.value,endY:A.value,xCellWidth:V.value,yCellHeight:k.value,gridXNumber:x.value,gridYNumber:y.value,xAxis:d.data.xAxis,leftScales:m.value,rightScales:p.value,leftAddAreaWidth:30,rightAddAreaWidth:f.value,startTime:Y.value,timeXCell:S.value,cervixYCell:H.value,FHRYCell:P.value,fetalPresentationYCell:R.value,scaleValues:d.data.scaleValues,event:X.value,originYCervix:j.value,scalebarBorder:!Reflect.has(d.data,"scalebarBorder")||d.data.scalebarBorder,padding:b.value});return t((()=>n.value),(e=>{e&&function(){const{clickMenu:e,redrawPoints:a}=i(n,F,s,v,c);h.redrawPoints=a,h.clickMenu=e}()}),{immediate:!0}),{propItems:F,...l(h)}}export{n as useBirthProcessChart};
1
+ import{reactive as e,computed as a,watch as t,toRefs as l}from"vue";import{defaultBorderStyle as r}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import{getTime as u}from"../../utils/index.js";import"lodash-es";import"../useEvent.js";import"../useShadow.js";import"../useCommon.js";import"../../constants/index.js";import"@vueuse/shared";import"naive-ui";import"../surgicalAnesthesia/useTop.js";import"@vueuse/core";import"../surgicalAnesthesia/useOther.js";import"../../../../../shared/utils/index.js";import{useBirthProcess as i}from"./useBirthProcess.js";function s(s,n,d,o,v,c){const h=e({select:null,redrawPoints:null,clickMenu:null}),m=a((()=>n.data.scaleValues.map((e=>{var a;return{...e,width:null!=(a=e.width)?a:60}})).filter((({layout:e="left",show:a=!0})=>"left"===e&&a)))),p=a((()=>n.data.scaleValues.map((e=>{var a;return{...e,width:null!=(a=e.width)?a:60}})).filter((({layout:e="left",show:a=!0})=>"right"===e&&a)))),f=a((()=>{var e;return(null==(e=p.value)?void 0:e.length)?30:0})),g=a((()=>{var e;return 30+(null==(e=m.value)?void 0:e.reduce(((e,a)=>e+=a.width),0))})),w=a((()=>{var e;const{width:a}=n.data,t=null==(e=p.value)?void 0:e.reduce(((e,a)=>e+=a.width),0);return a-f.value-t})),x=a((()=>n.data.grid.mainXCell)),j=a((()=>{const e=n.data.grid.mainYCell||14;return n.data.scaleValues.find((e=>e.show&&"FHR"===e.key))||14!==e?e:10})),y=a((()=>(w.value-g.value)/x.value)),V=a((()=>{const e=n.data.padding||[5,5],a=B("top"),t=B("bottom");return[a?0:e[0],t?0:e[1]]})),b=a((()=>{const{height:e}=n.data,a=B();return(e-V.value.reduce(((e,a)=>e+a),0))/(j.value+a)})),A=a((()=>{const e=B("top");return b.value*e+V.value[0]})),C=a((()=>{var e;const{scaleValues:a}=n.data;if(!(null==(e=a.find((e=>"FHR"===e.key)))?void 0:e.show)&&!A.value)return A.value;const t=a.find((e=>"cervix"===e.key)),[,l]=(null==t?void 0:t.range)||[0,10],r=(null==t?void 0:t.spaceValue)||1;return k.value-V.value[0]-l*r*b.value})),k=a((()=>{const{height:e}=n.data,a=B("bottom");return e-b.value*a-V.value[1]})),Y=a((()=>u(n.data.xAxis.time.startTime))),S=a((()=>36e5/y.value)),H=a((()=>{const{scaleValues:e}=n.data,a=e.find((e=>"cervix"===e.key));return b.value/((null==a?void 0:a.spaceValue)||1)})),P=a((()=>{const{scaleValues:e}=n.data,a=e.find((e=>"FHR"===e.key));return b.value/((null==a?void 0:a.spaceValue)||10)})),R=a((()=>{const{scaleValues:e}=n.data,a=e.find((e=>"fetalPresentation"===e.key));return b.value/((null==a?void 0:a.spaceValue)||1)})),X=a((()=>{var e;return(null==(e=n.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}}));function B(e){const{xAxis:a}=n.data;return Object.values(a).reduce(((a,t)=>(t.show&&(!e||e&&t.position===e)&&a++,a)),0)}const F=e({canvasWidth:n.data.width,canvasHeight:n.data.height,borderStyle:{...r,...n.data.borderStyle||{}},selectionStyle:n.data.selectionStyle||{},grid:n.data.grid,other:n.data.other,originX:g.value,endX:w.value,originY:A.value,endY:k.value,xCellWidth:y.value,yCellHeight:b.value,gridXNumber:x.value,gridYNumber:j.value,xAxis:n.data.xAxis,leftScales:m.value,rightScales:p.value,leftAddAreaWidth:30,rightAddAreaWidth:f.value,startTime:Y.value,timeXCell:S.value,cervixYCell:H.value,FHRYCell:P.value,fetalPresentationYCell:R.value,scaleValues:n.data.scaleValues,event:X.value,originYCervix:C.value,scalebarBorder:!Reflect.has(n.data,"scalebarBorder")||n.data.scalebarBorder,padding:V.value});return t((()=>s.value),(e=>{e&&function(){const{clickMenu:e,redrawPoints:a}=i(s,F,d,v,c);h.redrawPoints=a,h.clickMenu=e}()}),{immediate:!0}),{propItems:F,...l(h)}}export{s as useBirthProcessChart};
@@ -1 +1 @@
1
- import{fabric as e}from"../../../../../../shared/utils/fabricjs/index.js";import{range as t}from"lodash-es";import{defaultStyle as n}from"../../useDraw.js";import{useElectrocardiogramCumputedPoint as o}from"../../useCumputedPoint.js";import"../../useEvent.js";import"vue";import"date-fns";import"../../temperature/useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";function r(r,i){const{scale:l,beforeEvent:a,endY:s,endX:u,showScaleText:c,showNumberText:p,detailRadius:y,points:f,lineStartIndex:h,xCellWidth:d,yCellHeight:m,grid:x={subLineStyle:{},mainLineStyle:{x:{},y:{}}}}=i;let w=null;const{computedX:g,computedY:v,getYValue:b}=o(i);function S(e){return g(e)*l}function L(e){return v(e)*l}function k(e){return b(e/l)}const M=m*l;function j(){var e;w&&(null==(e=r.canvas)||e.remove(w)),w=null}r.on("mousedown",(async o=>{var i,d;if(await(null==a?void 0:a()),1!==o.button||!o.target||!o.pointer)return;const m=o.target;if(!m.points)return;const{x:g,y:v}=o.pointer,b=Math.floor((g-m.left)/m.width*m.points.length)+h;let G=b-y,T=b+y;G<=0?(G=0,T=Math.min(2*y,f.length-1)):T>=f.length-1&&(T=f.length-1,G=Math.max(f.length-2*y,0));const C=f.slice(G,T).map(((e,t)=>({x:G+S(t),y:L(e)}))),W=b-G;let Y=0,$=0;C.forEach(((e,t)=>{e.y>C[Y].y&&(Y=t),e.y<C[$].y&&($=t)}));const E=S(2*y-1),X=C[Y].y-C[$].y-1,z=X+30+70,A={x:u-g<=E?g-E:g,y:s-v<=z?v-z:v};j(),w=new e.Group;const D=[new e.Rect({...n,left:A.x,top:A.y,width:E,height:z,stroke:"transparent",fill:"#fff",shadow:new e.Shadow({color:"rgba(0, 0, 0, 0.3)",blur:15,offsetX:8,offsetY:8})}),function(n,o){const r=e=>e%5?x.subLineStyle:null,i=M/5,l=30+n[Y].y/Math.abs(n[Y].y-n[$].y)*X,a=Math.ceil(l/i),s=Math.ceil((z-l)/i);function u(t,n){return new e.Line([A.x,A.y+t,A.x+E,A.y+t],{...x.mainLineStyle.x,...r(n)})}const c=new e.Group([...t(s).map((e=>u(e*i+l,e))),...t(a).map((e=>u(-e*i+l,e)))]),p=o/n.length*E,y=Math.ceil(p/i),f=Math.ceil((E-p)/i);function h(t,n){return new e.Line([A.x+t,A.y,A.x+t,A.y+z],{...x.mainLineStyle.y,...0===n?x.subLineStyle:r(n)})}const d=new e.Group([...t(f).map((e=>h(e*i+p,e))),...t(y).map((e=>h(-e*i+p,e)))]);return new e.Group([d,c])}(C,W),(H=C.map((({x:e,y:t})=>({x:e,y:-t}))),new e.Polyline(H,{...n,fill:"transparent",stroke:"red",strokeWidth:1,left:A.x,top:A.y+30})),function(t,o){const r={strokeDashArray:[3,4],width:3,top:A.y},i=new e.Line(s(t[Y]),{...n,...r,left:A.x+Y/t.length*E,stroke:"red"}),l=new e.Line(s(t[$]),{...n,...r,stroke:"blue",left:A.x+$/t.length*E}),a=new e.Line(s(t[o]),{...n,...r,stroke:"green",left:A.x+o/t.length*E});return new e.Group([i,l,a]);function s(e){return[e.x,e.y,e.x,e.y-z]}}(C,W),(P=C,R=W,new e.Circle({...n,radius:5,fill:"transparent",stroke:"green",strokeWidth:1,left:A.x+R/P.length*E-5,top:A.y+30+(P[Y].y-P[R].y)/Math.abs(P[Y].y-P[$].y)*X-5}))];var P,R,H;c&&D.push(new e.Text(`x${l}`,{...n,fill:"black",fontSize:20,left:A.x+10,top:A.y+z-30})),p&&D.push(function(t,o){const r={fontSize:16,left:A.x+E/2+10},i=new e.Text(`最大: ${k(t[Y].y)} mv`,{...n,...r,fill:"red",top:A.y+z-20}),l=new e.Text(`最小: ${k(t[$].y)} mv`,{...n,...r,fill:"blue",top:A.y+z-40}),a=new e.Text(`当前: ${k(t[o].y)} mv`,{...n,...r,fill:"green",top:A.y+z-60});return new e.Group([i,l,a])}(C,W)),w.add(...D).addWithUpdate(),null==(i=r.canvas)||i.add(w),null==(d=r.canvas)||d.discardActiveObject()})),r.on("mouseup",(async e=>{await(null==a?void 0:a()),1===e.button&&j()}))}export{r as useDetailEvent};
1
+ import{fabric as e}from"../../../../../../shared/utils/fabricjs/index.js";import{range as t}from"lodash-es";import{defaultStyle as n}from"../../useDraw.js";import{useElectrocardiogramCumputedPoint as o}from"../../useCumputedPoint.js";import"../../useEvent.js";import"../../useShadow.js";import"../../useCommon.js";import"vue";import"date-fns";import"../../../constants/index.js";import"@vueuse/shared";import"naive-ui";import"../../surgicalAnesthesia/useTop.js";import"@vueuse/core";import"../../surgicalAnesthesia/useOther.js";import"../../../../../../shared/utils/index.js";function r(r,i){const{scale:s,beforeEvent:l,endY:a,endX:u,showScaleText:p,showNumberText:c,detailRadius:y,points:f,lineStartIndex:h,xCellWidth:m,yCellHeight:d,grid:x={subLineStyle:{},mainLineStyle:{x:{},y:{}}}}=i;let w=null;const{computedX:g,computedY:v,getYValue:b}=o(i);function j(e){return g(e)*s}function S(e){return v(e)*s}function L(e){return b(e/s)}const k=d*s;function M(){var e;w&&(null==(e=r.canvas)||e.remove(w)),w=null}r.on("mousedown",(async o=>{var i,m;if(await(null==l?void 0:l()),1!==o.button||!o.target||!o.pointer)return;const d=o.target;if(!d.points)return;const{x:g,y:v}=o.pointer,b=Math.floor((g-d.left)/d.width*d.points.length)+h;let T=b-y,G=b+y;T<=0?(T=0,G=Math.min(2*y,f.length-1)):G>=f.length-1&&(G=f.length-1,T=Math.max(f.length-2*y,0));const C=f.slice(T,G).map(((e,t)=>({x:T+j(t),y:S(e)}))),A=b-T;let W=0,Y=0;C.forEach(((e,t)=>{e.y>C[W].y&&(W=t),e.y<C[Y].y&&(Y=t)}));const $=j(2*y-1),E=C[W].y-C[Y].y-1,X=E+30+70,z={x:u-g<=$?g-$:g,y:a-v<=X?v-X:v};M(),w=new e.Group;const D=[new e.Rect({...n,left:z.x,top:z.y,width:$,height:X,stroke:"transparent",fill:"#fff",shadow:new e.Shadow({color:"rgba(0, 0, 0, 0.3)",blur:15,offsetX:8,offsetY:8})}),function(n,o){const r=e=>e%5?x.subLineStyle:null,i=k/5,s=30+n[W].y/Math.abs(n[W].y-n[Y].y)*E,l=Math.ceil(s/i),a=Math.ceil((X-s)/i);function u(t,n){return new e.Line([z.x,z.y+t,z.x+$,z.y+t],{...x.mainLineStyle.x,...r(n)})}const p=new e.Group([...t(a).map((e=>u(e*i+s,e))),...t(l).map((e=>u(-e*i+s,e)))]),c=o/n.length*$,y=Math.ceil(c/i),f=Math.ceil(($-c)/i);function h(t,n){return new e.Line([z.x+t,z.y,z.x+t,z.y+X],{...x.mainLineStyle.y,...0===n?x.subLineStyle:r(n)})}const m=new e.Group([...t(f).map((e=>h(e*i+c,e))),...t(y).map((e=>h(-e*i+c,e)))]);return new e.Group([m,p])}(C,A),(R=C.map((({x:e,y:t})=>({x:e,y:-t}))),new e.Polyline(R,{...n,fill:"transparent",stroke:"red",strokeWidth:1,left:z.x,top:z.y+30})),function(t,o){const r={strokeDashArray:[3,4],width:3,top:z.y},i=new e.Line(a(t[W]),{...n,...r,left:z.x+W/t.length*$,stroke:"red"}),s=new e.Line(a(t[Y]),{...n,...r,stroke:"blue",left:z.x+Y/t.length*$}),l=new e.Line(a(t[o]),{...n,...r,stroke:"green",left:z.x+o/t.length*$});return new e.Group([i,s,l]);function a(e){return[e.x,e.y,e.x,e.y-X]}}(C,A),(O=C,P=A,new e.Circle({...n,radius:5,fill:"transparent",stroke:"green",strokeWidth:1,left:z.x+P/O.length*$-5,top:z.y+30+(O[W].y-O[P].y)/Math.abs(O[W].y-O[Y].y)*E-5}))];var O,P,R;p&&D.push(new e.Text(`x${s}`,{...n,fill:"black",fontSize:20,left:z.x+10,top:z.y+X-30})),c&&D.push(function(t,o){const r={fontSize:16,left:z.x+$/2+10},i=new e.Text(`最大: ${L(t[W].y)} mv`,{...n,...r,fill:"red",top:z.y+X-20}),s=new e.Text(`最小: ${L(t[Y].y)} mv`,{...n,...r,fill:"blue",top:z.y+X-40}),l=new e.Text(`当前: ${L(t[o].y)} mv`,{...n,...r,fill:"green",top:z.y+X-60});return new e.Group([i,s,l])}(C,A)),w.add(...D).addWithUpdate(),null==(i=r.canvas)||i.add(w),null==(m=r.canvas)||m.discardActiveObject()})),r.on("mouseup",(async e=>{await(null==l?void 0:l()),1===e.button&&M()}))}export{r as useDetailEvent};
@@ -1 +1 @@
1
- import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{useThrottleFn as t}from"@vueuse/core";import{range as r}from"lodash-es";import{useDetailEvent as n}from"./hooks/useDetailEvent.js";import{defaultStyle as o,drawLine as i}from"../useDraw.js";import{useGrid as a}from"../useGrid.js";import{useElectrocardiogramCumputedPoint as l}from"../useCumputedPoint.js";import"../useEvent.js";import"vue";import"date-fns";import"../temperature/useShadow.js";import{ECG as s}from"../../constants/index.js";import"@vueuse/shared";import"naive-ui";function u(u,d,c){const{computedX:m,computedY:h}=l(d),{borderStyle:f,originX:L,originY:g,xCellWidth:p,yCellHeight:E,canvasWidth:x,canvasHeight:M,dataList:v,columnNumber:C,gridYNumber:N,gridXNumber:y,rowNumber:b,lineStyle:S,titleStyle:w,config:A,calibrationLineHeight:j}=d,R=new Set,U=new Set;function X(e=[]){return~~(e.length/C)*(A.mainXCellValue/s.DEFAULTMAINXCELLVALUE)}function B(t=0){v.forEach(((r,n)=>{if(n===v.length-1&&arguments.length)return;const{x:o,y:i,rowIdx:a}=r.origin,l=X(r.data),u=r.data.reduce(((e,r,o)=>{const a=n<s.MAXLINENUMBER-1&&o>=t&&o<=t+l||n===s.MAXLINENUMBER-1?[{x:m(e.length+1),y:h(-+r)+i}]:[];return e.concat(a)}),[]),f=new e.Polyline(u,{...S,fill:"transparent",strokeWidth:1,left:o,hasControls:!1,hasBorders:!1,hoverCursor:"default",lockMovementX:!0,lockMovementY:!0,objectCaching:!0,evented:!0,selectable:!0});if(k(f,{...d.config,...d,lineStartIndex:t,points:r.data,scale:4,showScaleText:!0,showNumberText:!0,detailRadius:370,beforeEvent:()=>c.value&&Promise.reject()}),f.startIdx=t,n<v.length-1?R.add(f):U.add(f),arguments.length)return;I({x:o,y:i},S);const L=new e.Text(String(r.title),{...w,left:o+(4===C?p:p/2),top:i,originX:"left",originY:"bottom"});U.add(L)}));const r=arguments.length?[...R]:[...R,...U];u.value.add(...r)}function k(e,t){n(e,t)}function I({x:t,y:r},n){if(4===C)return;const i=t-p,a=p/s.SMALLCELLNUMBER,l=new e.Polyline([{x:i,y:r},{x:i+a,y:r},{x:i+a,y:r-j},{x:i+3*a,y:r-j},{x:i+3*a,y:r},{x:i+4*a,y:r}],{...n,fill:"transparent",strokeWidth:1,left:i,...o});U.add(l)}a(u,{...d,gridXNumber:y*s.SMALLCELLNUMBER,gridYNumber:N*s.SMALLCELLNUMBER,xCellWidth:p/s.SMALLCELLNUMBER,yCellHeight:E/s.SMALLCELLNUMBER,grid:{...d.grid,subXCell:s.SMALLCELLNUMBER,subYCell:s.SMALLCELLNUMBER}}),function(){const{strokeWidth:t}=f,r=new e.Rect({...f,width:x-t,height:M-t,left:L,top:g,fill:"transparent"});u.value.add(r)}(),function(){const e=x/C,t=[];r(C).forEach((r=>{if(r+1>=C)return;const n=(r+1)*e,o=i([n,0,n,M],{stroke:"#000"});t.push(o)})),u.value.add(...t)}(),B();return{updatePolyline:t((t=>{const r=X(v[v.length-1].data);if(r===v[0].data.length)return;const n=v[v.length-1].data.length,o=t/100*n-r/2,i=o+r>n?n-r:Math.max(0,o);e.util.requestAnimFrame((()=>{if(R.size){const[e]=[...R];if(e.startIdx===i)return;[...R].forEach((e=>u.value.remove(e))),R.clear()}B(i)}))}),150)}}export{u as useElectrocardiogram};
1
+ import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{useThrottleFn as t}from"@vueuse/core";import{range as r}from"lodash-es";import{useDetailEvent as o}from"./hooks/useDetailEvent.js";import{defaultStyle as i,drawLine as n}from"../useDraw.js";import{useGrid as s}from"../useGrid.js";import{useElectrocardiogramCumputedPoint as a}from"../useCumputedPoint.js";import"../useEvent.js";import"../useShadow.js";import"../useCommon.js";import"vue";import"date-fns";import{ECG as l}from"../../constants/index.js";import"@vueuse/shared";import"naive-ui";import"../surgicalAnesthesia/useTop.js";import"../surgicalAnesthesia/useOther.js";import"../../../../../shared/utils/index.js";function u(u,d,c){const{computedX:m,computedY:h}=a(d),{borderStyle:f,originX:L,originY:g,xCellWidth:p,yCellHeight:E,canvasWidth:x,canvasHeight:M,dataList:C,columnNumber:v,gridYNumber:N,gridXNumber:y,rowNumber:b,lineStyle:S,titleStyle:j,config:A,calibrationLineHeight:w}=d,R=new Set,U=new Set;function X(e=[]){return~~(e.length/v)*(A.mainXCellValue/l.DEFAULTMAINXCELLVALUE)}function B(t=0){C.forEach(((r,o)=>{if(o===C.length-1&&arguments.length)return;const{x:i,y:n,rowIdx:s}=r.origin,a=X(r.data),u=r.data.reduce(((e,r,i)=>{const s=o<l.MAXLINENUMBER-1&&i>=t&&i<=t+a||o===l.MAXLINENUMBER-1?[{x:m(e.length+1),y:h(-+r)+n}]:[];return e.concat(s)}),[]),f=new e.Polyline(u,{...S,fill:"transparent",strokeWidth:1,left:i,hasControls:!1,hasBorders:!1,hoverCursor:"default",lockMovementX:!0,lockMovementY:!0,objectCaching:!0,evented:!0,selectable:!0});if(k(f,{...d.config,...d,lineStartIndex:t,points:r.data,scale:4,showScaleText:!0,showNumberText:!0,detailRadius:370,beforeEvent:()=>c.value&&Promise.reject()}),f.startIdx=t,o<C.length-1?R.add(f):U.add(f),arguments.length)return;I({x:i,y:n},S);const L=new e.Text(String(r.title),{...j,left:i+(4===v?p:p/2),top:n,originX:"left",originY:"bottom"});U.add(L)}));const r=arguments.length?[...R]:[...R,...U];u.value.add(...r)}function k(e,t){o(e,t)}function I({x:t,y:r},o){const n=t-p,s=p/l.SMALLCELLNUMBER,a=new e.Polyline([{x:n,y:r},{x:n+s,y:r},{x:n+s,y:r-w},{x:n+3*s,y:r-w},{x:n+3*s,y:r},{x:n+4*s,y:r}],{...o,fill:"transparent",strokeWidth:1,left:n,...i});U.add(a)}s(u,{...d,gridXNumber:y*l.SMALLCELLNUMBER,gridYNumber:N*l.SMALLCELLNUMBER,xCellWidth:p/l.SMALLCELLNUMBER,yCellHeight:E/l.SMALLCELLNUMBER,grid:{...d.grid,subXCell:l.SMALLCELLNUMBER,subYCell:l.SMALLCELLNUMBER}}),function(){const{strokeWidth:t}=f,r=new e.Rect({...f,width:x-t,height:M-t,left:L,top:g,fill:"transparent"});u.value.add(r)}(),function(){const e=x/v,t=[];r(v).forEach((r=>{if(r+1>=v)return;const o=(r+1)*e,i=n([o,0,o,M],{stroke:"#000"});t.push(i)})),u.value.add(...t)}(),B();return{updatePolyline:t((t=>{const r=X(C[C.length-1].data);if(r===C[0].data.length)return;const o=C[C.length-1].data.length,i=t/100*o-r/2,n=i+r>o?o-r:Math.max(0,i);e.util.requestAnimFrame((()=>{if(R.size){const[e]=[...R];if(e.startIdx===n)return;[...R].forEach((e=>u.value.remove(e))),R.clear()}B(n)}))}),150)}}export{u as useElectrocardiogram};
@@ -17,5 +17,6 @@ export declare function useElectrocardiogramChart(canvas: Ref<fabric.Canvas>, pr
17
17
  useCaliper?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
18
18
  useCaliperRuler?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
19
19
  useRectRuler?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
20
+ redrawLinePoints?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
20
21
  propItems: any;
21
22
  };
@@ -1 +1 @@
1
- import{reactive as e,computed as a,unref as t,watch as u,toRefs as l}from"vue";import{defaultBorderStyle as r,defaultLineStyle as i,defaultTextStyle as n}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import{cloneDeep as o,isNumber as d,last as s}from"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import{ECG as v}from"../../constants/index.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";import{useElectrocardiogram as m}from"./useElectrocardiogram.js";import{useMeasureInstrument as c}from"./useMeasureInstrument.js";function g(g,h,p,f,N,b){const M=e({updatePolyline:null,useMeasureRuler:null,useCaliper:null,useCaliperRuler:null,useRectRuler:null}),y=a((()=>h.data.width)),R=a((()=>h.data.height)),C=a((()=>{const{dataList:e=[],config:a={}}=h.data,t=o(e),u=t.find((e=>a.lastDataKey&&e.key===a.lastDataKey));return u?[...t,u]:t})),L=a((()=>(y.value-0)/S.value)),x=a((()=>(R.value-0)/w.value)),S=a((()=>{var e,a,t;const{config:u,grid:l}=h.data;if(d(l.gridXNumber))return l.gridXNumber;const r=(null!=(t=null==(a=null==(e=s(C.value))?void 0:e.data)?void 0:a.length)?t:0)/u.hz;return Math.ceil(r/u.mainXCellValue)})),w=a((()=>{const{config:e,grid:a}=h.data;if(d(a.gridYNumber))return a.gridYNumber;const t=C.value.length;return Math.ceil(E.value*t*2/e.mainYCellValue)})),E=a((()=>{var e;const{config:a}=h.data,t=null==(e=s(C.value))?void 0:e.data,u=Math.max(...t)-Math.min(...t);return"uv"===a.valueUnit?.001*u:"v"===a.valueUnit?1e3*u:u})),X=a((()=>{var e;return(null==(e=h.data.grid)?void 0:e.event)||{selectable:!0,evented:!0}})),Y=a((()=>{const{mode:e="2-6"}=h.data,[a,t]=e.split("-").map((e=>+e));return{columnNumber:a,rowNumber:t}})),j=a((()=>{const{rowNumber:e}=Y.value,a=C.value.length;return Math.round(w.value/(e+(a===v.MAXLINENUMBER?1:0)))})),I=a((()=>{const{width:e,config:a,grid:t}=h.data,{columnNumber:u,rowNumber:l}=Y.value,r=e/u,i=C.value.length,n=Math.ceil(j.value/2),o=function(){const{valueUnit:e,mainYCellValue:t}=a,l=C.value[0].data,r=o(Math.max(...l));if(2!==u)return r;const i=C.value[6].data,n=o(Math.max(...i));return Math.max(r,n);function o(a){return("uv"===e?.001*a:"v"===e?1e3*a:a)/t*x.value}}(),d=x.value*n,s=1===u||d<o?x.value*Math.ceil(o/x.value):d,m=4===u?0:L.value;return C.value.map(((e,a)=>{const t=v.MAXLINENUMBER===i&&a===i-1?l:a%l;return{...e,origin:{x:(v.MAXLINENUMBER===i&&a===i-1?0:Math.floor(a/l))*r+m,y:t*(x.value*j.value)+s,rowIdx:t}}}))})),U=a((()=>{var e;const{calibrationLineGridYNumber:a,mainYCellValue:t}=(null==(e=h.data)?void 0:e.config)||{};return a?x.value*a:t?x.value/t:x.value})),A=e({canvasWidth:h.data.width,canvasHeight:h.data.height,borderStyle:{...r,...h.data.borderStyle},lineStyle:{...i,...h.data.lineStyle},titleStyle:{...n,...h.data.titleStyle},measureLineStyle:{...i,...h.data.measureLineStyle},measureTextStyle:{...n,...h.data.measureTextStyle},grid:h.data.grid,originX:0,endX:y.value,originY:0,endY:R.value,xCellWidth:L.value,yCellHeight:x.value,gridXNumber:S.value,gridYNumber:w.value,event:X.value,dataList:I.value,columnNumber:t(Y).columnNumber,rowNumber:t(Y).rowNumber,config:h.data.config,calibrationLineHeight:t(U)});return u((()=>g.value),(e=>{e&&function(){const{useMeasureRuler:e,flag:a,useCaliper:t,useCaliperRuler:u,useRectRuler:l}=c(g,A),{updatePolyline:r}=m(g,A,a);M.useMeasureRuler=e,M.useCaliper=t,M.useCaliperRuler=u,M.updatePolyline=r,M.useRectRuler=l}()}),{immediate:!0}),{propItems:A,...l(M),getGridInfo:function(){return{cellWidth:L.value,cellHeight:x.value,smallCellNumber:v.SMALLCELLNUMBER}}}}export{g as useElectrocardiogramChart};
1
+ import{reactive as e,computed as a,unref as t,watch as u,toRefs as l}from"vue";import{defaultBorderStyle as r,defaultLineStyle as i,defaultTextStyle as n}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import{cloneDeep as o,isNumber as s,last as d}from"lodash-es";import"../useEvent.js";import"../useShadow.js";import"../useCommon.js";import{ECG as m}from"../../constants/index.js";import"@vueuse/shared";import"naive-ui";import"../surgicalAnesthesia/useTop.js";import"@vueuse/core";import"../surgicalAnesthesia/useOther.js";import"../../../../../shared/utils/index.js";import{useElectrocardiogram as v}from"./useElectrocardiogram.js";import{useMeasureInstrument as c}from"./useMeasureInstrument.js";function g(g,h,p,f,N,b){const M=e({updatePolyline:null,useMeasureRuler:null,useCaliper:null,useCaliperRuler:null,useRectRuler:null}),y=a((()=>h.data.width)),R=a((()=>h.data.height)),C=a((()=>{const{dataList:e=[],config:a={}}=h.data,t=o(e),u=t.find((e=>a.lastDataKey&&e.key===a.lastDataKey));return u?[...t,u]:t})),x=a((()=>(y.value-0)/j.value)),L=a((()=>(R.value-0)/S.value)),j=a((()=>{var e,a,t;const{config:u,grid:l}=h.data;if(s(l.gridXNumber))return l.gridXNumber;const r=(null!=(t=null==(a=null==(e=d(C.value))?void 0:e.data)?void 0:a.length)?t:0)/u.hz;return Math.ceil(r/u.mainXCellValue)})),S=a((()=>{const{config:e,grid:a}=h.data;if(s(a.gridYNumber))return a.gridYNumber;const t=C.value.length;return Math.ceil(w.value*t*2/e.mainYCellValue)})),w=a((()=>{var e;const{config:a}=h.data,t=null==(e=d(C.value))?void 0:e.data,u=Math.max(...t)-Math.min(...t);return"uv"===a.valueUnit?.001*u:"v"===a.valueUnit?1e3*u:u})),E=a((()=>{var e;return(null==(e=h.data.grid)?void 0:e.event)||{selectable:!0,evented:!0}})),X=a((()=>{const{mode:e="2-6"}=h.data,[a,t]=e.split("-").map((e=>+e));return{columnNumber:a,rowNumber:t}})),Y=a((()=>{const{rowNumber:e}=X.value,a=C.value.length;return Math.round(S.value/(e+(a===m.MAXLINENUMBER?1:0)))})),I=a((()=>{const{width:e,config:a,grid:t}=h.data,{columnNumber:u,rowNumber:l}=X.value,r=e/u,i=C.value.length,n=Math.ceil(Y.value/2),o=function(){const{valueUnit:e,mainYCellValue:t}=a,l=C.value[0].data,r=o(Math.max(...l));if(2!==u)return r;const i=C.value[6].data,n=o(Math.max(...i));return Math.max(r,n);function o(a){return("uv"===e?.001*a:"v"===e?1e3*a:a)/t*L.value}}(),s=L.value*n,d=1===u||s<o?L.value*Math.ceil(o/L.value):s,v=x.value;return C.value.map(((e,a)=>{const t=m.MAXLINENUMBER===i&&a===i-1?l:a%l;return{...e,origin:{x:(m.MAXLINENUMBER===i&&a===i-1?0:Math.floor(a/l))*r+v,y:t*(L.value*Y.value)+d,rowIdx:t}}}))})),U=a((()=>{var e;const{calibrationLineGridYNumber:a,mainYCellValue:t}=(null==(e=h.data)?void 0:e.config)||{};return a?L.value*a:t?L.value/t:L.value})),A=e({canvasWidth:h.data.width,canvasHeight:h.data.height,borderStyle:{...r,...h.data.borderStyle},lineStyle:{...i,...h.data.lineStyle},titleStyle:{...n,...h.data.titleStyle},measureLineStyle:{...i,...h.data.measureLineStyle},measureTextStyle:{...n,...h.data.measureTextStyle},grid:h.data.grid,originX:0,endX:y.value,originY:0,endY:R.value,xCellWidth:x.value,yCellHeight:L.value,gridXNumber:j.value,gridYNumber:S.value,event:E.value,dataList:I.value,columnNumber:t(X).columnNumber,rowNumber:t(X).rowNumber,config:h.data.config,calibrationLineHeight:t(U)});return u((()=>g.value),(e=>{e&&function(){const{useMeasureRuler:e,flag:a,useCaliper:t,useCaliperRuler:u,useRectRuler:l}=c(g,A),{updatePolyline:r}=v(g,A,a);M.useMeasureRuler=e,M.useCaliper=t,M.useCaliperRuler=u,M.updatePolyline=r,M.useRectRuler=l}()}),{immediate:!0}),{propItems:A,...l(M),getGridInfo:function(){return{cellWidth:x.value,cellHeight:L.value,smallCellNumber:m.SMALLCELLNUMBER}}}}export{g as useElectrocardiogramChart};
@@ -1 +1 @@
1
- import{ref as e}from"vue";import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as o,drawText as r}from"../useDraw.js";import{useElectrocardiogramCumputedPoint as i}from"../useCumputedPoint.js";import"../useEvent.js";import{isNumber as n}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";function l(l,s){const{getXValue:u,getYValue:c}=i(s),{yCellHeight:a,xCellWidth:h,measureLineStyle:d,measureTextStyle:f}=s,p=e(!1),x={origin:{x:0,y:0},obj:null,rendering:!1,type:"line"},m={origin:{x:300,y:10},caliper:{width:4*h,height:60,rect:null},caliperRuler:{width:6*h,height:120,rect:null},rectRuler:{width:12*h,height:120,rect:null}};function v(){x.obj&&(l.value.remove(x.obj),x.obj.text&&l.value.remove(x.obj.text),x.obj=null)}function g(){p.value||(p.value=!0)}function y(e,o){L();const{width:i,height:n,rect:s}=m[e];if(s)return;let u;const{x:c,y:a}=o||m.origin,h=a+m.caliper.height,p=["caliper","rectRuler"].includes(e);m[e].rect=new t.Rect({left:c,top:a,width:i,height:n,strokeWidth:0,fill:"transparent",hasControls:!1,hasBorders:!1,hoverCursor:"move"});const x={...d,hasControls:!1,hasBorders:!1,hoverCursor:"e-resize",strokeWidth:2,__type:e,evented:!0,selectable:!0},v=new t.Line([c,a,c,a+n],{...x,lockMovementY:!0,originX:"center"}),g=new t.Line([c+i,a,c+i,a+n],{...x,lockMovementY:!0,originX:"center"}),y=new t.Line([c,h,c+i,h],{...x,lockMovementX:!0,evented:p,hoverCursor:p?"n-resize":"default",originY:"center"});let w=C({x1:y.x1,x2:y.x2}).millisecond;if("rectRuler"===e){const{millivolt:e,millisecond:o,bpm:r}=C({x1:c+i,x2:c,y1:a+n,y2:a});w=`测量幅度:${e}\n测试时间:${o}\n瞬时心率:${r}`,y.set({y1:a,y2:a}),u=new t.Line([c,a+n,c+i,a+n],{...x,lockMovementX:!0,evented:!0,hoverCursor:"n-resize",originY:"center"})}const j=r([c,("rectRuler"===e?u.top:y.top)+10],{value:w,...f,originX:"left",originY:"top",backgroundColor:"#fff"});v.rect=m[e].rect,g.rect=m[e].rect,y.rect=m[e].rect,u&&(u.rect=m[e].rect),Object.assign(m[e].rect,{leftLine:v,rightLine:g,horizontalLine:y,horizontalLine2:u,text:j}),function(e,t){e.on("moving",(()=>{const{leftLine:o,rightLine:r,horizontalLine:i,horizontalLine2:n,text:l}=e;null==o||o.setCoords().set({x1:e.left,y1:e.top,x2:e.left,y2:e.top+e.height}),null==r||r.setCoords().set({x1:e.left+e.width,y1:e.top,x2:e.left+e.width,y2:e.top+e.height});const s=["caliper","rectRuler"].includes(t)?e.top+e.height:e.top+e.height/2;l.setCoords().set({left:e.left,top:s+10}),"rectRuler"===t?(null==i||i.setCoords().set({x1:e.left,x2:e.left+e.width,y1:e.top,y2:e.top}),null==n||n.setCoords().set({x1:e.left,y1:s,x2:e.left+e.width,y2:s})):null==i||i.setCoords().set({x1:e.left,y1:s,x2:e.left+e.width,y2:s})})),e.on("mouseup",(t=>{var o;1===t.button&&(l.value.discardActiveObject(),e.leftLine.bringToFront(),e.rightLine.bringToFront(),e.horizontalLine.bringToFront(),null==(o=e.horizontalLine2)||o.bringToFront())}))}(m[e].rect,e),b(v,"left"),b(g,"right"),p&&b(y,"horizontal"),u&&b(u,"horizontal2");const z=[m[e].rect,v,g,y,u,j].filter((e=>!!e));l.value.add(...z)}function C({x1:e,x2:t,y1:o,y2:r}){const i=(1e3*u(Math.abs(t-e))).toFixed(3);return{millisecond:`${i}ms`,millivolt:`${n(o)&&n(r)?c(Math.abs(r-o)).toFixed(3):0}mv`,bpm:`${(6e4/+i).toFixed(3)}bpm`}}function b(e,t){e.on("moving",(()=>{const{rect:o}=e;if(!o)return;const{leftLine:r,rightLine:i,horizontalLine:n,horizontalLine2:l,text:s}=o;if(("horizontal"===t&&!l||"horizontal2"===t)&&(e.top<=o.top?e.setCoords().set({y1:o.top,y2:o.top}):e.setCoords().set({y1:e.top,y2:e.top}),o.setCoords().set({height:e.top-o.top}),null==r||r.setCoords().set({y2:e.top}),null==i||i.setCoords().set({y2:e.top}),s.setCoords().set({top:e.top+10}),!l))return;"horizontal"===t&&l&&(e.top>=l.top?e.setCoords().set({y1:l.top,y2:l.top}):e.setCoords().set({y1:e.top,y2:e.top}),o.setCoords().set({top:e.top,height:l.top-e.top}),null==r||r.setCoords().set({y1:e.top}),null==i||i.setCoords().set({y1:e.top}),s.setCoords().set({top:l.top+10})),"left"===t&&(e.left>=i.left?e.setCoords().set({x1:i.left,x2:i.left}):e.setCoords().set({x1:e.left,x2:e.left}),o.setCoords().set({left:e.left,width:i.left-e.left}),n.setCoords().set({x1:e.left}),null==l||l.setCoords().set({x1:e.left}),s.setCoords().set({left:e.left})),"right"===t&&(e.left<=r.left?e.setCoords().set({x1:r.left,x2:r.left}):e.setCoords().set({x1:e.left,x2:e.left}),o.setCoords().set({width:e.left-r.left}),n.setCoords().set({x2:e.left}),null==l||l.setCoords().set({x2:e.left}));const{millivolt:u,millisecond:c,bpm:a}=C({x1:n.x1,x2:n.x2,y1:r.y1,y2:r.y2}),h=l?`测量幅度:${u}\n测试时间:${c}\n瞬时心率:${a}`:c;s.set("text",h)}))}function L(){Object.values(m).forEach((e=>{const{rect:t}=e;t&&(l.value.remove(t),t.leftLine&&l.value.remove(t.leftLine),t.rightLine&&l.value.remove(t.rightLine),t.horizontalLine&&l.value.remove(t.horizontalLine),t.horizontalLine2&&l.value.remove(t.horizontalLine2),t.text&&l.value.remove(t.text),e.rect=null)})),v()}return l.value.on("mouse:down",(e=>{if(1===e.button&&p.value){const{x:t=0,y:o=0}=e.pointer||{};L(),x.rendering=!0,x.origin={x:t,y:o}}})),l.value.on("mouse:up",(e=>{const{button:t}=e;1===t&&p.value&&setTimeout((()=>{if(p.value=!1,x.rendering&&(x.rendering=!1),"rect"===x.type){const{width:e,height:t}=x.obj,o={x:Math.min(x.origin.x,x.origin.x+e),y:Math.min(x.origin.y,x.origin.y+t)+2};m.rectRuler.width=Math.abs(e),m.rectRuler.height=Math.abs(t),v(),y("rectRuler",o)}})),3===t&&L()})),l.value.on("mouse:move",(e=>{if(1===e.button&&p.value&&x.rendering){const{x:i=0,y:n=0}=e.pointer||{};if(v(),"line"===x.type){const{x:e,y:t}=x.origin;x.obj=o([e,t,i,n],d);const{millivolt:s,millisecond:u}=C({x1:e,x2:i,y1:t,y2:n}),c=r([i,n+2*a],{value:`${s}\n${u}`,...f});x.obj.text=c,l.value.add(x.obj,c)}else!function({x:e,y:o}){const{x:i,y:n}=x.origin;x.obj=new t.Rect({...d,objectCaching:!1,fill:"transparent",left:i,top:n,width:e-i,height:o-n,strokeWidth:2});const{millivolt:s,millisecond:u,bpm:c}=C({x1:i,x2:e,y1:n,y2:o}),a=r([i,o+10],{value:`测量幅度:${s}\n测试时间:${u}\n瞬时心率:${c}`,...f,originX:"left",originY:"top",backgroundColor:"#fff"});x.obj.text=a,l.value.add(x.obj,a)}({x:i,y:n})}})),{flag:p,useMeasureRuler:function(){g(),x.type="line"},useCaliper:function(){y("caliper")},useCaliperRuler:function(){y("caliperRuler")},useRectRuler:function(){g(),x.type="rect"}}}export{l as useMeasureInstrument};
1
+ import{ref as e}from"vue";import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as o,drawText as i}from"../useDraw.js";import{useElectrocardiogramCumputedPoint as r}from"../useCumputedPoint.js";import"../useEvent.js";import"../useShadow.js";import"../useCommon.js";import{isNumber as n}from"lodash-es";import"date-fns";import"../../constants/index.js";import"@vueuse/shared";import"naive-ui";import"../surgicalAnesthesia/useTop.js";import"@vueuse/core";import"../surgicalAnesthesia/useOther.js";import"../../../../../shared/utils/index.js";function l(l,s){const{getXValue:u,getYValue:c}=r(s),{yCellHeight:a,xCellWidth:h,measureLineStyle:d,measureTextStyle:f}=s,p=e(!1),x={origin:{x:0,y:0},obj:null,rendering:!1,type:"line"},m={origin:{x:300,y:10},caliper:{width:4*h,height:60,rect:null},caliperRuler:{width:6*h,height:120,rect:null},rectRuler:{width:12*h,height:120,rect:null}};function g(){x.obj&&(l.value.remove(x.obj),x.obj.text&&l.value.remove(x.obj.text),x.obj=null)}function v(){p.value||(p.value=!0)}function y(e,o){L();const{width:r,height:n,rect:s}=m[e];if(s)return;let u;const{x:c,y:a}=o||m.origin,h=a+m.caliper.height,p=["caliper","rectRuler"].includes(e);m[e].rect=new t.Rect({left:c,top:a,width:r,height:n,strokeWidth:0,fill:"transparent",hasControls:!1,hasBorders:!1,hoverCursor:"move"});const x={...d,hasControls:!1,hasBorders:!1,hoverCursor:"e-resize",strokeWidth:2,__type:e,evented:!0,selectable:!0},g=new t.Line([c,a,c,a+n],{...x,lockMovementY:!0,originX:"center"}),v=new t.Line([c+r,a,c+r,a+n],{...x,lockMovementY:!0,originX:"center"}),y=new t.Line([c,h,c+r,h],{...x,lockMovementX:!0,evented:p,hoverCursor:p?"n-resize":"default",originY:"center"});let j=C({x1:y.x1,x2:y.x2}).millisecond;if("rectRuler"===e){const{millivolt:e,millisecond:o,bpm:i}=C({x1:c+r,x2:c,y1:a+n,y2:a});j=`测量幅度:${e}\n测试时间:${o}\n瞬时心率:${i}`,y.set({y1:a,y2:a}),u=new t.Line([c,a+n,c+r,a+n],{...x,lockMovementX:!0,evented:!0,hoverCursor:"n-resize",originY:"center"})}const w=i([c,("rectRuler"===e?u.top:y.top)+10],{value:j,...f,originX:"left",originY:"top",backgroundColor:"#fff"});g.rect=m[e].rect,v.rect=m[e].rect,y.rect=m[e].rect,u&&(u.rect=m[e].rect),Object.assign(m[e].rect,{leftLine:g,rightLine:v,horizontalLine:y,horizontalLine2:u,text:w}),function(e,t){e.on("moving",(()=>{const{leftLine:o,rightLine:i,horizontalLine:r,horizontalLine2:n,text:l}=e;null==o||o.setCoords().set({x1:e.left,y1:e.top,x2:e.left,y2:e.top+e.height}),null==i||i.setCoords().set({x1:e.left+e.width,y1:e.top,x2:e.left+e.width,y2:e.top+e.height});const s=["caliper","rectRuler"].includes(t)?e.top+e.height:e.top+e.height/2;l.setCoords().set({left:e.left,top:s+10}),"rectRuler"===t?(null==r||r.setCoords().set({x1:e.left,x2:e.left+e.width,y1:e.top,y2:e.top}),null==n||n.setCoords().set({x1:e.left,y1:s,x2:e.left+e.width,y2:s})):null==r||r.setCoords().set({x1:e.left,y1:s,x2:e.left+e.width,y2:s})})),e.on("mouseup",(t=>{var o;1===t.button&&(l.value.discardActiveObject(),e.leftLine.bringToFront(),e.rightLine.bringToFront(),e.horizontalLine.bringToFront(),null==(o=e.horizontalLine2)||o.bringToFront())}))}(m[e].rect,e),b(g,"left"),b(v,"right"),p&&b(y,"horizontal"),u&&b(u,"horizontal2");const z=[m[e].rect,g,v,y,u,w].filter((e=>!!e));l.value.add(...z)}function C({x1:e,x2:t,y1:o,y2:i}){const r=(1e3*u(Math.abs(t-e))).toFixed(3);return{millisecond:`${r}ms`,millivolt:`${n(o)&&n(i)?c(Math.abs(i-o)).toFixed(3):0}mv`,bpm:`${(6e4/+r).toFixed(3)}bpm`}}function b(e,t){e.on("moving",(()=>{const{rect:o}=e;if(!o)return;const{leftLine:i,rightLine:r,horizontalLine:n,horizontalLine2:l,text:s}=o;if(("horizontal"===t&&!l||"horizontal2"===t)&&(e.top<=o.top?e.setCoords().set({y1:o.top,y2:o.top}):e.setCoords().set({y1:e.top,y2:e.top}),o.setCoords().set({height:e.top-o.top}),null==i||i.setCoords().set({y2:e.top}),null==r||r.setCoords().set({y2:e.top}),s.setCoords().set({top:e.top+10}),!l))return;"horizontal"===t&&l&&(e.top>=l.top?e.setCoords().set({y1:l.top,y2:l.top}):e.setCoords().set({y1:e.top,y2:e.top}),o.setCoords().set({top:e.top,height:l.top-e.top}),null==i||i.setCoords().set({y1:e.top}),null==r||r.setCoords().set({y1:e.top}),s.setCoords().set({top:l.top+10})),"left"===t&&(e.left>=r.left?e.setCoords().set({x1:r.left,x2:r.left}):e.setCoords().set({x1:e.left,x2:e.left}),o.setCoords().set({left:e.left,width:r.left-e.left}),n.setCoords().set({x1:e.left}),null==l||l.setCoords().set({x1:e.left}),s.setCoords().set({left:e.left})),"right"===t&&(e.left<=i.left?e.setCoords().set({x1:i.left,x2:i.left}):e.setCoords().set({x1:e.left,x2:e.left}),o.setCoords().set({width:e.left-i.left}),n.setCoords().set({x2:e.left}),null==l||l.setCoords().set({x2:e.left}));const{millivolt:u,millisecond:c,bpm:a}=C({x1:n.x1,x2:n.x2,y1:i.y1,y2:i.y2}),h=l?`测量幅度:${u}\n测试时间:${c}\n瞬时心率:${a}`:c;s.set("text",h)}))}function L(){Object.values(m).forEach((e=>{const{rect:t}=e;t&&(l.value.remove(t),t.leftLine&&l.value.remove(t.leftLine),t.rightLine&&l.value.remove(t.rightLine),t.horizontalLine&&l.value.remove(t.horizontalLine),t.horizontalLine2&&l.value.remove(t.horizontalLine2),t.text&&l.value.remove(t.text),e.rect=null)})),g()}return l.value.on("mouse:down",(e=>{if(1===e.button&&p.value){const{x:t=0,y:o=0}=e.pointer||{};L(),x.rendering=!0,x.origin={x:t,y:o}}})),l.value.on("mouse:up",(e=>{const{button:t}=e;1===t&&p.value&&setTimeout((()=>{if(p.value=!1,x.rendering&&(x.rendering=!1),"rect"===x.type){const{width:e,height:t}=x.obj,o={x:Math.min(x.origin.x,x.origin.x+e),y:Math.min(x.origin.y,x.origin.y+t)+2};m.rectRuler.width=Math.abs(e),m.rectRuler.height=Math.abs(t),g(),y("rectRuler",o)}})),3===t&&L()})),l.value.on("mouse:move",(e=>{if(1===e.button&&p.value&&x.rendering){const{x:r=0,y:n=0}=e.pointer||{};if(g(),"line"===x.type){const{x:e,y:t}=x.origin;x.obj=o([e,t,r,n],d);const{millivolt:s,millisecond:u}=C({x1:e,x2:r,y1:t,y2:n}),c=i([r,n+2*a],{value:`${s}\n${u}`,...f});x.obj.text=c,l.value.add(x.obj,c)}else!function({x:e,y:o}){const{x:r,y:n}=x.origin;x.obj=new t.Rect({...d,objectCaching:!1,fill:"transparent",left:r,top:n,width:e-r,height:o-n,strokeWidth:2});const{millivolt:s,millisecond:u,bpm:c}=C({x1:r,x2:e,y1:n,y2:o}),a=i([r,o+10],{value:`测量幅度:${s}\n测试时间:${u}\n瞬时心率:${c}`,...f,originX:"left",originY:"top",backgroundColor:"#fff"});x.obj.text=a,l.value.add(x.obj,a)}({x:r,y:n})}})),{flag:p,useMeasureRuler:function(){v(),x.type="line"},useCaliper:function(){y("caliper")},useCaliperRuler:function(){y("caliperRuler")},useRectRuler:function(){v(),x.type="rect"}}}export{l as useMeasureInstrument};
@@ -2,6 +2,7 @@ export * from './useDraw';
2
2
  export * from './useGrid';
3
3
  export * from './useCumputedPoint';
4
4
  export * from './useEvent';
5
+ export * from './useShadow';
5
6
  export * from './useScaleColumn';
6
7
  export * from './useCommon';
7
8
  export * from './birthProcess/useBirthProcessChart';
@@ -1 +1 @@
1
- export{defaultBorderStyle,defaultLineStyle,defaultRectStyle,defaultStyle,defaultTextStyle,drawArrow,drawLine,drawPoint,drawText,drawTextAndIconGroup,drawTextGroup}from"./useDraw.js";export{useGrid}from"./useGrid.js";export{useBirthProcessCumputedPoint,useCumputedPoint,useElectrocardiogramCumputedPoint}from"./useCumputedPoint.js";export{bus,useCanvasEvent}from"./useEvent.js";export{drawScaleLine,drawScaleNumber,getScaleInfo}from"./useScaleColumn.js";export{useCommon}from"./useCommon.js";export{useBirthProcessChart}from"./birthProcess/useBirthProcessChart.js";export{useTemperatureChart}from"./temperature/useTemperatureChart.js";export{useSurgicalAnesthesiaChart}from"./surgicalAnesthesia/useSurgicalAnesthesiaChart.js";export{useElectrocardiogramChart}from"./electrocardiogram/useElectrocardiogramChart.js";export{useNewBirthProcessChart}from"./newBirthProcess/useNewBirthProcessChart.js";
1
+ export{defaultBorderStyle,defaultLineStyle,defaultRectStyle,defaultStyle,defaultTextStyle,drawArrow,drawLine,drawPoint,drawText,drawTextAndIconGroup,drawTextGroup}from"./useDraw.js";export{useGrid}from"./useGrid.js";export{useBirthProcessCumputedPoint,useCumputedPoint,useElectrocardiogramCumputedPoint}from"./useCumputedPoint.js";export{bus,useCanvasEvent}from"./useEvent.js";export{useShadow}from"./useShadow.js";export{drawScaleLine,drawScaleNumber,getScaleInfo}from"./useScaleColumn.js";export{useCommon}from"./useCommon.js";export{useBirthProcessChart}from"./birthProcess/useBirthProcessChart.js";export{useTemperatureChart}from"./temperature/useTemperatureChart.js";export{useSurgicalAnesthesiaChart}from"./surgicalAnesthesia/useSurgicalAnesthesiaChart.js";export{useElectrocardiogramChart}from"./electrocardiogram/useElectrocardiogramChart.js";export{useNewBirthProcessChart}from"./newBirthProcess/useNewBirthProcessChart.js";
@@ -1 +1 @@
1
- import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawText as e,defaultTextStyle as i,defaultStyle as n,drawPoint as o}from"../useDraw.js";import{useGrid as r}from"../useGrid.js";import{useBirthProcessCumputedPoint as l}from"../useCumputedPoint.js";import"../useEvent.js";import{getScaleInfo as s,drawScaleNumber as u,drawScaleLine as a}from"../useScaleColumn.js";import{useCommon as c}from"../useCommon.js";import"vue";import{isEffectiveNode as d,getTime as h,getScaleNumberList as f}from"../../utils/index.js";import{cloneDeep as p,last as m}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";function v(v,g,x,y,b){const{computedX:w,computedY:S,getXValue:E,getYValue:L}=l(g),{getEqualXTypes:j,handleAddPrevent:k,isGridLimit:X,setPrevAndNextPoint:P,getPointEventProps:A}=c(v,x,g),{xAxis:C,grid:T,originX:G,originY:Y,xCellWidth:N,endY:V,startTime:H,leftScales:M,rightScales:$,yCellHeight:B,endX:W,scaleValues:q,canvasWidth:z,borderStyle:D,event:F,other:I,timeXAxisHeight:R,canvasHeight:J,extraTimeXAxisList:K}=g,O=p(q),Q=new Set;function U(){O.filter((t=>t.show)).forEach(((t,r)=>{var l;const s=[],u=[],a=[];null==(l=t.data)||l.forEach(((l,c)=>{!function(l,c,d){if(!l&&!c.childbirth||!(null==c?void 0:c.time)||!tt(c.time))return;let h,f;const{pointAttr:v={},lineAttr:g={},title:x="",key:b,type:S="circle",childbirthStyle:j={}}=t,k=p(t.data[d+1]);k&&!k.value&&k.childbirth&&(k.value=c.value);const X=_(k,t);l&&X&&!c.breakpoint&&(f=Z([...l,...X],g));if(c.childbirth){const t=l?l[0]:w(c.time),n=l?l[1]:m(s).top,o=n+B/2,r=Z([t,n,t,o],g);a.push(r);const u=e([t,o],{value:String(c.childbirth),...i,...j,backgroundColor:"#fff"});a.push(u)}const P=u[d-1],C={origin:{data:c,title:x,key:b||"",dataIndex:r,index:d},leftLine:P,rightLine:f,...v,...A(),...n};l&&(P||(C.leftLine=null),h=o(S,{left:l[0],top:l[1],...C}));f&&u.push(f),h&&(!function(t){F.hovered&&(t.on("mouseover",(()=>{!function(t,e="moving"){const{title:i,key:n,data:o}=t.origin;y.point={x:t.left,y:t.top},y.list=[`${i} ${"hover"===e?o.value:L(n,t.top)}`,`时间 ${E(t.left).slice(-5)}`],y.show=!0}(t,"hover")})),t.on("mouseout",(()=>{y.show=!1})))}(h),s.push(h),Q.add(h))}(_(l,t),l,c)})),Promise.all(s).then((t=>{P(t),Promise.all(a).then((e=>{v.value.add(...u,...t,...e),t.forEach((t=>{null==t||t.bringToFront()}))}))}))}))}function Z([e,i,o,r],l){return new t.Polyline([{x:e,y:i},{x:o,y:i},{x:o,y:r}],{...l,fill:"transparent",...n})}function _(t,e){if(d(t)&&tt(t.time)){const i=w(t.time),n=S(e.key,e.range,t.value);return[i,n<Y?Y:n>V?V:n]}}function tt(t){var e,i;const n=(null==(i=null==(e=null==C?void 0:C.time)?void 0:e.range)?void 0:i[1])||20,o=H+60*n*60*1e3,r=h(t);return r>=H&&r<=o}return r(v,g),function(){const e=new t.Rect({...D,width:W-G,height:V-Y,left:G,top:Y,fill:"transparent"});v.value.add(e)}(),function(){function o(o,r="left"){const l=10;let c="left"===r?0:W;o.forEach(((o,r)=>{const{range:d,spaceValue:h,width:p,title:m,titleStyle:g,unit:x,key:y,position:b="center",spaceGridNumber:w=1,showNumber:S,showMaxMinNumber:E}=o,L=[],j=[],k=f(d,h),X=k.length,{lineXMain:P,lineXSub:A,textLeft:C}=s(b,c,p);k.forEach(((t,e)=>{const i=V-e*B*w;!S||(0===e||e===X-1)&&!E||L.push(u(String(t),o,C,i)),j.push(...a(o,e,P,A,i,B,Y,X,1))}));const T=e([c+l,Y+(V-Y)/2],{value:String(m+"("+x+")"),...i,originX:"center",angle:-90,...g}),G=new t.Group([...j,...L,...T?[T]:[]],{objectCaching:!1,...n});v.value.add(G),G.sendToBack(),c+=p}))}o(M),o($,"right")}(),function(){const{show:o,range:r=[0,20],position:l="top",style:s,spaceGridNumber:u=2,spaceValue:a=2}=C.time;if(o){const o=[],c=B/2;f(r,a).forEach(((t,n)=>{const r="top"===l?Y-c:V+R+c;o.push(e([G+n*N*u,r],{value:0===n?"Admission":String(t),...i,...s}))}));const d=new t.Group(o,{objectCaching:!1,...n});v.value.add(d),v.value.sendToBack(d)}!function(){if((null==K?void 0:K.length)>0){const t=[];K.forEach((n=>{const o=w(n),r=V+R;t.push(e([o,r],{value:String(n.slice(11,16)),...i,originY:"bottom"}))})),v.value.add(...t)}}()}(),function(){const{alertLineList:t=[],alertLineTitle:n="入院时宫颈扩张不同情况"}=I;if(t.length<1)return;const o=e([W,0],{value:n,...i,originX:"right",originY:"top"});v.value.add(o),t.forEach((t=>{const{style:i,data:n=[]}=t;if(n.length<1)return;const o=[],r=O.find((t=>"cervix"===t.key));n.map((t=>({...t,time:H+60*t.time*60*1e3}))).forEach(((t,n,l)=>{const s=_(t,r),u=_(l[n+1],r);s&&!u&&o.push(e([s[0],Y-10],{value:l[0].value+(r.unit||"cm"),fill:i.stroke||"#000"})),s&&u&&o.push(Z([...s,...u],i))})),v.value.add(...o)}))}(),U(),{redrawPoints:function(){var t;Q.size&&(null==(t=v.value)||t.remove(...function(t){const e=[];return t.forEach((t=>{t&&e.push(t),(null==t?void 0:t.leftLine)&&e.push(null==t?void 0:t.leftLine),(null==t?void 0:t.rightLine)&&e.push(null==t?void 0:t.rightLine)})),e}([...Q]))),Q.clear(),U()}}}export{v as useNewBirthProcess};
1
+ import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{drawText as t,defaultTextStyle as i,defaultStyle as n,drawPoint as o}from"../useDraw.js";import{useGrid as r}from"../useGrid.js";import{useBirthProcessCumputedPoint as l}from"../useCumputedPoint.js";import"../useEvent.js";import"../useShadow.js";import{getScaleInfo as s,drawScaleNumber as a,drawScaleLine as u}from"../useScaleColumn.js";import{useCommon as c}from"../useCommon.js";import"vue";import{isEffectiveNode as d,getTime as h,getScaleNumberList as f}from"../../utils/index.js";import{cloneDeep as p,last as m}from"lodash-es";import"date-fns";import"../../constants/index.js";import"@vueuse/shared";import"naive-ui";import"../surgicalAnesthesia/useTop.js";import"@vueuse/core";import"../surgicalAnesthesia/useOther.js";import"../../../../../shared/utils/index.js";function v(v,g,x,w,y){const{computedX:b,computedY:j,getXValue:L,getYValue:S}=l(g),{getEqualXTypes:E,handleAddPrevent:k,isGridLimit:X,setPrevAndNextPoint:A,getPointEventProps:P}=c(v,x,g),{xAxis:C,grid:T,originX:G,originY:Y,xCellWidth:N,endY:V,startTime:B,leftScales:H,rightScales:M,yCellHeight:$,endX:W,scaleValues:q,canvasWidth:z,borderStyle:D,event:F,other:I,timeXAxisHeight:O,canvasHeight:R,extraTimeXAxisList:J}=g,K=p(q),Q=new Set;function U(){K.filter((e=>e.show)).forEach(((e,r)=>{var l;const s=[],a=[],u=[];null==(l=e.data)||l.forEach(((l,c)=>{!function(l,c,d){if(!l&&!c.childbirth||!(null==c?void 0:c.time)||!ee(c.time))return;let h,f;const{pointAttr:v={},lineAttr:g={},title:x="",key:y,type:j="circle",childbirthStyle:E={}}=e,k=p(e.data[d+1]);k&&!k.value&&k.childbirth&&(k.value=c.value);const X=_(k,e);l&&X&&!c.breakpoint&&(f=Z([...l,...X],g));if(c.childbirth){const e=l?l[0]:b(c.time),n=l?l[1]:m(s).top,o=n+$/2,r=Z([e,n,e,o],g);u.push(r);const a=t([e,o],{value:String(c.childbirth),...i,...E,backgroundColor:"#fff"});u.push(a)}const A=a[d-1],C={origin:{data:c,title:x,key:y||"",dataIndex:r,index:d},leftLine:A,rightLine:f,...v,...P(),...n};l&&(A||(C.leftLine=null),h=o(j,{left:l[0],top:l[1],...C}));f&&a.push(f),h&&(!function(e){F.hovered&&(e.on("mouseover",(()=>{!function(e,t="moving"){const{title:i,key:n,data:o}=e.origin;w.point={x:e.left,y:e.top},w.list=[`${i} ${"hover"===t?o.value:S(n,e.top)}`,`时间 ${L(e.left).slice(-5)}`],w.show=!0}(e,"hover")})),e.on("mouseout",(()=>{w.show=!1})))}(h),s.push(h),Q.add(h))}(_(l,e),l,c)})),Promise.all(s).then((e=>{A(e),Promise.all(u).then((t=>{v.value.add(...a,...e,...t),e.forEach((e=>{null==e||e.bringToFront()}))}))}))}))}function Z([t,i,o,r],l){return new e.Polyline([{x:t,y:i},{x:o,y:i},{x:o,y:r}],{...l,fill:"transparent",...n})}function _(e,t){if(d(e)&&ee(e.time)){const i=b(e.time),n=j(t.key,t.range,e.value);return[i,n<Y?Y:n>V?V:n]}}function ee(e){var t,i;const n=(null==(i=null==(t=null==C?void 0:C.time)?void 0:t.range)?void 0:i[1])||20,o=B+60*n*60*1e3,r=h(e);return r>=B&&r<=o}return r(v,g),function(){const t=new e.Rect({...D,width:W-G,height:V-Y,left:G,top:Y,fill:"transparent"});v.value.add(t)}(),function(){function o(o,r="left"){const l=10;let c="left"===r?0:W;o.forEach(((o,r)=>{const{range:d,spaceValue:h,width:p,title:m,titleStyle:g,unit:x,key:w,position:y="center",spaceGridNumber:b=1,showNumber:j,showMaxMinNumber:L}=o,S=[],E=[],k=f(d,h),X=k.length,{lineXMain:A,lineXSub:P,textLeft:C}=s(y,c,p);k.forEach(((e,t)=>{const i=V-t*$*b;!j||(0===t||t===X-1)&&!L||S.push(a(String(e),o,C,i)),E.push(...u(o,t,A,P,i,$,Y,X,1))}));const T=t([c+l,Y+(V-Y)/2],{value:String(m+"("+x+")"),...i,originX:"center",angle:-90,...g}),G=new e.Group([...E,...S,...T?[T]:[]],{objectCaching:!1,...n});v.value.add(G),G.sendToBack(),c+=p}))}o(H),o(M,"right")}(),function(){const{show:o,range:r=[0,20],position:l="top",style:s,spaceGridNumber:a=2,spaceValue:u=2}=C.time;if(o){const o=[],c=$/2;f(r,u).forEach(((e,n)=>{const r="top"===l?Y-c:V+O+c;o.push(t([G+n*N*a,r],{value:0===n?"Admission":String(e),...i,...s}))}));const d=new e.Group(o,{objectCaching:!1,...n});v.value.add(d),v.value.sendToBack(d)}!function(){if((null==J?void 0:J.length)>0){const e=[];J.forEach((n=>{const o=b(n),r=V+O;e.push(t([o,r],{value:String(n.slice(11,16)),...i,originY:"bottom"}))})),v.value.add(...e)}}()}(),function(){var e;const{alertLineList:n=[],alertLineTitle:o=(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.227"))||"入院时宫颈扩张不同情况"}=I;if(n.length<1)return;const r=t([W,0],{value:o,...i,originX:"right",originY:"top"});v.value.add(r),n.forEach((e=>{const{style:i,data:n=[]}=e;if(n.length<1)return;const o=[],r=K.find((e=>"cervix"===e.key));n.map((e=>({...e,time:B+60*e.time*60*1e3}))).forEach(((e,n,l)=>{const s=_(e,r),a=_(l[n+1],r);s&&!a&&o.push(t([s[0],Y-10],{value:l[0].value+(r.unit||"cm"),fill:i.stroke||"#000"})),s&&a&&o.push(Z([...s,...a],i))})),v.value.add(...o)}))}(),U(),{redrawPoints:function(){var e;Q.size&&(null==(e=v.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine)})),t}([...Q]))),Q.clear(),U()}}}export{v as useNewBirthProcess};
@@ -1 +1 @@
1
- import{ref as e,computed as a,reactive as t,watch as l}from"vue";import{defaultBorderStyle as i}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{format as r}from"date-fns";import{getTime as u}from"../../utils/index.js";import{range as s,last as n}from"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";import{useNewBirthProcess as o}from"./useNewBirthProcess.js";function d(d,v,c,m,h,x){const p=e(),g=a((()=>v.data.scaleValues.filter((e=>"left"===e.layout&&e.show)))),f=a((()=>v.data.scaleValues.filter((e=>"right"===e.layout&&e.show)))),w=a((()=>{var e;return null==(e=g.value)?void 0:e.reduce(((e,a)=>e+=a.width),0)})),b=a((()=>{var e;const{width:a}=v.data;return a-((null==(e=f.value)?void 0:e.reduce(((e,a)=>e+=a.width),0))||15)})),y=a((()=>v.data.grid.mainXCell||20)),j=a((()=>v.data.grid.mainYCell||8)),A=a((()=>(b.value-w.value)/y.value)),M=a((()=>{var e;const{xAxis:a,height:t,other:l}=v.data,i=Object.values(a).reduce(((e,a)=>(a.show&&e++,e)),0),r=(null!=(e=null==l?void 0:l.alertLineList.length)?e:0)>0;return(t-X.value)/(j.value+i+(r?1:0))})),S=a((()=>{var e;const{xAxis:a,other:t}=v.data,l=Object.values(a).reduce(((e,a)=>(a.show&&"top"===a.position&&e++,e)),0),i=(null!=(e=null==t?void 0:t.alertLineList.length)?e:0)>0;return M.value*(l||i?1:0)})),V=a((()=>{const{xAxis:e,height:a}=v.data,t=Object.values(e).reduce(((e,a)=>(a.show&&"bottom"===a.position&&e++,e)),0);return a-M.value*t-X.value})),X=a((()=>{const e=g.value.concat(f.value);return(null==e?void 0:e.length)>0?20:0})),C=a((()=>u(v.data.xAxis.time.startTime))),H=a((()=>{const{spaceValue:e,spaceGridNumber:a}=v.data.xAxis.time||{};return 60*e*60*1e3/(A.value*a)})),L=a((()=>{var e,a,t;const l=null==(t=null==(a=null==(e=g.value.concat(f.value))?void 0:e[0])?void 0:a.data)?void 0:t.map((e=>u(e.time))),i=Math.min(...l);let o=Math.min(Math.max(...l));const d=H.value*A.value,v=s(1,y.value+1).reduce(((e,a,t)=>e.concat(C.value+a*d)),[C.value]);o=Math.min(o,n(v));const c=v.findIndex((e=>Math.abs(e-i)<d)),m=v.findIndex((e=>Math.abs(e-o)<d))+1;return v.filter(((e,a)=>a>=c&&a<=m)).map((e=>r(new Date(e),"yyyy-MM-dd HH:mm:ss")))})),Y=a((()=>{const{scaleValues:e}=v.data,a=e.find((e=>"cervix"===e.key));return M.value/((null==a?void 0:a.spaceValue)||1)})),N=a((()=>{var e;return(null==(e=v.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),I=t({canvasWidth:v.data.width,canvasHeight:v.data.height,borderStyle:{...i,...v.data.borderStyle||{}},selectionStyle:v.data.selectionStyle||{},grid:v.data.grid,other:v.data.other,originX:w.value,endX:b.value,originY:S.value,endY:V.value,xCellWidth:A.value,yCellHeight:M.value,gridXNumber:y.value,gridYNumber:j.value,xAxis:v.data.xAxis,leftScales:g.value,rightScales:f.value,startTime:C.value,timeXCell:H.value,cervixYCell:Y.value,scaleValues:v.data.scaleValues,timeXAxisHeight:X.value,extraTimeXAxisList:L.value,event:N.value});return l((()=>d.value),(e=>{e&&function(){const{redrawPoints:e}=o(d,I,c,h);p.value=e}()}),{immediate:!0}),{propItems:I,redrawPoints:p}}export{d as useNewBirthProcessChart};
1
+ import{ref as e,computed as a,reactive as t,watch as l}from"vue";import{defaultBorderStyle as i}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{format as r}from"date-fns";import{getTime as s}from"../../utils/index.js";import{range as u,last as o}from"lodash-es";import"../useEvent.js";import"../useShadow.js";import"../useCommon.js";import"../../constants/index.js";import"@vueuse/shared";import"naive-ui";import"../surgicalAnesthesia/useTop.js";import"@vueuse/core";import"../surgicalAnesthesia/useOther.js";import"../../../../../shared/utils/index.js";import{useNewBirthProcess as n}from"./useNewBirthProcess.js";function d(d,v,c,m,h,p){const x=e(),g=a((()=>v.data.scaleValues.filter((e=>"left"===e.layout&&e.show)))),f=a((()=>v.data.scaleValues.filter((e=>"right"===e.layout&&e.show)))),j=a((()=>{var e;return null==(e=g.value)?void 0:e.reduce(((e,a)=>e+=a.width),0)})),w=a((()=>{var e;const{width:a}=v.data;return a-((null==(e=f.value)?void 0:e.reduce(((e,a)=>e+=a.width),0))||15)})),b=a((()=>v.data.grid.mainXCell||20)),y=a((()=>v.data.grid.mainYCell||8)),A=a((()=>(w.value-j.value)/b.value)),M=a((()=>{var e;const{xAxis:a,height:t,other:l}=v.data,i=Object.values(a).reduce(((e,a)=>(a.show&&e++,e)),0),r=(null!=(e=null==l?void 0:l.alertLineList.length)?e:0)>0;return(t-V.value)/(y.value+i+(r?1:0))})),C=a((()=>{var e;const{xAxis:a,other:t}=v.data,l=Object.values(a).reduce(((e,a)=>(a.show&&"top"===a.position&&e++,e)),0),i=(null!=(e=null==t?void 0:t.alertLineList.length)?e:0)>0;return M.value*(l||i?1:0)})),S=a((()=>{const{xAxis:e,height:a}=v.data,t=Object.values(e).reduce(((e,a)=>(a.show&&"bottom"===a.position&&e++,e)),0);return a-M.value*t-V.value})),V=a((()=>{const e=g.value.concat(f.value);return(null==e?void 0:e.length)>0?20:0})),X=a((()=>s(v.data.xAxis.time.startTime))),H=a((()=>{const{spaceValue:e,spaceGridNumber:a}=v.data.xAxis.time||{};return 60*e*60*1e3/(A.value*a)})),L=a((()=>{var e,a,t;const l=null==(t=null==(a=null==(e=g.value.concat(f.value))?void 0:e[0])?void 0:a.data)?void 0:t.map((e=>s(e.time))),i=Math.min(...l);let n=Math.min(Math.max(...l));const d=H.value*A.value,v=u(1,b.value+1).reduce(((e,a,t)=>e.concat(X.value+a*d)),[X.value]);n=Math.min(n,o(v));const c=v.findIndex((e=>Math.abs(e-i)<d)),m=v.findIndex((e=>Math.abs(e-n)<d))+1;return v.filter(((e,a)=>a>=c&&a<=m)).map((e=>r(new Date(e),"yyyy-MM-dd HH:mm:ss")))})),Y=a((()=>{const{scaleValues:e}=v.data,a=e.find((e=>"cervix"===e.key));return M.value/((null==a?void 0:a.spaceValue)||1)})),N=a((()=>{var e;return(null==(e=v.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),O=t({canvasWidth:v.data.width,canvasHeight:v.data.height,borderStyle:{...i,...v.data.borderStyle||{}},selectionStyle:v.data.selectionStyle||{},grid:v.data.grid,other:v.data.other,originX:j.value,endX:w.value,originY:C.value,endY:S.value,xCellWidth:A.value,yCellHeight:M.value,gridXNumber:b.value,gridYNumber:y.value,xAxis:v.data.xAxis,leftScales:g.value,rightScales:f.value,startTime:X.value,timeXCell:H.value,cervixYCell:Y.value,scaleValues:v.data.scaleValues,timeXAxisHeight:V.value,extraTimeXAxisList:L.value,event:N.value});return l((()=>d.value),(e=>{e&&function(){const{redrawPoints:e}=n(d,O,c,h);x.value=e}()}),{immediate:!0}),{propItems:O,redrawPoints:x}}export{d as useNewBirthProcessChart};