cnhis-design-vue 3.2.3-beta.2 → 3.2.3-beta.22

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 (354) hide show
  1. package/README.md +87 -87
  2. package/es/components/biunique-chat/index.d.ts +26 -3
  3. package/es/components/biunique-chat/src/Index.vue.d.ts +26 -3
  4. package/es/components/biunique-chat/src/Index.vue2.js +1 -1
  5. package/es/components/biunique-chat/src/components/ChatFooter.vue2.js +1 -1
  6. package/es/components/biunique-chat/src/components/ChatHeader.vue.d.ts +2 -0
  7. package/es/components/biunique-chat/src/components/ChatMain.vue.d.ts +10 -3
  8. package/es/components/biunique-chat/src/components/ChatMain.vue2.js +1 -1
  9. package/es/components/biunique-chat/src/components/ChatRecord.vue.d.ts +2 -0
  10. package/es/components/biunique-chat/src/components/MessageTemplate.vue.d.ts +2 -1
  11. package/es/components/biunique-chat/src/components/MessageTemplate.vue2.js +1 -1
  12. package/es/components/biunique-chat/src/components/SiderList.vue2.js +1 -1
  13. package/es/components/biunique-chat/src/hooks/useScrollLoading.d.ts +2 -0
  14. package/es/components/biunique-chat/src/hooks/useScrollLoading.js +1 -0
  15. package/es/components/biunique-chat/src/hooks/useSession.d.ts +1 -0
  16. package/es/components/biunique-chat/src/hooks/useSession.js +1 -1
  17. package/es/components/biunique-chat/src/hooks/useState.js +1 -1
  18. package/es/components/biunique-chat/src/utils/index.d.ts +1 -1
  19. package/es/components/biunique-chat/src/utils/index.js +1 -1
  20. package/es/components/biunique-chat/style/index.css +1 -1
  21. package/es/components/button-print/index.d.ts +5 -2
  22. package/es/components/button-print/src/ButtonPrint.vue.d.ts +5 -2
  23. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  24. package/es/components/button-print/src/utils/print.d.ts +2 -2
  25. package/es/components/button-print/src/utils/print.js +1 -1
  26. package/es/components/callback/src/components/render/popupMaps.d.ts +44 -0
  27. package/es/components/classification/index.d.ts +6 -0
  28. package/es/components/classification/src/components/search-filter/index.vue.d.ts +6 -0
  29. package/es/components/classification/src/components/set-classification/index.vue.d.ts +6 -0
  30. package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
  31. package/es/components/classification/src/index.vue.d.ts +9 -3
  32. package/es/components/date-picker/index.d.ts +2 -0
  33. package/es/components/date-picker/src/DatePicker.vue.d.ts +2 -0
  34. package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
  35. package/es/components/fabric-chart/index.d.ts +123 -22
  36. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +115 -26
  37. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
  38. package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
  39. package/es/components/fabric-chart/src/components/PopupTip.vue.d.ts +79 -19
  40. package/es/components/fabric-chart/src/components/PopupTip.vue2.js +1 -1
  41. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  42. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  43. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  44. package/es/components/fabric-chart/src/hooks/index.d.ts +1 -0
  45. package/es/components/fabric-chart/src/hooks/index.js +1 -1
  46. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcess.d.ts +7 -0
  47. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcess.js +1 -0
  48. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.d.ts +10 -0
  49. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.js +1 -0
  50. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +1 -1
  51. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  52. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
  53. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
  54. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts +1 -1
  55. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  56. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
  57. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  58. package/es/components/fabric-chart/src/interface.d.ts +7 -3
  59. package/es/components/fabric-chart/style/index.css +1 -1
  60. package/es/components/field-set/src/FieldColor.vue.d.ts +4 -0
  61. package/es/components/field-set/src/components/condition.vue.d.ts +2 -0
  62. package/es/components/field-set/src/components/edit-dialog.vue.d.ts +4 -0
  63. package/es/components/field-set/src/components/edit-filter.vue.d.ts +2 -0
  64. package/es/components/form-config/index.d.ts +123 -0
  65. package/es/components/form-config/src/FormConfig.vue.d.ts +123 -0
  66. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +42 -0
  67. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +60 -0
  68. package/es/components/form-render/index.d.ts +42 -0
  69. package/es/components/form-render/src/FormRender.vue.d.ts +42 -0
  70. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  71. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +42 -0
  72. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +144 -2
  73. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue2.js +1 -1
  74. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +143 -2
  75. package/es/components/form-render/src/components/renderer/simpleComponent.js +1 -1
  76. package/es/components/form-render/src/components/renderer/textarea.d.ts +6 -0
  77. package/es/components/form-render/src/components/renderer/textarea.js +1 -1
  78. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  79. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +6 -0
  80. package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
  81. package/es/components/form-render/src/hooks/useFieldVisitor.js +1 -1
  82. package/es/components/form-render/src/types/fieldItem.d.ts +3 -0
  83. package/es/components/form-render/src/types/index.d.ts +3 -0
  84. package/es/components/form-render/style/index.css +1 -1
  85. package/es/components/guide/src/renderer.d.ts +2 -2
  86. package/es/components/iho-table/index.d.ts +2 -0
  87. package/es/components/iho-table/src/IhoTable.vue.d.ts +2 -0
  88. package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
  89. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +2 -0
  90. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +2 -0
  91. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  92. package/es/components/iho-table/src/plugins/verticalTablePlugin/index.js +1 -1
  93. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/index.d.ts +1 -24
  94. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/index.js +1 -1
  95. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useCurrentColumn.js +1 -1
  96. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useEditCell.js +1 -1
  97. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useEventConvert.js +1 -1
  98. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useTriggerRow.js +1 -1
  99. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/renderer.js +1 -1
  100. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.d.ts +21 -0
  101. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.js +1 -1
  102. package/es/components/iho-table/src/types/index.d.ts +1 -0
  103. package/es/components/iho-table/style/index.css +1 -1
  104. package/es/components/index.css +1 -1
  105. package/es/components/index.js +1 -1
  106. package/es/components/info-header/index.d.ts +99 -0
  107. package/es/components/info-header/src/InfoHeader.vue.d.ts +99 -0
  108. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +3 -0
  109. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +3 -0
  110. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +45 -0
  111. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +42 -0
  112. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  113. package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +1 -1
  114. package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
  115. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  116. package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
  117. package/es/components/shortcut-setter/index.d.ts +45 -0
  118. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +45 -0
  119. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +2 -0
  120. package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +2 -0
  121. package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +2 -0
  122. package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +2 -0
  123. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +4 -0
  124. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +2 -0
  125. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +2 -0
  126. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +4 -0
  127. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +4 -0
  128. package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +2 -0
  129. package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +2 -0
  130. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +2 -0
  131. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +2 -0
  132. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +8 -0
  133. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +8 -0
  134. package/es/env.d.ts +25 -25
  135. package/es/shared/assets/img/emoji/emotion_001.png.js +1 -1
  136. package/es/shared/assets/img/emoji/emotion_002.png.js +1 -1
  137. package/es/shared/assets/img/emoji/emotion_003.png.js +1 -1
  138. package/es/shared/assets/img/emoji/emotion_004.png.js +1 -1
  139. package/es/shared/assets/img/emoji/emotion_005.png.js +1 -1
  140. package/es/shared/assets/img/emoji/emotion_006.png.js +1 -1
  141. package/es/shared/assets/img/emoji/emotion_007.png.js +1 -1
  142. package/es/shared/assets/img/emoji/emotion_008.png.js +1 -1
  143. package/es/shared/assets/img/emoji/emotion_009.png.js +1 -1
  144. package/es/shared/assets/img/emoji/emotion_010.png.js +1 -1
  145. package/es/shared/assets/img/emoji/emotion_011.png.js +1 -1
  146. package/es/shared/assets/img/emoji/emotion_012.png.js +1 -1
  147. package/es/shared/assets/img/emoji/emotion_013.png.js +1 -1
  148. package/es/shared/assets/img/emoji/emotion_014.png.js +1 -1
  149. package/es/shared/assets/img/emoji/emotion_015.png.js +1 -1
  150. package/es/shared/assets/img/emoji/emotion_016.png.js +1 -1
  151. package/es/shared/assets/img/emoji/emotion_017.png.js +1 -1
  152. package/es/shared/assets/img/emoji/emotion_018.png.js +1 -1
  153. package/es/shared/assets/img/emoji/emotion_019.png.js +1 -1
  154. package/es/shared/assets/img/emoji/emotion_020.png.js +1 -1
  155. package/es/shared/assets/img/emoji/emotion_021.png.js +1 -1
  156. package/es/shared/assets/img/emoji/emotion_022.png.js +1 -1
  157. package/es/shared/assets/img/emoji/emotion_023.png.js +1 -1
  158. package/es/shared/assets/img/emoji/emotion_024.png.js +1 -1
  159. package/es/shared/assets/img/emoji/emotion_025.png.js +1 -1
  160. package/es/shared/assets/img/emoji/emotion_026.png.js +1 -1
  161. package/es/shared/assets/img/emoji/emotion_027.png.js +1 -1
  162. package/es/shared/assets/img/emoji/emotion_028.png.js +1 -1
  163. package/es/shared/assets/img/emoji/emotion_029.png.js +1 -1
  164. package/es/shared/assets/img/emoji/emotion_030.png.js +1 -1
  165. package/es/shared/assets/img/emoji/emotion_031.png.js +1 -1
  166. package/es/shared/assets/img/emoji/emotion_032.png.js +1 -1
  167. package/es/shared/assets/img/emoji/emotion_033.png.js +1 -1
  168. package/es/shared/assets/img/emoji/emotion_034.png.js +1 -1
  169. package/es/shared/assets/img/emoji/emotion_035.png.js +1 -1
  170. package/es/shared/assets/img/emoji/emotion_036.png.js +1 -1
  171. package/es/shared/assets/img/emoji/emotion_037.png.js +1 -1
  172. package/es/shared/assets/img/emoji/emotion_038.png.js +1 -1
  173. package/es/shared/assets/img/emoji/emotion_039.png.js +1 -1
  174. package/es/shared/assets/img/emoji/emotion_040.png.js +1 -1
  175. package/es/shared/assets/img/emoji/emotion_041.png.js +1 -1
  176. package/es/shared/assets/img/emoji/emotion_042.png.js +1 -1
  177. package/es/shared/assets/img/emoji/emotion_043.png.js +1 -1
  178. package/es/shared/assets/img/emoji/emotion_044.png.js +1 -1
  179. package/es/shared/assets/img/emoji/emotion_045.png.js +1 -1
  180. package/es/shared/assets/img/emoji/emotion_046.png.js +1 -1
  181. package/es/shared/assets/img/emoji/emotion_047.png.js +1 -1
  182. package/es/shared/assets/img/emoji/emotion_048.png.js +1 -1
  183. package/es/shared/assets/img/emoji/emotion_049.png.js +1 -1
  184. package/es/shared/assets/img/emoji/emotion_050.png.js +1 -1
  185. package/es/shared/assets/img/emoji/emotion_051.png.js +1 -1
  186. package/es/shared/assets/img/emoji/emotion_052.png.js +1 -1
  187. package/es/shared/assets/img/emoji/emotion_053.png.js +1 -1
  188. package/es/shared/assets/img/emoji/emotion_054.png.js +1 -1
  189. package/es/shared/assets/img/emoji/emotion_055.png.js +1 -1
  190. package/es/shared/assets/img/emoji/emotion_056.png.js +1 -1
  191. package/es/shared/assets/img/emoji/emotion_057.png.js +1 -1
  192. package/es/shared/assets/img/emoji/emotion_058.png.js +1 -1
  193. package/es/shared/assets/img/emoji/emotion_059.png.js +1 -1
  194. package/es/shared/assets/img/emoji/emotion_060.png.js +1 -1
  195. package/es/shared/assets/img/emoji/emotion_061.png.js +1 -1
  196. package/es/shared/assets/img/emoji/emotion_062.png.js +1 -1
  197. package/es/shared/assets/img/emoji/emotion_063.png.js +1 -1
  198. package/es/shared/assets/img/emoji/emotion_064.png.js +1 -1
  199. package/es/shared/assets/img/emoji/emotion_065.png.js +1 -1
  200. package/es/shared/assets/img/emoji/emotion_066.png.js +1 -1
  201. package/es/shared/assets/img/emoji/emotion_067.png.js +1 -1
  202. package/es/shared/assets/img/emoji/emotion_068.png.js +1 -1
  203. package/es/shared/assets/img/emoji/emotion_069.png.js +1 -1
  204. package/es/shared/assets/img/emoji/emotion_070.png.js +1 -1
  205. package/es/shared/assets/img/emoji/emotion_071.png.js +1 -1
  206. package/es/shared/assets/img/emoji/emotion_072.png.js +1 -1
  207. package/es/shared/assets/img/emoji/emotion_073.png.js +1 -1
  208. package/es/shared/assets/img/emoji/emotion_074.png.js +1 -1
  209. package/es/shared/assets/img/emoji/emotion_075.png.js +1 -1
  210. package/es/shared/assets/img/emoji/emotion_076.png.js +1 -1
  211. package/es/shared/assets/img/emoji/emotion_077.png.js +1 -1
  212. package/es/shared/assets/img/emoji/emotion_078.png.js +1 -1
  213. package/es/shared/assets/img/emoji/emotion_079.png.js +1 -1
  214. package/es/shared/assets/img/emoji/emotion_080.png.js +1 -1
  215. package/es/shared/assets/img/emoji/emotion_081.png.js +1 -1
  216. package/es/shared/assets/img/emoji/emotion_082.png.js +1 -1
  217. package/es/shared/assets/img/emoji/emotion_083.png.js +1 -1
  218. package/es/shared/assets/img/emoji/emotion_084.png.js +1 -1
  219. package/es/shared/assets/img/emoji/emotion_085.png.js +1 -1
  220. package/es/shared/assets/img/emoji/emotion_086.png.js +1 -1
  221. package/es/shared/assets/img/emoji/emotion_087.png.js +1 -1
  222. package/es/shared/assets/img/emoji/emotion_088.png.js +1 -1
  223. package/es/shared/assets/img/emoji/emotion_089.png.js +1 -1
  224. package/es/shared/assets/img/emoji/emotion_090.png.js +1 -1
  225. package/es/shared/assets/img/emoji/emotion_091.png.js +1 -1
  226. package/es/shared/assets/img/emoji/emotion_092.png.js +1 -1
  227. package/es/shared/assets/img/emoji/emotion_093.png.js +1 -1
  228. package/es/shared/assets/img/emoji/emotion_094.png.js +1 -1
  229. package/es/shared/assets/img/emoji/emotion_095.png.js +1 -1
  230. package/es/shared/assets/img/emoji/emotion_096.png.js +1 -1
  231. package/es/shared/assets/img/emoji/emotion_097.png.js +1 -1
  232. package/es/shared/assets/img/emoji/emotion_098.png.js +1 -1
  233. package/es/shared/assets/img/emoji/emotion_099.png.js +1 -1
  234. package/es/shared/assets/img/emoji/emotion_100.png.js +1 -1
  235. package/es/shared/assets/img/emoji/emotion_101.png.js +1 -1
  236. package/es/shared/assets/img/emoji/emotion_102.png.js +1 -1
  237. package/es/shared/assets/img/emoji/emotion_103.png.js +1 -1
  238. package/es/shared/assets/img/emoji/emotion_104.png.js +1 -1
  239. package/es/shared/assets/img/emoji/emotion_105.png.js +1 -1
  240. package/es/shared/assets/img/emoji/emotion_106.png.js +1 -1
  241. package/es/shared/assets/img/emoji/emotion_107.png.js +1 -1
  242. package/es/shared/assets/img/emoji/emotion_108.png.js +1 -1
  243. package/es/shared/assets/img/emoji/emotion_109.png.js +1 -1
  244. package/es/shared/assets/img/emoji/emotion_110.png.js +1 -1
  245. package/es/shared/assets/img/emoji/emotion_111.png.js +1 -1
  246. package/es/shared/assets/img/emoji/emotion_112.png.js +1 -1
  247. package/es/shared/assets/img/emoji/emotion_113.png.js +1 -1
  248. package/es/shared/assets/img/emoji/emotion_114.png.js +1 -1
  249. package/es/shared/assets/img/emoji/emotion_115.png.js +1 -1
  250. package/es/shared/assets/img/emoji/emotion_116.png.js +1 -1
  251. package/es/shared/assets/img/emoji/emotion_117.png.js +1 -1
  252. package/es/shared/assets/img/emoji/emotion_118.png.js +1 -1
  253. package/es/shared/assets/img/emoji/emotion_119.png.js +1 -1
  254. package/es/shared/assets/img/emoji/emotion_120.png.js +1 -1
  255. package/es/shared/assets/img/emoji/emotion_121.png.js +1 -1
  256. package/es/shared/assets/img/emoji/emotion_122.png.js +1 -1
  257. package/es/shared/assets/img/emoji/emotion_123.png.js +1 -1
  258. package/es/shared/assets/img/emoji/emotion_124.png.js +1 -1
  259. package/es/shared/assets/img/emoji/emotion_125.png.js +1 -1
  260. package/es/shared/assets/img/emoji/emotion_126.png.js +1 -1
  261. package/es/shared/assets/img/emoji/emotion_127.png.js +1 -1
  262. package/es/shared/assets/img/emoji/emotion_128.png.js +1 -1
  263. package/es/shared/assets/img/emoji/emotion_129.png.js +1 -1
  264. package/es/shared/assets/img/emoji/emotion_130.png.js +1 -1
  265. package/es/shared/assets/img/emoji/emotion_131.png.js +1 -1
  266. package/es/shared/assets/img/emoji/emotion_132.png.js +1 -1
  267. package/es/shared/assets/img/emoji/emotion_133.png.js +1 -1
  268. package/es/shared/assets/img/emoji/emotion_134.png.js +1 -1
  269. package/es/shared/assets/img/emoji/emotion_135.png.js +1 -1
  270. package/es/shared/assets/img/emoji/emotion_136.png.js +1 -1
  271. package/es/shared/assets/img/emoji/emotion_137.png.js +1 -1
  272. package/es/shared/assets/img/emoji/emotion_138.png.js +1 -1
  273. package/es/shared/assets/img/emoji/emotion_139.png.js +1 -1
  274. package/es/shared/assets/img/emoji/emotion_140.png.js +1 -1
  275. package/es/shared/assets/img/emoji/emotion_141.png.js +1 -1
  276. package/es/shared/assets/img/emoji/emotion_142.png.js +1 -1
  277. package/es/shared/assets/img/emoji/emotion_143.png.js +1 -1
  278. package/es/shared/assets/img/emoji/emotion_144.png.js +1 -1
  279. package/es/shared/assets/img/emoji/emotion_145.png.js +1 -1
  280. package/es/shared/assets/img/emoji/emotion_146.png.js +1 -1
  281. package/es/shared/assets/img/emoji/emotion_147.png.js +1 -1
  282. package/es/shared/assets/img/emoji/emotion_148.png.js +1 -1
  283. package/es/shared/assets/img/emoji/emotion_149.png.js +1 -1
  284. package/es/shared/assets/img/emoji/emotion_150.png.js +1 -1
  285. package/es/shared/assets/img/emoji/emotion_151.png.js +1 -1
  286. package/es/shared/assets/img/emoji/emotion_152.png.js +1 -1
  287. package/es/shared/assets/img/emoji/emotion_153.png.js +1 -1
  288. package/es/shared/assets/img/emoji/emotion_154.png.js +1 -1
  289. package/es/shared/assets/img/emoji/emotion_155.png.js +1 -1
  290. package/es/shared/assets/img/emoji/emotion_156.png.js +1 -1
  291. package/es/shared/assets/img/emoji/emotion_157.png.js +1 -1
  292. package/es/shared/assets/img/emoji/emotion_158.png.js +1 -1
  293. package/es/shared/assets/img/emoji/emotion_159.png.js +1 -1
  294. package/es/shared/assets/img/emoji/emotion_160.png.js +1 -1
  295. package/es/shared/assets/img/emoji/emotion_161.png.js +1 -1
  296. package/es/shared/assets/img/emoji/emotion_162.png.js +1 -1
  297. package/es/shared/assets/img/emoji/emotion_163.png.js +1 -1
  298. package/es/shared/assets/img/emoji/emotion_164.png.js +1 -1
  299. package/es/shared/assets/img/emoji/emotion_165.png.js +1 -1
  300. package/es/shared/assets/img/emoji/emotion_166.png.js +1 -1
  301. package/es/shared/assets/img/emoji/emotion_167.png.js +1 -1
  302. package/es/shared/assets/img/emoji/emotion_168.png.js +1 -1
  303. package/es/shared/assets/img/emoji/emotion_169.png.js +1 -1
  304. package/es/shared/assets/img/emoji/emotion_170.png.js +1 -1
  305. package/es/shared/assets/img/emoji/emotion_171.png.js +1 -1
  306. package/es/shared/assets/img/emoji/emotion_172.png.js +1 -1
  307. package/es/shared/assets/img/emoji/emotion_173.png.js +1 -1
  308. package/es/shared/assets/img/emoji/emotion_174.png.js +1 -1
  309. package/es/shared/assets/img/emoji/emotion_175.png.js +1 -1
  310. package/es/shared/assets/img/emoji/emotion_176.png.js +1 -1
  311. package/es/shared/assets/img/emoji/emotion_177.png.js +1 -1
  312. package/es/shared/assets/img/emoji/emotion_178.png.js +1 -1
  313. package/es/shared/assets/img/emoji/emotion_179.png.js +1 -1
  314. package/es/shared/assets/img/emoji/emotion_180.png.js +1 -1
  315. package/es/shared/assets/img/emoji/emotion_181.png.js +1 -1
  316. package/es/shared/assets/img/emoji/emotion_182.png.js +1 -1
  317. package/es/shared/assets/img/emoji/emotion_183.png.js +1 -1
  318. package/es/shared/assets/img/emoji/emotion_184.png.js +1 -1
  319. package/es/shared/assets/img/emoji/emotion_185.png.js +1 -1
  320. package/es/shared/assets/img/emoji/emotion_186.png.js +1 -1
  321. package/es/shared/assets/img/emoji/emotion_187.png.js +1 -1
  322. package/es/shared/assets/img/emoji/emotion_188.png.js +1 -1
  323. package/es/shared/assets/img/emoji/emotion_189.png.js +1 -1
  324. package/es/shared/assets/img/emoji/emotion_190.png.js +1 -1
  325. package/es/shared/assets/img/emoji/emotion_191.png.js +1 -1
  326. package/es/shared/assets/img/emoji/emotion_192.png.js +1 -1
  327. package/es/shared/assets/img/emoji/emotion_193.png.js +1 -1
  328. package/es/shared/assets/img/emoji/emotion_194.png.js +1 -1
  329. package/es/shared/assets/img/emoji/emotion_195.png.js +1 -1
  330. package/es/shared/assets/img/emoji/emotion_196.png.js +1 -1
  331. package/es/shared/assets/img/failure.png.js +1 -1
  332. package/es/shared/assets/img/no-permission.png.js +1 -1
  333. package/es/shared/assets/img/nodata.png.js +1 -1
  334. package/es/shared/assets/img/notfound.png.js +1 -1
  335. package/es/shared/assets/img/qr.png.js +1 -1
  336. package/es/shared/assets/img/success.png.js +1 -1
  337. package/es/shared/assets/img/table_style_2.png.js +1 -1
  338. package/es/shared/assets/img/video.png.js +1 -1
  339. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  340. package/es/shared/assets/img/xb_big.png.js +1 -1
  341. package/es/shared/assets/img/xb_small.png.js +1 -1
  342. package/es/shared/components/InputNumberSlash/InputNumberSlash.js +1 -1
  343. package/es/shared/hooks/index.js +1 -1
  344. package/es/shared/hooks/useDateTime.d.ts +1 -0
  345. package/es/shared/hooks/useDateTime.js +1 -1
  346. package/es/shared/package.json.js +1 -1
  347. package/package.json +2 -2
  348. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  349. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  350. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  351. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  352. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  353. package/es/shared/utils/fabricjs/index.d.ts +0 -6823
  354. package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -1 +1 @@
