cnhis-design-vue 3.1.42-beta.0 → 3.1.42-release.0

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 (219) hide show
  1. package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
  2. package/es/components/annotation-edit/style/index.css +1 -1
  3. package/es/components/big-table/index.d.ts +3 -4
  4. package/es/components/big-table/src/BigTable.vue.d.ts +3 -4
  5. package/es/components/big-table/src/BigTable.vue2.js +1 -1
  6. package/es/components/big-table/style/index.css +1 -1
  7. package/es/components/button-print/index.d.ts +6 -7
  8. package/es/components/button-print/src/ButtonPrint.vue.d.ts +6 -7
  9. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  10. package/es/components/button-print/src/components/EditFormat.vue.d.ts +4 -4
  11. package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +4 -4
  12. package/es/components/button-print/src/utils/print.js +1 -1
  13. package/es/components/fabric-chart/index.d.ts +2 -2
  14. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +2 -2
  15. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -1
  16. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -1
  17. package/es/components/fabric-chart/src/hooks/useLeft.js +1 -1
  18. package/es/components/field-set/index.d.ts +2 -2
  19. package/es/components/field-set/src/FieldSet.vue.d.ts +2 -2
  20. package/es/components/form-config/index.d.ts +37 -46
  21. package/es/components/form-config/src/FormConfig.vue.d.ts +37 -46
  22. package/es/components/form-config/src/FormConfig.vue.js +1 -1
  23. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +16 -16
  24. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +19 -19
  25. package/es/components/form-config/src/components/FormConfigMaterialItem.d.ts +1 -9
  26. package/es/components/form-config/src/components/FormConfigMaterialItem.js +1 -1
  27. package/es/components/form-config/src/components/renderer/DefaultNode.vue.d.ts +6 -33
  28. package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
  29. package/es/components/form-config/style/index.css +1 -1
  30. package/es/components/form-render/index.d.ts +16 -16
  31. package/es/components/form-render/src/FormRender.vue.d.ts +16 -16
  32. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +16 -16
  33. package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -1
  34. package/es/components/form-render/src/components/renderer/complex.d.ts +1 -1
  35. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -1
  36. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -1
  37. package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +2 -2
  38. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  39. package/es/components/form-render/src/components/renderer/select.js +1 -1
  40. package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +1 -1
  41. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  42. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +2 -4
  43. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  44. package/es/components/form-render/style/index.css +1 -1
  45. package/es/components/iho-table/index.d.ts +0 -3
  46. package/es/components/iho-table/src/IhoTable.vue.d.ts +0 -3
  47. package/es/components/iho-table/src/IhoTable.vue.js +1 -1
  48. package/es/components/iho-table/src/constants/index.d.ts +4 -4
  49. package/es/components/iho-table/src/constants/index.js +1 -1
  50. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
  51. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +7 -20
  52. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -1
  53. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +1 -18
  54. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
  55. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/timeUtils.d.ts +2 -0
  56. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/timeUtils.js +1 -0
  57. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +1 -1
  58. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -1
  59. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -1
  60. package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +1 -1
  61. package/es/components/iho-table/src/types/index.d.ts +0 -1
  62. package/es/components/iho-table/src/utils/index.d.ts +0 -1
  63. package/es/components/iho-table/src/utils/index.js +1 -1
  64. package/es/components/iho-table/style/index.css +1 -1
  65. package/es/components/index.css +1 -1
  66. package/es/components/index.d.ts +2 -8
  67. package/es/components/index.js +1 -1
  68. package/es/components/info-header/index.d.ts +156 -3799
  69. package/es/components/info-header/src/InfoHeader.vue.d.ts +156 -3800
  70. package/es/components/info-header/src/InfoHeader.vue.js +1 -1
  71. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.d.ts +2 -2
  72. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.d.ts +1 -1
  73. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.js +1 -1
  74. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +139 -2669
  75. package/es/components/info-header/src/components/infoDescription/index.vue.js +1 -1
  76. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +0 -745
  77. package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
  78. package/es/components/info-header/src/types/index.d.ts +3 -17
  79. package/es/components/info-header/style/index.css +1 -1
  80. package/es/components/keyboard/index.d.ts +2 -4
  81. package/es/components/keyboard/src/Keyboard.vue.d.ts +2 -4
  82. package/es/components/keyboard/src/Keyboard.vue.js +1 -1
  83. package/es/components/keyboard/style/index.css +1 -1
  84. package/es/components/recommend-search/index.d.ts +2 -2
  85. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +2 -2
  86. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +1 -1
  87. package/es/components/scale-view/src/components/formitem/sign-com.d.ts +1 -1
  88. package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +1 -1
  89. package/es/components/scale-view/src/hooks/use-component.d.ts +116 -69
  90. package/es/components/search-cascader/index.d.ts +2 -2
  91. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +2 -2
  92. package/es/components/search-cascader/src/components/SearchMenu.d.ts +1 -1
  93. package/es/components/select-label/index.d.ts +169 -70
  94. package/es/components/select-label/src/LabelFormContent.vue.d.ts +53 -1
  95. package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
  96. package/es/components/select-label/src/SelectLabel.vue.d.ts +116 -70
  97. package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
  98. package/es/components/select-label/src/components/label-classify.vue.js +1 -1
  99. package/es/components/select-label/style/index.css +1 -1
  100. package/es/components/select-person/index.d.ts +1 -1
  101. package/es/components/select-person/src/SelectPerson.vue.d.ts +1 -1
  102. package/es/components/shortcut-setter/index.d.ts +17 -17
  103. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +17 -17
  104. package/es/components/steps-wheel/index.d.ts +0 -1
  105. package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +0 -1
  106. package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
  107. package/es/components/steps-wheel/style/index.css +1 -1
  108. package/es/components/table-filter/index.d.ts +2385 -0
  109. package/es/components/table-filter/index.js +1 -1
  110. package/es/components/{base-search/src/index.vue.d.ts → table-filter/src/base-search-com/BaseSearch.vue.d.ts} +91 -26
  111. package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +1 -0
  112. package/es/components/{classification/src/index.vue.d.ts → table-filter/src/classification/Classification-com.vue.d.ts} +291 -57
  113. package/es/components/table-filter/src/classification/Classification-com.vue.js +1 -0
  114. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +0 -1
  115. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -1
  116. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +42 -1
  117. package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -1
  118. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.d.ts +1 -1
  119. package/es/components/table-filter/src/components/render-widget/enums.d.ts +8 -0
  120. package/es/components/table-filter/src/components/render-widget/enums.js +1 -1
  121. package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +1 -2
  122. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  123. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +1 -1
  124. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  125. package/es/components/{classification → table-filter}/src/components/search-filter/index.vue.d.ts +93 -10
  126. package/es/components/table-filter/src/components/search-filter/index.vue.js +1 -0
  127. package/es/components/{classification → table-filter}/src/components/set-classification/index.vue.d.ts +130 -5
  128. package/es/components/table-filter/src/components/set-classification/index.vue.js +1 -0
  129. package/es/components/{classification → table-filter}/src/components/table-modal/index.vue.d.ts +42 -0
  130. package/es/components/table-filter/src/components/table-modal/index.vue.js +1 -0
  131. package/es/components/table-filter/src/const/index.d.ts +5 -0
  132. package/es/components/table-filter/src/const/index.js +1 -0
  133. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +1 -4
  134. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  135. package/es/components/table-filter/src/hooks/useMixins.d.ts +54 -1
  136. package/es/components/table-filter/src/hooks/useMixins.js +1 -1
  137. package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
  138. package/es/components/table-filter/src/hooks/useTableSearchCon.d.ts +8 -0
  139. package/es/components/table-filter/src/hooks/useTableSearchCon.js +1 -0
  140. package/es/components/table-filter/src/hooks/useWordBookutils.d.ts +12 -0
  141. package/es/components/table-filter/src/hooks/useWordBookutils.js +1 -0
  142. package/es/components/{quick-search/src/index.vue.d.ts → table-filter/src/quick-search/QuickSearch.vue.d.ts} +120 -31
  143. package/es/components/table-filter/src/quick-search/QuickSearch.vue.js +1 -0
  144. package/es/components/table-filter/src/tool/generateDefOptions.js +1 -1
  145. package/es/components/table-filter/src/tool/time-domain.d.ts +39 -0
  146. package/es/components/table-filter/src/tool/time-domain.js +1 -0
  147. package/es/components/table-filter/src/tool/transformData.d.ts +37 -1
  148. package/es/components/table-filter/src/tool/transformData.js +1 -1
  149. package/es/components/table-filter/src/tool/utils.d.ts +4 -0
  150. package/es/components/table-filter/src/tool/utils.js +1 -0
  151. package/es/components/table-filter/src/types/enums.d.ts +0 -1
  152. package/es/components/table-filter/src/types/enums.js +1 -1
  153. package/es/components/table-filter/src/types/index.d.ts +169 -13
  154. package/es/components/table-filter/style/index.css +1 -0
  155. package/es/shared/utils/index.d.ts +0 -1
  156. package/es/shared/utils/index.js +1 -1
  157. package/package.json +2 -2
  158. package/es/components/base-search/index.d.ts +0 -293
  159. package/es/components/base-search/index.js +0 -1
  160. package/es/components/base-search/src/index.vue.js +0 -1
  161. package/es/components/base-search/style/iconfont.ttf +0 -0
  162. package/es/components/base-search/style/index.css +0 -1
  163. package/es/components/button-print/src/api.d.ts +0 -3
  164. package/es/components/button-print/src/api.js +0 -1
  165. package/es/components/classification/index.d.ts +0 -995
  166. package/es/components/classification/index.js +0 -1
  167. package/es/components/classification/src/components/search-filter/index.vue.js +0 -1
  168. package/es/components/classification/src/components/set-classification/index.vue.js +0 -1
  169. package/es/components/classification/src/components/table-modal/index.vue.js +0 -1
  170. package/es/components/classification/src/const/index.d.ts +0 -2
  171. package/es/components/classification/src/const/index.js +0 -1
  172. package/es/components/classification/src/index.vue.js +0 -1
  173. package/es/components/classification/style/iconfont.ttf +0 -0
  174. package/es/components/classification/style/index.css +0 -1
  175. package/es/components/config-provider/index.d.ts +0 -14
  176. package/es/components/config-provider/index.js +0 -1
  177. package/es/components/config-provider/src/ConfigProvider.d.ts +0 -14
  178. package/es/components/config-provider/src/ConfigProvider.js +0 -1
  179. package/es/components/config-provider/src/interface.d.ts +0 -19
  180. package/es/components/config-provider/src/interface.js +0 -1
  181. package/es/components/config-provider/src/utils/index.d.ts +0 -2
  182. package/es/components/config-provider/src/utils/index.js +0 -1
  183. package/es/components/date-picker/index.d.ts +0 -20
  184. package/es/components/date-picker/index.js +0 -1
  185. package/es/components/date-picker/src/DatePicker.vue.d.ts +0 -20
  186. package/es/components/date-picker/src/DatePicker.vue.js +0 -1
  187. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +0 -1842
  188. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.js +0 -1
  189. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +0 -1972
  190. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.js +0 -1
  191. package/es/components/info-header/src/constants/index.d.ts +0 -4
  192. package/es/components/info-header/src/constants/index.js +0 -1
  193. package/es/components/info-header/src/hooks/useThemeOverrides.d.ts +0 -4
  194. package/es/components/info-header/src/hooks/useThemeOverrides.js +0 -1
  195. package/es/components/keyboard/src/constants/index.d.ts +0 -2
  196. package/es/components/keyboard/src/constants/index.js +0 -1
  197. package/es/components/quick-search/index.d.ts +0 -713
  198. package/es/components/quick-search/index.js +0 -1
  199. package/es/components/quick-search/src/index.vue.js +0 -1
  200. package/es/components/quick-search/style/index.css +0 -1
  201. package/es/components/select-label/style/iconfont.ttf +0 -0
  202. package/es/components/steps-wheel/src/constants/index.d.ts +0 -2
  203. package/es/components/steps-wheel/src/constants/index.js +0 -1
  204. package/es/components/time-picker/index.d.ts +0 -18
  205. package/es/components/time-picker/index.js +0 -1
  206. package/es/components/time-picker/src/TimePicker.vue.d.ts +0 -18
  207. package/es/components/time-picker/src/TimePicker.vue.js +0 -1
  208. package/es/shared/mixins/index.d.ts +0 -1
  209. package/es/shared/mixins/index.js +0 -1
  210. package/es/shared/mixins/useTheme.d.ts +0 -3
  211. package/es/shared/mixins/useTheme.js +0 -1
  212. /package/es/components/{classification → table-filter}/src/directive/flexibleResize.d.ts +0 -0
  213. /package/es/components/{classification → table-filter}/src/directive/flexibleResize.js +0 -0
  214. /package/es/components/{base-search → table-filter}/src/directive/resize.d.ts +0 -0
  215. /package/es/components/{base-search → table-filter}/src/directive/resize.js +0 -0
  216. /package/es/components/table-filter/src/tool/{baseOptions.d.ts → options.d.ts} +0 -0
  217. /package/es/components/table-filter/src/tool/{baseOptions.js → options.js} +0 -0
  218. /package/es/components/{base-search → table-filter}/src/tool/resizeSensor.d.ts +0 -0
  219. /package/es/components/{base-search → table-filter}/src/tool/resizeSensor.js +0 -0
