cnhis-design-vue 3.1.44-release.5 → 3.1.45-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (360) hide show
  1. package/README.md +87 -87
  2. package/es/components/base-search/index.d.ts +0 -6
  3. package/es/components/base-search/src/index.vue.d.ts +0 -6
  4. package/es/components/base-search/src/index.vue.js +1 -1
  5. package/es/components/big-table/src/BigTable.vue.js +1 -1
  6. package/es/components/big-table/src/components/NoData.vue.js +1 -1
  7. package/es/components/big-table/src/components/edit-form/edit-separate.vue.js +1 -1
  8. package/es/components/big-table/src/components/input-button.vue.js +1 -1
  9. package/es/components/big-table/src/components/separate.vue.js +1 -1
  10. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  11. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.js +1 -1
  12. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  13. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  14. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  15. package/es/components/button-print/src/ButtonPrint.vue.js +1 -1
  16. package/es/components/button-print/src/components/EditFormat.vue.js +1 -1
  17. package/es/components/button-print/src/components/IdentityVerification.vue.js +1 -1
  18. package/es/components/button-print/src/components/Preview.vue.js +1 -1
  19. package/es/components/classification/index.d.ts +553 -75
  20. package/es/components/classification/src/components/search-filter/index.vue.d.ts +551 -61
  21. package/es/components/classification/src/components/search-filter/index.vue.js +1 -1
  22. package/es/components/classification/src/components/set-classification/index.vue.d.ts +553 -75
  23. package/es/components/classification/src/components/set-classification/index.vue.js +1 -1
  24. package/es/components/classification/src/components/table-modal/index.vue.d.ts +1 -1
  25. package/es/components/classification/src/components/table-modal/index.vue.js +1 -1
  26. package/es/components/classification/src/const/index.d.ts +2 -2
  27. package/es/components/classification/src/index.vue.d.ts +553 -75
  28. package/es/components/classification/src/index.vue.js +1 -1
  29. package/es/components/classification/style/index.css +1 -1
  30. package/es/components/date-picker/src/DatePicker.vue.js +1 -1
  31. package/es/components/fabric-chart/index.d.ts +5 -41
  32. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +5 -41
  33. package/es/components/fabric-chart/src/FabricChart.vue.js +1 -1
  34. package/es/components/fabric-chart/src/components/PopupTip.vue.js +1 -1
  35. package/es/components/fabric-chart/src/hooks/{useBirthProcess.d.ts → birthProcess/useBirthProcess.d.ts} +2 -2
  36. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -0
  37. package/es/components/fabric-chart/src/hooks/{useBirthProcessChart.d.ts → birthProcess/useBirthProcessChart.d.ts} +3 -3
  38. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -0
  39. package/es/components/fabric-chart/src/hooks/index.d.ts +5 -7
  40. package/es/components/fabric-chart/src/hooks/index.js +1 -1
  41. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts +6 -0
  42. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -0
  43. package/es/components/fabric-chart/src/hooks/temperature/index.d.ts +6 -0
  44. package/es/components/fabric-chart/src/hooks/temperature/index.js +1 -0
  45. package/es/components/fabric-chart/src/hooks/temperature/useBottom.d.ts +4 -0
  46. package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -0
  47. package/es/components/fabric-chart/src/hooks/{useCenter.d.ts → temperature/useCenter.d.ts} +3 -3
  48. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -0
  49. package/es/components/fabric-chart/src/hooks/{useLeft.d.ts → temperature/useLeft.d.ts} +3 -3
  50. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -0
  51. package/es/components/fabric-chart/src/hooks/temperature/useOther.d.ts +4 -0
  52. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -0
  53. package/es/components/fabric-chart/src/hooks/temperature/useRight.d.ts +4 -0
  54. package/es/components/fabric-chart/src/hooks/temperature/useRight.js +1 -0
  55. package/es/components/fabric-chart/src/hooks/{useShadow.d.ts → temperature/useShadow.d.ts} +1 -1
  56. package/es/components/fabric-chart/src/hooks/temperature/useShadow.js +1 -0
  57. package/es/components/fabric-chart/src/hooks/{useTemperatureChart.d.ts → temperature/useTemperatureChart.d.ts} +3 -3
  58. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -0
  59. package/es/components/fabric-chart/src/hooks/temperature/useTop.d.ts +4 -0
  60. package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -0
  61. package/es/components/fabric-chart/src/hooks/useCommon.d.ts +1 -1
  62. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
  63. package/es/components/fabric-chart/src/hooks/useDraw.d.ts +1 -1
  64. package/es/components/fabric-chart/src/hooks/useDraw.js +1 -1
  65. package/es/components/fabric-chart/src/hooks/useEvent.d.ts +1 -1
  66. package/es/components/fabric-chart/src/hooks/useEvent.js +1 -1
  67. package/es/components/fabric-chart/src/hooks/useGrid.d.ts +2 -2
  68. package/es/components/fabric-chart/src/hooks/useGrid.js +1 -1
  69. package/es/components/fabric-chart/src/hooks/useScaleColumn.d.ts +1 -1
  70. package/es/components/fabric-chart/src/hooks/useScaleColumn.js +1 -1
  71. package/es/components/fabric-chart/src/interface.d.ts +3 -3
  72. package/es/components/fabric-chart/src/utils/index.js +1 -1
  73. package/es/components/field-set/src/FieldSet.vue.js +1 -1
  74. package/es/components/form-config/index.d.ts +0 -2
  75. package/es/components/form-config/src/FormConfig.vue.d.ts +0 -2
  76. package/es/components/form-config/src/FormConfig.vue.js +1 -1
  77. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +0 -1
  78. package/es/components/form-config/src/components/FormConfigCreator.vue.js +1 -1
  79. package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -1
  80. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +0 -1
  81. package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -1
  82. package/es/components/form-config/src/components/renderer/CloseButton.vue.js +1 -1
  83. package/es/components/form-config/src/components/renderer/ComplexNode.vue.js +1 -1
  84. package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
  85. package/es/components/form-render/index.d.ts +0 -1
  86. package/es/components/form-render/src/FormRender.vue.d.ts +0 -1
  87. package/es/components/form-render/src/FormRender.vue.js +1 -1
  88. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +0 -1
  89. package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -1
  90. package/es/components/form-render/src/components/renderer/combination.js +1 -1
  91. package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +77 -0
  92. package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +93 -0
  93. package/es/components/form-render/src/components/renderer/formItem.js +1 -1
  94. package/es/components/form-render/src/components/renderer/input.d.ts +4 -4
  95. package/es/components/form-render/src/components/renderer/input.js +1 -1
  96. package/es/components/form-render/src/components/renderer/inputNumber.d.ts +4 -4
  97. package/es/components/form-render/src/components/renderer/inputNumber.js +1 -1
  98. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
  99. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.js +1 -1
  100. package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
  101. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  102. package/es/components/form-render/src/components/renderer/select.js +1 -1
  103. package/es/components/form-render/src/components/tooltipMessage.vue.js +1 -1
  104. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
  105. package/es/components/form-render/src/types/index.d.ts +2 -0
  106. package/es/components/guide/src/renderer.js +1 -1
  107. package/es/components/iho-select-label/src/LabelFormContent.vue.js +1 -1
  108. package/es/components/iho-select-label/src/SelectLabel.vue.js +1 -1
  109. package/es/components/iho-select-label/src/components/label-classify.vue.js +1 -1
  110. package/es/components/iho-table/index.d.ts +2 -0
  111. package/es/components/iho-table/src/IhoTable.vue.d.ts +2 -0
  112. package/es/components/iho-table/src/IhoTable.vue.js +1 -1
  113. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +1 -0
  114. package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +3 -0
  115. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.js +1 -1
  116. package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +3 -0
  117. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -1
  118. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +3 -0
  119. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -1
  120. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -1
  121. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.d.ts +3 -4
  122. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -1
  123. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
  124. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  125. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  126. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.js +1 -1
  127. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
  128. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
  129. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -1
  130. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
  131. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +3 -0
  132. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +3 -0
  133. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -1
  134. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/dist/index.d.ts +3 -0
  135. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
  136. package/es/components/iho-table/src/types/index.d.ts +1 -0
  137. package/es/components/iho-table/src/utils/dist/index.d.ts +44 -0
  138. package/es/components/iho-table/src/utils/index.js +1 -1
  139. package/es/components/iho-table/style/index.css +1 -1
  140. package/es/components/index.css +1 -1
  141. package/es/components/index.d.ts +2 -1
  142. package/es/components/index.js +1 -1
  143. package/es/components/info-header/index.d.ts +8 -2
  144. package/es/components/info-header/src/InfoHeader.vue.d.ts +8 -2
  145. package/es/components/info-header/src/InfoHeader.vue.js +1 -1
  146. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.js +1 -1
  147. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.js +1 -1
  148. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +1 -1
  149. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.js +1 -1
  150. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +0 -1
  151. package/es/components/info-header/src/components/infoDescription/index.vue.js +1 -1
  152. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +0 -1
  153. package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
  154. package/es/components/keyboard/src/Keyboard.vue.js +1 -1
  155. package/es/components/keyboard/src/components/InputNumber.vue.js +1 -1
  156. package/es/components/keyboard/src/components/NumberPanel.vue.js +1 -1
  157. package/es/components/map/src/Map.vue.js +1 -1
  158. package/es/components/picture-clipper/index.d.ts +59 -0
  159. package/es/components/picture-clipper/index.js +1 -0
  160. package/es/components/picture-clipper/src/PictureClipper.vue.d.ts +59 -0
  161. package/es/components/picture-clipper/src/PictureClipper.vue.js +1 -0
  162. package/es/components/picture-clipper/style/index.css +1 -0
  163. package/es/components/quick-search/index.d.ts +0 -6
  164. package/es/components/quick-search/src/index.vue.d.ts +0 -6
  165. package/es/components/quick-search/src/index.vue.js +1 -1
  166. package/es/components/quick-search/style/index.css +1 -1
  167. package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -1
  168. package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -1
  169. package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -1
  170. package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -1
  171. package/es/components/scale-view/src/ScaleView.vue.js +1 -1
  172. package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -1
  173. package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -1
  174. package/es/components/scale-view/src/components/EvaluatePage.vue.js +1 -1
  175. package/es/components/scale-view/src/components/LoadingCom.vue.js +1 -1
  176. package/es/components/scale-view/src/components/NoData.vue.js +1 -1
  177. package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +36 -0
  178. package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +36 -0
  179. package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +82 -0
  180. package/es/components/search-cascader/src/SearchCascader.vue.js +1 -1
  181. package/es/components/search-cascader/src/components/SearchMenu.js +1 -1
  182. package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +57 -0
  183. package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +57 -0
  184. package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
  185. package/es/components/select-label/src/SelectLabel.vue.js +1 -1
  186. package/es/components/select-label/src/components/label-classify.vue.js +1 -1
  187. package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
  188. package/es/components/select-person/src/SearchMultiple.vue.js +1 -1
  189. package/es/components/select-person/src/SelectPerson.vue.js +1 -1
  190. package/es/components/shortcut-provider/src/ShortcutProvider.vue.js +1 -1
  191. package/es/components/shortcut-setter/index.d.ts +0 -1
  192. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +0 -1
  193. package/es/components/shortcut-setter/src/ShortcutSetter.vue.js +1 -1
  194. package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.js +1 -1
  195. package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
  196. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +551 -48
  197. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -1
  198. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +134 -0
  199. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.js +1 -0
  200. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +140 -0
  201. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.js +1 -0
  202. package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue.d.ts +28 -0
  203. package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue.js +1 -0
  204. package/es/components/table-filter/src/components/classify-filter/components/InputNumber.vue.d.ts +28 -0
  205. package/es/components/table-filter/src/components/classify-filter/components/InputNumber.vue.js +1 -0
  206. package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue.d.ts +54 -0
  207. package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue.js +1 -0
  208. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.d.ts +61 -0
  209. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.js +1 -0
  210. package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue.d.ts +68 -0
  211. package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue.js +1 -0
  212. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue.d.ts +47 -0
  213. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue.js +1 -0
  214. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +551 -0
  215. package/es/components/table-filter/src/components/classify-filter/components/index.js +1 -0
  216. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +551 -48
  217. package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -1
  218. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +1 -1
  219. package/es/components/table-filter/src/components/render-widget/components/Date.vue.js +1 -1
  220. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.js +1 -1
  221. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.js +1 -1
  222. package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue.js +1 -1
  223. package/es/components/table-filter/src/components/render-widget/components/{Label.vue.d.ts → LabelInner.vue.d.ts} +1 -9
  224. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue.js +1 -0
  225. package/es/components/table-filter/src/components/render-widget/components/{SelectLabel.vue.d.ts → LabelOut.vue.d.ts} +1 -9
  226. package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue.js +1 -0
  227. package/es/components/table-filter/src/components/render-widget/components/Select.vue.d.ts +1 -9
  228. package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -1
  229. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +713 -8
  230. package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
  231. package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +0 -6
  232. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  233. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +3 -27
  234. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  235. package/es/components/table-filter/src/constants/index.d.ts +3 -0
  236. package/es/components/table-filter/src/constants/index.js +1 -0
  237. package/es/components/table-filter/src/tool/baseOptions.d.ts +4 -0
  238. package/es/components/table-filter/src/tool/baseOptions.js +1 -1
  239. package/es/components/table-filter/src/tool/transformData.d.ts +1 -0
  240. package/es/components/table-filter/src/tool/transformData.js +1 -1
  241. package/es/components/table-filter/src/types/enums.d.ts +1 -0
  242. package/es/components/table-filter/src/types/enums.js +1 -1
  243. package/es/components/time-line/src/TimeLine.vue.js +1 -1
  244. package/es/components/time-picker/src/TimePicker.vue.js +1 -1
  245. package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.js +1 -1
  246. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -1
  247. package/es/env.d.ts +25 -25
  248. package/es/shared/components/SelectPage/SelectPage.vue.js +1 -1
  249. package/es/shared/components/SvgIcon/SvgIcon.vue.js +1 -1
  250. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -1
  251. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  252. package/es/shared/components/no-data/NoData.vue.js +1 -1
  253. package/es/shared/package.json.js +1 -1
  254. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  255. package/es/shared/utils/fabricjs/index.js +1 -0
  256. package/es/shared/utils/tapable/index.d.ts +139 -0
  257. package/package.json +2 -2
  258. package/es/components/base-search/src/index.vue2.js +0 -1
  259. package/es/components/big-table/src/components/NoData.vue2.js +0 -1
  260. package/es/components/big-table/src/components/edit-form/edit-separate.vue2.js +0 -1
  261. package/es/components/big-table/src/components/input-button.vue2.js +0 -1
  262. package/es/components/big-table/src/components/separate.vue2.js +0 -1
  263. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue2.js +0 -1
  264. package/es/components/button-print/src/components/EditFormat.vue2.js +0 -1
  265. package/es/components/button-print/src/components/IdentityVerification.vue2.js +0 -1
  266. package/es/components/classification/src/components/search-filter/index.vue2.js +0 -1
  267. package/es/components/classification/src/components/set-classification/index.vue2.js +0 -1
  268. package/es/components/classification/src/components/table-modal/index.vue2.js +0 -1
  269. package/es/components/classification/src/index.vue2.js +0 -1
  270. package/es/components/date-picker/src/DatePicker.vue2.js +0 -1
  271. package/es/components/fabric-chart/src/FabricChart.vue2.js +0 -1
  272. package/es/components/fabric-chart/src/components/PopupTip.vue2.js +0 -1
  273. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +0 -1
  274. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +0 -1
  275. package/es/components/fabric-chart/src/hooks/useBottom.d.ts +0 -4
  276. package/es/components/fabric-chart/src/hooks/useBottom.js +0 -1
  277. package/es/components/fabric-chart/src/hooks/useCenter.js +0 -1
  278. package/es/components/fabric-chart/src/hooks/useLeft.js +0 -1
  279. package/es/components/fabric-chart/src/hooks/useOther.d.ts +0 -4
  280. package/es/components/fabric-chart/src/hooks/useOther.js +0 -1
  281. package/es/components/fabric-chart/src/hooks/useRight.d.ts +0 -4
  282. package/es/components/fabric-chart/src/hooks/useRight.js +0 -1
  283. package/es/components/fabric-chart/src/hooks/useShadow.js +0 -1
  284. package/es/components/fabric-chart/src/hooks/useTemperatureChart.js +0 -1
  285. package/es/components/fabric-chart/src/hooks/useTop.d.ts +0 -4
  286. package/es/components/fabric-chart/src/hooks/useTop.js +0 -1
  287. package/es/components/fabric-chart/src/utils/utils.js +0 -1
  288. package/es/components/field-set/src/FieldSet.vue2.js +0 -1
  289. package/es/components/form-config/src/FormConfig.vue2.js +0 -1
  290. package/es/components/form-config/src/components/FormConfigCreator.vue2.js +0 -1
  291. package/es/components/form-config/src/components/FormConfigDragDisplay.vue2.js +0 -1
  292. package/es/components/form-config/src/components/FormConfigEdit.vue2.js +0 -1
  293. package/es/components/form-config/src/components/renderer/CloseButton.vue2.js +0 -1
  294. package/es/components/form-config/src/components/renderer/ComplexNode.vue2.js +0 -1
  295. package/es/components/form-config/src/components/renderer/DefaultNode.vue2.js +0 -1
  296. package/es/components/form-render/src/FormRender.vue2.js +0 -1
  297. package/es/components/form-render/src/FormRenderWrapper.vue2.js +0 -1
  298. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue2.js +0 -1
  299. package/es/components/form-render/src/components/tooltipMessage.vue2.js +0 -1
  300. package/es/components/iho-select-label/src/LabelFormContent.vue2.js +0 -1
  301. package/es/components/iho-select-label/src/SelectLabel.vue2.js +0 -1
  302. package/es/components/iho-select-label/src/components/label-classify.vue2.js +0 -1
  303. package/es/components/iho-table/src/IhoTable.vue2.js +0 -1
  304. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue2.js +0 -1
  305. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +0 -1
  306. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +0 -1
  307. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue2.js +0 -1
  308. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +0 -1
  309. package/es/components/info-header/src/InfoHeader.vue2.js +0 -1
  310. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue2.js +0 -1
  311. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue2.js +0 -1
  312. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue2.js +0 -1
  313. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue2.js +0 -1
  314. package/es/components/info-header/src/components/infoDescription/index.vue2.js +0 -1
  315. package/es/components/info-header/src/components/patientInfo/index.vue2.js +0 -1
  316. package/es/components/keyboard/src/Keyboard.vue2.js +0 -1
  317. package/es/components/keyboard/src/components/InputNumber.vue2.js +0 -1
  318. package/es/components/keyboard/src/components/NumberPanel.vue2.js +0 -1
  319. package/es/components/map/src/Map.vue2.js +0 -1
  320. package/es/components/quick-search/src/index.vue2.js +0 -1
  321. package/es/components/recommend-search/src/RecommendSearch.vue2.js +0 -1
  322. package/es/components/recommend-search/src/components/RecommendInput.vue2.js +0 -1
  323. package/es/components/recommend-search/src/components/RecommendMenu.vue2.js +0 -1
  324. package/es/components/recommend-search/src/components/RecommendSelect.vue2.js +0 -1
  325. package/es/components/scale-view/src/ScaleView.vue2.js +0 -1
  326. package/es/components/scale-view/src/components/AnswerParse.vue2.js +0 -1
  327. package/es/components/scale-view/src/components/EvaluateCountdown.vue2.js +0 -1
  328. package/es/components/scale-view/src/components/EvaluatePage.vue2.js +0 -1
  329. package/es/components/scale-view/src/components/NoData.vue2.js +0 -1
  330. package/es/components/search-cascader/src/SearchCascader.vue2.js +0 -1
  331. package/es/components/select-label/src/LabelFormContent.vue2.js +0 -1
  332. package/es/components/select-label/src/components/label-classify.vue2.js +0 -1
  333. package/es/components/shortcut-provider/src/ShortcutProvider.vue2.js +0 -1
  334. package/es/components/shortcut-setter/src/ShortcutSetter.vue2.js +0 -1
  335. package/es/components/shortcut-setter/src/ShortcutSetterItem.vue2.js +0 -1
  336. package/es/components/steps-wheel/src/StepsWheel.vue2.js +0 -1
  337. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +0 -1
  338. package/es/components/table-filter/src/components/classify-filter/index.vue2.js +0 -1
  339. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue2.js +0 -1
  340. package/es/components/table-filter/src/components/render-widget/components/Date.vue2.js +0 -1
  341. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +0 -1
  342. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +0 -1
  343. package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue2.js +0 -1
  344. package/es/components/table-filter/src/components/render-widget/components/Label.vue.js +0 -1
  345. package/es/components/table-filter/src/components/render-widget/components/Label.vue2.js +0 -1
  346. package/es/components/table-filter/src/components/render-widget/components/Select.vue2.js +0 -1
  347. package/es/components/table-filter/src/components/render-widget/components/SelectLabel.vue.js +0 -1
  348. package/es/components/table-filter/src/components/render-widget/components/SelectLabel.vue2.js +0 -1
  349. package/es/components/time-line/src/TimeLine.vue2.js +0 -1
  350. package/es/components/time-picker/src/TimePicker.vue2.js +0 -1
  351. package/es/components/vod-chunk-upload/src/chunk-upload-new.vue2.js +0 -1
  352. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +0 -1
  353. package/es/shared/components/SelectPage/SelectPage.vue2.js +0 -1
  354. package/es/shared/components/SvgIcon/SvgIcon.vue2.js +0 -1
  355. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue2.js +0 -1
  356. package/es/shared/components/no-data/NoData.vue2.js +0 -1
  357. /package/es/_virtual/{_plugin-vue_export-helper.js → plugin-vue_export-helper.js} +0 -0
  358. /package/es/components/fabric-chart/src/{hooks/constant.d.ts → constants/index.d.ts} +0 -0
  359. /package/es/components/fabric-chart/src/{hooks/constant.js → constants/index.js} +0 -0
  360. /package/es/components/fabric-chart/src/utils/{utils.d.ts → index.d.ts} +0 -0
