cnhis-design-vue 3.1.40-beta.12 → 3.1.40-beta.15

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 (404) hide show
  1. package/es/_virtual/plugin-vue_export-helper.js +1 -9
  2. package/es/components/annotation-edit/index.js +1 -10
  3. package/es/components/annotation-edit/src/AnnotationEdit.js +1 -164
  4. package/es/components/big-table/index.js +1 -15
  5. package/es/components/big-table/src/BigTable.vue.js +1 -6
  6. package/es/components/big-table/src/BigTable.vue2.js +1 -2498
  7. package/es/components/big-table/src/bigTableEmits.js +1 -53
  8. package/es/components/big-table/src/bigTableProps.js +1 -120
  9. package/es/components/big-table/src/bigTableState.js +1 -62
  10. package/es/components/big-table/src/components/NoData.vue.js +1 -74
  11. package/es/components/big-table/src/components/edit-form/edit-date.js +1 -214
  12. package/es/components/big-table/src/components/edit-form/edit-input.js +1 -95
  13. package/es/components/big-table/src/components/edit-form/edit-select.js +1 -139
  14. package/es/components/big-table/src/components/edit-form/edit-separate.vue.js +1 -103
  15. package/es/components/big-table/src/components/edit-form/edit-time.js +1 -122
  16. package/es/components/big-table/src/components/edit-form/useCommon.js +1 -23
  17. package/es/components/big-table/src/components/input-button.vue.js +1 -39
  18. package/es/components/big-table/src/components/separate.vue.js +1 -30
  19. package/es/components/big-table/src/constants/index.js +1 -3
  20. package/es/components/big-table/src/hooks/index.js +1 -9
  21. package/es/components/big-table/src/hooks/useAnchor.js +1 -49
  22. package/es/components/big-table/src/hooks/useAnnotation.js +1 -21
  23. package/es/components/big-table/src/hooks/useBatchEditing.js +1 -301
  24. package/es/components/big-table/src/hooks/useEdit.js +1 -133
  25. package/es/components/big-table/src/hooks/useEvent.js +1 -95
  26. package/es/components/big-table/src/hooks/useFormat.js +1 -507
  27. package/es/components/big-table/src/hooks/useNestTable.js +1 -86
  28. package/es/components/big-table/src/hooks/useSeparateRow.js +1 -177
  29. package/es/components/big-table/src/hooks/useTableParse.js +1 -142
  30. package/es/components/big-table/src/utils.js +1 -618
  31. package/es/components/bpmn-workflow/index.js +1 -10
  32. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.js +1 -258
  33. package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/BpmnRenderer.js +1 -1452
  34. package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomPathMap.js +1 -99
  35. package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRenderer.js +1 -114
  36. package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRules.js +1 -40
  37. package/es/components/bpmn-workflow/src/custom/customOtherModule/customViewerRenderer.js +1 -14
  38. package/es/components/bpmn-workflow/src/custom/customOtherModule/zoomScroll.js +1 -10
  39. package/es/components/button-print/index.js +1 -12
  40. package/es/components/button-print/src/ButtonPrint.vue.js +1 -6
  41. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -528
  42. package/es/components/button-print/src/components/EditFormat.vue.js +1 -173
  43. package/es/components/button-print/src/components/IdentityVerification.vue.js +1 -182
  44. package/es/components/button-print/src/components/Preview.vue.js +1 -6
  45. package/es/components/button-print/src/components/Preview.vue2.js +1 -67
  46. package/es/components/button-print/src/utils/browserPrint.d.ts +2 -1
  47. package/es/components/button-print/src/utils/browserPrint.js +1 -43
  48. package/es/components/button-print/src/utils/dialog.js +1 -121
  49. package/es/components/button-print/src/utils/index.js +1 -2
  50. package/es/components/button-print/src/utils/print.d.ts +5 -1
  51. package/es/components/button-print/src/utils/print.js +1 -432
  52. package/es/components/editor/index.js +1 -10
  53. package/es/components/editor/src/Editor.js +1 -77
  54. package/es/components/fabric-chart/index.js +1 -10
  55. package/es/components/fabric-chart/src/FabricChart.vue.js +1 -71
  56. package/es/components/fabric-chart/src/components/PopupMenu.js +1 -118
  57. package/es/components/fabric-chart/src/components/PopupTip.vue.js +1 -34
  58. package/es/components/fabric-chart/src/components/useStyle.js +1 -36
  59. package/es/components/fabric-chart/src/hooks/constant.js +1 -78
  60. package/es/components/fabric-chart/src/hooks/index.js +1 -11
  61. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -642
  62. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -153
  63. package/es/components/fabric-chart/src/hooks/useBottom.js +1 -91
  64. package/es/components/fabric-chart/src/hooks/useCenter.js +1 -734
  65. package/es/components/fabric-chart/src/hooks/useCommon.js +1 -32
  66. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -79
  67. package/es/components/fabric-chart/src/hooks/useDraw.js +1 -182
  68. package/es/components/fabric-chart/src/hooks/useEvent.js +1 -146
  69. package/es/components/fabric-chart/src/hooks/useGrid.js +1 -54
  70. package/es/components/fabric-chart/src/hooks/useLeft.js +1 -331
  71. package/es/components/fabric-chart/src/hooks/useOther.js +1 -95
  72. package/es/components/fabric-chart/src/hooks/useRight.js +1 -22
  73. package/es/components/fabric-chart/src/hooks/useShadow.js +1 -132
  74. package/es/components/fabric-chart/src/hooks/useTemperatureChart.js +1 -341
  75. package/es/components/fabric-chart/src/hooks/useTop.js +1 -154
  76. package/es/components/fabric-chart/src/utils/index.js +1 -15624
  77. package/es/components/fabric-chart/src/utils/utils.js +1 -32
  78. package/es/components/field-set/index.js +1 -10
  79. package/es/components/field-set/src/FieldSet.vue.js +1 -470
  80. package/es/components/form-config/index.js +1 -10
  81. package/es/components/form-config/src/FormConfig.vue.js +1 -124
  82. package/es/components/form-config/src/components/FormConfigCreator.vue.js +1 -100
  83. package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -45
  84. package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -97
  85. package/es/components/form-config/src/components/FormConfigMaterialItem.js +1 -28
  86. package/es/components/form-config/src/components/index.js +1 -6
  87. package/es/components/form-config/src/components/renderer/CloseButton.vue.js +1 -45
  88. package/es/components/form-config/src/components/renderer/ComplexNode.vue.js +1 -45
  89. package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -60
  90. package/es/components/form-config/src/components/renderer/index.js +1 -3
  91. package/es/components/form-config/src/constants/index.js +1 -61
  92. package/es/components/form-config/src/hooks/index.js +1 -3
  93. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -90
  94. package/es/components/form-config/src/hooks/useDataNormalize.js +1 -35
  95. package/es/components/form-config/src/hooks/usePresetRenderer.js +1 -36
  96. package/es/components/form-config/src/hooks/useSortalbeConfig.js +1 -42
  97. package/es/components/form-config/src/utils/index.js +1 -26
  98. package/es/components/form-render/index.js +1 -30
  99. package/es/components/form-render/src/FormRender.vue.js +1 -239
  100. package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -49
  101. package/es/components/form-render/src/components/renderer/combination.js +1 -114
  102. package/es/components/form-render/src/components/renderer/complex.js +1 -37
  103. package/es/components/form-render/src/components/renderer/date.js +1 -171
  104. package/es/components/form-render/src/components/renderer/formItem.js +1 -128
  105. package/es/components/form-render/src/components/renderer/index.js +1 -43
  106. package/es/components/form-render/src/components/renderer/input.js +1 -50
  107. package/es/components/form-render/src/components/renderer/inputGroup.js +1 -11
  108. package/es/components/form-render/src/components/renderer/inputNumber.js +1 -55
  109. package/es/components/form-render/src/components/renderer/jsonCombination/hooks/useDeepValidate.js +1 -35
  110. package/es/components/form-render/src/components/renderer/jsonCombination/index.js +1 -175
  111. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -274
  112. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.js +1 -71
  113. package/es/components/form-render/src/components/renderer/lineBar/index.js +1 -11
  114. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -111
  115. package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -139
  116. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -244
  117. package/es/components/form-render/src/components/renderer/select.js +1 -176
  118. package/es/components/form-render/src/components/renderer/simpleComponent.js +1 -57
  119. package/es/components/form-render/src/components/renderer/slider.js +1 -38
  120. package/es/components/form-render/src/components/renderer/switch.js +1 -48
  121. package/es/components/form-render/src/components/renderer/textarea.js +1 -36
  122. package/es/components/form-render/src/components/tooltipMessage.vue.js +1 -37
  123. package/es/components/form-render/src/constants/index.js +1 -59
  124. package/es/components/form-render/src/hooks/index.js +1 -15
  125. package/es/components/form-render/src/hooks/useAnchor.js +1 -99
  126. package/es/components/form-render/src/hooks/useAsyncQueue.js +1 -153
  127. package/es/components/form-render/src/hooks/useAutoHidden.js +1 -43
  128. package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -119
  129. package/es/components/form-render/src/hooks/useChangeContext.js +1 -20
  130. package/es/components/form-render/src/hooks/useCommonInjection.js +1 -43
  131. package/es/components/form-render/src/hooks/useCommonLog.js +1 -12
  132. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -225
  133. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -290
  134. package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -65
  135. package/es/components/form-render/src/hooks/useFieldVisitor.js +1 -46
  136. package/es/components/form-render/src/hooks/useFormContext.js +1 -70
  137. package/es/components/form-render/src/hooks/useFormEvent.js +1 -140
  138. package/es/components/form-render/src/hooks/useFormField.js +1 -13
  139. package/es/components/form-render/src/hooks/useFormItemDeps.js +1 -31
  140. package/es/components/form-render/src/hooks/useFormRenderLifeCycle.js +1 -10
  141. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -278
  142. package/es/components/form-render/src/hooks/useFormRequest.js +1 -42
  143. package/es/components/form-render/src/hooks/useFormValidator.js +1 -83
  144. package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -85
  145. package/es/components/form-render/src/hooks/useNuiThemeOverrides.js +1 -18
  146. package/es/components/form-render/src/hooks/usePresetScope.js +1 -22
  147. package/es/components/form-render/src/types/fieldItem.js +1 -1
  148. package/es/components/form-render/src/types/index.js +1 -1
  149. package/es/components/form-render/src/utils/business.js +1 -114
  150. package/es/components/form-render/src/utils/dom.js +1 -38
  151. package/es/components/form-render/src/utils/index.js +1 -241
  152. package/es/components/form-render/src/utils/schema.js +1 -105
  153. package/es/components/grid/index.js +1 -11
  154. package/es/components/grid/src/Grid.js +1 -28
  155. package/es/components/grid/src/hooks.js +1 -168
  156. package/es/components/iho-table/index.js +1 -36
  157. package/es/components/iho-table/src/IhoTable.vue.js +1 -157
  158. package/es/components/iho-table/src/constants/index.js +1 -157
  159. package/es/components/iho-table/src/hooks/export.js +1 -2
  160. package/es/components/iho-table/src/hooks/index.js +1 -2
  161. package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -159
  162. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.js +1 -67
  163. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -26
  164. package/es/components/iho-table/src/hooks/tapHooks/useDomInsertHooks.js +1 -27
  165. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.js +1 -280
  166. package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.js +1 -26
  167. package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.js +1 -38
  168. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -27
  169. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -164
  170. package/es/components/iho-table/src/hooks/useTableContext.js +1 -17
  171. package/es/components/iho-table/src/hooks/useTablePlugin.js +1 -20
  172. package/es/components/iho-table/src/plugins/anchorPlugin/index.js +1 -19
  173. package/es/components/iho-table/src/plugins/anchorPlugin/tableAnchor.js +1 -51
  174. package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +1 -87
  175. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -48
  176. package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.js +1 -230
  177. package/es/components/iho-table/src/plugins/filterPlugin/index.js +1 -240
  178. package/es/components/iho-table/src/plugins/index.js +1 -47
  179. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -30
  180. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -127
  181. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -203
  182. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -41
  183. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -21
  184. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +1 -41
  185. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -79
  186. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -64
  187. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -46
  188. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -16
  189. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.js +1 -108
  190. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -163
  191. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separateUtils.js +1 -42
  192. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +1 -50
  193. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -30
  194. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/colorRendererPlugin.js +1 -48
  195. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -62
  196. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +1 -52
  197. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -92
  198. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -59
  199. package/es/components/iho-table/src/plugins/rowClickPlugin/index.js +1 -34
  200. package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index.js +1 -30
  201. package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.js +1 -53
  202. package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +1 -100
  203. package/es/components/iho-table/src/types/index.js +1 -1
  204. package/es/components/iho-table/src/types/pluginType.js +1 -16
  205. package/es/components/iho-table/src/utils/index.js +1 -169
  206. package/es/components/index.js +1 -119
  207. package/es/components/info-header/index.js +1 -10
  208. package/es/components/info-header/src/HiddenContent.vue.js +1 -70
  209. package/es/components/info-header/src/InfoEllipsis.vue.js +1 -43
  210. package/es/components/info-header/src/InfoHeader.vue.js +1 -313
  211. package/es/components/insurance-sdk/index.js +1 -1
  212. package/es/components/insurance-sdk/src/constants/index.js +1 -160
  213. package/es/components/insurance-sdk/src/utils/index.js +1 -1
  214. package/es/components/insurance-sdk/src/utils/insurance.js +1 -268
  215. package/es/components/keyboard/index.js +1 -10
  216. package/es/components/keyboard/src/Keyboard.vue.js +1 -164
  217. package/es/components/keyboard/src/components/InputNumber.vue.js +1 -86
  218. package/es/components/keyboard/src/components/NumberPanel.vue.js +1 -299
  219. package/es/components/keyboard/src/utils/index.js +1 -5
  220. package/es/components/map/index.js +1 -10
  221. package/es/components/map/src/Map.vue.js +1 -336
  222. package/es/components/recommend-search/index.js +1 -10
  223. package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -63
  224. package/es/components/recommend-search/src/components/BaseSearch.vue.js +1 -157
  225. package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -125
  226. package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -104
  227. package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -146
  228. package/es/components/recommend-search/src/constant/index.js +1 -7
  229. package/es/components/scale-view/index.js +1 -35
  230. package/es/components/scale-view/src/ScaleView.vue.js +1 -429
  231. package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -80
  232. package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -117
  233. package/es/components/scale-view/src/components/EvaluatePage.vue.js +1 -141
  234. package/es/components/scale-view/src/components/LoadingCom.vue.js +1 -19
  235. package/es/components/scale-view/src/components/NoData.vue.js +1 -74
  236. package/es/components/scale-view/src/components/ScaleScore.js +1 -63
  237. package/es/components/scale-view/src/components/composables/choose-common.js +1 -83
  238. package/es/components/scale-view/src/components/formitem/address.js +1 -3993
  239. package/es/components/scale-view/src/components/formitem/r-address.js +1 -226
  240. package/es/components/scale-view/src/components/formitem/r-cascader.js +1 -133
  241. package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -281
  242. package/es/components/scale-view/src/components/formitem/r-collection.js +1 -111
  243. package/es/components/scale-view/src/components/formitem/r-datetime.js +1 -212
  244. package/es/components/scale-view/src/components/formitem/r-input.js +1 -86
  245. package/es/components/scale-view/src/components/formitem/r-map.js +1 -106
  246. package/es/components/scale-view/src/components/formitem/r-radio.js +1 -240
  247. package/es/components/scale-view/src/components/formitem/r-select.js +1 -202
  248. package/es/components/scale-view/src/components/formitem/r-sign.js +1 -177
  249. package/es/components/scale-view/src/components/formitem/r-upload.js +1 -215
  250. package/es/components/scale-view/src/components/formitem/sign-com.js +1 -307
  251. package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -129
  252. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -354
  253. package/es/components/scale-view/src/hooks/scaleview-init.js +1 -437
  254. package/es/components/scale-view/src/hooks/scaleview-props.js +1 -81
  255. package/es/components/scale-view/src/hooks/scaleview-state.js +1 -38
  256. package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -154
  257. package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -187
  258. package/es/components/scale-view/src/hooks/use-component.js +1 -86
  259. package/es/components/scale-view/src/hooks/use-evaluate.js +1 -150
  260. package/es/components/scale-view/src/hooks/use-event.js +1 -129
  261. package/es/components/scale-view/src/hooks/use-noData.js +1 -41
  262. package/es/components/scale-view/src/utils/judge-types.js +1 -36
  263. package/es/components/search-cascader/index.js +1 -10
  264. package/es/components/search-cascader/src/SearchCascader.vue.js +1 -194
  265. package/es/components/search-cascader/src/components/SearchMenu.js +1 -196
  266. package/es/components/search-cascader/src/components/index.js +1 -1
  267. package/es/components/search-cascader/src/constants/index.js +1 -11
  268. package/es/components/search-cascader/src/hooks/index.js +1 -1
  269. package/es/components/search-cascader/src/hooks/useCssVariable.js +1 -7
  270. package/es/components/search-cascader/src/utils/index.js +1 -11
  271. package/es/components/select-label/index.js +1 -15
  272. package/es/components/select-label/src/LabelFormContent.vue.js +1 -447
  273. package/es/components/select-label/src/SelectLabel.vue.js +1 -6
  274. package/es/components/select-label/src/SelectLabel.vue2.js +1 -451
  275. package/es/components/select-label/src/components/label-classify.vue.js +1 -132
  276. package/es/components/select-person/index.js +1 -10
  277. package/es/components/select-person/src/SelectPerson.vue.js +1 -6
  278. package/es/components/select-person/src/SelectPerson.vue2.js +1 -303
  279. package/es/components/select-person/src/utils/index.js +1 -58
  280. package/es/components/shortcut-provider/index.js +1 -12
  281. package/es/components/shortcut-provider/src/ShortcutProvider.vue.js +1 -42
  282. package/es/components/shortcut-provider/src/constants/index.js +1 -8
  283. package/es/components/shortcut-provider/src/hooks/index.js +1 -2
  284. package/es/components/shortcut-provider/src/hooks/useShortcutSignature.js +1 -12
  285. package/es/components/shortcut-provider/src/hooks/useShortcuts.js +1 -188
  286. package/es/components/shortcut-provider/src/utils/index.js +1 -92
  287. package/es/components/shortcut-setter/index.js +1 -10
  288. package/es/components/shortcut-setter/src/ShortcutSetter.vue.js +1 -98
  289. package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.js +1 -76
  290. package/es/components/steps-wheel/index.js +1 -10
  291. package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -376
  292. package/es/components/table-filter/index.js +1 -21
  293. package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +1 -2272
  294. package/es/components/table-filter/src/classification/Classification-com.vue.js +1 -1315
  295. package/es/components/table-filter/src/classification/search-class-name.vue.js +1 -195
  296. package/es/components/table-filter/src/classification/search-professional-model.vue.js +1 -594
  297. package/es/components/table-filter/src/components/age-com/index.vue.js +1 -185
  298. package/es/components/table-filter/src/components/button-group/ButtonGroup.vue.js +1 -86
  299. package/es/components/table-filter/src/components/button-icon/getBtnIcon.js +1 -30
  300. package/es/components/table-filter/src/components/c-tree-select/tree-select.vue.js +1 -253
  301. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -114
  302. package/es/components/table-filter/src/components/classify-filter/helpers/options.js +1 -14
  303. package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +1 -87
  304. package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -147
  305. package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -304
  306. package/es/components/table-filter/src/components/multi-select/multi-select.vue.js +1 -153
  307. package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.js +1 -310
  308. package/es/components/table-filter/src/components/range-age/index.vue.js +1 -137
  309. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +1 -64
  310. package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -45
  311. package/es/components/table-filter/src/components/render-widget/components/index.js +1 -2
  312. package/es/components/table-filter/src/components/render-widget/enums.js +1 -27
  313. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +1 -70
  314. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -107
  315. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -152
  316. package/es/components/table-filter/src/components/search-condition/SearchCondition.vue.js +1 -1520
  317. package/es/components/table-filter/src/components/search-condition/fieldTypeList.js +1 -171
  318. package/es/components/table-filter/src/components/search-filter/SearchFilter.vue.js +1 -199
  319. package/es/components/table-filter/src/components/search-modal/set-classification.vue.js +1 -241
  320. package/es/components/table-filter/src/components/table-modal/TableModal.vue.js +1 -526
  321. package/es/components/table-filter/src/const/dataOptions.js +1 -107
  322. package/es/components/table-filter/src/const/index.js +1 -5
  323. package/es/components/table-filter/src/directive/flexibleResize.js +1 -157
  324. package/es/components/table-filter/src/directive/preventReClick.js +1 -14
  325. package/es/components/table-filter/src/directive/resize.js +1 -12
  326. package/es/components/table-filter/src/hooks/export.js +1 -1
  327. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -64
  328. package/es/components/table-filter/src/hooks/useMixins.js +1 -532
  329. package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -94
  330. package/es/components/table-filter/src/hooks/useTableSearchCon.js +1 -131
  331. package/es/components/table-filter/src/hooks/useWordBookutils.js +1 -91
  332. package/es/components/table-filter/src/quick-search/QuickSearch.vue.js +1 -2038
  333. package/es/components/table-filter/src/tool/generateDefOptions.js +1 -65
  334. package/es/components/table-filter/src/tool/getWidgetType.js +1 -27
  335. package/es/components/table-filter/src/tool/options.js +1 -200
  336. package/es/components/table-filter/src/tool/resizeSensor.js +1 -123
  337. package/es/components/table-filter/src/tool/time-domain.js +1 -100
  338. package/es/components/table-filter/src/tool/transformData.js +1 -169
  339. package/es/components/table-filter/src/tool/utils.js +1 -29
  340. package/es/components/table-filter/src/types/enums.js +1 -67
  341. package/es/components/table-filter/style/index.css +1 -1
  342. package/es/components/time-line/index.js +1 -10
  343. package/es/components/time-line/src/TimeLine.vue.js +1 -70
  344. package/es/components/vod-chunk-upload/index.js +1 -14
  345. package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.js +1 -480
  346. package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +1 -70
  347. package/es/components/vod-chunk-upload/src/hooks/upload-data.js +1 -96
  348. package/es/components/vod-chunk-upload/src/hooks/vod-computed.js +1 -79
  349. package/es/components/vod-chunk-upload/src/hooks/vod-data.js +1 -28
  350. package/es/components/vod-chunk-upload/src/vod-chunk-upload/index.js +1 -2
  351. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -332
  352. package/es/components/vod-chunk-upload/src/vod-upload-modal.js +1 -94
  353. package/es/shared/assets/img/failure.png.js +1 -3
  354. package/es/shared/assets/img/no-permission.png.js +1 -3
  355. package/es/shared/assets/img/nodata.png.js +1 -3
  356. package/es/shared/assets/img/notfound.png.js +1 -3
  357. package/es/shared/assets/img/qr.png.js +1 -3
  358. package/es/shared/assets/img/success.png.js +1 -3
  359. package/es/shared/assets/img/video.png.js +1 -3
  360. package/es/shared/assets/img/video_default_cover.png.js +1 -3
  361. package/es/shared/assets/img/xb_big.png.js +1 -3
  362. package/es/shared/assets/img/xb_small.png.js +1 -3
  363. package/es/shared/components/SelectPage/SelectPage.vue.js +1 -61
  364. package/es/shared/components/SelectPage/index.js +1 -2
  365. package/es/shared/components/SlotRender/SlotRender.js +1 -35
  366. package/es/shared/components/SlotRender/index.js +1 -2
  367. package/es/shared/components/SvgIcon/SvgIcon.vue.js +1 -36
  368. package/es/shared/components/SvgIcon/index.js +1 -2
  369. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -77
  370. package/es/shared/components/TextOverTooltip/index.js +1 -2
  371. package/es/shared/components/VueDraggable/index.js +1 -2
  372. package/es/shared/components/VueDraggable/src/core/componentBuilderHelper.js +1 -35
  373. package/es/shared/components/VueDraggable/src/core/componentStructure.js +1 -54
  374. package/es/shared/components/VueDraggable/src/core/renderHelper.js +1 -47
  375. package/es/shared/components/VueDraggable/src/core/sortableEvents.js +1 -14
  376. package/es/shared/components/VueDraggable/src/util/console.js +1 -9
  377. package/es/shared/components/VueDraggable/src/util/htmlHelper.js +1 -11
  378. package/es/shared/components/VueDraggable/src/util/string.js +1 -11
  379. package/es/shared/components/VueDraggable/src/util/tags.js +1 -130
  380. package/es/shared/components/VueDraggable/src/vuedraggable.js +1 -265
  381. package/es/shared/components/no-data/NoData.vue.js +1 -74
  382. package/es/shared/components/no-data/index.js +1 -2
  383. package/es/shared/components/player-vod/player.js +1 -121
  384. package/es/shared/components/player-vod/video-modal.js +1 -91
  385. package/es/shared/global/variable.js +1 -3
  386. package/es/shared/utils/anime.js +1 -129
  387. package/es/shared/utils/colorLog.js +1 -53
  388. package/es/shared/utils/index.js +1 -167
  389. package/es/shared/utils/loadViewer.js +1 -11
  390. package/es/shared/utils/tapable/AsyncParallelBailHook.js +1 -63
  391. package/es/shared/utils/tapable/AsyncParallelHook.js +1 -27
  392. package/es/shared/utils/tapable/AsyncSeriesBailHook.js +1 -18
  393. package/es/shared/utils/tapable/AsyncSeriesHook.js +1 -27
  394. package/es/shared/utils/tapable/AsyncSeriesLoopHook.js +1 -12
  395. package/es/shared/utils/tapable/AsyncSeriesWaterfallHook.js +1 -22
  396. package/es/shared/utils/tapable/Hook.js +1 -140
  397. package/es/shared/utils/tapable/HookCodeFactory.js +1 -456
  398. package/es/shared/utils/tapable/SyncBailHook.js +1 -19
  399. package/es/shared/utils/tapable/SyncHook.js +1 -34
  400. package/es/shared/utils/tapable/SyncLoopHook.js +1 -13
  401. package/es/shared/utils/tapable/SyncWaterfallHook.js +1 -47
  402. package/es/shared/utils/utilExpand.js +1 -781
  403. package/es/shared/utils/vexutils.js +1 -59
  404. package/package.json +2 -2