1
- import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawTextGroup as e,defaultRectStyle as i,drawTextAndIconGroup as o,drawText as n,defaultTextStyle as r,defaultStyle as l}from"../useDraw.js";import{useBirthProcessCumputedPoint as s}from"../useCumputedPoint.js";import"../useEvent.js";import{drawScaleNumber as a}from"../useScaleColumn.js";import{useCommon as u}from"../useCommon.js";import"vue";import{getScaleNumberList as d}from"../../utils/index.js";import{cloneDeep as c,last as f}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import"naive-ui";import"@vueuse/core";function p(p,g,h,m,v,y,k,w){const{getYValue:j,getXValue:x}=s(g),{getEqualXTypes:b,handleAddPrevent:X,isGridLimit:W}=u(p,h,g),{originY:C,endY:E,borderStyle:S,left:Y,itemList:K,scaleValues:L,originX:M,endX:N,yCellHeight:V,markHeight:G,canvasWidth:H,canvasHeight:T,xCellWidth:A}=g;!function(){if(!Y)return;const{title:t,titleWidth:i,titleStyle:o}=Y,n=e({width:i,height:E-C+G,...S},{value:t.split("").join("\n"),...o||{}},{left:0,top:C},!0);p.value.add(n)}(),L.forEach(((e,i)=>{var o,s;const{range:u,spaceValue:c,title:g,unit:h,titleStyle:m,spaceGridNumber:v=1,showNumber:y,showMaxMinNumber:k,titleMargin:w=[5,30],margin:j=5}=e,x="left"===e.layout?M-j:N+j,b=[],X=d(u,c),W=X.length;X.forEach(((t,i)=>{const o=0===i?E-5:E-i*V*v;!y||(0===i||i===W-1)&&!k||b.push(a(String(t),{...e,position:e.layout},x,o))}));const C="left"===e.layout?"right":"left",S=g&&n(["left"===e.layout?M-w[0]:N+w[0],(null!=(s=null==(o=f(b))?void 0:o.top)?s:330)-V-w[1]],{value:`${g}${h?"\n"+h:""}`,...r,...m,textAlign:C,originX:C,originY:"bottom"}),Y=new t.Group([...b,...S?[S]:[]],{objectCaching:!1,...l});p.value.add(Y),Y.sendToBack()})),function(){const e=new t.Rect({width:M-Y.titleWidth,height:E-C+G,left:Y.titleWidth,top:C,...i,originX:"left",originY:"top",...S});p.value.add(e);const n=c(K),r=c(Y.externalIconList||[]).map((t=>({...t,isExternal:!0}))),{projectNameMargin:l=[5,30],titleWidth:s=20}=Y;let a=E+G-l[0];const u=s+l[1];r.concat(n.reverse()).forEach((t=>{a-=10;const e=t.title,{text:i,icon:n}=o(e,t,{text:{left:u,top:a},icon:{leftX:u,topY:a,originX:"center",...t.isExternal?{evented:!1,selectable:!1}:{},origin:{linkKey:t.linkKey}}});var r;a-=i.height||30,n.set("left",n.left+n.width/2),(r=n).on("moving",(()=>{r.set("originX","center"),W(r)?(v(r),y(r)):m.show=!1})),r.on("mouseup:before",(t=>{if(m.show=!1,0===t.e.button&&W(r)){const t=r.origin.linkKey||r.origin.key;if(b(w(),r.left,"key",2*A).includes(t))X("repeat");else{const e={data:{time:x(r.left),value:j(r.origin.type,r.top),...r.origin.linkKey?{key:r.origin.key}:{}},...r.origin};h("add",e),k({...e,key:t})}}!function(t){t.setCoords().set({originX:"left",left:t.originLeft,top:t.originTop})}(r)})),p.value.add(i,n)}))}(),p.value.add(new t.Rect({left:0,top:0,width:H-S.strokeWidth,height:T-S.strokeWidth,fill:"transparent",...S}))}export{p as useLeft};
1
+ import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawTextGroup as e,defaultRectStyle as i,drawTextAndIconGroup as o,drawText as n,defaultTextStyle as r,defaultStyle as l}from"../useDraw.js";import{useBirthProcessCumputedPoint as s}from"../useCumputedPoint.js";import"../useEvent.js";import{drawScaleNumber as a}from"../useScaleColumn.js";import{useCommon as u}from"../useCommon.js";import"vue";import{getScaleNumberList as d}from"../../utils/index.js";import{cloneDeep as c,last as f}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import"naive-ui";import"@vueuse/core";function p(p,g,h,m,v,y,k,w){const{getYValue:j,getXValue:x}=s(g),{getEqualXTypes:b,handleAddPrevent:X,isGridLimit:W}=u(p,h,g),{originY:C,endY:E,borderStyle:S,left:Y,itemList:K,scaleValues:L,originX:M,endX:N,yCellHeight:V,markHeight:G,canvasWidth:H,canvasHeight:T,xCellWidth:A}=g;!function(){if(!Y)return;const{title:t,titleWidth:i,titleStyle:o}=Y,n=e({width:i,height:E-C+G,...S},{value:t.split("").join("\n"),...o||{}},{left:0,top:C},!0);p.value.add(n)}(),L.forEach(((e,i)=>{var o,s;const{range:u,spaceValue:c,title:g,unit:h,titleStyle:m,spaceGridNumber:v=1,showNumber:y,showMaxMinNumber:k,titleMargin:w=[5,30],margin:j=5}=e,x="left"===e.layout?M-j:N+j,b=[],X=d(u,c),W=X.length;X.forEach(((t,i)=>{const o=0===i?E-5:E-i*V*v;!y||(0===i||i===W-1)&&!k||b.push(a(String(t),{...e,position:e.layout},x,o))}));const C="left"===e.layout?"right":"left",S=(g||h)&&n(["left"===e.layout?M-w[0]:N+w[0],(null!=(s=null==(o=f(b))?void 0:o.top)?s:330)-V-w[1]],{value:`${g}${h?"\n"+h:""}`,...r,...m,textAlign:C,originX:C,originY:"bottom"}),Y=new t.Group([...b,...S?[S]:[]],{objectCaching:!1,...l});p.value.add(Y),Y.sendToBack()})),function(){const e=new t.Rect({width:M-Y.titleWidth,height:E-C+G,left:Y.titleWidth,top:C,...i,originX:"left",originY:"top",...S});p.value.add(e);const n=c(K),r=c(Y.externalIconList||[]).map((t=>({...t,isExternal:!0}))),{projectNameMargin:l=[5,30],titleWidth:s=20}=Y;let a=E+G-l[0];const u=s+l[1];r.concat(n.reverse()).forEach((t=>{a-=10;const e=t.title,{text:i,icon:n}=o(e,t,{text:{left:u,top:a},icon:{leftX:u,topY:a,originX:"center",...t.isExternal?{evented:!1,selectable:!1}:{},origin:{linkKey:t.linkKey}}});var r;a-=i.height||30,n.set("left",n.left+n.width/2),(r=n).on("moving",(()=>{r.set("originX","center"),W(r)?(v(r),y(r)):m.show=!1})),r.on("mouseup:before",(t=>{if(m.show=!1,0===t.e.button&&W(r)){const t=r.origin.linkKey||r.origin.key;if(b(w(),r.left,"key",2*A).includes(t))X("repeat");else{const e={data:{time:x(r.left),value:j(r.origin.type,r.top),...r.origin.linkKey?{key:r.origin.key}:{}},...r.origin};h("add",e),k({...e,key:t})}}!function(t){t.setCoords().set({originX:"left",left:t.originLeft,top:t.originTop})}(r)})),p.value.add(i,n)}))}(),p.value.add(new t.Rect({left:0,top:0,width:H-S.strokeWidth,height:T-S.strokeWidth,fill:"transparent",...S}))}export{p as useLeft};
@@ -1 +1 @@
1
- import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawPoint as e,drawText as i}from"../useDraw.js";import{useBirthProcessCumputedPoint as o}from"../useCumputedPoint.js";import{bus as n}from"../useEvent.js";import{useCommon as r}from"../useCommon.js";import"vue";import{getIndex as a}from"../../utils/index.js";import{cloneDeep as l,flatten as s}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import{OTHER_MENU as d}from"../../constants/index.js";import"naive-ui";import"@vueuse/core";function c(c,u,f,h,g,m,p,v,x){const{computedX:k,getXValue:y}=o(u),{getEqualXTypes:X,handleAddPrevent:P,isGridLimit:b,getPointEventProps:w}=r(c,f,u),{other:E,yCellHeight:j,xCellWidth:z,endX:A,originX:C,originY:L,endY:M,markHeight:S,event:I,topGridYCellHeight:T}=u,H=new Map,W=l(E);function Y(){var o;if(!(null==(o=null==W?void 0:W.horizontal)?void 0:o.length))return;const n="horizontal";H.set(n,[]);const{horizontal:r}=W;let a=L+j/2;r.forEach(((o,r)=>{const{title:l,type:s,pointAttr:d={},textStyle:u={},data:f}=o;let h=null;f.forEach(((o,f)=>{const{time:g,value:m}=o,p=k(g);if(!$(p))return;const v=e(s,{...d,left:p,top:a}),x=p+v.width/2+2,y=i([x,a],{value:m,...u,originX:"left"}),X=new t.Group([v,y],{lockMovementY:!0,objectCaching:!1,hasControls:!1,hasBorders:!1,hoverCursor:"pointer"});Object.assign(X,{originLeft:p,iconHalfWidth:v.width/2,origin:{type:"other",key:n,dataIndex:r,index:f,data:o,title:l},limitX:{x1:C,x2:A-X.width}}),h&&(X.limitX.x1=h.left,h.limitX.x2=X.left,X.prevPoint=h,h.nextPoint=X),h=X,B(X),H.get(n).push(X),c.value.add(X)})),a+=j}))}function V(){var t;if(!(null==(t=null==W?void 0:W.vertical)?void 0:t.length))return;const i="vertical";H.set(i,[]);const{vertical:o}=W;o.forEach(((t,o)=>{const{show:n=!0,marginTop:r=0,textStyle:a={},data:l,time:s}=t,d=k(s);if(!n||!$(d))return;const{lineHeight:c=j}=a;let u=L+r+c/2;l.forEach(((t,n)=>{const r=e(String(t),{...a,lockMovementY:!0,left:d,originX:"left",top:u,origin:{type:"other",key:i,dataIndex:o,index:n,data:{value:t}},...w()});u+=c,B(r),H.get(i).push(r)}));const f=H.get(i).filter((t=>t.origin.dataIndex===o)),h=Math.max(...f.map((t=>t.width))),g=d>A-h;f.forEach(((t,e,i)=>{t.siblingPoints=i.filter((e=>e.origin.index!==t.origin.index)),t.maxTextWidth=h,g&&t.set("originX","right")}))})),c.value.add(...H.get(i))}function G(t,e="add"){const{dataIndex:i,data:o,index:n,key:r}=t,l=W[r],s=["mark"].includes(r)?l.dataList[i]:l[i];switch(e){case"remove":s.data.splice(n,1);break;case"change":s.data[n]=o;break;default:{const t=Array.isArray(o)?o[0].time:o.time,e=a(t,s.data),i=Array.isArray(o)?o:[o];s.data.splice(e,0,...i);break}}O(t)}function O(t){var e;const{key:i}=t;switch(null==(e=c.value)||e.remove(...H.get(i)),H.delete(i),i){case"horizontal":Y();break;case"vertical":V();break;case"mark":q()}}function q(){if(!(null==E?void 0:E.mark)||!S)return;const{title:t,titleStyle:o,pointAttr:n,dataList:r}=E.mark,a=i([C-5,M+S/2],{value:t,...o,originX:"right"});c.value.add(a);const l=M+S,s=[];r.forEach((t=>{const{time:i,list:o=[]}=t,r=k(i);if(!$(r))return;let a=M;o.forEach((t=>{let i=!1;const o=e("circleAndText",{...n,text:t.text,left:r,top:a,origin:{data:t,key:"mark",type:"other"}}),d=o.height;a+d<=l&&a>=M?(o.set("top",a+d/2),a+=d):(i||(a=M,i=!0),o.set("top",a-d/2),a-=d),s.push(o),B(o),c.value.add(o)}))})),function(t){const e=t=>{var e,i;return null==(i=null==(e=t.origin)?void 0:e.data)?void 0:i.isStart},i=t.find((t=>e(t))),o=t.find((t=>!e(t)&&t.left>i.left)),n=t.filter((t=>!e(t)));t.forEach((t=>{const r={x1:C,x2:A};e(t)?(r.x2=o.left,t.otherPoints=n):(r.x1=i.left,t.startPoint=i),t.limitX=r}))}(s)}function B(t){if(I.hovered&&(t.on("mouseover",(()=>{D(t)})),t.on("mouseout",(()=>{h.show=!1}))),!I.evented)return;const{key:e}=t.origin,i=["mark","horizontal"].includes(e),o=["mark","vertical"].includes(e);t.on("moving",(()=>{i?function(t){const e=t.origin.key,i="horizontal"===e;t.setCoords(),t.left<t.limitX.x1&&t.set("left",t.limitX.x1+(i?1:0));t.left>t.limitX.x2&&t.set("left",t.limitX.x2+(i?-1:0));if("mark"===e){t.top<L&&t.set("top",L);const e=M+S-t.height/2;t.top>e&&t.set("top",e)}i&&(t.originLeft=t.left+t.iconHalfWidth)}(t):(m(t),function(t){const e=t.left+t.maxTextWidth>A?"right":"left";t.setCoords().set({originX:e}),t.siblingPoints.forEach((i=>i.setCoords().set({originX:e,left:t.left})))}(t)),I.hovered&&D(t)})),t.on("mouseup",(n=>{var r;if(h.show=!1,1===n.button){i&&function(t){var e,i;if("mark"===t.origin.key){if((null==(i=null==(e=t.origin)?void 0:e.data)?void 0:i.isStart)&&t.otherPoints)t.otherPoints.forEach((e=>{e.limitX.x1=t.left}));else{const e=t.startPoint.otherPoints.map((t=>t.left)),i=Math.min(...e);t.startPoint.limitX.x2=i}return}t.prevPoint&&(t.prevPoint.limitX.x2=t.left);t.nextPoint&&(t.nextPoint.limitX.x1=t.left)}(t);const e=y(null!=(r=t.originLeft)?r:t.left),n={...t.origin,...o?{time:e}:{data:{...t.origin.data,time:e}}};c.value.discardActiveObject(),f("change",n)}3===n.button&&["horizontal","vertical"].includes(e)&&(g.point={x:t.left,y:t.top},g.show=!0,g.target=t,g.list=d.map((t=>({...t,renderItem:()=>t.label}))))}))}function D(t){h.point={x:t.left,y:"mark"===t.origin.key?t.top:t.top+T/2};const e=!t.origin.isMenu&&t.originLeft?t.originLeft:t.left;h.list=[`时间 ${y(e).slice(-5)}`],"mark"===t.origin.key&&h.list.unshift(t.origin.data.name+" "),h.show=!0}function $(t){return t>=C&&t<=A}return function(){var t;if(!(null==(t=null==W?void 0:W.horizontal)?void 0:t.length))return;const{horizontal:i}=W,o=C-5;let n=L+j/2;i.forEach(((t,i)=>{const{title:r,titleStyle:a={},defaultAddValue:l}=t,s=r&&e(r,{...a,originX:"right",left:o,top:n,origin:{defaultAddValue:l,dataIndex:i,type:"other",key:"horizontal",title:r,isMenu:!0},originLeft:o,originTop:n});var d;(d=s).on("moving",(()=>{d.set("originX","center"),b(d)?D(d):h.show=!1})),d.on("mouseup:before",(t=>{if(h.show=!1,0===t.e.button&&b(d))if(X(H.get("horizontal"),d.left,"key",z).includes(d.origin.key))P("repeat"),console.log("重复节点");else{const t={data:{time:y(d.left),value:d.origin.defaultAddValue},...d.origin};f("add",t),G(t)}!function(t){t.setCoords().set({originX:"right",left:t.originLeft,top:t.originTop})}(d)})),c.value.add(s),n+=j}))}(),Y(),V(),q(),n.on((()=>{const t="horizontal",e=p(H.get(t));e.length>0?v((()=>{const i=function(t){const e=t.reduce(((t,e)=>{const{dataIndex:i}=e.origin;return t[i]=t[i]?t[i].concat(e.origin):[e.origin],t}),{});return s(Object.keys(e).map((t=>{const i=e[t];return W.horizontal[t].data.splice(i[0].index,i.length),i})))}(e);O({key:t}),f("remove",i)})):x()})),{clickMenu:function({item:t,target:e}){if(!e)return;const{type:i}=t,o={...e.origin,type:"other"};f(i,o),"remove"===i&&G(o,i)}}}export{c as useOther};
1
+ import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawPoint as e,drawText as i}from"../useDraw.js";import{useBirthProcessCumputedPoint as o}from"../useCumputedPoint.js";import{bus as n}from"../useEvent.js";import{useCommon as r}from"../useCommon.js";import"vue";import{getIndex as a}from"../../utils/index.js";import{cloneDeep as l,flatten as s}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import{OTHER_MENU as c}from"../../constants/index.js";import"naive-ui";import"@vueuse/core";function d(d,u,f,h,m,g,p,v,x){const{computedX:k,getXValue:y}=o(u),{getEqualXTypes:X,handleAddPrevent:P,isGridLimit:b,getPointEventProps:w}=r(d,f,u),{other:E,yCellHeight:j,xCellWidth:z,endX:A,originX:C,originY:L,endY:M,markHeight:S,event:T,topGridYCellHeight:I}=u,H=new Map,Y=l(E);function W(){var o;if(!(null==(o=null==Y?void 0:Y.horizontal)?void 0:o.length))return;const n="horizontal";H.set(n,[]);const{horizontal:r}=Y;let a=L+j/2;r.forEach(((o,r)=>{const{title:l,type:s,pointAttr:c={},textStyle:d={},data:u}=o;let f=null;u.forEach(((o,u)=>{const{time:h,value:m}=o,g=k(h);if(!$(g))return;const p=e(s,{...c,left:g,top:a}),v=g+p.width/2+2,x=i([v,a],{value:m,...d,originX:"left"}),y=new t.Group([p,x],{lockMovementY:!0,objectCaching:!1,hasControls:!1,hasBorders:!1,hoverCursor:"pointer",...w()});Object.assign(y,{originLeft:g,iconHalfWidth:p.width/2,origin:{type:"other",key:n,dataIndex:r,index:u,data:o,title:l},limitX:{x1:C,x2:A-y.width}}),f&&(y.limitX.x1=f.left,f.limitX.x2=y.left,y.prevPoint=f,f.nextPoint=y),f=y,q(y),H.get(n).push(y)})),a+=j})),d.value.add(...H.get(n))}function V(){var t;if(!(null==(t=null==Y?void 0:Y.vertical)?void 0:t.length))return;const i="vertical";H.set(i,[]);const{vertical:o}=Y;o.forEach(((t,o)=>{const{show:n=!0,marginTop:r=0,textStyle:a={},data:l,time:s}=t,c=k(s);if(!n||!$(c))return;const{lineHeight:d=j}=a;let u=L+r+d/2;l.forEach(((t,n)=>{const r=e(String(t),{...a,lockMovementY:!0,left:c,originX:"left",top:u,origin:{type:"other",key:i,dataIndex:o,index:n,data:{value:t}},...w()});u+=d,q(r),H.get(i).push(r)}));const f=H.get(i).filter((t=>t.origin.dataIndex===o)),h=Math.max(...f.map((t=>t.width))),m=c>A-h;f.forEach(((t,e,i)=>{t.siblingPoints=i.filter((e=>e.origin.index!==t.origin.index)),t.maxTextWidth=h,m&&t.set("originX","right")}))})),d.value.add(...H.get(i))}function G(t,e="add"){const{dataIndex:i,data:o,index:n,key:r}=t,l=Y[r],s=["mark"].includes(r)?l.dataList[i]:l[i];switch(e){case"remove":s.data.splice(n,1);break;case"change":s.data[n]=o;break;default:{const t=Array.isArray(o)?o[0].time:o.time,e=a(t,s.data),i=Array.isArray(o)?o:[o];s.data.splice(e,0,...i);break}}O(t)}function O(t){var e;const{key:i}=t;switch(null==(e=d.value)||e.remove(...H.get(i)),H.delete(i),i){case"horizontal":W();break;case"vertical":V();break;case"mark":D()}}function D(){if(!(null==E?void 0:E.mark)||!S)return;const{title:t,titleStyle:o,pointAttr:n,dataList:r}=E.mark,a=i([C-5,M+S/2],{value:t,...o,originX:"right"});d.value.add(a);const l=M+S,s=[];r.forEach((t=>{const{time:i,list:o=[]}=t,r=k(i);if(!$(r))return;let a=M;o.forEach((t=>{let i=!1;const o=e("circleAndText",{...n,text:t.text,left:r,top:a,origin:{data:t,key:"mark",type:"other"}}),c=o.height;a+c<=l&&a>=M?(o.set("top",a+c/2),a+=c):(i||(a=M,i=!0),o.set("top",a-c/2),a-=c),s.push(o),q(o),d.value.add(o)}))})),function(t){const e=t=>{var e,i;return null==(i=null==(e=t.origin)?void 0:e.data)?void 0:i.isStart},i=t.find((t=>e(t))),o=t.find((t=>!e(t)&&t.left>i.left)),n=t.filter((t=>!e(t)));t.forEach((t=>{const r={x1:C,x2:A};e(t)?(r.x2=o.left,t.otherPoints=n):(r.x1=i.left,t.startPoint=i),t.limitX=r}))}(s)}function q(t){if(T.hovered&&(t.on("mouseover",(()=>{B(t)})),t.on("mouseout",(()=>{h.show=!1}))),t.lockMovementX&&t.lockMovementY)return;const{key:e}=t.origin,i=["mark","horizontal"].includes(e),o=["mark","vertical"].includes(e);t.on("moving",(()=>{i?function(t){const e=t.origin.key,i="horizontal"===e;t.setCoords(),t.left<t.limitX.x1&&t.set("left",t.limitX.x1+(i?1:0));t.left>t.limitX.x2&&t.set("left",t.limitX.x2+(i?-1:0));if("mark"===e){t.top<L&&t.set("top",L);const e=M+S-t.height/2;t.top>e&&t.set("top",e)}i&&(t.originLeft=t.left+t.iconHalfWidth)}(t):(g(t),function(t){const e=t.left+t.maxTextWidth>A?"right":"left";t.setCoords().set({originX:e}),t.siblingPoints.forEach((i=>i.setCoords().set({originX:e,left:t.left})))}(t)),T.hovered&&B(t)})),t.on("mouseup",(n=>{var r;if(h.show=!1,1===n.button){i&&function(t){var e,i;if("mark"===t.origin.key){if((null==(i=null==(e=t.origin)?void 0:e.data)?void 0:i.isStart)&&t.otherPoints)t.otherPoints.forEach((e=>{e.limitX.x1=t.left}));else{const e=t.startPoint.otherPoints.map((t=>t.left)),i=Math.min(...e);t.startPoint.limitX.x2=i}return}t.prevPoint&&(t.prevPoint.limitX.x2=t.left);t.nextPoint&&(t.nextPoint.limitX.x1=t.left)}(t);const e=y(null!=(r=t.originLeft)?r:t.left),n={...t.origin,...o?{time:e}:{data:{...t.origin.data,time:e}}};d.value.discardActiveObject(),f("change",n)}3===n.button&&["horizontal","vertical"].includes(e)&&(m.point={x:t.left,y:t.top},m.show=!0,m.target=t,m.list=c.map((t=>({...t,renderItem:()=>t.label}))))}))}function B(t){const{key:e,data:i={}}=t.origin||{};let o=i.value;h.point={x:t.left,y:"mark"===e?t.top:t.top+I/2};const n=!t.origin.isMenu&&t.originLeft?t.originLeft:t.left,r=y(n);h.list=[`时间 ${r.slice(-5)}`],"mark"===e&&(o=i.name,h.list.unshift(o+" ")),h.sourceData=[{type:"other",key:e,time:r,value:o}],h.isTarget=!0,h.show=!0}function $(t){return t>=C&&t<=A}return function(){var t;if(!(null==(t=null==Y?void 0:Y.horizontal)?void 0:t.length))return;const{horizontal:i}=Y,o=C-5;let n=L+j/2;i.forEach(((t,i)=>{const{title:r,titleStyle:a={},defaultAddValue:l}=t,s=r&&e(r,{...a,originX:"right",left:o,top:n,origin:{defaultAddValue:l,dataIndex:i,type:"other",key:"horizontal",title:r,isMenu:!0},originLeft:o,originTop:n});var c;(c=s).on("moving",(()=>{c.set("originX","center"),b(c)?B(c):h.show=!1})),c.on("mouseup:before",(t=>{if(h.show=!1,0===t.e.button&&b(c))if(X(H.get("horizontal"),c.left,"key",z).includes(c.origin.key))P("repeat"),console.log("重复节点");else{const t={data:{time:y(c.left),value:c.origin.defaultAddValue},...c.origin};f("add",t),G(t)}!function(t){t.setCoords().set({originX:"right",left:t.originLeft,top:t.originTop})}(c)})),d.value.add(s),n+=j}))}(),W(),V(),D(),n.on((()=>{const t="horizontal",e=p(H.get(t));e.length>0?v((()=>{const i=function(t){const e=t.reduce(((t,e)=>{const{dataIndex:i}=e.origin;return t[i]=t[i]?t[i].concat(e.origin):[e.origin],t}),{});return s(Object.keys(e).map((t=>{const i=e[t];return Y.horizontal[t].data.splice(i[0].index,i.length),i})))}(e);O({key:t}),f("remove",i)})):x()})),{clickMenu:function({item:t,target:e}){if(!e)return;const{type:i}=t,o={...e.origin,type:"other"};f(i,o),"remove"===i&&G(o,i)}}}export{d as useOther};
@@ -2,7 +2,7 @@ import { Ref } from 'vue';
2
2
  import { fabric } from '../../../../../shared/utils/fabricjs';