@@ -0,0 +1,139 @@
1
+ type FixedSizeArray<T extends number, U> = T extends 0
2
+ ? void[]
3
+ : ReadonlyArray<U> & {
4
+ 0: U;
5
+ length: T;
6
+ };
7
+ type Measure<T extends number> = T extends 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 ? T : never;
8
+ type Append<T extends any[], U> = {
9
+ 0: [U];
10
+ 1: [T[0], U];
11
+ 2: [T[0], T[1], U];
12
+ 3: [T[0], T[1], T[2], U];
13
+ 4: [T[0], T[1], T[2], T[3], U];
14
+ 5: [T[0], T[1], T[2], T[3], T[4], U];
15
+ 6: [T[0], T[1], T[2], T[3], T[4], T[5], U];
16
+ 7: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], U];
17
+ 8: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], T[7], U];
18
+ }[Measure<T['length']>];
19
+ type AsArray<T> = T extends any[] ? T : [T];
20
+
21
+ declare class UnsetAdditionalOptions {
22
+ _UnsetAdditionalOptions: true;
23
+ }
24
+ type IfSet<X> = X extends UnsetAdditionalOptions ? {} : X;
25
+
26
+ type Callback<E, T> = (error: E | null, result?: T) => void;
27
+ type InnerCallback<E, T> = (error?: E | null | false, result?: T) => void;
28
+
29
+ type FullTap = Tap & {
30
+ type: 'sync' | 'async' | 'promise';
31
+ fn: Function;
32
+ };
33
+
34
+ type Tap = TapOptions & {
35
+ name: string;
36
+ };
37
+
38
+ type TapOptions = {
39
+ before?: string;
40
+ stage?: number;
41
+ };
42
+
43
+ interface HookInterceptor<T, R, AdditionalOptions = UnsetAdditionalOptions> {
44
+ name?: string;
45
+ tap?: (tap: FullTap & IfSet<AdditionalOptions>) => void;
46
+ call?: (...args: any[]) => void;
47
+ loop?: (...args: any[]) => void;
48
+ error?: (err: Error) => void;
49
+ result?: (result: R) => void;
50
+ done?: () => void;
51
+ register?: (tap: FullTap & IfSet<AdditionalOptions>) => FullTap & IfSet<AdditionalOptions>;
52
+ }
53
+
54
+ type ArgumentNames<T extends any[]> = FixedSizeArray<T['length'], string>;
55
+
56
+ declare class Hook<T, R, AdditionalOptions = UnsetAdditionalOptions> {
57
+ constructor(args?: ArgumentNames<AsArray<T>>, name?: string);
58
+ name: string | undefined;
59
+ taps: FullTap[];
60
+ intercept(interceptor: HookInterceptor<T, R, AdditionalOptions>): void;
61
+ isUsed(): boolean;
62
+ callAsync(...args: Append<AsArray<T>, Callback<Error, R>>): void;
63
+ promise(...args: AsArray<T>): Promise<R>;
64
+ tap(options: string | (Tap & IfSet<AdditionalOptions>), fn: (...args: AsArray<T>) => R): void;
65
+ withOptions(options: TapOptions & IfSet<AdditionalOptions>): Omit<this, 'call' | 'callAsync' | 'promise'>;
66
+ }
67
+
68
+ export class SyncHook<T, R = void, AdditionalOptions = UnsetAdditionalOptions> extends Hook<T, R, AdditionalOptions> {
69
+ call(...args: AsArray<T>): R;
70
+ }
71
+
72
+ export class SyncBailHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends SyncHook<T, R, AdditionalOptions> {}
73
+ export class SyncLoopHook<T, AdditionalOptions = UnsetAdditionalOptions> extends SyncHook<T, void, AdditionalOptions> {}
74
+ export class SyncWaterfallHook<T, AdditionalOptions = UnsetAdditionalOptions> extends SyncHook<
75
+ T,
76
+ AsArray<T>[0],
77
+ AdditionalOptions
78
+ > {}
79
+
80
+ declare class AsyncHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends Hook<T, R, AdditionalOptions> {
81
+ tapAsync(
82
+ options: string | (Tap & IfSet<AdditionalOptions>),
83
+ fn: (...args: Append<AsArray<T>, InnerCallback<Error, R>>) => void
84
+ ): void;
85
+ tapPromise(options: string | (Tap & IfSet<AdditionalOptions>), fn: (...args: AsArray<T>) => Promise<R>): void;
86
+ }
87
+
88
+ export class AsyncParallelHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
89
+ T,
90
+ void,
91
+ AdditionalOptions
92
+ > {}
93
+ export class AsyncParallelBailHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
94
+ T,
95
+ R,
96
+ AdditionalOptions
97
+ > {}
98
+ export class AsyncSeriesHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
99
+ T,
100
+ void,
101
+ AdditionalOptions
102
+ > {}
103
+ export class AsyncSeriesBailHook<T, R, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
104
+ T,
105
+ R,
106
+ AdditionalOptions
107
+ > {}
108
+ export class AsyncSeriesLoopHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
109
+ T,
110
+ void,
111
+ AdditionalOptions
112
+ > {}
113
+ export class AsyncSeriesWaterfallHook<T, AdditionalOptions = UnsetAdditionalOptions> extends AsyncHook<
114
+ T,
115
+ AsArray<T>[0],
116
+ AdditionalOptions
117
+ > {}
118
+
119
+ type HookFactory<H> = (key: any, hook?: H) => H;
120
+
121
+ interface HookMapInterceptor<H> {
122
+ factory?: HookFactory<H>;
123
+ }
124
+
125
+ export class HookMap<H> {
126
+ constructor(factory: HookFactory<H>, name?: string);
127
+ name: string | undefined;
128
+ get(key: any): H | undefined;
129
+ for(key: any): H;
130
+ intercept(interceptor: HookMapInterceptor<H>): void;
131
+ }
132
+
133
+ export class MultiHook<H> {
134
+ constructor(hooks: H[], name?: string);
135
+ name: string | undefined;
136
+ tap(options: string | Tap, fn?: Function): void;
137
+ tapAsync(options: string | Tap, fn?: Function): void;
138
+ tapPromise(options: string | Tap, fn?: Function): void;
139
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.44-release.5",
3
+ "version": "3.1.45-beta.0",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -61,5 +61,5 @@
61
61
  "iOS 7",
62
62
  "last 3 iOS versions"
63
63
  ],
