cnhis-design-vue 3.1.44 → 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 (268) hide show
  1. package/es/components/base-search/src/index.vue.js +1 -1
  2. package/es/components/big-table/src/BigTable.vue.js +1 -1
  3. package/es/components/big-table/src/components/NoData.vue.js +1 -1
  4. package/es/components/big-table/src/components/edit-form/edit-separate.vue.js +1 -1
  5. package/es/components/big-table/src/components/input-button.vue.js +1 -1
  6. package/es/components/big-table/src/components/separate.vue.js +1 -1
  7. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.js +1 -1
  8. package/es/components/button-print/src/ButtonPrint.vue.js +1 -1
  9. package/es/components/button-print/src/components/EditFormat.vue.js +1 -1
  10. package/es/components/button-print/src/components/IdentityVerification.vue.js +1 -1
  11. package/es/components/button-print/src/components/Preview.vue.js +1 -1
  12. package/es/components/classification/src/components/search-filter/index.vue.js +1 -1
  13. package/es/components/classification/src/components/set-classification/index.vue.js +1 -1
  14. package/es/components/classification/src/components/table-modal/index.vue.js +1 -1
  15. package/es/components/classification/src/index.vue.js +1 -1
  16. package/es/components/date-picker/src/DatePicker.vue.js +1 -1
  17. package/es/components/fabric-chart/index.d.ts +5 -41
  18. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +5 -41
  19. package/es/components/fabric-chart/src/FabricChart.vue.js +1 -1
  20. package/es/components/fabric-chart/src/components/PopupTip.vue.js +1 -1
  21. package/es/components/fabric-chart/src/hooks/{useBirthProcess.d.ts → birthProcess/useBirthProcess.d.ts} +2 -2
  22. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -0
  23. package/es/components/fabric-chart/src/hooks/{useBirthProcessChart.d.ts → birthProcess/useBirthProcessChart.d.ts} +3 -3
  24. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -0
  25. package/es/components/fabric-chart/src/hooks/index.d.ts +5 -7
  26. package/es/components/fabric-chart/src/hooks/index.js +1 -1
  27. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts +6 -0
  28. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -0
  29. package/es/components/fabric-chart/src/hooks/temperature/index.d.ts +6 -0
  30. package/es/components/fabric-chart/src/hooks/temperature/index.js +1 -0
  31. package/es/components/fabric-chart/src/hooks/temperature/useBottom.d.ts +4 -0
  32. package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -0
  33. package/es/components/fabric-chart/src/hooks/{useCenter.d.ts → temperature/useCenter.d.ts} +3 -3
  34. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -0
  35. package/es/components/fabric-chart/src/hooks/{useLeft.d.ts → temperature/useLeft.d.ts} +3 -3
  36. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -0
  37. package/es/components/fabric-chart/src/hooks/temperature/useOther.d.ts +4 -0
  38. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -0
  39. package/es/components/fabric-chart/src/hooks/temperature/useRight.d.ts +4 -0
  40. package/es/components/fabric-chart/src/hooks/temperature/useRight.js +1 -0
  41. package/es/components/fabric-chart/src/hooks/{useShadow.d.ts → temperature/useShadow.d.ts} +1 -1
  42. package/es/components/fabric-chart/src/hooks/temperature/useShadow.js +1 -0
  43. package/es/components/fabric-chart/src/hooks/{useTemperatureChart.d.ts → temperature/useTemperatureChart.d.ts} +3 -3
  44. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -0
  45. package/es/components/fabric-chart/src/hooks/temperature/useTop.d.ts +4 -0
  46. package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -0
  47. package/es/components/fabric-chart/src/hooks/useGrid.d.ts +1 -1
  48. package/es/components/fabric-chart/src/hooks/useGrid.js +1 -1
  49. package/es/components/fabric-chart/src/interface.d.ts +1 -1
  50. package/es/components/field-set/src/FieldSet.vue.js +1 -1
  51. package/es/components/form-config/src/FormConfig.vue.js +1 -1
  52. package/es/components/form-config/src/components/FormConfigCreator.vue.js +1 -1
  53. package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -1
  54. package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -1
  55. package/es/components/form-config/src/components/renderer/CloseButton.vue.js +1 -1
  56. package/es/components/form-config/src/components/renderer/ComplexNode.vue.js +1 -1
  57. package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
  58. package/es/components/form-render/src/FormRender.vue.js +1 -1
  59. package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -1
  60. package/es/components/form-render/src/components/renderer/combination.js +1 -1
  61. package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +77 -0
  62. package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +93 -0
  63. package/es/components/form-render/src/components/renderer/formItem.js +1 -1
  64. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
  65. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.js +1 -1
  66. package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
  67. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  68. package/es/components/form-render/src/components/renderer/select.js +1 -1
  69. package/es/components/form-render/src/components/tooltipMessage.vue.js +1 -1
  70. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
  71. package/es/components/guide/src/renderer.js +1 -1
  72. package/es/components/iho-select-label/src/LabelFormContent.vue.js +1 -1
  73. package/es/components/iho-select-label/src/SelectLabel.vue.js +1 -1
  74. package/es/components/iho-select-label/src/components/label-classify.vue.js +1 -1
  75. package/es/components/iho-table/src/IhoTable.vue.js +1 -1
  76. package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +3 -0
  77. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.js +1 -1
  78. package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +3 -0
  79. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -1
  80. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +3 -0
  81. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -1
  82. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
  83. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.js +1 -1
  84. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
  85. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +3 -0
  86. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +3 -0
  87. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -1
  88. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/dist/index.d.ts +3 -0
  89. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
  90. package/es/components/iho-table/src/utils/dist/index.d.ts +44 -0
  91. package/es/components/iho-table/src/utils/index.js +1 -1
  92. package/es/components/info-header/src/InfoHeader.vue.js +1 -1
  93. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.js +1 -1
  94. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.js +1 -1
  95. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +1 -1
  96. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.js +1 -1
  97. package/es/components/info-header/src/components/infoDescription/index.vue.js +1 -1
  98. package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
  99. package/es/components/keyboard/src/Keyboard.vue.js +1 -1
  100. package/es/components/keyboard/src/components/InputNumber.vue.js +1 -1
  101. package/es/components/keyboard/src/components/NumberPanel.vue.js +1 -1
  102. package/es/components/map/src/Map.vue.js +1 -1
  103. package/es/components/picture-clipper/src/PictureClipper.vue.js +1 -1
  104. package/es/components/quick-search/src/index.vue.js +1 -1
  105. package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -1
  106. package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -1
  107. package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -1
  108. package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -1
  109. package/es/components/scale-view/src/ScaleView.vue.js +1 -1
  110. package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -1
  111. package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -1
  112. package/es/components/scale-view/src/components/EvaluatePage.vue.js +1 -1
  113. package/es/components/scale-view/src/components/LoadingCom.vue.js +1 -1
  114. package/es/components/scale-view/src/components/NoData.vue.js +1 -1
  115. package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +36 -0
  116. package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +36 -0
  117. package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +82 -0
  118. package/es/components/search-cascader/src/SearchCascader.vue.js +1 -1
  119. package/es/components/search-cascader/src/components/SearchMenu.js +1 -1
  120. package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +57 -0
  121. package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +57 -0
  122. package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
  123. package/es/components/select-label/src/SelectLabel.vue.js +1 -1
  124. package/es/components/select-label/src/components/label-classify.vue.js +1 -1
  125. package/es/components/select-person/src/SearchMultiple.vue.js +1 -1
  126. package/es/components/select-person/src/SelectPerson.vue.js +1 -1
  127. package/es/components/shortcut-provider/src/ShortcutProvider.vue.js +1 -1
  128. package/es/components/shortcut-setter/src/ShortcutSetter.vue.js +1 -1
  129. package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.js +1 -1
  130. package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
  131. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -1
  132. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.js +1 -1
  133. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.js +1 -1
  134. package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue.js +1 -1
  135. package/es/components/table-filter/src/components/classify-filter/components/InputNumber.vue.js +1 -1
  136. package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue.js +1 -1
  137. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.js +1 -1
  138. package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue.js +1 -1
  139. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue.js +1 -1
  140. package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -1
  141. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +1 -1
  142. package/es/components/table-filter/src/components/render-widget/components/Date.vue.js +1 -1
  143. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.js +1 -1
  144. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.js +1 -1
  145. package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue.js +1 -1
  146. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue.js +1 -1
  147. package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue.js +1 -1
  148. package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -1
  149. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  150. package/es/components/table-filter/src/directive/resize.js +1 -1
  151. package/es/components/time-line/src/TimeLine.vue.js +1 -1
  152. package/es/components/time-picker/src/TimePicker.vue.js +1 -1
  153. package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.js +1 -1
  154. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -1
  155. package/es/shared/components/SelectPage/SelectPage.vue.js +1 -1
  156. package/es/shared/components/SvgIcon/SvgIcon.vue.js +1 -1
  157. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -1
  158. package/es/shared/components/no-data/NoData.vue.js +1 -1
  159. package/es/shared/package.json.js +1 -1
  160. package/package.json +2 -2
  161. package/es/components/base-search/src/index.vue2.js +0 -1
  162. package/es/components/big-table/src/components/NoData.vue2.js +0 -1
  163. package/es/components/big-table/src/components/edit-form/edit-separate.vue2.js +0 -1
  164. package/es/components/big-table/src/components/input-button.vue2.js +0 -1
  165. package/es/components/big-table/src/components/separate.vue2.js +0 -1
  166. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue2.js +0 -1
  167. package/es/components/button-print/src/components/EditFormat.vue2.js +0 -1
  168. package/es/components/button-print/src/components/IdentityVerification.vue2.js +0 -1
  169. package/es/components/classification/src/components/search-filter/index.vue2.js +0 -1
  170. package/es/components/classification/src/components/set-classification/index.vue2.js +0 -1
  171. package/es/components/classification/src/components/table-modal/index.vue2.js +0 -1
  172. package/es/components/classification/src/index.vue2.js +0 -1
  173. package/es/components/date-picker/src/DatePicker.vue2.js +0 -1
  174. package/es/components/fabric-chart/src/FabricChart.vue2.js +0 -1
  175. package/es/components/fabric-chart/src/components/PopupTip.vue2.js +0 -1
  176. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +0 -1
  177. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +0 -1
  178. package/es/components/fabric-chart/src/hooks/useBottom.d.ts +0 -4
  179. package/es/components/fabric-chart/src/hooks/useBottom.js +0 -1
  180. package/es/components/fabric-chart/src/hooks/useCenter.js +0 -1
  181. package/es/components/fabric-chart/src/hooks/useLeft.js +0 -1
  182. package/es/components/fabric-chart/src/hooks/useOther.d.ts +0 -4
  183. package/es/components/fabric-chart/src/hooks/useOther.js +0 -1
  184. package/es/components/fabric-chart/src/hooks/useRight.d.ts +0 -4
  185. package/es/components/fabric-chart/src/hooks/useRight.js +0 -1
  186. package/es/components/fabric-chart/src/hooks/useShadow.js +0 -1
  187. package/es/components/fabric-chart/src/hooks/useTemperatureChart.js +0 -1
  188. package/es/components/fabric-chart/src/hooks/useTop.d.ts +0 -4
  189. package/es/components/fabric-chart/src/hooks/useTop.js +0 -1
  190. package/es/components/field-set/src/FieldSet.vue2.js +0 -1
  191. package/es/components/form-config/src/FormConfig.vue2.js +0 -1
  192. package/es/components/form-config/src/components/FormConfigCreator.vue2.js +0 -1
  193. package/es/components/form-config/src/components/FormConfigDragDisplay.vue2.js +0 -1
  194. package/es/components/form-config/src/components/FormConfigEdit.vue2.js +0 -1
  195. package/es/components/form-config/src/components/renderer/CloseButton.vue2.js +0 -1
  196. package/es/components/form-config/src/components/renderer/ComplexNode.vue2.js +0 -1
  197. package/es/components/form-config/src/components/renderer/DefaultNode.vue2.js +0 -1
  198. package/es/components/form-render/src/FormRender.vue2.js +0 -1
  199. package/es/components/form-render/src/FormRenderWrapper.vue2.js +0 -1
  200. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue2.js +0 -1
  201. package/es/components/form-render/src/components/tooltipMessage.vue2.js +0 -1
  202. package/es/components/iho-select-label/src/LabelFormContent.vue2.js +0 -1
  203. package/es/components/iho-select-label/src/SelectLabel.vue2.js +0 -1
  204. package/es/components/iho-select-label/src/components/label-classify.vue2.js +0 -1
  205. package/es/components/iho-table/src/IhoTable.vue2.js +0 -1
  206. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue2.js +0 -1
  207. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +0 -1
  208. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +0 -1
  209. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue2.js +0 -1
  210. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +0 -1
  211. package/es/components/info-header/src/InfoHeader.vue2.js +0 -1
  212. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue2.js +0 -1
  213. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue2.js +0 -1
  214. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue2.js +0 -1
  215. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue2.js +0 -1
  216. package/es/components/info-header/src/components/infoDescription/index.vue2.js +0 -1
  217. package/es/components/info-header/src/components/patientInfo/index.vue2.js +0 -1
  218. package/es/components/keyboard/src/Keyboard.vue2.js +0 -1
  219. package/es/components/keyboard/src/components/InputNumber.vue2.js +0 -1
  220. package/es/components/keyboard/src/components/NumberPanel.vue2.js +0 -1
  221. package/es/components/map/src/Map.vue2.js +0 -1
  222. package/es/components/picture-clipper/src/PictureClipper.vue2.js +0 -1
  223. package/es/components/quick-search/src/index.vue2.js +0 -1
  224. package/es/components/recommend-search/src/RecommendSearch.vue2.js +0 -1
  225. package/es/components/recommend-search/src/components/RecommendInput.vue2.js +0 -1
  226. package/es/components/recommend-search/src/components/RecommendMenu.vue2.js +0 -1
  227. package/es/components/recommend-search/src/components/RecommendSelect.vue2.js +0 -1
  228. package/es/components/scale-view/src/ScaleView.vue2.js +0 -1
  229. package/es/components/scale-view/src/components/AnswerParse.vue2.js +0 -1
  230. package/es/components/scale-view/src/components/EvaluateCountdown.vue2.js +0 -1
  231. package/es/components/scale-view/src/components/EvaluatePage.vue2.js +0 -1
  232. package/es/components/scale-view/src/components/NoData.vue2.js +0 -1
  233. package/es/components/search-cascader/src/SearchCascader.vue2.js +0 -1
  234. package/es/components/select-label/src/LabelFormContent.vue2.js +0 -1
  235. package/es/components/select-label/src/components/label-classify.vue2.js +0 -1
  236. package/es/components/shortcut-provider/src/ShortcutProvider.vue2.js +0 -1
  237. package/es/components/shortcut-setter/src/ShortcutSetter.vue2.js +0 -1
  238. package/es/components/shortcut-setter/src/ShortcutSetterItem.vue2.js +0 -1
  239. package/es/components/steps-wheel/src/StepsWheel.vue2.js +0 -1
  240. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +0 -1
  241. package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +0 -1
  242. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +0 -1
  243. package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue2.js +0 -1
  244. package/es/components/table-filter/src/components/classify-filter/components/InputNumber.vue2.js +0 -1
  245. package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue2.js +0 -1
  246. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js +0 -1
  247. package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue2.js +0 -1
  248. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue2.js +0 -1
  249. package/es/components/table-filter/src/components/classify-filter/index.vue2.js +0 -1
  250. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue2.js +0 -1
  251. package/es/components/table-filter/src/components/render-widget/components/Date.vue2.js +0 -1
  252. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +0 -1
  253. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +0 -1
  254. package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue2.js +0 -1
  255. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue2.js +0 -1
  256. package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue2.js +0 -1
  257. package/es/components/table-filter/src/components/render-widget/components/Select.vue2.js +0 -1
  258. package/es/components/time-line/src/TimeLine.vue2.js +0 -1
  259. package/es/components/time-picker/src/TimePicker.vue2.js +0 -1
  260. package/es/components/vod-chunk-upload/src/chunk-upload-new.vue2.js +0 -1
  261. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +0 -1
  262. package/es/shared/components/SelectPage/SelectPage.vue2.js +0 -1
  263. package/es/shared/components/SvgIcon/SvgIcon.vue2.js +0 -1
  264. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue2.js +0 -1
  265. package/es/shared/components/no-data/NoData.vue2.js +0 -1
  266. /package/es/_virtual/{_plugin-vue_export-helper.js → plugin-vue_export-helper.js} +0 -0
  267. /package/es/components/fabric-chart/src/{hooks/constant.d.ts → constants/index.d.ts} +0 -0
  268. /package/es/components/fabric-chart/src/{hooks/constant.js → constants/index.js} +0 -0