3
3
  import { AnyObject } from '../../../../../shared/types';
4
4
  import { IPointTipProps, IPointMenuProps } from '../../../../../components/fabric-chart/src/interface';
5
- export declare function useSurgicalAnesthesiaChart(canvas: Ref<fabric.Canvas>, props: AnyObject, emits: Function, canvasRef: Ref<HTMLCanvasElement | null>, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps): {
5
+ export declare function useSurgicalAnesthesiaChart(canvas: Ref<fabric.Canvas>, props: AnyObject, emits: Function, canvasRef: Ref<HTMLCanvasElement | null>, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps, isPopupTipRender: boolean): {
6
6
  propItems: any;
7
7
  redrawPoints: Ref<any>;
8
8
  select: Ref<any>;
@@ -1 +1 @@
1
- import{ref as e,computed as t,reactive as a,unref as r,onMounted as i,nextTick as n}from"vue";import{useDialog as l}from"naive-ui";import{defaultBorderStyle as o}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{format as u}from"date-fns";import{getChildrenSize as s}from"../../utils/index.js";import{cloneDeep as d,range as c,flatten as p}from"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import{OTHER_MENU as m}from"../../constants/index.js";import"@vueuse/core";import{useTop as v}from"./useTop.js";import{useLeft as h}from"./useLeft.js";import{useCenter as f}from"./useCenter.js";import{useOther as g}from"./useOther.js";function y(y,w,x,b,j,C){const Y=l(),H=e(),S=e(),D=e(),A=t((()=>w.data.layout||{top:"drug",center:"xAxis",bottom:"intraoperatively"})),M=t((()=>{var e;return null!=(e=w.data.left.width)?e:0})),T=t((()=>{const{grid:e}=w.data;return e.mainXCell*e.subXCell})),X=t((()=>{const{grid:e}=w.data;return e.mainYCell*e.subYCell})),G=t((()=>{const{treeData:e=[],show:t=!0}=w.data.top;return t?s(e):0})),V=t((()=>w.data.top.tree.cellHeight)),k=t((()=>V.value*G.value)),P=t((()=>te(_("drug")||"top"))),L=t((()=>P.value+k.value)),N=t((()=>{var e;return Date.parse((null==(e=w.data.xAxis)?void 0:e.startTime)||u(new Date,"yyyy-MM-dd HH:mm:ss"))})),O=t((()=>{const e=d(w.data.xAxis),{spaceValue:t,spaceTimeStamp:a}=e,r=c(T.value/t+1).map((r=>0===r?e.startTime:u(new Date(N.value+r*t*a),"yyyy-MM-dd HH:mm:ss")));return{...e,list:r,left:M.value}})),E=function(){const{show:e=!0}=w.data.top;if(!e)return[];const t=d(w.data.top.treeData);let a=0;const{cellWidth:r,cellHeight:i}=w.data.top.tree;return function e(t,n=0){t.forEach((t=>{var l;const o={top:a*i+P.value,left:n*r,width:r,height:i};if(a++,null==(l=t.children)?void 0:l.length){a--;const r=s(t.children);o.height=r*i,e(t.children,n+1)}else o.width=M.value-o.left;Object.assign(t,o)}))}(t),t}(),W=t((()=>te(_("xAxis")||"center"))),I=t((()=>{var e;const{width:t,right:a}=w.data;if(!a)return t;return t-(null!=(e=a.width)?e:0)})),q=t((()=>te(_("intraoperatively")||"bottom"))),z=t((()=>{var e;const{show:t=!0,height:a}=(null==(e=w.data.other)?void 0:e.mark)||{};return t&&a?a:0})),B=t((()=>q.value+(w.data.height-k.value-O.value.height-z.value))),F=t((()=>(I.value-M.value)/T.value)),J=t((()=>(B.value-q.value)/X.value)),K=t((()=>O.value.spaceTimeStamp/F.value)),Q=t((()=>{const{scaleValues:e}=w.data;return p(e.map((e=>e.dataList.filter((e=>e.show)).map(((t,a)=>({...t,bigType:e.type,unit:e.unit,dataIndex:a}))))))})),R=t((()=>ae("pulse"))),U=t((()=>ae("temperature"))),Z=t((()=>{var e;return(null==(e=w.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),$=a({canvasWidth:w.data.width,canvasHeight:w.data.height,borderStyle:{...o,...w.data.borderStyle},pointSelectionStyle:w.data.pointSelectionStyle||{},grid:w.data.grid,top:w.data.top,left:w.data.left,other:w.data.other,topGridYNumber:r(G),topGridYCellHeight:r(V),topGridOriginY:r(P),topGridEndY:r(L),treeData:E,xAxis:r(O),originYXAxis:r(W),startTime:r(N),timeXCell:r(K),gridXNumber:r(T),gridYNumber:r(X),xCellWidth:r(F),yCellHeight:r(J),originX:r(M),endX:r(I),originY:r(q),endY:r(B),markHeight:r(z),itemList:r(Q),scaleValues:w.data.scaleValues,pulseYCell:r(R),temperatureYCell:r(U),event:r(Z),dialog:Y});function _(e){let t="";return Object.entries(A.value).some((([a,r])=>{if(r===e)return t=a,!0})),t}function ee(e){const t=A.value[e],a=O.value.height;switch(t){case"drug":return k.value;case"xAxis":return a;default:return w.data.height-k.value-a}}function te(e){switch(e){case"top":return 0;case"center":return ee("top");default:return ee("top")+ee("center")}}function ae(e){const{scaleValues:t}=w.data,a=t.find((t=>t.type===e));return J.value*(a.spaceGridNumber||1)/(a.spaceValue||1)}return i((async()=>{await n(),v(y,$,x,j);const{redrawPoints:e,clickMenu:t,moveLimit:a,setPopup:r,updateData:i,getGridPoints:l,getContainPoints:o,showDialog:u,removeCurrentSelection:s}=f(y,$,x,j,C);h(y,$,x,j,a,r,i,l);const{clickMenu:d}=g(y,$,x,j,C,a,o,u,s);S.value=e,D.value=e=>{const{item:a}=e;a.type&&m.map((e=>e.type)).includes(a.type)?d(e):t(e)}})),{propItems:$,redrawPoints:S,select:H,clickMenu:D}}export{y as useSurgicalAnesthesiaChart};
1
+ import{ref as e,computed as t,reactive as a,unref as r,onMounted as i,nextTick as l,watch as o}from"vue";import{useDialog as n}from"naive-ui";import{defaultBorderStyle as u}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{format as s}from"date-fns";import{getChildrenSize as d}from"../../utils/index.js";import{cloneDeep as c,range as p,flatten as m}from"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import{OTHER_MENU as v}from"../../constants/index.js";import"@vueuse/core";import{useTop as h}from"./useTop.js";import{useLeft as f}from"./useLeft.js";import{useCenter as g}from"./useCenter.js";import{useOther as y}from"./useOther.js";function w(w,x,b,j,C,Y,H){const S=n(),T=e(),D=e(),A=e();let M=null;const X=t((()=>x.data.layout||{top:"drug",center:"xAxis",bottom:"intraoperatively"})),G=t((()=>{var e;return null!=(e=x.data.left.width)?e:0})),V=t((()=>{const{grid:e}=x.data;return e.mainXCell*e.subXCell})),k=t((()=>{const{grid:e}=x.data;return e.mainYCell*e.subYCell})),P=t((()=>{const{treeData:e=[],show:t=!0}=x.data.top;return t?d(e):0})),L=t((()=>x.data.top.tree.cellHeight)),N=t((()=>L.value*P.value)),O=t((()=>ie(ae("drug")||"top"))),E=t((()=>O.value+N.value)),W=t((()=>{var e;return Date.parse((null==(e=x.data.xAxis)?void 0:e.startTime)||s(new Date,"yyyy-MM-dd HH:mm:ss"))})),I=t((()=>{const e=c(x.data.xAxis),{spaceValue:t,spaceTimeStamp:a}=e,r=p(V.value/t+1).map((r=>0===r?e.startTime:s(new Date(W.value+r*t*a),"yyyy-MM-dd HH:mm:ss")));return{...e,list:r,left:G.value}})),q=function(){const{show:e=!0}=x.data.top;if(!e)return[];const t=c(x.data.top.treeData);let a=0;const{cellWidth:r,cellHeight:i}=x.data.top.tree;return function e(t,l=0){t.forEach((t=>{var o;const n={top:a*i+O.value,left:l*r,width:r,height:i};if(a++,null==(o=t.children)?void 0:o.length){a--;const r=d(t.children);n.height=r*i,e(t.children,l+1)}else n.width=G.value-n.left;Object.assign(t,n)}))}(t),t}(),z=t((()=>ie(ae("xAxis")||"center"))),B=t((()=>{var e;const{width:t,right:a}=x.data;if(!a)return t;return t-(null!=(e=a.width)?e:0)})),F=t((()=>ie(ae("intraoperatively")||"bottom"))),J=t((()=>{var e;const{show:t=!0,height:a}=(null==(e=x.data.other)?void 0:e.mark)||{};return t&&a?a:0})),K=t((()=>F.value+(x.data.height-N.value-I.value.height-J.value))),Q=t((()=>(B.value-G.value)/V.value)),R=t((()=>(K.value-F.value)/k.value)),U=t((()=>I.value.spaceTimeStamp/Q.value)),Z=t((()=>{const{scaleValues:e}=x.data;return m(e.map((e=>e.dataList.filter((e=>e.show)).map(((t,a)=>({...t,bigType:e.type,unit:e.unit,dataIndex:a}))))))})),$=t((()=>le("pulse"))),_=t((()=>le("temperature"))),ee=t((()=>{var e;return(null==(e=x.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),te=a({canvasWidth:x.data.width,canvasHeight:x.data.height,borderStyle:{...u,...x.data.borderStyle},pointSelectionStyle:x.data.pointSelectionStyle||{},grid:x.data.grid,top:x.data.top,left:x.data.left,other:x.data.other,topGridYNumber:r(P),topGridYCellHeight:r(L),topGridOriginY:r(O),topGridEndY:r(E),treeData:q,xAxis:r(I),originYXAxis:r(z),startTime:r(W),timeXCell:r(U),gridXNumber:r(V),gridYNumber:r(k),xCellWidth:r(Q),yCellHeight:r(R),originX:r(G),endX:r(B),originY:r(F),endY:r(K),markHeight:r(J),itemList:r(Z),scaleValues:x.data.scaleValues,pulseYCell:r($),temperatureYCell:r(_),event:r(ee),dialog:S});function ae(e){let t="";return Object.entries(X.value).some((([a,r])=>{if(r===e)return t=a,!0})),t}function re(e){const t=X.value[e],a=I.value.height;switch(t){case"drug":return N.value;case"xAxis":return a;default:return x.data.height-N.value-a}}function ie(e){switch(e){case"top":return 0;case"center":return re("top");default:return re("top")+re("center")}}function le(e){const{scaleValues:t}=x.data,a=t.find((t=>t.type===e));return R.value*(a.spaceGridNumber||1)/(a.spaceValue||1)}return i((async()=>{await l(),h(w,te,b,C);const{redrawPoints:e,clickMenu:t,moveLimit:a,setPopup:r,updateData:i,getGridPoints:o,getContainPoints:n,showDialog:u,removeCurrentSelection:s}=g(w,te,b,C,Y,H);f(w,te,b,C,a,r,i,o);const{clickMenu:d}=y(w,te,b,C,Y,a,n,u,s);D.value=e,A.value=e=>{const{item:a}=e;a.type&&v.map((e=>e.type)).includes(a.type)?d(e):t(e)}})),H&&o((()=>null==C?void 0:C.point),(()=>{C.movable?(C.show=!0,M&&clearTimeout(M),M=setTimeout((()=>{C.show=!1,C.movable=!1}),3e3)):M&&clearTimeout(M)}),{deep:!0}),{propItems:te,redrawPoints:D,select:T,clickMenu:A}}export{w as useSurgicalAnesthesiaChart};
@@ -1 +1 @@
1
- import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawText as e,defaultStyle as i,defaultRectStyle as n,drawTextGroup as o,drawLine as l,drawPoint as r}from"../useDraw.js";import{useGrid as s}from"../useGrid.js";import{useBirthProcessCumputedPoint as a}from"../useCumputedPoint.js";import"../useEvent.js";import"vue";import{cloneDeep as c}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import"naive-ui";import"@vueuse/core";function f(f,u,d,m,h){const{computedX:v,getXValue:p}=a(u),{originX:g,endX:x,xCellWidth:L,originYXAxis:X,top:C,canvasWidth:w,borderStyle:Y,treeData:y,xAxis:S,topGridYNumber:j,topGridOriginY:b,topGridYCellHeight:k,topGridEndY:G,event:I}=u,z=new Set;function A(t,e,i){let n;const{content:o}=t.value||{};if(o){const{textStyle:l}=C.data||{},{startLine:s,endLine:a}=e;n=r(o,{fontSize:12,...l,backgroundColor:"#fff",lockMovementX:!0,lockMovementY:!0});const c=E(n,e,i);n&&(n.set(c),n.origin={data:t},$(n),s&&(s.text=n),a&&(a.text=n))}return n}function E(t,e,i){const n=t.width+1,{startLine:o,centerLine:l,endLine:r}=e,s={top:i,originX:"center",originY:"center"};return l&&n<=l.width?s.left=l.x1+l.width/2:r&&n<=r.limitX.x2-r.left?(s.originX="left",s.left=r.left+1):o&&!r&&n<=o.limitX.x2-o.left?(s.originX="left",s.left=o.left+(o.isCustomIcon?5:1)):o&&n<=o.left-o.limitX.x1?(s.originX="right",s.left=o.left-(o.isCustomIcon?5:1)):l?(s.originY="top",s.left=l.x1+l.width/2,s.top=i+1,s.fontSize=10):o&&(s.originX="left",s.originY="top",s.fontSize=10,s.left=o.left,s.top=i+1),s}function M(e,{isCustomIcon:i,isContinue:n,isLeft:o}){const{x:s,y1:a,y2:c,halfY:f}=e;if(!s||s<g||s>x)return;const{lineStyle:u}=C.data||{};let d;const m={left:s,top:f};d=i?r("circle",{fill:u.stroke,...m}):n?r(">",{fill:u.stroke,...m,fontSize:18}):l([s,a,s,f],u);const h=new t.Rect({width:L,height:k,fill:"transparent",left:s-L/2,top:a}),v=new t.Group([d,h],{originX:"center",originY:"center",hasControls:!1,hasBorders:!1,objectCaching:!1,hoverCursor:"pointer",lockMovementY:!0});return v.isLeft=o,v.isCustomIcon=i,$(v),v}function $(t){I.hovered&&(t.on("mouseover",(()=>{W(t,"hover")})),t.on("mouseout",(()=>{m.show=!1}))),t.lockMovementX&&t.lockMovementY||(t.on("moving",(()=>{!function(t){t.setCoords(),t.left<t.limitX.x1&&t.set("left",t.limitX.x1);t.left>t.limitX.x2&&t.set("left",t.limitX.x2)}(t),function(t){if(t.centerLine){const e=t.isLeft?{x1:t.left}:{x2:t.left};t.centerLine.setCoords().set(e)}if(t.text){const e=E(t.text,{startLine:t.isLeft?t:t.nearLine,centerLine:t.centerLine,endLine:t.isLeft?t.nearLine:t},t.top);t.text.setCoords().set(e)}}(t),I.hovered&&W(t)})),t.on("mouseup",(e=>{if(1===e.button){!function(t){t.isLeft?(t.prevLine&&(t.prevLine.limitX.x2=t.left),t.nearLine&&(t.nearLine.limitX.x1=t.left)):(t.nextLine&&(t.nextLine.limitX.x1=t.left),t.nearLine&&(t.nearLine.limitX.x2=t.left))}(t);const e={type:"tree",...t.origin};d("change",e)}})))}function W(t,e="moving"){var i,n,o;const{data:l}=t.origin;m.point={x:t.left,y:t.top};let[r="",s=""]=l.time||[];if("moving"===e){const e=p(t.left);t.isLeft?r=e:s=e,l.time=[r,s],t.text&&(t.text.origin.data.time=[r,s])}m.list=[`开始时间 ${r}`,`结束时间 ${s}`,`流速 ${(null==(i=l.value)?void 0:i.currentSpeed)||""}`,`浓度 ${(null==(n=l.value)?void 0:n.consistence)||""}`,`总量 ${(null==(o=l.value)?void 0:o.total)||""}`],m.show=!0}s(f,{...u,gridYNumber:j,originY:b,yCellHeight:k,endY:G}),function(){var o;const{height:l,list:r,left:s,spaceValue:a,style:c,marginBottom:u}=S;if(!l)return;const d=[],m=X+(u?l-u:l/2),h=u?"bottom":"center";r.forEach(((t,i)=>{const n=s+i*L*a;d.push(e([n,m],{value:t.slice(11,16),originY:h,...c}))}));const v=d.length>0?new t.Group([...d],{...i,objectCaching:!1}):null;v&&f.value.add(v);const p=new t.Rect({width:w,height:l,left:0,top:X,...n,originX:"left",originY:"top",...Y});f.value.add(p);const{show:g=!0}=C;if(!g)return;const y=e([x+(w-x)/2,m],{value:"总量",...null==(o=C.data)?void 0:o.totalStyle});f.value.add(y)}(),function(){var n;const r=(null==(n=null==C?void 0:C.tree)?void 0:n.textStyle)||{},s=[];!function t(i){i.forEach((i=>{var n;const{width:a,height:u,left:d,top:m,title:h=""}=i,p={value:h,...r};(null==(n=i.children)?void 0:n.length)?(p.value=h.split("").join("\n"),t(i.children)):(p.textAlign="left",function(t){if(!(null==t?void 0:t.data)||!Array.isArray(t.data))return;const{lineStyle:e}=C.data||{},i=t.top,n=i+k,o=n-k/2,r={y1:i,y2:n,halfY:o};let s=null;const a=c(t);delete a.data,t.data.forEach(((t,i,n)=>{const{time:c,continue:f}=t,[u,d]=c,m=u&&v(u),h=d&&v(d),p=M({...r,x:m},{isCustomIcon:!h&&!f,isContinue:!1,isLeft:!0}),L=M({...r,x:h},{isCustomIcon:!1,isContinue:!!f});let X;if((p||m<g)&&(L||h>x)){X=l([p?m:g,o,L?h:x,o],e)}const C={startLine:p,centerLine:X,endLine:L};let w,Y;!function(t,e,i){const{startLine:n,centerLine:o,endLine:l}=e,{startLine:r,endLine:s}=t||{};if(n){n.origin=i;const t={x1:g,x2:l?l.left:x};s?(t.x1=s.left,s.limitX.x2=n.left,n.prevLine=s,s.nextLine=n):r&&(t.x1=r.left,r.limitX.x2=n.left,n.prevLine=r,r.nextLine=n),n.limitX=t,o&&(n.centerLine=o)}if(l){l.origin=i;const t={x1:n?n.left:g,x2:x};l.limitX=t,o&&(l.centerLine=o)}n&&l&&(n.nearLine=l,l.nearLine=n)}(s,C,Object.assign({},a,{data:t,index:i})),s&&(w=A(n[i-1],s,o)),i===n.length-1&&(Y=A(t,C,o)),s=C,X&&z.add(X),p&&z.add(p),L&&z.add(L),w&&z.add(w),Y&&z.add(Y)}))}(i),function(t){var i;if(!(null==t?void 0:t.total))return;const n=t.top+k/2,o=x+(w-x)/2,l=e([o,n],{value:t.total,...null==(i=C.data)?void 0:i.totalStyle}),r=w-Y.strokeWidth;o+l.width>r&&l.set({originX:"right",left:r});l&&f.value.add(l)}(i)),s.push(o({width:a,height:u,...Y},p,{left:d,top:m},!0))}))}(y);const a=s.length>0?new t.Group([...s],{...i,objectCaching:!1}):null;a&&f.value.add(a),z.size&&f.value.add(...z)}()}export{f as useTop};
1
+ import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawText as e,defaultStyle as i,defaultRectStyle as n,drawTextGroup as o,drawLine as l,drawPoint as r}from"../useDraw.js";import{useGrid as s}from"../useGrid.js";import{useBirthProcessCumputedPoint as a}from"../useCumputedPoint.js";import"../useEvent.js";import"vue";import{cloneDeep as c}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import"naive-ui";import"@vueuse/core";function f(f,u,d,m,h){const{computedX:v,getXValue:p}=a(u),{originX:g,endX:x,xCellWidth:L,originYXAxis:X,top:C,canvasWidth:w,borderStyle:Y,treeData:y,xAxis:S,topGridYNumber:j,topGridOriginY:b,topGridYCellHeight:k,topGridEndY:G,event:I}=u,z=new Set;function A(t,e,i){let n;const{content:o}=t.value||{};if(o){const{textStyle:l}=C.data||{},{startLine:s,endLine:a}=e;n=r(o,{fontSize:12,...l,backgroundColor:"#fff",lockMovementX:!0,lockMovementY:!0});const c=E(n,e,i);n&&(n.set(c),n.origin={data:t},$(n),s&&(s.text=n),a&&(a.text=n))}return n}function E(t,e,i){const n=t.width+1,{startLine:o,centerLine:l,endLine:r}=e,s={top:i,originX:"center",originY:"center"};return l&&n<=l.width?s.left=l.x1+l.width/2:r&&n<=r.limitX.x2-r.left?(s.originX="left",s.left=r.left+1):o&&!r&&n<=o.limitX.x2-o.left?(s.originX="left",s.left=o.left+(o.isCustomIcon?5:1)):o&&n<=o.left-o.limitX.x1?(s.originX="right",s.left=o.left-(o.isCustomIcon?5:1)):l?(s.originY="top",s.left=l.x1+l.width/2,s.top=i+1,s.fontSize=10):o&&(s.originX="left",s.originY="top",s.fontSize=10,s.left=o.left,s.top=i+1),s}function M(e,{isCustomIcon:i,isContinue:n,isLeft:o}){const{x:s,y1:a,y2:c,halfY:f}=e;if(!s||s<g||s>x)return;const{lineStyle:u}=C.data||{};let d;const m={left:s,top:f};d=i?r("circle",{fill:u.stroke,...m}):n?r(">",{fill:u.stroke,...m,fontSize:18}):l([s,a,s,f],u);const h=new t.Rect({width:L,height:k,fill:"transparent",left:s-L/2,top:a}),v=new t.Group([d,h],{originX:"center",originY:"center",hasControls:!1,hasBorders:!1,objectCaching:!1,hoverCursor:"pointer",lockMovementY:!0});return v.isLeft=o,v.isCustomIcon=i,$(v),v}function $(t){I.hovered&&(t.on("mouseover",(()=>{D(t,"hover")})),t.on("mouseout",(()=>{m.show=!1}))),t.lockMovementX&&t.lockMovementY||(t.on("moving",(()=>{!function(t){t.setCoords(),t.left<t.limitX.x1&&t.set("left",t.limitX.x1);t.left>t.limitX.x2&&t.set("left",t.limitX.x2)}(t),function(t){if(t.centerLine){const e=t.isLeft?{x1:t.left}:{x2:t.left};t.centerLine.setCoords().set(e)}if(t.text){const e=E(t.text,{startLine:t.isLeft?t:t.nearLine,centerLine:t.centerLine,endLine:t.isLeft?t.nearLine:t},t.top);t.text.setCoords().set(e)}}(t),I.hovered&&D(t)})),t.on("mouseup",(e=>{if(1===e.button){!function(t){t.isLeft?(t.prevLine&&(t.prevLine.limitX.x2=t.left),t.nearLine&&(t.nearLine.limitX.x1=t.left)):(t.nextLine&&(t.nextLine.limitX.x1=t.left),t.nearLine&&(t.nearLine.limitX.x2=t.left))}(t);const e={type:"tree",...t.origin};d("change",e)}})))}function D(t,e="moving"){var i,n,o;const{data:l}=t.origin;m.point={x:t.left,y:t.top};let[r="",s=""]=l.time||[];if("moving"===e){const e=p(t.left);t.isLeft?r=e:s=e,l.time=[r,s],t.text&&(t.text.origin.data.time=[r,s])}m.list=[`开始时间 ${r}`,`结束时间 ${s}`,`流速 ${(null==(i=l.value)?void 0:i.currentSpeed)||""}`,`浓度 ${(null==(n=l.value)?void 0:n.consistence)||""}`,`总量 ${(null==(o=l.value)?void 0:o.total)||""}`],m.sourceData=[{type:"tree",startTime:r,endTime:s,value:l.value}],m.isTarget=!0,m.show=!0}s(f,{...u,gridYNumber:j,originY:b,yCellHeight:k,endY:G}),function(){var o;const{height:l,list:r,left:s,spaceValue:a,style:c,marginBottom:u}=S;if(!l)return;const d=[],m=X+(u?l-u:l/2),h=u?"bottom":"center";r.forEach(((t,i)=>{const n=s+i*L*a;d.push(e([n,m],{value:t.slice(11,16),originY:h,...c}))}));const v=d.length>0?new t.Group([...d],{...i,objectCaching:!1}):null;v&&f.value.add(v);const p=new t.Rect({width:w,height:l,left:0,top:X,...n,originX:"left",originY:"top",...Y});f.value.add(p);const{show:g=!0}=C;if(!g)return;const y=e([x+(w-x)/2,m],{value:"总量",...null==(o=C.data)?void 0:o.totalStyle});f.value.add(y)}(),function(){var n;const r=(null==(n=null==C?void 0:C.tree)?void 0:n.textStyle)||{},s=[];!function t(i){i.forEach((i=>{var n;const{width:a,height:u,left:d,top:m,title:h=""}=i,p={value:h,...r};(null==(n=i.children)?void 0:n.length)?(p.value=h.split("").join("\n"),t(i.children)):(p.textAlign="left",function(t){if(!(null==t?void 0:t.data)||!Array.isArray(t.data))return;const{lineStyle:e}=C.data||{},i=t.top,n=i+k,o=n-k/2,r={y1:i,y2:n,halfY:o};let s=null;const a=c(t);delete a.data,t.data.forEach(((t,i,n)=>{const{time:c,continue:f}=t,[u,d]=c,m=u&&v(u),h=d&&v(d),p=M({...r,x:m},{isCustomIcon:!h&&!f,isContinue:!1,isLeft:!0}),L=M({...r,x:h},{isCustomIcon:!1,isContinue:!!f});let X;if((p||m<g)&&(L||h>x)){X=l([p?m:g,o,L?h:x,o],e)}const C={startLine:p,centerLine:X,endLine:L};let w,Y;!function(t,e,i){const{startLine:n,centerLine:o,endLine:l}=e,{startLine:r,endLine:s}=t||{};if(n){n.origin=i;const t={x1:g,x2:l?l.left:x};s?(t.x1=s.left,s.limitX.x2=n.left,n.prevLine=s,s.nextLine=n):r&&(t.x1=r.left,r.limitX.x2=n.left,n.prevLine=r,r.nextLine=n),n.limitX=t,o&&(n.centerLine=o)}if(l){l.origin=i;const t={x1:n?n.left:g,x2:x};l.limitX=t,o&&(l.centerLine=o)}n&&l&&(n.nearLine=l,l.nearLine=n)}(s,C,Object.assign({},a,{data:t,index:i})),s&&(w=A(n[i-1],s,o)),i===n.length-1&&(Y=A(t,C,o)),s=C,X&&z.add(X),p&&z.add(p),L&&z.add(L),w&&z.add(w),Y&&z.add(Y)}))}(i),function(t){var i;if(!(null==t?void 0:t.total))return;const n=t.top+k/2,o=x+(w-x)/2,l=e([o,n],{value:t.total,...null==(i=C.data)?void 0:i.totalStyle}),r=w-Y.strokeWidth;o+l.width>r&&l.set({originX:"right",left:r});l&&f.value.add(l)}(i)),s.push(o({width:a,height:u,...Y},p,{left:d,top:m},!0))}))}(y);const a=s.length>0?new t.Group([...s],{...i,objectCaching:!1}):null;a&&f.value.add(a),z.size&&f.value.add(...z)}()}export{f as useTop};
@@ -1 +1 @@
1
- import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{useShadow as t}from"./useShadow.js";import{drawLine as i,defaultStyle as n,drawPoint as o,drawText as l,drawArrow as s}from"../useDraw.js";import{useGrid as r}from"../useGrid.js";import"date-fns";import{isOneLine as u,getType as a,isOverlapPoint as c,getFloorNumber as d,isValidValue as p,setOtherType as f,isEffectiveNode as h,getTime as v,getIndex as g,deleteProperty as y}from"../../utils/index.js";import{cloneDeep as m,flatten as x,last as b}from"lodash-es";import"../useEvent.js";import{useCommon as j}from"../useCommon.js";import"vue";import"naive-ui";import"@vueuse/core";import{TEMPERATURE_MENU as w,PAIN_MENU as L,OVERLAP as k}from"../../constants/index.js";function S(S,E,M,$,O,P,C,A,I,R){r(S,E);const{getEqualXTypes:T,handleAddPrevent:V,getPointEventProps:X}=j(S,M,E),{createShadowLines:z}=t(),{left:D,xScaleList:F,xCellWidth:H,yCellHeight:_,originX:W,endX:q,originY:G,endY:B,itemList:J,event:K,vitalSignsOriginY:N,painOriginY:Q,hospitalizationDate:U,config:Z,canvasHeight:ee}=E,te=new Set,ie=["xinmai","mai"],ne=new Map,oe=new Set,le=new Set,se=new Set,re=m(D.yScaleValue);function ue(t){var o;const l=re.find((e=>"pulse"===e.type));if(l&&(null==(o=l.dataList)?void 0:o.length)&&(te.size&&S.value.remove(...te),te.clear(),ne.size>1)){if(t){const{type:e,key:i}=t.origin||{};if("pulse"===e){const e=ne.get(i),n=null==e?void 0:e.findIndex((e=>e[0]===t.left));e.splice(n,1,[t.left,t.top])}}const o=function(){const e=[],t=[],i=[];for(const e of ne)t.push(e[1]),e[0]===ie[0]&&e[1].forEach((e=>{(ne.get(ie[1])||[]).findIndex((t=>t[0]===e[0]))>-1&&i.push(e[0])}));const[n,o]=t;let l=[],s=[];return i.forEach((t=>{const i=n.findIndex((e=>e[0]===t)),r=o.findIndex((e=>e[0]===t)),u=n[i],a=o[r],c=n[i-1],d=n[i+1],p=o[r-1],f=o[r+1];if(c&&p){if(c[0]!==p[0]){const e=Math.max(c[0],p[0]);l.push([c,p].find((t=>t[0]===e)))}}else c?l.push(c):p&&s.push(p);const h=Math.min(u[1],a[1]);l.push([u,a].find((e=>e[1]===h)));const v=Math.max(u[1],a[1]);s.push([u,a].find((e=>e[1]===v)));const g=()=>{const t=[...l,...s.reverse()],[i]=t,n=b(t);i[0]===n[0]&&i[1]===n[1]&&t.splice(-1,1),e.push(t),l=[],s=[]};if(d&&f){if(d[0]!==f[0]){const e=Math.min(d[0],f[0]);l.push([d,f].find((t=>t[0]===e))),g()}}else d?(l.push(d),g()):f?(s.push(f),g()):g()})),e}(),{mode:s,style:r={}}=l.shadow||{};o.forEach((t=>{const o=t.map((e=>({x:e[0],y:e[1]}))),l=new e.Polygon(o,{...n,...r,strokeWidth:1});if(["slash","line"].includes(s)){l.set({fill:"transparent",stroke:r.stroke||"#f00"});const e=[];if(["slash"].includes(s))e.push(...z(t,r._angle,r.space)),e.forEach((e=>{Object.assign(e,{...n,...r}),te.add(e)}));else{const n=function(e){const t=e.reduce(((e,t)=>{const i=Math.trunc(t[0]);return e[i]=e[i]?e[i].concat([t]):[t],e}),{}),i=Object.values(t).filter((e=>2===e.length&&Math.trunc(e[0][1])!==Math.trunc(e[1][1])));return i}(t);n.forEach((t=>{const n=i([...x(t)],{...r,originX:"center"});e.push(n),te.add(n)}))}S.value.add(...e)}te.add(l),S.value.add(l)}))}}function ae(){var e;const t=re.find((e=>"pulse"===e.type));if(!t||!(null==(e=t.dataList)?void 0:e.length))return;if(!t.dataList.some((e=>e.title.includes("脉搏"))))return;const i=Object.assign({},k,D.overlap||{}),l=[];oe.size&&[...oe].forEach((e=>{[...le].forEach((t=>{if(t.origin&&c(e,t)){const e=t.origin.key;if(e){const s={left:t.left,top:t.top,...n,hoverCursor:"default"};let r="koumai";"yemai"===e&&(r=e),"humai"===e&&(r="circle"),l.push(o(r,{...i[e]||{},...s}))}}}))})),setTimeout((()=>{S.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),se.add(e)}))}))}function ce(e,t,r){var a;const{type:c,riseStyle:h={},noRiseStyle:v={},verifiedStyle:g={},reduceStyle:y={},pacemaker:m={},upArrowStyle:x={},limitValueStyle:b={},nonePainPointStyle:j={},belowMinValueStyle:w={},dataList:L=[],list:k=[]}=r,{type:E,textStyle:$,showConnectLine:P=!1}=j,A=[],R=[],T=[];let V=null;if(null==(a=e.list)||a.forEach(((a,j)=>{const z=u(c)?L.find((e=>e.key===a.key)):e,D=fe(a,r),F=e.list[j+1],W=F?fe(F,r):void 0,q=F?u(c)?L.find((e=>e.key===F.key)):e:{},{title:G=""}=z;if("脉搏"===G&&"脉搏"!==q.title||"脉搏"!==G&&"脉搏"===q.title||!D||!W||d(D[0],1)!==d(W[0],1))D&&V&&(D[0]=V),V=null;else{const e=D[0]-H/2;D[0]=e+H/4,W[0]=V=D[0]+H/2}const B={};B.value=function(e,t,i){if(!(null==e?void 0:e.length)||!Z.showValue)return;const{lineAttr:n={}}=i,o=e[1]<=N.originY+_?e[1]+_:e[1]-_,s=l([e[0],o],{value:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return T.push(s),{obj:s,top:-_}}(D,a,z),function(e,t,r,u){var a,d;if(!(null==e?void 0:e.length)||!["temperature","pain"].includes(c))return;const{lineAttr:f={}}=r,{value:m}=u;let x,b,j,w,L;if(t.noRise&&v.show){const t=Y(v)?O(c,k,35):e[1];if(v.text)j=l([e[0],Y(v)?t:t+5],{value:v.text.split("").join("\n"),originY:"top",...v.style});else{const i=t+2*_;j=s([e[0],t,i],{...v.style})}T.push(j)}t.rise&&h.show&&h.text&&(w=l([e[0],e[1]-(m?_:0)-5],{value:h.text.split("").join("\n"),originY:"bottom",...h.style}),T.push(w));t.verified&&(L=l([e[0],e[1]-(m?_:0)-5],{value:"v",originX:"center",originY:"bottom",...g}),T.push(L));if(p(t.physicsReduce)||p(t.drugReduce)){const l=O(c,k,null!=(a=t.physicsReduce)?a:t.drugReduce),s=l<e[1]&&(null==Z?void 0:Z.hypothermyViewCustom)?e[0]+H/2:e[0];x=i([...e,s,l],{...f,...y.line,...n}),b=o((null==(d=null==y?void 0:y.point)?void 0:d.type)||"circle",{left:s,top:l,...y.point,...n,originY:l===ee?"bottom":"center"}),x&&T.push(x),b&&T.push(b)}Object.assign(u,{reduceLine:{obj:x,type:"line"},noRiseText:{obj:j,top:v.text?5:2*_,isFixed:Y(v)},riseText:{obj:w,top:(m?-_:0)-5},verifiedText:{obj:L,top:(m?-_:0)-5},reducePoint:{obj:b,type:"reduce"}})}(D,a,z,B),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(c))return;const o=Math.max(...k),r=Math.min(...k);let u,a,d;const{upArrowShow:p=!1,limitValueShow:f=!1}=i;if(p&&+t.value>180){let t=e[1]-2.5*_,i=[e[1]-_/2,t];t<N.originY&&(t=e[1]+2.5*_,i=[t,e[1]+_/2]),u=s([e[0],i[0],i[1]],x,"up"),T.push(u)}if(f){const i={value:t.value,originX:"center",originY:"center",...b};if(+t.value>o){const t=u?e[1]+_/2+u.height:e[1]+_;a=l([e[0],t],i),T.push(a)}+t.value<r&&(a=l([e[0],e[1]-_],i),T.push(a))}if(w.show&&+t.value<r){const t=e[1];if(w.text)d=l([e[0],e[1]+5],{value:w.text.split("").join("\n"),originY:"top",...w.style});else{const i=t+2*_;d=s([e[0],t,i],{...w.style})}T.push(d)}Object.assign(n,{upArrow:{obj:u},limitValue:{obj:a,top:-_},belowMinValue:{obj:d,top:w.text?5:2*_,moveHide:!0}})}(D,a,z,B),function(n,l,s,u,a,d){let p,h;const{pointAttr:v={},lineAttr:g={},title:y="",key:x,type:b="circle"}=a,j=e.list[u+1],w=de(c,e.list[u].value),L=l&&de(c,j.value);if(n&&l&&!s.breakpoint&&(!w&&!L||P)){h=i([...n,...l],{...g});const{obj:e}=(null==d?void 0:d.reducePoint)||{};if((null==e?void 0:e.top)<n[1]&&(null==Z?void 0:Z.hypothermyViewCustom)){const t=i([e.left,e.top,...l],{...g});T.unshift(t),Object.assign(d,{reduceRightLine:{obj:t,type:"reduce"}}),h.set("stroke","transparent")}}const k=s.pacemakerShow&&"pulse"==c?m.value:w&&"number"===E?0:b,Y=R[u-1],O={origin:{data:s,title:y,key:x||"",unit:r.unit,type:c,_type:f(y,c),dataIndex:t,index:u},leftLine:Y,rightLine:h,otherObj:d,...s.pacemakerShow&&"pulse"==c?m.style:v,lockMovementX:!0,...X(),...w?{selectable:!1,evented:!1,..."number"===E?$:{}}:{}};n&&(Y?O.leftLine.set("x2",n[0]):O.leftLine=null,p=o(k,{left:n[0],top:w?n[1]-5:n[1],...O}));R.push(h),p&&(y.includes("脉搏")?oe.add(p):le.add(p),function(e){K.hovered&&(e.on("mouseover",(()=>{pe(e,"hover")})),e.on("mouseout",(()=>{I.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?Q:N;e.top<t.originY&&e.set("top",t.originY);e.top>t.endY&&e.set("top",t.endY)}(e),function(e){var t,i;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(i=e.rightLine)||i.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:i,type:n="",top:o=0,isFixed:l,moveHide:s=!1}=t||{};"reduce"!==n&&i&&("line"===n?i.setCoords().set({x1:e.left,y1:e.top}):(l||i.setCoords().set({left:e.left,top:e.top+o}),s&&(S.value.remove(i),delete e.otherObj.obj)))})),ue(e)}(e),K.hovered&&pe(e)})),e.on("mouseup",(t=>{if(I.show=!1,1===t.button){const{type:t}=e.origin,i=C(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};S.value.discardActiveObject(),M("change",n),ve(n,"change")}}))}(p),A.push(p),se.add(p))}(D,W,a,j,z,B)})),"pulse"===c){const e={};ie.forEach((t=>{e[t]=A.filter((e=>{var i;return(null==(i=e.origin)?void 0:i.key)===t}))}));let t=null;ie.forEach((i=>{ne.set(i,e[i].map(((e,i,n)=>{var o,l;const s=n[i+1];if(s&&d(e.left,1)===d(s.left,1)){const i=e.left-H/2;e.set("left",i+H/4),null==(o=e.rightLine)||o.set("x1",e.left),t=e.left+H/2,s.set("left",t)}else t&&(null==(l=e.leftLine)||l.set("x2",t),e.set("left",t)),t=null;return[e.left,e.top]})))}))}Promise.all(A).then((e=>{const t=R.filter((e=>e));Promise.all(T).then((i=>{S.value.add(...t,...e,...i),e.forEach((t=>{null==t||t.bringToFront(),function(e,t){if("pulse"===e.origin.type){t.filter((t=>t.left===e.left&&"pulse"===t.origin.type)).length>1&&(e.leftLine&&S.value.remove(e.leftLine),e.rightLine&&S.value.remove(e.rightLine))}}(t,e)}))}))}))}function de(e,t){return"pain"===e&&0==t}function pe(e,t="moving"){const{title:i,unit:n,type:o,data:l}=e.origin;I.point={x:e.left,y:e.top},I.list=[function(){const{drugReduce:s,physicsReduce:r}=l||{},u="hover"===t?l.value:C(o,e.top);if(p(s))return`药物降${"pain"==o?"痛":"温"} ${u}—>${s}${n||""}`;if(p(r))return`物理降${"pain"==o?"痛":"温"} ${u}—>${r}${n||""}`;return`${i} ${u}${n||""}`}(),`时间 ${((null==l?void 0:l.time)||P(e.left)).slice(-5)}`],I.show=!0}function fe(e,t){const i="pain"===t.type?Q:N;if(!h(e)||!function(e){const[t]=F,i=b(F),n=t.start,o=i.end,l=v(e);return l>=n&&l<=o}(e.time))return;const n=$(e.time),o=O(t.type,t.list,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}function he(e){const t=new Date,i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=v(`${t.getFullYear()}-${i}-${n} 23:59:59`),l=v(`${P(e)}:00`);return U&&l<v(U)?(V("exceedMin"),!1):!(l>o)||(V("exceedMax"),!1)}function ve(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:s}=e,r=re.find((e=>e.type===i));if("add"===t){const e=u(i)?r.dataList.find((e=>e.enable)):r.dataList[n],t=g(l.time,e.list);e.list.splice(t,0,l)}else r.dataList[n].list[o]=l;ge()}function ge(){var e;se.size&&(null==(e=S.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),Object.values((null==e?void 0:e.otherObj)||{}).forEach((e=>{(null==e?void 0:e.obj)&&t.push(null==e?void 0:e.obj)}))})),t}([...se]))),ne.clear(),se.clear(),oe.clear(),le.clear(),re.forEach((e=>{e.dataList.forEach(((t,i)=>{u(e.type)&&!t.enable||ce(t,i,e)}))})),ue(),ae()}return ne.clear(),oe.clear(),le.clear(),re.forEach((e=>{!function(e){if("temperature"!==e.type||!e.positionLine)return;const t=O(e.type,e.list,e.positionLine.value),n=i([W,t,q,t],e.positionLine);S.value.add(n)}(e),e.dataList.forEach(((t,i)=>{!t.show||u(e.type)&&!t.enable||ce(t,i,e)}))})),ue(),ae(),S.value.on("mouse:up",(e=>{const{button:t,target:i,pointer:n={}}=e;if(3===t){if(!E.event.evented)return;const{x:e=0,y:t=0}=n;if(e>=W&&e<=q&&t>=G&&t<=B){R.point={x:e,y:t},R.show=!0;const{type:o}=(null==i?void 0:i.origin)||{};if(i&&["temperature","pain"].includes(o))"temperature"===o&&(R.list=[...w]),"pain"===o&&(R.list=[...L]),R.target=i;else{R.target=null,R.list=["新增节点"],J.forEach((i=>{if(!T([...se],e,"_type").includes(i.bigType)){const e=["pain"].includes(i.bigType)?Q:N;t>=e.originY&&t<=e.endY&&R.list.push({renderItem:A?A(i):()=>i.title,origin:{title:i.title,unit:i.unit,type:a(i.bigType),dataIndex:i.dataIndex,key:i.key},pointer:n})}}));const i=he(e);i&&1!==R.list.length||(R.show=!1,1===R.list.length&&i&&V("repeat"))}}}if(1===t){if(i)return;const{x:e=0,y:t=0}=n;e>=W&&e<=q&&t>0&&t<ee&&M("click:grid",{x:e,y:t,time:P(e)})}})),{clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,dataIndex:o,index:l}=t.origin,s=y(i,[...w,...L]);s[`${e.type}`]=e.value,u(n)&&(s.key=t.origin.key);const r={...t.origin,data:s};M("change",r),ve(r,"change")}else{const t={data:{time:P(e.pointer.x),value:C(e.origin.type,e.pointer.y),...u(e.origin.type)?{key:e.origin.key}:{}},...e.origin};M("add",t),ve(t)}},setPopup:pe,isAddPoint:he,updateData:ve,redrawPoints:ge,gridPoints:se}}function Y(e){return"fixed"===e.position}export{S as useCenter};
1
+ import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{useShadow as t}from"./useShadow.js";import{drawLine as i,defaultStyle as n,drawPoint as o,drawText as l,drawArrow as s}from"../useDraw.js";import{useGrid as r}from"../useGrid.js";import"date-fns";import{isOneLine as u,getType as a,isOverlapPoint as c,getFloorNumber as d,isValidValue as p,setOtherType as f,getTime as h,isEffectiveNode as v,getIndex as g,deleteProperty as y}from"../../utils/index.js";import{cloneDeep as m,flatten as x,last as b}from"lodash-es";import"../useEvent.js";import{useCommon as j}from"../useCommon.js";import"vue";import"naive-ui";import"@vueuse/core";import{TEMPERATURE_MENU as w,PAIN_MENU as L,OVERLAP as k}from"../../constants/index.js";function S(S,E,M,$,O,P,C,A,I,R){r(S,E);const{getEqualXTypes:T,handleAddPrevent:V,getPointEventProps:X}=j(S,M,E),{createShadowLines:z}=t(),{left:D,xScaleList:F,xCellWidth:H,yCellHeight:_,originX:W,endX:q,originY:G,endY:B,itemList:J,event:K,vitalSignsOriginY:N,painOriginY:Q,hospitalizationDate:U,config:Z,canvasHeight:ee}=E,te=new Set,ie=["xinmai","mai"],ne=new Map,oe=new Set,le=new Set,se=new Set,re=m(D.yScaleValue);function ue(t){var o;const l=re.find((e=>"pulse"===e.type));if(l&&(null==(o=l.dataList)?void 0:o.length)&&(te.size&&S.value.remove(...te),te.clear(),ne.size>1)){if(t){const{type:e,key:i}=t.origin||{};if("pulse"===e){const e=ne.get(i),n=null==e?void 0:e.findIndex((e=>e[0]===t.left));e.splice(n,1,[t.left,t.top])}}const o=function(){const e=[],t=[],i=[];for(const e of ne)t.push(e[1]),e[0]===ie[0]&&e[1].forEach((e=>{(ne.get(ie[1])||[]).findIndex((t=>t[0]===e[0]))>-1&&i.push(e[0])}));const[n,o]=t;let l=[],s=[];return i.forEach((t=>{const i=n.findIndex((e=>e[0]===t)),r=o.findIndex((e=>e[0]===t)),u=n[i],a=o[r],c=n[i-1],d=n[i+1],p=o[r-1],f=o[r+1];if(c&&p){if(c[0]!==p[0]){const e=Math.max(c[0],p[0]);l.push([c,p].find((t=>t[0]===e)))}}else c?l.push(c):p&&s.push(p);const h=Math.min(u[1],a[1]);l.push([u,a].find((e=>e[1]===h)));const v=Math.max(u[1],a[1]);s.push([u,a].find((e=>e[1]===v)));const g=()=>{const t=[...l,...s.reverse()],[i]=t,n=b(t);i[0]===n[0]&&i[1]===n[1]&&t.splice(-1,1),e.push(t),l=[],s=[]};if(d&&f){if(d[0]!==f[0]){const e=Math.min(d[0],f[0]);l.push([d,f].find((t=>t[0]===e))),g()}}else d?(l.push(d),g()):f?(s.push(f),g()):g()})),e}(),{mode:s,style:r={}}=l.shadow||{};o.forEach((t=>{const o=t.map((e=>({x:e[0],y:e[1]}))),l=new e.Polygon(o,{...n,...r,strokeWidth:1});if(["slash","line"].includes(s)){l.set({fill:"transparent",stroke:r.stroke||"#f00"});const e=[];if(["slash"].includes(s))e.push(...z(t,r._angle,r.space)),e.forEach((e=>{Object.assign(e,{...n,...r}),te.add(e)}));else{const n=function(e){const t=e.reduce(((e,t)=>{const i=Math.trunc(t[0]);return e[i]=e[i]?e[i].concat([t]):[t],e}),{}),i=Object.values(t).filter((e=>2===e.length&&Math.trunc(e[0][1])!==Math.trunc(e[1][1])));return i}(t);n.forEach((t=>{const n=i([...x(t)],{...r,originX:"center"});e.push(n),te.add(n)}))}S.value.add(...e)}te.add(l),S.value.add(l)}))}}function ae(){var e;const t=re.find((e=>"pulse"===e.type));if(!t||!(null==(e=t.dataList)?void 0:e.length))return;if(!t.dataList.some((e=>e.title.includes("脉搏"))))return;const i=Object.assign({},k,D.overlap||{}),l=[];oe.size&&[...oe].forEach((e=>{[...le].forEach((t=>{if(t.origin&&c(e,t)){const e=t.origin.key;if(e){const s={left:t.left,top:t.top,...n,hoverCursor:"default"};let r="koumai";"yemai"===e&&(r=e),"humai"===e&&(r="circle"),l.push(o(r,{...i[e]||{},...s}))}}}))})),setTimeout((()=>{S.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),se.add(e)}))}))}function ce(e,t,r){var a;const{type:c,riseStyle:h={},noRiseStyle:v={},verifiedStyle:g={},reduceStyle:y={},pacemaker:m={},upArrowStyle:x={},limitValueStyle:b={},nonePainPointStyle:j={},belowMinValueStyle:w={},dataList:L=[],list:k=[]}=r,{type:E,textStyle:P,showConnectLine:A=!1}=j,R=[],T=[],V=[];let z=null;if(null==(a=e.list)||a.forEach(((a,j)=>{const D=u(c)?L.find((e=>e.key===a.key)):e,F=he(a,r),W=e.list[j+1],q=W?he(W,r):void 0,G=W?u(c)?L.find((e=>e.key===W.key)):e:{},{title:B=""}=D;if("脉搏"===B&&"脉搏"!==G.title||"脉搏"!==B&&"脉搏"===G.title||!F||!q||d(F[0],1)!==d(q[0],1))F&&z&&(F[0]=z),z=null;else{const e=F[0]-H/2;F[0]=e+H/4,q[0]=z=F[0]+H/2}const J={};J.value=function(e,t,i){if(!(null==e?void 0:e.length)||!Z.showValue)return;const{lineAttr:n={}}=i,o=e[1]<=N.originY+_?e[1]+_:e[1]-_,s=l([e[0],o],{value:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return V.push(s),{obj:s,top:-_}}(F,a,D),function(e,t,r,u){var a,d;if(!["temperature","pain"].includes(c))return;if(!(null==e?void 0:e.length)&&("pain"===c||"temperature"===c&&!fe(t.time)))return;const{lineAttr:f={}}=r,{value:m}=u,x=$(t.time);let b,j,w,L,S;if(t.noRise&&v.show){const i=Y(v,t)?O(c,k,35):(null==e?void 0:e[1])||0;if(v.text)w=l([x,Y(v,t)?i:i+5],{value:v.text.split("").join("\n"),originY:"top",...v.style}),t.value||se.add(w);else if(t.value){w=s([x,i,i+2*_],{...v.style})}w&&V.push(w)}if((null==e?void 0:e[1])&&(t.rise&&h.show&&h.text&&(L=l([x,e[1]-(m?_:0)-5],{value:h.text.split("").join("\n"),originY:"bottom",...h.style}),V.push(L)),t.verified&&(S=l([x,e[1]-(m?_:0)-5],{value:"v",originX:"center",originY:"bottom",...g}),V.push(S)),p(t.physicsReduce)||p(t.drugReduce))){const l=O(c,k,null!=(a=t.physicsReduce)?a:t.drugReduce),s=l<e[1]&&(null==Z?void 0:Z.hypothermyViewCustom)?x+H/2:x;b=i([...e,s,l],{...f,...y.line,...n}),j=o((null==(d=null==y?void 0:y.point)?void 0:d.type)||"circle",{left:s,top:l,...y.point,...n,originY:l===ee?"bottom":"center"}),b&&V.push(b),j&&V.push(j)}Object.assign(u,{reduceLine:{obj:b,type:"line"},noRiseText:{obj:w,top:v.text?5:2*_,isFixed:Y(v,t)},riseText:{obj:L,top:(m?-_:0)-5},verifiedText:{obj:S,top:(m?-_:0)-5},reducePoint:{obj:j,type:"reduce"}})}(F,a,D,J),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(c))return;const o=Math.max(...k),r=Math.min(...k);let u,a,d;const{upArrowShow:p=!1,limitValueShow:f=!1}=i;if(p&&+t.value>180){let t=e[1]-2.5*_,i=[e[1]-_/2,t];t<N.originY&&(t=e[1]+2.5*_,i=[t,e[1]+_/2]),u=s([e[0],i[0],i[1]],x,"up"),V.push(u)}if(f){const i={value:t.value,originX:"center",originY:"center",...b};if(+t.value>o){const t=u?e[1]+_/2+u.height:e[1]+_;a=l([e[0],t],i),V.push(a)}+t.value<r&&(a=l([e[0],e[1]-_],i),V.push(a))}if(w.show&&+t.value<r){const t=e[1];if(w.text)d=l([e[0],e[1]+5],{value:w.text.split("").join("\n"),originY:"top",...w.style});else{const i=t+2*_;d=s([e[0],t,i],{...w.style})}V.push(d)}Object.assign(n,{upArrow:{obj:u},limitValue:{obj:a,top:-_},belowMinValue:{obj:d,top:w.text?5:2*_,moveHide:!0}})}(F,a,D,J),function(n,l,s,u,a,d){let p,h;const{pointAttr:v={},lineAttr:g={},title:y="",key:x,type:b="circle"}=a,j=e.list[u+1],w=de(c,e.list[u].value),L=l&&de(c,j.value);if(n&&l&&!s.breakpoint&&(!w&&!L||A)){h=i([...n,...l],{...g});const{obj:e}=(null==d?void 0:d.reducePoint)||{};if((null==e?void 0:e.top)<n[1]&&(null==Z?void 0:Z.hypothermyViewCustom)){const t=i([e.left,e.top,...l],{...g});V.unshift(t),Object.assign(d,{reduceRightLine:{obj:t,type:"reduce"}}),h.set("stroke","transparent")}}const k=s.pacemakerShow&&"pulse"==c?m.value:w&&"number"===E?0:b,Y=T[u-1],$={origin:{data:s,title:y,key:x||"",unit:r.unit,type:c,_type:f(y,c),dataIndex:t,index:u},leftLine:Y,rightLine:h,otherObj:d,...s.pacemakerShow&&"pulse"==c?m.style:v,lockMovementX:!0,...X(),...w?{selectable:!1,evented:!1,..."number"===E?P:{}}:{}};n&&(Y?$.leftLine.set("x2",n[0]):$.leftLine=null,p=o(k,{left:n[0],top:w?n[1]-5:n[1],...$}));T.push(h),p&&(y.includes("脉搏")?oe.add(p):le.add(p),function(e){K.hovered&&(e.on("mouseover",(()=>{pe(e,"hover")})),e.on("mouseout",(()=>{I.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?Q:N;e.top<t.originY&&e.set("top",t.originY);e.top>t.endY&&e.set("top",t.endY)}(e),function(e){var t,i;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(i=e.rightLine)||i.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:i,type:n="",top:o=0,isFixed:l,moveHide:s=!1}=t||{};"reduce"!==n&&i&&("line"===n?i.setCoords().set({x1:e.left,y1:e.top}):(l||i.setCoords().set({left:e.left,top:e.top+o}),s&&(S.value.remove(i),delete e.otherObj.obj)))})),ue(e)}(e),K.hovered&&pe(e)})),e.on("mouseup",(t=>{if(I.show=!1,1===t.button){const{type:t}=e.origin,i=C(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};S.value.discardActiveObject(),M("change",n),ge(n,"change")}}))}(p),R.push(p),se.add(p))}(F,q,a,j,D,J)})),"pulse"===c){const e={};ie.forEach((t=>{e[t]=R.filter((e=>{var i;return(null==(i=e.origin)?void 0:i.key)===t}))}));let t=null;ie.forEach((i=>{ne.set(i,e[i].map(((e,i,n)=>{var o,l;const s=n[i+1];if(s&&d(e.left,1)===d(s.left,1)){const i=e.left-H/2;e.set("left",i+H/4),null==(o=e.rightLine)||o.set("x1",e.left),t=e.left+H/2,s.set("left",t)}else t&&(null==(l=e.leftLine)||l.set("x2",t),e.set("left",t)),t=null;return[e.left,e.top]})))}))}Promise.all(R).then((e=>{const t=T.filter((e=>e));Promise.all(V).then((i=>{S.value.add(...t,...e,...i),e.forEach((t=>{null==t||t.bringToFront(),function(e,t){if("pulse"===e.origin.type){t.filter((t=>t.left===e.left&&"pulse"===t.origin.type)).length>1&&(e.leftLine&&S.value.remove(e.leftLine),e.rightLine&&S.value.remove(e.rightLine))}}(t,e)}))}))}))}function de(e,t){return"pain"===e&&0==t}function pe(e,t="moving"){const{title:i,unit:n,type:o,data:l}=e.origin;I.point={x:e.left,y:e.top},I.list=[function(){const{drugReduce:s,physicsReduce:r}=l||{},u="hover"===t?l.value:C(o,e.top);if(p(s))return`药物降${"pain"==o?"痛":"温"} ${u}—>${s}${n||""}`;if(p(r))return`物理降${"pain"==o?"痛":"温"} ${u}—>${r}${n||""}`;return`${i} ${u}${n||""}`}(),`时间 ${((null==l?void 0:l.time)||P(e.left)).slice(-5)}`],I.show=!0}function fe(e){const[t]=F,i=b(F),n=t.start,o=i.end,l=h(e);return l>=n&&l<=o}function he(e,t){const i="pain"===t.type?Q:N;if(!v(e)||!fe(e.time))return;const n=$(e.time),o=O(t.type,t.list,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}function ve(e){const t=new Date,i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=h(`${t.getFullYear()}-${i}-${n} 23:59:59`),l=h(`${P(e)}:00`);return U&&l<h(U)?(V("exceedMin"),!1):!(l>o)||(V("exceedMax"),!1)}function ge(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:s}=e,r=re.find((e=>e.type===i));if("add"===t){const e=u(i)?r.dataList.find((e=>e.enable)):r.dataList[n],t=g(l.time,e.list);e.list.splice(t,0,l)}else r.dataList[n].list[o]=l;ye()}function ye(){var e;se.size&&(null==(e=S.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),Object.values((null==e?void 0:e.otherObj)||{}).forEach((e=>{(null==e?void 0:e.obj)&&t.push(null==e?void 0:e.obj)}))})),t}([...se]))),ne.clear(),se.clear(),oe.clear(),le.clear(),re.forEach((e=>{e.dataList.forEach(((t,i)=>{u(e.type)&&!t.enable||ce(t,i,e)}))})),ue(),ae()}return ne.clear(),oe.clear(),le.clear(),re.forEach((e=>{!function(e){if("temperature"!==e.type||!e.positionLine)return;const t=O(e.type,e.list,e.positionLine.value),n=i([W,t,q,t],e.positionLine);S.value.add(n)}(e),e.dataList.forEach(((t,i)=>{!t.show||u(e.type)&&!t.enable||ce(t,i,e)}))})),ue(),ae(),S.value.on("mouse:up",(e=>{const{button:t,target:i,pointer:n={}}=e;if(3===t){if(!E.event.evented)return;const{x:e=0,y:t=0}=n;if(e>=W&&e<=q&&t>=G&&t<=B){R.point={x:e,y:t},R.show=!0;const{type:o}=(null==i?void 0:i.origin)||{};if(i&&["temperature","pain"].includes(o))"temperature"===o&&(R.list=[...w]),"pain"===o&&(R.list=[...L]),R.target=i;else{R.target=null,R.list=["新增节点"],J.forEach((i=>{if(!T([...se],e,"_type").includes(i.bigType)){const e=["pain"].includes(i.bigType)?Q:N;t>=e.originY&&t<=e.endY&&R.list.push({renderItem:A?A(i):()=>i.title,origin:{title:i.title,unit:i.unit,type:a(i.bigType),dataIndex:i.dataIndex,key:i.key},pointer:n})}}));const i=ve(e);i&&1!==R.list.length||(R.show=!1,1===R.list.length&&i&&V("repeat"))}}}if(1===t){if(i)return;const{x:e=0,y:t=0}=n;e>=W&&e<=q&&t>0&&t<ee&&M("click:grid",{x:e,y:t,time:P(e)})}})),{clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,dataIndex:o,index:l}=t.origin,s=y(i,[...w,...L]);s[`${e.type}`]=e.value,u(n)&&(s.key=t.origin.key);const r={...t.origin,data:s};M("change",r),ge(r,"change")}else{const t={data:{time:P(e.pointer.x),value:C(e.origin.type,e.pointer.y),...u(e.origin.type)?{key:e.origin.key}:{}},...e.origin};M("add",t),ge(t)}},setPopup:pe,isAddPoint:ve,updateData:ge,redrawPoints:ye,gridPoints:se}}function Y(e,t){return"fixed"===e.position||!t.value&&0!==t.value}export{S as useCenter};
@@ -1,7 +1,8 @@
1
1
  import { type Ref } from 'vue';