64
- "gitHead": "a8f7d7cdca3113620c2a7b0dbaf062673dfc51cc"
64
+ "gitHead": "464eb702ff1a466f3cf7bff01019ccb45c06e0b8"
65
65
  }
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as t,computed as i,watch as l,openBlock as a,createElementBlock as n,createElementVNode as r,createCommentVNode as o,renderSlot as s,unref as u,createVNode as c,withCtx as f,createTextVNode as d,toDisplayString as h,Fragment as m,renderList as p}from"vue";import v from"../../table-filter/src/components/render-widget/index.vue.js";import g from"../../table-filter/src/hooks/useMixins.js";import b from"../../table-filter/src/hooks/useAdvanced.js";import C from"../../table-filter/src/hooks/useRenderWidget.js";import{NButton as y,NIcon as k}from"naive-ui";import{Search as S}from"@vicons/ionicons5";import{cloneDeep as j}from"lodash-es";const q={class:"base-search-block"},x={class:"base-container"},R={class:"bease-left"},A={class:"base-ul"},O={key:0,class:"baseli showQuickBtn"},F=r("i",{class:"iconfont-table-filter icon-table-filter-shaixuan",style:{color:"inherit","margin-right":"6px"}},null,-1),I={key:0,class:"qqConObjCount"},Q={key:1,class:"baseli"},V={key:2,class:"baseli"},_=r("i",{class:"iconfont-table-filter icon-table-filter-reset",style:{"margin-right":"6px"}},null,-1);var w=e({__name:"index",props:{showSettings:{type:Object,default:()=>({hideQuickSearch:0,hideResetBtn:0})},searchFieldList:{type:Array,default:()=>[]},qqConObjCount:{type:Number,default:0},filterApiConfig:{type:Object}},emits:["foldQuickSearch","onFilterSearch","handleReset","getFilterParam"],setup(e,{expose:w,emit:B}){const E=e,{outQuickSearchFn:D}=g(),{isRender:L,getRenderSearchConObj:N,isExistDefValByRenderWidget:P,resetRenderWidgetValue:W}=C(),{transformData:U,transformParams:$}=b(),z=t([]),M=t(!1),T=t([]),G=i((()=>J("hideQuickSearch"))),H=i((()=>J("hideResetBtn")));function J(e){return 0==E.showSettings[e]}function K(){B("foldQuickSearch",!0)}function X(e={}){const t=Z()||[];!function(e,t,i=!1,l={}){let a=[];T.value.length>0&&(a=j(T.value));B("onFilterSearch",e,t,i,a,l)}(t,$(t),!0,e)}function Y(e,t){T.value.forEach((i=>{i._frontId===e&&(i.widgetCfg.isInit=t)}))}function Z(){return function(e){if(!Array.isArray(e))return[];let t=[];for(let i=0;i<e.length;i++){let l=e[i];const a=N(l);a&&t.push(a)}return t.filter((e=>e.value))}(T.value)}function ee(){!function(e){if(!Array.isArray(e))return;e.forEach((e=>{W(e)})),D.handlerInitSearchItem(e)}(T.value),B("handleReset",{targetType:"outQuickSearchReset"})}return l((()=>E.searchFieldList),(e=>{e&&e.length>0&&function(){T.value=[];let e=j(U(E.searchFieldList)).filter((e=>1==e.isShowSearch&&1==e.filterExplicit));T.value=e,D.handlerInitSearchItem(T.value),T.value.some((e=>L(e)?P(e):!!e.explicitDefaultVal))}()}),{immediate:!0,deep:!0}),l((()=>E.qqConObjCount),(e=>{const t=z.value.length||0;M.value=t+Number(e)>0&&H.value}),{immediate:!0}),l((()=>T),(()=>{z.value=Z()||[];const e=$(z.value);M.value=z.value.length+Number(E.qqConObjCount)>0&&H.value,B("getFilterParam",z.value,e)}),{immediate:!0,deep:!0}),w({handleReset:ee}),(t,i)=>(a(),n("div",q,[r("div",x,[r("div",R,[r("ul",A,[o(" 筛选分类插槽 "),s(t.$slots,"classification"),u(G)?(a(),n("li",O,[c(u(y),{class:"search-default",type:"default",onClick:K},{default:f((()=>[F,d(" 筛选"),e.qqConObjCount?(a(),n("span",I,"("+h(e.qqConObjCount)+")",1)):o("v-if",!0)])),_:1})])):o("v-if",!0),o(" start--筛选外显--start "),(a(!0),n(m,null,p(T.value,(t=>(a(),n(m,null,[t.isRender?(a(),n("li",{class:"baseli outQuickSearch-li",key:t._frontId},[c(v,{cfg:t,modelValue:t.value,"onUpdate:modelValue":e=>t.value=e,filterApiConfig:e.filterApiConfig,onOutFilterChange:X,onChangeInit:Y},null,8,["cfg","modelValue","onUpdate:modelValue","filterApiConfig"])])):o("v-if",!0)],64)))),256)),o(" end--筛选外显--end "),o(" 查询按钮 "),T.value&&T.value.length>0?(a(),n("li",Q,[c(u(y),{type:"primary",onClick:X},{default:f((()=>[c(u(k),{component:u(S),size:"16",style:{"margin-right":"6px"}},null,8,["component"]),d(" 查询 ")])),_:1})])):o("v-if",!0),o(" 重置按钮 "),M.value?(a(),n("li",V,[c(u(y),{onClick:ee},{default:f((()=>[_,d(" 重置 ")])),_:1})])):o("v-if",!0),o(" 业务按钮插槽 "),s(t.$slots,"buttons")])])])]))}});export{w as default};
@@ -1 +0,0 @@
1
- import{defineComponent as a,computed as s,openBlock as e,createElementBlock as t,unref as o,createCommentVNode as r,createElementVNode as n,toDisplayString as i}from"vue";import p from"../../../../shared/assets/img/nodata.png.js";import m from"../../../../shared/assets/img/no-permission.png.js";import l from"../../../../shared/assets/img/failure.png.js";import g from"../../../../shared/assets/img/notfound.png.js";const u={class:"no-data-tip NoData-page"},f=["src"],d={key:1};var c=a({__name:"NoData",props:{noDataTip:{type:String,default:"暂无数据"},noDataImg:{type:String,default:"nodata"},showImg:{type:Boolean,default:!0}},setup(a){const c=a,h=s((()=>{let a=null;switch(c.noDataImg){case"no-permission":a=m;break;case"failure":a=l;break;case"nodata":a=p;break;default:a=g}return a})),D=s((()=>{let a="";switch(c.noDataImg){case"no-permission":a="请联系管理员";break;case"failure":a="请稍后再试"}return a}));return(s,p)=>(e(),t("div",u,[a.showImg?(e(),t("img",{key:0,src:o(h),alt:""},null,8,f)):r("v-if",!0),n("p",null,i(a.noDataTip),1),o(D)?(e(),t("span",d,i(o(D)),1)):r("v-if",!0)]))}});export{c as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as o,watch as r,onDeactivated as a,openBlock as t,createBlock as l,unref as u,withCtx as n,createVNode as i,withModifiers as s}from"vue";import p from"../../../../../shared/components/SlotRender/SlotRender.js";import{cloneDeep as c,isObject as d,isArray as v}from"lodash-es";import{NPopover as w,NInput as f}from"naive-ui";import{useSeparateMap as m}from"../../hooks/useSeparateRow.js";import h from"../separate.vue.js";var y=e({__name:"edit-separate",props:{col:{type:Object,required:!0},row:{type:Object,required:!0},index:{type:Number,required:!0}},emits:["formChange"],setup(e,{emit:y}){const x=e,g=o(),b=o(!1);function k(e){b.value=e}r(b,(function(e){e?async function(e){var o;if(!e)return;j.value=c(e.row[x.col.field]),await new Promise((e=>setTimeout(e))),null==(o=g.value)||o.syncPosition()}(R(x.row)):S(R(x.row))}));const j=o(),{getRowData:R}=m();async function S(e){if(!e)return;const o=e.row[x.col.field];(d(j.value)||v(j.value)||o!==j.value)&&y("formChange",{value:j.value,row:x.row,column:x.col,index:e.index})}const U={border:"1px solid #f5f5f5",padding:"4px 0 4px 4px",background:"white","border-radius":"4px"};return a((()=>{S(R(x.row))})),(o,r)=>(t(),l(u(w),{ref_key:"popoverRef",ref:g,trigger:"manual",show:b.value,"onUpdate:show":r[3]||(r[3]=e=>b.value=e),"show-arrow":!1},{trigger:n((()=>[i(h,{onClick:r[0]||(r[0]=s((e=>b.value=!b.value),["stop"])),style:U,col:e.col,row:e.row},null,8,["col","row"])])),default:n((()=>[e.col.separateSlot?(t(),l(u(p),{key:0,renderer:e.col.separateSlot,value:j.value,"onUpdate:value":r[1]||(r[1]=e=>j.value=e),"onUpdate:show":k,col:e.col,row:e.row},null,8,["renderer","value","col","row"])):(t(),l(u(f),{key:1,value:j.value,"onUpdate:value":r[2]||(r[2]=e=>j.value=e),type:"textarea"},null,8,["value"]))])),_:1},8,["show"]))}});export{y as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as t,openBlock as u,createBlock as a,unref as n,withKeys as r,withCtx as i,createVNode as o,createTextVNode as l}from"vue";import{NInput as p,NButton as v}from"naive-ui";var c=e({__name:"input-button",emits:["trigger"],setup(e,{emit:c}){const s=t("");function f(){c("trigger",s.value)}return(e,t)=>(u(),a(n(p),{value:s.value,"onUpdate:value":t[0]||(t[0]=e=>s.value=e),placeholder:"字段搜索",class:"check-seach-input",onKeyup:r(f,["enter"])},{suffix:i((()=>[o(n(v),{text:"",onClick:f},{default:i((()=>[l("搜索")])),_:1})])),_:1},8,["value","onKeyup"]))}});export{c as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,computed as a,openBlock as t,createElementBlock as r,createTextVNode as s,toDisplayString as o,unref as p,createElementVNode as l}from"vue";import{useSeparateMap as c}from"../hooks/useSeparateRow.js";const u={class:"big-table__separate"},i=l("span",{class:"big-table__separatePlaceholder"},o(" "),-1);var n=e({__name:"separate",props:{col:{type:Object,required:!0},row:{type:Object,required:!0}},setup(e){const l=e,{separateDataMap:n}=c(),b=a((()=>{const e=n.value.get(l.row);return e?e.separateData[l.col.field]:""}));return(e,a)=>(t(),r("div",u,[s(o(p(b))+" ",1),i]))}});export{n as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as t,reactive as n,onMounted as o,openBlock as r,createElementBlock as i,createCommentVNode as s,createElementVNode as a}from"vue";import"bpmn-js/dist/assets/diagram-js.css";import"bpmn-js/dist/assets/bpmn-font/css/bpmn.css";import"bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css";import"bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css";import{attr as l}from"tiny-svg";import{useMessage as d}from"naive-ui";import p from"axios";import c from"moment";import m from"bpmn-js/lib/Viewer";import u from"./custom/customOtherModule/zoomScroll.js";import v from"bpmn-js/lib/features/modeling";import b from"diagram-js/lib/navigation/movecanvas";import f from"./custom/customOtherModule/customViewerRenderer.js";const y={class:"containers"};var g=e({__name:"BpmnWorkflow",props:{flowType:{type:String,default:"workflow"},processId:String,instanceId:String,token:String,getBpmnXml:{type:Function,default:()=>Promise.resolve({})},getInstanceHistory:{type:Function,default:()=>Promise.resolve({})},getNodeApprovaler:{type:Function,default:()=>Promise.resolve({})}},setup(e){const g=e;d();const h=t(null),w=n({nodeMenu:[],currentCanvasXml:null,eventType:["element.click","element.hover","element.out"]});p.create({withCredentials:!0,timeout:5e3,headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:"bearer "+g.token},baseURL:"/"}),o((()=>{console.log("生成bpmnModeler,展示画布"),x(g.processId,g.instanceId)}));const x=async(e,t)=>{"function"==typeof g.getBpmnXml&&(w.currentCanvasXml=await g.getBpmnXml(e),k(e,t))},k=async(e,t)=>{w.bpmnModeler&&w.bpmnModeler.destroy(),w.bpmnModeler=new m({container:h.value,additionalModules:[v,b,u,f,{bendpoints:["value",{}]}]});try{const{err:n}=await w.bpmnModeler.importXML(w.currentCanvasXml);if(n&&n.length)return console.error(n);w.bpmnModeler.get("canvas").zoom("fit-viewport","auto"),I(),j(e,t)}catch(e){console.error(`[Process Designer Warn]: ${(null==e?void 0:e.message)||e}`)}},I=()=>{let e=w.bpmnModeler.get("eventBus"),t=w.bpmnModeler.get("overlays"),n=w.bpmnModeler.get("selection");w.eventType.forEach((o=>{e.on(o,(e=>{let{element:r}=e;if(r.parent){if(!e||"bpmn:Process"===r.type)return!1;switch(o){case"element.hover":(async(e,t)=>{var n;let o="",{id:r,type:i}=e;if(!["label","bpmn:SequenceFlow"].includes(e.type)){const t=w.bpmnModeler.get("selection");t.select(null),t.select(e,!0)}if("bpmn:UserTask"==i){let e=w.nodeMenu.find((e=>e.key==r));(null==(n=null==e?void 0:e.auditor)?void 0:n.length)&&(o=`审核人:${e.auditor.map((e=>e.name)).join("、")}`,t.add(r,"tip",{position:{top:0,right:-12},html:`<div style="position: absolute;\n top: calc(50% - 5px);\n left: -10px;\n width: 0px;\n height: 0px;\n border:5px solid rgba(0, 0, 0, 0.75);\n border-top: 5px solid transparent;\n border-left: 5px solid transparent;\n border-bottom: 5px solid transparent;">\n </div>\n <div class="diagram-note"\n style="background-color: rgba(0, 0, 0, 0.75);\n color: #fff;\n font-size: 14px;\n text-align:left;\n width: 200px;\n max-height: 71px;\n padding: 5px;\n border-radius: 4px;\n word-break: break-word;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 3;">\n ${o}\n </div>`}))}})(r,t);break;case"element.out":n.select(null),t.clear()}}}))}))},M=(e,t)=>{const n=w.bpmnModeler.get("modeling");e.renderPathColor=t,n.setColor(e,{stroke:t})},j=async(e,t)=>{if("function"!=typeof g.getInstanceHistory)return;const n=w.bpmnModeler.get("elementRegistry");let o=n.filter((e=>!["label","bpmn:Process","bpmn:SequenceFlow"].includes(e.type))),r=await g.getInstanceHistory(e,t),i={},s=[],a=[];var d,p,m;r.historyActivity.map((e=>{-1!=e.activityId.indexOf("#multiInstanceBody")&&(s.push(e.activityId.replace("#multiInstanceBody","")),a.push(e))})),(d=r.historyActivity,p="activityId",m={},d.reduce((function(e,t){return!m[t[p]]&&(m[t[p]]=e.push(t)),e}),[])).filter((e=>![...new Set(s)].includes(e.activityId)&&"StartEvent_1"!=e.activityId&&!e.activityId.startsWith("Event_"))).map((e=>{let t=e.activityId.replace("#multiInstanceBody",""),n=e,o=a.filter((t=>e.activityId==t.activityId));(null==o?void 0:o.length)&&(n=o.reduce(((e,t)=>c(e.endTime).isBefore(t.endTime)?t:e))),i[t]=n.activityState}));let u=[];await Promise.all(o.map((async t=>{var o;if(Object.keys(i).includes(t.id)){let r=n.getGraphics(t.id).childNodes[2];l(r,{rx:10,ry:10,strokeWidth:3,strokeDasharray:0});let s=n.get(t.id);4==i[t.id]&&M(s,"#5aa36a"),2==i[t.id]&&M(s,"#d14141");let a={};if("bpmn:UserTask"==t.type){if("function"!=typeof g.getNodeApprovaler)return;a=await g.getNodeApprovaler(e,t.id),u.push({key:t.id,value:null==(o=null==t?void 0:t.businessObject)?void 0:o.name,auditor:null==a?void 0:a.auditor})}}}))),w.nodeMenu=u};return(e,t)=>(r(),i("div",y,[s(" 流程画布部分 "),a("div",{class:"canvas",ref_key:"canva",ref:h},null,512)]))}});export{g as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as t,openBlock as o,createBlock as l,unref as n,withCtx as r,createVNode as i,createElementVNode as a,createTextVNode as s}from"vue";import{useMessage as u,NForm as p,NFormItem as d,NSpace as f,NUpload as m,NUploadDragger as c,NIcon as v,NText as h,NP as w}from"naive-ui";import{Archive as $}from"@vicons/ionicons5";import g from"axios";const x={style:{"margin-bottom":"12px"}};var S=e({__name:"EditFormat",props:{formatId:null,token:null},setup(e,{expose:S}){const _=e,C=`${window.location.protocol}//${window.location.host}/bi-api`,E=`${C}/reprot/print/open/client/saveIReportFormat`,y=`${C}/reprot/print/open/client/getIReportFiles`,I=`${C}/reprot/print/open/client/delIReportFiles`,b=g.create({}),j=u(),z=t([]);var F;function R(e){return new Promise(((t,o)=>{var l;b.get(`${I}?formatId=${null==(l=_.formatId)?void 0:l.split("_")[1]}&authorizationKey=${_.token}&fileName=${e.file.name}`).then((({data:e})=>{"SUCCESS"!==(null==e?void 0:e.result)?(j.error((null==e?void 0:e.resultMsg)||"删除文件失败,请重试!"),o()):(j.success("删除文件成功!"),t("SUCCESS"))}))}))}return b.get(`${y}?formatId=${null==(F=_.formatId)?void 0:F.split("_")[1]}&authorizationKey=${_.token}`).then((({data:e})=>{(e.list||[]).forEach((e=>{z.value.push({id:Date.now().toString(),name:e,status:"finished"})}))})),S({submit:function(e){return new Promise(((t,o)=>{if(!function(){if(z.value.length<2)return!1;let e=!1,t=!1;const o=/\.([^.]+)$/;return z.value.forEach((l=>{var n;const r=(null==(n=l.file)?void 0:n.name)||l.name||"",i=o.exec(r)?RegExp.$1.toLowerCase():"";i&&".jrxml".includes(i)&&(e=!0),i&&".jasper".includes(i)&&(t=!0)})),!(!e||!t)}())return void j.warning("请至少上传一个jrxml文件和一个jasper文件!");if(0===z.value.filter((e=>e.file)).length)return void j.warning("本次无新文件增加,请先添加新文件!");const l=new FormData;Object.keys(e).forEach((t=>{l.append(t,e[t])})),z.value.forEach((e=>{e.file&&l.append("files",e.file)})),b.post(E,l,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then((({data:e})=>{"SUCCESS"!==(null==e?void 0:e.result)?(j.error((null==e?void 0:e.resultMsg)||"上传文件失败,请重试!"),o()):t("SUCCESS")}))}))}}),(e,t)=>(o(),l(n(p),{"label-placement":"left","label-width":75},{default:r((()=>[i(n(d),{label:"格式文件:",path:"file"},{default:r((()=>[i(n(f),{vertical:""},{default:r((()=>[i(n(m),{multiple:"","directory-dnd":"","file-list":z.value,"onUpdate:file-list":t[0]||(t[0]=e=>z.value=e),onRemove:R},{default:r((()=>[i(n(c),null,{default:r((()=>[a("div",x,[i(n(v),{size:"36",depth:3,component:n($)},null,8,["component"])]),i(n(h),{style:{"font-size":"12px"}},{default:r((()=>[s("点击或者拖动文件到该区域来上传")])),_:1}),i(n(w),{depth:"3",style:{margin:"5px 0 0 0","font-size":"13px"}},{default:r((()=>[s("至少包含一个jxml文件和一个jasper文件")])),_:1})])),_:1})])),_:1},8,["file-list"])])),_:1})])),_:1})])),_:1}))}});export{S as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as t,reactive as a,watch as l,openBlock as o,createBlock as u,unref as r,normalizeStyle as i,withCtx as s,createElementVNode as n,mergeProps as d,createVNode as c,createTextVNode as m}from"vue";import{useMessage as p,NModal as v,NForm as f,NFormItem as y,NInput as w,NButton as g}from"naive-ui";import h from"./EditFormat.vue.js";import"../utils/print.js";import{isIReport as k}from"../utils/browserPrint.js";const I={class:"content"};var _=e({__name:"IdentityVerification",props:{verifyUser:{type:Function,default:()=>Promise.resolve()},identityVerificationTitle:{default:"打印服务身份校验"},modelValue:{type:Boolean},formatId:null,templateId:null},emits:["update:modelValue","success","close"],setup(e,{emit:_}){const V=e,b=p(),x={account:"",password:""},C=t(null),U=t(!1),j=t("");let S=a({...x});const F={account:{required:!0,message:"请输入账号"},password:{required:!0,message:"请输入密码"}},P="416px",q=t(null),E=()=>{_("update:modelValue",!1),_("close")},N=t(!1),R=()=>{var e;null==(e=q.value)||e.validate((e=>{if(e)return console.log(e),!1;(async()=>{var e,t;try{N.value=!0;const{data:a={}}=await V.verifyUser(S)||{};if("SUCCESS"!==a.result)return b.error(a.resultMsg||"身份校验失败,请重试!"),!1;k(V.formatId||"")?(U.value=!0,j.value=null==(e=a.map)?void 0:e.token):_("success",null==(t=a.map)?void 0:t.token)}finally{N.value=!1}})()}))},T=async()=>{var e,t;try{N.value=!0;if(!await(null==(t=C.value)?void 0:t.submit({authorizationKey:j.value,id:null==(e=V.formatId)?void 0:e.split("_")[1],templateId:V.templateId,datasourceName:null,dataSourceId:null})))return!1;_("success",j.value)}finally{N.value=!1}};return l((()=>V.modelValue),(e=>{e||Object.assign(S,x)})),(t,a)=>(o(),u(r(v),{preset:"dialog",title:U.value?"编辑":e.identityVerificationTitle,class:"standard-modal standard-modal-white authentication-modal c-button-print-modal",show:e.modelValue,"close-on-esc":!1,"show-icon":!1,style:i({width:P,overflowY:"auto"}),"positive-text":U.value?"确认":"","negative-text":U.value?"取消":"",onClose:E,onNegativeClick:E,onPositiveClick:T},{default:s((()=>[n("div",I,[U.value?(o(),u(h,d({key:0,ref_key:"editFormRef",ref:C},t.$attrs,{formatId:e.formatId,token:j.value}),null,16,["formatId","token"])):(o(),u(r(f),{key:1,class:"login-form-button-print",ref_key:"formRef",ref:q,model:r(S),rules:F},{default:s((()=>[c(r(y),{path:"account"},{default:s((()=>[c(r(w),{value:r(S).account,"onUpdate:value":a[0]||(a[0]=e=>r(S).account=e),placeholder:"请输入账号"},null,8,["value"])])),_:1}),c(r(y),{path:"password"},{default:s((()=>[c(r(w),{type:"password","input-props":{autocomplete:"on",name:"password"},value:r(S).password,"onUpdate:value":a[1]||(a[1]=e=>r(S).password=e),placeholder:"请输入密码"},null,8,["value"])])),_:1}),c(r(y),null,{default:s((()=>[c(r(g),{loading:N.value,type:"primary",class:"login-form-button",onClick:R},{default:s((()=>[m("登录")])),_:1},8,["loading"])])),_:1})])),_:1},8,["model"]))])])),_:1},8,["title","show","style","positive-text","negative-text"]))}});export{_ as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as i,onBeforeUnmount as t,watch as l,openBlock as a,createBlock as o,unref as n,normalizeClass as s,withCtx as u,createVNode as d,normalizeStyle as c,createElementVNode as r,createTextVNode as v,mergeProps as f}from"vue";import{NModal as h,NCard as p,NButton as m}from"naive-ui";import x from"../../../../table-filter/src/components/classify-filter/index.vue.js";const g={class:"svg-wrap"},b={class:"flex_right"};var y=e({__name:"index",props:{visible:{type:Boolean,default:!1},modalTitle:{type:String,default:"设置分类"},conditionList:{type:Array,default:()=>[]},searchFieldList:{type:Array,default:()=>[]},filterApiConfig:{type:Object,default:()=>({})}},emits:["cancelSaveAdd"],setup(e,{expose:y,emit:w}){const k=e,z=i(k.visible),A=i(!1),C=i("860px");let L=i({maxHeight:"496px",height:"496px",overflowY:"auto"}),_=i(null),S=null;function H(){F(),S=setTimeout((()=>{_&&_.value.handleInitConditions()}),30)}function F(){S&&clearTimeout(S)}function T(){_&&_.value.saveAdd()}function $(){z.value=!1,w("cancelSaveAdd"),C.value="860px",L.value={height:"496px",maxHeight:"496px",overflowY:"auto"},A.value=!1,_&&_.value.cancelSaveAdd()}function j(){A.value=!A.value;let e=document.body.clientHeight;"860px"===C.value?(C.value="100%",L.value.maxHeight=`${e}px`,L.value.height=`${e}px`):(C.value="860px",L.value.maxHeight="496px",L.value.height="")}return t((()=>{F()})),l((()=>k.visible),(e=>{z.value=e,e&&H()})),y({cancelSaveAdd:$}),(e,i)=>(a(),o(n(h),{class:s(["classification-modal-block standard-modal standard-modal-white",{"modal-screen":A.value}]),show:z.value,"onUpdate:show":i[0]||(i[0]=e=>z.value=e),maskClosable:!1,width:C.value,bodyStyle:n(L),closable:!1,centered:"",onPositiveClick:T,onNegativeClick:$},{default:u((()=>[d(n(p),{style:c({width:C.value,...n(L)}),title:k.modalTitle,bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":u((()=>[r("div",g,[r("i",{onClick:j,class:s(["iconfont-table-filter",A.value?"icon-table-filter-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-table-filter-menzhenyishengzhanxitongtubiaozuidahua"])},null,2),r("i",{onClick:$,class:"iconfont-table-filter icon-table-filter-menzhenyishengzhanxitongtubiaoguanbi"})])])),footer:u((()=>[r("div",b,[d(n(m),{onClick:$},{default:u((()=>[v("取消")])),_:1}),d(n(m),{type:"info",onClick:T},{default:u((()=>[v("保存")])),_:1})])])),default:u((()=>[d(x,f(e.$attrs,{ref_key:"conditionApiRef",ref:_,searchFieldList:k.searchFieldList,conditionList:k.conditionList}),null,16,["searchFieldList","conditionList"])])),_:1},8,["style","title"])])),_:1},8,["class","show","width","bodyStyle"]))}});export{y as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as i,useAttrs as t,computed as n,watch as a,openBlock as o,createElementBlock as l,createVNode as s,mergeProps as r,unref as c,withCtx as d,createTextVNode as f}from"vue";import{useMessage as u,NButton as p}from"naive-ui";import v from"../table-modal/index.vue.js";import C from"../search-filter/index.vue.js";import g from"../../../../table-filter/src/hooks/useMixins.js";const y={class:"search"};var m=e({__name:"index",props:{searchFieldList:{type:Array,default:()=>[]},conditionList:{type:Array,default:()=>[]},settingId:String,filterApiConfig:{type:Object,default:()=>({})},classifyModal:{type:Boolean,default:!1}},emits:["CondiTionListInit","saveGetTableCondiTionList","setClassifyModal"],setup(e,{emit:m}){const b=e,h=u(),{handleGetConfigApi:A}=g();let L=i(b.conditionList),I=i(),T=i(!1),S=i({}),j=i([]),O=i(!1);const _=i(null),F=t();async function k(e){try{let i=Object.assign(e,{id:b.settingId,tableId:F.tableId});await A(i,"requestSaveTableCondiTionSetting",{},b.filterApiConfig)&&(m("CondiTionListInit"),H(!1))}catch(e){console.log(e)}}function w(){H(!1),L.value.forEach((e=>{e.checked=!1}))}function x(){T.value=!0}function G(e){T.value=!0,S.value=Object.assign(e,{from:"edit"})}function M(e){T.value=!0,S.value=Object.assign(e,{from:"copy"})}async function q(e){try{if(Object.assign(e,{tableId:F.tableId,conditionList:JSON.stringify(L.value)}),O.value=!0,!await A(e,"requestSaveTableCondiTion",{},b.filterApiConfig))return;_.value&&_.value.cancelSaveAdd(),m("saveGetTableCondiTionList"),T.value=!1}catch(e){console.log(e)}finally{O.value=!1}}function R(){T.value=!1,S.value={}}function D(e,i){L.value=e,I.value=i}async function E(e){if(e)try{let i={id:e.sid};if(!await A(i,"requestDeleteTableCondiTion",{},b.filterApiConfig))return;h.success("删除成功"),m("saveGetTableCondiTionList",{type:"delete",item:e})}catch(e){console.log(e)}else h.info("请选择行")}function H(e){m("setClassifyModal",e)}async function K(){try{let e={id:b.settingId,tableId:F.tableId,type:"SEARCH_CATEGORY"};await A(e,"requestResetDefaultSetting",{},b.filterApiConfig)&&(m("CondiTionListInit"),H(!1))}catch(e){console.log(e)}}let N=n((()=>b.classifyModal));return a((()=>F.searchKey),(()=>{F.selectKeys=[F.searchKey||"all"]})),a((()=>b.searchFieldList),(e=>{e&&e.length>0&&(j.value=e.filter((e=>"operatorColumn"!==e.columnName)))}),{immediate:!0,deep:!0}),a((()=>b.conditionList),(e=>{L.value=e}),{immediate:!0,deep:!0}),a((()=>T),(e=>{e||(S.value={})})),(i,t)=>(o(),l("div",y,[s(v,r({dataSource:c(L),visibleIn:c(N)},i.$attrs,{onHandleOk:k,onClose:w,onChangeData:D,onResetPopconfirm:K,edit:G,copy:M,delItem:E,type:"search",filterApiConfig:e.filterApiConfig}),{add:d((()=>[s(c(p),{type:"info",onClick:x},{default:d((()=>[f("新增")])),_:1})])),_:1},16,["dataSource","visibleIn","filterApiConfig"]),s(C,r({ref_key:"searchFilter",ref:_},i.$attrs,{visible:c(T),loading:c(O),conditionList:c(L),actionList_prop:c(S),searchFieldList:c(j),isInSearch:!0,isCnHis:!0,showCompareField:!0,filterApiConfig:e.filterApiConfig,onSaveAdd:q,onCancelSaveAdd:R}),null,16,["visible","loading","conditionList","actionList_prop","searchFieldList","filterApiConfig"])]))}});export{m as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,useAttrs as t,computed as i,ref as l,inject as n,watch as a,openBlock as o,createBlock as s,unref as r,normalizeClass as c,withCtx as u,createVNode as d,normalizeStyle as p,createSlots as m,createElementVNode as v,createElementBlock as h,createCommentVNode as f,withDirectives as g,vShow as y,createTextVNode as C,toDisplayString as w,withModifiers as k,renderSlot as x}from"vue";import{useMessage as b,useDialog as z,NModal as S,NCard as _,NTooltip as D,NIcon as E,NSwitch as M,NPopconfirm as P,NButton as I}from"naive-ui";import{ReorderTwo as U,Brush as N,DocumentOutline as V}from"@vicons/ionicons5";import O from"../../../../../shared/components/VueDraggable/src/vuedraggable.js";import{root_isShowResetButton as F}from"../../const/index.js";import B from"axios";const A={class:"svg-wrap"},H={class:"flex_between"},R={key:0},$={class:"table-modal-list"},j={class:"list-title"},J=v("span",{class:"list-title-item",style:{width:"6%"}},null,-1),T=v("span",{class:"list-title-item"}," 名称 ",-1),Y=v("span",{class:"list-title-item"}," 父类名称 ",-1),q=v("span",{class:"list-title-item"}," 是否显示 ",-1),G=v("span",{class:"list-title-item"}," 设置为默认 ",-1),K={class:"list-title-item"},L=v("span",{class:"list-title-item"}," 操作 ",-1),Q=["onClick"],W={class:"list-content-item",style:{width:"6%","text-align":"center",overflow:"initial"}},X=["title"],Z=["title"],ee={class:"list-content-item list-content-switch"},te={class:"list-content-item list-content-radio"},ie={class:"list-content-item"},le={class:"list-content-item"},ne={key:0},ae=v("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[v("path",{d:"M12 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M18 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20z",fill:"currentColor"}),v("path",{d:"M12 2h8v2h-8z",fill:"currentColor"})],-1),oe={key:1},se=v("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[v("path",{d:"M12 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M18 12h2v12h-2z",fill:"currentColor"}),v("path",{d:"M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20z",fill:"currentColor"}),v("path",{d:"M12 2h8v2h-8z",fill:"currentColor"})],-1);var re=e({__name:"index",props:{visibleIn:{type:Boolean},loading:{type:Boolean},confirm:{type:Function},edit:{type:Function,defdault:()=>({})},copy:{type:Function,defdault:()=>({})},delItem:{type:Function,defdault:()=>({})},dataSource:{type:Array,default:()=>[]},type:{type:String},transitionName:{type:String},getContainer:{type:Function,default:()=>document.body}},emits:["handleOk","close","changeData","resetPopconfirm","finishSubmit"],setup(e,{emit:re}){const ce=e,ue=B.create({}),de=t(),pe=b(),me=z(),ve=i((()=>(null==de?void 0:de.isOrgAdmin)||!1)),he=l(ce.dataSource),fe=l(ce.visibleIn),ge=l(!1),ye=l("other"==ce.type?"100%":"860px"),Ce=l("654px"),we=n(F);function ke(){ce.type&&(ze(),re("handleOk",function(e){if("search"==e||"other"==e)return{id:"",tableId:"",setting:JSON.stringify(he.value.map((e=>({isDefault:e.isDefault,isShow:e.isShow,name:e.name,type:e.type,classifyId:e.sid}))))};if("mananger"==e){let e={};return he.value.forEach(((t,i)=>{const l=(null==t?void 0:t.id)||"";e[l]={id:l,index:i,default:t.isDefault?1:0,isHide:t.isShow?0:1}})),{type:"HOMEPAGE",tableId:"10001",setting:JSON.stringify({pageConfig:e})}}return}(ce.type)))}function xe(){be()}function be(){fe.value=!1,ze(),re("close")}function ze(){ye.value="860px",Ce.value="654px",ge.value=!1}function Se(){re("changeData",he.value)}function _e(){ge.value=!ge.value;let e=document.body.clientHeight;ye.value="860px"===ye.value?"100%":"860px",Ce.value="654px"===Ce.value?`${e}px`:"654px"}function De(e){re("resetPopconfirm",e)}function Ee(e,t,i){const l=ce[e];l&&l(t,i)}return a((()=>ce.visibleIn),(e=>{fe.value=e})),a((()=>ce.dataSource),(e=>{he.value=e}),{immediate:!0,deep:!0}),(t,i)=>(o(),s(r(S),{show:fe.value,bodyStyle:{height:Ce.value,overflowY:"auto"},width:ye.value,maskClosable:!1,class:c(["classification-modal-block standard-modal standard-modal-white",{"modal-screen":ge.value}]),closable:!1,centered:"",transitionName:e.transitionName,getContainer:e.getContainer,"positive-text":"保存","negative-text":"取消",onPositiveClick:ke,onNegativeClick:be},{default:u((()=>[d(r(_),{style:p({width:ye.value,height:Ce.value,overflowY:"auto"}),title:"设置分类",bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},m({"header-extra":u((()=>[v("div",A,[v("i",{onClick:_e,class:c(["iconfont-table-filter",ge.value?"icon-table-filter-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-table-filter-menzhenyishengzhanxitongtubiaozuidahua"])},null,2),v("i",{onClick:be,class:"iconfont-table-filter icon-table-filter-menzhenyishengzhanxitongtubiaoguanbi"})])])),default:u((()=>[r(ve)&&"mananger"==e.type?(o(),h("p",R,[v("span",{onClick:xe}," 添加首页 ")])):f("v-if",!0),v("div",$,[v("div",j,[J,T,Y,q,G,g(v("span",K," 设置公共首页 ",512),[[y,r(ve)&&"mananger"==e.type]]),L]),d(r(O),{class:"list-content",tag:"ul",list:he.value,"item-key":"sid",onEnd:Se,animation:"300"},{item:u((({element:t})=>[g(v("li",{class:c({checked:t.checked}),onClick:e=>{return i=t,he.value.forEach((e=>{e.sid==i.sid?e.checked=!0:e.checked=!1})),void re("changeData",he.value,i);var i}},[v("span",W,[d(r(D),{mouseEnterDelay:1},{trigger:u((()=>[d(r(E),{component:r(U),size:"24"},null,8,["component"])])),default:u((()=>[C(" 拖拽调整顺序 ")])),_:1})]),v("span",{title:t.displayCategory,class:"list-content-item"},w(t.name),9,X),v("span",{title:t.name,class:"list-content-item"},w(t.displayCategory),9,Z),v("span",ee,[d(r(M),{"onUpdate:value":e=>{return i=t,void he.value.forEach((e=>{e.sid==i.sid&&(e.isShow=!e.isShow,e.isShow||(i.isDefault=!1))}));var i},size:"small",value:t.isShow},null,8,["onUpdate:value","value"])]),v("span",te,[d(r(M),{"onUpdate:value":e=>{var i;(i=t).isShow&&he.value.forEach((e=>{e.sid==i.sid?e.isDefault=!e.isDefault:e.isDefault=!1}))},size:"small",value:t.isDefault},null,8,["onUpdate:value","value"])]),g(v("span",ie,[d(r(M),{"onUpdate:value":e=>function(e){function t(e){let t="";for(const i in e)t+=encodeURIComponent(i)+"="+encodeURIComponent(e[i])+"&";return t=t.slice(0,-1),t}me.warning({title:`是否确定${e.isCommon?"取消":"设置"}公共首页?`,positiveText:"确定",negativeText:"取消",maskClosable:!1,onPositiveClick:()=>{let i={id:e.id,setCommon:!e.isCommon};ue({url:"homePage/updateCommon",method:"post",data:i,transformRequest:[t]}).then((t=>{"SUCCESS"===t.data.result?(pe.success(t.data.resultMsg),e.isCommon=!e.isCommon,re("finishSubmit")):pe.error(t.data.resultMsg)})).catch((e=>{console.log(e)}))},onNegativeClick:()=>({})})}(t),size:"small",value:t.isCommon},null,8,["onUpdate:value","value"])],512),[[y,r(ve)&&"mananger"==e.type]]),v("span",le,["mananger"==e.type&&r(ve)?(o(),h("span",ne,[d(r(P),{onPositiveClick:e=>Ee("confirm",t)},{trigger:u((()=>[d(r(E),null,{default:u((()=>[ae])),_:1})])),default:u((()=>[C(" 是否确认删除? ")])),_:2},1032,["onPositiveClick"])])):f("v-if",!0),f(" 编辑 "),g(v("span",null,[d(r(D),null,{trigger:u((()=>[d(r(E),{component:r(N),onClick:k((e=>Ee("edit",t,"编辑")),["prevent","stop"])},null,8,["component","onClick"])])),default:u((()=>[C(" 编辑 ")])),_:2},1024)],512),[[y,"other"==e.type||"search"==e.type&&t.isEdit||"mananger"==e.type&&r(ve)]]),f(" 复制 "),g(v("span",null,[d(r(D),null,{trigger:u((()=>[d(r(E),{component:r(V),onClick:k((e=>Ee("copy",t,"复制")),["prevent","stop"])},null,8,["component","onClick"])])),default:u((()=>[C(" 复制 ")])),_:2},1024)],512),[[y,"search"==e.type||"other"==e.type]]),f(" 删除 "),t.isEdit?(o(),h("span",oe,[d(r(P),{onPositiveClick:e=>Ee("delItem",t,"删除")},{trigger:u((()=>[d(r(E),null,{default:u((()=>[se])),_:1})])),default:u((()=>[C(" 是否确认删除? ")])),_:2},1032,["onPositiveClick"])])):f("v-if",!0)])],10,Q),[[y,"line"!=t.type]])])),_:1},8,["list"])])])),_:2},["search"==e.type?{name:"footer",fn:u((()=>[v("div",H,[v("div",null,[r(we)?(o(),s(r(P),{key:0,placement:"top-start","positive-text":"确认","negative-text":"取消",onPositiveClick:De},{trigger:u((()=>[d(r(I),null,{default:u((()=>[C("恢复默认设置")])),_:1})])),default:u((()=>[C(" 确认要恢复系统默认设置吗? ")])),_:1})):f("v-if",!0)]),v("div",null,[d(r(I),{onClick:be},{default:u((()=>[C("取消")])),_:1}),x(t.$slots,"add"),d(r(I),{type:"info",onClick:ke},{default:u((()=>[C("保存")])),_:1})])])])),key:"0"}:void 0]),1032,["style"])])),_:3},8,["show","bodyStyle","width","class","transitionName","getContainer"]))}});export{re as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,useAttrs as i,ref as n,provide as l,computed as t,onMounted as a,nextTick as o,watch as s,openBlock as d,createElementBlock as c,normalizeClass as r,unref as h,normalizeStyle as u,withDirectives as f,createVNode as p,createTextVNode as g,toDisplayString as m,createCommentVNode as v,createElementVNode as C,Fragment as y,renderList as k,createBlock as S,withCtx as b}from"vue";import{useMessage as x,NIcon as O,NTooltip as _}from"naive-ui";import{Repeat as w,SettingsOutline as I,ChevronDown as L,ChevronForward as N,Checkmark as z,Close as j,ChevronUp as B}from"@vicons/ionicons5";import P from"./components/set-classification/index.vue.js";import J from"./directive/flexibleResize.js";import{root_isShowResetButton as M}from"./const/index.js";import A from"../../table-filter/src/hooks/useMixins.js";import E from"../../table-filter/src/hooks/useAdvanced.js";const T={key:0,class:"header"},R={class:"tree"},F=["onClick"],W=["onClick"],q=["onClick"],G={class:"child-item-name"},Q={key:1,class:"tree-type-footer"},$={class:"selected-num"},D=C("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1),V={key:0,class:"tile-type classify-1"},H={key:0,class:"header"},K={class:"right-setting"},U=["onClick"],X={class:"parent ellips"},Y={class:"children"},Z=["onClick"],ee={key:1,class:"selected-list"},ie={class:"selected-num"},ne=C("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1),le={class:"name"},te={class:"name"},ae={key:0,class:"main-wrapper"},oe=["onClick"],se={class:"tree-footer"},de=["onClick"],ce=["onClick"],re={key:0,class:"select-type-footer"},he={class:"selected-num"},ue=C("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1);var fe=e({__name:"index",props:{tableId:{type:String,default:""},searchFieldList:{type:Array,default:()=>[]},conditionMap:{type:Object,default:()=>({})},conditionSid:{type:Array,default:()=>["all_data"]},curClassificationIndex:{type:Number,default:0},curClassificationWidth:{type:Number},hideConditionChangeBtn:{type:Number,default:0},hideConditionChangeSetting:{type:Number,default:0},hideClearConditionChange:{type:Number,default:1},isShowResetButton:{type:Boolean,default:!0},filterApiConfig:{type:Object,default:()=>({})}},emits:["changeSearch","setClassificationIndex","getQuickSearchListObj"],setup(e,{emit:fe}){const pe=e,{handleGetConfigApi:ge}=A(),{transformClassifyChild:me}=E(),ve=i(),Ce=x(),ye=n(null);let ke=n(150),Se=n(!1),be=n([]),xe=n([]),Oe=n([]),_e=n(2),we=n({name:"全部数据",sid:"all_data"}),Ie=n([]),Le=n(""),Ne=n(!1),ze=n("全部数据");l(M,n(pe.isShowResetButton));let je=t((()=>0===_e.value?{marginRight:"8px"}:2===_e.value?{display:"inline-block"}:{})),Be=t((()=>{let e=xe.value.filter((e=>-1!==pe.conditionSid.indexOf(e.sid)));if(-1!==pe.conditionSid.indexOf("all_data"))return"全部数据";{let i=[];return e.map((e=>{i.push(e.name)})),i.join(",")}})),Pe=t((()=>function(e){let i=0===e.digital?"(0)":e.digital?`(${e.digital})`:"";const{name:n,isPublic:l}=e;return Ke(n,l)+i}));function Je(e){e.open?e.open=!1:e.open=!0}function Me(e,i,n){ze.value=e.name;let l=function(e){let i=[];return be.value.forEach((n=>{n.children?n.children.forEach((n=>{-1!==e.indexOf(n.sid)?(n.selected=!0,i.push(n)):n.selected=!1})):-1!==e.indexOf(n.sid)?(n.selected=!0,i.push(n)):n.selected=!1})),i}(function(e,i,n){let l=JSON.parse(JSON.stringify(i));l="all_data"===e||-1!==l.indexOf(e)?["all_data"]:[e];return l}(e.sid,pe.conditionSid));Fe(!1);const t=me(null==e?void 0:e.conObj);fe("changeSearch",Boolean("all_data"===e.sid),e,t,n,l)}function Ae(){let e="";if(2===_e.value)e=0;else{let i=_e.value;e=++i}ke.value=150,Ee(e)}async function Ee(e,i){let n={tableId:pe.tableId,setting:JSON.stringify({classificationIndex:e,classificationWidth:i})};try{await ge(n,"requestSaveListPersonaSetting",{},pe.filterApiConfig)&&fe("setClassificationIndex",e)}catch(e){console.log(e)}}function Te(){Ne.value=!0,Fe(!1)}function Re(e){Ne.value=e}function Fe(e){Se.value=void 0===e?!Se.value:e}function We(){if(!pe.tableId)return Ce.warning("请传入tableId");be.value=[];let{displayCategoryList:e=[],conditionList:i=[]}=pe.conditionMap;Ie.value=JSON.parse(JSON.stringify(e))||[],Oe.value=JSON.parse(JSON.stringify(i)),xe.value=JSON.parse(JSON.stringify([{name:"全部数据",sid:"all_data"},...i]));let n=[];var l;0===Ie.value.length&&(Ie.value=["未分类"]),Ie.value.forEach((e=>{let i={name:e,children:[]};xe.value.forEach((n=>{if(n.displayCategory===e||!n.displayCategory&&"未分类"===e&&"all_data"!==n.sid){if(-1!==pe.conditionSid.indexOf(n.sid)){n.selected=!0,i.open=!0;const e=me(null==n?void 0:n.conObj);fe("changeSearch",!1,n,e)}n.isShow&&i.children.push(n)}})),i.children.length>0&&n.push(i)})),n.unshift({name:"全部数据",sid:"all_data"}),be.value=n,0===_e.value&&(l=!0,be.value.forEach((e=>{e.children&&e.children.length&&(e.open=l)})))}function qe({distance:e}){const i=ke.value+e;ke.value=Math.min(Math.max(i,50),650)}function Ge(){Ee(_e.value,ke.value)}async function Qe(){await He(pe.tableId),De()}async function $e(e){await He(pe.tableId),Ve()}function De(e){Ve(e).then((e=>({})))}function Ve(e,i={}){if(!pe.tableId)return new Promise((e=>e(!1)));let n=Object.keys(i).length>0?i:JSON.parse(JSON.stringify(pe.conditionMap));return new Promise(((i,l)=>{var t,a,o,s,d,c;if(Object.keys(n).length>0){Oe.value=n.conditionList||[],Ie.value=n.displayCategoryList||[];let l={conditionList:Oe.value,displayCategoryList:Ie.value};fe("getQuickSearchListObj",l),Le.value=n.settingId;const r=Oe.value.find((e=>e.isDefault))||{name:"全部数据",sid:"all_data"};(null==(a=null==(t=ve.tableOptions)?void 0:t.filterCondition)?void 0:a.displayCategory)&&e&&i({name:null==(s=null==(o=ve.tableOptions)?void 0:o.filterCondition)?void 0:s.name,sid:null==(c=null==(d=ve.tableOptions)?void 0:d.filterCondition)?void 0:c.displayCategory}),i(r)}else i({})}))}async function He(e){try{if(!e)return new Promise((e=>e(!1)));let i={tableId:e},n=await ge(i,"requestTableCondiTionList",{},pe.filterApiConfig);return Promise.resolve(n)}catch(e){return Promise.resolve(!1)}}function Ke(e,i){return i&&e&&"1"===i?e.replace(/\(公共\)$/,""):e}return a((()=>{document.addEventListener("click",(e=>{o((()=>{let i=e.composedPath&&e.composedPath();ye.value&&i.includes(ye.value)||Fe(!1)}))}))})),s((()=>pe.tableId),(e=>{e&&De(!0)}),{immediate:!0,deep:!0}),s((()=>pe.curClassificationIndex),(e=>{void 0!==e&&(_e.value=e)}),{immediate:!0,deep:!0}),s((()=>pe.curClassificationWidth),(e=>{e&&(ke.value=Number(e)||150)}),{immediate:!0}),s((()=>pe.conditionMap),(e=>{!async function(){try{await We()}catch(e){console.log(e)}}()}),{immediate:!0,deep:!0}),(i,n)=>(d(),c("div",{class:r(["classification-block","classificationIndex-"+h(_e)]),style:u(h(je))},[0===h(_e)?f((d(),c("div",{key:0,class:"tree-type classify-0",style:u({width:h(ke)+"px",paddingBottom:1!=e.hideClearConditionChange?"80px":0,position:"relative"})},[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting?(d(),c("div",T,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"header-1",onClick:Ae},[p(h(O),{component:h(w),size:"16"},null,8,["component"]),g(" "+m("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"header-1",onClick:Te},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),g(" "+m("设置"))])):v("v-if",!0)])):v("v-if",!0),C("ul",R,[(d(!0),c(y,null,k(h(be),((i,n)=>(d(),c(y,null,[0===n||!i.children||0===i.children.length||i.children&&0!==i.children.filter((e=>e.isShow)).length?(d(),c("li",{key:n,class:r(["tree-item",{"tree-header":0===n||!i.children||0===i.children.length}])},[0!==n&&i.children&&0!==i.children.length?(d(),c(y,{key:1},[C("span",{class:r(["parent",{open:i.open}]),onClick:e=>Je(i)},[C("span",null,m(i.name),1),p(h(O),{component:i.open?h(L):h(N)},null,8,["component"])],10,W),i.open?(d(!0),c(y,{key:0},k(i.children.filter((e=>e.isShow)),((e,n)=>(d(),c("div",{class:"children",key:n},[e.isShow?(d(),S(h(_),{key:0,trigger:"hover",placement:"right"},{trigger:b((()=>[C("span",{class:r(["child-item",{selected:e.selected}]),onClick:n=>Me(e,0,i)},[C("span",G,m(Ke(e.name,null==e?void 0:e.isPublic)),1),e.selected?(d(),S(h(O),{key:0,component:h(z),size:"20"},null,8,["component"])):v("v-if",!0)],10,q)])),default:b((()=>[C("span",null,m(h(Pe)(e)),1)])),_:2},1024)):v("v-if",!0)])))),128)):v("v-if",!0)],64)):(d(),c("span",{key:0,class:r(["child-item header-item",{selected:i.selected||-1!==e.conditionSid.indexOf("all_data")}]),onClick:e=>Me(i)},m(i.name),11,F))],2)):v("v-if",!0)],64)))),256))]),1!=e.hideClearConditionChange?(d(),c("div",Q,[C("div",$,"已选择"+m(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),C("div",{class:"selected-item-del",onClick:n[0]||(n[0]=e=>Me({sid:"all_data",name:"全部数据",digital:h(we).digital}))},[D,g(" 清空筛选 ")])])):v("v-if",!0)],4)),[[h(J),{mode:"VR",onMove:qe,onEnd:Ge}]]):v("v-if",!0),1===h(_e)?(d(),c(y,{key:1},[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting||1!=e.hideConditionChangeSetting||h(Oe).filter((e=>e.isShow)).length>0?(d(),c("div",V,[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting?(d(),c("div",H,[C("span",{class:r(["all-data",{selected:-1!==e.conditionSid.indexOf("all_data")}]),onClick:n[1]||(n[1]=e=>Me({sid:"all_data",name:"全部数据",digital:h(we).digital}))},[g(" 全部数据 "),h(we).digital||0===h(we).digital?(d(),c(y,{key:0},[g(" ("+m(h(we).digital||0)+") ",1)],64)):v("v-if",!0)],2),C("div",K,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"setting-1",onClick:Ae,style:{"margin-right":"30px"}},[p(h(O),{component:h(w),size:"16"},null,8,["component"]),g(" "+m("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"setting-1",onClick:Te},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),g(" "+m("设置"))])):v("v-if",!0)])])):v("v-if",!0),C("ul",{class:"tile",style:u({borderBottom:1!=e.hideClearConditionChange?"1px solid #d5d5d5":0})},[(d(!0),c(y,null,k(h(be).slice(1),((e,i)=>(d(),c(y,null,[e.children&&e.children.length>0?(d(),c("li",{class:"tile-item",key:i},[e.children&&0!==e.children.length?(d(),c(y,{key:1},[C("span",X,m(e.name),1),C("div",Y,[(d(!0),c(y,null,k(e.children,((i,n)=>(d(),c(y,null,[i.isShow?(d(),c("span",{key:n,class:r(["child-item",{selected:i.selected}]),onClick:n=>Me(i,0,e)},m(Ke(i.name,null==i?void 0:i.isPublic)),11,Z)):v("v-if",!0)],64)))),256))])],64)):(d(),c("span",{key:0,class:r(["child-item",{selected:e.selected}]),style:{"padding-left":"17px"},onClick:i=>Me(e)},m(e.name)+" "+m(e.digital),11,U))])):v("v-if",!0)],64)))),256))],4),1!=e.hideClearConditionChange?(d(),c("div",ee,[C("div",ie,"已选择"+m(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),(d(!0),c(y,null,k(h(be).slice(1),(e=>(d(),c(y,null,[e.children&&0!==e.children.length?(d(!0),c(y,{key:1},k(e.children,((i,n)=>(d(),c(y,null,[i.selected?(d(),c("div",{class:"selected-item",key:i.sid},[g(m(i.name)+" ",1),p(h(O),{component:h(j),onClick:n=>Me(i,0,e)},null,8,["component","onClick"])])):v("v-if",!0)],64)))),256)):(d(),c("div",{class:"selected-item",key:e.sid},[g(m(e.name)+" ",1),p(h(O),{component:h(j),onClick:i=>Me(e)},null,8,["component","onClick"])]))],64)))),256)),C("div",{class:"selected-item-del",onClick:n[2]||(n[2]=e=>Me({sid:"all_data",name:"全部数据",digital:h(we).digital}))},[ne,g(" 清空筛选 ")])])):v("v-if",!0)])):v("v-if",!0)],64)):v("v-if",!0),2===h(_e)?(d(),c("div",{key:2,class:"select-type classify-2",ref_key:"selectType",ref:ye},[C("span",{class:"title",onClick:n[3]||(n[3]=()=>Fe())},[p(h(_),{trigger:"hover",placement:"top"},{trigger:b((()=>[C("span",le,m(h(Be)),1)])),default:b((()=>[C("span",te,m(h(Be)),1)])),_:1}),p(h(O),{component:h(Se)?h(B):h(L)},null,8,["component"])]),h(Se)?(d(),c("div",ae,[C("ul",{class:"tree",style:u({padding:1!=e.hideClearConditionChange?"40px 0":"40px 0 0"})},[(d(!0),c(y,null,k(h(be),((i,n)=>(d(),c(y,null,[0===n||!i.children||0===i.children.length||i.children&&0!==i.children.filter((e=>e.isShow)).length?(d(),c("li",{key:n,class:r(["tree-item",{"tree-header":0===n||!i.children||0===i.children.length}])},[0!==n&&i.children&&0!==i.children.length?(d(),c(y,{key:1},[0!==i.children.filter((e=>e.isShow)).length?(d(),c("span",{key:0,class:r(["parent",{open:i.open}]),onClick:e=>Je(i)},[g(m(i.name)+m(i.digital||0===i.digital?"("+i.digital+")":"")+" ",1),p(h(O),{component:i.open?h(L):h(N)},null,8,["component"])],10,de)):v("v-if",!0),i.open?(d(!0),c(y,{key:1},k(i.children.filter((e=>e.isShow)),((e,n)=>(d(),c("div",{class:"children",key:n},[e.isShow?(d(),S(h(_),{key:0,placement:"right",trigger:"hover","z-index":1e4},{trigger:b((()=>[C("span",{class:r(["child-item",{selected:e.selected}]),onClick:n=>Me(e,0,i)},[C("span",null,m(Ke(e.name,null==e?void 0:e.isPublic)),1),e.selected?(d(),S(h(O),{key:0,component:h(z),size:"20"},null,8,["component"])):v("v-if",!0)],10,ce)])),default:b((()=>[C("span",null,m(h(Pe)(e)),1)])),_:2},1024)):v("v-if",!0)])))),128)):v("v-if",!0)],64)):(d(),c(y,{key:0},[C("span",{class:r(["child-item child-header header-item",{selected:i.selected||-1!==e.conditionSid.indexOf("all_data")}]),onClick:e=>Me(i)},m(i.name),11,oe),C("div",se,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"tree-footer-icon",onClick:Ae},[p(h(O),{component:h(w),size:"16"},null,8,["component"]),g(" "+m("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"tree-footer-icon",onClick:Te},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),g(" "+m("设置"))])):v("v-if",!0)])],64))],2)):v("v-if",!0)],64)))),256))],4),1!=e.hideClearConditionChange?(d(),c("div",re,[C("div",he,"已选择"+m(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),C("div",{class:"selected-item-del",onClick:n[4]||(n[4]=e=>Me({sid:"all_data",name:"全部数据",digital:h(we).digital}))},[ue,g(" 清空筛选 ")])])):v("v-if",!0)])):v("v-if",!0)],512)):v("v-if",!0),v(" 弹出弹窗 "),p(P,{ref:"search",searchFieldList:e.searchFieldList,conditionList:h(Oe),displayCategoryList:h(Ie),settingId:h(Le),tableId:e.tableId,classifyModal:h(Ne),filterApiConfig:e.filterApiConfig,onSaveGetTableCondiTionList:$e,onCondiTionListInit:Qe,onSetClassifyModal:Re},null,8,["searchFieldList","conditionList","displayCategoryList","settingId","tableId","classifyModal","filterApiConfig"])],6))}});export{fe as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,useAttrs as t,ref as n,computed as l,openBlock as u,createBlock as a,unref as o,mergeProps as r,createSlots as i,renderList as s,withCtx as d,renderSlot as p,nextTick as v}from"vue";import{NDatePicker as f}from"naive-ui";import"../../../shared/utils/index.js";import"lodash-es";import{useDateTime as c}from"../../../shared/hooks/useDateTime.js";import{format as y}from"date-fns";var m=e({__name:"DatePicker",props:{updateUnchangedValue:{type:Boolean},onConfirm:{type:Function}},setup(e,{expose:m}){const h=e,g=t(),M=n(null),R=n(null),k=l((()=>{const e=Reflect.get(g,"type")||"";return["datetime","datetimerange"].includes(e)})),$=l((()=>{if(Reflect.get(g,"format"))return g.format;const e=g.type||"";return k.value?"yyyy-MM-dd HH:mm:ss":"month"===e?"yyyy-MM":"year"===e?"yyyy":"yyyy-MM-dd"})),w=l((()=>k.value?$.value.split(" "):"")),{focus:E,blur:I}=c(M,$,g);function _(e){e&&k.value&&v((()=>{var e;R.value=null==(e=M.value)?void 0:e.panelInstRef,c(R,w,g)}))}function x(...e){var t,n,l,u,a;null==(t=h.onConfirm)||t.call(h,...e);const o=Reflect.get(g,"type")||"",r=null==(a=null==(u=null==(l=null==(n=M.value)?void 0:n.inputInstRef)?void 0:l.$el)?void 0:u.querySelector)?void 0:a.call(u,"input");if(!(null==r?void 0:r.value)||!h.updateUnchangedValue||o.includes("range"))return;const i=r.value;r.value=y(new Date,$.value),r.dispatchEvent(new InputEvent("input")),r.value=i,r.dispatchEvent(new InputEvent("input"))}return m({$datePicker:M,focus:E,blur:I}),(e,t)=>(u(),a(o(f),r({ref_key:"datePickerRef",ref:M},e.$attrs,{"onUpdate:show":_,onConfirm:x}),i({_:2},[s(e.$slots,((t,n)=>({name:n,fn:d((()=>[p(e.$slots,n)]))})))]),1040))}});export{m as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,computed as t,ref as r,onMounted as o,onBeforeUnmount as s,openBlock as a,createElementBlock as n,Fragment as p,createElementVNode as i,createBlock as u,mergeProps as l,unref as c,createCommentVNode as m}from"vue";import{fabric as f}from"./utils/index.js";import v from"./components/PopupTip.vue.js";import h from"./components/PopupMenu.js";import d from"./hooks/useTemperatureChart.js";import k from"./hooks/useBirthProcessChart.js";var w=e({__name:"FabricChart",props:{type:{type:String,default:"temperature"},data:{type:Object,required:!0},addRenderItem:{type:Function}},emits:["change","add","remove","select","add:prevent"],setup(e,{expose:w,emit:C}){const y=e,P=t((()=>"temperature"===y.type)),g=r(null),j=r(),{propItems:I,redrawPoints:M,select:b,pointTipProps:x,pointMenuProps:R,clickMenu:T}=function(){const e=[j,y,C,g];return P.value?d(...e):k(...e)}();return o((()=>{j.value=new f.Canvas(g.value,{width:I.canvasWidth,height:I.canvasHeight,backgroundColor:"#fff",selection:!1,containerClass:"c-fabric-chart",fireRightClick:!0})})),s((()=>{j.value.off(),j.value.clear()})),w({redrawPoints:M,select:b,canvas:j}),(e,t)=>(a(),n(p,null,[i("canvas",{ref_key:"canvasRef",ref:g},null,512),j.value?(a(),u(v,l({key:0,propItems:c(I)},c(x)),null,16,["propItems"])):m("v-if",!0),j.value?(a(),u(c(h),l({key:1,propItems:c(I)},c(R),{show:c(R).show,"onUpdate:show":t[0]||(t[0]=e=>c(R).show=e),onClickMenu:c(T)}),null,16,["propItems","show","onClickMenu"])):m("v-if",!0)],64))}});export{w as default};
@@ -1 +0,0 @@
1
- import{defineComponent as t,openBlock as l,createBlock as p,Teleport as o,withDirectives as e,createElementVNode as r,normalizeStyle as s,unref as u,createElementBlock as a,Fragment as i,renderList as c,toDisplayString as n,vShow as f}from"vue";import m from"./useStyle.js";var h=t({__name:"PopupTip",props:{show:{type:Boolean,default:!1},point:null,list:{default:()=>[]},propItems:null},setup(t){const h=m(t);return(m,y)=>(l(),p(o,{to:".c-fabric-chart"},[e(r("ul",{class:"c-fabric-chart-popup-tip",style:s(u(h))},[(l(!0),a(i,null,c(t.list,(t=>(l(),a("li",{key:t},n(t),1)))),128))],4),[[f,t.show]])]))}});export{h as default};
@@ -1 +0,0 @@
1
- import{useBirthProcessCumputedPoint as t}from"./useCumputedPoint.js";import e from"./useGrid.js";import{drawLine as n,drawArrow as o,drawText as i,defaultTextStyle as r,drawPoint as l,defaultStyle as s,defaultRectStyle as a}from"./useDraw.js";import{getScaleInfo as u,drawScaleNumber as c,drawScaleLine as f}from"./useScaleColumn.js";import{fabric as d}from"../utils/index.js";import{useCommon as p}from"./useCommon.js";import{getIndex as h,isEffectiveNode as g}from"../utils/utils.js";import{cloneDeep as v}from"lodash-es";import{format as m}from"date-fns";function y(y,k,w,x,b){const{cumputedX:T,cumputedY:j,getXValue:C,getYValue:S}=t(k),{getEqualXTypes:M,handleAddPrevent:P}=p(y,w),{xAxis:E,grid:G,originX:L,originY:Y,xCellWidth:X,endY:A,startTime:H,leftAddAreaWidth:I,leftScales:D,rightScales:O,yCellHeight:V,endX:W,scaleValues:N,canvasWidth:R,borderStyle:$,rightAddAreaWidth:B,event:F,originYCervix:q,other:z,canvasHeight:J}=k,K=v(N),Q=new Set;function U(){K.filter((t=>t.show)).forEach(((t,e)=>{var s;const a=[],u=[],c=[];null==(s=t.data)||s.forEach(((s,f)=>{!function(s,f,d){let p,h;const{pointAttr:g={},lineAttr:v={},title:m="",key:b,type:T="circle",childbirthStyle:j={}}=t,M=t.data[d+1],P=nt(M,t);if(s&&P&&!f.breakpoint)h=n([...s,...P],{...v});else if(s&&!P&&!f.breakpoint){const e=nt(M,t);h=e?n([...s,...e],{...v}):null}let E,G;if(f.childbirth){const t=s[1]+V;E=o([s[0],s[1],t],j),c.push(E),G=i([s[0]+X/2,t-V/2],{value:String(f.childbirth),...r,originX:"left",originY:"center",...j}),c.push(G)}const L=u[d-1],Y={origin:{data:f,title:m,key:b||"",dataIndex:e,index:d},leftLine:L,rightLine:h,arrowGroup:E,arrowGroupText:G,...g,...k.event.hovered?k.event.evented?{selectable:!0}:{selectable:!0,lockMovementX:!0,lockMovementY:!0}:k.event};L?p=l(T,{left:L.get("x2"),top:L.get("y2"),...Y}):s&&(Y.leftLine=null,p=l(T,{left:s[0],top:s[1],...Y}));u.push(h),p&&(!function(t){F.hovered&&(t.on("mouseover",(()=>{et(t,"hover")})),t.on("mouseout",(()=>{x.show=!1})));if(t.lockMovementX&&t.lockMovementY)return;t.on("moving",(()=>{tt(t),function(t){var e,n,o,i;null==(e=t.leftLine)||e.setCoords().set({x2:t.left,y2:t.top}),null==(n=t.rightLine)||n.setCoords().set({x1:t.left,y1:t.top}),null==(o=t.arrowGroup)||o.setCoords().set({left:t.left,top:t.top}),null==(i=t.arrowGroupText)||i.setCoords().set({left:t.left+X/2,top:t.top+V/2})}(t),F.hovered&&et(t)})),t.on("mouseup",(e=>{if(x.show=!1,1===e.button){const{key:e}=t.origin,n={...t.origin,data:{...t.origin.data,time:C(t.left),value:S(e,t.top)}};y.value.discardActiveObject(),w("change",n),Z(n,"change")}}))}(p),a.push(p),Q.add(p))}(nt(s,t),s,f)})),Promise.all(a).then((t=>{const e=u.filter((t=>t));let n=null;t=t.filter((t=>(t&&n&&(n.nextPoint=t,t.prevPoint=n),n=t||n,t))),Promise.all(c).then((n=>{y.value.add(...e,...t,...n),t.forEach((t=>{null==t||t.bringToFront()}))}))}))}))}function Z(t,e="add"){const{dataIndex:n,data:o,index:i,key:r}=t,l=K.find((t=>t.key===r));switch(e){case"remove":l.data.splice(i,1);break;case"change":l.data[i]=o;break;default:{const t=h(o.time,l.data);l.data.splice(t,0,o);break}}_()}function _(){var t;Q.size&&(null==(t=y.value)||t.remove(...function(t){const e=[];return t.forEach((t=>{t&&e.push(t),(null==t?void 0:t.leftLine)&&e.push(null==t?void 0:t.leftLine),(null==t?void 0:t.rightLine)&&e.push(null==t?void 0:t.rightLine),(null==t?void 0:t.arrowGroup)&&e.push(null==t?void 0:t.arrowGroup),(null==t?void 0:t.arrowGroupText)&&e.push(null==t?void 0:t.arrowGroupText)})),e}([...Q]))),Q.clear(),U()}function tt(t){const e=t.prevPoint?t.prevPoint.left:L,n=t.nextPoint?t.nextPoint.left:W;t.setCoords(),["cervix","fetalPresentation"].includes(t.origin.key)&&t.top<q&&t.set("top",q),t.top<Y&&t.set("top",Y),t.top>A&&t.set("top",A),t.left<e&&t.set("left",e),t.left>n&&t.set("left",n)}function et(t,e="moving"){const{title:n,key:o,data:i}=t.origin;x.point={x:t.left,y:t.top},x.list=[`${n} ${"hover"===e?i.value:S(o,t.top)}`,`时间 ${C(t.left).slice(-5)}`],x.show=!0}function nt(t,e){if(g(t)&&function(t){const e=H+864e5,n=new Date(t).getTime();return n>=H&&n<=e}(t.time)){const n=T(t.time),o=j(e.key,e.range,t.value);return[n,o<Y?Y:o>A?A:o]}}function ot(t,e){return t+1>e[1]?e[0]:t+1}return e(y,k,!0),function(){const t=new d.Rect({...$,width:R-I-B-1,height:A-1,left:I,top:0,fill:"transparent"});y.value.add(t)}(),function(){function t(t,e="left"){let n="left"===e?I:W;t.forEach(((t,e)=>{const{range:o,spaceValue:l,width:p,title:h,titleStyle:g,key:v,position:m="center",spaceGridNumber:k=1,showNumber:w,showMaxMinNumber:x}=t,b=[],T=[],j=n+p/2,C=function(t,e){const n=[],[o,i]=t;for(let t=o;e>0?t<=i:t>=i;t+=e)n.push(t);return n}(o,l),S=C.length;C.forEach(((e,o)=>{const{lineXMain:i,lineXSub:r,textLeft:l}=u(m,n,p),s=A-o*V*k,a=0===o?A-8:o!==C.length-1||Y||q&&"FHR"!==v?s:Y+8;!w||(0===o||o===S-1)&&!x||b.push(c(String(e),t,l,a)),T.push(...f(t,o,i,r,s,V,Y,S))}));const M=new d.Rect({...a,width:p,height:A,left:j,top:A/2}),P=i([j,Y>0?Y-V/2:V/2],{value:String(h),...r,...g}),E=new d.Group([...T,...b,M,...P?[P]:[]],{objectCaching:!1,...s});y.value.add(E),E.sendToBack(),n+=p}))}t(D),t(O,"right")}(),function(){const{show:t,startTime:e,range:n=[0,23],position:o="top",style:l}=E.time,{show:a,range:u=[0,23],position:c,style:f}=E.processTime;if(t||a){const p=[],h=[],g=[],v=[],m=L+X/2,k=V/2;for(let s=0;s<G.mainXCell;s++){if(t){const t=0===s?+e.slice(11,13):ot(p.at(-1),n);p.push(t);const a="top"===o?Y-k:A+k;g.push(i([m+s*X,a],{value:String(t),...r,...l||{}}))}if(a){const t=0===s?u[0]:h.at(-1)+1;h.push(t);const e="top"===c?k:J-k;v.push(i([m+s*X,e],{value:String(t),...r,...f||{}}))}}const w=new d.Group([...g,...v],{objectCaching:!1,...s});y.value.add(w),y.value.sendToBack(w)}}(),function(){var t;const e=Object.values(z),o=[],i={},r=K.find((t=>"cervix"===t.key&&t.show)),l=null==(t=null==r?void 0:r.data)?void 0:t.find((t=>3==+t.value));function s(t,e){const{key:n,range:o}=r||{},i=j(n,o,10),l=[0,e],s=[-e/t,0],a=[(A-i-e)/t,A-i],u=[W-L,t*(W-L)+e];let c=[],f=[];function d([n,o]){return Math.abs(o-t*n-e)<=1}function p([t,e]){const[n,o]=[...h([t,e])];return n>=L&&n<=W&&o>=i&&o<=A}function h([t,e]){return[L+t,A-e]}return d(l)&&p(l)&&(c=h(l)),d(s)&&p(s)&&(c=h(s)),d(a)&&p(a)&&(f=h(a)),d(u)&&p(u)&&(f=h(u)),[...c,...f]}e.forEach((t=>{if(!t.show)return;const{key:e}=t;switch(e){case"fetalPresentation":{const{range:i,show:r}=K.find((t=>t.key===e));if(r){const r=j(e,i,0);o.push(n([L,r,W,r],{...t}))}break}case"alert":if(l){const{key:e,range:a}=r||{},u=216e5,c={time:m(new Date(new Date(l.time).getTime()+u),"yyyy-MM-dd HH:mm"),value:10},[f,d]=[T(l.time)-L,A-j(e,a,l.value)],[p,h]=[T(c.time)-L,A-j(e,a,c.value)],g=(h-d)/(p-f),v=d-f*g,y=s(g,v);y.length>0&&(o.push(n(y,{...t})),Object.assign(i,{k:g,b:v}))}break;case"handling":if(l){const{k:e,b:r}=i,a=144e5,u=s(e,r-(T(m(new Date(new Date(l.time).getTime()+a),"yyyy-MM-dd HH:mm"))-T(l.time))*e);u.length>0&&o.push(n(u,{...t}))}}})),y.value.add(...o)}(),U(),function(){function t(t,e){const n=K.findIndex((e=>e.key===t.key));return{renderItem:()=>t.title,origin:{title:t.title,unit:t.unit,dataIndex:n,key:t.key},pointer:e}}k.event.evented&&y.value.on("mouse:up",(e=>{if(3===e.button){const{x:n=0,y:o=0}=e.pointer||{};n>=L&&n<=W&&o>=Y&&o<=A&&(b.point={x:n,y:o},b.show=!0,e.target?(b.target=e.target,b.list=["删除节点"],y.value.forEachObject((t=>{t.origin&&t.left===e.target.left&&t.top===e.target.top&&b.list.push({renderItem:()=>t.origin.title,origin:{...t.origin},mode:"remove",pointer:e.pointer})}))):(b.target=null,b.list=["新增节点"],K.filter((t=>t.show)).forEach((i=>{if(!M(n,"key",X).includes(i.key)){if(["cervix","fetalPresentation"].includes(i.key)&&o<q)return;b.list.push(t(i,e.pointer))}})),1===b.list.length&&(b.show=!1,P("repeat"),console.log("当前时间段内无可新增节点"))))}}))}(),function(){const t=R-B/2;function e(t,e){if(!t.length)return;let o=Y;const i=[];t.forEach((t=>{const n=t.title.split("").join("\n"),s=N.findIndex((e=>e.key===t.key)),a=new d.Text(String(n),{...r,...t.titleStyle||{},originY:"top",left:e,top:o,lineHeight:1}),u=l(t.type,{left:e,top:o+a.height+3,...t.pointAttr,originY:"top",origin:{title:t.title,unit:t.unit,type:t.type,dataIndex:s,key:t.key,isMenu:!0},originLeft:e,originTop:o+a.height+3,...k.event});o+=a.height+u.height+15,function(t){function e(t){const{left:e,top:n}=t;return e>=L&&e<=W&&n>=Y&&n<=A}t.on("moving",(()=>{t.set("originY","center"),e(t)?(tt(t),et(t)):x.show=!1})),t.on("mouseup:before",(n=>{if(x.show=!1,0===n.e.button&&e(t))if(M(t.left,"key",X).includes(t.origin.key))P("repeat");else{const e={data:{time:C(t.left),value:S(t.origin.key,t.top)},...t.origin};w("add",e),Z(e)}!function(t){t.setCoords().set({originY:"top",left:t.originLeft,top:t.originTop})}(t)}))}(u),i.push(a,u)})),n(i),y.value.add(...i)}function n(t){const e=t.at(-1),n=(A-Y)/2,o=(e.height+e.top-Y)/2;t.forEach((t=>{const e=t.top+n-o;t.set({top:e,originTop:e})}))}e(D,I/2),e(O,t)}(),{clickMenu:function({item:t,target:e}){const n={...t.origin};"remove"===t.mode?(w("remove",n),Z(n,"remove")):(Object.assign(n,{data:{time:C(t.pointer.x),value:S(t.origin.key,t.pointer.y)}}),w("add",n),Z(n))},redrawPoints:_}}export{y as useBirthProcess};
@@ -1 +0,0 @@
1
- import{ref as e,reactive as a,computed as t,onMounted as l,nextTick as u}from"vue";import{defaultBorderStyle as r}from"./useDraw.js";import"date-fns";import"lodash-es";import"../utils/index.js";import"./useShadow.js";import{useEvent as i,useCanvasEvent as s}from"./useEvent.js";import{useBirthProcess as n}from"./useBirthProcess.js";function o(o,d,v,c){const h=e(),p=e(),m=e(),g=a({show:!1,point:{x:0,y:0},list:[]}),f=a({show:!1,point:{x:0,y:0},list:[],target:null}),x=t((()=>d.data.scaleValues.filter((e=>"left"===e.layout&&e.show)))),w=t((()=>d.data.scaleValues.filter((e=>"right"===e.layout&&e.show)))),y=t((()=>{var e;return(null==(e=w.value)?void 0:e.length)?30:0})),V=t((()=>{var e;return 30+(null==(e=x.value)?void 0:e.reduce(((e,a)=>e+=a.width),0))})),A=t((()=>{var e;const{width:a}=d.data,t=null==(e=w.value)?void 0:e.reduce(((e,a)=>e+=a.width),0);return a-y.value-t})),b=t((()=>d.data.grid.mainXCell)),C=t((()=>{const e=d.data.grid.mainYCell||14;return d.data.scaleValues.find((e=>e.show&&"FHR"===e.key))||14!==e?e:10})),j=t((()=>(A.value-V.value)/b.value)),k=t((()=>{const{xAxis:e,height:a}=d.data,t=Object.values(e).reduce(((e,a)=>(a.show&&e++,e)),0);return a/(C.value+t)})),Y=t((()=>{const{xAxis:e}=d.data,a=Object.values(e).reduce(((e,a)=>(a.show&&"top"===a.position&&e++,e)),0);return k.value*a})),P=t((()=>{var e;const{scaleValues:a}=d.data;if(!(null==(e=a.find((e=>"FHR"===e.key)))?void 0:e.show)&&!Y.value)return Y.value;const t=a.find((e=>"cervix"===e.key)),[,l]=(null==t?void 0:t.range)||[0,10],u=(null==t?void 0:t.spaceValue)||1;return S.value-l*u*k.value})),S=t((()=>{const{xAxis:e,height:a}=d.data,t=Object.values(e).reduce(((e,a)=>(a.show&&"bottom"===a.position&&e++,e)),0);return a-k.value*t})),H=t((()=>new Date(d.data.xAxis.time.startTime).getTime())),X=t((()=>36e5/j.value)),F=t((()=>{const{scaleValues:e}=d.data,a=e.find((e=>"cervix"===e.key));return((null==a?void 0:a.spaceValue)||1)/k.value})),R=t((()=>{const{scaleValues:e}=d.data,a=e.find((e=>"FHR"===e.key));return((null==a?void 0:a.spaceValue)||10)/k.value})),T=t((()=>{const{scaleValues:e}=d.data,a=e.find((e=>"fetalPresentation"===e.key));return((null==a?void 0:a.spaceValue)||1)/k.value})),W=t((()=>{var e;return(null==(e=d.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),M=a({canvasWidth:d.data.width,canvasHeight:d.data.height,borderStyle:{...r,...d.data.borderStyle||{}},selectionStyle:d.data.selectionStyle||{},grid:d.data.grid,other:d.data.other,originX:V.value,endX:A.value,originY:Y.value,endY:S.value,xCellWidth:j.value,yCellHeight:k.value,gridXNumber:b.value,gridYNumber:C.value,xAxis:d.data.xAxis,leftScales:x.value,rightScales:w.value,leftAddAreaWidth:30,rightAddAreaWidth:y.value,startTime:H.value,timeXCell:X.value,cervixYCell:F.value,FHRYCell:R.value,fetalPresentationYCell:T.value,scaleValues:d.data.scaleValues,event:W.value,originYCervix:P.value});return l((()=>{u((()=>{const{clickMenu:e,redrawPoints:a}=n(o,M,v,g,f);p.value=a,m.value=e,i(c.value);const{select:t}=s(o,M,v);h.value=t}))})),{propItems:M,redrawPoints:p,select:h,pointTipProps:g,pointMenuProps:f,clickMenu:m}}export{o as default};
@@ -1,4 +0,0 @@
1
- import { Ref } from 'vue';
2
- import { fabric } from '../utils';
3
- import { IPropItems } from '../interface';
4
- export declare function useBottom(canvas: Ref<fabric.Canvas>, propItems: IPropItems): void;
@@ -1 +0,0 @@
1
- import{fabric as t}from"../utils/index.js";import{drawTextGroup as e,defaultTextStyle as n,defaultStyle as i}from"./useDraw.js";function o(o,l){const{xScaleList:s,originX:a,endX:c,endY:r,xCellWidth:h,canvasWidth:d,canvasHeight:u,bottom:g,breathingHeight:f,iconsWidth:p,borderStyle:v}=l;!function(){var l,d,u;if(!f||!g){const e=new t.Line([p,r-1,c,r-1],v);return o.value.add(e),e.sendToBack(),!1}const b=f,m=(null==(l=g.breathing)?void 0:l.list)||[],w=[];let x=!0;s.forEach(((t,i)=>{const o=a+i*h;let l="";m.forEach(((e,n)=>{const i=new Date(e.time).getTime();i>=t&&i<+t+t.scaleCell&&(l=e.value)}));const s=x?{top:-(b/2-10)}:{top:b/2-10};l&&(x=!x);const c=e({width:h,height:b,...v},Object.assign({},{text:String(l),...n},l?s:{}),{left:o,top:r});w.push(c)}));const S=e({width:c,height:b,...v},{text:String((null==(d=g.breathing)?void 0:d.title)+(null==(u=g.breathing)?void 0:u.unit)),...n,left:-(c-a)/2},{left:0,top:r});w.push(S);const j=w.length>0?new t.Group([...w],{...i}):null;j&&j.sendToBack(),j&&o.value.add(j)}()}export{o as useBottom};
@@ -1 +0,0 @@
1
- import{fabric as e}from"../utils/index.js";import{drawLine as t,defaultStyle as i,drawPoint as n,drawText as o,drawArrow as l}from"./useDraw.js";import s from"./useGrid.js";import{useShadow as r}from"./useShadow.js";import{useCommon as a}from"./useCommon.js";import{TEMPERATURE_MENU as u,PAIN_MENU as c,OVERLAP as p}from"./constant.js";import{cloneDeep as d}from"lodash-es";import{isOneLine as f,getType as h,isOverlapPoint as v,isValidValue as g,setOtherType as y,isEffectiveNode as m,getIndex as x,deleteProperty as b}from"../utils/utils.js";function w(w,j,L,k,Y,S,E,$,M,T){s(w,j);const{getEqualXTypes:P,handleAddPrevent:O}=a(w,L),{createShadowLines:A}=r(),{left:I,xScaleList:C,xCellWidth:D,yCellHeight:R,originX:X,endX:z,originY:V,endY:F,itemList:_,event:G,vitalSignsOriginY:H,painOriginY:q,hospitalizationDate:W,config:B,canvasHeight:J}=j,K=new Set,N=["xinmai","mai"],Q=new Map,U=new Set,Z=new Set,ee=new Set,te=d(I.yScaleValue);function ie(t){var n;const o=te.find((e=>"pulse"===e.type));if(o&&(null==(n=o.dataList)?void 0:n.length)&&(K.size&&w.value.remove(...K),K.clear(),Q.size>1)){if(t){const{type:e,key:i}=t.origin||{};if("pulse"===e){const e=Q.get(i),n=null==e?void 0:e.findIndex((e=>e[0]===t.left));e.splice(n,1,[t.left,t.top])}}(function(){const e=[],t=[],i=[];for(const e of Q)t.push(e[1]),e[0]===N[0]&&e[1].forEach((e=>{(Q.get(N[1])||[]).findIndex((t=>t[0]===e[0]))>-1&&i.push(e[0])}));const[n,o]=t;let l=[],s=[];return i.forEach((t=>{const i=n.findIndex((e=>e[0]===t)),r=o.findIndex((e=>e[0]===t)),a=n[i],u=o[r],c=n[i-1],p=n[i+1],d=o[r-1],f=o[r+1];if(c&&d){if(c[0]!==d[0]){const e=Math.max(c[0],d[0]);l.push([c,d].find((t=>t[0]===e)))}}else c?l.push(c):d&&s.push(d);const h=Math.min(a[1],u[1]);l.push([a,u].find((e=>e[1]===h)));const v=Math.max(a[1],u[1]);s.push([a,u].find((e=>e[1]===v)));const g=()=>{const t=[...l,...s.reverse()],[i]=t,n=t.at(-1);i[0]===n[0]&&i[1]===n[1]&&t.splice(-1,1),e.push(t),l=[],s=[]};if(p&&f){if(p[0]!==f[0]){const e=Math.min(p[0],f[0]);l.push([p,f].find((t=>t[0]===e))),g()}}else p?(l.push(p),g()):f?(s.push(f),g()):g()})),e})().forEach((t=>{var n,l,s,r,a,u;const c=t.map((e=>({x:e[0],y:e[1]}))),p=new e.Polygon(c,{...i,...(null==(n=o.shadow)?void 0:n.style)||{}});if("slash"==(null==(l=o.shadow)?void 0:l.mode)){p.set({fill:"transparent",stroke:(null==(r=null==(s=o.shadow)?void 0:s.style)?void 0:r.stroke)||"#f00"});const e=A(t,null==(a=o.shadow)?void 0:a.style._angle,null==(u=o.shadow)?void 0:u.style.space);e.forEach((e=>{var t;Object.assign(e,{...i,...(null==(t=o.shadow)?void 0:t.style)||{}}),K.add(e)})),w.value.add(...e)}K.add(p),w.value.add(p)}))}}function ne(){var e;const t=te.find((e=>"pulse"===e.type));if(!t||!(null==(e=t.dataList)?void 0:e.length))return;if(!t.dataList.some((e=>e.title.includes("脉搏"))))return;const o=Object.assign({},p,I.overlap||{}),l=[];U.size&&[...U].forEach((e=>{[...Z].forEach((t=>{if(t.origin&&v(e,t)){const e=t.origin.key;if(e){const s={left:t.left,top:t.top,...i,hoverCursor:"default"};let r="koumai";"yemai"===e&&(r=e),"humai"===e&&(r="circle"),l.push(n(r,{...o[e]||{},...s}))}}}))})),setTimeout((()=>{w.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),ee.add(e)}))}))}function oe(e,s,r){var a;const{type:u,riseStyle:c={},noRiseStyle:p={},verifiedStyle:d={},reduceStyle:h={},pacemaker:v={},upArrowStyle:m={},limitValueStyle:x={},nonePainPointStyle:b={},dataList:k=[]}=r,S=[],$=[],T=[];null==(a=e.list)||a.forEach(((a,P)=>{const O=f(u)?k.find((e=>e.key===a.key)):e,A=re(a,r),I={};I.value=function(e,t,i){if(!(null==e?void 0:e.length)||!B.showValue)return;const{lineAttr:n={}}=i,l=e[1]<=H.originY+R?e[1]+R:e[1]-R,s=o([e[0],l],{value:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return T.push(s),{obj:s,top:-R}}(A,a,O),function(e,s,a,f){var v,y;if(!(null==e?void 0:e.length)||!["temperature","pain"].includes(u))return;const{lineAttr:m={}}=a,{value:x}=f;let b,w,j,L,k,S;if(s.noRise&&p.show)if(p.text)j=o([e[0],e[1]+5],{value:p.text.split("").join("\n"),originY:"top",...p.style||{}}),T.push(j);else{const t=e[1]+2*R;L=l([e[0],e[1],t],p.style||{}),T.push(L)}s.rise&&c.show&&c.text&&(k=o([e[0],e[1]-(x?R:0)-5],{value:c.text.split("").join("\n"),originY:"bottom",...c.style||{}}),T.push(k));s.verified&&(S=o([e[0],e[1]-(x?R:0)-5],{value:"v",originX:"center",originY:"bottom",...d}),T.push(S));if(g(s.physicsReduce)||g(s.drugReduce)){const o=Y(u,r.list,null!=(v=s.physicsReduce)?v:s.drugReduce);b=t([...e,e[0],o],{...m,...h.line,...i}),w=n((null==(y=null==h?void 0:h.point)?void 0:y.type)||"circle",{left:e[0],top:o,...h.point,...i,originY:o===J?"bottom":"center"}),b&&T.push(b),w&&T.push(w)}Object.assign(f,{reduceLine:{obj:b,type:"line"},noRiseText:{obj:j,top:5},arrowGroup:{obj:L,top:2*R},riseText:{obj:k,top:(x?-R:0)-5},verifiedText:{obj:S,top:(x?-R:0)-5},reducePoint:{obj:w,type:"reduce"}})}(A,a,O,I),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(u))return;let s,a;const{upArrowShow:c=!1,limitValueShow:p=!1}=i;if(c&&+t.value>180){let t=e[1]-2.5*R,i=[e[1]-R/2,t];t<H.originY&&(t=e[1]+2.5*R,i=[t,e[1]+R/2]),s=l([e[0],i[0],i[1]],m,"up"),T.push(s)}if(p){const i={value:t.value,originX:"center",originY:"center",...x};if(+t.value>Math.max(...r.list)){const t=s?e[1]+R/2+s.height:e[1]+R;a=o([e[0],t],i),T.push(a)}+t.value<Math.min(...r.list)&&(a=o([e[0],e[1]-R],i),T.push(a))}Object.assign(n,{upArrow:{obj:s},limitValue:{obj:a,top:-R}})}(A,a,O,I),function(i,o,l,a,c){let p,d;const{pointAttr:f={},lineAttr:h={},title:g="",key:m,type:x="circle"}=a,k=e.list[l+1],Y=re(k,r),T=le(u,e.list[l].value),P=Y&&le(u,k.value);!i||!Y||o.breakpoint||T||P||i[0]===Y[0]||(d=t([...i,...Y],{...h}));const O=o.pacemakerShow&&"pulse"==u?v.value:T?0:x,A=$[l-1],I={origin:{data:o,title:g,key:m||"",unit:r.unit,type:u,_type:y(g,u),dataIndex:s,index:l},leftLine:A,rightLine:d,otherObj:c,lockMovementX:!0,...o.pacemakerShow&&"pulse"==u?v.style:f,...j.event.hovered?j.event.evented?{selectable:!0}:{selectable:!0,lockMovementY:!0}:j.event,...T?{selectable:!1,evented:!1,...b}:{}};if(A){const e=A.get("y2");p=n(O,{left:A.get("x2"),top:T?e-5:e,...I})}else i&&(I.leftLine=null,p=n(O,{left:i[0],top:T?i[1]-5:i[1],...I}));$.push(d),p&&(g.includes("脉搏")?U.add(p):Z.add(p),function(e){G.hovered&&(e.on("mouseover",(()=>{se(e,"hover")})),e.on("mouseout",(()=>{M.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?q:H;e.top<t.originY&&e.set("top",t.originY);e.top>t.endY&&e.set("top",t.endY)}(e),function(e){var t,i;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(i=e.rightLine)||i.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:i,type:n="",top:o=0}=t||{};"reduce"!==n&&("line"===n?null==i||i.setCoords().set({x1:e.left,y1:e.top}):null==i||i.setCoords().set({left:e.left,top:e.top+o}))})),ie(e)}(e),G.hovered&&se(e)})),e.on("mouseup",(t=>{if(M.show=!1,1===t.button){const{type:t}=e.origin,i=E(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};w.value.discardActiveObject(),L("change",n),ue(n,"change")}}))}(p),S.push(p),ee.add(p))}(A,a,P,O,I)})),"pulse"===u&&N.forEach((e=>{Q.set(e,S.filter((t=>{var i;return(null==(i=t.origin)?void 0:i.key)===e})).map((e=>[e.left,e.top])))})),Promise.all(S).then((e=>{const t=$.filter((e=>e));let i=null;e=e.map((e=>(e&&i&&(i.nextPoint=e,e.prevPoint=i),i=e||i,e))),Promise.all(T).then((i=>{w.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&&w.value.remove(e.leftLine),e.rightLine&&w.value.remove(e.rightLine))}}(t,e)}))}))}))}function le(e,t){return"pain"===e&&0==t}function se(e,t="moving"){const{title:i,unit:n,type:o,data:l}=e.origin;M.point={x:e.left,y:e.top},M.list=[function(){const{drugReduce:s,physicsReduce:r}=l||{},a="hover"===t?l.value:E(o,e.top);if(g(s))return`药物降${"pain"==o?"痛":"温"} ${a}—>${s}${n||""}`;if(g(r))return`物理降${"pain"==o?"痛":"温"} ${a}—>${r}${n||""}`;return`${i} ${a}${n||""}`}(),`时间 ${((null==l?void 0:l.time)||S(e.left)).slice(-5)}`],M.show=!0}function re(e,t){const i="pain"===t.type?q:H;if(m(e)&&function(e){const[t]=C,i=C.at(-1),n=t.start,o=i.end,l=new Date(e).getTime();return l>=n&&l<=o}(e.time)){const n=k(e.time),o=Y(t.type,t.list,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}}function ae(e){const t=new Date,i=`00${t.getMonth()+1}`.slice(-2),n=`00${t.getDate()}`.slice(-2),o=new Date(`${t.getFullYear()}-${i}-${n} 23:59:59`).getTime(),l=new Date(`${S(e)}:00`).getTime();return W&&l<new Date(W).getTime()?(O("exceedMin"),!1):!(l>o)||(O("exceedMax"),!1)}function ue(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:s}=e,r=te.find((e=>e.type===i));if("add"===t){const e=f(i)?r.dataList.find((e=>e.enable)):r.dataList[n],t=x(l.time,e.list);e.list.splice(t,0,l)}else r.dataList[n].list[o]=l;ce()}function ce(){var e;ee.size&&(null==(e=w.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}([...ee]))),Q.clear(),ee.clear(),U.clear(),Z.clear(),te.forEach((e=>{e.dataList.forEach(((t,i)=>{f(e.type)&&!t.enable||oe(t,i,e)}))})),ie(),ne()}return Q.clear(),U.clear(),Z.clear(),te.forEach((e=>{!function(e){if("temperature"!==e.type||!e.positionLine)return;const i=Y(e.type,e.list,e.positionLine.value),n=t([X,i,z,i],e.positionLine);w.value.add(n)}(e),e.dataList.forEach(((t,i)=>{f(e.type)&&!t.enable||oe(t,i,e)}))})),ie(),ne(),j.event.evented&&w.value.on("mouse:up",(e=>{var t;if(3===e.button){const{x:i=0,y:n=0}=e.pointer||{};if(i>=X&&i<=z&&n>=V&&n<=F){T.point={x:i,y:n},T.show=!0;const{type:o}=(null==(t=e.target)?void 0:t.origin)||{};if(e.target&&["temperature","pain"].includes(o))"temperature"===o&&(T.list=[...u]),"pain"===o&&(T.list=[...c]),T.target=e.target;else{T.target=null,T.list=["新增节点"],_.forEach((t=>{if(!P(i,"_type",D).includes(t.bigType)){const i=["pain"].includes(t.bigType)?q:H;n>=i.originY&&n<=i.endY&&T.list.push({renderItem:$?$(t):()=>t.title,origin:{title:t.title,unit:t.unit,type:h(t.bigType),dataIndex:t.dataIndex,key:t.key},pointer:e.pointer})}}));const t=ae(i);t&&1!==T.list.length||(T.show=!1,1===T.list.length&&t&&O("repeat"))}}}})),{pointTipProps:M,pointMenuProps:T,clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,dataIndex:o,index:l}=t.origin,s=b(i,[...u,...c]);s[`${e.type}`]=e.value,f(n)&&(s.key=t.origin.key);const r={...t.origin,data:s};L("change",r),ue(r,"change")}else{const t={data:{time:S(e.pointer.x),value:E(e.origin.type,e.pointer.y),...f(e.origin.type)?{key:e.origin.key}:{}},...e.origin};L("add",t),ue(t)}},setPopup:se,isAddPoint:ae,updateData:ue,redrawPoints:ce}}export{w as useCenter};
@@ -1 +0,0 @@
1
- import{fabric as t}from"../utils/index.js";import{defaultTextStyle as e,defaultStyle as i,drawPoint as n,drawTextGroup as o}from"./useDraw.js";import{useCommon as l}from"./useCommon.js";import{getScaleInfo as r,drawScaleNumber as s,drawScaleLine as u}from"./useScaleColumn.js";import{getType as a,isOneLine as h}from"../utils/utils.js";function g(g,c,p,d,f,y,w,v,m,S,b){var Y,x;const{getEqualXTypes:T,handleAddPrevent:X}=l(g,p),{originY:C,endY:j,originX:N,endX:V,xCellWidth:L,yCellHeight:M,left:k,vitalSignsOriginY:E,painOriginY:I,painHeight:A,iconsWidth:G,itemList:H,painIndex:O,right:W,canvasWidth:R,canvasHeight:_,getRightInfo:B,borderStyle:J}=c;function $(n){var l;if(!(null==n?void 0:n.length))return;const{layout:a}=n[0];let h=G,c=N;"right"===a&&(h=V,c=V+(null!=(l=null==W?void 0:W.width)?l:0));const p=[],d=A&&"right"!==a?n.length-1:n.length,f=(c-h)/d,y=f+(c-h)%d;n.forEach(((n,l)=>{if("pain"===n.type)return void function(i){const{list:n=[],spaceGridNumber:l=5,showScale:u,showNumber:a,position:h,showMaxMinNumber:c,style:p,title:d}=i,f=o({width:N-G,height:A,...J},{value:`${d}`,...e,...p||{}},{left:G,top:I.originY}),y=[];if(u||a){const{lineXMain:e,textLeft:o}=r(h,G,N-G),g=n.length;n.forEach(((n,r)=>{let h=I.endY-r*M*l;if(0===r&&(h=j-5),!a||(0===r||r===g-1)&&!c||y.push(s(n,i,o,h)),u&&0!==r){const[i,n]=e,o=new t.Line([i,h,n,h],{...J,...p});y.push(o)}}))}g.value.add(f,...y),f.sendToBack()}(n);const c=[],d=0===l?y:f,w=0===l?h:y+h+(l-1)*f,v="right"===a?0:E.originY,m="right"===a?_:E.endY,S=l>0?new t.Line([w,v,w,m],{...J}):null;S&&c.push(S);const b=w+d/2,{list:Y=[],spaceGridNumber:x=5,showScale:T,showNumber:X,position:C,showMaxMinNumber:V}=n;if(T||X){const{lineXMain:t,lineXSub:e,textLeft:i}=r(C,w,d),o=Y.length;Y.forEach(((l,r)=>{const a=E.endY-r*M*x;if(X&&(!(0===r||r===o-1)||V)){const t=0==r?a-5:a,e=s(l,n,i,t),o=E.originY+e.height/2;t<o&&e.set({top:o}),c.push(e)}c.push(...u(n,r,t,e,a,M,E.originY))}))}let L=n.title||"";n.unit&&(L+="\n"+n.unit),L&&c.push(new t.Text(String(L),{...e,left:b,top:E.originY+M*x/2,textAlign:"center",...n.style}));const k=new t.Group(c,{...i,objectCaching:!1});p.push(k)}));const w=p.length>0?new t.Group([...p],{...i,objectCaching:!1}):null;w&&g.value.add(w),w&&w.sendToBack()}function q(t){return t.left>=N&&t.left<V&&t.top>=C&&t.top<=j}G&&function(){const e=JSON.parse(JSON.stringify(H));let o=j;const l=G-k.icons.marginRight;e.reverse().forEach((e=>{o-=10;let r=e.title.replace(/(.{2})/g,"$1\n");r.endsWith("\n")&&(r=r.slice(0,r.length-1));const s=new t.Text(String(r),{...i,objectCaching:!1,...e.titleStyle||{},originX:"right",originY:"bottom",left:l-(e.pointAttr.width||10)-5,top:o,lineHeight:1,fontSize:12}),u=n(e.type,{left:l,top:o-(s.height||30)/2-1,...e.pointAttr,originY:"center",originX:"right",origin:{title:e.title,unit:e.unit,type:a(e.bigType),_type:e.bigType,dataIndex:e.dataIndex,key:e.key,isMenu:!0},originLeft:l,originTop:o-(s.height||30)/2-1,...c.event});var y;o-=s.height||30,(y=u).on("moving",(()=>{y.set("originX","center"),function(t){if(t.left>=N&&t.left<=V){t.setCoords();const e="pain"===t.origin.type?I:E;t.top<e.originY&&t.set("top",e.originY),t.top>e.endY&&t.set("top",e.endY)}}(y),q(y)?d(y):f.show=!1})),y.on("mouseup:before",(t=>{if(f.show=!1,0===t.e.button&&q(y)){const t=T(y.left,"_type",L).includes(y.origin._type),e=S(y.left);if(!e||t)t&&e&&X("repeat");else{const t={data:{time:v(y.left),value:m(y.origin.type,y.top),...h(y.origin.type)?{key:y.origin.key}:{}},...y.origin};p("add",t),b(t)}}!function(t){t.setCoords().set({originX:"right",left:t.originLeft,top:t.originTop})}(y)})),g.value.add(s,u)}))}();const z=k.yScaleValue.filter((t=>"left"===t.layout&&"pain"!==t.type&&t.show));if((null==W?void 0:W.width)&&"left"===(null==(Y=null==W?void 0:W.yScaleValue)?void 0:Y.layout)&&(null==(x=null==W?void 0:W.yScaleValue)?void 0:x.show)&&z.push(B),O>0&&k.yScaleValue[O].show){const t=k.yScaleValue[O];0===O&&k.yScaleValue.length>1&&z.unshift(t),O==k.yScaleValue.length-1&&z.push(t)}const D=z.findIndex((t=>"pulse"===t.type&&t.show&&t.doubleShow)),P=z[D];return D>-1&&z.splice(D,0,{...P,title:(null==P?void 0:P.doubleTitle)||(null==P?void 0:P.title)}),$(z),g.value.add(new t.Rect({left:G,top:0,width:R-G-1,height:_-1,fill:"transparent",...J})),{drawScaleValue:$}}export{g as useLeft};
@@ -1,4 +0,0 @@
1
- import { Ref } from 'vue';
2
- import { fabric } from '../utils';
3
- import { IPropItems } from '../interface';
4
- export declare function useOther(canvas: Ref<fabric.Canvas>, propItems: IPropItems, cumputedX: Function): void;
@@ -1 +0,0 @@
1
- import{fabric as t}from"../utils/index.js";import{defaultStyle as e}from"./useDraw.js";function n(n,i,l){const{other:o,vitalSignsOriginY:r,xCellWidth:a,yCellHeight:c,endX:s}=i;let u=0;function h(n,i,l){const o=[];String(n.value).split("").forEach(((i,l)=>{const r=new t.Text(i,{left:0,top:c*l,originX:"center",...e,objectCaching:!1,...n.style||{}});u=(c-(r.height||0))/2,o.push(r)}));const r={originX:"center",left:i,top:l+u,baseTop:(n.baseTop||0)*c,trueLeft:i,trueHeight:o.length*c,objectCaching:!1};return new t.Group(o,r)}!function(){if(!(null==o?void 0:o.list))return!1;const i=[],u=[];o.list.forEach(((t,e)=>{const n=0===e?"vertical":t.align||"vertical",i=l(t.time,!0);if(i>s)return;const o=u.find((t=>t.left==i));if(o)o[n].push(t);else{const e={left:i,vertical:[],horizontal:[]};e[n].push(t),u.push(e)}})),u.forEach((t=>{let e=r.originY,n=t.left;t.vertical.forEach(((l,o)=>{var s,u;const f=(l.baseTop||0)*c,g=(null==(s=i.at(-1))?void 0:s.left)||0;0===o&&t.left<=g&&(n=g+a);if(i.filter((t=>t.trueLeft===n)).length){const t=String(l.value).length*c,o=(null==(u=i.at(-1))?void 0:u.trueHeight)||0;e+=o,e+t+f>r.endY&&(e=r.originY,n+=a)}e+=f,String(l.value).length&&i.push(h(l,n,e))})),t.horizontal.forEach(((e,l)=>{var o;const s=r.originY+(e.baseTop||0)*c,u=(null==(o=i.at(-1))?void 0:o.left)||0;t.left<=u&&(n=u+a),String(e.value).length&&i.push(h(e,n,s))}))}));const f=i.length>0?new t.Group([...i],{...e,objectCaching:!1}):null;f&&n.value.add(f)}()}export{n as useOther};
@@ -1,4 +0,0 @@
1
- import { Ref } from 'vue';
2
- import { fabric } from '../utils';
3
- import { IPropItems } from '../interface';
4
- export declare function useRight(canvas: Ref<fabric.Canvas>, propItems: IPropItems, drawScaleValue: Function): void;
@@ -1 +0,0 @@
1
- import{fabric as l}from"../utils/index.js";function e(e,i,t){var o,n;const{left:d,right:u,getRightInfo:a,canvasWidth:h,endY:s,endX:r,originY:v,borderStyle:f}=i,c=d.yScaleValue.filter((l=>"right"===l.layout&&l.show));(null==u?void 0:u.width)&&"right"===(null==(o=null==u?void 0:u.yScaleValue)?void 0:o.layout)&&(null==(n=null==u?void 0:u.yScaleValue)?void 0:n.show)&&c.push(a);const w=c.findIndex((l=>"pulse"===l.type&&l.show&&l.doubleShow)),g=c[w];if(w>-1&&c.splice(w,0,{...g,title:(null==g?void 0:g.doubleTitle)||(null==g?void 0:g.title)}),(null==u?void 0:u.width)||c.length>0){const i=new l.Line([h-1,0,h-1,s],f),t=new l.Line([r+1,v,h-1,v],{...f,stroke:"#fff"});e.value.add(i,t)}t(c)}export{e as useRight};
@@ -1 +0,0 @@
1
- import{useMemoize as t}from"@vueuse/core";import{fabric as n}from"../utils/index.js";const r=t((t=>+Math.tan(t*Math.PI/180)));function e(){return{createShadowLines:function(e,o=45,u=10){const a=[];var c;if(c=o,0===(o=c=(c=(c%=360)<0?180-c:c)>=180?c-180:c))return a;const i=Math.min(...e.map((([t])=>t))),h=Math.max(...e.map((([t])=>t))),s=Math.min(...e.map((([,t])=>t))),f=Math.max(...e.map((([,t])=>t))),m=(f-s)/r(o);let p=i,M=h;return o>0&&o<90||o>180&&o<270?M+=m:p+=m,function(t,n){const r=[l([t,s])];for(;t<n;)t+=u,r.push(l([t,s]));return r}(p,M).forEach((r=>{let o=[];var u,c,i,h,s,f;if((u=e,u.reduce(((t,n,r)=>{const e=u[r+1]||u[0];return t.push([n,e]),t}),[])).forEach((n=>{const e=function(n,r,e,o){const u=(r[1]-n[1])*(o[0]-e[0])-(n[0]-r[0])*(e[1]-o[1]);if(0===u)return!1;const a=((r[0]-n[0])*(o[0]-e[0])*(e[1]-n[1])+(r[1]-n[1])*(o[0]-e[0])*n[0]-(o[1]-e[1])*(r[0]-n[0])*e[0])/u,c=-((r[1]-n[1])*(o[1]-e[1])*(e[0]-n[0])+(r[0]-n[0])*(o[1]-e[1])*n[1]-(o[0]-e[0])*(r[1]-n[1])*e[1])/u;if(((a-n[0])*(a-r[0])<0||t(a,n[0])||t(a,r[0]))&&((c-n[1])*(c-r[1])<0||t(c,n[1])||t(c,r[1]))&&((a-e[0])*(a-o[0])<0||t(a,e[0])||t(a,o[0]))&&((c-e[1])*(c-o[1])<0||t(c,e[1])||t(c,o[1])))return[a,c];return!1}(r[0],r[1],n[0],n[1]);e&&o.push(e)})),c=function(n){return n.reduce(((t,n)=>(r(t,n)||t.push(n),t)),[]);function r(n,r){return n.some((n=>t(n[0],r[0])&&t(n[1],r[1])))}}(o),o=c.sort(((t,n)=>t[1]-n[1])),o.length>=2)for(let t=0;t<o.length;t++)o[t+1]&&(s=o[t],f=o[t+1],function(t,n){let r,e,o,u=0;const a=n.length;e=n[0];for(let c=1;c<=a;c++)o=n[c%a],t[0]>Math.min(e[0],o[0])&&t[0]<=Math.max(e[0],o[0])&&t[1]<=Math.max(e[1],o[1])&&e[0]!=o[0]&&(r=(t[0]-e[0])*(o[1]-e[1])/(o[0]-e[0])+e[1],(e[1]==o[1]||t[1]<=r)&&u++),e=o;return u%2!=0}([(s[0]+f[0])/2,(s[1]+f[1])/2],e))&&a.push((i=o[t],h=o[t+1],new n.Line([i[0],i[1],h[0],h[1]])))})),a;function l(t){return[t,[t[0]-m,f]]}}};function t(t,n){return Math.abs(t-n)<=1e-4}}export{e as useShadow};
@@ -1 +0,0 @@
1
- import{ref as e,reactive as t,computed as a,onMounted as l,nextTick as u}from"vue";import{defaultBorderStyle as i}from"./useDraw.js";import{useCumputedPoint as n}from"./useCumputedPoint.js";import{useTop as r}from"./useTop.js";import{useLeft as o}from"./useLeft.js";import{useRight as s}from"./useRight.js";import{useCenter as d}from"./useCenter.js";import{useBottom as v}from"./useBottom.js";import{useOther as c}from"./useOther.js";import{useEvent as p,useCanvasEvent as h}from"./useEvent.js";import"../utils/index.js";import{setOtherType as g,getFloorNumber as m}from"../utils/utils.js";import"lodash-es";import"date-fns";function f(f,y,Y,S){const w=15,b=e(),C=e(),x=e(),j=t({show:!1,point:{x:0,y:0},list:[]}),D=t({show:!1,point:{x:0,y:0},list:[],target:null}),V=a((()=>{const{top:e}=y.data;return e.date.show&&(e.date.height||w)||0})),X=a((()=>{var e;const{top:t}=y.data;return(null==(e=t.hospitalDays)?void 0:e.show)&&(t.hospitalDays.height||w)||0})),H=a((()=>{var e;const{top:t}=y.data;return(null==(e=t.operationDays)?void 0:e.show)&&(t.operationDays.height||w)||0})),L=a((()=>{var e,t,a;const{top:l}=y.data;return((null==(e=l.xScalevalue)?void 0:e.show)&&(l.xScalevalue.height||w)||0)+((null==(t=l.xScalevalue)?void 0:t.show)&&null!=(a=l.dayHeight)?a:0)})),P=a((()=>{var e;const{bottom:t}=y.data;return(null==(e=null==t?void 0:t.breathing)?void 0:e.show)&&(t.breathing.height||30)||0})),$=a((()=>{const{grid:e}=y.data;return e.mainXCell*e.subXCell+e.surplusXCell})),I=a((()=>{const{grid:e}=y.data;return e.mainYCell*e.subYCell+e.surplusYCell})),N=a((()=>{var e;const{width:t,right:a=null,top:l}=y.data;if(!a)return t;return t-(null!=(e=a.width)?e:0)})),T=a((()=>{const{grid:e}=y.data;return N.value-e.surplusXCell*M.value})),O=a((()=>{const{top:e,left:t}=y.data;return e.titleWidth+q.value})),W=a((()=>{const{bottom:e=null,height:t}=y.data;if(!e)return t;return t-(e.height||30)})),k=a((()=>{var e;const{top:t}=y.data,a=t.xScalevalue.show&&(null!=(e=t.dayHeight)?e:0)||0,l=t.xScalevalue.show&&(t.xScalevalue.height||w)||0;return V.value+a+l+X.value+H.value})),G=a((()=>{const{grid:e}=y.data;return k.value+e.surplusYCell*R.value})),M=a((()=>(N.value-O.value)/$.value)),R=a((()=>(W.value-k.value)/I.value)),q=a((()=>{var e,t;const{left:a}=y.data;return(null==(e=a.icons)?void 0:e.show)&&((null==(t=a.icons)?void 0:t.width)||100)||0})),z=a((()=>{var e,t;const{top:a,grid:l}=y.data,u=(null==(t=null==(e=a.date.list)?void 0:e.slice)?void 0:t.call(e,0,l.mainXCell))||[],i=a.xScalevalue.times;let n=O.value-M.value;function r(e){const[t="2022",a="01",l="01"]=String(e).match(/\d+/g)||[];return`20${t}`.slice(-4)+"-"+`00${a}`.slice(-2)+"-"+`00${l}`.slice(-2)}return u.map((e=>i.map((t=>{n+=M.value;const a=new Date(`${r(e)} ${t.start}`).getTime(),l=new Date(`${r(e)} ${t.end}`).getTime();return{start:a,end:l,left:n,center:n+M.value/2,scaleCell:(l-a)/M.value}})))).flat()})),A=a((()=>le("breathe"))),B=a((()=>le("pulse"))),E=a((()=>le("temperature"))),F=a((()=>le("pain"))),J=a((()=>{var e;return(null==(e=y.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),K=a((()=>{const{left:e}=y.data;return e.yScaleValue.map((e=>e.dataList.filter((e=>e.show)).map(((t,a)=>({...t,bigType:g(t.title,e.type),unit:e.unit,dataIndex:a}))))).flat()})),Q=a((()=>{const{left:e}=y.data;return e.yScaleValue.findIndex((e=>"pain"===e.type))})),U=a((()=>{const{grid:e}=y.data;return-1===Q.value?0:R.value*e.subYCell})),Z=a((()=>{const{left:e}=y.data,t={originY:W.value,endY:W.value};return 0===Q.value&&e.yScaleValue.length>1?(t.originY=G.value,t.endY=G.value+U.value):Q.value===e.yScaleValue.length-1&&(t.originY=W.value-U.value,t.endY=W.value),t})),_=a((()=>{const{left:e}=y.data,t={originY:k.value,endY:W.value};return 0===Q.value&&e.yScaleValue.length>1?(t.originY=G.value+U.value,t.endY=W.value):Q.value===e.yScaleValue.length-1&&(t.originY=G.value,t.endY=W.value-U.value),t})),ee=a((()=>{var e,t;const{top:a,grid:l}=y.data,u=[];for(const i in a)a[i].show&&u.push({...a[i],list:(null==(t=null==(e=a[i].list)?void 0:e.slice)?void 0:t.call(e,0,l.mainXCell))||[],key:i});return u.sort(((e,t)=>e.seq-t.seq))})),te=a((()=>{var e;const{left:t,right:a}=y.data,l=t.yScaleValue.find((e=>"temperature"===e.type)),u=(null==a?void 0:a.yScaleValue)||{};return(null==(e=null==l?void 0:l.list)?void 0:e.length)&&Object.assign(u,{list:l.list.map((e=>m(1.8*e+32))),spaceGridNumber:l.spaceGridNumber}),u})),ae=t({canvasWidth:y.data.width,canvasHeight:y.data.height,borderStyle:{...i,...y.data.borderStyle||{}},selectionStyle:y.data.selectionStyle||{},dateHeight:V.value,hospitalDaysHeight:X.value,operationDaysHeight:H.value,xScalevalueHeight:L.value,topList:ee.value,breathingHeight:P.value,hospitalizationDate:y.data.hospitalizationDate,grid:y.data.grid,top:y.data.top,left:y.data.left,right:y.data.right,bottom:y.data.bottom,other:y.data.other,painIndex:Q.value,painHeight:U.value,painOriginY:Z.value,vitalSignsOriginY:_.value,gridXNumber:$.value,gridYNumber:I.value,iconsWidth:q.value,originX:O.value,originY:k.value,originYLimit:G.value,endX:N.value,endXLimit:T.value,endY:W.value,xCellWidth:M.value,yCellHeight:R.value,xScaleList:z.value,breatheYCell:A.value,pulseYCell:B.value,temperatureYCell:E.value,painYCell:F.value,event:J.value,itemList:K.value,getRightInfo:te.value,config:y.data.config||{}});function le(e){const{yScaleValue:t}=y.data.left,a=t.find((t=>t.type===e)),l=(null==a?void 0:a.list)||[];return l.length?R.value/((l[1]-l[0])/a.spaceGridNumber):0}const{cumputedX:ue,cumputedY:ie,getXValue:ne,getYValue:re}=n(ae);return l((()=>{u((()=>{r(f,ae);const{setPopup:e,isAddPoint:t,updateData:a,redrawPoints:l,clickMenu:u}=d(f,ae,Y,ue,ie,ne,re,y.addRenderItem,j,D);C.value=l,x.value=u;const{drawScaleValue:i}=o(f,ae,Y,e,j,ue,ie,ne,re,t,a);s(f,ae,i),v(f,ae),c(f,ae,ue),p(S.value);const{select:n}=h(f,ae,Y);b.value=n}))})),{propItems:ae,redrawPoints:C,select:b,pointTipProps:j,pointMenuProps:D,clickMenu:x}}export{f as default};
@@ -1,4 +0,0 @@
1
- import { type Ref } from 'vue';
2
- import { fabric } from '../utils';
3
- import { IPropItems } from '../interface';
4
- export declare function useTop(canvas: Ref<fabric.Canvas>, propItems: IPropItems): void;
@@ -1 +0,0 @@
1
- import{fabric as t}from"../utils/index.js";import{defaultStyle as e,drawTextGroup as l,defaultTextStyle as i}from"./useDraw.js";function o(o,n){const{grid:s,originX:h,xCellWidth:u,gridXNumber:a,top:c,xScalevalueHeight:d,iconsWidth:r,topList:f,endXLimit:p,canvasWidth:g,borderStyle:v}=n;!function(){const y=[];p&&y.push(new t.Line([p,0,g,0],v));let S=0;f.forEach(((t,e)=>{e>0&&(S+=n[`${f[e-1].key}Height`]),"xScalevalue"==t.key?(function(t,e,o){if(!c.dayHeight)return!1;const n=c.dayHeight,d=u*s.subSecondXCell,r=(a-s.surplusXCell)/s.subSecondXCell;for(let s=0;s<r;s++){const u=h+s*d,a=s%2==0?"上午":"下午",c=l({width:d,height:n,...v},{value:a,...i,...t.style||{}},{left:u,top:o});e.push(c)}}(t,y,S),function(t,e,o){var n;const a=c.xScalevalue.show&&null!=(n=c.dayHeight)?n:0,f=d-a,p=l({width:h-r,height:d,...v},{value:c.xScalevalue.title,...i,...t.style||{},...t.titleStyle||{}},{left:r,top:o});e.push(p);const g=[];for(let t=0;t<s.mainXCell;t++)g.push(c.xScalevalue.list);g.flat().forEach(((n,s)=>{const c=h+s*u,d=l({width:u,height:f,...v},{value:n.value,...i,...t.style||{},...n.style||{}},{left:c,top:o+a});e.push(d)}))}(t,y,S)):n[`${t.key}Height`]&&function(t,e,o){const a=n[`${t.key}Height`],c=l({width:h-r,height:a,...v},{value:t.title,...i,...(null==t?void 0:t.style)||{},...t.titleStyle||{}},{left:r,top:o});e.push(c);const d=u*s.subXCell;t.list.forEach(((n,s)=>{const u=h+s*d,c=l({width:d,height:a,...v},{value:n,...i,...(null==t?void 0:t.style)||{}},{left:u,top:o});e.push(c)}))}(t,y,S)}));const w=y.length>0?new t.Group([...y],{...e,objectCaching:!1}):null;w&&w.sendToBack(),w&&o.value.add(w)}()}export{o as useTop};
@@ -1 +0,0 @@
1
- import{isNull as n}from"lodash-es";function t(n){return(null==n?void 0:n.time)&&((null==n?void 0:n.value)||0===(null==n?void 0:n.value))}function e(n,t){const e={};for(const u in n)t.map((n=>n.type)).includes(u)||(e[u]=n[u]);return e}function u(n,t){const e=t.findIndex((t=>new Date(t.time).getTime()>new Date(n).getTime()));return~e?e:t.length}function r(n){return["temperature","pulse"].includes(n)}function o(n,t){return n.includes("心率")?"pulse_other":t}function i(n){return n.includes("_other")?n.split("_")[0]:n}function l(t){return!Number.isNaN(+t)&&!n(t)}function c(n,t){return f(n.left,1)===f(t.left,1)&&Math.abs(f(n.top,1)-f(t.top,1))<=2}function f(n,t=100){return Math.floor(n*t)/t}export{e as deleteProperty,f as getFloorNumber,u as getIndex,i as getType,t as isEffectiveNode,r as isOneLine,c as isOverlapPoint,l as isValidValue,o as setOtherType};
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as l,watch as t,openBlock as i,createElementBlock as d,createElementVNode as a,Fragment as o,renderList as c,normalizeStyle as s,createBlock as n,unref as r,withCtx as f,createTextVNode as u,toDisplayString as p,createCommentVNode as h,createVNode as b,withDirectives as v,vShow as y,renderSlot as k}from"vue";import{NCheckbox as x,NTooltip as m,NIcon as g,NSelect as A,NInput as _,NInputNumber as E,NPopconfirm as S,NButton as w}from"naive-ui";import W from"../../../shared/components/VueDraggable/src/vuedraggable.js";import{ReorderTwoOutline as N}from"@vicons/ionicons5";const U={class:"c-field-set"},F={class:"c-field-set__table-header"},O={class:"c-field-set__table-body"},R=["tabindex"],q=["title"],D=a("span",null,"拖拽调整顺序",-1),C={key:0,class:"c-field-set__table-footer"};var T=e({__name:"FieldSet",props:{fields:{type:Array,default:function(){return[]}},footerFlag:{type:Boolean,default:!0},type:{type:String,default:"old"},isEdit:{type:Boolean,default:!1}},emits:["save","close","reset"],setup(e,{expose:T,emit:j}){const P=e,B={sid:"id",columnName:"name",isShow:"show",isSort:"sort",isFixed:"fixedWay",colWidth:"columnWidth"},G=[{label:"不固定",value:"NONE"},{label:"左固定",value:"LEFT"},{label:"右固定",value:"RIGHT"}],H=[{label:"不排序",value:"NONE"},{label:"升序",value:"ASC"},{label:"降序",value:"DESC"}],I=l([]),J=l([{title:"所有字段",type:"text",field:"title"},{title:"显示",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"show"},{title:"编辑",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"editable"},{title:"必填",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"required"},{title:"排序",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"sort"},{title:"加粗",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"bold"},{title:"默认排序",type:"select",field:"sortDirection"},{title:"固定",type:"select",field:"fixedWay"},{title:"自定义标题",type:"input",field:"alias"},{title:"列宽",type:"inputNumber",field:"columnWidth"}]),L=()=>{j("save",{tableFields:Q()})},$=()=>{j("close")};function V(){I.value=M(),Y(),j("reset")}function z(e){return"fixedWay"===e.field?G:H}function K(e){const l={flex:"1 1 90px"};switch(e.type){case"text":Object.assign(l,{flex:"0 0 120px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"});break;case"checkbox":l.flex="1 1 60px";break;case"select":l.flex="1 1 80px";break;case"input":l.flex="1 1 100px"}return l}function M(){const e=JSON.parse(JSON.stringify(P.fields||[]));return Object.keys(B).forEach((l=>{e.forEach((e=>{"old"==P.type&&Reflect.has(e,l)&&("isFixed"==l?e.fixedWay=1==e[l]?"LEFT":2==e[l]?"RIGHT":"NONE":["isShow","isSort"].includes(l)&&"boolean"!=typeof l?e[B[l]]=1==e[l]:e[B[l]]=e[l],Reflect.deleteProperty(e,l)),e.columnWidth=+e.columnWidth||null,Reflect.has(e,"alias")||(e.alias=""),Reflect.has(e,"bold")||(e.bold=!1)}))})),e}const Q=()=>{if("old"==P.type){const e=[];return I.value.length>0&&I.value.forEach(((l,t)=>{e.push({id:l.id,field:l.name,visible:l.show,sequence:t,sortable:l.sort,title:l.alias,fixed:l.fixedWay,minWidth:l.columnWidth,bold:l.bold,sortDirection:l.sortDirection,...P.isEdit?{required:l.required,editable:l.editable}:{}})})),e}return I.value};function X(e,l){return["editable","required"].includes(l)&&e[`${l}Disable`]||["sort"].includes(l)&&1==e.notParticipatingSort}function Y(){J.value.forEach((e=>{if(function(e){const l=["editable","required"].includes(e.field);return l&&P.isEdit||!l}(e)&&(e.isShow=!0),"checkbox"===e.type){const l=I.value.every((l=>!Reflect.has(l,e.field)));e.checkedAll=!Z(e.field)&&!l}}))}function Z(e){return I.value.some((l=>!X(l,e)&&!l[e]&&"0001"!=l.id))}return t((()=>P.fields),(e=>{(null==e?void 0:e.length)>0&&(I.value=M(),Y())}),{immediate:!0,deep:!0}),T({getTableFields:Q}),(l,t)=>(i(),d("div",U,[a("div",F,[(i(!0),d(o,null,c(J.value,((e,l)=>(i(),d(o,{key:l},[e.isShow?(i(),d("span",{key:0,class:"table-cell",style:s(K(e))},["checkbox"===e.type?(i(),n(r(x),{key:0,checked:e.checkedAll,"onUpdate:checked":[l=>e.checkedAll=l,l=>{return t=l,i=e.field,void I.value.forEach((e=>{X(e,i)||(e[i]=t)}));var t,i}],disabled:e.disabledAll},{default:f((()=>[u(p(e.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"])):h("v-if",!0),u(" "+p("checkbox"!==e.type?e.title:""),1)],4)):h("v-if",!0)],64)))),128))]),a("div",O,[b(r(W),{list:I.value,animation:"150","item-key":"id",tag:"ul"},{item:f((({element:e,index:l})=>[e.hide?h("v-if",!0):(i(),d("li",{key:0,tabindex:l},[(i(!0),d(o,null,c(J.value,((l,t)=>(i(),d(o,{key:t},[l.isShow?(i(),d("span",{key:0,class:"table-cell",title:e[l.field],style:s(K(l))},["text"===l.type?(i(),d(o,{key:0},[b(r(m),{trigger:"hover"},{trigger:f((()=>[b(r(g),{style:{"margin-right":"5px",top:"2px"},component:r(N)},null,8,["component"])])),default:f((()=>[D])),_:1}),u(" "+p(e[l.field]),1)],64)):h("v-if",!0),"checkbox"===l.type?v((i(),n(r(x),{key:1,disabled:X(e,l.field),checked:e[l.field],"onUpdate:checked":[t=>e[l.field]=t,e=>function(e,l){const t=!e||Z(l.field);l.checkedAll=!t}(e,l)]},null,8,["disabled","checked","onUpdate:checked"])),[[y,"0001"!=e.id]]):h("v-if",!0),"select"===l.type?v((i(),n(r(A),{key:2,value:e[l.field],"onUpdate:value":t=>e[l.field]=t,options:z(l)},null,8,["value","onUpdate:value","options"])),[[y,"fixedWay"===l.field||"0001"!=e.id]]):h("v-if",!0),"input"===l.type?v((i(),n(r(_),{key:3,value:e[l.field],"onUpdate:value":t=>e[l.field]=t,clearable:""},null,8,["value","onUpdate:value"])),[[y,"0001"!=e.id]]):h("v-if",!0),"inputNumber"===l.type?(i(),n(r(E),{key:4,value:e[l.field],"onUpdate:value":t=>e[l.field]=t},null,8,["value","onUpdate:value"])):h("v-if",!0)],12,q)):h("v-if",!0)],64)))),128))],8,R))])),_:1},8,["list"])]),e.footerFlag?(i(),d("div",C,[h(" 底部按钮插槽 "),k(l.$slots,"footer",{},(()=>[b(r(S),{onPositiveClick:V},{trigger:f((()=>[b(r(w),{style:{"margin-right":"8px"}},{default:f((()=>[u("恢复默认设置")])),_:1})])),default:f((()=>[u(" 确认要恢复系统默认设置吗? ")])),_:1}),b(r(w),{style:{"margin-right":"8px"},onClick:$},{default:f((()=>[u("取消")])),_:1}),b(r(w),{type:"primary",onClick:L},{default:f((()=>[u("保存")])),_:1})]))])):h("v-if",!0)]))}});export{T as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as o,provide as r,toRaw as t,openBlock as i,createElementBlock as a,normalizeStyle as n,unref as s,createElementVNode as m,createVNode as l,mergeProps as f,withCtx as c,createTextVNode as u}from"vue";import{useTheme as d}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{cloneDeep as p,isArray as g,isFunction as h}from"lodash-es";import{uuidGenerator as v}from"../../../shared/utils/index.js";import _ from"../../../shared/components/VueDraggable/src/vuedraggable.js";import C from"./components/FormConfigCreator.vue.js";import j from"./components/FormConfigDragDisplay.vue.js";import y from"./components/FormConfigEdit.vue.js";import x from"./components/FormConfigMaterialItem.js";import{useDataNormalize as F}from"./hooks/useDataNormalize.js";import{InjectionFieldList as V,InjectionMaterialList as b,InjectionActiveFieldItem as k,FORM_CONFIG_GROUP as D}from"./constants/index.js";import"@vicons/ionicons5";import"naive-ui";import"./utils/index.js";import{useSortableConfig as R}from"./hooks/useSortalbeConfig.js";import"./hooks/useConfigurationField.js";const E=["id"],H={class:"form-config__material"},I=m("header",{class:"form-config__materialHeader"},"物料区",-1),L={class:"form-config__displayWrapper"},N={class:"form-config__displayHeader"},O={class:"form-config__config"},S=m("header",{class:"form-config__configHeader"},"配置区",-1),T={class:"form-config__configContent"};var A=e({__name:"FormConfig",props:{maxHeight:{type:String},fieldVisitor:{type:Object},textFormatter:{type:Function},formRenderRef:{type:Object}},setup(e,{expose:A}){const B=e,M=v(),U=d(),{getCommonConfig:w}=R(),z=o([]);r(V,z);const W=o([]);function q(e){z.value.some((o=>o.key===e.key))||z.value.push(e)}r(b,W);const G=(e,o)=>h(B.textFormatter)?B.textFormatter(e,o):o,J=o();r(k,J);const K=o(),{transform:P,inverseTransform:Q}=F(B);return A({loadData({fieldList:e}){let o=[],r=[];e.forEach((e=>function(e){"LINE_BAR"===e.type&&(e.children=[]);!1===e.show?r.push(e):o.push(e),"COMBINATION"===e.type&&g(e.children)&&e.children.length&&e.children.forEach((e=>{e.__isCombinationChild=!0}))}(p(t(e))))),z.value=P(o),W.value=r,J.value=void 0},validate(){var e;return null==(e=K.value)?void 0:e.validate()},getData:()=>({fieldList:Q(p(t(z.value))),materialList:Q(p(t(W.value)))})}),(o,r)=>(i(),a("section",{class:"form-config",style:n({"--max-height":e.maxHeight,...s(U)}),id:s(M)},[m("section",H,[I,l(s(_),f(s(w)(),{class:"form-config__materialContent",modelValue:W.value,"onUpdate:modelValue":r[0]||(r[0]=e=>W.value=e)}),{item:c((({element:e})=>[l(s(x),{"form-config-item":e,"text-formatter":G},null,8,["form-config-item"])])),_:1},16,["modelValue"])]),m("section",L,[m("header",N,[u(" 布局区 "),l(C,{onSubmit:q})]),l(j,{class:"form-config__displayContent",group:s(D),"text-formatter":G,modelValue:z.value,"onUpdate:modelValue":r[1]||(r[1]=e=>z.value=e)},null,8,["group","modelValue"])]),m("section",O,[S,m("section",T,[l(y,{ref_key:"formConfigEditRef",ref:K,uuid:s(M),"form-render-ref":e.formRenderRef},null,8,["uuid","form-render-ref"])])])],12,E))}});export{A as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as i,openBlock as t,createBlock as l,unref as a,withCtx as o,createVNode as r,createTextVNode as n}from"vue";import{pick as s}from"lodash-es";import{NButtonGroup as m,NPopconfirm as u,NButton as d}from"naive-ui";import{EditAbleField as f}from"../constants/index.js";import{useConfigurationField as _}from"../hooks/useConfigurationField.js";import"../../../index.js";import L from"../../../form-render/index.js";var p=e({__name:"FormConfigCreator",emits:{submit:e=>e},setup(e,{emit:p}){const c=_().generateFieldListByKeys([f.NAME,f.LAYOUT_WIDTH_ENUM,f.NOTES,f.DEFAULT_EXPAND,f.FOLD]),E=i(),h=i(),w={defaultExpand:!0,fold:!0,layoutWidthEnum:"ALL_LINE"};async function y(e,i){if(!i)return;await i.validate();const t=i.getFormValues();p("submit",{layoutWidthEnum:"ALL_LINE",...t,type:e,key:t.name,__new:!0})}return(e,i)=>(t(),l(a(m),{size:"small"},{default:o((()=>[r(a(u),{width:"200px","show-icon":!1,"show-arrow":!1,onPositiveClick:i[0]||(i[0]=e=>y("NEWLINE",h.value))},{trigger:o((()=>[r(a(d),null,{default:o((()=>[n("新建分行符")])),_:1})])),default:o((()=>[r(a(L),{column:12,ref_key:"lineBreakFormRef",ref:h,"initial-data":a(s)(w,["layoutWidthEnum"]),size:"small","label-width":"auto","label-placement":"left",fieldList:a(c).slice(0,2)},null,8,["initial-data","fieldList"])])),_:1}),r(a(u),{width:"300px","show-icon":!1,"show-arrow":!1,onPositiveClick:i[1]||(i[1]=e=>y("LINE_BAR",E.value))},{trigger:o((()=>[r(a(d),null,{default:o((()=>[n("新建分线栏")])),_:1})])),default:o((()=>[r(a(L),{column:12,ref_key:"linebarFormRef",ref:E,"initial-data":w,size:"small","label-width":"auto","label-placement":"left",fieldList:a(c)},null,8,["fieldList"])])),_:1})])),_:1}))}});export{p as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,openBlock as t,createBlock as o,unref as r,mergeProps as m,withCtx as i,createElementVNode as n,normalizeStyle as a,resolveDynamicComponent as s}from"vue";import f from"../../../../shared/components/VueDraggable/src/vuedraggable.js";import{usePresetRenderer as u}from"../hooks/usePresetRenderer.js";import{useSortableConfig as d}from"../hooks/useSortalbeConfig.js";import"../hooks/useConfigurationField.js";import{layoutWidthEnum2Column as p}from"../utils/index.js";const g=["data-type","data-required"];var l=e({__name:"FormConfigDragDisplay",props:{formConfigItem:{type:Object},textFormatter:{type:Function,required:!0}},setup(e){function l(e){return{"--item-column":e?p(e.layoutWidthEnum):24}}const{getRenderer:c}=u(),{getCommonConfig:y}=d();return(u,d)=>(t(),o(r(f),m(r(y)(e.formConfigItem),{style:l(e.formConfigItem)}),{item:i((({element:m})=>[n("div",{class:"form-config__displayContentItem","data-type":m.type,"data-required":m.required,style:a(l(m))},[(t(),o(s(r(c)(m)),{"form-config-item":m,textFormatter:e.textFormatter},null,8,["form-config-item","textFormatter"]))],12,g)])),_:1},16,["style"]))}});export{l as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,computed as o,ref as i,inject as l,watch as t,toRaw as a,openBlock as r,createElementBlock as n,Fragment as s,createVNode as u,unref as d,nextTick as m}from"vue";import{cloneDeep as v}from"lodash-es";import{InjectionActiveFieldItem as f}from"../constants/index.js";import"../../../../shared/components/VueDraggable/src/vuedraggable.js";import{findFieldItemByKey as p}from"../utils/index.js";import"@vicons/ionicons5";import{NModal as c}from"naive-ui";import"../../../../shared/utils/index.js";import{useConfigurationField as g}from"../hooks/useConfigurationField.js";import"../../../index.js";import h from"../../../form-render/index.js";var y=e({__name:"FormConfigEdit",props:{uuid:{type:String,required:!0},formRenderRef:{type:Object}},setup(e,{expose:y}){const j=e,x=o((()=>`#${j.uuid} .form-config__config`)),b=i(),w=l(f),F=i([]),R=i({}),{generateFieldListByFormConfigItem:k}=g(),C=i(!1);async function _(){var e;w.value=P,await m(),null==(e=b.value)||e.validate()}let P=null;function L({fieldKey:e,value:o}){w.value&&(w.value[e]=o)}return t(w,(async(e,o)=>{var i,l,t;if(!e)return F.value=[];if(o&&e!==P)try{await(null==(i=b.value)?void 0:i.validate())}catch(e){return C.value=!0}P=e,R.value={editable:!0,show:!0,...v(a(e))};const r=null==(l=j.formRenderRef)?void 0:l.getFieldList();F.value=k(e,p(r,e.key)).map((e=>({...e,componentProps:{...e.componentProps,to:x.value}}))),null==(t=b.value)||t.reload()}),{immediate:!0}),y({validate(){var e;return null==(e=b.value)?void 0:e.validate()}}),(e,o)=>(r(),n(s,null,[u(d(h),{column:12,ref_key:"formRenderRef",ref:b,size:"small",onFormChange:L,"field-list":F.value,"initial-data":R.value},null,8,["field-list","initial-data"]),u(d(c),{show:C.value,"onUpdate:show":o[0]||(o[0]=e=>C.value=e),preset:"dialog",to:d(x),"close-on-esc":!1,"mask-closable":!1,closable:!1,title:"存在填写错误的字段","positive-text":"继续编辑",onPositiveClick:_},null,8,["show","to"])],64))}});export{y as default};
@@ -1 +0,0 @@
1
- import{defineComponent as o,inject as e,openBlock as n,createBlock as t,unref as r,withModifiers as i,withCtx as m,createVNode as s}from"vue";import{CloseCircle as c}from"@vicons/ionicons5";import{isArray as p}from"lodash-es";import{NButton as l,NIcon as u}from"naive-ui";import{InjectionFieldList as a,InjectionMaterialList as f}from"../../constants/index.js";var _=o({__name:"CloseButton",props:{formConfigItem:{type:Object,required:!0}},setup(o){const _=o,d=e(a),v=e(f),C=()=>{!function o(e){return p(e)&&e.some(((e,n,t)=>e!==_.formConfigItem?o(e.children):(!e.__new&&v.value.push(e),t.splice(n,1))))}(d.value)};return(o,e)=>(n(),t(r(l),{text:"",class:"form-config__renderer--closeButton","text-color":"#a5a5a5",onClick:i(C,["stop"])},{icon:m((()=>[s(r(u),{component:r(c)},null,8,["component"])])),_:1},8,["onClick"]))}});export{_ as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,inject as o,computed as r,openBlock as m,createElementBlock as n,createElementVNode as t,mergeProps as i,unref as f,withModifiers as l,createTextVNode as c,toDisplayString as s,createVNode as a}from"vue";import p from"../FormConfigDragDisplay.vue.js";import d from"./CloseButton.vue.js";import{InjectionActiveFieldItem as u}from"../../constants/index.js";import{bindHover as g}from"../../utils/index.js";const C={class:"form-config__renderer--complex form-config__renderer"},_=["onClick"];var x=e({__name:"ComplexNode",props:{formConfigItem:{type:Object,required:!0},textFormatter:{type:Function,required:!0}},setup(e){const x=e,I=o(u);function v(){I.value=x.formConfigItem}const j=r((()=>[{"is-active":I.value===x.formConfigItem},"form-config__renderer--complexHeader"]));return(o,r)=>(m(),n("section",C,[t("header",i(f(g)(e.formConfigItem),{class:f(j),onClick:l(v,["stop"])}),[c(s(x.formConfigItem.name)+" ",1),a(d,{"form-config-item":e.formConfigItem},null,8,["form-config-item"])],16,_),a(p,i(o.$props,{modelValue:e.formConfigItem.children,"onUpdate:modelValue":r[0]||(r[0]=o=>e.formConfigItem.children=o),class:"form-config__renderer--complex--grid"}),null,16,["modelValue"])]))}});export{x as default};
@@ -1 +0,0 @@
1
- import{defineComponent as e,inject as o,computed as t,openBlock as r,createElementBlock as i,mergeProps as f,unref as m,withModifiers as n,createVNode as a,normalizeClass as l,withCtx as s,createTextVNode as u,toDisplayString as d,createBlock as C,createCommentVNode as c}from"vue";import{NEllipsis as p}from"naive-ui";import g from"./CloseButton.vue.js";import{InjectionActiveFieldItem as I,WidgetTextMap as _}from"../../constants/index.js";import{bindHover as v}from"../../utils/index.js";const y=["onClick","data-type"];var k=e({__name:"DefaultNode",props:{formConfigItem:{type:Object,required:!0},textFormatter:{type:Function,required:!0},showCloseButton:{type:Boolean,default:!0},allowClick:{type:Boolean,default:!0}},setup(e){const k=e,q=o(I);function x(){k.allowClick&&(q.value=k.formConfigItem)}const B=t((()=>["form-config__renderer--default",{"is-required":k.formConfigItem.required}])),b=t((()=>[{"is-active":q.value===k.formConfigItem,"is-disabled":j.value},"form-config__renderer","form-config__renderer--defaultWrapper"])),j=t((()=>!1===k.formConfigItem.editable)),w=t((()=>{const e=_.get(k.formConfigItem.type);return k.textFormatter(k.formConfigItem,`${k.formConfigItem.name}${e?`(${e})`:""}`)}));return(o,t)=>(r(),i("div",f(m(v)(e.formConfigItem),{onClick:n(x,["stop"]),class:m(b),"data-type":e.formConfigItem.type}),[a(m(p),{class:l(m(B))},{default:s((()=>[u(d(m(w)),1)])),_:1},8,["class"]),!e.showCloseButton||e.formConfigItem.required||e.formConfigItem.__isCombinationChild?c("v-if",!0):(r(),C(g,{key:0,"form-config-item":e.formConfigItem},null,8,["form-config-item"]))],16,y))}});export{k as default};