@@ -1 +1 @@
1
- import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"../../types/enums.js";import{WidgetCfgMaps as n}from"./widgetCfgMaps.js";import a from"../../../../../_virtual/_plugin-vue_export-helper.js";const r=[i.DATE,i.DATE_TIME,i.CHECKBOX_GROUP];var l=a(e({props:{cfg:{type:Object,required:!0},modelValue:{type:[Array,String,Number]}},emits:["update:modelValue","outFilterChange","changeInit"],computed:{valueCp(){return this.cfg.value}},data:()=>({initialProps:{}}),methods:{search(){this.$emit("outFilterChange")},getEleWidth(e){const{widgetType:t,widgetCfg:n,filterExplicit:a}=e;if(r.includes(t))return;const l=i.SELECT!==t&&i.SELECTLABEL!==t||!n.multiple?"100%":"200px";return{width:0===a?"100%":e.advanceColWidth?`${e.advanceColWidth}px`:l}},initComponentProps(e){const{_frontId:t,widgetType:i,alias:a,title:r,placeholder:l,widgetCfg:s,filterExplicit:o}=e,{props:p,handlerProps:h}=n.get(i);let d={...p};h&&(d=h(d,{...s,title:a||r,_frontId:t,filterExplicit:o})),l&&(d.placeholder=l),this.initialProps=d,d.value&&(this.valueCp=d.value)},generateWidget(e){const{widgetType:i}=e;if(!n.has(i))return null;const{value:a}=e,{component:r,style:l,eventsBySearch:s=[]}=n.get(i),o={...this.initialProps,value:a,componentCfg:e},p=s.reduce(((e,t)=>{const{name:i,handler:n}=t;let a=this.search;return n&&(a=e=>{n(e,this.search,o)}),{...e,[`on${i}`]:a}}),{});return t(r,{...l,...o,style:this.getEleWidth(e),value:this.valueCp,"onUpdate:value":e=>this.handleUpdate(e),onChangeInitState:(...e)=>this.handleChangeInitState(...e),...p})},handleUpdate(e){this.$emit("update:modelValue",e)},handleChangeInitState(e,t){this.$emit("changeInit",e,t)}},created(){this.initComponentProps(this.cfg)},render(){return this.generateWidget(this.cfg)}}),[["__file","index.vue"]]);export{l as default};
1
+ import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"../../types/enums.js";import{WidgetCfgMaps as n}from"./widgetCfgMaps.js";import a from"../../../../../_virtual/plugin-vue_export-helper.js";const r=[i.DATE,i.DATE_TIME,i.CHECKBOX_GROUP];var l=a(e({props:{cfg:{type:Object,required:!0},modelValue:{type:[Array,String,Number]}},emits:["update:modelValue","outFilterChange","changeInit"],computed:{valueCp(){return this.cfg.value}},data:()=>({initialProps:{}}),methods:{search(){this.$emit("outFilterChange")},getEleWidth(e){const{widgetType:t,widgetCfg:n,filterExplicit:a}=e;if(r.includes(t))return;const l=i.SELECT!==t&&i.SELECTLABEL!==t||!n.multiple?"100%":"200px";return{width:0===a?"100%":e.advanceColWidth?`${e.advanceColWidth}px`:l}},initComponentProps(e){const{_frontId:t,widgetType:i,alias:a,title:r,placeholder:l,widgetCfg:s,filterExplicit:o}=e,{props:p,handlerProps:h}=n.get(i);let d={...p};h&&(d=h(d,{...s,title:a||r,_frontId:t,filterExplicit:o})),l&&(d.placeholder=l),this.initialProps=d,d.value&&(this.valueCp=d.value)},generateWidget(e){const{widgetType:i}=e;if(!n.has(i))return null;const{value:a}=e,{component:r,style:l,eventsBySearch:s=[]}=n.get(i),o={...this.initialProps,value:a,componentCfg:e},p=s.reduce(((e,t)=>{const{name:i,handler:n}=t;let a=this.search;return n&&(a=e=>{n(e,this.search,o)}),{...e,[`on${i}`]:a}}),{});return t(r,{...l,...o,style:this.getEleWidth(e),value:this.valueCp,"onUpdate:value":e=>this.handleUpdate(e),onChangeInitState:(...e)=>this.handleChangeInitState(...e),...p})},handleUpdate(e){this.$emit("update:modelValue",e)},handleChangeInitState(e,t){this.$emit("changeInit",e,t)}},created(){this.initComponentProps(this.cfg)},render(){return this.generateWidget(this.cfg)}}),[["__file","index.vue"]]);export{l as default};
@@ -1 +1 @@
1
- import e from"../tool/resizeSensor.js";import{useDebounceFn as o}from"@vueuse/core";var r={mounted(r,t){const s=t.value,m=o(s,10);new e(r,m)}};export{r as default};
1
+ import o from"../tool/resizeSensor.js";import{useDebounceFn as e}from"@vueuse/core";const r={mounted(r,t){const s=t.value,m=e(s,10);new o(r,m)}};export{r as default};
@@ -1 +1 @@
1
- import e from"./TimeLine.vue2.js";import i from"../../../_virtual/_plugin-vue_export-helper.js";var r=i(e,[["__file","TimeLine.vue"]]);export{r as default};
1
+ import{defineComponent as e,openBlock as t,createBlock as a,unref as l,withCtx as n,createElementBlock as i,Fragment as s,renderList as p,createVNode as r,createTextVNode as u,toDisplayString as m,createElementVNode as o,createCommentVNode as c}from"vue";import{NTimeline as f,NTimelineItem as y,NSpace as _,NButton as d}from"naive-ui";import v from"../../../_virtual/plugin-vue_export-helper.js";const x={class:"content"},T={class:"content-name"},g={key:0,class:"content-extra"};var k=v(e({__name:"TimeLine",props:{items:{type:Array,default:()=>[]}},setup:e=>(v,k)=>(t(),a(l(f),{class:"c-time-line"},{default:n((()=>[(t(!0),i(s,null,p(e.items,((e,f)=>(t(),a(l(y),{key:f,type:e.type},{default:n((()=>[(t(!0),i(s,null,p(e.subItem,((s,p)=>(t(),a(l(_),{key:p,vertical:"",align:"start"},{default:n((()=>[r(l(d),{strong:"",secondary:"",type:e.type},{default:n((()=>[u(m(s.title),1)])),_:2},1032,["type"]),o("div",x,[r(l(_),{justify:"space-between"},{default:n((()=>[o("span",T,m(s.name),1),o("span",null,m(s.time),1)])),_:2},1024),s.extraText?(t(),i("p",g,m(s.extraText),1)):c("v-if",!0),o("p",null,m(s.content),1)])])),_:2},1024)))),128))])),_:2},1032,["type"])))),128))])),_:1}))}),[["__file","TimeLine.vue"]]);export{k as default};
@@ -1 +1 @@
1
- import e from"./TimePicker.vue2.js";import r from"../../../_virtual/_plugin-vue_export-helper.js";var i=r(e,[["__file","TimePicker.vue"]]);export{i as default};
1
+ import{defineComponent as e,useAttrs as r,ref as t,computed as o,openBlock as s,createBlock as i,unref as m,mergeProps as u,createSlots as f,renderList as a,withCtx as l,renderSlot as p}from"vue";import{NTimePicker as n}from"naive-ui";import"../../../shared/utils/index.js";import"lodash-es";import{useDateTime as c}from"../../../shared/hooks/useDateTime.js";import _ from"../../../_virtual/plugin-vue_export-helper.js";var k=_(e({__name:"TimePicker",setup(e,{expose:_}){const k=r(),v=t(null),d=o((()=>Reflect.get(k,"format")?k.format:"HH:mm:ss")),{focus:h,blur:x}=c(v,d,k);return _({$timePicker:v,focus:h,blur:x}),(e,r)=>(s(),i(m(n),u({ref_key:"timePickerRef",ref:v},e.$attrs),f({_:2},[a(e.$slots,((r,t)=>({name:t,fn:l((()=>[p(e.$slots,t)]))})))]),1040))}}),[["__file","TimePicker.vue"]]);export{k as default};
@@ -1 +1 @@
1
- import e from"./chunk-upload-new.vue2.js";import u from"../../../_virtual/_plugin-vue_export-helper.js";var r=u(e,[["__file","chunk-upload-new.vue"]]);export{r as default};
1
+ import{defineComponent as e,ref as l,reactive as t,onMounted as o,nextTick as i,onUnmounted as n,resolveComponent as a,openBlock as r,createElementBlock as s,createCommentVNode as c,createVNode as u,unref as d,withCtx as p,createElementVNode as f,Fragment as m,renderList as g,withDirectives as v,normalizeClass as h,toDisplayString as _,vShow as k,createTextVNode as y}from"vue";import L from"spark-md5";import C from"axios";import{useMessage as x,NIcon as z,NProgress as S,NButton as w}from"naive-ui";import{UploadProps as F,getUploadData as b,statusSet as I}from"./hooks/upload-data.js";import{UploadComputed as A}from"./hooks/upload-computed.js";import{FolderOutline as M,DocumentAttachOutline as q,Close as B}from"@vicons/ionicons5";import E from"../../../_virtual/plugin-vue_export-helper.js";const U={class:"c-chunk-upload-container"},$=f("p",null,"点击或将文件拖拽到这里上传",-1),D={class:"c-file-list-conatiner"},N={key:0,class:"file-list"},j={class:"c-f-item"},P={class:"c-f-item-icon"},R={class:"c-f-item-info"},T={class:"c-f-item-info-title"},G={class:"title"},J={class:"size"},K={class:"c-f-item-info-time"},O={class:"c-f-item-btn"},H={class:"upload-btn"},Q=f("span",null,"上传新文件",-1);var V=E(e({__name:"chunk-upload-new",props:{...F},emits:["getSumbitList","closeUpload"],setup(e,{expose:F,emit:E}){const V=e,{UploadState:W}=b();var X=C.create({});const Y=l(null),Z=l(null),ee=t(W),le=x(),{initState:te,uploadArguments:oe,autoStart:ie,btnAttrs:ne}=A(V,ee);te();const ae=e=>{let l=new FileReader;(new Date).getTime();let t=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,o=0;const i=1024e4;let n=Math.ceil(e.size/i),a=new L.ArrayBuffer;function r(){let n=o*i,a=n+i>=e.size?e.size:n+i;l.readAsArrayBuffer(t.call(e.file,n,a))}I(e,"md5"),e.pause(),r(),l.onload=l=>{if(a.append(l.target.result),o<n)o++,r();else{let l=a.end();se(l,e)}},l.onerror=function(){console.warn(`文件${e.name}读取出错,请检查该文件`),e.cancel()}},re=e=>{let l=(e=>{const l=(null==V?void 0:V.max_size)||"";if(!l)return!1;let t=e.size/1024<+l;return t||le.error(`附件大小超过了${(e=>{let l;return e?(l=+(+e).toFixed(2),l<1024?l+"KB":l<1048576?(l/1024).toFixed(2)+"MB":l<1073741824?(l/1048576).toFixed(2)+"GB":void 0):l})(l)}`),!t})(e);((e,l)=>{let t=!1;if(e){if(e.includes("*"))return!1;let o=l.getExtension();e.includes(o)||(le.error(`不支持${o}格式`),t=!0)}return t})(V.propsCategoryMap,e)||(()=>{var e,l;if(V.maxLength>0){let t=(null==(e=V.defaultList)?void 0:e.length)||0,o=(null==(l=ee.configList)?void 0:l.length)||0;if(V.maxLength<=t+o)return le.error(`最多只能上传${V.maxLength}个`),!0}return!1})()||l?e.ignored=!0:(e.file_upload_status="",I(e,"init"),e.crm_upload_config={...e},ee.configList.push(e),I(e,"ready"),ie.value&&(e.pause(),ae(e)))},se=async(e,l)=>{try{const t=await((e,l,t)=>{let o=ee.uploadConfig.checkFileMd5Exist;return new Promise(((i,n)=>{const a={md5:l,fileName:e,...oe.value};X.get(o,{params:a}).then((e=>{i(e.data)})).catch((e=>{I(t,"failed"),console.log("verifyUpload -> err",e)}))}))})(l.name,e,l);if("00000"==t.code){const{data:e}=t||{};if(e.presence)return I(l,"complete"),l.crm_chkuns_complete_status="complete",void(l.crm_uploade_resInfo={url:e.path,name:l.name,size:l.size})}l.uniqueIdentifier=e,I(l,"uploading"),l.resume()}catch(e){console.log(e,"chunk-upload-computeMD5Success")}},ce=()=>{},ue=(e,l,t)=>{let o=JSON.parse(t);o.success?(I(l,"merging"),((e,l)=>{new Promise(((t,o)=>{const i={...e,...oe.value};X.post(ee.uploadConfig.partFileMerge,i,{timeout:0}).then((({data:e})=>{if("00000"===e.code){if(I(l,"complete"),Y.value){let t=(null==e?void 0:e.data)||{};Y.value.fileList.forEach((e=>{e.uniqueIdentifier==l.uniqueIdentifier&&(e.crm_chkuns_complete_status="complete",e.crm_uploade_resInfo={url:t.path||t.url,name:l.name,size:l.size,...t})}))}t()}else le.error("上传失败"),t()})).catch((e=>{console.log("mergeRequest -> err",e),o()}))}))})({md5:l.uniqueIdentifier,fileName:l.name,fileChunkNum:l.chunks.length},l),o.needMerge&&I(l,"merging")):I(l,"failed")},de=()=>{var e,l;let t=(null==(l=null==(e=null==Z?void 0:Z.value)?void 0:e.$el)?void 0:l.querySelector("input"))||!1;t&&t.click()},pe=(e,l="text")=>((null==e?void 0:e.file_upload_status)||{})[l],fe=e=>["complete","failed"].includes(pe(e,"status")),me=(e,l)=>{I(l,"failed")},ge=(e,l)=>{if("complete"==l.crm_chkuns_complete_status)return 100;return parseInt(100*e+"",10)},ve=()=>{var e;0!=((null==(e=ee.configList)?void 0:e.length)||0)?i((()=>{ee.configList.forEach((e=>{(e.file_upload_status||{}).status&&(I(e,"uploading"),ae(e))}))})):le.info("请选择文件")},he=()=>{var e,l;console.log("cancelcancelcancel"),null==(l=null==(e=Y.value)?void 0:e.uploader)||l.cancel(),ee.configList=[],E("closeUpload",!1)};return(()=>{try{console.log(V.getChunkUploadConfig),V.getChunkUploadConfig().then((e=>{console.log(e),ee.uploadConfig={...e},ee.headers={Authorization:"bearer "+ee.uploadConfig.token},(()=>{for(const e in ee.headers)X.defaults.headers.common[e]=ee.headers[e];X.defaults.withCredentials=ee.withCredentials})()}))}catch(e){console.log(e)}})(),o((()=>{i((()=>{}))})),n((()=>{})),F({cancel:he,confirm:()=>{console.log("ininini");const{configList:e}=ee;0!==((null==e?void 0:e.length)||0)?e.filter((e=>!["complete","failed"].includes(e.file_upload_status.status))).length>0?le.info("请上传文件或者等待文件上传完成!"):((()=>{var e;let l=(null==(e=null==ee?void 0:ee.configList)?void 0:e.length)||0,t=[];l>0&&ee.configList.forEach((e=>{"complete"==e.crm_chkuns_complete_status&&t.push({size:e.size,...e.crm_uploade_resInfo})})),E("getSumbitList",t)})(),he()):le.info("请选择文件上传")}}),(e,l)=>{const t=a("uploader-unsupport"),o=a("uploader-drop"),i=a("uploader-file"),n=a("uploader-list"),L=a("uploader-btn"),C=a("uploader");return r(),s("div",U,[c(" 上传 "),u(C,{ref_key:"uploaderDom",ref:Y,options:ee.options,autoStart:d(ie),onFileAdded:re,onFileSuccess:ue,onFileProgress:ce,onFileError:me,class:"uploader-app"},{default:p((()=>[u(t),u(o,null,{default:p((()=>[f("div",{class:"c-drap-container dragger-btn",onClick:de},[u(d(z),{component:d(M)},null,8,["component"]),$])])),_:1}),u(n,null,{default:p((e=>[f("div",D,[e?(r(),s("ul",N,[(r(!0),s(m,null,g(e.fileList,(e=>(r(),s("li",{key:e.id},[v(u(i,{class:h("file_"+e.id),ref_for:!0,ref:"files",file:e,list:!0},{default:p((l=>[f("div",{class:h(["c-file-container",{"c-file-boder-bottom":fe(e)}])},[f("div",j,[f("div",P,[u(d(z),{component:d(q),style:{color:"#5585f5"}},null,8,["component"])]),f("div",R,[f("div",T,[f("span",G,_(e.name),1),f("span",J,"("+_(l.formatedSize)+")",1)]),f("div",K,[f("span",null,_(l.formatedTimeRemaining),1),f("span",null,_(pe(e,"text")),1)])]),f("div",O,[u(d(z),{component:d(B),onClick:l=>(e=>{e.cancel?e.cancel():e.remove&&e.remove();let l=e.id;ee.configList=ee.configList.filter((e=>e.id!==l))})(e)},null,8,["component","onClick"])])]),u(d(S),{percentage:ge(ee.progress,e),type:"line","show-indicator":!1},null,8,["percentage"])],2)])),_:2},1032,["class","file"]),[[k,!e.ignored]])])))),128))])):c("v-if",!0)])])),_:1}),f("div",H,[v(u(L,{attrs:d(ne),ref_key:"uploadBtnDom",ref:Z},{default:p((()=>[Q])),_:1},8,["attrs"]),[[k,!1]]),u(d(w),{type:"primary",class:"mgl-10",onClick:ve},{default:p((()=>[y("开始上传")])),_:1})])])),_:1},8,["options","autoStart"])])}}}),[["__file","chunk-upload-new.vue"]]);export{V as default};
@@ -1 +1 @@
1
- import o from"./vod-chunk-upload.vue2.js";import u from"../../../../_virtual/_plugin-vue_export-helper.js";var e=u(o,[["__file","vod-chunk-upload.vue"]]);export{e as default};
1
+ import{defineComponent as e,reactive as o,computed as l,onMounted as s,openBlock as i,createElementBlock as t,withDirectives as a,normalizeClass as r,unref as n,createElementVNode as d,Fragment as u,vShow as p,createCommentVNode as m,createVNode as c,withCtx as v,normalizeStyle as f,toDisplayString as g,createTextVNode as h,withModifiers as k,createBlock as y}from"vue";import"xe-utils";import"moment";import b from"../../../../shared/utils/vexutilsExpand.js";import{getVodData as C}from"../hooks/vod-data.js";import{VodComputed as U}from"../hooks/vod-computed.js";import L from"../../../../shared/components/player-vod/video-modal.js";import V from"../vod-upload-modal.js";import{NIcon as _,NButton as D}from"naive-ui";import{PlayCircleSharp as x,PlayCircleOutline as O,RemoveCircleSharp as w}from"@vicons/ionicons5";import S from"../../../../shared/assets/img/video_default_cover.png.js";import j from"../../../../shared/assets/img/video.png.js";import F from"../../../../shared/assets/img/success.png.js";import z from"../../../../shared/components/VueDraggable/src/vuedraggable.js";import N from"../../../../_virtual/plugin-vue_export-helper.js";const M={class:"c-upload"},A={class:"chunk-btn-content"},J={class:"c-uploader-btn"},B=["src"],E=d("div",{class:"uploader-text"},[d("p",null,"点击上传"),d("span",{class:"guage-text"},"上传视频(不超过50M)")],-1),P=["src"],T=d("div",{class:"uploader-text"},[d("p",null,"上传视频")],-1),R={class:"vod-wrap c-uploader-preview-wrap"},G={key:0,class:"vod-def-bg vod-uploading"},H={class:"vod-def-bg vod-done"},K=["src"],$=["src"],q={class:"c-icon-wrap"},I={class:"vod-def-bg vod-error"},Q=["src"],W={class:"tooltip-wrap error-wrap"},X=["onClick"];var Y=N(e({__name:"vod-chunk-upload",props:{formData:{type:Object,default:()=>({})},source:String,limitNum:{default:1},defFileList:{default:""},isLock:Boolean,isDetail:{type:Boolean,default:!1},getChunkUploadConfig:{type:Function,default:()=>Promise.resolve({})}},emits:["vodFileList"],setup(e,{emit:N}){const Y=e,{VodState:Z}=C(),ee=o(Z),oe={},{isShowBtn:le,maskHeight:se,showPercent:ie,allow_format:te,defaultValue:ae,isDisabled:re,max_size:ne,maxlength:de}=U(Y,ee,{mainForm:oe});console.log(le.value,"----isShowBtn---",Y.formData.title),l((()=>ue()));const ue=()=>{const{formData:e}=Y;let o=[];if(o="guage"===Y.source?Y.defFileList:null==oe?void 0:oe.handleSysParams(oe.defaultValue[e.name]||e.default_val),o=JSON.parse(JSON.stringify(o)),!o)return[];let l=[];return Array.isArray(o)&&(l=[...o]),b.isJSON(o)&&(l=JSON.parse(o)),Array.isArray(l)?(l.forEach((e=>{e.thumbUrl=e.vodCoverUrl||void 0,e.uid=(-Math.random()).toString(),e.status="done"})),ee.fileList=l,console.log(ee.fileList,"----list---list"),pe(l),l):[]},pe=e=>{if(!Array.isArray(e))return"";const{formData:o,source:l}=Y;let s=[];e.forEach((e=>{if("done"===e.status&&(e.response&&"00000"==e.response.code||e.url)){const{data:o={}}=e.response||{};e.url||o.videoUrl;let l=e.vodCoverUrl||o.vodCoverUrl;s.push({name:e.name,size:e.size,url:e.url||o.videoUrl,vodCoverUrl:l,uid:e.id||e.uid||(-Math.random()).toString()})}})),console.log(s,"---resList---",Y.formData.title);let i=JSON.stringify(s);"guage"!==l?oe.baseForm.setFieldsValue({[o.val_key]:i}):N("vodFileList",i,Y.formData)},me=(e,o)=>{let l,s;if(e.type&&(s=e.type),e.url||e.videoUrl){if(l=e.url||e.videoUrl,!s){let e=l.split(".");s=`video/${e[e.length-1]}`}}else l=URL.createObjectURL(e.originFileObj);ee.playerOptions={sources:[{type:s,src:l}]},ee.videoVisible=!0},ce=()=>{ee.videoVisible=!1},ve=()=>{re.value||(ee.chunkUploadVisible=!0)},fe=e=>{let o=[];e.forEach((e=>{let l=e.videoCoverPic||void 0;o.push({name:e.videoName||e.name,url:e.videoUrl||e.url,size:e.size,vodCoverUrl:l,status:"done",uid:(-Math.random()).toString()})})),ee.fileList.push(...o),pe(ee.fileList)},ge=()=>{pe(ee.fileList)};return s((()=>{ue()})),(o,l)=>(i(),t("div",M,[e.isDetail||Y.isLock?m("v-if",!0):a((i(),t("div",{key:0,class:r(["c-chunk-uploader-btn",{"disable-upload":n(re)}]),onClick:ve},[d("div",A,[d("div",J,["guage"==Y.source?(i(),t(u,{key:0},[d("img",{src:n(j),class:"guage-img"},null,8,B),E],64)):(i(),t(u,{key:1},[d("img",{src:n(j),class:"guage-img"},null,8,P),T],64))])])],2)),[[p,n(le)]]),c(n(z),{modelValue:ee.fileList,"onUpdate:modelValue":l[0]||(l[0]=e=>ee.fileList=e),animation:"150",itemKey:"uid",disabled:n(re).value,options:ee.draggableOptions,onUpdate:ge,class:"drag-content"},{item:v((({element:o,index:l})=>{return[d("div",R,[m(" 上传中 "),"uploading"===o.status?(i(),t("div",G,[m(" TODO: 封面图补充 "),d("div",{class:"uploading-mask",style:f({height:n(se)(o)})},[d("span",null,g(n(ie)(o.percent))+"%",1)],4)])):"done"===o.status?(i(),t(u,{key:1},[m(" 上传完成 "),d("div",H,[d("img",{src:(s=o,s.thumbUrl?s.thumbUrl:S),class:"vod-cover-img"},null,8,K),d("div",{class:r(["tooltip-wrap",{"is-new":o.isNew}])},[d("img",{src:n(F),class:"upload-img"},null,8,$),h(" 上传成功 ")],2),m(" 播放图标 "),d("div",q,[c(n(_),{component:n(x),class:"icon-play theme_filled",onClick:k((e=>me(o)),["prevent","stop"])},null,8,["component","onClick"]),c(n(_),{component:n(O),class:"icon-play theme_outlined",onClick:k((e=>me(o)),["prevent","stop"])},null,8,["component","onClick"])])])],2112)):"error"===o.status?(i(),t(u,{key:2},[m(" 上传失败 "),d("div",I,[d("img",{src:o.thumbUrl,class:"vod-cover-img"},null,8,Q),d("div",W,[d("span",null,g(o.message?o.message:"上传失败,继续上传?"),1),c(n(D),{size:"small",onClick:k((e=>{}),["prevent","stop"])},{default:v((()=>[h("确定")])),_:2},1032,["onClick"])])])],2112)):m("v-if",!0),!["done","error"].includes(o.status)||n(re)||e.isDetail?m("v-if",!0):(i(),t("div",{key:3,onClick:k((e=>{return o=l,ee.fileList.splice(o,1),void pe(ee.fileList);var o}),["stop"]),class:"uploader-preview-delete"},[c(n(_),{class:"pre-delete",component:n(w)},null,8,["component"])],8,X))])];var s})),_:1},8,["modelValue","disabled","options"]),ee.videoVisible?(i(),y(n(L),{key:1,visible:ee.videoVisible,formData:Y.formData,playerOptions:ee.playerOptions,onCloseVideoModal:ce},null,8,["visible","formData","playerOptions"])):m("v-if",!0),c(n(V),{modelValue:ee.chunkUploadVisible,"onUpdate:modelValue":l[1]||(l[1]=e=>ee.chunkUploadVisible=e),modalTitle:Y.formData.name,max_size:n(ne),maxLength:n(de),propsCategoryMap:n(te),defaultList:ee.fileList,getChunkUploadConfig:e.getChunkUploadConfig,onGetSumbitList:fe},null,8,["modelValue","modalTitle","max_size","maxLength","propsCategoryMap","defaultList","getChunkUploadConfig"])]))}}),[["__file","vod-chunk-upload.vue"]]);export{Y as default};
@@ -1 +1 @@
1
- import e from"./SelectPage.vue2.js";import r from"../../../_virtual/_plugin-vue_export-helper.js";var t=r(e,[["__file","SelectPage.vue"]]);export{t as default};
1
+ import{defineComponent as e,resolveComponent as a,openBlock as n,createElementBlock as o,createVNode as t,unref as l,withModifiers as s,withCtx as r,createTextVNode as c}from"vue";import{NButton as i}from"naive-ui";import{ChevronBackOutline as g,ChevronForwardOutline as p}from"@vicons/ionicons5";import d from"../../../_virtual/plugin-vue_export-helper.js";var f=d(e({__name:"SelectPage",props:{searchPageConfig:{type:Object,default:()=>({page:1,total:0,hasNextPage:!1})},handleSearchChangePage:{type:Function,default:()=>{}}},setup(e){const d=e;return(e,f)=>{const h=a("n-icon");return n(),o("div",{class:"form-select-btn",onMousedown:f[2]||(f[2]=e=>e.preventDefault())},[t(l(i),{disabled:d.searchPageConfig.page<=1,type:"dashed",block:"",onClick:f[0]||(f[0]=s((e=>d.handleSearchChangePage("prev")),["self","stop"]))},{default:r((()=>[t(h,{component:l(g)},null,8,["component"]),c(" 上一页 ")])),_:1},8,["disabled"]),t(l(i),{disabled:1==+d.searchPageConfig.asyncCount?!d.searchPageConfig.hasNextPage:d.searchPageConfig.page>=d.searchPageConfig.total,type:"dashed",block:"",onClick:f[1]||(f[1]=s((e=>d.handleSearchChangePage("next")),["self","stop"]))},{default:r((()=>[c(" 下一页 "),t(h,{component:l(p)},null,8,["component"])])),_:1},8,["disabled"])],32)}}}),[["__file","SelectPage.vue"]]);export{f as default};
@@ -1 +1 @@
1
- import e from"./SvgIcon.vue2.js";import r from"../../../_virtual/_plugin-vue_export-helper.js";var o=r(e,[["__file","SvgIcon.vue"]]);export{o as default};
1
+ import{defineComponent as e,computed as l,openBlock as s,createElementBlock as t,mergeProps as a,unref as i,toDisplayString as n,createCommentVNode as r,createElementVNode as o}from"vue";import u from"../../../_virtual/plugin-vue_export-helper.js";const c={key:0},v=["xlink:href"];var f=u(e({__name:"SvgIcon",props:{iconClass:{default:""},title:{default:""},className:null},setup(e){const u=e,f=l((()=>`#icon-${u.iconClass}`)),p=l((()=>u.className?"svg-icon "+u.className:"svg-icon"));return(l,u)=>(s(),t("svg",a({class:i(p),"aria-hidden":"true"},l.$attrs),[e.title?(s(),t("title",c,n(e.title),1)):r("v-if",!0),o("use",{"xlink:href":i(f)},null,8,v)],16))}}),[["__file","SvgIcon.vue"]]);export{f as default};
@@ -1 +1 @@
1
- import e from"./TextOverTooltip.vue2.js";import r from"../../../_virtual/_plugin-vue_export-helper.js";var o=r(e,[["__file","TextOverTooltip.vue"]]);export{o as default};
1
+ import{defineComponent as e,ref as t,computed as l,openBlock as o,createElementBlock as i,createVNode as a,unref as r,withCtx as s,createElementVNode as u,normalizeClass as n,renderSlot as p,toDisplayString as f,createTextVNode as m}from"vue";import{NTooltip as v}from"naive-ui";import"xe-utils";import"moment";import c from"../../utils/vexutilsExpand.js";import d from"../../../_virtual/plugin-vue_export-helper.js";const x={class:"text-over-tooltip-components"};var _=d(e({__name:"TextOverTooltip",props:{content:null,className:null,refName:null,effect:{default:"dark"},placement:{default:"top"},tooltipTitle:{default:""},isAlias:{type:Boolean}},setup(e){const d=e;let _=t(!1);const N=l((()=>{let e=d.tooltipTitle||d.content||"";return c.isNumber(e)?e.toString():e})),T=t(null),h=()=>{_.value=!1};return(t,l)=>(o(),i("div",x,[a(r(v),{effect:e.effect,show:r(_),placement:e.placement},{trigger:s((()=>[u("div",{class:n(["ellipsis",e.className]),onMouseover:l[0]||(l[0]=t=>(e=>{if(d.isAlias)return void(_.value=!0);let t=T.value.parentNode.offsetWidth,l=T.value.offsetWidth;_.value=l>t})(e.refName)),onMouseout:h},[u("i",{ref:e=>{e&&(T.value=e)}},[p(t.$slots,"default"),u("i",null,f(e.content),1)],512)],34)])),default:s((()=>[m(" "+f(r(N)),1)])),_:3},8,["effect","show","placement"])]))}}),[["__file","TextOverTooltip.vue"]]);export{_ as default};
@@ -1 +1 @@
1
- import e from"./NoData.vue2.js";import r from"../../../_virtual/_plugin-vue_export-helper.js";var a=r(e,[["__file","NoData.vue"]]);export{a as default};
1
+ import{defineComponent as t,computed as e,openBlock as o,createElementBlock as a,unref as r,createCommentVNode as i,createElementVNode as s,toDisplayString as n}from"vue";import p from"../../assets/img/nodata.png.js";import m from"../../assets/img/no-permission.png.js";import l from"../../assets/img/failure.png.js";import f from"../../assets/img/notfound.png.js";import g from"../../../_virtual/plugin-vue_export-helper.js";const u=["src"];var c=g(t({__name:"NoData",props:{noDataTip:{type:String,default:"暂无数据"},noDataImg:{type:String,default:"nodata"},showImg:{type:Boolean,default:!0}},setup(t){const g=t,c={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",fontSize:"22px",color:"#333"},d={width:"260px",maxWidth:"70%"},x={marginTop:"12px",marginBottom:"0",fontSize:"16px",color:"rgb(0 0 0 / 80%)"},y={marginTop:"6px",fontSize:"14px",color:"rgb(0 0 0 / 40%)"},h=e((()=>{let t=null;switch(g.noDataImg){case"no-permission":t=m;break;case"failure":t=l;break;case"nodata":t=p;break;default:t=f}return t})),v=e((()=>{let t="";switch(g.noDataImg){case"no-permission":t="请联系管理员";break;case"failure":t="请稍后再试"}return t}));return(e,p)=>(o(),a("div",{style:c},[t.showImg?(o(),a("img",{key:0,style:d,src:r(h),alt:""},null,8,u)):i("v-if",!0),s("p",{style:x},n(t.noDataTip),1),r(v)?(o(),a("span",{key:1,style:y},n(r(v)),1)):i("v-if",!0)]))}}),[["__file","NoData.vue"]]);export{c as default};
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",i="3.1.44",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},d={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},o={name:e,version:"3.1.44",private:!0,main:"index.ts",peerDependencies:n,dependencies:d};export{o as default,d as dependencies,s as main,e as name,n as peerDependencies,i as version};
1
+ var e="@cnhis-design-vue/shared",i="3.1.45-beta.0",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.1.45-beta.0",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.44",
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": "d8b844a2abdaf619c8f942319bc89b08178edb89"
64
+ "gitHead": "464eb702ff1a466f3cf7bff01019ccb45c06e0b8"
65
65
  }
@@ -1 +0,0 @@
1
- import{defineComponent as e,ref as t,provide as l,computed as i,watch as a,openBlock as n,createElementBlock as r,createElementVNode as s,createCommentVNode as o,renderSlot as u,unref as c,createVNode as f,withCtx as d,createTextVNode as h,toDisplayString as m,Fragment as v,renderList as p}from"vue";import b from"../../table-filter/src/components/render-widget/index.vue.js";import g from"../../table-filter/src/hooks/useMixins.js";import y from"../../table-filter/src/hooks/useAdvanced.js";import C from"../../table-filter/src/hooks/useRenderWidget.js";import{NButton as k,NIcon as S}from"naive-ui";import{Search as j}from"@vicons/ionicons5";import{cloneDeep as x}from"lodash-es";import{InjectionFilterApiConfig as q}from"../../table-filter/src/constants/index.js";const R={class:"base-search-block"},O={class:"base-container"},F={class:"bease-left"},A={class:"base-ul"},I={key:0,class:"baseli showQuickBtn"},Q=s("i",{class:"iconfont-table-filter icon-table-filter-shaixuan",style:{color:"inherit","margin-right":"6px"}},null,-1),V={key:0,class:"qqConObjCount"},_={key:1,class:"baseli"},w={key:2,class:"baseli"},B=s("i",{class:"iconfont-table-filter icon-table-filter-reset",style:{"margin-right":"6px"}},null,-1);var E=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:E,emit:D}){const L=e,{outQuickSearchFn:N}=g(),{isRender:P,getRenderSearchConObj:W,isExistDefValByRenderWidget:U,resetRenderWidgetValue:$}=C(),{transformData:z,transformParams:M}=y(),T=t([]),G=t(!1),H=t([]);l(q,L.filterApiConfig);const J=i((()=>X("hideQuickSearch"))),K=i((()=>X("hideResetBtn")));function X(e){return 0==L.showSettings[e]}function Y(){D("foldQuickSearch",!0)}function Z(e={}){const t=te()||[];!function(e,t,l=!1,i={}){let a=[];H.value.length>0&&(a=x(H.value));D("onFilterSearch",e,t,l,a,i)}(t,M(t),!0,e)}function ee(e,t){H.value.forEach((l=>{l._frontId===e&&(l.widgetCfg.isInit=t)}))}function te(){return function(e){if(!Array.isArray(e))return[];let t=[];for(let l=0;l<e.length;l++){let i=e[l];const a=W(i);a&&t.push(a)}return t.filter((e=>e.value))}(H.value)}function le(){!function(e){if(!Array.isArray(e))return;e.forEach((e=>{$(e)})),N.handlerInitSearchItem(e)}(H.value),D("handleReset",{targetType:"outQuickSearchReset"})}return a((()=>L.searchFieldList),(e=>{e&&e.length>0&&function(){H.value=[];let e=x(z(L.searchFieldList)).filter((e=>1==e.isShowSearch&&1==e.filterExplicit));H.value=e,N.handlerInitSearchItem(H.value),H.value.some((e=>P(e)?U(e):!!e.explicitDefaultVal))}()}),{immediate:!0,deep:!0}),a((()=>L.qqConObjCount),(e=>{const t=T.value.length||0;G.value=t+Number(e)>0&&K.value}),{immediate:!0}),a((()=>H),(()=>{T.value=te()||[];const e=M(T.value);G.value=T.value.length+Number(L.qqConObjCount)>0&&K.value,D("getFilterParam",T.value,e)}),{immediate:!0,deep:!0}),E({handleReset:le}),(t,l)=>(n(),r("div",R,[s("div",O,[s("div",F,[s("ul",A,[o(" 筛选分类插槽 "),u(t.$slots,"classification"),c(J)?(n(),r("li",I,[f(c(k),{class:"search-default",type:"default",onClick:Y},{default:d((()=>[Q,h(" 筛选"),e.qqConObjCount?(n(),r("span",V,"("+m(e.qqConObjCount)+")",1)):o("v-if",!0)])),_:1})])):o("v-if",!0),o(" start--筛选外显--start "),(n(!0),r(v,null,p(H.value,(e=>(n(),r(v,null,[e.isRender?(n(),r("li",{class:"baseli outQuickSearch-li",key:e._frontId},[f(b,{cfg:e,modelValue:e.value,"onUpdate:modelValue":t=>e.value=t,onOutFilterChange:Z,onChangeInit:ee},null,8,["cfg","modelValue","onUpdate:modelValue"])])):o("v-if",!0)],64)))),256)),o(" end--筛选外显--end "),o(" 查询按钮 "),H.value&&H.value.length>0?(n(),r("li",_,[f(c(k),{type:"primary",onClick:Z},{default:d((()=>[f(c(S),{component:c(j),size:"16",style:{"margin-right":"6px"}},null,8,["component"]),h(" 查询 ")])),_:1})])):o("v-if",!0),o(" 重置按钮 "),G.value?(n(),r("li",w,[f(c(k),{onClick:le},{default:d((()=>[B,h(" 重置 ")])),_:1})])):o("v-if",!0),o(" 业务按钮插槽 "),u(t.$slots,"buttons")])])])]))}});export{E 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 a,openBlock as l,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 h}from"vue";import{NModal as f,NCard as m,NButton as p}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:()=>[]}},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 Y(){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()})),a((()=>k.visible),(e=>{z.value=e,e&&H()})),y({cancelSaveAdd:$}),(e,i)=>(l(),o(n(f),{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(m),{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:Y,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(p),{onClick:$},{default:u((()=>[v("取消")])),_:1}),d(n(p),{type:"info",onClick:T},{default:u((()=>[v("保存")])),_:1})])])),default:u((()=>[d(x,h(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 t,inject as i,useAttrs as a,computed as n,watch as o,openBlock as s,createElementBlock as l,createVNode as c,mergeProps as d,unref as r,withCtx as u,createTextVNode as f}from"vue";import{useMessage as v,NButton as m}from"naive-ui";import p from"../table-modal/index.vue.js";import y from"../search-filter/index.vue.js";import b from"../../../../table-filter/src/hooks/useMixins.js";import{InjectionFilterApiConfig as h}from"../../../../table-filter/src/constants/index.js";const C={class:"search"};var g=e({__name:"index",props:{searchFieldList:{type:Array,default:()=>[]},conditionList:{type:Array,default:()=>[]},settingId:String,classifyModal:{type:Boolean,default:!1}},emits:["CondiTionListInit","saveGetTableCondiTionList","setClassifyModal"],setup(e,{emit:g}){const L=e,I=v(),{handleGetConfigApi:T}=b();let S=t(L.conditionList),j=t(),A=t(!1),_=t({}),O=t([]),x=t(!1);const F=t(null),k=i(h),w=a();async function G(e){try{let t=Object.assign(e,{id:L.settingId,tableId:w.tableId});await T(t,"requestSaveTableCondiTionSetting",{},k)&&(g("CondiTionListInit"),$(!1))}catch(e){console.log(e)}}function M(){$(!1),S.value.forEach((e=>{e.checked=!1}))}function q(){A.value=!0}function R(e){A.value=!0,_.value=Object.assign(e,{from:"edit"})}function D(e){A.value=!0,_.value=Object.assign(e,{from:"copy"})}async function E(e){try{if(Object.assign(e,{tableId:w.tableId,conditionList:JSON.stringify(S.value)}),x.value=!0,!await T(e,"requestSaveTableCondiTion",{},k))return;F.value&&F.value.cancelSaveAdd(),g("saveGetTableCondiTionList"),A.value=!1}catch(e){console.log(e)}finally{x.value=!1}}function H(){A.value=!1,_.value={}}function K(e,t){S.value=e,j.value=t}async function N(e){if(e)try{let t={id:e.sid};if(!await T(t,"requestDeleteTableCondiTion",{},k))return;I.success("删除成功"),g("saveGetTableCondiTionList",{type:"delete",item:e})}catch(e){console.log(e)}else I.info("请选择行")}function $(e){g("setClassifyModal",e)}async function B(){try{let e={id:L.settingId,tableId:w.tableId,type:"SEARCH_CATEGORY"};await T(e,"requestResetDefaultSetting",{},k)&&(g("CondiTionListInit"),$(!1))}catch(e){console.log(e)}}let J=n((()=>L.classifyModal));return o((()=>w.searchKey),(()=>{w.selectKeys=[w.searchKey||"all"]})),o((()=>L.searchFieldList),(e=>{e&&e.length>0&&(O.value=e.filter((e=>"operatorColumn"!==e.columnName)))}),{immediate:!0,deep:!0}),o((()=>L.conditionList),(e=>{S.value=e}),{immediate:!0,deep:!0}),o((()=>A),(e=>{e||(_.value={})})),(e,t)=>(s(),l("div",C,[c(p,d({dataSource:r(S),visibleIn:r(J)},e.$attrs,{onHandleOk:G,onClose:M,onChangeData:K,onResetPopconfirm:B,edit:R,copy:D,delItem:N,type:"search"}),{add:u((()=>[c(r(m),{type:"info",onClick:q},{default:u((()=>[f("新增")])),_:1})])),_:1},16,["dataSource","visibleIn"]),c(y,d({ref_key:"searchFilter",ref:F},e.$attrs,{visible:r(A),loading:r(x),conditionList:r(S),actionList_prop:r(_),searchFieldList:r(O),isInSearch:!0,isCnHis:!0,showCompareField:!0,onSaveAdd:E,onCancelSaveAdd:H}),null,16,["visible","loading","conditionList","actionList_prop","searchFieldList"])]))}});export{g 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 s,watch as o,openBlock as d,createElementBlock as c,normalizeClass as r,unref as h,normalizeStyle as u,withDirectives as f,createVNode as p,createTextVNode as m,toDisplayString as g,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{InjectionFilterApiConfig as M}from"../../table-filter/src/constants/index.js";import{root_isShowResetButton as A}from"./const/index.js";import E from"../../table-filter/src/hooks/useMixins.js";import T from"../../table-filter/src/hooks/useAdvanced.js";const R={key:0,class:"header"},F={class:"tree"},W=["onClick"],q=["onClick"],G=["onClick"],Q={class:"child-item-name"},$={key:1,class:"tree-type-footer"},D={class:"selected-num"},V=C("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1),H={key:0,class:"tile-type classify-1"},K={key:0,class:"header"},U={class:"right-setting"},X=["onClick"],Y={class:"parent ellips"},Z={class:"children"},ee=["onClick"],ie={key:1,class:"selected-list"},ne={class:"selected-num"},le=C("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1),te={class:"name"},ae={class:"name"},se={key:0,class:"main-wrapper"},oe=["onClick"],de={class:"tree-footer"},ce=["onClick"],re=["onClick"],he={key:0,class:"select-type-footer"},ue={class:"selected-num"},fe=C("i",{class:"iconfont-table-filter icon-table-filter-menzhenyishengzhananniushanchu2"},null,-1);var pe=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:pe}){const me=e,{handleGetConfigApi:ge}=E(),{transformClassifyChild:ve}=T(),Ce=i(),ye=x(),ke=n(null);let Se=n(150),be=n(!1),xe=n([]),Oe=n([]),_e=n([]),we=n(2),Ie=n({name:"全部数据",sid:"all_data"}),Le=n([]),Ne=n(""),ze=n(!1),je=n("全部数据");l(A,me.isShowResetButton),l(M,me.filterApiConfig);let Be=t((()=>0===we.value?{marginRight:"8px"}:2===we.value?{display:"inline-block"}:{})),Pe=t((()=>{let e=Oe.value.filter((e=>-1!==me.conditionSid.indexOf(e.sid)));if(-1!==me.conditionSid.indexOf("all_data"))return"全部数据";{let i=[];return e.map((e=>{i.push(e.name)})),i.join(",")}})),Je=t((()=>function(e){let i=0===e.digital?"(0)":e.digital?`(${e.digital})`:"";const{name:n,isPublic:l}=e;return Ue(n,l)+i}));function Me(e){e.open?e.open=!1:e.open=!0}function Ae(e,i,n){je.value=e.name;let l=function(e){let i=[];return xe.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,me.conditionSid));We(!1);const t=ve(null==e?void 0:e.conObj);pe("changeSearch",Boolean("all_data"===e.sid),e,t,n,l)}function Ee(){let e="";if(2===we.value)e=0;else{let i=we.value;e=++i}Se.value=150,Te(e)}async function Te(e,i){let n={tableId:me.tableId,setting:JSON.stringify({classificationIndex:e,classificationWidth:i})};try{await ge(n,"requestSaveListPersonaSetting",{},me.filterApiConfig)&&pe("setClassificationIndex",e)}catch(e){console.log(e)}}function Re(){ze.value=!0,We(!1)}function Fe(e){ze.value=e}function We(e){be.value=void 0===e?!be.value:e}function qe(){if(!me.tableId)return ye.warning("请传入tableId");xe.value=[];let{displayCategoryList:e=[],conditionList:i=[]}=me.conditionMap;Le.value=JSON.parse(JSON.stringify(e))||[],_e.value=JSON.parse(JSON.stringify(i)),Oe.value=JSON.parse(JSON.stringify([{name:"全部数据",sid:"all_data"},...i]));let n=[];var l;0===Le.value.length&&(Le.value=["未分类"]),Le.value.forEach((e=>{let i={name:e,children:[]};Oe.value.forEach((n=>{if(n.displayCategory===e||!n.displayCategory&&"未分类"===e&&"all_data"!==n.sid){if(-1!==me.conditionSid.indexOf(n.sid)){n.selected=!0,i.open=!0;const e=ve(null==n?void 0:n.conObj);pe("changeSearch",!1,n,e)}n.isShow&&i.children.push(n)}})),i.children.length>0&&n.push(i)})),n.unshift({name:"全部数据",sid:"all_data"}),xe.value=n,0===we.value&&(l=!0,xe.value.forEach((e=>{e.children&&e.children.length&&(e.open=l)})))}function Ge({distance:e}){const i=Se.value+e;Se.value=Math.min(Math.max(i,50),650)}function Qe(){Te(we.value,Se.value)}async function $e(){await Ke(me.tableId),Ve()}async function De(e){await Ke(me.tableId),He()}function Ve(e){He(e).then((e=>({})))}function He(e,i={}){if(!me.tableId)return new Promise((e=>e(!1)));let n=Object.keys(i).length>0?i:JSON.parse(JSON.stringify(me.conditionMap));return new Promise(((i,l)=>{var t,a,s,o,d,c;if(Object.keys(n).length>0){_e.value=n.conditionList||[],Le.value=n.displayCategoryList||[];let l={conditionList:_e.value,displayCategoryList:Le.value};pe("getQuickSearchListObj",l),Ne.value=n.settingId;const r=_e.value.find((e=>e.isDefault))||{name:"全部数据",sid:"all_data"};(null==(a=null==(t=Ce.tableOptions)?void 0:t.filterCondition)?void 0:a.displayCategory)&&e&&i({name:null==(o=null==(s=Ce.tableOptions)?void 0:s.filterCondition)?void 0:o.name,sid:null==(c=null==(d=Ce.tableOptions)?void 0:d.filterCondition)?void 0:c.displayCategory}),i(r)}else i({})}))}async function Ke(e){try{if(!e)return new Promise((e=>e(!1)));let i={tableId:e},n=await ge(i,"requestTableCondiTionList",{},me.filterApiConfig);return Promise.resolve(n)}catch(e){return Promise.resolve(!1)}}function Ue(e,i){return i&&e&&"1"===i?e.replace(/\(公共\)$/,""):e}return a((()=>{document.addEventListener("click",(e=>{s((()=>{let i=e.composedPath&&e.composedPath();ke.value&&i.includes(ke.value)||We(!1)}))}))})),o((()=>me.tableId),(e=>{e&&Ve(!0)}),{immediate:!0,deep:!0}),o((()=>me.curClassificationIndex),(e=>{void 0!==e&&(we.value=e)}),{immediate:!0,deep:!0}),o((()=>me.curClassificationWidth),(e=>{e&&(Se.value=Number(e)||150)}),{immediate:!0}),o((()=>me.conditionMap),(e=>{!async function(){try{await qe()}catch(e){console.log(e)}}()}),{immediate:!0,deep:!0}),(i,n)=>(d(),c("div",{class:r(["classification-block","classificationIndex-"+h(we)]),style:u(h(Be))},[0===h(we)?f((d(),c("div",{key:0,class:"tree-type classify-0",style:u({width:h(Se)+"px",paddingBottom:1!=e.hideClearConditionChange?"80px":0,position:"relative"})},[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting?(d(),c("div",R,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"header-1",onClick:Ee},[p(h(O),{component:h(w),size:"16"},null,8,["component"]),m(" "+g("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"header-1",onClick:Re},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),m(" "+g("设置"))])):v("v-if",!0)])):v("v-if",!0),C("ul",F,[(d(!0),c(y,null,k(h(xe),((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=>Me(i)},[C("span",null,g(i.name),1),p(h(O),{component:i.open?h(L):h(N)},null,8,["component"])],10,q),i.open?(d(!0),c(y,{key:0},k(i.children.filter((e=>e.isShow)),((e,n)=>(d(),c("div",{key:n,class:"children",onClick:n=>Ae(e,0,i)},[e.isShow?(d(),S(h(_),{key:0,trigger:"hover",placement:"right"},{trigger:b((()=>[C("span",{class:r(["child-item",{selected:e.selected}])},[C("span",Q,g(Ue(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)],2)])),default:b((()=>[C("span",null,g(h(Je)(e)),1)])),_:2},1024)):v("v-if",!0)],8,G)))),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=>Ae(i)},g(i.name),11,W))],2)):v("v-if",!0)],64)))),256))]),1!=e.hideClearConditionChange?(d(),c("div",$,[C("div",D,"已选择"+g(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),C("div",{class:"selected-item-del",onClick:n[0]||(n[0]=e=>Ae({sid:"all_data",name:"全部数据",digital:h(Ie).digital}))},[V,m(" 清空筛选 ")])])):v("v-if",!0)],4)),[[h(J),{mode:"VR",onMove:Ge,onEnd:Qe}]]):v("v-if",!0),1===h(we)?(d(),c(y,{key:1},[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting||1!=e.hideConditionChangeSetting||h(_e).filter((e=>e.isShow)).length>0?(d(),c("div",H,[1!=e.hideConditionChangeBtn||1!=e.hideConditionChangeSetting?(d(),c("div",K,[C("span",{class:r(["all-data",{selected:-1!==e.conditionSid.indexOf("all_data")}]),onClick:n[1]||(n[1]=e=>Ae({sid:"all_data",name:"全部数据",digital:h(Ie).digital}))},[m(" 全部数据 "),h(Ie).digital||0===h(Ie).digital?(d(),c(y,{key:0},[m(" ("+g(h(Ie).digital||0)+") ",1)],64)):v("v-if",!0)],2),C("div",U,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"setting-1",onClick:Ee,style:{"margin-right":"30px"}},[p(h(O),{component:h(w),size:"16"},null,8,["component"]),m(" "+g("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"setting-1",onClick:Re},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),m(" "+g("设置"))])):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(xe).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",Y,g(e.name),1),C("div",Z,[(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=>Ae(i,0,e)},g(Ue(i.name,null==i?void 0:i.isPublic)),11,ee)):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=>Ae(e)},g(e.name)+" "+g(e.digital),11,X))])):v("v-if",!0)],64)))),256))],4),1!=e.hideClearConditionChange?(d(),c("div",ie,[C("div",ne,"已选择"+g(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),(d(!0),c(y,null,k(h(xe).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},[m(g(i.name)+" ",1),p(h(O),{component:h(j),onClick:n=>Ae(i,0,e)},null,8,["component","onClick"])])):v("v-if",!0)],64)))),256)):(d(),c("div",{class:"selected-item",key:e.sid},[m(g(e.name)+" ",1),p(h(O),{component:h(j),onClick:i=>Ae(e)},null,8,["component","onClick"])]))],64)))),256)),C("div",{class:"selected-item-del",onClick:n[2]||(n[2]=e=>Ae({sid:"all_data",name:"全部数据",digital:h(Ie).digital}))},[le,m(" 清空筛选 ")])])):v("v-if",!0)])):v("v-if",!0)],64)):v("v-if",!0),2===h(we)?(d(),c("div",{key:2,class:"select-type classify-2",ref_key:"selectType",ref:ke},[C("span",{class:"title",onClick:n[3]||(n[3]=()=>We())},[p(h(_),{trigger:"hover",placement:"top"},{trigger:b((()=>[C("span",te,g(h(Pe)),1)])),default:b((()=>[C("span",ae,g(h(Pe)),1)])),_:1}),p(h(O),{component:h(be)?h(B):h(L)},null,8,["component"])]),h(be)?(d(),c("div",se,[C("ul",{class:"tree",style:u({padding:1!=e.hideClearConditionChange?"40px 0":"40px 0 0"})},[(d(!0),c(y,null,k(h(xe),((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=>Me(i)},[m(g(i.name)+g(i.digital||0===i.digital?"("+i.digital+")":"")+" ",1),p(h(O),{component:i.open?h(L):h(N)},null,8,["component"])],10,ce)):v("v-if",!0),i.open?(d(!0),c(y,{key:1},k(i.children.filter((e=>e.isShow)),((e,n)=>(d(),c("div",{key:n,class:"children",onClick:n=>Ae(e,0,i)},[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}])},[C("span",null,g(Ue(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)],2)])),default:b((()=>[C("span",null,g(h(Je)(e)),1)])),_:2},1024)):v("v-if",!0)],8,re)))),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=>Ae(i)},g(i.name),11,oe),C("div",de,[1!=e.hideConditionChangeBtn?(d(),c("span",{key:0,class:"tree-footer-icon",onClick:Ee},[p(h(O),{component:h(w),size:"16"},null,8,["component"]),m(" "+g("切换"))])):v("v-if",!0),1!=e.hideConditionChangeSetting?(d(),c("span",{key:1,class:"tree-footer-icon",onClick:Re},[p(h(O),{component:h(I),size:"16"},null,8,["component"]),m(" "+g("设置"))])):v("v-if",!0)])],64))],2)):v("v-if",!0)],64)))),256))],4),1!=e.hideClearConditionChange?(d(),c("div",he,[C("div",ue,"已选择"+g(e.conditionSid.filter((e=>"all_data"!==e)).length)+"项",1),C("div",{class:"selected-item-del",onClick:n[4]||(n[4]=e=>Ae({sid:"all_data",name:"全部数据",digital:h(Ie).digital}))},[fe,m(" 清空筛选 ")])])):v("v-if",!0)])):v("v-if",!0)],512)):v("v-if",!0),v(" 弹出弹窗 "),p(P,{ref:"search",searchFieldList:e.searchFieldList,conditionList:h(_e),displayCategoryList:h(Le),settingId:h(Ne),tableId:e.tableId,classifyModal:h(ze),onSaveGetTableCondiTionList:De,onCondiTionListInit:$e,onSetClassifyModal:Fe},null,8,["searchFieldList","conditionList","displayCategoryList","settingId","tableId","classifyModal"])],6))}});export{pe 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 c,unref as l,createCommentVNode as m}from"vue";import{fabric as f}from"../../../shared/utils/fabricjs/index.js";import h from"./components/PopupTip.vue.js";import v 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,j=t((()=>"temperature"===y.type)),P=r(null),g=r(),{propItems:I,redrawPoints:b,select:M,pointTipProps:x,pointMenuProps:R,clickMenu:T}=function(){const e=[g,y,C,P];return j.value?d(...e):k(...e)}();return o((()=>{g.value=new f.Canvas(P.value,{width:I.canvasWidth,height:I.canvasHeight,backgroundColor:"#fff",selection:!1,containerClass:"c-fabric-chart",fireRightClick:!0})})),s((()=>{g.value.off(),g.value.clear()})),w({redrawPoints:b,select:M,canvas:g}),(e,t)=>(a(),n(p,null,[i("canvas",{ref_key:"canvasRef",ref:P},null,512),g.value?(a(),u(h,c({key:0,propItems:l(I)},l(x)),null,16,["propItems"])):m("v-if",!0),g.value?(a(),u(l(v),c({key:1,propItems:l(I)},l(R),{show:l(R).show,"onUpdate:show":t[0]||(t[0]=e=>l(R).show=e),onClickMenu:l(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 e}from"./useCumputedPoint.js";import t 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"../../../../shared/utils/fabricjs/index.js";import{useCommon as p}from"./useCommon.js";import{getIndex as h,isEffectiveNode as g}from"../utils/index.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}=e(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((e=>e.show)).forEach(((e,t)=>{var s;const a=[],u=[],c=[];null==(s=e.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={}}=e,M=e.data[d+1],P=ne(M,e);if(s&&P&&!f.breakpoint)h=n([...s,...P],{...v});else if(s&&!P&&!f.breakpoint){const t=ne(M,e);h=t?n([...s,...t],{...v}):null}let E,G;if(f.childbirth){const e=s[1]+V;E=o([s[0],s[1],e],j),c.push(E),G=i([s[0]+X/2,e-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:t,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(e){F.hovered&&(e.on("mouseover",(()=>{te(e,"hover")})),e.on("mouseout",(()=>{x.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{ee(e),function(e){var t,n,o,i;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(n=e.rightLine)||n.setCoords().set({x1:e.left,y1:e.top}),null==(o=e.arrowGroup)||o.setCoords().set({left:e.left,top:e.top}),null==(i=e.arrowGroupText)||i.setCoords().set({left:e.left+X/2,top:e.top+V/2})}(e),F.hovered&&te(e)})),e.on("mouseup",(t=>{if(x.show=!1,1===t.button){const{key:t}=e.origin,n={...e.origin,data:{...e.origin.data,time:C(e.left),value:S(t,e.top)}};y.value.discardActiveObject(),w("change",n),Z(n,"change")}}))}(p),a.push(p),Q.add(p))}(ne(s,e),s,f)})),Promise.all(a).then((e=>{const t=u.filter((e=>e));let n=null;e=e.filter((e=>(e&&n&&(n.nextPoint=e,e.prevPoint=n),n=e||n,e))),Promise.all(c).then((n=>{y.value.add(...t,...e,...n),e.forEach((e=>{null==e||e.bringToFront()}))}))}))}))}function Z(e,t="add"){const{dataIndex:n,data:o,index:i,key:r}=e,l=K.find((e=>e.key===r));switch(t){case"remove":l.data.splice(i,1);break;case"change":l.data[i]=o;break;default:{const e=h(o.time,l.data);l.data.splice(e,0,o);break}}_()}function _(){var e;Q.size&&(null==(e=y.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),(null==e?void 0:e.arrowGroup)&&t.push(null==e?void 0:e.arrowGroup),(null==e?void 0:e.arrowGroupText)&&t.push(null==e?void 0:e.arrowGroupText)})),t}([...Q]))),Q.clear(),U()}function ee(e){const t=e.prevPoint?e.prevPoint.left:L,n=e.nextPoint?e.nextPoint.left:W;e.setCoords(),["cervix","fetalPresentation"].includes(e.origin.key)&&e.top<q&&e.set("top",q),e.top<Y&&e.set("top",Y),e.top>A&&e.set("top",A),e.left<t&&e.set("left",t),e.left>n&&e.set("left",n)}function te(e,t="moving"){const{title:n,key:o,data:i}=e.origin;x.point={x:e.left,y:e.top},x.list=[`${n} ${"hover"===t?i.value:S(o,e.top)}`,`时间 ${C(e.left).slice(-5)}`],x.show=!0}function ne(e,t){if(g(e)&&function(e){const t=H+864e5,n=new Date(e).getTime();return n>=H&&n<=t}(e.time)){const n=T(e.time),o=j(t.key,t.range,e.value);return[n,o<Y?Y:o>A?A:o]}}function oe(e,t){return e+1>t[1]?t[0]:e+1}return t(y,k,!0),function(){const e=new d.Rect({...$,width:R-I-B-1,height:A-1,left:I,top:0,fill:"transparent"});y.value.add(e)}(),function(){function e(e,t="left"){let n="left"===t?I:W;e.forEach(((e,t)=>{const{range:o,spaceValue:l,width:p,title:h,titleStyle:g,key:v,position:m="center",spaceGridNumber:k=1,showNumber:w,showMaxMinNumber:x}=e,b=[],T=[],j=n+p/2,C=function(e,t){const n=[],[o,i]=e;for(let e=o;t>0?e<=i:e>=i;e+=t)n.push(e);return n}(o,l),S=C.length;C.forEach(((t,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(t),e,l,a)),T.push(...f(e,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}))}e(D),e(O,"right")}(),function(){const{show:e,startTime:t,range:n=[0,23],position:o="top",style:l}=E.time,{show:a,range:u=[0,23],position:c,style:f}=E.processTime;if(e||a){const p=[],h=[],g=[],v=[],m=L+X/2,k=V/2;for(let s=0;s<G.mainXCell;s++){if(e){const e=0===s?+t.slice(11,13):oe(p.at(-1),n);p.push(e);const a="top"===o?Y-k:A+k;g.push(i([m+s*X,a],{value:String(e),...r,...l||{}}))}if(a){const e=0===s?u[0]:h.at(-1)+1;h.push(e);const t="top"===c?k:J-k;v.push(i([m+s*X,t],{value:String(e),...r,...f||{}}))}}const w=new d.Group([...g,...v],{objectCaching:!1,...s});y.value.add(w),y.value.sendToBack(w)}}(),function(){var e;const t=Object.values(z),o=[],i={},r=K.find((e=>"cervix"===e.key&&e.show)),l=null==(e=null==r?void 0:r.data)?void 0:e.find((e=>3==+e.value));function s(e,t){const{key:n,range:o}=r||{},i=j(n,o,10),l=[0,t],s=[-t/e,0],a=[(A-i-t)/e,A-i],u=[W-L,e*(W-L)+t];let c=[],f=[];function d([n,o]){return Math.abs(o-e*n-t)<=1}function p([e,t]){const[n,o]=[...h([e,t])];return n>=L&&n<=W&&o>=i&&o<=A}function h([e,t]){return[L+e,A-t]}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]}t.forEach((e=>{if(!e.show)return;const{key:t}=e;switch(t){case"fetalPresentation":{const{range:i,show:r}=K.find((e=>e.key===t));if(r){const r=j(t,i,0);o.push(n([L,r,W,r],{...e}))}break}case"alert":if(l){const{key:t,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(t,a,l.value)],[p,h]=[T(c.time)-L,A-j(t,a,c.value)],g=(h-d)/(p-f),v=d-f*g,y=s(g,v);y.length>0&&(o.push(n(y,{...e})),Object.assign(i,{k:g,b:v}))}break;case"handling":if(l){const{k:t,b:r}=i,a=144e5,u=s(t,r-(T(m(new Date(new Date(l.time).getTime()+a),"yyyy-MM-dd HH:mm"))-T(l.time))*t);u.length>0&&o.push(n(u,{...e}))}}})),y.value.add(...o)}(),U(),function(){function e(e,t){const n=K.findIndex((t=>t.key===e.key));return{renderItem:()=>e.title,origin:{title:e.title,unit:e.unit,dataIndex:n,key:e.key},pointer:t}}k.event.evented&&y.value.on("mouse:up",(t=>{if(3===t.button){const{x:n=0,y:o=0}=t.pointer||{};n>=L&&n<=W&&o>=Y&&o<=A&&(b.point={x:n,y:o},b.show=!0,t.target?(b.target=t.target,b.list=["删除节点"],y.value.forEachObject((e=>{e.origin&&e.left===t.target.left&&e.top===t.target.top&&b.list.push({renderItem:()=>e.origin.title,origin:{...e.origin},mode:"remove",pointer:t.pointer})}))):(b.target=null,b.list=["新增节点"],K.filter((e=>e.show)).forEach((i=>{if(!M(n,"key",X).includes(i.key)){if(["cervix","fetalPresentation"].includes(i.key)&&o<q)return;b.list.push(e(i,t.pointer))}})),1===b.list.length&&(b.show=!1,P("repeat"),console.log("当前时间段内无可新增节点"))))}}))}(),function(){const e=R-B/2;function t(e,t){if(!e.length)return;let o=Y;const i=[];e.forEach((e=>{const n=e.title.split("").join("\n"),s=N.findIndex((t=>t.key===e.key)),a=new d.Text(String(n),{...r,...e.titleStyle||{},originY:"top",left:t,top:o,lineHeight:1}),u=l(e.type,{left:t,top:o+a.height+3,...e.pointAttr,originY:"top",origin:{title:e.title,unit:e.unit,type:e.type,dataIndex:s,key:e.key,isMenu:!0},originLeft:t,originTop:o+a.height+3,...k.event});o+=a.height+u.height+15,function(e){function t(e){const{left:t,top:n}=e;return t>=L&&t<=W&&n>=Y&&n<=A}e.on("moving",(()=>{e.set("originY","center"),t(e)?(ee(e),te(e)):x.show=!1})),e.on("mouseup:before",(n=>{if(x.show=!1,0===n.e.button&&t(e))if(M(e.left,"key",X).includes(e.origin.key))P("repeat");else{const t={data:{time:C(e.left),value:S(e.origin.key,e.top)},...e.origin};w("add",t),Z(t)}!function(e){e.setCoords().set({originY:"top",left:e.originLeft,top:e.originTop})}(e)}))}(u),i.push(a,u)})),n(i),y.value.add(...i)}function n(e){const t=e.at(-1),n=(A-Y)/2,o=(t.height+t.top-Y)/2;e.forEach((e=>{const t=e.top+n-o;e.set({top:t,originTop:t})}))}t(D,I/2),t(O,e)}(),{clickMenu:function({item:e,target:t}){const n={...e.origin};"remove"===e.mode?(w("remove",n),Z(n,"remove")):(Object.assign(n,{data:{time:C(e.pointer.x),value:S(e.origin.key,e.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"../../../../shared/utils/fabricjs/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(),f=a({show:!1,point:{x:0,y:0},list:[]}),g=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))})),b=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})),A=t((()=>d.data.grid.mainXCell)),j=t((()=>{const e=d.data.grid.mainYCell||14;return d.data.scaleValues.find((e=>e.show&&"FHR"===e.key))||14!==e?e:10})),C=t((()=>(b.value-V.value)/A.value)),k=t((()=>{const{xAxis:e,height:a}=d.data,t=Object.values(e).reduce(((e,a)=>(a.show&&e++,e)),0);return a/(j.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/C.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:b.value,originY:Y.value,endY:S.value,xCellWidth:C.value,yCellHeight:k.value,gridXNumber:A.value,gridYNumber:j.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,f,g);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:f,pointMenuProps:g,clickMenu:m}}export{o as default};
@@ -1,4 +0,0 @@
1
- import { Ref } from 'vue';
2
- import { fabric } from '../../../../../es/shared/utils/fabricjs';
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"../../../../shared/utils/fabricjs/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:r,endY:c,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,c-1,r,c-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 r=e({width:h,height:b,...v},Object.assign({},{text:String(l),...n},l?s:{}),{left:o,top:c});w.push(r)}));const j=e({width:r,height:b,...v},{text:String((null==(d=g.breathing)?void 0:d.title)+(null==(u=g.breathing)?void 0:u.unit)),...n,left:-(r-a)/2},{left:0,top:c});w.push(j);const S=w.length>0?new t.Group([...w],{...i}):null;S&&S.sendToBack(),S&&o.value.add(S)}()}export{o as useBottom};
@@ -1 +0,0 @@
1
- import{fabric as e}from"../../../../shared/utils/fabricjs/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/index.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"../../../../shared/utils/fabricjs/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 a}from"./useScaleColumn.js";import{getType as u,isOneLine as h}from"../utils/index.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:j,endY:C,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:u}=n[0];let h=G,c=N;"right"===u&&(h=V,c=V+(null!=(l=null==W?void 0:W.width)?l:0));const p=[],d=A&&"right"!==u?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:a,showNumber:u,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(a||u){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=C-5),!u||(0===r||r===g-1)&&!c||y.push(s(n,i,o,h)),a&&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"===u?0:E.originY,m="right"===u?_: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:j,showMaxMinNumber:V}=n;if(T||X){const{lineXMain:t,lineXSub:e,textLeft:i}=r(j,w,d),o=Y.length;Y.forEach(((l,r)=>{const u=E.endY-r*M*x;if(X&&(!(0===r||r===o-1)||V)){const t=0==r?u-5:u,e=s(l,n,i,t),o=E.originY+e.height/2;t<o&&e.set({top:o}),c.push(e)}c.push(...a(n,r,t,e,u,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>=j&&t.top<=C}G&&function(){const e=JSON.parse(JSON.stringify(H));let o=C;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}),a=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:u(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=a).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,a)}))}();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 '../../../../../es/shared/utils/fabricjs';
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"../../../../shared/utils/fabricjs/index.js";import{defaultStyle as e}from"./useDraw.js";function n(n,i,l){const{other:o,vitalSignsOriginY:r,xCellWidth:a,yCellHeight:s,endX:c}=i;let h=0;function u(n,i,l){const o=[];String(n.value).split("").forEach(((i,l)=>{const r=new t.Text(i,{left:0,top:s*l,originX:"center",...e,objectCaching:!1,...n.style||{}});h=(s-(r.height||0))/2,o.push(r)}));const r={originX:"center",left:i,top:l+h,baseTop:(n.baseTop||0)*s,trueLeft:i,trueHeight:o.length*s,objectCaching:!1};return new t.Group(o,r)}!function(){if(!(null==o?void 0:o.list))return!1;const i=[],h=[];o.list.forEach(((t,e)=>{const n=0===e?"vertical":t.align||"vertical",i=l(t.time,!0);if(i>c)return;const o=h.find((t=>t.left==i));if(o)o[n].push(t);else{const e={left:i,vertical:[],horizontal:[]};e[n].push(t),h.push(e)}})),h.forEach((t=>{let e=r.originY,n=t.left;t.vertical.forEach(((l,o)=>{var c,h;const f=(l.baseTop||0)*s,g=(null==(c=i.at(-1))?void 0:c.left)||0;0===o&&t.left<=g&&(n=g+a);if(i.filter((t=>t.trueLeft===n)).length){const t=String(l.value).length*s,o=(null==(h=i.at(-1))?void 0:h.trueHeight)||0;e+=o,e+t+f>r.endY&&(e=r.originY,n+=a)}e+=f,String(l.value).length&&i.push(u(l,n,e))})),t.horizontal.forEach(((e,l)=>{var o;const c=r.originY+(e.baseTop||0)*s,h=(null==(o=i.at(-1))?void 0:o.left)||0;t.left<=h&&(n=h+a),String(e.value).length&&i.push(u(e,n,c))}))}));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 '../../../../../es/shared/utils/fabricjs';
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"../../../../shared/utils/fabricjs/index.js";function e(e,i,t){var o,n;const{left:d,right:u,getRightInfo:a,canvasWidth:s,endY:h,endX:r,originY:f,borderStyle:v}=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([s-1,0,s-1,h],v),t=new l.Line([r+1,f,s-1,f],{...v,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"../../../../shared/utils/fabricjs/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))),s=Math.max(...e.map((([t])=>t))),h=Math.min(...e.map((([,t])=>t))),f=Math.max(...e.map((([,t])=>t))),m=(f-h)/r(o);let p=i,M=s;return o>0&&o<90||o>180&&o<270?M+=m:p+=m,function(t,n){const r=[l([t,h])];for(;t<n;)t+=u,r.push(l([t,h]));return r}(p,M).forEach((r=>{let o=[];var u,c,i,s,h,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]&&(h=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}([(h[0]+f[0])/2,(h[1]+f[1])/2],e))&&a.push((i=o[t],s=o[t+1],new n.Line([i[0],i[1],s[0],s[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"../../../../shared/utils/fabricjs/index.js";import{setOtherType as g,getFloorNumber as m}from"../utils/index.js";import"lodash-es";import"date-fns";function f(f,y,Y,S){const b=15,w=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||b)||0})),X=a((()=>{var e;const{top:t}=y.data;return(null==(e=t.hospitalDays)?void 0:e.show)&&(t.hospitalDays.height||b)||0})),H=a((()=>{var e;const{top:t}=y.data;return(null==(e=t.operationDays)?void 0:e.show)&&(t.operationDays.height||b)||0})),L=a((()=>{var e,t,a;const{top:l}=y.data;return((null==(e=l.xScalevalue)?void 0:e.show)&&(l.xScalevalue.height||b)||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||b)||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);w.value=n}))})),{propItems:ae,redrawPoints:C,select:w,pointTipProps:j,pointMenuProps:D,clickMenu:x}}export{f as default};
@@ -1,4 +0,0 @@
1
- import { type Ref } from 'vue';
2
- import { fabric } from '../../../../../es/shared/utils/fabricjs';
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"../../../../shared/utils/fabricjs/index.js";import{defaultStyle as e,drawTextGroup as l,defaultTextStyle as i}from"./useDraw.js";function o(o,s){const{grid:n,originX:h,xCellWidth:u,gridXNumber:a,top:c,xScalevalueHeight:d,iconsWidth:r,topList:f,endXLimit:p,canvasWidth:g,borderStyle:v}=s;!function(){const y=[];p&&y.push(new t.Line([p,0,g,0],v));let S=0;f.forEach(((t,e)=>{e>0&&(S+=s[`${f[e-1].key}Height`]),"xScalevalue"==t.key?(function(t,e,o){if(!c.dayHeight)return!1;const s=c.dayHeight,d=u*n.subSecondXCell,r=(a-n.surplusXCell)/n.subSecondXCell;for(let n=0;n<r;n++){const u=h+n*d,a=n%2==0?"上午":"下午",c=l({width:d,height:s,...v},{value:a,...i,...t.style||{}},{left:u,top:o});e.push(c)}}(t,y,S),function(t,e,o){var s;const a=c.xScalevalue.show&&null!=(s=c.dayHeight)?s: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<n.mainXCell;t++)g.push(c.xScalevalue.list);g.flat().forEach(((s,n)=>{const c=h+n*u,d=l({width:u,height:f,...v},{value:s.value,...i,...t.style||{},...s.style||{}},{left:c,top:o+a});e.push(d)}))}(t,y,S)):s[`${t.key}Height`]&&function(t,e,o){const a=s[`${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*n.subXCell;t.list.forEach(((s,n)=>{const u=h+n*d,c=l({width:d,height:a,...v},{value:s,...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{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};