cnhis-design-vue 3.2.7-beta.3 → 3.2.7-beta.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (201) hide show
  1. package/README.md +87 -87
  2. package/es/components/base-search/index.d.ts +2 -0
  3. package/es/components/base-search/src/index.vue.d.ts +2 -0
  4. package/es/components/button-print/index.d.ts +27 -0
  5. package/es/components/button-print/src/ButtonPrint.vue.d.ts +27 -0
  6. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  7. package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +1 -0
  8. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  9. package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +9 -0
  10. package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
  11. package/es/components/button-print/style/index.css +1 -1
  12. package/es/components/callback/src/components/render/popupMaps.d.ts +27 -0
  13. package/es/components/classification/index.d.ts +60 -5
  14. package/es/components/classification/src/components/search-filter/index.vue.d.ts +60 -5
  15. package/es/components/classification/src/components/set-classification/index.vue.d.ts +60 -5
  16. package/es/components/classification/src/index.vue.d.ts +60 -5
  17. package/es/components/date-picker/index.d.ts +13 -0
  18. package/es/components/date-picker/src/DatePicker.vue.d.ts +13 -0
  19. package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
  20. package/es/components/fabric-chart/src/constants/index.d.ts +3 -1
  21. package/es/components/fabric-chart/src/constants/index.js +1 -1
  22. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  23. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.d.ts +8 -3
  24. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
  25. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.d.ts +9 -6
  26. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  27. package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -1
  28. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcess.js +1 -1
  29. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.d.ts +0 -2
  30. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.js +1 -1
  31. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts +8 -3
  32. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  33. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  34. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  35. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.d.ts +8 -3
  36. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  37. package/es/components/fabric-chart/src/hooks/useScaleColumn.d.ts +1 -1
  38. package/es/components/fabric-chart/src/hooks/useScaleColumn.js +1 -1
  39. package/es/components/fabric-chart/src/interface.d.ts +11 -1
  40. package/es/components/field-set/src/FieldColor.vue.d.ts +26 -0
  41. package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
  42. package/es/components/field-set/src/components/condition.vue.d.ts +13 -0
  43. package/es/components/field-set/src/components/edit-dialog.vue.d.ts +26 -0
  44. package/es/components/field-set/src/components/edit-filter.vue.d.ts +13 -0
  45. package/es/components/form-config/index.d.ts +40 -3
  46. package/es/components/form-config/src/FormConfig.vue.d.ts +40 -3
  47. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +14 -0
  48. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +23 -3
  49. package/es/components/form-config/src/components/FormConfigEdit.vue2.js +1 -1
  50. package/es/components/form-render/index.d.ts +14 -0
  51. package/es/components/form-render/src/FormRender.vue.d.ts +14 -0
  52. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  53. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +14 -0
  54. package/es/components/form-render/src/components/renderer/formItem.d.ts +9 -0
  55. package/es/components/form-render/src/components/renderer/formItem.js +1 -1
  56. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -0
  57. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -0
  58. package/es/components/form-render/src/components/tooltipMessage.vue2.js +1 -1
  59. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  60. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -0
  61. package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
  62. package/es/components/form-render/src/types/fieldItem.d.ts +3 -1
  63. package/es/components/form-render/src/types/index.d.ts +2 -1
  64. package/es/components/form-render/src/utils/business.js +1 -1
  65. package/es/components/form-render/src/utils/schema.d.ts +1 -1
  66. package/es/components/form-render/src/utils/schema.js +1 -1
  67. package/es/components/iho-chat/index.d.ts +300 -75
  68. package/es/components/iho-chat/src/Index.vue.d.ts +300 -75
  69. package/es/components/iho-chat/src/Index.vue2.js +1 -1
  70. package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +35 -13
  71. package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
  72. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +41 -14
  73. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  74. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +50 -14
  75. package/es/components/iho-chat/src/components/ChatHeader.vue2.js +1 -1
  76. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +24 -4
  77. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  78. package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +13 -0
  79. package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
  80. package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +60 -11
  81. package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
  82. package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
  83. package/es/components/iho-chat/src/components/ContextMenu.d.ts +15 -2
  84. package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
  85. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +62 -24
  86. package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
  87. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  88. package/es/components/iho-chat/src/components/SiderList.vue.d.ts +1 -0
  89. package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
  90. package/es/components/iho-chat/src/components/Video.vue.d.ts +14 -2
  91. package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
  92. package/es/components/iho-chat/src/hooks/useScrollLoading.d.ts +1 -1
  93. package/es/components/iho-chat/src/hooks/useScrollLoading.js +1 -1
  94. package/es/components/iho-chat/src/hooks/useSearchUserList.d.ts +11 -0
  95. package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -0
  96. package/es/components/iho-chat/src/hooks/useSession.js +1 -1
  97. package/es/components/iho-chat/src/hooks/useState.js +1 -1
  98. package/es/components/iho-chat/src/hooks/useVideo.d.ts +11 -0
  99. package/es/components/iho-chat/src/hooks/useVideo.js +1 -1
  100. package/es/components/iho-chat/src/types/index.d.ts +0 -1
  101. package/es/components/iho-chat/src/utils/index.js +1 -1
  102. package/es/components/iho-chat/style/index.css +1 -1
  103. package/es/components/iho-table/index.d.ts +13 -0
  104. package/es/components/iho-table/src/IhoTable.vue.d.ts +13 -0
  105. package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
  106. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +13 -0
  107. package/es/components/iho-table/src/plugins/headerPlugin/index.d.ts +1 -0
  108. package/es/components/iho-table/src/plugins/headerPlugin/index.js +1 -0
  109. package/es/components/iho-table/src/plugins/headerPlugin/tooltipMessage.vue.d.ts +13 -0
  110. package/es/components/iho-table/src/plugins/headerPlugin/tooltipMessage.vue.js +1 -0
  111. package/es/components/iho-table/src/plugins/headerPlugin/tooltipMessage.vue2.js +1 -0
  112. package/es/components/iho-table/src/plugins/index.js +1 -1
  113. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +13 -0
  114. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +20 -2
  115. package/es/components/iho-table/src/types/index.d.ts +3 -0
  116. package/es/components/iho-table/src/utils/index.d.ts +0 -1
  117. package/es/components/iho-table/src/utils/index.js +1 -1
  118. package/es/components/index.css +1 -1
  119. package/es/components/info-header/index.d.ts +34 -0
  120. package/es/components/info-header/src/InfoHeader.vue.d.ts +34 -0
  121. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +2 -0
  122. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue2.js +1 -1
  123. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +2 -0
  124. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +16 -0
  125. package/es/components/info-header/src/components/infoDescription/index.vue2.js +1 -1
  126. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +14 -0
  127. package/es/components/quick-search/src/index.vue2.js +1 -1
  128. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  129. package/es/components/shortcut-setter/index.d.ts +16 -1
  130. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +16 -1
  131. package/es/components/steps-wheel/index.d.ts +1 -1
  132. package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +1 -1
  133. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +13 -0
  134. package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +13 -0
  135. package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +13 -0
  136. package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +13 -0
  137. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +47 -5
  138. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +13 -0
  139. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +13 -0
  140. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.d.ts +37 -19
  141. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js +1 -1
  142. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +47 -5
  143. package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -1
  144. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +47 -5
  145. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +13 -0
  146. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +13 -0
  147. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +13 -0
  148. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +13 -0
  149. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +33 -18
  150. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -1
  151. package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue.d.ts +13 -0
  152. package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue2.js +1 -1
  153. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +69 -4
  154. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +69 -4
  155. package/es/components/table-filter/src/tool/transformData.js +1 -1
  156. package/es/components/table-filter/src/types/index.d.ts +3 -0
  157. package/es/components/time-line/index.d.ts +4 -4
  158. package/es/components/time-line/src/TimeLine.vue.d.ts +1 -1
  159. package/es/components/time-line/src/TimeLine.vue2.js +1 -1
  160. package/es/components/time-picker/index.d.ts +20 -2
  161. package/es/components/time-picker/src/TimePicker.vue.d.ts +21 -2
  162. package/es/components/time-picker/src/TimePicker.vue2.js +1 -1
  163. package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
  164. package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
  165. package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
  166. package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
  167. package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
  168. package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
  169. package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
  170. package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
  171. package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
  172. package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
  173. package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
  174. package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
  175. package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
  176. package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
  177. package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
  178. package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
  179. package/es/shared/assets/img/failure.png.js +1 -1
  180. package/es/shared/assets/img/no-permission.png.js +1 -1
  181. package/es/shared/assets/img/nodata.png.js +1 -1
  182. package/es/shared/assets/img/notfound.png.js +1 -1
  183. package/es/shared/assets/img/qr.png.js +1 -1
  184. package/es/shared/assets/img/success.png.js +1 -1
  185. package/es/shared/assets/img/table_style_2.png.js +1 -1
  186. package/es/shared/assets/img/video.png.js +1 -1
  187. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  188. package/es/shared/assets/img/xb_big.png.js +1 -1
  189. package/es/shared/assets/img/xb_small.png.js +1 -1
  190. package/es/shared/package.json.js +1 -1
  191. package/es/shared/utils/business.js +1 -1
  192. package/package.json +2 -2
  193. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  194. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  195. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  196. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  197. package/es/components/iho-table/src/plugins/headerPlugin.d.ts +0 -1
  198. package/es/components/iho-table/src/plugins/headerPlugin.js +0 -1
  199. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  200. package/es/shared/utils/fabricjs/index.d.ts +0 -6823
  201. package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -587,6 +587,10 @@ declare const _default: import("vue").DefineComponent<{
587
587
  allowedInvalidValue: {
588
588
  type: StringConstructor;
589
589
  };
590
+ to: {
591
+ type: import("vue").PropType<string | false | HTMLElement>;
592
+ default: string;
593
+ };
590
594
  }, {
591
595
  attrs: {
592
596
  [x: string]: unknown;
@@ -607,6 +611,10 @@ declare const _default: import("vue").DefineComponent<{
607
611
  allowedInvalidValue: {
608
612
  type: StringConstructor;
609
613
  };
614
+ to: {
615
+ type: import("vue").PropType<string | false | HTMLElement>;
616
+ default: string;
617
+ };
610
618
  }>> & {
611
619
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
612
620
  }>>;
@@ -643,10 +651,15 @@ declare const _default: import("vue").DefineComponent<{
643
651
  allowedInvalidValue: {
644
652
  type: StringConstructor;
645
653
  };
654
+ to: {
655
+ type: import("vue").PropType<string | false | HTMLElement>;
656
+ default: string;
657
+ };
646
658
  }>> & {
647
659
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
648
660
  }, {
649
661
  updateUnchangedValue: boolean;
662
+ to: string | false | HTMLElement;
650
663
  }>>;
651
664
  NSelect: any;
652
665
  WidgetValEnums: {
@@ -859,7 +872,7 @@ declare const _default: import("vue").DefineComponent<{
859
872
  default: null;
860
873
  };
861
874
  modelValue: {
862
- type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
875
+ type: import("vue").PropType<import("../../../../../shared/types").AnyObject[]>;
863
876
  default: null;
864
877
  };
865
878
  }, {
@@ -870,7 +883,7 @@ declare const _default: import("vue").DefineComponent<{
870
883
  default: null;
871
884
  };
872
885
  modelValue: {
873
- type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
886
+ type: import("vue").PropType<import("../../../../../shared/types").AnyObject[]>;
874
887
  default: null;
875
888
  };
876
889
  }>> & {
@@ -878,6 +891,7 @@ declare const _default: import("vue").DefineComponent<{
878
891
  }>>;
879
892
  getDynamicSelectData: (params: any, filterApiConfig: any) => Promise<any>;
880
893
  emit: (event: "update:modelValue", ...args: any[]) => void;
894
+ selectDynamicRef: any;
881
895
  isLoading: import("vue").Ref<boolean>;
882
896
  filterApiConfig: import("../../../../../shared/types").AnyObject;
883
897
  classifyFilterList: import("vue").Ref<import("../../../../../shared/types").AnyObject[]>;
@@ -893,7 +907,8 @@ declare const _default: import("vue").DefineComponent<{
893
907
  isMultiple: import("vue").ComputedRef<boolean>;
894
908
  dynamicOptionInfos: import("vue").ComputedRef<any>;
895
909
  isLastPage: import("vue").ComputedRef<boolean>;
896
- valueCp: import("vue").ComputedRef<string | number | any[]>;
910
+ originList: import("vue").ComputedRef<any[]>;
911
+ valueCp: import("vue").ComputedRef<string | any[]>;
897
912
  isInitRequest: import("vue").ComputedRef<boolean>;
898
913
  setOptionActive: (selectIds: string[]) => void;
899
914
  handleUpdateSelect: (value: string[] | null) => void;
@@ -909,8 +924,13 @@ declare const _default: import("vue").DefineComponent<{
909
924
  [key: string]: any;
910
925
  }>;
911
926
  init: () => void;
927
+ saveDynamicBaseList: (selectValue: any[] | null) => void;
912
928
  NSelect: any;
913
929
  SelectDynamicOption: import("vue").DefineComponent<{
930
+ oldValue: {
931
+ type: import("vue").PropType<import("../../../../../shared/types").AnyObject[]>;
932
+ default: () => never[];
933
+ };
914
934
  dynamicOptionInfo: {
915
935
  type: import("vue").PropType<import("../../../../../shared/types").AnyObject>;
916
936
  default: () => {};
@@ -946,6 +966,10 @@ declare const _default: import("vue").DefineComponent<{
946
966
  }, {
947
967
  selectMinWidth: number;
948
968
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
969
+ oldValue: {
970
+ type: import("vue").PropType<import("../../../../../shared/types").AnyObject[]>;
971
+ default: () => never[];
972
+ };
949
973
  dynamicOptionInfo: {
950
974
  type: import("vue").PropType<import("../../../../../shared/types").AnyObject>;
951
975
  default: () => {};
@@ -1034,6 +1058,10 @@ declare const _default: import("vue").DefineComponent<{
1034
1058
  ArrowBack: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
1035
1059
  ArrowForward: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
1036
1060
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("updateSelect" | "updatePage")[], "updateSelect" | "updatePage", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1061
+ oldValue: {
1062
+ type: import("vue").PropType<import("../../../../../shared/types").AnyObject[]>;
1063
+ default: () => never[];
1064
+ };
1037
1065
  dynamicOptionInfo: {
1038
1066
  type: import("vue").PropType<import("../../../../../shared/types").AnyObject>;
1039
1067
  default: () => {};
@@ -1072,6 +1100,7 @@ declare const _default: import("vue").DefineComponent<{
1072
1100
  }, {
1073
1101
  isMultiple: boolean;
1074
1102
  loading: boolean;
1103
+ oldValue: import("../../../../../shared/types").AnyObject[];
1075
1104
  dynamicOptionInfo: import("../../../../../shared/types").AnyObject;
1076
1105
  fieldTitleList: import("../../../../../shared/types").AnyObject[];
1077
1106
  optionList: import("../../../../../shared/types").AnyObject[];
@@ -1085,13 +1114,13 @@ declare const _default: import("vue").DefineComponent<{
1085
1114
  default: null;
1086
1115
  };
1087
1116
  modelValue: {
1088
- type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
1117
+ type: import("vue").PropType<import("../../../../../shared/types").AnyObject[]>;
1089
1118
  default: null;
1090
1119
  };
1091
1120
  }>> & {
1092
1121
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
1093
1122
  }, {
1094
- modelValue: string | number | unknown[];
1123
+ modelValue: import("../../../../../shared/types").AnyObject[];
1095
1124
  paramCfg: Record<string, any>;
1096
1125
  }>;
1097
1126
  InputNumberGroup: import("vue").DefineComponent<{
@@ -1220,6 +1249,10 @@ declare const _default: import("vue").DefineComponent<{
1220
1249
  allowedInvalidValue: {
1221
1250
  type: StringConstructor;
1222
1251
  };
1252
+ to: {
1253
+ type: import("vue").PropType<string | false | HTMLElement>;
1254
+ default: string;
1255
+ };
1223
1256
  }, {
1224
1257
  attrs: {
1225
1258
  [x: string]: unknown;
@@ -1240,6 +1273,10 @@ declare const _default: import("vue").DefineComponent<{
1240
1273
  allowedInvalidValue: {
1241
1274
  type: StringConstructor;
1242
1275
  };
1276
+ to: {
1277
+ type: import("vue").PropType<string | false | HTMLElement>;
1278
+ default: string;
1279
+ };
1243
1280
  }>> & {
1244
1281
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1245
1282
  }>>;
@@ -1276,10 +1313,15 @@ declare const _default: import("vue").DefineComponent<{
1276
1313
  allowedInvalidValue: {
1277
1314
  type: StringConstructor;
1278
1315
  };
1316
+ to: {
1317
+ type: import("vue").PropType<string | false | HTMLElement>;
1318
+ default: string;
1319
+ };
1279
1320
  }>> & {
1280
1321
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1281
1322
  }, {
1282
1323
  updateUnchangedValue: boolean;
1324
+ to: string | false | HTMLElement;
1283
1325
  }>>;
1284
1326
  WidgetValEnums: {
1285
1327
  CUSTOM: string;
@@ -1669,6 +1711,10 @@ declare const _default: import("vue").DefineComponent<{
1669
1711
  allowedInvalidValue: {
1670
1712
  type: StringConstructor;
1671
1713
  };
1714
+ to: {
1715
+ type: import("vue").PropType<string | false | HTMLElement>;
1716
+ default: string;
1717
+ };
1672
1718
  }, {
1673
1719
  attrs: {
1674
1720
  [x: string]: unknown;
@@ -1689,6 +1735,10 @@ declare const _default: import("vue").DefineComponent<{
1689
1735
  allowedInvalidValue: {
1690
1736
  type: StringConstructor;
1691
1737
  };
1738
+ to: {
1739
+ type: import("vue").PropType<string | false | HTMLElement>;
1740
+ default: string;
1741
+ };
1692
1742
  }>> & {
1693
1743
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1694
1744
  }>>;
@@ -1725,10 +1775,15 @@ declare const _default: import("vue").DefineComponent<{
1725
1775
  allowedInvalidValue: {
1726
1776
  type: StringConstructor;
1727
1777
  };
1778
+ to: {
1779
+ type: import("vue").PropType<string | false | HTMLElement>;
1780
+ default: string;
1781
+ };
1728
1782
  }>> & {
1729
1783
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1730
1784
  }, {
1731
1785
  updateUnchangedValue: boolean;
1786
+ to: string | false | HTMLElement;
1732
1787
  }>>;
1733
1788
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1734
1789
  componentCfg: {
@@ -831,6 +831,10 @@ declare const _default: import("vue").DefineComponent<{
831
831
  allowedInvalidValue: {
832
832
  type: StringConstructor;
833
833
  };
834
+ to: {
835
+ type: PropType<string | false | HTMLElement>;
836
+ default: string;
837
+ };
834
838
  }, {
835
839
  attrs: {
836
840
  [x: string]: unknown;
@@ -851,6 +855,10 @@ declare const _default: import("vue").DefineComponent<{
851
855
  allowedInvalidValue: {
852
856
  type: StringConstructor;
853
857
  };
858
+ to: {
859
+ type: PropType<string | false | HTMLElement>;
860
+ default: string;
861
+ };
854
862
  }>> & {
855
863
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
856
864
  }>>;
@@ -887,10 +895,15 @@ declare const _default: import("vue").DefineComponent<{
887
895
  allowedInvalidValue: {
888
896
  type: StringConstructor;
889
897
  };
898
+ to: {
899
+ type: PropType<string | false | HTMLElement>;
900
+ default: string;
901
+ };
890
902
  }>> & {
891
903
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
892
904
  }, {
893
905
  updateUnchangedValue: boolean;
906
+ to: string | false | HTMLElement;
894
907
  }>>;
895
908
  NSelect: any;
896
909
  WidgetValEnums: {
@@ -1103,7 +1116,7 @@ declare const _default: import("vue").DefineComponent<{
1103
1116
  default: null;
1104
1117
  };
1105
1118
  modelValue: {
1106
- type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
1119
+ type: PropType<AnyObject[]>;
1107
1120
  default: null;
1108
1121
  };
1109
1122
  }, {
@@ -1114,7 +1127,7 @@ declare const _default: import("vue").DefineComponent<{
1114
1127
  default: null;
1115
1128
  };
1116
1129
  modelValue: {
1117
- type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
1130
+ type: PropType<AnyObject[]>;
1118
1131
  default: null;
1119
1132
  };
1120
1133
  }>> & {
@@ -1122,6 +1135,7 @@ declare const _default: import("vue").DefineComponent<{
1122
1135
  }>>;
1123
1136
  getDynamicSelectData: (params: any, filterApiConfig: any) => Promise<any>;
1124
1137
  emit: (event: "update:modelValue", ...args: any[]) => void;
1138
+ selectDynamicRef: any;
1125
1139
  isLoading: import("vue").Ref<boolean>;
1126
1140
  filterApiConfig: AnyObject;
1127
1141
  classifyFilterList: import("vue").Ref<AnyObject[]>;
@@ -1137,7 +1151,8 @@ declare const _default: import("vue").DefineComponent<{
1137
1151
  isMultiple: import("vue").ComputedRef<boolean>;
1138
1152
  dynamicOptionInfos: import("vue").ComputedRef<any>;
1139
1153
  isLastPage: import("vue").ComputedRef<boolean>;
1140
- valueCp: import("vue").ComputedRef<string | number | any[]>;
1154
+ originList: import("vue").ComputedRef<any[]>;
1155
+ valueCp: import("vue").ComputedRef<string | any[]>;
1141
1156
  isInitRequest: import("vue").ComputedRef<boolean>;
1142
1157
  setOptionActive: (selectIds: string[]) => void;
1143
1158
  handleUpdateSelect: (value: string[] | null) => void;
@@ -1153,8 +1168,13 @@ declare const _default: import("vue").DefineComponent<{
1153
1168
  [key: string]: any;
1154
1169
  }>;
1155
1170
  init: () => void;
1171
+ saveDynamicBaseList: (selectValue: any[] | null) => void;
1156
1172
  NSelect: any;
1157
1173
  SelectDynamicOption: import("vue").DefineComponent<{
1174
+ oldValue: {
1175
+ type: PropType<AnyObject[]>;
1176
+ default: () => never[];
1177
+ };
1158
1178
  dynamicOptionInfo: {
1159
1179
  type: PropType<AnyObject>;
1160
1180
  default: () => {};
@@ -1190,6 +1210,10 @@ declare const _default: import("vue").DefineComponent<{
1190
1210
  }, {
1191
1211
  selectMinWidth: number;
1192
1212
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
1213
+ oldValue: {
1214
+ type: PropType<AnyObject[]>;
1215
+ default: () => never[];
1216
+ };
1193
1217
  dynamicOptionInfo: {
1194
1218
  type: PropType<AnyObject>;
1195
1219
  default: () => {};
@@ -1278,6 +1302,10 @@ declare const _default: import("vue").DefineComponent<{
1278
1302
  ArrowBack: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
1279
1303
  ArrowForward: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
1280
1304
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("updateSelect" | "updatePage")[], "updateSelect" | "updatePage", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1305
+ oldValue: {
1306
+ type: PropType<AnyObject[]>;
1307
+ default: () => never[];
1308
+ };
1281
1309
  dynamicOptionInfo: {
1282
1310
  type: PropType<AnyObject>;
1283
1311
  default: () => {};
@@ -1316,6 +1344,7 @@ declare const _default: import("vue").DefineComponent<{
1316
1344
  }, {
1317
1345
  isMultiple: boolean;
1318
1346
  loading: boolean;
1347
+ oldValue: AnyObject[];
1319
1348
  dynamicOptionInfo: AnyObject;
1320
1349
  fieldTitleList: AnyObject[];
1321
1350
  optionList: AnyObject[];
@@ -1329,13 +1358,13 @@ declare const _default: import("vue").DefineComponent<{
1329
1358
  default: null;
1330
1359
  };
1331
1360
  modelValue: {
1332
- type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
1361
+ type: PropType<AnyObject[]>;
1333
1362
  default: null;
1334
1363
  };
1335
1364
  }>> & {
1336
1365
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
1337
1366
  }, {
1338
- modelValue: string | number | unknown[];
1367
+ modelValue: AnyObject[];
1339
1368
  paramCfg: Record<string, any>;
1340
1369
  }>;
1341
1370
  InputNumberGroup: import("vue").DefineComponent<{
@@ -1464,6 +1493,10 @@ declare const _default: import("vue").DefineComponent<{
1464
1493
  allowedInvalidValue: {
1465
1494
  type: StringConstructor;
1466
1495
  };
1496
+ to: {
1497
+ type: PropType<string | false | HTMLElement>;
1498
+ default: string;
1499
+ };
1467
1500
  }, {
1468
1501
  attrs: {
1469
1502
  [x: string]: unknown;
@@ -1484,6 +1517,10 @@ declare const _default: import("vue").DefineComponent<{
1484
1517
  allowedInvalidValue: {
1485
1518
  type: StringConstructor;
1486
1519
  };
1520
+ to: {
1521
+ type: PropType<string | false | HTMLElement>;
1522
+ default: string;
1523
+ };
1487
1524
  }>> & {
1488
1525
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1489
1526
  }>>;
@@ -1520,10 +1557,15 @@ declare const _default: import("vue").DefineComponent<{
1520
1557
  allowedInvalidValue: {
1521
1558
  type: StringConstructor;
1522
1559
  };
1560
+ to: {
1561
+ type: PropType<string | false | HTMLElement>;
1562
+ default: string;
1563
+ };
1523
1564
  }>> & {
1524
1565
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1525
1566
  }, {
1526
1567
  updateUnchangedValue: boolean;
1568
+ to: string | false | HTMLElement;
1527
1569
  }>>;
1528
1570
  WidgetValEnums: {
1529
1571
  CUSTOM: string;
@@ -1913,6 +1955,10 @@ declare const _default: import("vue").DefineComponent<{
1913
1955
  allowedInvalidValue: {
1914
1956
  type: StringConstructor;
1915
1957
  };
1958
+ to: {
1959
+ type: PropType<string | false | HTMLElement>;
1960
+ default: string;
1961
+ };
1916
1962
  }, {
1917
1963
  attrs: {
1918
1964
  [x: string]: unknown;
@@ -1933,6 +1979,10 @@ declare const _default: import("vue").DefineComponent<{
1933
1979
  allowedInvalidValue: {
1934
1980
  type: StringConstructor;
1935
1981
  };
1982
+ to: {
1983
+ type: PropType<string | false | HTMLElement>;
1984
+ default: string;
1985
+ };
1936
1986
  }>> & {
1937
1987
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1938
1988
  }>>;
@@ -1969,10 +2019,15 @@ declare const _default: import("vue").DefineComponent<{
1969
2019
  allowedInvalidValue: {
1970
2020
  type: StringConstructor;
1971
2021
  };
2022
+ to: {
2023
+ type: PropType<string | false | HTMLElement>;
2024
+ default: string;
2025
+ };
1972
2026
  }>> & {
1973
2027
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
1974
2028
  }, {
1975
2029
  updateUnchangedValue: boolean;
2030
+ to: string | false | HTMLElement;
1976
2031
  }>>;
1977
2032
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1978
2033
  componentCfg: {
@@ -15,6 +15,10 @@ declare const DatePicker: SFCWithInstall<import("vue").DefineComponent<{
15
15
  allowedInvalidValue: {
16
16
  type: StringConstructor;
17
17
  };
18
+ to: {
19
+ type: import("vue").PropType<string | false | HTMLElement>;
20
+ default: string;
21
+ };
18
22
  }, {
19
23
  attrs: {
20
24
  [x: string]: unknown;
@@ -35,6 +39,10 @@ declare const DatePicker: SFCWithInstall<import("vue").DefineComponent<{
35
39
  allowedInvalidValue: {
36
40
  type: StringConstructor;
37
41
  };
42
+ to: {
43
+ type: import("vue").PropType<string | false | HTMLElement>;
44
+ default: string;
45
+ };
38
46
  }>> & {
39
47
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
40
48
  }>>;
@@ -71,9 +79,14 @@ declare const DatePicker: SFCWithInstall<import("vue").DefineComponent<{
71
79
  allowedInvalidValue: {
72
80
  type: StringConstructor;
73
81
  };
82
+ to: {
83
+ type: import("vue").PropType<string | false | HTMLElement>;
84
+ default: string;
85
+ };
74
86
  }>> & {
75
87
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
76
88
  }, {
77
89
  updateUnchangedValue: boolean;
90
+ to: string | false | HTMLElement;
78
91
  }>>;
79
92
  export default DatePicker;
@@ -17,6 +17,10 @@ declare const _default: import("vue").DefineComponent<{
17
17
  allowedInvalidValue: {
18
18
  type: StringConstructor;
19
19
  };
20
+ to: {
21
+ type: PropType<string | false | HTMLElement>;
22
+ default: string;
23
+ };
20
24
  }, {
21
25
  attrs: {
22
26
  [x: string]: unknown;
@@ -37,6 +41,10 @@ declare const _default: import("vue").DefineComponent<{
37
41
  allowedInvalidValue: {
38
42
  type: StringConstructor;
39
43
  };
44
+ to: {
45
+ type: PropType<string | false | HTMLElement>;
46
+ default: string;
47
+ };
40
48
  }>> & {
41
49
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
42
50
  }>>;
@@ -73,9 +81,14 @@ declare const _default: import("vue").DefineComponent<{
73
81
  allowedInvalidValue: {
74
82
  type: StringConstructor;
75
83
  };
84
+ to: {
85
+ type: PropType<string | false | HTMLElement>;
86
+ default: string;
87
+ };
76
88
  }>> & {
77
89
  "onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
78
90
  }, {
79
91
  updateUnchangedValue: boolean;
92
+ to: string | false | HTMLElement;
80
93
  }>;
81
94
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as t,ref as a,computed as l,watch as n,openBlock as o,createBlock as u,unref as r,isRef as i,createSlots as s,renderList as d,withCtx as c,renderSlot as f,nextTick as m}from"vue";import{NDatePicker as p}from"naive-ui";import"../../../shared/utils/index.js";import{useDateTime as v,handleInputEvent as y}from"../../../shared/hooks/useDateTime.js";import{isArray as h,isEqual as g,isString as w}from"lodash-es";import"@vue/shared";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{format as V,sub as k,startOfDay as R,endOfDay as D}from"date-fns";var I=e({__name:"DatePicker",props:{updateUnchangedValue:{type:Boolean},onConfirm:{type:Function},formattedValue:{type:[String,Array]},placeholder:{type:String},allowedInvalidValue:{type:String}},emits:["update:formatted-value"],setup(e,{expose:I,emit:S}){const C=e,M=t(),_=a(null),$=a(null),P=a();let U="";const b=l({get:()=>z(C.formattedValue)?null:C.formattedValue,set(e){h(e)&&h(U)&&g(U,e)||U===e||(S("update:formatted-value",e,w(e)?Date.parse(e):h(e)?[Date.parse(e[0]),Date.parse(e[1])]:null),U=e)}}),j=l((()=>{const e=Reflect.get(M,"type")||"";return["datetime","datetimerange"].includes(e)})),x=l((()=>{if(Reflect.get(M,"format"))return M.format;const e=M.type||"";return j.value?"yyyy-MM-dd HH:mm:ss":"month"===e?"yyyy-MM":"year"===e?"yyyy":"yyyy-MM-dd"})),H=l((()=>j.value?x.value.split(" "):"")),{focus:q,blur:A,handleConfirm:B}=v(_,{formatRef:x,attrs:M,emit:S,allowedInvalidValue:C.allowedInvalidValue});async function F(e){e&&j.value&&(await m(),async function e(t=0){var a;t>2||($.value=null==(a=_.value)?void 0:a.panelInstRef,$.value?v($,{formatRef:H,attrs:M,isPanel:!0}):(await m(),e(++t)))}())}async function T(...e){var t,a,l,n,o,u;const r=Reflect.get(M,"type")||"",i=null==(n=null==(l=null==(a=null==(t=_.value)?void 0:t.inputInstRef)?void 0:a.$el)?void 0:l.querySelector)?void 0:n.call(l,"input");if(r.includes("range")?null==(o=C.onConfirm)||o.call(C,...e):(await m(),i.focus(),B(i),i.blur(),null==(u=C.onConfirm)||u.call(C,Date.parse(i.value),i.value)),!(null==i?void 0:i.value)||!C.updateUnchangedValue||r.includes("range"))return;const s=i.value;y(i,V(new Date,x.value)),y(i,s)}function z(e){return C.allowedInvalidValue&&C.allowedInvalidValue===e}return n((()=>C.formattedValue),(e=>{P.value=z(e)?e:C.placeholder?C.placeholder:"选择日期时间",z(e)||(U=e)}),{immediate:!0}),I({$datePicker:_,focus:q,blur:A,setShortcutValue:async function(e){const t=Reflect.get(M,"type")||"";if(!t||!t.includes("range")||!_.value)return;const a=_.value.$el.querySelectorAll(".n-input__input-el");let l,n;const o=new Date;if("week"===e){const e=k(o,{weeks:1});l=V(R(e),x.value)}else{const e=k(o,{months:1});l=V(R(e),x.value)}n=V(D(o),x.value),y(a[0],l),await m(),y(a[1],n)}}),(e,t)=>(o(),u(r(p),{ref_key:"datePickerRef",ref:_,"onUpdate:show":F,onConfirm:T,placeholder:P.value,"formatted-value":r(b),"onUpdate:formatted-value":t[0]||(t[0]=e=>i(b)?b.value=e:null)},s({_:2},[d(e.$slots,((t,a)=>({name:a,fn:c((()=>[f(e.$slots,a)]))})))]),1032,["placeholder","formatted-value"]))}});export{I as default};
1
+ import{defineComponent as e,useAttrs as t,ref as a,computed as l,watch as n,openBlock as o,createBlock as u,unref as r,isRef as i,createSlots as s,renderList as d,withCtx as c,renderSlot as f,nextTick as m}from"vue";import{NDatePicker as p}from"naive-ui";import"../../../shared/utils/index.js";import{useDateTime as v,handleInputEvent as y}from"../../../shared/hooks/useDateTime.js";import{isArray as h,isEqual as g,isString as w}from"lodash-es";import"@vue/shared";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{format as V,sub as k,startOfDay as R,endOfDay as D}from"date-fns";var S=e({__name:"DatePicker",props:{updateUnchangedValue:{type:Boolean},onConfirm:{type:Function},formattedValue:{type:[String,Array]},placeholder:{type:String},allowedInvalidValue:{type:String},to:{type:[Object,String,Boolean],default:"body"}},emits:["update:formatted-value"],setup(e,{expose:S,emit:I}){const C=e,M=t(),_=a(null),b=a(null),$=a();let j="";const P=l({get:()=>T(C.formattedValue)?null:C.formattedValue,set(e){h(e)&&h(j)&&g(j,e)||j===e||(I("update:formatted-value",e,w(e)?Date.parse(e):h(e)?[Date.parse(e[0]),Date.parse(e[1])]:null),j=e)}}),U=l((()=>{const e=Reflect.get(M,"type")||"";return["datetime","datetimerange"].includes(e)})),x=l((()=>{if(Reflect.get(M,"format"))return M.format;const e=M.type||"";return U.value?"yyyy-MM-dd HH:mm:ss":"month"===e?"yyyy-MM":"year"===e?"yyyy":"yyyy-MM-dd"})),H=l((()=>U.value?x.value.split(" "):"")),{focus:q,blur:A,handleConfirm:B}=v(_,{formatRef:x,attrs:M,emit:I,allowedInvalidValue:C.allowedInvalidValue});async function F(e){e&&U.value&&(await m(),async function e(t=0){var a;t>2||(b.value=null==(a=_.value)?void 0:a.panelInstRef,b.value?v(b,{formatRef:H,attrs:M,isPanel:!0}):(await m(),e(++t)))}())}async function O(...e){var t,a,l,n,o,u;const r=Reflect.get(M,"type")||"",i=null==(n=null==(l=null==(a=null==(t=_.value)?void 0:t.inputInstRef)?void 0:a.$el)?void 0:l.querySelector)?void 0:n.call(l,"input");if(r.includes("range")?null==(o=C.onConfirm)||o.call(C,...e):(await m(),i.focus(),B(i),i.blur(),null==(u=C.onConfirm)||u.call(C,Date.parse(i.value),i.value)),!(null==i?void 0:i.value)||!C.updateUnchangedValue||r.includes("range"))return;const s=i.value;y(i,V(new Date,x.value)),y(i,s)}function T(e){return C.allowedInvalidValue&&C.allowedInvalidValue===e}return n((()=>C.formattedValue),(e=>{$.value=T(e)?e:C.placeholder?C.placeholder:"选择日期时间",T(e)||(j=e)}),{immediate:!0}),S({$datePicker:_,focus:q,blur:A,setShortcutValue:async function(e){const t=Reflect.get(M,"type")||"";if(!t||!t.includes("range")||!_.value)return;const a=_.value.$el.querySelectorAll(".n-input__input-el");let l,n;const o=new Date;if("week"===e){const e=k(o,{weeks:1});l=V(R(e),x.value)}else{const e=k(o,{months:1});l=V(R(e),x.value)}n=V(D(o),x.value),y(a[0],l),await m(),y(a[1],n)}}),(t,a)=>(o(),u(r(p),{ref_key:"datePickerRef",ref:_,"onUpdate:show":F,onConfirm:O,placeholder:$.value,to:e.to,"formatted-value":r(P),"onUpdate:formatted-value":a[0]||(a[0]=e=>i(P)?P.value=e:null)},s({_:2},[d(t.$slots,((e,a)=>({name:a,fn:c((()=>[f(t.$slots,a)]))})))]),1032,["placeholder","to","formatted-value"]))}});export{S as default};
@@ -46,7 +46,9 @@ export declare const OVERLAP: {
46
46
  };
47
47
  humai: {
48
48
  radius: number;
49
- fill: string;
49
+ radiusCircle: number;
50
+ stroke: string;
51
+ fillCircle: string;
50
52
  };
51
53
  ermai: {
52
54
  stroke: string;
@@ -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,fill: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
+ 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 +1 @@
1
- import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as e,drawArrow as o,drawText as n,defaultTextStyle as i,drawPoint as r,drawTextAndIconGroup as s,defaultStyle as l,defaultRectStyle as a}from"../useDraw.js";import{useGrid as u}from"../useGrid.js";import{useBirthProcessCumputedPoint as c}from"../useCumputedPoint.js";import"../useEvent.js";import{getScaleInfo as d,drawScaleNumber as f,drawScaleLine as p}from"../useScaleColumn.js";import{useCommon as h}from"../useCommon.js";import"vue";import{getIndex as g,isEffectiveNode as m,getTime as v,getScaleNumberList as y}from"../../utils/index.js";import{cloneDeep as k,last as w}from"lodash-es";import"../temperature/useShadow.js";import"@vueuse/shared";import{format as x}from"date-fns";import"naive-ui";import"@vueuse/core";function b(b,j,P,C,E){const{computedX:S,computedY:G,getXValue:T,getYValue:L}=c(j),{getEqualXTypes:Y,handleAddPrevent:M,isGridLimit:A,setPrevAndNextPoint:X,getPointEventProps:I}=h(b,P,j),{xAxis:H,grid:W,originX:N,originY:O,xCellWidth:V,endY:D,startTime:R,leftAddAreaWidth:$,leftScales:B,rightScales:F,yCellHeight:q,endX:z,scaleValues:J,canvasWidth:K,borderStyle:Q,rightAddAreaWidth:U,event:Z,originYCervix:_,other:tt,canvasHeight:et}=j,ot=k(J),nt=new Set;function it(){ot.filter((t=>t.show)).forEach(((t,s)=>{var l;const a=[],u=[],c=[];null==(l=t.data)||l.forEach(((l,d)=>{!function(l,d,f){let p,h;const{pointAttr:g={},lineAttr:m={},title:v="",key:y,type:k="circle",childbirthStyle:w={}}=t,x=t.data[f+1],j=ut(x,t);if(l&&j&&!d.breakpoint)h=e([...l,...j],{...m});else if(l&&!j&&!d.breakpoint){const o=ut(x,t);h=o?e([...l,...o],{...m}):null}let E,S;if(d.childbirth){const t=l[1]+q;E=o([l[0],l[1],t],w),c.push(E),S=n([l[0]+V/2,t-q/2],{value:String(d.childbirth),...i,originX:"left",originY:"center",...w}),c.push(S)}const G=u[f-1],Y={origin:{data:d,title:v,key:y||"",dataIndex:s,index:f},leftLine:G,rightLine:h,arrowGroup:E,arrowGroupText:S,...g,...I()};l&&(G||(Y.leftLine=null),p=r(k,{left:l[0],top:l[1],...Y}));u.push(h),p&&(!function(t){Z.hovered&&(t.on("mouseover",(()=>{at(t,"hover")})),t.on("mouseout",(()=>{C.show=!1})));if(t.lockMovementX&&t.lockMovementY)return;t.on("moving",(()=>{lt(t),function(t){var e,o,n,i;null==(e=t.leftLine)||e.setCoords().set({x2:t.left,y2:t.top}),null==(o=t.rightLine)||o.setCoords().set({x1:t.left,y1:t.top}),null==(n=t.arrowGroup)||n.setCoords().set({left:t.left,top:t.top}),null==(i=t.arrowGroupText)||i.setCoords().set({left:t.left+V/2,top:t.top+q/2})}(t),Z.hovered&&at(t)})),t.on("mouseup",(e=>{if(C.show=!1,1===e.button){const{key:e}=t.origin,o={...t.origin,data:{...t.origin.data,time:T(t.left),value:L(e,t.top)}};b.value.discardActiveObject(),P("change",o),rt(o,"change")}}))}(p),a.push(p),nt.add(p))}(ut(l,t),l,d)})),Promise.all(a).then((t=>{const e=u.filter((t=>t));X(t),Promise.all(c).then((o=>{b.value.add(...e,...t,...o),t.forEach((t=>{null==t||t.bringToFront()}))}))}))}))}function rt(t,e="add"){const{dataIndex:o,data:n,index:i,key:r}=t,s=ot.find((t=>t.key===r));switch(e){case"remove":s.data.splice(i,1);break;case"change":s.data[i]=n;break;default:{const t=g(n.time,s.data);s.data.splice(t,0,n);break}}st()}function st(){var t;nt.size&&(null==(t=b.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),(null==t?void 0:t.arrowGroup)&&e.push(null==t?void 0:t.arrowGroup),(null==t?void 0:t.arrowGroupText)&&e.push(null==t?void 0:t.arrowGroupText)})),e}([...nt]))),nt.clear(),it()}function lt(t){const e=t.prevPoint?t.prevPoint.left:N,o=t.nextPoint?t.nextPoint.left:z;t.setCoords(),["cervix","fetalPresentation"].includes(t.origin.key)&&t.top<_&&t.set("top",_),t.top<O&&t.set("top",O),t.top>D&&t.set("top",D),t.left<e&&t.set("left",e),t.left>o&&t.set("left",o)}function at(t,e="moving"){const{title:o,key:n,data:i}=t.origin;C.point={x:t.left,y:t.top},C.list=[`${o} ${"hover"===e?i.value:L(n,t.top)}`,`时间 ${T(t.left).slice(-5)}`],C.show=!0}function ut(t,e){if(m(t)&&function(t){const e=R+864e5,o=v(t);return o>=R&&o<=e}(t.time)){const o=S(t.time),n=G(e.key,e.range,t.value);return[o,n<O?O:n>D?D:n]}}function ct(t,e){return t+1>e[1]?e[0]:t+1}return u(b,j),function(){const e=new t.Rect({...Q,width:K-$-U-1,height:D-1,left:$,top:0,fill:"transparent"});b.value.add(e)}(),function(){function e(e,o="left"){let r="left"===o?$:z;e.forEach(((e,o)=>{const{range:s,spaceValue:u,width:c,title:h,titleStyle:g,key:m,position:v="center",spaceGridNumber:k=1,showNumber:w,showMaxMinNumber:x}=e,j=[],P=[],C=r+c/2,E=y(s,u),S=E.length,{lineXMain:G,lineXSub:T,textLeft:L}=d(v,r,c);E.forEach(((t,o)=>{const n=D-o*q*k,i=0===o?D-8:o!==E.length-1||O||_&&"FHR"!==m?n:O+8;!w||(0===o||o===S-1)&&!x||j.push(f(String(t),e,L,i)),P.push(...p(e,o,G,T,n,q,O,S))}));const Y=new t.Rect({...a,strokeWidth:.5,width:c,height:D,left:C,top:D/2}),M=n([C,O>0?O-q/2:q/2],{value:String(h),...i,...g}),A=new t.Group([...P,...j,Y,...M?[M]:[]],{objectCaching:!1,...l});b.value.add(A),A.sendToBack(),r+=c}))}e(B),e(F,"right")}(),function(){const{show:e,startTime:o,range:r=[0,23],position:s="top",style:a}=H.time,{show:u,range:c=[0,23],position:d,style:f}=H.processTime;if(e||u){const p=[],h=[],g=[],m=[],v=N+V/2,y=q/2;for(let t=0;t<W.mainXCell;t++){if(e){const e=0===t?+o.slice(11,13):ct(w(p),r);p.push(e);const l="top"===s?O-y:D+y;g.push(n([v+t*V,l],{value:String(e),...i,...a||{}}))}if(u){const e=0===t?c[0]:w(h)+1;h.push(e);const o="top"===d?y:et-y;m.push(n([v+t*V,o],{value:String(e),...i,...f||{}}))}}const k=new t.Group([...g,...m],{objectCaching:!1,...l});b.value.add(k),b.value.sendToBack(k)}}(),function(){var t;const o=Object.values(tt),n=[],i={},r=ot.find((t=>"cervix"===t.key&&t.show)),s=null==(t=null==r?void 0:r.data)?void 0:t.find((t=>3==+t.value));function l(t,e){const{key:o,range:n}=r||{},i=G(o,n,10),s=[0,e],l=[-e/t,0],a=[(D-i-e)/t,D-i],u=[z-N,t*(z-N)+e];let c=[],d=[];function f([o,n]){return Math.abs(n-t*o-e)<=1}function p([t,e]){const[o,n]=[...h([t,e])];return o>=N&&o<=z&&n>=i&&n<=D}function h([t,e]){return[N+t,D-e]}return f(s)&&p(s)&&(c=h(s)),f(l)&&p(l)&&(c=h(l)),f(a)&&p(a)&&(d=h(a)),f(u)&&p(u)&&(d=h(u)),[...c,...d]}o.forEach((t=>{if(!t.show)return;const{key:o}=t;switch(o){case"fetalPresentation":{const{range:i,show:r}=ot.find((t=>t.key===o));if(r){const r=G(o,i,0);n.push(e([N,r,z,r],{...t}))}break}case"alert":if(s){const{key:o,range:a}=r||{},u=216e5,c={time:x(new Date(v(s.time)+u),"yyyy-MM-dd HH:mm"),value:10},[d,f]=[S(s.time)-N,D-G(o,a,s.value)],[p,h]=[S(c.time)-N,D-G(o,a,c.value)],g=(h-f)/(p-d),m=f-d*g,y=l(g,m);y.length>0&&(n.push(e(y,{...t})),Object.assign(i,{k:g,b:m}))}break;case"handling":if(s){const{k:o,b:r}=i,a=144e5,u=l(o,r-(S(x(new Date(v(s.time)+a),"yyyy-MM-dd HH:mm"))-S(s.time))*o);u.length>0&&n.push(e(u,{...t}))}}})),b.value.add(...n)}(),it(),function(){function t(t,e){const o=ot.findIndex((e=>e.key===t.key));return{renderItem:()=>t.title,origin:{title:t.title,unit:t.unit,dataIndex:o,key:t.key},pointer:e}}j.event.evented&&b.value.on("mouse:up",(e=>{if(3===e.button){const{x:o=0,y:n=0}=e.pointer||{};o>=N&&o<=z&&n>=O&&n<=D&&(E.point={x:o,y:n},E.show=!0,e.target?(E.target=e.target,E.list=["删除节点"],[...nt].forEach((t=>{t.origin&&t.left===e.target.left&&t.top===e.target.top&&E.list.push({renderItem:()=>t.origin.title,origin:{...t.origin},mode:"remove",pointer:e.pointer})}))):(E.target=null,E.list=["新增节点"],ot.filter((t=>t.show)).forEach((i=>{if(!Y([...nt],o,"key").includes(i.key)){if(["cervix","fetalPresentation"].includes(i.key)&&n<_)return;E.list.push(t(i,e.pointer))}})),1===E.list.length&&(E.show=!1,M("repeat"),console.log("当前时间段内无可新增节点"))))}}))}(),function(){const t=K-U/2;function e(t,e){if(!t.length)return;let n=O;const i=[];t.forEach((t=>{const o=t.title.split("").join("\n"),r=J.findIndex((e=>e.key===t.key)),{text:l,icon:a}=s(o,t,{text:{originY:"top",left:e,top:n},icon:{left:e,topY:n,originY:"top",origin:{type:t.type,dataIndex:r},...j.event}},"vertical");var u;n+=l.height+a.height+15,(u=a).on("moving",(()=>{u.set("originY","center"),A(u)?(lt(u),at(u)):C.show=!1})),u.on("mouseup:before",(t=>{if(C.show=!1,0===t.e.button&&A(u))if(Y([...nt],u.left,"key").includes(u.origin.key))M("repeat");else{const t={data:{time:T(u.left),value:L(u.origin.key,u.top)},...u.origin};P("add",t),rt(t)}!function(t){t.setCoords().set({originY:"top",left:t.originLeft,top:t.originTop})}(u)})),i.push(l,a)})),o(i),b.value.add(...i)}function o(t){const e=w(t),o=(D-O)/2,n=(e.height+e.top-O)/2;t.forEach((t=>{const e=t.top+o-n;t.set({top:e,originTop:e})}))}e(B,$/2),e(F,t)}(),{clickMenu:function({item:t,target:e}){const o={...t.origin};"remove"===t.mode?(P("remove",o),rt(o,"remove")):(Object.assign(o,{data:{time:T(t.pointer.x),value:L(t.origin.key,t.pointer.y)}}),P("add",o),rt(o))},redrawPoints:st}}export{b as useBirthProcess};
1
+ import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as e,drawArrow as o,drawText as n,defaultTextStyle as i,drawPoint as r,drawTextAndIconGroup as s,defaultStyle as l,defaultRectStyle as a}from"../useDraw.js";import{useGrid as u}from"../useGrid.js";import{useBirthProcessCumputedPoint as c}from"../useCumputedPoint.js";import"../useEvent.js";import{getScaleInfo as d,drawScaleNumber as f,drawScaleLine as p}from"../useScaleColumn.js";import{useCommon as h}from"../useCommon.js";import"vue";import{getIndex as g,isEffectiveNode as m,getTime as v,getScaleNumberList as y}from"../../utils/index.js";import{cloneDeep as k,last as w}from"lodash-es";import"../temperature/useShadow.js";import"@vueuse/shared";import{format as x}from"date-fns";import"naive-ui";import"@vueuse/core";function b(b,j,P,C,E){const{computedX:S,computedY:G,getXValue:T,getYValue:L}=c(j),{getEqualXTypes:Y,handleAddPrevent:M,isGridLimit:A,setPrevAndNextPoint:X,getPointEventProps:I}=h(b,P,j),{xAxis:H,grid:W,originX:N,originY:O,xCellWidth:V,endY:D,startTime:R,leftAddAreaWidth:$,leftScales:B,rightScales:F,yCellHeight:q,endX:z,scaleValues:J,canvasWidth:K,borderStyle:Q,rightAddAreaWidth:U,event:Z,originYCervix:_,other:tt,canvasHeight:et}=j,ot=k(J),nt=new Set;function it(){ot.filter((t=>t.show)).forEach(((t,s)=>{var l;const a=[],u=[],c=[];null==(l=t.data)||l.forEach(((l,d)=>{!function(l,d,f){let p,h;const{pointAttr:g={},lineAttr:m={},title:v="",key:y,type:k="circle",childbirthStyle:w={}}=t,x=t.data[f+1],j=ut(x,t);if(l&&j&&!d.breakpoint)h=e([...l,...j],{...m});else if(l&&!j&&!d.breakpoint){const o=ut(x,t);h=o?e([...l,...o],{...m}):null}let E,S;if(d.childbirth){const t=l[1]+q;E=o([l[0],l[1],t],w),c.push(E),S=n([l[0]+V/2,t-q/2],{value:String(d.childbirth),...i,originX:"left",originY:"center",...w}),c.push(S)}const G=u[f-1],Y={origin:{data:d,title:v,key:y||"",dataIndex:s,index:f},leftLine:G,rightLine:h,arrowGroup:E,arrowGroupText:S,...g,...I()};l&&(G||(Y.leftLine=null),p=r(k,{left:l[0],top:l[1],...Y}));u.push(h),p&&(!function(t){Z.hovered&&(t.on("mouseover",(()=>{at(t,"hover")})),t.on("mouseout",(()=>{C.show=!1})));if(t.lockMovementX&&t.lockMovementY)return;t.on("moving",(()=>{lt(t),function(t){var e,o,n,i;null==(e=t.leftLine)||e.setCoords().set({x2:t.left,y2:t.top}),null==(o=t.rightLine)||o.setCoords().set({x1:t.left,y1:t.top}),null==(n=t.arrowGroup)||n.setCoords().set({left:t.left,top:t.top}),null==(i=t.arrowGroupText)||i.setCoords().set({left:t.left+V/2,top:t.top+q/2})}(t),Z.hovered&&at(t)})),t.on("mouseup",(e=>{if(C.show=!1,1===e.button){const{key:e}=t.origin,o={...t.origin,data:{...t.origin.data,time:T(t.left),value:L(e,t.top)}};b.value.discardActiveObject(),P("change",o),rt(o,"change")}}))}(p),a.push(p),nt.add(p))}(ut(l,t),l,d)})),Promise.all(a).then((t=>{const e=u.filter((t=>t));X(t),Promise.all(c).then((o=>{b.value.add(...e,...t,...o),t.forEach((t=>{null==t||t.bringToFront()}))}))}))}))}function rt(t,e="add"){const{dataIndex:o,data:n,index:i,key:r}=t,s=ot.find((t=>t.key===r));switch(e){case"remove":s.data.splice(i,1);break;case"change":s.data[i]=n;break;default:{const t=g(n.time,s.data);s.data.splice(t,0,n);break}}st()}function st(){var t;nt.size&&(null==(t=b.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),(null==t?void 0:t.arrowGroup)&&e.push(null==t?void 0:t.arrowGroup),(null==t?void 0:t.arrowGroupText)&&e.push(null==t?void 0:t.arrowGroupText)})),e}([...nt]))),nt.clear(),it()}function lt(t){const e=t.prevPoint?t.prevPoint.left:N,o=t.nextPoint?t.nextPoint.left:z;t.setCoords(),["cervix","fetalPresentation"].includes(t.origin.key)&&t.top<_&&t.set("top",_),t.top<O&&t.set("top",O),t.top>D&&t.set("top",D),t.left<e&&t.set("left",e),t.left>o&&t.set("left",o)}function at(t,e="moving"){const{title:o,key:n,data:i}=t.origin;C.point={x:t.left,y:t.top},C.list=[`${o} ${"hover"===e?i.value:L(n,t.top)}`,`时间 ${T(t.left).slice(-5)}`],C.show=!0}function ut(t,e){if(m(t)&&function(t){const e=R+864e5,o=v(t);return o>=R&&o<=e}(t.time)){const o=S(t.time),n=G(e.key,e.range,t.value);return[o,n<O?O:n>D?D:n]}}function ct(t,e){return t+1>e[1]?e[0]:t+1}return u(b,j),function(){const e=new t.Rect({...Q,width:K-$-U-1,height:D-1,left:$,top:0,fill:"transparent"});b.value.add(e)}(),function(){function e(e,o="left"){let r="left"===o?$:z;e.forEach(((e,o)=>{const{range:s,spaceValue:u,width:c,title:h,titleStyle:g,key:m,position:v="center",spaceGridNumber:k=1,showNumber:w,showMaxMinNumber:x}=e,j=[],P=[],C=r+c/2,E=y(s,u),S=E.length,{lineXMain:G,lineXSub:T,textLeft:L}=d(v,r,c);E.forEach(((t,o)=>{const n=D-o*q*k,i=0===o?D-8:o!==E.length-1||O||_&&"FHR"!==m?n:O+8;!w||(0===o||o===S-1)&&!x||j.push(f(String(t),e,L,i)),P.push(...p(e,o,G,T,n,q,O,S,1))}));const Y=new t.Rect({...a,strokeWidth:.5,width:c,height:D,left:C,top:D/2}),M=n([C,O>0?O-q/2:q/2],{value:String(h),...i,...g}),A=new t.Group([...P,...j,Y,...M?[M]:[]],{objectCaching:!1,...l});b.value.add(A),A.sendToBack(),r+=c}))}e(B),e(F,"right")}(),function(){const{show:e,startTime:o,range:r=[0,23],position:s="top",style:a}=H.time,{show:u,range:c=[0,23],position:d,style:f}=H.processTime;if(e||u){const p=[],h=[],g=[],m=[],v=N+V/2,y=q/2;for(let t=0;t<W.mainXCell;t++){if(e){const e=0===t?+o.slice(11,13):ct(w(p),r);p.push(e);const l="top"===s?O-y:D+y;g.push(n([v+t*V,l],{value:String(e),...i,...a||{}}))}if(u){const e=0===t?c[0]:w(h)+1;h.push(e);const o="top"===d?y:et-y;m.push(n([v+t*V,o],{value:String(e),...i,...f||{}}))}}const k=new t.Group([...g,...m],{objectCaching:!1,...l});b.value.add(k),b.value.sendToBack(k)}}(),function(){var t;const o=Object.values(tt),n=[],i={},r=ot.find((t=>"cervix"===t.key&&t.show)),s=null==(t=null==r?void 0:r.data)?void 0:t.find((t=>3==+t.value));function l(t,e){const{key:o,range:n}=r||{},i=G(o,n,10),s=[0,e],l=[-e/t,0],a=[(D-i-e)/t,D-i],u=[z-N,t*(z-N)+e];let c=[],d=[];function f([o,n]){return Math.abs(n-t*o-e)<=1}function p([t,e]){const[o,n]=[...h([t,e])];return o>=N&&o<=z&&n>=i&&n<=D}function h([t,e]){return[N+t,D-e]}return f(s)&&p(s)&&(c=h(s)),f(l)&&p(l)&&(c=h(l)),f(a)&&p(a)&&(d=h(a)),f(u)&&p(u)&&(d=h(u)),[...c,...d]}o.forEach((t=>{if(!t.show)return;const{key:o}=t;switch(o){case"fetalPresentation":{const{range:i,show:r}=ot.find((t=>t.key===o));if(r){const r=G(o,i,0);n.push(e([N,r,z,r],{...t}))}break}case"alert":if(s){const{key:o,range:a}=r||{},u=216e5,c={time:x(new Date(v(s.time)+u),"yyyy-MM-dd HH:mm"),value:10},[d,f]=[S(s.time)-N,D-G(o,a,s.value)],[p,h]=[S(c.time)-N,D-G(o,a,c.value)],g=(h-f)/(p-d),m=f-d*g,y=l(g,m);y.length>0&&(n.push(e(y,{...t})),Object.assign(i,{k:g,b:m}))}break;case"handling":if(s){const{k:o,b:r}=i,a=144e5,u=l(o,r-(S(x(new Date(v(s.time)+a),"yyyy-MM-dd HH:mm"))-S(s.time))*o);u.length>0&&n.push(e(u,{...t}))}}})),b.value.add(...n)}(),it(),function(){function t(t,e){const o=ot.findIndex((e=>e.key===t.key));return{renderItem:()=>t.title,origin:{title:t.title,unit:t.unit,dataIndex:o,key:t.key},pointer:e}}j.event.evented&&b.value.on("mouse:up",(e=>{if(3===e.button){const{x:o=0,y:n=0}=e.pointer||{};o>=N&&o<=z&&n>=O&&n<=D&&(E.point={x:o,y:n},E.show=!0,e.target?(E.target=e.target,E.list=["删除节点"],[...nt].forEach((t=>{t.origin&&t.left===e.target.left&&t.top===e.target.top&&E.list.push({renderItem:()=>t.origin.title,origin:{...t.origin},mode:"remove",pointer:e.pointer})}))):(E.target=null,E.list=["新增节点"],ot.filter((t=>t.show)).forEach((i=>{if(!Y([...nt],o,"key").includes(i.key)){if(["cervix","fetalPresentation"].includes(i.key)&&n<_)return;E.list.push(t(i,e.pointer))}})),1===E.list.length&&(E.show=!1,M("repeat"),console.log("当前时间段内无可新增节点"))))}}))}(),function(){const t=K-U/2;function e(t,e){if(!t.length)return;let n=O;const i=[];t.forEach((t=>{const o=t.title.split("").join("\n"),r=J.findIndex((e=>e.key===t.key)),{text:l,icon:a}=s(o,t,{text:{originY:"top",left:e,top:n},icon:{left:e,topY:n,originY:"top",origin:{type:t.type,dataIndex:r},...j.event}},"vertical");var u;n+=l.height+a.height+15,(u=a).on("moving",(()=>{u.set("originY","center"),A(u)?(lt(u),at(u)):C.show=!1})),u.on("mouseup:before",(t=>{if(C.show=!1,0===t.e.button&&A(u))if(Y([...nt],u.left,"key").includes(u.origin.key))M("repeat");else{const t={data:{time:T(u.left),value:L(u.origin.key,u.top)},...u.origin};P("add",t),rt(t)}!function(t){t.setCoords().set({originY:"top",left:t.originLeft,top:t.originTop})}(u)})),i.push(l,a)})),o(i),b.value.add(...i)}function o(t){const e=w(t),o=(D-O)/2,n=(e.height+e.top-O)/2;t.forEach((t=>{const e=t.top+o-n;t.set({top:e,originTop:e})}))}e(B,$/2),e(F,t)}(),{clickMenu:function({item:t,target:e}){const o={...t.origin};"remove"===t.mode?(P("remove",o),rt(o,"remove")):(Object.assign(o,{data:{time:T(t.pointer.x),value:L(t.origin.key,t.pointer.y)}}),P("add",o),rt(o))},redrawPoints:st}}export{b as useBirthProcess};
@@ -3,8 +3,13 @@ import { fabric } from '../../../../../shared/utils/fabricjs';
3
3
  import { AnyObject } from '../../../../../shared/types';
4
4
  import { IPointTipProps, IPointMenuProps } from '../../../../../components/fabric-chart/src/interface';
5
5
  export declare function useBirthProcessChart(canvas: Ref<fabric.Canvas>, props: AnyObject, emits: Function, canvasRef: Ref<HTMLCanvasElement | null>, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps): {
6
+ select?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
7
+ redrawPoints?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
8
+ clickMenu?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
9
+ updatePolyline?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
10
+ useMeasureRuler?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
11
+ useCaliper?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
12
+ useCaliperRuler?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
13
+ useRectRuler?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
6
14
  propItems: any;
7
- redrawPoints: Ref<any>;
8
- select: Ref<any>;
9
- clickMenu: Ref<any>;
10
15
  };
@@ -1 +1 @@
1
- import{ref as e,computed as a,reactive as t,watch as l}from"vue";import{defaultBorderStyle as u}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import{getTime as r}from"../../utils/index.js";import"lodash-es";import{useCanvasEvent as i}from"../useEvent.js";import"../temperature/useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";import{useBirthProcess as s}from"./useBirthProcess.js";function d(d,n,o,v,c,h){const m=e(),f=e(),p=e(),g=a((()=>n.data.scaleValues.filter((e=>"left"===e.layout&&e.show)))),x=a((()=>n.data.scaleValues.filter((e=>"right"===e.layout&&e.show)))),w=a((()=>{var e;return(null==(e=x.value)?void 0:e.length)?30:0})),y=a((()=>{var e;return 30+(null==(e=g.value)?void 0:e.reduce(((e,a)=>e+=a.width),0))})),V=a((()=>{var e;const{width:a}=n.data,t=null==(e=x.value)?void 0:e.reduce(((e,a)=>e+=a.width),0);return a-w.value-t})),b=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})),A=a((()=>(V.value-y.value)/b.value)),C=a((()=>{const{xAxis:e,height:a}=n.data,t=Object.values(e).reduce(((e,a)=>(a.show&&e++,e)),0);return a/(j.value+t)})),k=a((()=>{const{xAxis:e}=n.data,a=Object.values(e).reduce(((e,a)=>(a.show&&"top"===a.position&&e++,e)),0);return C.value*a})),Y=a((()=>{var e;const{scaleValues:a}=n.data;if(!(null==(e=a.find((e=>"FHR"===e.key)))?void 0:e.show)&&!k.value)return k.value;const t=a.find((e=>"cervix"===e.key)),[,l]=(null==t?void 0:t.range)||[0,10],u=(null==t?void 0:t.spaceValue)||1;return S.value-l*u*C.value})),S=a((()=>{const{xAxis:e,height:a}=n.data,t=Object.values(e).reduce(((e,a)=>(a.show&&"bottom"===a.position&&e++,e)),0);return a-C.value*t})),H=a((()=>r(n.data.xAxis.time.startTime))),P=a((()=>36e5/A.value)),X=a((()=>{const{scaleValues:e}=n.data,a=e.find((e=>"cervix"===e.key));return C.value/((null==a?void 0:a.spaceValue)||1)})),F=a((()=>{const{scaleValues:e}=n.data,a=e.find((e=>"FHR"===e.key));return C.value/((null==a?void 0:a.spaceValue)||10)})),R=a((()=>{const{scaleValues:e}=n.data,a=e.find((e=>"fetalPresentation"===e.key));return C.value/((null==a?void 0:a.spaceValue)||1)})),W=a((()=>{var e;return(null==(e=n.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),O=t({canvasWidth:n.data.width,canvasHeight:n.data.height,borderStyle:{...u,...n.data.borderStyle||{}},selectionStyle:n.data.selectionStyle||{},grid:n.data.grid,other:n.data.other,originX:y.value,endX:V.value,originY:k.value,endY:S.value,xCellWidth:A.value,yCellHeight:C.value,gridXNumber:b.value,gridYNumber:j.value,xAxis:n.data.xAxis,leftScales:g.value,rightScales:x.value,leftAddAreaWidth:30,rightAddAreaWidth:w.value,startTime:H.value,timeXCell:P.value,cervixYCell:X.value,FHRYCell:F.value,fetalPresentationYCell:R.value,scaleValues:n.data.scaleValues,event:W.value,originYCervix:Y.value});return l((()=>d.value),(e=>{e&&function(){const{clickMenu:e,redrawPoints:a}=s(d,O,o,c,h);f.value=a,p.value=e;const{select:t}=i(d,O,o);m.value=t}()}),{immediate:!0}),{propItems:O,redrawPoints:f,select:m,clickMenu:p}}export{d as useBirthProcessChart};
1
+ import{reactive as e,computed as a,watch as t,toRefs as l}from"vue";import{defaultBorderStyle as u}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import{getTime as r}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 s(s,n,d,o,v,c){const h=e({select:null,redrawPoints:null,clickMenu:null}),m=a((()=>n.data.scaleValues.filter((e=>"left"===e.layout&&e.show)))),p=a((()=>n.data.scaleValues.filter((e=>"right"===e.layout&&e.show)))),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))})),x=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})),w=a((()=>n.data.grid.mainXCell)),y=a((()=>{const e=n.data.grid.mainYCell||14;return n.data.scaleValues.find((e=>e.show&&"FHR"===e.key))||14!==e?e:10})),V=a((()=>(x.value-g.value)/w.value)),b=a((()=>{const{xAxis:e,height:a}=n.data,t=Object.values(e).reduce(((e,a)=>(a.show&&e++,e)),0);return a/(y.value+t)})),j=a((()=>{const{xAxis:e}=n.data,a=Object.values(e).reduce(((e,a)=>(a.show&&"top"===a.position&&e++,e)),0);return b.value*a})),A=a((()=>{var e;const{scaleValues:a}=n.data;if(!(null==(e=a.find((e=>"FHR"===e.key)))?void 0:e.show)&&!j.value)return j.value;const t=a.find((e=>"cervix"===e.key)),[,l]=(null==t?void 0:t.range)||[0,10],u=(null==t?void 0:t.spaceValue)||1;return k.value-l*u*b.value})),k=a((()=>{const{xAxis:e,height:a}=n.data,t=Object.values(e).reduce(((e,a)=>(a.show&&"bottom"===a.position&&e++,e)),0);return a-b.value*t})),C=a((()=>r(n.data.xAxis.time.startTime))),Y=a((()=>36e5/V.value)),S=a((()=>{const{scaleValues:e}=n.data,a=e.find((e=>"cervix"===e.key));return b.value/((null==a?void 0:a.spaceValue)||1)})),H=a((()=>{const{scaleValues:e}=n.data,a=e.find((e=>"FHR"===e.key));return b.value/((null==a?void 0:a.spaceValue)||10)})),P=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}})),F=e({canvasWidth:n.data.width,canvasHeight:n.data.height,borderStyle:{...u,...n.data.borderStyle||{}},selectionStyle:n.data.selectionStyle||{},grid:n.data.grid,other:n.data.other,originX:g.value,endX:x.value,originY:j.value,endY:k.value,xCellWidth:V.value,yCellHeight:b.value,gridXNumber:w.value,gridYNumber:y.value,xAxis:n.data.xAxis,leftScales:m.value,rightScales:p.value,leftAddAreaWidth:30,rightAddAreaWidth:f.value,startTime:C.value,timeXCell:Y.value,cervixYCell:S.value,FHRYCell:H.value,fetalPresentationYCell:P.value,scaleValues:n.data.scaleValues,event:X.value,originYCervix:A.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};