2
2
  import { fabric } from '../../../shared/utils/fabricjs';
3
3
  import { AnyObject } from '../../../shared/types';
4
- export declare type IType = 'temperature' | 'birthProcess' | 'surgicalAnesthesia' | 'electrocardiogram' | undefined;
4
+ export declare type IType = 'temperature' | 'birthProcess' | 'surgicalAnesthesia' | 'electrocardiogram' | 'newBirthProcess' | undefined;
5
+ export declare type ILineCoordinate = [number, number, number, number];
5
6
  interface IEvent {
6
7
  selectable: boolean;
7
8
  evented: boolean;
@@ -31,7 +32,7 @@ interface IGrid {
31
32
  subSecondXCell: number;
32
33
  mainYCell: number;
33
34
  subYCell: number;
34
- surplusCell: [number, number, number, number];
35
+ surplusCell: ILineCoordinate;
35
36
  mainLineStyle?: ImainLineStyle;
36
37
  subLineStyle?: fabric.ILineOptions;
37
38
  subSecondLineStyle?: fabric.ILineOptions;
@@ -79,7 +80,7 @@ export interface IPropItems {
79
80
  itemList: Array<any>;
80
81
  getRightInfo: AnyObject;
81
82
  config: AnyObject;
82
- surplusCell: [number, number, number, number];
83
+ surplusCell: ILineCoordinate;
83
84
  }
84
85
  export interface IPoint {
85
86
  time: string;
@@ -169,6 +170,9 @@ export declare type IPointTipProps = {
169
170
  show: boolean;
170
171
  point: ICoordinateValue;
171
172
  list: Array<string>;
173
+ movable: boolean;
174
+ sourceData: AnyObject[];
175
+ isTarget: boolean;
172
176
  };
173
177
  export declare type IPointMenuProps = Pick<IPointTipProps, 'show' | 'point'> & {
174
178
  list: Array<any>;
@@ -1 +1 @@
1
- .c-fabric-chart{position:relative;user-select:none}.c-fabric-chart-popup-menu,.c-fabric-chart-popup-tip{display:flex;flex-flow:column nowrap;font-size:12px;margin:0;padding:8px 12px;position:absolute;z-index:1001}.c-fabric-chart-popup-menu>li,.c-fabric-chart-popup-tip>li{list-style:none}.c-fabric-chart-popup-tip{background:rgba(0,0,0,.7);border-radius:4px}.c-fabric-chart-popup-tip>li{color:#fff}.c-fabric-chart-popup-menu{background:#fff;border:1px solid #e2e6ed;border-radius:2px;box-shadow:0 2px 12px 0 rgba(56,56,56,.2);padding:8px 5px!important;z-index:1001}.c-fabric-chart-popup-menu>li{background:#fff;cursor:pointer;padding:5px}.c-fabric-chart-popup-menu>li:hover{background:#f0f7ff}.c-fabric-chart-popup-menu>li.no-click{cursor:default}.c-fabric-chart-popup-menu>li.no-click:hover{background:#fff}
1
+ .c-fabric-chart{position:relative;user-select:none}.c-fabric-chart-popup{font-size:12px;margin:0;position:absolute;z-index:1001}.c-fabric-chart-popup li{list-style:none}.c-fabric-chart-popup__tip{color:#000}.c-fabric-chart-popup__tip .default-box{background:rgba(0,0,0,.7);border-radius:4px;display:flex;flex-flow:column nowrap;margin:0;padding:8px 12px}.c-fabric-chart-popup__tip .default-box>li{color:#fff}.c-fabric-chart-popup__menu{background:#fff;border:1px solid #e2e6ed;border-radius:2px;box-shadow:0 2px 12px 0 rgba(56,56,56,.2);display:flex;flex-flow:column nowrap;padding:8px 5px!important}.c-fabric-chart-popup__menu>li{background:#fff;cursor:pointer;padding:5px}.c-fabric-chart-popup__menu>li:hover{background:#f0f7ff}.c-fabric-chart-popup__menu>li.no-click{cursor:default}.c-fabric-chart-popup__menu>li.no-click:hover{background:#fff}
@@ -1307,6 +1307,7 @@ declare const _default: import("vue").DefineComponent<{
1307
1307
  datePickerRef: import("vue").Ref<AnyObject | null>;
1308
1308
  panelInstRef: import("vue").Ref<null>;
1309
1309
  placeholderRef: import("vue").Ref<any>;
1310
+ oldValue: string;
1310
1311
  currentFormattedValue: import("vue").WritableComputedRef<(string | [string, string]) | null | undefined>;
1311
1312
  isDateTime: import("vue").ComputedRef<boolean>;
1312
1313
  formatRef: import("vue").ComputedRef<string>;
@@ -1317,6 +1318,7 @@ declare const _default: import("vue").DefineComponent<{
1317
1318
  onUpdateShow: (show: boolean) => Promise<void>;
1318
1319
  onConfirm: (...args: any[]) => Promise<void>;
1319
1320
  isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
1321
+ setShortcutValue: (type: "month" | "week") => Promise<void>;
1320
1322
  NDatePicker: any;
1321
1323
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formatted-value"[], "update:formatted-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1322
1324
  updateUnchangedValue: {
@@ -1574,6 +1576,7 @@ declare const _default: import("vue").DefineComponent<{
1574
1576
  datePickerRef: import("vue").Ref<AnyObject | null>;
1575
1577
  panelInstRef: import("vue").Ref<null>;
1576
1578
  placeholderRef: import("vue").Ref<any>;
1579
+ oldValue: string;
1577
1580
  currentFormattedValue: import("vue").WritableComputedRef<(string | [string, string]) | null | undefined>;
1578
1581
  isDateTime: import("vue").ComputedRef<boolean>;
1579
1582
  formatRef: import("vue").ComputedRef<string>;
@@ -1584,6 +1587,7 @@ declare const _default: import("vue").DefineComponent<{
1584
1587
  onUpdateShow: (show: boolean) => Promise<void>;
1585
1588
  onConfirm: (...args: any[]) => Promise<void>;
1586
1589
  isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
1590
+ setShortcutValue: (type: "month" | "week") => Promise<void>;
1587
1591
  NDatePicker: any;
1588
1592
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formatted-value"[], "update:formatted-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1589
1593
  updateUnchangedValue: {
@@ -129,6 +129,7 @@ declare const _default: import("vue").DefineComponent<{
129
129
  datePickerRef: import("vue").Ref<AnyObject | null>;
130
130
  panelInstRef: import("vue").Ref<null>;
131
131
  placeholderRef: import("vue").Ref<any>;
132
+ oldValue: string;
132
133
  currentFormattedValue: import("vue").WritableComputedRef<(string | [string, string]) | null | undefined>;
133
134
  isDateTime: import("vue").ComputedRef<boolean>;
134
135
  formatRef: import("vue").ComputedRef<string>;
@@ -139,6 +140,7 @@ declare const _default: import("vue").DefineComponent<{
139
140
  onUpdateShow: (show: boolean) => Promise<void>;
140
141
  onConfirm: (...args: any[]) => Promise<void>;
141
142
  isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
143
+ setShortcutValue: (type: "month" | "week") => Promise<void>;
142
144
  NDatePicker: any;
143
145
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formatted-value"[], "update:formatted-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
144
146
  updateUnchangedValue: {
@@ -847,6 +847,7 @@ declare const _default: import("vue").DefineComponent<{
847
847
  datePickerRef: import("vue").Ref<AnyObject | null>;
848
848
  panelInstRef: import("vue").Ref<null>;
849
849
  placeholderRef: import("vue").Ref<any>;
850
+ oldValue: string;
850
851
  currentFormattedValue: import("vue").WritableComputedRef<(string | [string, string]) | null | undefined>;
851
852
  isDateTime: import("vue").ComputedRef<boolean>;
852
853
  formatRef: import("vue").ComputedRef<string>;
@@ -857,6 +858,7 @@ declare const _default: import("vue").DefineComponent<{
857
858
  onUpdateShow: (show: boolean) => Promise<void>;
858
859
  onConfirm: (...args: any[]) => Promise<void>;
859
860
  isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
861
+ setShortcutValue: (type: "month" | "week") => Promise<void>;
860
862
  NDatePicker: any;
861
863
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formatted-value"[], "update:formatted-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
862
864
  updateUnchangedValue: {
@@ -1114,6 +1116,7 @@ declare const _default: import("vue").DefineComponent<{
1114
1116
  datePickerRef: import("vue").Ref<AnyObject | null>;
1115
1117
  panelInstRef: import("vue").Ref<null>;
1116
1118
  placeholderRef: import("vue").Ref<any>;
1119
+ oldValue: string;
1117
1120
  currentFormattedValue: import("vue").WritableComputedRef<(string | [string, string]) | null | undefined>;
1118
1121
  isDateTime: import("vue").ComputedRef<boolean>;
1119
1122
  formatRef: import("vue").ComputedRef<string>;
@@ -1124,6 +1127,7 @@ declare const _default: import("vue").DefineComponent<{
1124
1127
  onUpdateShow: (show: boolean) => Promise<void>;
1125
1128
  onConfirm: (...args: any[]) => Promise<void>;
1126
1129
  isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
1130
+ setShortcutValue: (type: "month" | "week") => Promise<void>;
1127
1131
  NDatePicker: any;
1128
1132
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formatted-value"[], "update:formatted-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1129
1133
  updateUnchangedValue: {
@@ -227,6 +227,7 @@ declare const _default: import("vue").DefineComponent<{
227
227
  datePickerRef: import("vue").Ref<AnyObject | null>;
228
228
  panelInstRef: import("vue").Ref<null>;
229
229
  placeholderRef: import("vue").Ref<any>;
230
+ oldValue: string;
230
231
  currentFormattedValue: import("vue").WritableComputedRef<(string | [string, string]) | null | undefined>;
231
232
  isDateTime: import("vue").ComputedRef<boolean>;
232
233
  formatRef: import("vue").ComputedRef<string>;
@@ -237,6 +238,7 @@ declare const _default: import("vue").DefineComponent<{
237
238
  onUpdateShow: (show: boolean) => Promise<void>;
238
239
  onConfirm: (...args: any[]) => Promise<void>;
239
240
  isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
241
+ setShortcutValue: (type: "month" | "week") => Promise<void>;
240
242
  NDatePicker: any;
241
243
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:formatted-value"[], "update:formatted-value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
242
244
  updateUnchangedValue: {