@@ -363,7 +363,7 @@ declare const _default: import("vue").DefineComponent<{
363
363
  NUpload: any;
364
364
  NUploadDragger: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
365
365
  NP: import("vue").DefineComponent<{
366
- depth: import("vue").PropType<2 | 1 | 3 | "1" | "2" | "3">;
366
+ depth: import("vue").PropType<2 | 1 | "1" | "2" | 3 | "3">;
367
367
  theme: import("vue").PropType<import("naive-ui/es/_mixins").Theme<"Typography", {
368
368
  aTextColor: string;
369
369
  blockquoteTextColor: string;
@@ -574,7 +574,7 @@ declare const _default: import("vue").DefineComponent<{
574
574
  themeClass: import("vue").Ref<string> | undefined;
575
575
  onRender: (() => void) | undefined;
576
576
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
577
- depth: import("vue").PropType<2 | 1 | 3 | "1" | "2" | "3">;
577
+ depth: import("vue").PropType<2 | 1 | "1" | "2" | 3 | "3">;
578
578
  theme: import("vue").PropType<import("naive-ui/es/_mixins").Theme<"Typography", {
579
579
  aTextColor: string;
580
580
  blockquoteTextColor: string;
@@ -785,7 +785,7 @@ declare const _default: import("vue").DefineComponent<{
785
785
  readonly strong: BooleanConstructor;
786
786
  readonly italic: BooleanConstructor;
787
787
  readonly underline: BooleanConstructor;
788
- readonly depth: import("vue").PropType<2 | 1 | 3 | "1" | "2" | "3">;
788
+ readonly depth: import("vue").PropType<2 | 1 | "1" | "2" | 3 | "3">;
789
789
  readonly tag: StringConstructor;
790
790
  readonly as: {
791
791
  readonly type: StringConstructor;
@@ -1015,7 +1015,7 @@ declare const _default: import("vue").DefineComponent<{
1015
1015
  readonly strong: BooleanConstructor;
1016
1016
  readonly italic: BooleanConstructor;
1017
1017
  readonly underline: BooleanConstructor;
1018
- readonly depth: import("vue").PropType<2 | 1 | 3 | "1" | "2" | "3">;
1018
+ readonly depth: import("vue").PropType<2 | 1 | "1" | "2" | 3 | "3">;
1019
1019
  readonly tag: StringConstructor;
1020
1020
  readonly as: {
1021
1021
  readonly type: StringConstructor;
@@ -720,7 +720,7 @@ declare const _default: import("vue").DefineComponent<{
720
720
  NUpload: any;
721
721
  NUploadDragger: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
722
722
  NP: import("vue").DefineComponent<{
723
- depth: import("vue").PropType<2 | 1 | 3 | "1" | "2" | "3">;
723
+ depth: import("vue").PropType<2 | 1 | "1" | "2" | 3 | "3">;
724
724
  theme: import("vue").PropType<import("naive-ui/es/_mixins").Theme<"Typography", {
725
725
  aTextColor: string;
726
726
  blockquoteTextColor: string;
@@ -931,7 +931,7 @@ declare const _default: import("vue").DefineComponent<{
931
931
  themeClass: import("vue").Ref<string> | undefined;
932
932
  onRender: (() => void) | undefined;
933
933
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
934
- depth: import("vue").PropType<2 | 1 | 3 | "1" | "2" | "3">;
934
+ depth: import("vue").PropType<2 | 1 | "1" | "2" | 3 | "3">;
935
935
  theme: import("vue").PropType<import("naive-ui/es/_mixins").Theme<"Typography", {
936
936
  aTextColor: string;
937
937
  blockquoteTextColor: string;
@@ -1142,7 +1142,7 @@ declare const _default: import("vue").DefineComponent<{
1142
1142
  readonly strong: BooleanConstructor;
1143
1143
  readonly italic: BooleanConstructor;
1144
1144
  readonly underline: BooleanConstructor;
1145
- readonly depth: import("vue").PropType<2 | 1 | 3 | "1" | "2" | "3">;
1145
+ readonly depth: import("vue").PropType<2 | 1 | "1" | "2" | 3 | "3">;
1146
1146
  readonly tag: StringConstructor;
1147
1147
  readonly as: {
1148
1148
  readonly type: StringConstructor;
@@ -1372,7 +1372,7 @@ declare const _default: import("vue").DefineComponent<{
1372
1372
  readonly strong: BooleanConstructor;
1373
1373
  readonly italic: BooleanConstructor;
1374
1374
  readonly underline: BooleanConstructor;
1375
- readonly depth: import("vue").PropType<2 | 1 | 3 | "1" | "2" | "3">;
1375
+ readonly depth: import("vue").PropType<2 | 1 | "1" | "2" | 3 | "3">;
1376
1376
  readonly tag: StringConstructor;
1377
1377
  readonly as: {
1378
1378
  readonly type: StringConstructor;
@@ -1 +1 @@
1
- import t from"axios";import{isArray as e}from"lodash-es";import{IdentityVerificationDialog as i,PreviewDialog as n}from"./dialog.js";import{getFileUrl as s,useBrowserPrint as r,isIReport as a}from"./browserPrint.js";import{getCurrentInstance as o}from"vue";import{format as l}from"date-fns";const d=t.create({timeout:1e3,withCredentials:!1}),h=`${window.location.protocol}//${window.location.host}`,c=`${h}/fdp-api/print/assembly/printIReport`,p=`${h}/bi-api/reprot/print/open/client/getRemote`,u=`${h}/printService/file`;let m=null;class w{constructor(){var t;if(this.webview=null,this.dialog=new i,this.dialogPreview=new n,this.instance=null,this.downloadPath="",this.printOrigin="http://127.0.0.1:11111",this.isRemote=!1,this.messageHandlerQueue=[],m)return m;m=this;const e=window;this.webview=null==(t=e.chrome)?void 0:t.webview,this.webview&&(this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler),this.postMessage({exec:"config",data:""}))}messageHandler(t){var e;const i=this.messageHandlerQueue.shift();if(!i)return console.log("当前回执",t,"没有可用的handler");const{resolve:n,reject:s}=i;try{const{exec:i}=JSON.parse(t.data);"config"===i&&(this.downloadPath=(null==(e=JSON.parse(t.data).res)?void 0:e.downloadpath)||""),console.log(t),n(JSON.parse(t.data).res)}catch(t){s(t)}}async postMessage(t){return this.webview?new Promise(((e,i)=>{this.messageHandlerQueue.push({resolve:e,reject:i}),this.webview.postMessage(t)})):Promise.reject()}destroy(){this.webview&&this.currentMessageHandler&&(this.webview.removeEventListener("message",this.currentMessageHandler),this.currentMessageHandler=void 0)}show(...t){return this.dialog.show(...t)}showPreview(...t){return this.dialogPreview.show(...t)}_testConnection(){return this.webview?Promise.resolve(!0):new Promise((t=>{d({url:`${this.printOrigin}/test`,method:"get",withCredentials:!1,params:{inputdata:{result:"success"}}}).then((({data:e})=>{"success"===e.result?t(!0):t(!1)})).catch((e=>{t(!1)}))}))}_queryServicesPrint(t){return this.webview?this.postMessage({exec:"print",data:{inputData:t}}):d({url:this.printOrigin+"/services/print",method:"get",params:{inputData:JSON.stringify(t)}}).then((({data:t})=>t))}_callPrintWithFile(t){const e={cmdid:"7",flag:"1"},i={inputData:JSON.stringify(Object.assign({},e,t))};return this.webview?this.postMessage({exec:"print",data:n(i)}):d({url:this.printOrigin+"/PrintLocal",method:"post",data:i,transformRequest:[n]}).then((({data:t})=>t));function n(t){let e="";for(const i in t)e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])+"&";return e=e.slice(0,-1),e}}_handleResult(t,e){if("success"!==t.result){const i={type:"printError",message:t.message||t.Message,result:t.result,errinfo:t.errinfo};return null==e||e(i),!1}return t}_handleResultTest(t,e){return!!t||(console.log("notInstalledApp"),null==e||e({type:"notInstalledApp",message:"请打开打印服务器插件"}),!1)}async _handleEventQueryPrintData(t,e,i,n){const s={templateId:t,formatId:e,params:i,cmdid:"7"},r=await this._queryServicesPrint(s);return this._handleQueryPrintDataResult(r,e,n)}_handleQueryPrintDataResult(t,e,i){if(!(null==t?void 0:t.file)){try{const e=t.message||t.Message;console.log(e),null==i||i({type:"queryPrintDataFailure",message:e})}catch(t){console.log(t)}return!1}return{file:t.file,printerName:t.defprinter,pageCount:t.pagecount,formatId:e}}async _handleEventDirect({templateId:t,formatId:e,params:i,cmdid:n,print:s,printdlgshow:r="1",nobillnode:a="1",btnprint:o="1"}){const d={templateId:t,formatId:e,params:i,cmdid:n,nobillnode:a,printdlgshow:r,btnprint:o};if(s){try{s=JSON.parse(s)}catch(t){}d.print=s}else if(this.isRemote){const t=l(new Date,"yyyyMMddHHmmss");d.print={print:"1",type:"1",zip:"0",filename:`F:\\WorkSpace\\crmweb\\web\\${t}\\${t}`}}return await this._queryServicesPrint(d)}async _handleEventEditFormat({templateId:t,formatId:e="",params:i="",token:n}){const s={};let r={};try{r=Object.assign({},s,JSON.parse(i))}catch(t){r=s}const a={templateId:t,formatId:e,cmdid:"9",token:n,params:JSON.stringify(r)};return await this._queryServicesPrint(a)}async _queryProxyOrigin(){if(this.isRemote)return;const{data:t}=await d({method:"get",url:p})||{},{map:e={}}=t;e.isRemote&&(this.printOrigin=h+"/printService",this.isRemote=!0)}async _queryPrintFile(t,e=""){const{data:i}=await d({method:"post",url:c,responseType:"blob",params:{formatId:t.split("_")[1],params:e}})||{};return i}async _browserPrint(t,e){if(this.isRemote){const{filedir:i}=t,n=JSON.parse(i)[0].replace(/\\/g,"/").split("/"),a=n[n.length-2],o=n[n.length-1],l=await s(`${u}/${a}/${o}`),d=r(null,e,l);if("preview"===e)return d}}async preview({templateId:t,formatId:e,params:i="",btnprint:n},s,l){if(a(e)){const t=await this._queryPrintFile(e,i);if(!t)return null==l?void 0:l("获取文件失败!");const n=r(t,"preview");return this.instance||(this.instance=o()),this.showPreview(this.instance,n),void(null==s||s({file:t}))}await this._queryProxyOrigin();const d=await this._testConnection();if(!this._handleResultTest(d,l))return!1;const h=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:this.isRemote?"7":"8",btnprint:n});if(!h)return!1;const c=this._handleResult(h,l);if(!c)return!1;if(this.isRemote){const t=await this._browserPrint(c,"preview");this.instance||(this.instance=o()),this.showPreview(this.instance,t)}s&&s(c)}async printDirect({templateId:t,formatId:e,params:i="",print:n,printdlgshow:s,nobillnode:o,isDownloadFile:l=!0},d,h,c="printDirect"){if(a(e)){const t=await this._queryPrintFile(e,i);return t?(r(t,c),void(null==d||d({file:t}))):null==h?void 0:h("获取文件失败!")}await this._queryProxyOrigin();const p=await this._testConnection();if(!this._handleResultTest(p,h))return!1;const u=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:"7",print:n,printdlgshow:s,nobillnode:o});if(!u)return!1;const m=this._handleResult(u,h);if(!m)return!1;l&&["downloadPDF"].includes(c)&&await this._browserPrint(m,c),null==d||d(m)}_downloadPDF(t){return this.webview?this.postMessage({exec:"pdf",data:{file:t}}):d.get(this.printOrigin+"/download",{params:{inputData:t}}).then((({data:t})=>t))}downloadPDF(t,i,n){this.webview&&this.downloadPath&&(t.print.filename=this.downloadPath.replace(/\\/g,"/")),this.printDirect(t,(async s=>{if(s||n(null),a(t.formatId))return i(s);const r=this,o=await async function(t){const i=[],n=JSON.parse(t);if(!e(n))return await r._downloadPDF("");if(1===n.length)return await r._downloadPDF(n[0]||"");for(let t=0,e=n.length;t<e;t++)i.push(await r._downloadPDF(n[t]||""));return i}(s.filedir);i(o,s)}),(t=>n(t)),"downloadPDF")}async print({templateId:t,formatId:e,params:i=""},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this.queryPrintData({templateId:t,formatId:e,params:i},void 0,s);if(!a)return!1;const o=this.printFileData({formatId:e,file:a.file,printerName:a.printerName},void 0,s);if(!o)return!1;n&&n(o)}async queryPrintData({templateId:t,formatId:e,params:i=""},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._handleEventQueryPrintData(t,e,i,s);return!!a&&(n&&n(a),a)}async printFileData({formatId:t,file:e,printerName:i="Default"},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._callPrintWithFile({formatId:t,printname:i,file:e}),o=this._handleResult(a,s);return!!o&&(n&&n(o),o)}async editPrintFormat({templateId:t,formatId:e,params:i,token:n},s,r){const a=await this._testConnection();if(!this._handleResultTest(a,r))return!1;const o=await this._handleEventEditFormat({templateId:t,formatId:e,params:i,token:n}),l=this._handleResult(o,r);if(!l)return!1;s&&s(l)}async addPrintFormat({templateId:t,params:e,token:i},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._handleEventEditFormat({templateId:t,params:e,token:i}),o=this._handleResult(a,s);if(!o)return!1;n&&n(o)}}export{w as Print};
1
+ import t from"axios";import{isArray as e}from"lodash-es";import{IdentityVerificationDialog as i,PreviewDialog as n}from"./dialog.js";import{getFileUrl as s,useBrowserPrint as r,isIReport as a}from"./browserPrint.js";import{getCurrentInstance as o}from"vue";import{format as l}from"date-fns";const d=t.create({timeout:1e3,withCredentials:!1}),h=`${window.location.protocol}//${window.location.host}`,c=`${h}/fdp-api/print/assembly/printIReport`,p=`${h}/bi-api/reprot/print/open/client/getRemote`,u=`${h}/printService/file`;let m=null;class w{constructor(){var t;if(this.webview=null,this.dialog=new i,this.dialogPreview=new n,this.instance=null,this.downloadPath="",this.printOrigin="http://127.0.0.1:11111",this.isRemote=!1,this.messageHandlerQueue=[],m)return m;m=this;const e=window;this.webview=null==(t=e.chrome)?void 0:t.webview,this.webview&&(this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler),this.postMessage({exec:"config",data:""}))}messageHandler(t){var e;const i=this.messageHandlerQueue.shift();if(!i)return console.log("当前回执",t,"没有可用的handler");const{resolve:n,reject:s}=i;try{const{exec:i}=JSON.parse(t.data);"config"===i&&(this.downloadPath=(null==(e=JSON.parse(t.data).res)?void 0:e.downloadpath)||""),console.log(t),n(JSON.parse(t.data).res)}catch(t){s(t)}}async postMessage(t){return this.webview?new Promise(((e,i)=>{this.messageHandlerQueue.push({resolve:e,reject:i}),this.webview.postMessage(t)})):Promise.reject()}destroy(){this.webview&&this.currentMessageHandler&&(this.webview.removeEventListener("message",this.currentMessageHandler),this.currentMessageHandler=void 0)}show(...t){return this.dialog.show(...t)}showPreview(...t){return this.dialogPreview.show(...t)}_testConnection(){return this.webview?Promise.resolve(!0):new Promise((t=>{d({url:`${this.printOrigin}/test`,method:"get",withCredentials:!1,params:{inputdata:{result:"success"}}}).then((({data:e})=>{"success"===e.result?t(!0):t(!1)})).catch((e=>{t(!1)}))}))}_queryServicesPrint(t){return this.webview?this.postMessage({exec:"print",data:{inputData:t}}):d({url:this.printOrigin+"/services/print",method:"get",params:{inputData:JSON.stringify(t)}}).then((({data:t})=>t))}_callPrintWithFile(t){const e={cmdid:"7",flag:"1"},i={inputData:JSON.stringify(Object.assign({},e,t))};return this.webview?this.postMessage({exec:"print",data:n(i)}):d({url:this.printOrigin+"/PrintLocal",method:"post",data:i,transformRequest:[n]}).then((({data:t})=>t));function n(t){let e="";for(const i in t)e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])+"&";return e=e.slice(0,-1),e}}_handleResult(t,e){if("success"!==t.result){const i={type:"printError",message:t.message||t.Message,result:t.result,errinfo:t.errinfo};return null==e||e(i),!1}return t}_handleResultTest(t,e){return!!t||(console.log("notInstalledApp"),null==e||e({type:"notInstalledApp",message:"请打开打印服务器插件"}),!1)}async _handleEventQueryPrintData(t,e,i,n){const s={templateId:t,formatId:e,params:i,cmdid:"7"},r=await this._queryServicesPrint(s);return this._handleQueryPrintDataResult(r,e,n)}_handleQueryPrintDataResult(t,e,i){if(!(null==t?void 0:t.file)){try{const e=t.message||t.Message;console.log(e),null==i||i({type:"queryPrintDataFailure",message:e})}catch(t){console.log(t)}return!1}return{file:t.file,printerName:t.defprinter,pageCount:t.pagecount,formatId:e}}async _handleEventDirect({templateId:t,formatId:e,params:i,cmdid:n,print:s,printdlgshow:r="1",nobillnode:a="1",btnprint:o="1"}){const d={templateId:t,formatId:e,params:i,cmdid:n,nobillnode:a,printdlgshow:r,btnprint:o};if(s){try{s=JSON.parse(s)}catch(t){}d.print=s}else if(this.isRemote){const t=l(new Date,"yyyyMMddHHmmss");d.print={print:"1",type:"1",zip:"0",filename:`F:\\WorkSpace\\crmweb\\web\\${t}\\${t}`}}return await this._queryServicesPrint(d)}async _handleEventEditFormat({templateId:t,formatId:e="",params:i="",token:n}){const s={};let r={};try{r=Object.assign({},s,JSON.parse(i))}catch(t){r=s}const a={templateId:t,formatId:e,cmdid:"9",token:n,params:JSON.stringify(r)};return await this._queryServicesPrint(a)}async _queryProxyOrigin(){if(this.isRemote)return;const{data:t}=await d({method:"get",url:p})||{},{map:e={}}=t;e.isRemote&&(this.printOrigin=h+"/printService",this.isRemote=!0)}async _queryPrintFile(t,e=""){const{data:i}=await d({method:"post",url:c,responseType:"blob",params:{formatId:t.split("_")[1],params:e}})||{};return i}async _browserPrint(t,e){if(this.isRemote){const{filedir:i}=t,n=JSON.parse(i)[0].replace(/\\/g,"/").split("/"),a=n[n.length-2],o=n[n.length-1],l=await s(`${u}/${a}/${o}`),d=r(null,e,l);if("preview"===e)return d}}async preview({templateId:t,formatId:e,params:i="",btnprint:n},s,l){if(a(e)){const t=await this._queryPrintFile(e,i);if(!t)return null==l?void 0:l("获取文件失败!");const n=r(t,"preview");return this.instance||(this.instance=o()),this.showPreview(this.instance,n),void(null==s||s({file:t}))}await this._queryProxyOrigin();const d=await this._testConnection();if(!this._handleResultTest(d,l))return!1;const h=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:this.isRemote?"7":"8",btnprint:n});if(!h)return!1;const c=this._handleResult(h,l);if(!c)return!1;if(this.isRemote){const t=await this._browserPrint(c,"preview");this.instance||(this.instance=o()),this.showPreview(this.instance,t)}s&&s(c)}async printDirect({templateId:t,formatId:e,params:i="",print:n,printdlgshow:s,nobillnode:o,isDownloadFile:l=!0},d,h,c="printDirect"){if(a(e)){const t=await this._queryPrintFile(e,i);return t?(r(t,c),void(null==d||d({file:t}))):null==h?void 0:h("获取文件失败!")}await this._queryProxyOrigin();const p=await this._testConnection();if(!this._handleResultTest(p,h))return!1;const u=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:"7",print:n,printdlgshow:s,nobillnode:o});if(!u)return!1;const m=this._handleResult(u,h);if(!m)return!1;l&&["downloadPDF"].includes(c)&&await this._browserPrint(m,c),d&&d(m)}_downloadPDF(t){return this.webview?this.postMessage({exec:"pdf",data:{file:t}}):d.get(this.printOrigin+"/download",{params:{inputData:t}}).then((({data:t})=>t))}downloadPDF(t,i,n){this.webview&&this.downloadPath&&(t.print.filename=this.downloadPath.replace(/\\/g,"/")),this.printDirect(t,(async s=>{if(s||n(null),a(t.formatId))return i(s);const r=this,o=await async function(t){const i=[],n=JSON.parse(t);if(!e(n))return await r._downloadPDF("");if(1===n.length)return await r._downloadPDF(n[0]||"");for(let t=0,e=n.length;t<e;t++)i.push(await r._downloadPDF(n[t]||""));return i}(s.filedir);i(o)}),(t=>n(t)),"downloadPDF")}async print({templateId:t,formatId:e,params:i=""},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this.queryPrintData({templateId:t,formatId:e,params:i},void 0,s);if(!a)return!1;const o=this.printFileData({formatId:e,file:a.file,printerName:a.printerName},void 0,s);if(!o)return!1;n&&n(o)}async queryPrintData({templateId:t,formatId:e,params:i=""},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._handleEventQueryPrintData(t,e,i,s);return!!a&&(n&&n(a),a)}async printFileData({formatId:t,file:e,printerName:i="Default"},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._callPrintWithFile({formatId:t,printname:i,file:e}),o=this._handleResult(a,s);return!!o&&(n&&n(o),o)}async editPrintFormat({templateId:t,formatId:e,params:i,token:n},s,r){const a=await this._testConnection();if(!this._handleResultTest(a,r))return!1;const o=await this._handleEventEditFormat({templateId:t,formatId:e,params:i,token:n}),l=this._handleResult(o,r);if(!l)return!1;s&&s(l)}async addPrintFormat({templateId:t,params:e,token:i},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._handleEventEditFormat({templateId:t,params:e,token:i}),o=this._handleResult(a,s);if(!o)return!1;n&&n(o)}}export{w as Print};
@@ -30,7 +30,7 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
30
30
  onAdd?: ((...args: any[]) => any) | undefined;
31
31
  onRemove?: ((...args: any[]) => any) | undefined;
32
32
  }>>;
33
- emits: (event: "add" | "change" | "remove" | "select", ...args: any[]) => void;
33
+ emits: (event: "change" | "add" | "remove" | "select", ...args: any[]) => void;
34
34
  isTemperature: import("vue").ComputedRef<boolean>;
35
35
  canvasRef: any;
36
36
  canvas: import("vue").Ref<any>;
@@ -182,7 +182,7 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
182
182
  show: boolean;
183
183
  list: unknown[];
184
184
  }>;
185
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("add" | "change" | "remove" | "select")[], "remove" | "add" | "change" | "select", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
185
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "add" | "remove" | "select")[], "remove" | "change" | "add" | "select", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
186
186
  type: {
187
187
  type: import("vue").PropType<import("./src/interface").IType>;
188
188
  default: string;
@@ -32,7 +32,7 @@ declare const _default: import("vue").DefineComponent<{
32
32
  onAdd?: ((...args: any[]) => any) | undefined;
33
33
  onRemove?: ((...args: any[]) => any) | undefined;
34
34
  }>>;
35
- emits: (event: "add" | "change" | "remove" | "select", ...args: any[]) => void;
35
+ emits: (event: "change" | "add" | "remove" | "select", ...args: any[]) => void;
36
36
  isTemperature: import("vue").ComputedRef<boolean>;
37
37
  canvasRef: any;
38
38
  canvas: import("vue").Ref<any>;
@@ -184,7 +184,7 @@ declare const _default: import("vue").DefineComponent<{
184
184
  show: boolean;
185
185
  list: unknown[];
186
186
  }>;
187
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("add" | "change" | "remove" | "select")[], "remove" | "add" | "change" | "select", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
187
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "add" | "remove" | "select")[], "remove" | "change" | "add" | "select", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
188
188
  type: {
189
189
  type: PropType<IType>;
190
190
  default: string;
@@ -1 +1 @@
1
- import{useBirthProcessCumputedPoint as t}from"./useCumputedPoint.js";import e from"./useGrid.js";import{drawLine as n,drawArrow as o,drawText as i,defaultTextStyle as r,drawPoint as l,defaultStyle as s,defaultRectStyle as a}from"./useDraw.js";import{fabric as u}from"../utils/index.js";import{getIndex as c,isEffectiveNode as f}from"../utils/utils.js";import{cloneDeep as d}from"lodash-es";import{format as p}from"date-fns";function h(h,g,v,m,y,k){const{cumputedX:w,cumputedY:x,getXValue:b,getYValue:T}=t(g),{getEqualXTypes:S,repeatTip:j}=k,{xAxis:C,grid:E,originX:P,originY:Y,xCellWidth:G,endY:L,startTime:M,leftAddAreaWidth:A,leftScales:X,rightScales:H,yCellHeight:I,endX:D,scaleValues:O,canvasWidth:V,borderStyle:W,rightAddAreaWidth:R,event:$,originYCervix:B,other:F,canvasHeight:q}=g,z=d(O),N=new Set;function J(){z.filter((t=>t.show)).forEach(((t,e)=>{var s;const a=[],u=[],c=[];null==(s=t.data)||s.forEach(((s,f)=>{!function(s,f,d){let p,y;const{pointAttr:k={},lineAttr:w={},title:x="",key:S,type:j="circle",childbirthStyle:C={}}=t,E=t.data[d+1],P=Z(E,t);if(s&&P&&!f.breakpoint)y=n([...s,...P],{...w});else if(s&&!P&&!f.breakpoint){const e=Z(E,t);y=e?n([...s,...e],{...w}):null}let Y,L;if(f.childbirth){const t=s[1]+I;Y=o([s[0],s[1],t],C),c.push(Y),L=i([s[0]+G/2,t-I/2],{value:String(f.childbirth),...r,originX:"left",originY:"center",...C}),c.push(L)}const M=u[d-1],A={origin:{data:f,title:x,key:S||"",dataIndex:e,index:d},leftLine:M,rightLine:y,arrowGroup:Y,arrowGroupText:L,...k,...g.event.hovered?g.event.evented?{selectable:!0}:{selectable:!0,lockMovementX:!0,lockMovementY:!0}:g.event};M?p=l(j,{left:M.get("x2"),top:M.get("y2"),...A}):s&&(A.leftLine=null,p=l(j,{left:s[0],top:s[1],...A}));u.push(y),p&&(!function(t){$.hovered&&(t.on("mouseover",(()=>{U(t)})),t.on("mouseout",(()=>{m.show=!1})));if(t.lockMovementX&&t.lockMovementY)return;t.on("moving",(()=>{Q(t),function(t){var e,n,o,i;null==(e=t.leftLine)||e.setCoords().set({x2:t.left,y2:t.top}),null==(n=t.rightLine)||n.setCoords().set({x1:t.left,y1:t.top}),null==(o=t.arrowGroup)||o.setCoords().set({left:t.left,top:t.top}),null==(i=t.arrowGroupText)||i.setCoords().set({left:t.left+G/2,top:t.top+I/2})}(t),$.hovered&&U(t)})),t.on("mouseup",(e=>{if(m.show=!1,1===e.button){const{key:e}=t.origin,n={...t.origin,data:{...t.origin.data,time:b(t.left),value:T(e,t.top)}};h.value.discardActiveObject(),v("change",n),K(n,"change")}}))}(p),a.push(p),N.add(p))}(Z(s,t),s,f)})),Promise.all(a).then((t=>{const e=u.filter((t=>t));let n=null;t=t.filter((t=>(t&&n&&(n.nextPoint=t,t.prevPoint=n),n=t||n,t))),Promise.all(c).then((n=>{h.value.add(...e,...t,...n),t.forEach((t=>{null==t||t.bringToFront()}))}))}))}))}function K(t,e="add"){const{dataIndex:n,data:o,index:i,key:r}=t,l=z.find((t=>t.key===r));switch(e){case"remove":l.data.splice(i,1);break;case"change":l.data[i]=o;break;default:{const t=c(o.time,l.data);l.data.splice(t,0,o);break}}var s;N.size&&(null==(s=h.value)||s.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}([...N]))),N.clear(),J()}function Q(t){const e=t.prevPoint?t.prevPoint.left:P,n=t.nextPoint?t.nextPoint.left:D;t.setCoords(),["cervix","fetalPresentation"].includes(t.origin.key)&&t.top<B&&t.set("top",B),t.top<Y&&t.set("top",Y),t.top>L&&t.set("top",L),t.left<e&&t.set("left",e),t.left>n&&t.set("left",n)}function U(t){const{title:e,key:n}=t.origin;m.point={x:t.left,y:t.top},m.list=[`${e} ${T(n,t.top)}`,`时间 ${b(t.left).slice(-5)}`],m.show=!0}function Z(t,e){if(f(t)&&function(t){const e=M+864e5,n=new Date(t).getTime();return n>=M&&n<=e}(t.time)){const n=w(t.time),o=x(e.key,e.range,t.value);return[n,o<Y?Y:o>L?L:o]}}function _(t,e){return t+1>e[1]?e[0]:t+1}return e(h,g,!0),function(){const t=new u.Rect({...W,width:V-A-R-1,height:L-1,left:A,top:0,fill:"transparent"});h.value.add(t)}(),function(){function t(t,e="left"){let n="left"===e?A:D;t.forEach(((t,e)=>{const{range:o,spaceValue:l,width:c,title:f,titleStyle:d,key:p,scaleNumberStyle:g={}}=t,v=[],m=n+c/2,y=function(t,e){const n=[],[o,i]=t;for(let t=o;e>0?t<=i:t>=i;t+=e)n.push(t);return n}(o,l);y.forEach(((t,e)=>{const n=0===e?L-8:e!==y.length-1||Y||B&&"FHR"!==p?L-e*I:Y+8;v.push(i([m,n],{value:String(t),...r,...g}))}));const k=new u.Rect({...a,width:c,height:L,left:m,top:L/2}),w=i([m,Y>0?Y-I/2:I/2],{value:String(f),...r,...d}),x=new u.Group([...v,k,...w?[w]:[]],{objectCaching:!1,...s});h.value.add(x),x.sendToBack(),n+=c}))}t(X),t(H,"right")}(),function(){const{show:t,startTime:e,range:n=[0,23],position:o="top",style:l}=C.time,{show:a,range:c=[0,23],position:f,style:d}=C.processTime;if(t||a){const p=[],g=[],v=[],m=[],y=P+G/2,k=I/2;for(let s=0;s<E.mainXCell;s++){if(t){const t=0===s?+e.slice(11,13):_(p.at(-1),n);p.push(t);const a="top"===o?Y-k:L+k;v.push(i([y+s*G,a],{value:String(t),...r,...l||{}}))}if(a){const t=0===s?c[0]:g.at(-1)+1;g.push(t);const e="top"===f?k:q-k;m.push(i([y+s*G,e],{value:String(t),...r,...d||{}}))}}const w=new u.Group([...v,...m],{objectCaching:!1,...s});h.value.add(w),h.value.sendToBack(w)}}(),function(){var t;const e=Object.values(F),o=[],i={},r=z.find((t=>"cervix"===t.key&&t.show)),l=null==(t=null==r?void 0:r.data)?void 0:t.find((t=>3==+t.value));function s(t,e){const{key:n,range:o}=r||{},i=x(n,o,10),l=[0,e],s=[-e/t,0],a=[(L-i-e)/t,L-i],u=[D-P,t*(D-P)+e];let c=[],f=[];function d([n,o]){return Math.abs(o-t*n-e)<=1}function p([t,e]){const[n,o]=[...h([t,e])];return n>=P&&n<=D&&o>=i&&o<=L}function h([t,e]){return[P+t,L-e]}return d(l)&&p(l)&&(c=h(l)),d(s)&&p(s)&&(c=h(s)),d(a)&&p(a)&&(f=h(a)),d(u)&&p(u)&&(f=h(u)),[...c,...f]}e.forEach((t=>{if(!t.show)return;const{key:e}=t;switch(e){case"fetalPresentation":{const{range:i,show:r}=z.find((t=>t.key===e));if(r){const r=x(e,i,0);o.push(n([P,r,D,r],{...t}))}break}case"alert":if(l){const{key:e,range:a}=r||{},u=216e5,c={time:p(new Date(new Date(l.time).getTime()+u),"yyyy-MM-dd HH:mm"),value:10},[f,d]=[w(l.time)-P,L-x(e,a,l.value)],[h,g]=[w(c.time)-P,L-x(e,a,c.value)],v=(g-d)/(h-f),m=d-f*v,y=s(v,m);y.length>0&&(o.push(n(y,{...t})),Object.assign(i,{k:v,b:m}))}break;case"handling":if(l){const{k:e,b:r}=i,a=144e5,u=s(e,r-(w(p(new Date(new Date(l.time).getTime()+a),"yyyy-MM-dd HH:mm"))-w(l.time))*e);u.length>0&&o.push(n(u,{...t}))}}})),h.value.add(...o)}(),J(),function(){function t(t,e){const n=z.findIndex((e=>e.key===t.key));return{renderItem:()=>t.title,origin:{title:t.title,unit:t.unit,dataIndex:n,key:t.key},pointer:e}}g.event.evented&&h.value.on("mouse:up",(e=>{if(3===e.button){const{x:n=0,y:o=0}=e.pointer||{};n>=P&&n<=D&&o>=Y&&o<=L&&(y.point={x:n,y:o},y.show=!0,e.target?(y.target=e.target,y.list=["删除节点"],h.value.forEachObject((t=>{t.origin&&t.left===e.target.left&&t.top===e.target.top&&y.list.push({renderItem:()=>t.origin.title,origin:{...t.origin},mode:"remove",pointer:e.pointer})}))):(y.target=null,y.list=["新增节点"],z.filter((t=>t.show)).forEach((i=>{if(!S(n,"key",G).includes(i.key)){if(["cervix","fetalPresentation"].includes(i.key)&&o<B)return;y.list.push(t(i,e.pointer))}})),1===y.list.length&&(y.show=!1,j(),console.log("当前时间段内无可新增节点"))))}}))}(),function(){const t=V-R/2;function e(t,e){if(!t.length)return;let o=Y;const i=[];t.forEach((t=>{const n=t.title.split("").join("\n"),s=O.findIndex((e=>e.key===t.key)),a=new u.Text(String(n),{...r,...t.titleStyle||{},originY:"top",left:e,top:o,lineHeight:1}),c=l(t.type,{left:e,top:o+a.height+3,...t.pointAttr,originY:"top",origin:{title:t.title,unit:t.unit,type:t.type,dataIndex:s,key:t.key,isMenu:!0},originLeft:e,originTop:o+a.height+3,...g.event});o+=a.height+c.height+15,function(t){function e(t){const{left:e,top:n}=t;return e>=P&&e<=D&&n>=Y&&n<=L}t.on("moving",(()=>{t.set("originY","center"),e(t)?(Q(t),U(t)):m.show=!1})),t.on("mouseup:before",(n=>{if(m.show=!1,0===n.e.button&&e(t))if(S(t.left,"key",G).includes(t.origin.key))j();else{const e={data:{time:b(t.left),value:T(t.origin.key,t.top)},...t.origin};v("add",e),K(e)}!function(t){t.setCoords().set({originY:"top",left:t.originLeft,top:t.originTop})}(t)}))}(c),i.push(a,c)})),n(i),h.value.add(...i)}function n(t){const e=t.at(-1),n=(L-Y)/2,o=(e.height+e.top-Y)/2;t.forEach((t=>{const e=t.top+n-o;t.set({top:e,originTop:e})}))}e(X,A/2),e(H,t)}(),{clickMenu:function({item:t,target:e}){const n={...t.origin};"remove"===t.mode?(v("remove",n),K(n,"remove")):(Object.assign(n,{data:{time:b(t.pointer.x),value:T(t.origin.key,t.pointer.y)}}),v("add",n),K(n))}}}export{h as useBirthProcess};
1
+ import{useBirthProcessCumputedPoint as t}from"./useCumputedPoint.js";import e from"./useGrid.js";import{drawLine as n,drawArrow as o,drawText as i,defaultTextStyle as r,drawPoint as l,defaultStyle as s,defaultRectStyle as a}from"./useDraw.js";import{fabric as u}from"../utils/index.js";import{getIndex as c,isEffectiveNode as f}from"../utils/utils.js";import{cloneDeep as p}from"lodash-es";import{format as d}from"date-fns";function h(h,g,m,v,y,k){const{cumputedX:w,cumputedY:x,getXValue:b,getYValue:T}=t(g),{getEqualXTypes:j,repeatTip:C}=k,{xAxis:E,grid:P,originX:S,originY:G,xCellWidth:L,endY:Y,startTime:A,leftAddAreaWidth:I,leftScales:M,rightScales:X,yCellHeight:D,endX:H,scaleValues:O,canvasWidth:V,borderStyle:W,rightAddAreaWidth:$,event:R,originYCervix:q,other:z}=g,B=p(O),F=new Set;function J(){B.forEach(((t,e)=>{var s;const a=[],u=[],c=[];null==(s=t.data)||s.forEach(((s,f)=>{!function(s,f,p){let d,y;const{pointAttr:k={},lineAttr:w={},title:x="",key:j,type:C="circle",childbirth:E={}}=t,P=t.data[p+1],S=U(P,t);if(s&&S&&!f.breakpoint)y=n([...s,...S],{...w});else if(s&&!S&&!f.breakpoint){const e=U(P,t);y=e?n([...s,...e],{...w}):null}let G,Y;if(f.childbirth){const t=s[1]+D;G=o([s[0],s[1],t],E.style||{}),c.push(G),E.text&&(Y=i([s[0]+L/2,t-D/2],{value:String(E.text),...r,originX:"left",originY:"center",...E.style||{}}),c.push(Y))}const A=u[p-1],I={origin:{data:f,title:x,key:j||"",dataIndex:e,index:p},leftLine:A,rightLine:y,arrowGroup:G,arrowGroupText:Y,...k,...g.event};A?d=l(C,{left:A.get("x2"),top:A.get("y2"),...I}):s&&(I.leftLine=null,d=l(C,{left:s[0],top:s[1],...I}));u.push(y),d&&(!function(t){R.hovered&&(t.on("mouseover",(()=>{Q(t)})),t.on("mouseout",(()=>{v.show=!1})));t.on("moving",(()=>{N(t),function(t){var e,n,o,i;null==(e=t.leftLine)||e.setCoords().set({x2:t.left,y2:t.top}),null==(n=t.rightLine)||n.setCoords().set({x1:t.left,y1:t.top}),null==(o=t.arrowGroup)||o.setCoords().set({left:t.left,top:t.top}),null==(i=t.arrowGroupText)||i.setCoords().set({left:t.left+L/2,top:t.top+D/2})}(t),R.hovered&&Q(t)})),t.on("mouseup",(e=>{if(v.show=!1,1===e.button){const{key:e}=t.origin,n={...t.origin,data:{...t.origin.data,time:b(t.left),value:T(e,t.top)}};h.value.discardActiveObject(),m("change",n),K(n,"change")}}))}(d),a.push(d),F.add(d))}(U(s,t),s,f)})),Promise.all(a).then((t=>{const e=u.filter((t=>t));let n=null;t=t.filter((t=>(t&&n&&(n.nextPoint=t,t.prevPoint=n),n=t||n,t))),Promise.all(c).then((n=>{h.value.add(...e,...t,...n),t.forEach((t=>{null==t||t.bringToFront()}))}))}))}))}function K(t,e="add"){const{dataIndex:n,data:o,index:i,key:r}=t,l=B.find((t=>t.key===r));switch(e){case"remove":l.data.splice(i,1);break;case"change":l.data[i]=o;break;default:{const t=c(o.time,l.data);l.data.splice(t,0,o);break}}var s;F.size&&(null==(s=h.value)||s.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}([...F]))),F.clear(),J()}function N(t){const e=t.prevPoint?t.prevPoint.left:S,n=t.nextPoint?t.nextPoint.left:H;t.setCoords(),["cervix","fetalPresentation"].includes(t.origin.key)&&t.top<q&&t.set("top",q),t.top<G&&t.set("top",G),t.top>Y&&t.set("top",Y),t.left<e&&t.set("left",e),t.left>n&&t.set("left",n)}function Q(t){const{title:e,key:n}=t.origin;v.point={x:t.left,y:t.top},v.list=[`${e} ${T(n,t.top)}`,`时间 ${b(t.left).slice(-5)}`],v.show=!0}function U(t,e){if(f(t)&&function(t){const e=A+864e5,n=new Date(t).getTime();return n>=A&&n<=e}(t.time)){const n=w(t.time),o=x(e.key,e.range,t.value);return[n,o<G?G:o>Y?Y:o]}}function Z(t,e){return t+1>e[1]?e[0]:t+1}return e(h,g,!0),function(){const t=new u.Rect({...W,width:V-I-$,height:Y,left:I,top:0,fill:"transparent"});h.value.add(t)}(),function(){let t=I;[...M,...X].forEach(((e,n)=>{const{range:o,spaceValue:l,width:c,title:f,titleStyle:p,layout:d}=e,g=[];"right"===d&&(t=H);const m=t+c/2,v=function(t,e){const n=[],[o,i]=t;for(let t=o;e>0?t<=i:t>=i;t+=e)n.push(t);return n}(o,l);v.forEach(((t,e)=>{const n=0===e?Y-8:Y-e*D;g.push(i([m,n],{value:String(t),...r}))}));const y=new u.Rect({...a,width:c,height:Y,left:m,top:Y/2}),k=G>0?i([m,G-D/2],{value:String(f),...r,...p}):null,w=new u.Group([...g,y,...k?[k]:[]],{objectCaching:!1,...s});h.value.add(w),t+=c}))}(),function(){const{show:t,startTime:e,range:n=[0,23],position:o="top",style:l}=E.time,{show:a,range:c=[0,23],style:f}=E.processTime;if(t||a){const p=[],d=[],g=[],m=[],v=S+L/2;for(let s=0;s<P.mainXCell;s++){if(t){const t=0===s?+e.slice(11,13):Z(p.at(-1),n);p.push(t);const a="top"==o?G-15:Y+15;g.push(i([v+s*L,a],{value:String(t),...r,...l||{}}))}if(a){const t=0===s?c[0]:d.at(-1)+1;d.push(t);const e="top"==o?Y+15:G-15;m.push(i([v+s*L,e],{value:String(t),...r,...f||{}}))}}const y=new u.Group([...g,...m],{objectCaching:!1,...s});h.value.add(y),h.value.sendToBack(y)}}(),function(){const t=Object.values(z),e=[],o={},i=B.find((t=>"cervix"===t.key)),r=i.data.find((t=>3==+t.value));function l(t,e){const{key:n,range:o}=i||{},r=x(n,o,10),l=[0,e],s=[-e/t,0],a=[(Y-r-e)/t,Y-r],u=[H-S,t*(H-S)+e];let c=[],f=[];function p([n,o]){return Math.abs(o-t*n-e)<=1}function d([t,e]){const[n,o]=[...h([t,e])];return n>=S&&n<=H&&o>=r&&o<=Y}function h([t,e]){return[S+t,Y-e]}return p(l)&&d(l)&&(c=h(l)),p(s)&&d(s)&&(c=h(s)),p(a)&&d(a)&&(f=h(a)),p(u)&&d(u)&&(f=h(u)),[...c,...f]}t.forEach((t=>{if(!t.show)return;const{key:s}=t;switch(s){case"fetalPresentation":{const{range:o}=B.find((t=>t.key===s)),i=x(s,o,0);e.push(n([S,i,H,i],{...t}));break}case"alert":if(r){const{key:s,range:a}=i||{},u=216e5,c={time:d(new Date(new Date(r.time).getTime()+u),"yyyy-MM-dd HH:mm"),value:10},[f,p]=[w(r.time)-S,Y-x(s,a,r.value)],[h,g]=[w(c.time)-S,Y-x(s,a,c.value)],m=(g-p)/(h-f),v=p-f*m,y=l(m,v);y.length>0&&(e.push(n(y,{...t})),Object.assign(o,{k:m,b:v}))}break;case"handling":if(r){const{k:i,b:s}=o,a=144e5,u=l(i,s-(w(d(new Date(new Date(r.time).getTime()+a),"yyyy-MM-dd HH:mm"))-w(r.time))*i);u.length>0&&e.push(n(u,{...t}))}}})),h.value.add(...e)}(),J(),function(){function t(t,e){const n=B.findIndex((e=>e.key===t.key));return{renderItem:()=>t.title,origin:{title:t.title,unit:t.unit,dataIndex:n,key:t.key},pointer:e}}g.event.evented&&h.value.on("mouse:up",(e=>{if(3===e.button){const{x:n=0,y:o=0}=e.pointer||{};n>=S&&n<=H&&o>=G&&o<=Y&&(y.point={x:n,y:o},y.show=!0,e.target?(y.target=e.target,y.list=["删除节点"],h.value.forEachObject((t=>{t.origin&&t.left===e.target.left&&t.top===e.target.top&&y.list.push({renderItem:()=>t.origin.title,origin:{...t.origin},mode:"remove",pointer:e.pointer})}))):(y.target=null,y.list=["新增节点"],B.forEach((i=>{if(!j(n,"key",L).includes(i.key)){if(["cervix","fetalPresentation"].includes(i.key)&&o<q)return;y.list.push(t(i,e.pointer))}})),1===y.list.length&&(y.show=!1,C(),console.log("当前时间段内无可新增节点"))))}}))}(),function(){const t=V-$/2;function e(t,e){if(!t.length)return;let o=G;const i=[];t.forEach((t=>{const n=t.title.split("").join("\n"),s=O.findIndex((e=>e.key===t.key)),a=new u.Text(String(n),{...r,...t.titleStyle||{},originY:"top",left:e,top:o,lineHeight:1}),c=l(t.type,{left:e,top:o+a.height+3,...t.pointAttr,originY:"top",origin:{title:t.title,unit:t.unit,type:t.type,dataIndex:s,key:t.key,isMenu:!0},originLeft:e,originTop:o+a.height+3,...g.event});o+=a.height+c.height+15,function(t){function e(t){const{left:e,top:n}=t;return e>=S&&e<=H&&n>=G&&n<=Y}t.on("moving",(()=>{t.set("originY","center"),e(t)?(N(t),Q(t)):v.show=!1})),t.on("mouseup:before",(n=>{if(v.show=!1,0===n.e.button&&e(t))if(j(t.left,"key",L).includes(t.origin.key))C();else{const e={data:{time:b(t.left),value:T(t.origin.key,t.top)},...t.origin};m("add",e),K(e)}!function(t){t.setCoords().set({originY:"top",left:t.originLeft,top:t.originTop})}(t)}))}(c),i.push(a,c)})),n(i),h.value.add(...i)}function n(t){const e=t.at(-1),n=(Y-G)/2,o=(e.height+e.top-G)/2;t.forEach((t=>{const e=t.top+n-o;t.set({top:e,originTop:e})}))}e(M,I/2),e(X,t)}(),{clickMenu:function({item:t,target:e}){const n={...t.origin};"remove"===t.mode?(m("remove",n),K(n,"remove")):(Object.assign(n,{data:{time:b(t.pointer.x),value:T(t.origin.key,t.pointer.y)}}),m("add",n),K(n))}}}export{h as useBirthProcess};
@@ -1 +1 @@
1
- import{ref as e,reactive as a,computed as t,onMounted as l,nextTick as u}from"vue";import{defaultBorderStyle as r}from"./useDraw.js";import"date-fns";import"../utils/index.js";import"lodash-es";import"./useShadow.js";import{useEvent as i,useCanvasEvent as s}from"./useEvent.js";import{useBirthProcess as o}from"./useBirthProcess.js";import{useCommon as n}from"./useCommon.js";function d(d,v,c,h){const m=e(),p=e(),f=e(),g=a({show:!1,point:{x:0,y:0},list:[]}),x=a({show:!1,point:{x:0,y:0},list:[],target:null}),w=t((()=>v.data.scaleValues.filter((e=>"left"===e.layout&&e.show)))),y=t((()=>v.data.scaleValues.filter((e=>"right"===e.layout&&e.show)))),V=t((()=>{var e;return(null==(e=y.value)?void 0:e.length)?30:0})),A=t((()=>{var e;return 30+(null==(e=w.value)?void 0:e.reduce(((e,a)=>e+=a.width),0))})),C=t((()=>{var e;const{width:a}=v.data,t=null==(e=y.value)?void 0:e.reduce(((e,a)=>e+=a.width),0);return a-V.value-t})),b=t((()=>v.data.grid.mainXCell)),j=t((()=>{const e=v.data.grid.mainYCell||14;return v.data.scaleValues.find((e=>e.show&&"FHR"===e.key))||14!==e?e:10})),k=t((()=>(C.value-A.value)/b.value)),Y=t((()=>{const{xAxis:e,height:a}=v.data,t=Object.values(e).reduce(((e,a)=>(a.show&&e++,e)),0);return a/(j.value+t)})),S=t((()=>{const{xAxis:e}=v.data,a=Object.values(e).reduce(((e,a)=>(a.show&&"top"===a.position&&e++,e)),0);return Y.value*a})),H=t((()=>{var e;const{scaleValues:a}=v.data;if(!(null==(e=a.find((e=>"FHR"===e.key)))?void 0:e.show)&&!S.value)return S.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 P.value-l*u*Y.value})),P=t((()=>{const{xAxis:e,height:a}=v.data,t=Object.values(e).reduce(((e,a)=>(a.show&&"bottom"===a.position&&e++,e)),0);return a-Y.value*t})),X=t((()=>new Date(v.data.xAxis.time.startTime).getTime())),F=t((()=>36e5/k.value)),R=t((()=>{const{scaleValues:e}=v.data,a=e.find((e=>"cervix"===e.key));return((null==a?void 0:a.spaceValue)||1)/Y.value})),T=t((()=>{const{scaleValues:e}=v.data,a=e.find((e=>"FHR"===e.key));return((null==a?void 0:a.spaceValue)||10)/Y.value})),W=t((()=>{const{scaleValues:e}=v.data,a=e.find((e=>"fetalPresentation"===e.key));return((null==a?void 0:a.spaceValue)||1)/Y.value})),M=t((()=>{var e;return(null==(e=v.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),O=a({canvasWidth:v.data.width,canvasHeight:v.data.height,borderStyle:{...r,...v.data.borderStyle},selectionStyle:v.data.selectionStyle||{},grid:v.data.grid,other:v.data.other,originX:A.value,endX:C.value,originY:S.value,endY:P.value,xCellWidth:k.value,yCellHeight:Y.value,gridXNumber:b.value,gridYNumber:j.value,xAxis:v.data.xAxis,leftScales:w.value,rightScales:y.value,leftAddAreaWidth:30,rightAddAreaWidth:V.value,startTime:X.value,timeXCell:F.value,cervixYCell:R.value,FHRYCell:T.value,fetalPresentationYCell:W.value,scaleValues:v.data.scaleValues,event:M.value,originYCervix:H.value}),D=n(d);return l((()=>{u((()=>{const{clickMenu:e}=o(d,O,c,g,x,D);f.value=e,i(h.value);const{select:a}=s(d,O,c);m.value=a}))})),{propItems:O,redrawPoints:p,select:m,pointTipProps:g,pointMenuProps:x,clickMenu:f}}export{d as default};
1
+ import{ref as e,reactive as a,computed as l,onMounted as t,nextTick as u}from"vue";import{defaultBorderStyle as r}from"./useDraw.js";import"date-fns";import"../utils/index.js";import"lodash-es";import"./useShadow.js";import{useEvent as i,useCanvasEvent as s}from"./useEvent.js";import{useBirthProcess as n}from"./useBirthProcess.js";import{useCommon as d}from"./useCommon.js";function o(o,v,c,h){const m=e(),p=e(),g=e(),f=a({show:!1,point:{x:0,y:0},list:[]}),x=a({show:!1,point:{x:0,y:0},list:[],target:null}),y=l((()=>v.data.scaleValues.filter((e=>"left"===e.layout)))),V=l((()=>v.data.scaleValues.filter((e=>"right"===e.layout)))),w=l((()=>{var e;return(null==(e=V.value)?void 0:e.length)?30:0})),C=l((()=>{var e;return 30+(null==(e=y.value)?void 0:e.reduce(((e,a)=>e+=a.width),0))})),A=l((()=>{var e;const{width:a}=v.data,l=null==(e=V.value)?void 0:e.reduce(((e,a)=>e+=a.width),0);return a-w.value-l})),Y=l((()=>v.data.grid.mainXCell)),j=l((()=>v.data.grid.mainYCell)),S=l((()=>(A.value-C.value)/Y.value)),b=l((()=>{const{xAxis:e,height:a}=v.data,l=Object.values(e).reduce(((e,a)=>(a.show&&e++,e)),0);return a/(j.value+l)})),k=l((()=>b.value)),P=l((()=>{const{scaleValues:e}=v.data,a=e.find((e=>"cervix"===e.key)),[,l]=(null==a?void 0:a.range)||[0,10],t=(null==a?void 0:a.spaceValue)||1;return X.value-l*t*b.value})),X=l((()=>{const{height:e}=v.data;return e-b.value})),H=l((()=>new Date(v.data.xAxis.time.startTime).getTime())),T=l((()=>36e5/S.value)),W=l((()=>{const{scaleValues:e}=v.data,a=e.find((e=>"cervix"===e.key));return((null==a?void 0:a.spaceValue)||1)/b.value})),M=l((()=>{const{scaleValues:e}=v.data,a=e.find((e=>"FHR"===e.key));return((null==a?void 0:a.spaceValue)||10)/b.value})),D=l((()=>{const{scaleValues:e}=v.data,a=e.find((e=>"fetalPresentation"===e.key));return((null==a?void 0:a.spaceValue)||1)/b.value})),F=l((()=>{var e;return(null==(e=v.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),N=a({canvasWidth:v.data.width,canvasHeight:v.data.height,borderStyle:{...r,...v.data.borderStyle},selectionStyle:v.data.selectionStyle||{},grid:v.data.grid,other:v.data.other,originX:C.value,endX:A.value,originY:k.value,endY:X.value,xCellWidth:S.value,yCellHeight:b.value,gridXNumber:Y.value,gridYNumber:j.value,xAxis:v.data.xAxis,leftScales:y.value,rightScales:V.value,leftAddAreaWidth:30,rightAddAreaWidth:w.value,startTime:H.value,timeXCell:T.value,cervixYCell:W.value,FHRYCell:M.value,fetalPresentationYCell:D.value,scaleValues:v.data.scaleValues,event:F.value,originYCervix:P.value}),R=d(o);return t((()=>{u((()=>{const{clickMenu:e}=n(o,N,c,f,x,R);g.value=e,i(h.value);const{select:a}=s(o,N,c);m.value=a}))})),{propItems:N,redrawPoints:p,select:m,pointTipProps:f,pointMenuProps:x,clickMenu:g}}export{o as default};
@@ -1 +1 @@
1
- import{fabric as t}from"../utils/index.js";import{defaultBorderStyle as e,defaultTextStyle as i,defaultStyle as n,defaultRectStyle as o,drawPoint as l,drawTextGroup as r}from"./useDraw.js";import{getType as s,isOneLine as u}from"../utils/utils.js";function h(h,a,c,g,p,f,d,w,y,v,S,b){var m,Y;const{getEqualXTypes:x,repeatTip:X}=b,{originY:T,endY:N,originX:L,endX:M,xCellWidth:V,yCellHeight:C,left:j,vitalSignsOriginY:k,painOriginY:E,painHeight:I,iconsWidth:G,itemList:H,painIndex:O,right:R,canvasWidth:W,canvasHeight:A,getRightInfo:_}=a;function B(e,n,o,l){const{position:r}=n;return new t.Text(String(e),{...i,originX:"left"==r?"right":"right"==r?"left":"center",left:o,top:l,...n.style})}function J(t="center",e,i){let n=e+i/2,o=[n-4.5,n+4.5],l=[n-2.5,n+2.5],r=n;return"right"===t&&(n=e,o=[n,n+9],l=[n,n+5],r=o[1]),"left"===t&&(n=e+i,o=[n-9,n],l=[n-5,n],r=o[0]),{lineXMain:o,lineXSub:l,textLeft:r}}function $(l){var s;if(!(null==l?void 0:l.length))return;const{layout:u}=l[0];let a=G,c=L;"right"===u&&(a=M,c=M+(null!=(s=null==R?void 0:R.width)?s:0));const g=[],p=I&&"right"!==u?l.length-1:l.length,f=(c-a)/p,d=f+(c-a)%p;l.forEach(((l,s)=>{var u,c;if("pain"===l.type)return void function(n){const l=r({width:L-G,height:I,...o},{value:`${n.title}`,...i,...n.style||{}},{left:G,top:E.originY}),s=[];if(n.showScale||n.showNumber){const{lineXMain:i,textLeft:o}=J(n.position,G,L-G),l=n.list.length;n.list.forEach(((r,u)=>{let h=E.endY-u*C*n.spaceGridNumber;0===u&&(h=N-5);const a=0===u||u===l-1;if(!n.showNumber||a&&!n.showMaxMinNumber||s.push(B(r,n,o,h)),n.showScale&&0!==u){const[o,l]=i,r=new t.Line([o,h,l,h],{...e,...n.style});s.push(r)}}))}h.value.add(l,...s),l.sendToBack()}(l);const p=[];function w(i){const n=new t.Line(i,{...e,...l.style});p.push(n)}const y=0===s?d:f,v=0===s?a:d+a+(s-1)*f,S=s>0?new t.Line([v,k.originY,v,k.endY],{...e}):null;S&&p.push(S);const b=v+y/2,m=l.spaceGridNumber||5;if(l.showScale||l.showNumber){const t=m*C/5,e=l.position||"center",{lineXMain:i,lineXSub:n,textLeft:o}=J(l.position,v,y),r=null==(u=l.list)?void 0:u.length;null==(c=null==l?void 0:l.list)||c.forEach(((s,u)=>{const h=k.endY-u*C*m,a=0===u||u===r-1;if(l.showNumber&&(!a||l.showMaxMinNumber)){const t=0==u?h-5:h,e=B(s,l,o,t),i=k.originY+e.height/2;t<i&&e.set({top:i}),p.push(e)}if(l.showScale&&u!==r-1)for(let o=0;o<5;o++)if(o>0||!l.showNumber||"center"!==e){const e=0==o?i[0]:n[0],l=0==o?i[1]:n[1],s=h-o*t;s>k.originY&&(w([e,s,l,s]),u==r-2&&4==o&&w([i[0],s-t,i[1],s-t]))}}))}let Y=l.title||"";l.unit&&(Y+="\n"+l.unit),Y&&p.push(new t.Text(String(Y),{...i,left:b,top:k.originY+C*m/2,textAlign:"center",...l.style}));const x=new t.Group(p,{...n,objectCaching:!1});g.push(x)})),g.push(new t.Rect({...o,width:"right"===u?c-a-1:c-a,height:"right"===u?N-T-1:N-T,left:a,top:T,originX:"left",originY:"top"}));const w=g.length>0?new t.Group([...g],{...n,objectCaching:!1}):null;w&&h.value.add(w),w&&w.sendToBack()}function q(t){return t.left>=L&&t.left<M&&t.top>=T&&t.top<=N}G&&function(){const e=JSON.parse(JSON.stringify(H));let i=N;const o=G-j.icons.marginRight;e.reverse().forEach((e=>{i-=10;let r=e.title.replace(/(.{2})/g,"$1\n");r.endsWith("\n")&&(r=r.slice(0,r.length-1));const f=new t.Text(String(r),{...n,objectCaching:!1,...e.titleStyle||{},originX:"right",originY:"bottom",left:o-(e.pointAttr.width||10)-5,top:i,lineHeight:1,fontSize:12}),d=l(e.type,{left:o,top:i-(f.height||30)/2-1,...e.pointAttr,originY:"center",originX:"right",origin:{title:e.title,unit:e.unit,type:s(e.bigType),_type:e.bigType,dataIndex:e.dataIndex,key:e.key,isMenu:!0},originLeft:o,originTop:i-(f.height||30)/2-1,...a.event});var b;i-=f.height||30,(b=d).on("moving",(()=>{b.set("originX","center"),function(t){if(t.left>=L&&t.left<=M){t.setCoords();const e="pain"===t.origin.type?E:k;t.top<e.originY&&t.set("top",e.originY),t.top>e.endY&&t.set("top",e.endY)}}(b),q(b)?g(b):p.show=!1})),b.on("mouseup:before",(t=>{if(p.show=!1,0===t.e.button&&q(b)){const t=x(b.left,"_type",V).includes(b.origin._type),e=v(b.left);if(!e||t)t&&e&&X();else{const t={data:{time:w(b.left),value:y(b.origin.type,b.top),...u(b.origin.type)?{key:b.origin.key}:{}},...b.origin};c("add",t),S(t)}}!function(t){t.setCoords().set({originX:"right",left:t.originLeft,top:t.originTop})}(b)})),h.value.add(f,d)}))}();const z=j.yScaleValue.filter((t=>"left"===t.layout&&"pain"!==t.type&&t.show));if((null==R?void 0:R.width)&&"left"===(null==(m=null==R?void 0:R.yScaleValue)?void 0:m.layout)&&(null==(Y=null==R?void 0:R.yScaleValue)?void 0:Y.show)&&z.push(_),O>0&&j.yScaleValue[O].show){const t=j.yScaleValue[O];0===O&&j.yScaleValue.length>1&&z.unshift(t),O==j.yScaleValue.length-1&&z.push(t)}const D=z.findIndex((t=>"pulse"===t.type&&t.show&&t.doubleShow)),F=z[D];return D>-1&&z.splice(D,0,{...F,title:(null==F?void 0:F.doubleTitle)||(null==F?void 0:F.title)}),$(z),h.value.add(new t.Rect({left:G,top:0,width:W-G-1,height:A-1,fill:"transparent",...e})),{drawScaleValue:$}}export{h as useLeft};
1
+ import{fabric as t}from"../utils/index.js";import{defaultBorderStyle as e,defaultTextStyle as i,defaultStyle as n,defaultRectStyle as o,drawPoint as l,drawTextGroup as r}from"./useDraw.js";import{getType as s,isOneLine as h}from"../utils/utils.js";function u(u,a,g,c,p,f,d,y,w,v,S,m){var b,Y;const{getEqualXTypes:x,repeatTip:X}=m,{originY:N,endY:T,originX:L,endX:M,xCellWidth:V,yCellHeight:C,left:j,vitalSignsOriginY:k,painOriginY:E,painHeight:G,iconsWidth:H,itemList:I,painIndex:O,right:R,canvasWidth:W,canvasHeight:A,getRightInfo:_}=a;function B(e,n,o,l){const{position:r}=n;return new t.Text(String(e),{...i,originX:"left"==r?"right":"right"==r?"left":"center",left:o,top:l,...n.style})}function J(t="center",e,i){let n=e+i/2,o=[n-4.5,n+4.5],l=[n-2.5,n+2.5],r=n;return"right"===t&&(n=e,o=[n,n+9],l=[n,n+5],r=o[1]),"left"===t&&(n=e+i,o=[n-9,n],l=[n-5,n],r=o[0]),{lineXMain:o,lineXSub:l,textLeft:r}}function $(l){var s;if(!(null==l?void 0:l.length))return;const{layout:h}=l[0];let a=H,g=L;"right"===h&&(a=M,g=M+(null!=(s=null==R?void 0:R.width)?s:0));const c=[],p=G&&"right"!==h?l.length-1:l.length,f=(g-a)/p,d=f+(g-a)%p;l.forEach(((l,s)=>{var h,g;if("pain"===l.type)return void function(n){const l=r({width:L-H,height:G,...o},{value:`${n.title}`,...i,...n.style||{}},{left:H,top:E.originY}),s=[];if(n.showScale||n.showNumber){const{lineXMain:i,textLeft:o}=J(n.position,H,L-H),l=n.list.length;n.list.forEach(((r,h)=>{let u=E.endY-h*C*n.spaceGridNumber;0===h&&(u=T-5);const a=0===h||h===l-1;if(!n.showNumber||a&&!n.showMaxMinNumber||s.push(B(r,n,o,u)),n.showScale&&0!==h){const[o,l]=i,r=new t.Line([o,u,l,u],{...e,...n.style});s.push(r)}}))}u.value.add(l,...s),l.sendToBack()}(l);const p=[];function y(i){const n=new t.Line(i,{...e,...l.style});p.push(n)}const w=0===s?d:f,v=0===s?a:d+a+(s-1)*f,S=s>0?new t.Line([v,k.originY,v,k.endY],{...e}):null;S&&p.push(S);const m=v+w/2,b=l.spaceGridNumber||5;if(l.showScale||l.showNumber){const t=b*C/5,e=l.position||"center",{lineXMain:i,lineXSub:n,textLeft:o}=J(l.position,v,w),r=null==(h=l.list)?void 0:h.length;null==(g=null==l?void 0:l.list)||g.forEach(((s,h)=>{const u=k.endY-h*C*b,a=0===h||h===r-1;if(l.showNumber&&(!a||l.showMaxMinNumber)){const t=0==h?u-5:u,e=B(s,l,o,t),i=k.originY+e.height/2;t<i&&e.set({top:i}),p.push(e)}if(l.showScale&&h!==r-1)for(let o=0;o<5;o++)if(o>0||!l.showNumber||"center"!==e){const e=0==o?i[0]:n[0],l=0==o?i[1]:n[1],s=u-o*t;s>k.originY&&(y([e,s,l,s]),h==r-2&&4==o&&y([i[0],s-t,i[1],s-t]))}}))}let Y=l.title||"";l.unit&&(Y+="\n"+l.unit),Y&&p.push(new t.Text(String(Y),{...i,left:m,top:k.originY+C*b/2,textAlign:"center",...l.style}));const x=new t.Group(p,{...n,objectCaching:!1});c.push(x)})),c.push(new t.Rect({...o,width:"right"===h?g-a-1:g-a,height:"right"===h?T-N-1:T-N,left:a,top:N,originX:"left",originY:"top"}));const y=c.length>0?new t.Group([...c],{...n,objectCaching:!1}):null;y&&u.value.add(y),y&&y.sendToBack()}function q(t){return t.left>=L&&t.left<M&&t.top>=N&&t.top<=T}H&&function(){const e=JSON.parse(JSON.stringify(I));let i=T;const o=H-j.icons.marginRight;e.reverse().forEach((e=>{i-=10;let r=e.title.replace(/(.{2})/g,"$1\n");r.endsWith("\n")&&(r=r.slice(0,r.length-1));const f=new t.Text(String(r),{...n,objectCaching:!1,...e.titleStyle||{},originX:"right",originY:"bottom",left:o-(e.pointAttr.width||10)-5,top:i,lineHeight:1,fontSize:12}),d=l(e.type,{left:o,top:i-(f.height||30)/2-1,...e.pointAttr,originY:"center",originX:"right",origin:{title:e.title,unit:e.unit,type:s(e.bigType),_type:e.bigType,dataIndex:e.dataIndex,key:e.key,isMenu:!0},originLeft:o,originTop:i-(f.height||30)/2-1,...a.event});var m;i-=f.height||30,(m=d).on("moving",(()=>{m.set("originX","center"),function(t){if(t.left>=L&&t.left<=M){t.setCoords();const e="pain"===t.origin.type?E:k;t.top<e.originY&&t.set("top",e.originY),t.top>e.endY&&t.set("top",e.endY)}}(m),q(m)?c(m):p.show=!1})),m.on("mouseup:before",(t=>{if(p.show=!1,0===t.e.button&&q(m)){const t=x(m.left,"_type",V).includes(m.origin._type),e=v(m.left);if(!e||t)t&&e&&X();else{const t={data:{time:y(m.left),value:w(m.origin.type,m.top),...h(m.origin.type)?{key:m.origin.key}:{}},...m.origin};g("add",t),S(t)}}!function(t){t.setCoords().set({originX:"right",left:t.originLeft,top:t.originTop})}(m)})),u.value.add(f,d)}))}();const z=j.yScaleValue.filter((t=>"left"===t.layout&&"pain"!==t.type&&t.show));if((null==R?void 0:R.width)&&"left"===(null==(b=null==R?void 0:R.yScaleValue)?void 0:b.layout)&&(null==(Y=null==R?void 0:R.yScaleValue)?void 0:Y.show)&&z.push(_),O>0&&j.yScaleValue[O].show){const t=j.yScaleValue[O];0===O&&j.yScaleValue.length>1&&z.unshift(t),O==j.yScaleValue.length-1&&z.push(t)}return $(z),u.value.add(new t.Rect({left:H,top:0,width:W-H-1,height:A-1,fill:"transparent",...e})),{drawScaleValue:$}}export{u as useLeft};
@@ -23,7 +23,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
23
23
  label: string;
24
24
  value: string;
25
25
  }[];
26
- emit: (event: "reset" | "onSave" | "onClose", ...args: any[]) => void;
26
+ emit: (event: "onSave" | "onClose" | "reset", ...args: any[]) => void;
27
27
  settingView: any;
28
28
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
29
29
  fields: {
@@ -221,7 +221,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
221
221
  modelValue: unknown[];
222
222
  componentData: Record<string, any>;
223
223
  }>;
224
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("reset" | "onSave" | "onClose")[], "reset" | "onSave" | "onClose", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
224
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onSave" | "onClose" | "reset")[], "onSave" | "onClose" | "reset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
225
225
  fields: {
226
226
  type: import("vue").PropType<any[]>;
227
227
  default: () => never[];
@@ -51,7 +51,7 @@ declare const _default: import("vue").DefineComponent<{
51
51
  label: string;
52
52
  value: string;
53
53
  }[];
54
- emit: (event: "reset" | "onSave" | "onClose", ...args: any[]) => void;
54
+ emit: (event: "onSave" | "onClose" | "reset", ...args: any[]) => void;
55
55
  settingView: any;
56
56
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
57
57
  fields: {
@@ -172,7 +172,7 @@ declare const _default: import("vue").DefineComponent<{
172
172
  modelValue: unknown[];
173
173
  componentData: Record<string, any>;
174
174
  }>;
175
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("reset" | "onSave" | "onClose")[], "reset" | "onSave" | "onClose", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
175
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onSave" | "onClose" | "reset")[], "onSave" | "onClose" | "reset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
176
176
  fields: {
177
177
  type: PropType<any[]>;
178
178
  default: () => never[];
@@ -30,7 +30,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
30
30
  };
31
31
  }>> & {}>>;
32
32
  uuid: string;
33
- cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
34
33
  getCommonConfig: (formConfig?: import("./src/types").FormConfigItem | undefined) => {
35
34
  move: ({ to, from, dragged }: import("sortablejs").MoveEvent) => false | undefined;
36
35
  onChoose: ({ target, item }: import("sortablejs").SortableEvent) => void;
@@ -60,7 +59,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
60
59
  originalSetting?: {
61
60
  [x: string]: any;
62
61
  val_key: string;
63
- html_type: "LINEBAR" | ({} & string) | "INPUT" | "SELECT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "DATE" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "COMBINATION" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
62
+ html_type: "LINEBAR" | "DATE" | "SELECT" | ({} & string) | "COMBINATION" | "INPUT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
64
63
  annotation?: boolean | undefined;
65
64
  val_key_unit?: string | undefined;
66
65
  is_edit?: import("..").FormCommonState | undefined;
@@ -1753,7 +1752,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
1753
1752
  originalSetting?: {
1754
1753
  [x: string]: any;
1755
1754
  val_key: string;
1756
- html_type: "LINEBAR" | ({} & string) | "INPUT" | "SELECT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "DATE" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "COMBINATION" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
1755
+ html_type: "LINEBAR" | "DATE" | "SELECT" | ({} & string) | "COMBINATION" | "INPUT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
1757
1756
  annotation?: boolean | undefined;
1758
1757
  val_key_unit?: string | undefined;
1759
1758
  is_edit?: import("..").FormCommonState | undefined;
@@ -3944,30 +3943,35 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
3944
3943
  data: any;
3945
3944
  loading: boolean;
3946
3945
  required: boolean;
3947
- hidden: boolean;
3948
- visible: boolean;
3949
- content: any;
3950
- reset: (options?: import("@formily/core").IFieldResetOptions | undefined) => Promise<void>;
3951
- active: boolean;
3952
- disabled: boolean;
3953
- display: import("@formily/core").FieldDisplayTypes;
3954
3946
  value: string;
3955
3947
  readonly index: string | number;
3948
+ disabled: boolean;
3956
3949
  onFocus: (...args: any[]) => Promise<void>;
3957
3950
  onBlur: (...args: any[]) => Promise<void>;
3958
3951
  onInput: (...args: any[]) => Promise<void>;
3952
+ reset: (options?: import("@formily/core").IFieldResetOptions | undefined) => Promise<void>;
3953
+ visible: boolean;
3959
3954
  submit: <T_2>(onSubmit?: ((values: any) => void | Promise<T_2>) | undefined) => Promise<T_2>;
3960
3955
  validator: import("@formily/core").FieldValidator;
3961
3956
  pattern: import("@formily/core").FieldPatternTypes;
3962
3957
  title: string;
3963
3958
  form: import("@formily/core").Form<any>;
3959
+ content: any;
3960
+ hidden: boolean;
3961
+ active: boolean;
3962
+ dataSource: import("@formily/core").FieldDataSource;
3963
+ description: string;
3964
+ display: import("@formily/core").FieldDisplayTypes;
3965
+ mounted: boolean;
3966
+ readonly destroyed: boolean;
3967
+ unmounted: boolean;
3964
3968
  componentProps: Record<string, any>;
3965
3969
  decoratorProps: Record<string, any>;
3966
- description: string;
3967
3970
  readOnly: boolean;
3968
3971
  editable: boolean;
3969
3972
  component: import("@formily/core").FieldComponent<any, any>;
3970
3973
  decorator: import("@formily/core").FieldDecorator<any, any>;
3974
+ readPretty: boolean;
3971
3975
  validating: boolean;
3972
3976
  submitting: boolean;
3973
3977
  visited: boolean;
@@ -3975,7 +3979,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
3975
3979
  modified: boolean;
3976
3980
  inputValue: string;
3977
3981
  inputValues: any[];
3978
- dataSource: import("@formily/core").FieldDataSource;
3979
3982
  feedbacks: import("@formily/core").IFieldFeedback[];
3980
3983
  caches: import("@formily/core").IFieldCaches;
3981
3984
  selfErrors: import("@formily/core").FeedbackMessage;
@@ -4006,15 +4009,11 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
4006
4009
  queryFeedbacks: (search?: import("@formily/core").ISearchFeedback | undefined) => import("@formily/core").IFieldFeedback[];
4007
4010
  modify: () => void;
4008
4011
  initialized: boolean;
4009
- mounted: boolean;
4010
- unmounted: boolean;
4011
4012
  decoratorType: any;
4012
4013
  componentType: any;
4013
4014
  designable: boolean;
4014
4015
  locate: (address: import("@formily/path").Pattern) => void;
4015
4016
  readonly parent: import("@formily/core").GeneralField;
4016
- readPretty: boolean;
4017
- readonly destroyed: boolean;
4018
4017
  setTitle: (title?: string | undefined) => void;
4019
4018
  setDescription: (description?: string | undefined) => void;
4020
4019
  setDisplay: (type?: import("@formily/core").FieldDisplayTypes | undefined) => void;
@@ -4056,7 +4055,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
4056
4055
  };
4057
4056
  readonly disabled: BooleanConstructor;
4058
4057
  readonly displayDirective: {
4059
- readonly type: import("vue").PropType<"show" | "if" | "show:lazy">;
4058
+ readonly type: import("vue").PropType<"if" | "show" | "show:lazy">;
4060
4059
  readonly default: "if";
4061
4060
  };
4062
4061
  readonly closable: {
@@ -4081,7 +4080,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
4081
4080
  };
4082
4081
  readonly disabled: BooleanConstructor;
4083
4082
  readonly displayDirective: {
4084
- readonly type: import("vue").PropType<"show" | "if" | "show:lazy">;
4083
+ readonly type: import("vue").PropType<"if" | "show" | "show:lazy">;
4085
4084
  readonly default: "if";
4086
4085
  };
4087
4086
  readonly closable: {
@@ -4095,7 +4094,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
4095
4094
  }>>, {
4096
4095
  readonly disabled: boolean;
4097
4096
  readonly closable: boolean | undefined;
4098
- readonly displayDirective: "show" | "if" | "show:lazy";
4097
+ readonly displayDirective: "if" | "show" | "show:lazy";
4099
4098
  }>;
4100
4099
  NTabs: any;
4101
4100
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "formChange" | "annotationChange")[], "scroll" | "formChange" | "annotationChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -4377,7 +4376,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
4377
4376
  fieldList: import("vue").Ref<{
4378
4377
  [x: string]: any;
4379
4378
  val_key: string;
4380
- html_type: "LINEBAR" | ({} & string) | "INPUT" | "SELECT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "DATE" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "COMBINATION" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
4379
+ html_type: "LINEBAR" | "DATE" | "SELECT" | ({} & string) | "COMBINATION" | "INPUT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
4381
4380
  annotation?: boolean | undefined;
4382
4381
  val_key_unit?: string | undefined;
4383
4382
  is_edit?: import("..").FormCommonState | undefined;
@@ -6083,7 +6082,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
6083
6082
  originalSetting?: {
6084
6083
  [x: string]: any;
6085
6084
  val_key: string;
6086
- html_type: "LINEBAR" | ({} & string) | "INPUT" | "SELECT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "DATE" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "COMBINATION" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
6085
+ html_type: "LINEBAR" | "DATE" | "SELECT" | ({} & string) | "COMBINATION" | "INPUT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
6087
6086
  annotation?: boolean | undefined;
6088
6087
  val_key_unit?: string | undefined;
6089
6088
  is_edit?: import("..").FormCommonState | undefined;
@@ -7760,7 +7759,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
7760
7759
  originalSetting?: {
7761
7760
  [x: string]: any;
7762
7761
  val_key: string;
7763
- html_type: "LINEBAR" | ({} & string) | "INPUT" | "SELECT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "DATE" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "COMBINATION" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
7762
+ html_type: "LINEBAR" | "DATE" | "SELECT" | ({} & string) | "COMBINATION" | "INPUT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
7764
7763
  annotation?: boolean | undefined;
7765
7764
  val_key_unit?: string | undefined;
7766
7765
  is_edit?: import("..").FormCommonState | undefined;
@@ -9862,30 +9861,35 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
9862
9861
  data: any;
9863
9862
  loading: boolean;
9864
9863
  required: boolean;
9865
- hidden: boolean;
9866
- visible: boolean;
9867
- content: any;
9868
- reset: (options?: import("@formily/core").IFieldResetOptions | undefined) => Promise<void>;
9869
- active: boolean;
9870
- disabled: boolean;
9871
- display: import("@formily/core").FieldDisplayTypes;
9872
9864
  value: string;
9873
9865
  readonly index: string | number;
9866
+ disabled: boolean;
9874
9867
  onFocus: (...args: any[]) => Promise<void>;
9875
9868
  onBlur: (...args: any[]) => Promise<void>;
9876
9869
  onInput: (...args: any[]) => Promise<void>;
9870
+ reset: (options?: import("@formily/core").IFieldResetOptions | undefined) => Promise<void>;
9871
+ visible: boolean;
9877
9872
  submit: <T_2>(onSubmit?: ((values: any) => void | Promise<T_2>) | undefined) => Promise<T_2>;
9878
9873
  validator: import("@formily/core").FieldValidator;
9879
9874
  pattern: import("@formily/core").FieldPatternTypes;
9880
9875
  title: string;
9881
9876
  form: import("@formily/core").Form<any>;
9877
+ content: any;
9878
+ hidden: boolean;
9879
+ active: boolean;
9880
+ dataSource: import("@formily/core").FieldDataSource;
9881
+ description: string;
9882
+ display: import("@formily/core").FieldDisplayTypes;
9883
+ mounted: boolean;
9884
+ readonly destroyed: boolean;
9885
+ unmounted: boolean;
9882
9886
  componentProps: Record<string, any>;
9883
9887
  decoratorProps: Record<string, any>;
9884
- description: string;
9885
9888
  readOnly: boolean;
9886
9889
  editable: boolean;
9887
9890
  component: import("@formily/core").FieldComponent<any, any>;
9888
9891
  decorator: import("@formily/core").FieldDecorator<any, any>;
9892
+ readPretty: boolean;
9889
9893
  validating: boolean;
9890
9894
  submitting: boolean;
9891
9895
  visited: boolean;
@@ -9893,7 +9897,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
9893
9897
  modified: boolean;
9894
9898
  inputValue: string;
9895
9899
  inputValues: any[];
9896
- dataSource: import("@formily/core").FieldDataSource;
9897
9900
  feedbacks: import("@formily/core").IFieldFeedback[];
9898
9901
  caches: import("@formily/core").IFieldCaches;
9899
9902
  selfErrors: import("@formily/core").FeedbackMessage;
@@ -9924,15 +9927,11 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
9924
9927
  queryFeedbacks: (search?: import("@formily/core").ISearchFeedback | undefined) => import("@formily/core").IFieldFeedback[];
9925
9928
  modify: () => void;
9926
9929
  initialized: boolean;
9927
- mounted: boolean;
9928
- unmounted: boolean;
9929
9930
  decoratorType: any;
9930
9931
  componentType: any;
9931
9932
  designable: boolean;
9932
9933
  locate: (address: import("@formily/path").Pattern) => void;
9933
9934
  readonly parent: import("@formily/core").GeneralField;
9934
- readPretty: boolean;
9935
- readonly destroyed: boolean;
9936
9935
  setTitle: (title?: string | undefined) => void;
9937
9936
  setDescription: (description?: string | undefined) => void;
9938
9937
  setDisplay: (type?: import("@formily/core").FieldDisplayTypes | undefined) => void;
@@ -9974,7 +9973,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
9974
9973
  };
9975
9974
  readonly disabled: BooleanConstructor;
9976
9975
  readonly displayDirective: {
9977
- readonly type: import("vue").PropType<"show" | "if" | "show:lazy">;
9976
+ readonly type: import("vue").PropType<"if" | "show" | "show:lazy">;
9978
9977
  readonly default: "if";
9979
9978
  };
9980
9979
  readonly closable: {
@@ -9999,7 +9998,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
9999
9998
  };
10000
9999
  readonly disabled: BooleanConstructor;
10001
10000
  readonly displayDirective: {
10002
- readonly type: import("vue").PropType<"show" | "if" | "show:lazy">;
10001
+ readonly type: import("vue").PropType<"if" | "show" | "show:lazy">;
10003
10002
  readonly default: "if";
10004
10003
  };
10005
10004
  readonly closable: {
@@ -10013,7 +10012,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
10013
10012
  }>>, {
10014
10013
  readonly disabled: boolean;
10015
10014
  readonly closable: boolean | undefined;
10016
- readonly displayDirective: "show" | "if" | "show:lazy";
10015
+ readonly displayDirective: "if" | "show" | "show:lazy";
10017
10016
  }>;
10018
10017
  NTabs: any;
10019
10018
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "formChange" | "annotationChange")[], "scroll" | "formChange" | "annotationChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -10174,19 +10173,11 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
10174
10173
  type: import("vue").PropType<import("./src/types").FormConfigItem>;
10175
10174
  required: true;
10176
10175
  };
10177
- textFormatter: {
10178
- type: import("vue").PropType<import("./src/types").FormConfigTextFormatter>;
10179
- required: true;
10180
- };
10181
10176
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
10182
10177
  formConfigItem: {
10183
10178
  type: import("vue").PropType<import("./src/types").FormConfigItem>;
10184
10179
  required: true;
10185
10180
  };
10186
- textFormatter: {
10187
- type: import("vue").PropType<import("./src/types").FormConfigTextFormatter>;
10188
- required: true;
10189
- };
10190
10181
  }>>, {}>;
10191
10182
  FORM_CONFIG_GROUP: string;
10192
10183
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{