@@ -1,734 +1 @@
1
- import { fabric } from '../utils/index.js';
2
- import { drawLine, defaultStyle, drawPoint, drawText, drawArrow } from './useDraw.js';
3
- import useGrid from './useGrid.js';
4
- import { useShadow } from './useShadow.js';
5
- import { TEMPERATURE_MENU, PAIN_MENU, OVERLAP } from './constant.js';
6
- import { cloneDeep } from 'lodash-es';
7
- import { isOneLine, getType, isValidValue, setOtherType, isEffectiveNode, getIndex, deleteProperty } from '../utils/utils.js';
8
-
9
- function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, getYValue, addRenderItem, pointTipProps, pointMenuProps, commonFunc) {
10
- useGrid(canvas, propItems);
11
- const { getEqualXTypes, repeatTip, maxLimitTip, minLimitTip } = commonFunc;
12
- const { createShadowLines } = useShadow();
13
- const {
14
- left,
15
- xScaleList,
16
- xCellWidth,
17
- yCellHeight,
18
- originX,
19
- endX,
20
- originY,
21
- endY,
22
- itemList,
23
- event,
24
- vitalSignsOriginY,
25
- painOriginY,
26
- hospitalizationDate,
27
- config,
28
- canvasHeight
29
- } = propItems;
30
- const shadowLinesCache = /* @__PURE__ */ new Set();
31
- const SHADOWKEYS = ["xinmai", "mai"];
32
- const shadowPointCache = /* @__PURE__ */ new Map();
33
- const maiboPoints = /* @__PURE__ */ new Set();
34
- const otherPoints = /* @__PURE__ */ new Set();
35
- const gridPoints = /* @__PURE__ */ new Set();
36
- const yScaleValue = cloneDeep(left.yScaleValue);
37
- init();
38
- function init() {
39
- shadowPointCache.clear();
40
- maiboPoints.clear();
41
- otherPoints.clear();
42
- yScaleValue.forEach((scaleValue) => {
43
- drawPositionLine(scaleValue);
44
- scaleValue.dataList.forEach((item, dataIndex) => {
45
- if (!isOneLine(scaleValue.type) || item.enable) {
46
- drawPolyLine(item, dataIndex, scaleValue);
47
- }
48
- });
49
- });
50
- drawShaDow();
51
- drawOverlapPoint();
52
- setCanvasEvent();
53
- }
54
- function drawPositionLine(scaleValue) {
55
- if (scaleValue.type !== "temperature" || !scaleValue.positionLine)
56
- return;
57
- const y = cumputedY(scaleValue.type, scaleValue.list, scaleValue.positionLine.value);
58
- const line = drawLine([originX, y, endX, y], scaleValue.positionLine);
59
- canvas.value.add(line);
60
- }
61
- function drawShaDow(target) {
62
- var _a;
63
- const pulseObj = yScaleValue.find((item) => item.type === "pulse");
64
- if (!pulseObj || !((_a = pulseObj.dataList) == null ? void 0 : _a.length))
65
- return;
66
- if (shadowLinesCache.size)
67
- canvas.value.remove(...shadowLinesCache);
68
- shadowLinesCache.clear();
69
- if (shadowPointCache.size > 1) {
70
- if (target) {
71
- const { type, key } = target.origin || {};
72
- if (type === "pulse") {
73
- const list = shadowPointCache.get(key);
74
- const index = list == null ? void 0 : list.findIndex((point) => point[0] === target.left);
75
- list.splice(index, 1, [target.left, target.top]);
76
- }
77
- }
78
- const data = getShadowData();
79
- data.forEach((item) => {
80
- var _a2, _b, _c, _d, _e, _f;
81
- const points = item.map((v) => ({ x: v[0], y: v[1] }));
82
- const polygon = new fabric.Polygon(points, {
83
- ...defaultStyle,
84
- ...((_a2 = pulseObj.shadow) == null ? void 0 : _a2.style) || {}
85
- });
86
- if (((_b = pulseObj.shadow) == null ? void 0 : _b.mode) == "slash") {
87
- polygon.set({
88
- fill: "transparent",
89
- stroke: ((_d = (_c = pulseObj.shadow) == null ? void 0 : _c.style) == null ? void 0 : _d.stroke) || "#f00"
90
- });
91
- const shadowLines = createShadowLines(item, (_e = pulseObj.shadow) == null ? void 0 : _e.style._angle, (_f = pulseObj.shadow) == null ? void 0 : _f.style.space);
92
- shadowLines.forEach((l) => {
93
- var _a3;
94
- Object.assign(l, {
95
- ...defaultStyle,
96
- ...((_a3 = pulseObj.shadow) == null ? void 0 : _a3.style) || {}
97
- });
98
- shadowLinesCache.add(l);
99
- });
100
- canvas.value.add(...shadowLines);
101
- }
102
- shadowLinesCache.add(polygon);
103
- canvas.value.add(polygon);
104
- });
105
- }
106
- }
107
- function getShadowData() {
108
- const data = [];
109
- const _shadowPointCache = [];
110
- const somes = [];
111
- for (const item of shadowPointCache) {
112
- _shadowPointCache.push(item[1]);
113
- if (item[0] === SHADOWKEYS[0]) {
114
- item[1].forEach((_item) => {
115
- const someIndex = (shadowPointCache.get(SHADOWKEYS[1]) || []).findIndex((v) => v[0] === _item[0]);
116
- someIndex > -1 && somes.push(_item[0]);
117
- });
118
- }
119
- }
120
- const [points1, points2] = _shadowPointCache;
121
- let _arr1 = [];
122
- let _arr2 = [];
123
- somes.forEach((left2) => {
124
- const index1 = points1.findIndex((point) => point[0] === left2);
125
- const index2 = points2.findIndex((point) => point[0] === left2);
126
- const currentPoint1 = points1[index1];
127
- const currentPoint2 = points2[index2];
128
- const prevPoint1 = points1[index1 - 1];
129
- const nextPoint1 = points1[index1 + 1];
130
- const prevPoint2 = points2[index2 - 1];
131
- const nextPoint2 = points2[index2 + 1];
132
- if (prevPoint1 && prevPoint2) {
133
- if (prevPoint1[0] !== prevPoint2[0]) {
134
- const maxPoint = Math.max(prevPoint1[0], prevPoint2[0]);
135
- _arr1.push([prevPoint1, prevPoint2].find((point) => point[0] === maxPoint));
136
- }
137
- } else if (prevPoint1) {
138
- _arr1.push(prevPoint1);
139
- } else if (prevPoint2) {
140
- _arr2.push(prevPoint2);
141
- }
142
- const minYPoint = Math.min(currentPoint1[1], currentPoint2[1]);
143
- _arr1.push([currentPoint1, currentPoint2].find((point) => point[1] === minYPoint));
144
- const maxYPoint = Math.max(currentPoint1[1], currentPoint2[1]);
145
- _arr2.push([currentPoint1, currentPoint2].find((point) => point[1] === maxYPoint));
146
- const setData = () => {
147
- const dataItem = [..._arr1, ..._arr2.reverse()];
148
- const [firstPoint] = dataItem;
149
- const lastPoint = dataItem.at(-1);
150
- if (firstPoint[0] === lastPoint[0] && firstPoint[1] === lastPoint[1])
151
- dataItem.splice(-1, 1);
152
- data.push(dataItem);
153
- _arr1 = [];
154
- _arr2 = [];
155
- };
156
- if (nextPoint1 && nextPoint2) {
157
- if (nextPoint1[0] !== nextPoint2[0]) {
158
- const minPoint = Math.min(nextPoint1[0], nextPoint2[0]);
159
- _arr1.push([nextPoint1, nextPoint2].find((point) => point[0] === minPoint));
160
- setData();
161
- }
162
- } else if (nextPoint1) {
163
- _arr1.push(nextPoint1);
164
- setData();
165
- } else if (nextPoint2) {
166
- _arr2.push(nextPoint2);
167
- setData();
168
- } else {
169
- setData();
170
- }
171
- });
172
- return data;
173
- }
174
- function setCanvasEvent() {
175
- if (!propItems.event.evented)
176
- return;
177
- canvas.value.on("mouse:up", (event2) => {
178
- var _a;
179
- if (event2.button === 3) {
180
- const { x = 0, y = 0 } = event2.pointer || {};
181
- if (x >= originX && x <= endX && y >= originY && y <= endY) {
182
- pointMenuProps.point = { x, y };
183
- pointMenuProps.show = true;
184
- const { type } = ((_a = event2.target) == null ? void 0 : _a.origin) || {};
185
- if (event2.target && ["temperature", "pain"].includes(type)) {
186
- if (type === "temperature") {
187
- pointMenuProps.list = [...TEMPERATURE_MENU];
188
- }
189
- if (type === "pain") {
190
- pointMenuProps.list = [...PAIN_MENU];
191
- }
192
- pointMenuProps.target = event2.target;
193
- } else {
194
- pointMenuProps.target = null;
195
- pointMenuProps.list = ["\u65B0\u589E\u8282\u70B9"];
196
- itemList.forEach((v) => {
197
- if (!getEqualXTypes(x, "_type", xCellWidth).includes(v.bigType)) {
198
- const newY = ["pain"].includes(v.bigType) ? painOriginY : vitalSignsOriginY;
199
- if (y >= newY.originY && y <= newY.endY) {
200
- pointMenuProps.list.push({
201
- renderItem: addRenderItem ? addRenderItem(v) : () => v.title,
202
- origin: {
203
- title: v.title,
204
- unit: v.unit,
205
- type: getType(v.bigType),
206
- dataIndex: v.dataIndex,
207
- key: v.key
208
- },
209
- pointer: event2.pointer
210
- });
211
- }
212
- }
213
- });
214
- const isLimitAdd = isAddPoint(x);
215
- if (!isLimitAdd || pointMenuProps.list.length === 1) {
216
- pointMenuProps.show = false;
217
- pointMenuProps.list.length === 1 && isLimitAdd && repeatTip();
218
- }
219
- }
220
- }
221
- }
222
- });
223
- }
224
- function drawOverlapPoint() {
225
- var _a;
226
- const pulseObj = yScaleValue.find((item) => item.type === "pulse");
227
- if (!pulseObj || !((_a = pulseObj.dataList) == null ? void 0 : _a.length))
228
- return;
229
- if (!pulseObj.dataList.some((item) => item.title.includes("\u8109\u640F")))
230
- return;
231
- const overlap = Object.assign({}, OVERLAP, left.overlap || {});
232
- const points = [];
233
- maiboPoints.size && [...maiboPoints].forEach((item) => {
234
- [...otherPoints].forEach((obj) => {
235
- if (obj.origin && item.left === obj.left && item.top === obj.top) {
236
- const key = obj.origin.key;
237
- if (key) {
238
- const pointer = {
239
- left: obj.left,
240
- top: obj.top,
241
- ...defaultStyle,
242
- hoverCursor: "default"
243
- };
244
- let type = "koumai";
245
- if (key === "yemai") {
246
- type = key;
247
- }
248
- if (key === "humai") {
249
- type = "circle";
250
- }
251
- points.push(
252
- drawPoint(type, {
253
- ...overlap[key] || {},
254
- ...pointer
255
- })
256
- );
257
- }
258
- }
259
- });
260
- });
261
- setTimeout(() => {
262
- canvas.value.add(...points);
263
- points.forEach((v) => {
264
- v == null ? void 0 : v.bringToFront();
265
- gridPoints.add(v);
266
- });
267
- });
268
- }
269
- function drawPolyLine(item, dataIndex, scaleValue) {
270
- var _a;
271
- const {
272
- type,
273
- riseStyle = {},
274
- noRiseStyle = {},
275
- verifiedStyle = {},
276
- reduceStyle = {},
277
- pacemaker = {},
278
- upArrowStyle = {},
279
- limitValueStyle = {},
280
- nonePainPointStyle = {},
281
- dataList = []
282
- } = scaleValue;
283
- const pointList = [];
284
- const lineList = [];
285
- const otherList = [];
286
- (_a = item.list) == null ? void 0 : _a.forEach((v, index) => {
287
- const _item = !isOneLine(type) ? item : dataList.find((_v) => _v.key === v.key);
288
- const points = getPointer(v, scaleValue);
289
- const otherObj = {};
290
- otherObj.value = drawValue(points, v, _item);
291
- drawOther(points, v, _item, otherObj);
292
- drawPulseOther(points, v, _item, otherObj);
293
- drawPointLine(points, v, index, _item, otherObj);
294
- });
295
- if (type === "pulse") {
296
- SHADOWKEYS.forEach((key) => {
297
- shadowPointCache.set(
298
- key,
299
- pointList.filter((point) => {
300
- var _a2;
301
- return ((_a2 = point.origin) == null ? void 0 : _a2.key) === key;
302
- }).map((point) => [point.left, point.top])
303
- );
304
- });
305
- }
306
- Promise.all(pointList).then((res) => {
307
- const lineListFilter = lineList.filter((v) => v);
308
- let prevPoint = null;
309
- res = res.map((point) => {
310
- if (point && prevPoint) {
311
- prevPoint.nextPoint = point;
312
- point.prevPoint = prevPoint;
313
- }
314
- prevPoint = point || prevPoint;
315
- return point;
316
- });
317
- Promise.all(otherList).then((r) => {
318
- canvas.value.add(...lineListFilter, ...res, ...r);
319
- res.forEach((point) => {
320
- point == null ? void 0 : point.bringToFront();
321
- removePulsePointLine(point, res);
322
- });
323
- });
324
- });
325
- function removePulsePointLine(point, pointList2) {
326
- if (point.origin.type === "pulse") {
327
- const someLeftList = pointList2.filter(
328
- (_point) => _point.left === point.left && _point.origin.type === "pulse"
329
- );
330
- if (someLeftList.length > 1) {
331
- point.leftLine && canvas.value.remove(point.leftLine);
332
- point.rightLine && canvas.value.remove(point.rightLine);
333
- }
334
- }
335
- }
336
- function drawValue(points, v, _item) {
337
- if (!(points == null ? void 0 : points.length) || !config.showValue)
338
- return;
339
- const { lineAttr = {} } = _item;
340
- const y = points[1] <= vitalSignsOriginY.originY + yCellHeight ? points[1] + yCellHeight : points[1] - yCellHeight;
341
- const value = drawText([points[0], y], {
342
- value: v.value,
343
- originX: "center",
344
- originY: "center",
345
- fill: lineAttr.stroke || "#000"
346
- });
347
- otherList.push(value);
348
- return {
349
- obj: value,
350
- top: -yCellHeight
351
- };
352
- }
353
- function drawOther(points, v, _item, otherObj) {
354
- var _a2, _b;
355
- if (!(points == null ? void 0 : points.length) || !["temperature", "pain"].includes(type))
356
- return;
357
- const { lineAttr = {} } = _item;
358
- const { value } = otherObj;
359
- let reduceLine, reducePoint, noRiseText, arrowGroup, riseText, verifiedText;
360
- if (v.noRise && noRiseStyle.show) {
361
- if (noRiseStyle.text) {
362
- noRiseText = drawText([points[0], points[1] + 5], {
363
- value: noRiseStyle.text.split("").join("\n"),
364
- originY: "top",
365
- ...noRiseStyle.style || {}
366
- });
367
- otherList.push(noRiseText);
368
- } else {
369
- const top = points[1] + yCellHeight * 2;
370
- arrowGroup = drawArrow([points[0], points[1], top], noRiseStyle.style || {});
371
- otherList.push(arrowGroup);
372
- }
373
- }
374
- if (v.rise && riseStyle.show) {
375
- if (riseStyle.text) {
376
- riseText = drawText([points[0], points[1] - (value ? yCellHeight : 0) - 5], {
377
- value: riseStyle.text.split("").join("\n"),
378
- originY: "bottom",
379
- ...riseStyle.style || {}
380
- });
381
- otherList.push(riseText);
382
- }
383
- }
384
- if (v.verified) {
385
- verifiedText = drawText([points[0], points[1] - (value ? yCellHeight : 0) - 5], {
386
- value: "v",
387
- originX: "center",
388
- originY: "bottom",
389
- ...verifiedStyle
390
- });
391
- otherList.push(verifiedText);
392
- }
393
- if (isValidValue(v.physicsReduce) || isValidValue(v.drugReduce)) {
394
- const reduceY = cumputedY(type, scaleValue.list, (_a2 = v.physicsReduce) != null ? _a2 : v.drugReduce);
395
- reduceLine = drawLine([...points, points[0], reduceY], {
396
- ...lineAttr,
397
- ...reduceStyle.line,
398
- ...defaultStyle
399
- });
400
- reducePoint = drawPoint(((_b = reduceStyle == null ? void 0 : reduceStyle.point) == null ? void 0 : _b.type) || "circle", {
401
- left: points[0],
402
- top: reduceY,
403
- ...reduceStyle.point,
404
- ...defaultStyle,
405
- originY: reduceY === canvasHeight ? "bottom" : "center"
406
- });
407
- reduceLine && otherList.push(reduceLine);
408
- reducePoint && otherList.push(reducePoint);
409
- }
410
- Object.assign(otherObj, {
411
- reduceLine: {
412
- obj: reduceLine,
413
- type: "line"
414
- },
415
- noRiseText: {
416
- obj: noRiseText,
417
- top: 5
418
- },
419
- arrowGroup: {
420
- obj: arrowGroup,
421
- top: yCellHeight * 2
422
- },
423
- riseText: {
424
- obj: riseText,
425
- top: (value ? -yCellHeight : 0) - 5
426
- },
427
- verifiedText: {
428
- obj: verifiedText,
429
- top: (value ? -yCellHeight : 0) - 5
430
- },
431
- reducePoint: {
432
- obj: reducePoint,
433
- type: "reduce"
434
- }
435
- });
436
- }
437
- function drawPulseOther(points, v, _item, otherObj) {
438
- if (!(points == null ? void 0 : points.length) || !["pulse"].includes(type))
439
- return;
440
- let upArrow, limitValue;
441
- const { upArrowShow = false, limitValueShow = false } = _item;
442
- if (upArrowShow && v.value > 180) {
443
- let top = points[1] - yCellHeight * 2.5;
444
- let yArr = [points[1] - yCellHeight / 2, top];
445
- if (top < vitalSignsOriginY.originY) {
446
- top = points[1] + yCellHeight * 2.5;
447
- yArr = [top, points[1] + yCellHeight / 2];
448
- }
449
- upArrow = drawArrow([points[0], yArr[0], yArr[1]], upArrowStyle, "up");
450
- otherList.push(upArrow);
451
- }
452
- if (limitValueShow) {
453
- const commonOptions = {
454
- value: v.value,
455
- originX: "center",
456
- originY: "center",
457
- ...limitValueStyle
458
- };
459
- if (v.value > Math.max(...scaleValue.list)) {
460
- const top = upArrow ? points[1] + yCellHeight / 2 + upArrow.height : points[1] + yCellHeight;
461
- limitValue = drawText([points[0], top], commonOptions);
462
- otherList.push(limitValue);
463
- }
464
- if (v.value < Math.min(...scaleValue.list)) {
465
- limitValue = drawText([points[0], points[1] - yCellHeight], commonOptions);
466
- otherList.push(limitValue);
467
- }
468
- }
469
- Object.assign(otherObj, {
470
- upArrow: {
471
- obj: upArrow
472
- },
473
- limitValue: {
474
- obj: limitValue,
475
- top: -yCellHeight
476
- }
477
- });
478
- }
479
- function drawPointLine(points, v, index, _item, otherObj) {
480
- let point;
481
- let line;
482
- const { pointAttr = {}, lineAttr = {}, title = "", key, type: pointType = "circle" } = _item;
483
- const nextV = item.list[index + 1];
484
- const nextPoint = getPointer(nextV, scaleValue);
485
- const isNonePain = isNoneValuePain(type, item.list[index].value);
486
- const isNextNonePain = nextPoint && isNoneValuePain(type, nextV.value);
487
- if (points && nextPoint && !v.breakpoint && !isNonePain && !isNextNonePain && points[0] !== nextPoint[0]) {
488
- line = drawLine([...points, ...nextPoint], {
489
- ...lineAttr
490
- });
491
- }
492
- const currentPointType = v.pacemakerShow && type == "pulse" ? pacemaker.value : isNonePain ? 0 : pointType;
493
- const previousLine = lineList[index - 1];
494
- const pointAttrNew = {
495
- origin: {
496
- data: v,
497
- title,
498
- key: key || "",
499
- unit: scaleValue.unit,
500
- type,
501
- _type: setOtherType(title, type),
502
- dataIndex,
503
- index
504
- },
505
- leftLine: previousLine,
506
- rightLine: line,
507
- otherObj,
508
- lockMovementX: true,
509
- ...v.pacemakerShow && type == "pulse" ? pacemaker.style : pointAttr,
510
- ...propItems.event,
511
- ...isNonePain ? { selectable: false, evented: false, ...nonePainPointStyle } : {}
512
- };
513
- if (previousLine) {
514
- const y = previousLine.get("y2");
515
- point = drawPoint(currentPointType, {
516
- left: previousLine.get("x2"),
517
- top: isNonePain ? y - 5 : y,
518
- ...pointAttrNew
519
- });
520
- } else {
521
- if (points) {
522
- pointAttrNew.leftLine = null;
523
- point = drawPoint(currentPointType, {
524
- left: points[0],
525
- top: isNonePain ? points[1] - 5 : points[1],
526
- ...pointAttrNew
527
- });
528
- }
529
- }
530
- lineList.push(line);
531
- if (point) {
532
- if (title.includes("\u8109\u640F")) {
533
- maiboPoints.add(point);
534
- } else {
535
- otherPoints.add(point);
536
- }
537
- setPointEvent(point);
538
- pointList.push(point);
539
- gridPoints.add(point);
540
- }
541
- }
542
- }
543
- function isNoneValuePain(type, value) {
544
- return type === "pain" && value == 0;
545
- }
546
- function setPointEvent(point) {
547
- if (event.hovered) {
548
- point.on("mouseover", () => {
549
- setPopup(point);
550
- });
551
- point.on("mouseout", () => {
552
- pointTipProps.show = false;
553
- });
554
- }
555
- point.on("moving", () => {
556
- moveLimit(point);
557
- updateLine(point);
558
- event.hovered && setPopup(point);
559
- });
560
- point.on("mouseup", (event2) => {
561
- pointTipProps.show = false;
562
- if (event2.button === 1) {
563
- const { type } = point.origin;
564
- const value = getYValue(type, point.top);
565
- const params = {
566
- ...point.origin,
567
- data: {
568
- ...point.origin.data,
569
- value
570
- }
571
- };
572
- canvas.value.discardActiveObject();
573
- emits("change", params);
574
- updateData(params, "change");
575
- }
576
- });
577
- }
578
- function setPopup(point) {
579
- const { title, unit, type, data } = point.origin;
580
- pointTipProps.point = {
581
- x: point.left,
582
- y: point.top
583
- };
584
- pointTipProps.list = [getListValue(), `\u65F6\u95F4 ${((data == null ? void 0 : data.time) || getXValue(point.left)).slice(-5)}`];
585
- pointTipProps.show = true;
586
- function getListValue() {
587
- const { value = getYValue(type, point.top), drugReduce, physicsReduce } = data || {};
588
- if (isValidValue(drugReduce)) {
589
- return `\u836F\u7269\u964D${type == "pain" ? "\u75DB" : "\u6E29"} ${value}\u2014>${drugReduce}${unit || ""}`;
590
- }
591
- if (isValidValue(physicsReduce)) {
592
- return `\u7269\u7406\u964D${type == "pain" ? "\u75DB" : "\u6E29"} ${value}\u2014>${physicsReduce}${unit || ""}`;
593
- }
594
- return `${title} ${value}${unit || ""}`;
595
- }
596
- }
597
- function moveLimit(point) {
598
- point.setCoords();
599
- const newY = point.origin.type === "pain" ? painOriginY : vitalSignsOriginY;
600
- if (point.top < newY.originY) {
601
- point.set("top", newY.originY);
602
- }
603
- if (point.top > newY.endY) {
604
- point.set("top", newY.endY);
605
- }
606
- }
607
- function updateLine(point) {
608
- var _a, _b;
609
- (_a = point.leftLine) == null ? void 0 : _a.setCoords().set({ x2: point.left, y2: point.top });
610
- (_b = point.rightLine) == null ? void 0 : _b.setCoords().set({ x1: point.left, y1: point.top });
611
- Object.values(point.otherObj).forEach((o) => {
612
- const { obj, type = "", top = 0 } = o || {};
613
- if (type === "reduce")
614
- return;
615
- if (type === "line") {
616
- obj == null ? void 0 : obj.setCoords().set({ x1: point.left, y1: point.top });
617
- } else {
618
- obj == null ? void 0 : obj.setCoords().set({ left: point.left, top: point.top + top });
619
- }
620
- });
621
- drawShaDow(point);
622
- }
623
- function isLimit(time) {
624
- const [minScale] = xScaleList;
625
- const maxScale = xScaleList.at(-1);
626
- const minMinute = minScale.start;
627
- const maxMinute = maxScale.end;
628
- const getTime = new Date(time).getTime();
629
- return getTime >= minMinute && getTime <= maxMinute;
630
- }
631
- function getPointer(v, scaleValue) {
632
- const objOriginY = scaleValue.type === "pain" ? painOriginY : vitalSignsOriginY;
633
- if (isEffectiveNode(v) && isLimit(v.time)) {
634
- const x = cumputedX(v.time);
635
- const y = cumputedY(scaleValue.type, scaleValue.list, v.value);
636
- return [x, y < objOriginY.originY ? objOriginY.originY : y > objOriginY.endY ? objOriginY.endY : y];
637
- }
638
- }
639
- function isAddPoint(x) {
640
- const d = new Date();
641
- const month = `00${d.getMonth() + 1}`.slice(-2);
642
- const day = `00${d.getDate()}`.slice(-2);
643
- const todayTime = new Date(`${d.getFullYear()}-${month}-${day} 23:59:59`).getTime();
644
- const pointTime = new Date(`${getXValue(x)}:00`).getTime();
645
- if (hospitalizationDate && pointTime < new Date(hospitalizationDate).getTime()) {
646
- minLimitTip();
647
- return false;
648
- }
649
- if (pointTime > todayTime) {
650
- maxLimitTip();
651
- return false;
652
- }
653
- return true;
654
- }
655
- function clickMenu({ item, target }) {
656
- if (!target) {
657
- const params = {
658
- data: {
659
- time: getXValue(item.pointer.x),
660
- value: getYValue(item.origin.type, item.pointer.y),
661
- ...!isOneLine(item.origin.type) ? {} : { key: item.origin.key }
662
- },
663
- ...item.origin
664
- };
665
- emits("add", params);
666
- updateData(params);
667
- } else {
668
- const { data, type, dataIndex, index } = target.origin;
669
- const _data = deleteProperty(data, [...TEMPERATURE_MENU, ...PAIN_MENU]);
670
- _data[`${item.type}`] = item.value;
671
- if (isOneLine(type)) {
672
- _data["key"] = target.origin.key;
673
- }
674
- const params = {
675
- ...target.origin,
676
- data: _data
677
- };
678
- emits("change", params);
679
- updateData(params, "change");
680
- }
681
- }
682
- function updateData(params, mode = "add") {
683
- const { type, dataIndex, index, data, key } = params;
684
- const obj = yScaleValue.find((v) => v.type === type);
685
- if (mode === "add") {
686
- const dataList = !isOneLine(type) ? obj.dataList[dataIndex] : obj.dataList.find((v) => v.enable);
687
- const index2 = getIndex(data.time, dataList.list);
688
- dataList.list.splice(index2, 0, data);
689
- } else {
690
- obj.dataList[dataIndex].list[index] = data;
691
- }
692
- redrawPoints();
693
- }
694
- function getRemovePoints(points) {
695
- const removePoints = [];
696
- points.forEach((point) => {
697
- point && removePoints.push(point);
698
- (point == null ? void 0 : point.leftLine) && removePoints.push(point == null ? void 0 : point.leftLine);
699
- (point == null ? void 0 : point.rightLine) && removePoints.push(point == null ? void 0 : point.rightLine);
700
- Object.values((point == null ? void 0 : point.otherObj) || {}).forEach((o) => {
701
- (o == null ? void 0 : o.obj) && removePoints.push(o == null ? void 0 : o.obj);
702
- });
703
- });
704
- return removePoints;
705
- }
706
- function redrawPoints() {
707
- var _a;
708
- gridPoints.size && ((_a = canvas.value) == null ? void 0 : _a.remove(...getRemovePoints([...gridPoints])));
709
- shadowPointCache.clear();
710
- gridPoints.clear();
711
- maiboPoints.clear();
712
- otherPoints.clear();
713
- yScaleValue.forEach((scaleValue) => {
714
- scaleValue.dataList.forEach((item, dataIndex) => {
715
- if (!isOneLine(scaleValue.type) || item.enable) {
716
- drawPolyLine(item, dataIndex, scaleValue);
717
- }
718
- });
719
- });
720
- drawShaDow();
721
- drawOverlapPoint();
722
- }
723
- return {
724
- pointTipProps,
725
- pointMenuProps,
726
- clickMenu,
727
- setPopup,
728
- isAddPoint,
729
- updateData,
730
- redrawPoints
731
- };
732
- }
733
-
734
- export { useCenter };
1
+ import{fabric as e}from"../utils/index.js";import{drawLine as t,defaultStyle as i,drawPoint as n,drawText as o,drawArrow as l}from"./useDraw.js";import s from"./useGrid.js";import{useShadow as r}from"./useShadow.js";import{TEMPERATURE_MENU as a,PAIN_MENU as u,OVERLAP as p}from"./constant.js";import{cloneDeep as c}from"lodash-es";import{isOneLine as d,getType as f,isValidValue as h,setOtherType as g,isEffectiveNode as v,getIndex as y,deleteProperty as m}from"../utils/utils.js";function x(x,b,w,L,j,k,Y,S,E,$,T){s(x,b);const{getEqualXTypes:P,repeatTip:O,maxLimitTip:M,minLimitTip:I}=T,{createShadowLines:A}=r(),{left:D,xScaleList:R,xCellWidth:C,yCellHeight:X,originX:z,endX:V,originY:F,endY:_,itemList:G,event:H,vitalSignsOriginY:q,painOriginY:W,hospitalizationDate:B,config:J,canvasHeight:K}=b,N=new Set,Q=["xinmai","mai"],U=new Map,Z=new Set,ee=new Set,te=new Set,ie=c(D.yScaleValue);function ne(t){var n;const o=ie.find((e=>"pulse"===e.type));if(o&&(null==(n=o.dataList)?void 0:n.length)&&(N.size&&x.value.remove(...N),N.clear(),U.size>1)){if(t){const{type:e,key:i}=t.origin||{};if("pulse"===e){const e=U.get(i),n=null==e?void 0:e.findIndex((e=>e[0]===t.left));e.splice(n,1,[t.left,t.top])}}(function(){const e=[],t=[],i=[];for(const e of U)t.push(e[1]),e[0]===Q[0]&&e[1].forEach((e=>{(U.get(Q[1])||[]).findIndex((t=>t[0]===e[0]))>-1&&i.push(e[0])}));const[n,o]=t;let l=[],s=[];return i.forEach((t=>{const i=n.findIndex((e=>e[0]===t)),r=o.findIndex((e=>e[0]===t)),a=n[i],u=o[r],p=n[i-1],c=n[i+1],d=o[r-1],f=o[r+1];if(p&&d){if(p[0]!==d[0]){const e=Math.max(p[0],d[0]);l.push([p,d].find((t=>t[0]===e)))}}else p?l.push(p):d&&s.push(d);const h=Math.min(a[1],u[1]);l.push([a,u].find((e=>e[1]===h)));const g=Math.max(a[1],u[1]);s.push([a,u].find((e=>e[1]===g)));const v=()=>{const t=[...l,...s.reverse()],[i]=t,n=t.at(-1);i[0]===n[0]&&i[1]===n[1]&&t.splice(-1,1),e.push(t),l=[],s=[]};if(c&&f){if(c[0]!==f[0]){const e=Math.min(c[0],f[0]);l.push([c,f].find((t=>t[0]===e))),v()}}else c?(l.push(c),v()):f?(s.push(f),v()):v()})),e})().forEach((t=>{var n,l,s,r,a,u;const p=t.map((e=>({x:e[0],y:e[1]}))),c=new e.Polygon(p,{...i,...(null==(n=o.shadow)?void 0:n.style)||{}});if("slash"==(null==(l=o.shadow)?void 0:l.mode)){c.set({fill:"transparent",stroke:(null==(r=null==(s=o.shadow)?void 0:s.style)?void 0:r.stroke)||"#f00"});const e=A(t,null==(a=o.shadow)?void 0:a.style._angle,null==(u=o.shadow)?void 0:u.style.space);e.forEach((e=>{var t;Object.assign(e,{...i,...(null==(t=o.shadow)?void 0:t.style)||{}}),N.add(e)})),x.value.add(...e)}N.add(c),x.value.add(c)}))}}function oe(){var e;const t=ie.find((e=>"pulse"===e.type));if(!t||!(null==(e=t.dataList)?void 0:e.length))return;if(!t.dataList.some((e=>e.title.includes("脉搏"))))return;const o=Object.assign({},p,D.overlap||{}),l=[];Z.size&&[...Z].forEach((e=>{[...ee].forEach((t=>{if(t.origin&&e.left===t.left&&e.top===t.top){const e=t.origin.key;if(e){const s={left:t.left,top:t.top,...i,hoverCursor:"default"};let r="koumai";"yemai"===e&&(r=e),"humai"===e&&(r="circle"),l.push(n(r,{...o[e]||{},...s}))}}}))})),setTimeout((()=>{x.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),te.add(e)}))}))}function le(e,s,r){var a;const{type:u,riseStyle:p={},noRiseStyle:c={},verifiedStyle:f={},reduceStyle:v={},pacemaker:y={},upArrowStyle:m={},limitValueStyle:L={},nonePainPointStyle:k={},dataList:S=[]}=r,$=[],T=[],P=[];null==(a=e.list)||a.forEach(((a,O)=>{const M=d(u)?S.find((e=>e.key===a.key)):e,I=ae(a,r),A={};A.value=function(e,t,i){if(!(null==e?void 0:e.length)||!J.showValue)return;const{lineAttr:n={}}=i,l=e[1]<=q.originY+X?e[1]+X:e[1]-X,s=o([e[0],l],{value:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return P.push(s),{obj:s,top:-X}}(I,a,M),function(e,s,a,d){var g,y;if(!(null==e?void 0:e.length)||!["temperature","pain"].includes(u))return;const{lineAttr:m={}}=a,{value:x}=d;let b,w,L,k,Y,S;if(s.noRise&&c.show)if(c.text)L=o([e[0],e[1]+5],{value:c.text.split("").join("\n"),originY:"top",...c.style||{}}),P.push(L);else{const t=e[1]+2*X;k=l([e[0],e[1],t],c.style||{}),P.push(k)}s.rise&&p.show&&p.text&&(Y=o([e[0],e[1]-(x?X:0)-5],{value:p.text.split("").join("\n"),originY:"bottom",...p.style||{}}),P.push(Y));s.verified&&(S=o([e[0],e[1]-(x?X:0)-5],{value:"v",originX:"center",originY:"bottom",...f}),P.push(S));if(h(s.physicsReduce)||h(s.drugReduce)){const o=j(u,r.list,null!=(g=s.physicsReduce)?g:s.drugReduce);b=t([...e,e[0],o],{...m,...v.line,...i}),w=n((null==(y=null==v?void 0:v.point)?void 0:y.type)||"circle",{left:e[0],top:o,...v.point,...i,originY:o===K?"bottom":"center"}),b&&P.push(b),w&&P.push(w)}Object.assign(d,{reduceLine:{obj:b,type:"line"},noRiseText:{obj:L,top:5},arrowGroup:{obj:k,top:2*X},riseText:{obj:Y,top:(x?-X:0)-5},verifiedText:{obj:S,top:(x?-X:0)-5},reducePoint:{obj:w,type:"reduce"}})}(I,a,M,A),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(u))return;let s,a;const{upArrowShow:p=!1,limitValueShow:c=!1}=i;if(p&&t.value>180){let t=e[1]-2.5*X,i=[e[1]-X/2,t];t<q.originY&&(t=e[1]+2.5*X,i=[t,e[1]+X/2]),s=l([e[0],i[0],i[1]],m,"up"),P.push(s)}if(c){const i={value:t.value,originX:"center",originY:"center",...L};if(t.value>Math.max(...r.list)){const t=s?e[1]+X/2+s.height:e[1]+X;a=o([e[0],t],i),P.push(a)}t.value<Math.min(...r.list)&&(a=o([e[0],e[1]-X],i),P.push(a))}Object.assign(n,{upArrow:{obj:s},limitValue:{obj:a,top:-X}})}(I,a,M,A),function(i,o,l,a,p){let c,d;const{pointAttr:f={},lineAttr:h={},title:v="",key:m,type:L="circle"}=a,j=e.list[l+1],S=ae(j,r),P=se(u,e.list[l].value),O=S&&se(u,j.value);!i||!S||o.breakpoint||P||O||i[0]===S[0]||(d=t([...i,...S],{...h}));const M=o.pacemakerShow&&"pulse"==u?y.value:P?0:L,I=T[l-1],A={origin:{data:o,title:v,key:m||"",unit:r.unit,type:u,_type:g(v,u),dataIndex:s,index:l},leftLine:I,rightLine:d,otherObj:p,lockMovementX:!0,...o.pacemakerShow&&"pulse"==u?y.style:f,...b.event,...P?{selectable:!1,evented:!1,...k}:{}};if(I){const e=I.get("y2");c=n(M,{left:I.get("x2"),top:P?e-5:e,...A})}else i&&(A.leftLine=null,c=n(M,{left:i[0],top:P?i[1]-5:i[1],...A}));T.push(d),c&&(v.includes("脉搏")?Z.add(c):ee.add(c),function(e){H.hovered&&(e.on("mouseover",(()=>{re(e)})),e.on("mouseout",(()=>{E.show=!1})));e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?W:q;e.top<t.originY&&e.set("top",t.originY);e.top>t.endY&&e.set("top",t.endY)}(e),function(e){var t,i;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(i=e.rightLine)||i.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:i,type:n="",top:o=0}=t||{};"reduce"!==n&&("line"===n?null==i||i.setCoords().set({x1:e.left,y1:e.top}):null==i||i.setCoords().set({left:e.left,top:e.top+o}))})),ne(e)}(e),H.hovered&&re(e)})),e.on("mouseup",(t=>{if(E.show=!1,1===t.button){const{type:t}=e.origin,i=Y(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};x.value.discardActiveObject(),w("change",n),pe(n,"change")}}))}(c),$.push(c),te.add(c))}(I,a,O,M,A)})),"pulse"===u&&Q.forEach((e=>{U.set(e,$.filter((t=>{var i;return(null==(i=t.origin)?void 0:i.key)===e})).map((e=>[e.left,e.top])))})),Promise.all($).then((e=>{const t=T.filter((e=>e));let i=null;e=e.map((e=>(e&&i&&(i.nextPoint=e,e.prevPoint=i),i=e||i,e))),Promise.all(P).then((i=>{x.value.add(...t,...e,...i),e.forEach((t=>{null==t||t.bringToFront(),function(e,t){if("pulse"===e.origin.type){t.filter((t=>t.left===e.left&&"pulse"===t.origin.type)).length>1&&(e.leftLine&&x.value.remove(e.leftLine),e.rightLine&&x.value.remove(e.rightLine))}}(t,e)}))}))}))}function se(e,t){return"pain"===e&&0==t}function re(e){const{title:t,unit:i,type:n,data:o}=e.origin;E.point={x:e.left,y:e.top},E.list=[function(){const{value:l=Y(n,e.top),drugReduce:s,physicsReduce:r}=o||{};if(h(s))return`药物降${"pain"==n?"痛":"温"} ${l}—>${s}${i||""}`;if(h(r))return`物理降${"pain"==n?"痛":"温"} ${l}—>${r}${i||""}`;return`${t} ${l}${i||""}`}(),`时间 ${((null==o?void 0:o.time)||k(e.left)).slice(-5)}`],E.show=!0}function ae(e,t){const i="pain"===t.type?W:q;if(v(e)&&function(e){const[t]=R,i=R.at(-1),n=t.start,o=i.end,l=new Date(e).getTime();return l>=n&&l<=o}(e.time)){const n=L(e.time),o=j(t.type,t.list,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}}function ue(e){const t=new Date,i=`00${t.getMonth()+1}`.slice(-2),n=`00${t.getDate()}`.slice(-2),o=new Date(`${t.getFullYear()}-${i}-${n} 23:59:59`).getTime(),l=new Date(`${k(e)}:00`).getTime();return B&&l<new Date(B).getTime()?(I(),!1):!(l>o)||(M(),!1)}function pe(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:s}=e,r=ie.find((e=>e.type===i));if("add"===t){const e=d(i)?r.dataList.find((e=>e.enable)):r.dataList[n],t=y(l.time,e.list);e.list.splice(t,0,l)}else r.dataList[n].list[o]=l;ce()}function ce(){var e;te.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}([...te]))),U.clear(),te.clear(),Z.clear(),ee.clear(),ie.forEach((e=>{e.dataList.forEach(((t,i)=>{d(e.type)&&!t.enable||le(t,i,e)}))})),ne(),oe()}return U.clear(),Z.clear(),ee.clear(),ie.forEach((e=>{!function(e){if("temperature"!==e.type||!e.positionLine)return;const i=j(e.type,e.list,e.positionLine.value),n=t([z,i,V,i],e.positionLine);x.value.add(n)}(e),e.dataList.forEach(((t,i)=>{d(e.type)&&!t.enable||le(t,i,e)}))})),ne(),oe(),b.event.evented&&x.value.on("mouse:up",(e=>{var t;if(3===e.button){const{x:i=0,y:n=0}=e.pointer||{};if(i>=z&&i<=V&&n>=F&&n<=_){$.point={x:i,y:n},$.show=!0;const{type:o}=(null==(t=e.target)?void 0:t.origin)||{};if(e.target&&["temperature","pain"].includes(o))"temperature"===o&&($.list=[...a]),"pain"===o&&($.list=[...u]),$.target=e.target;else{$.target=null,$.list=["新增节点"],G.forEach((t=>{if(!P(i,"_type",C).includes(t.bigType)){const i=["pain"].includes(t.bigType)?W:q;n>=i.originY&&n<=i.endY&&$.list.push({renderItem:S?S(t):()=>t.title,origin:{title:t.title,unit:t.unit,type:f(t.bigType),dataIndex:t.dataIndex,key:t.key},pointer:e.pointer})}}));const t=ue(i);t&&1!==$.list.length||($.show=!1,1===$.list.length&&t&&O())}}}})),{pointTipProps:E,pointMenuProps:$,clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,dataIndex:o,index:l}=t.origin,s=m(i,[...a,...u]);s[`${e.type}`]=e.value,d(n)&&(s.key=t.origin.key);const r={...t.origin,data:s};w("change",r),pe(r,"change")}else{const t={data:{time:k(e.pointer.x),value:Y(e.origin.type,e.pointer.y),...d(e.origin.type)?{key:e.origin.key}:{}},...e.origin};w("add",t),pe(t)}},setPopup:re,isAddPoint:ue,updateData:pe,redrawPoints:ce}}export{x as useCenter};